@ngrok/ngrok-api 0.2.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/README.md +0 -28
  2. package/docs/CNAME +1 -0
  3. package/docs/assets/js/search.js +1 -1
  4. package/docs/classes/client.Ngrok.html +204 -119
  5. package/docs/classes/services.APIKeys.html +6 -105
  6. package/docs/classes/services.AbuseReports.html +3 -102
  7. package/docs/classes/{services.IPWhitelist.html → services.AgentIngresses.html} +41 -148
  8. package/docs/classes/services.CertificateAuthorities.html +6 -105
  9. package/docs/classes/services.Credentials.html +6 -105
  10. package/docs/classes/services.EdgeRouteBackendModule.html +270 -0
  11. package/docs/classes/services.EdgeRouteCircuitBreakerModule.html +270 -0
  12. package/docs/classes/services.EdgeRouteCompressionModule.html +270 -0
  13. package/docs/classes/services.EdgeRouteIPRestrictionModule.html +270 -0
  14. package/docs/classes/services.EdgeRouteOAuthModule.html +270 -0
  15. package/docs/classes/services.EdgeRouteOIDCModule.html +270 -0
  16. package/docs/classes/{services.EndpointResponseHeadersModule.html → services.EdgeRouteRequestHeadersModule.html} +28 -127
  17. package/docs/classes/services.EdgeRouteResponseHeadersModule.html +270 -0
  18. package/docs/classes/services.EdgeRouteSAMLModule.html +270 -0
  19. package/docs/classes/services.EdgeRouteWebhookVerificationModule.html +270 -0
  20. package/docs/classes/services.EdgeRouteWebsocketTCPConverterModule.html +270 -0
  21. package/docs/classes/services.EdgesHTTPS.html +343 -0
  22. package/docs/classes/services.EdgesHTTPSRoutes.html +317 -0
  23. package/docs/classes/services.EdgesTCP.html +343 -0
  24. package/docs/classes/services.EdgesTLS.html +343 -0
  25. package/docs/classes/services.Endpoints.html +256 -0
  26. package/docs/classes/services.EventDestinations.html +7 -106
  27. package/docs/classes/services.EventSources.html +6 -105
  28. package/docs/classes/services.EventSubscriptions.html +6 -105
  29. package/docs/classes/{services.EventStreams.html → services.FailoverBackends.html} +51 -140
  30. package/docs/classes/services.HTTPResponseBackends.html +318 -0
  31. package/docs/classes/{services.EndpointMutualTLSModule.html → services.HTTPSEdgeMutualTLSModule.html} +22 -121
  32. package/docs/classes/{services.EndpointTLSTerminationModule.html → services.HTTPSEdgeTLSTerminationModule.html} +22 -121
  33. package/docs/classes/services.IPPolicies.html +6 -105
  34. package/docs/classes/services.IPPolicyRules.html +6 -105
  35. package/docs/classes/services.IPRestrictions.html +7 -106
  36. package/docs/classes/services.ReservedAddrs.html +6 -137
  37. package/docs/classes/services.ReservedDomains.html +8 -171
  38. package/docs/classes/services.SSHCertificateAuthorities.html +6 -105
  39. package/docs/classes/services.SSHCredentials.html +6 -105
  40. package/docs/classes/services.SSHHostCertificates.html +6 -105
  41. package/docs/classes/services.SSHUserCertificates.html +6 -105
  42. package/docs/classes/{services.EndpointSAMLModule.html → services.TCPEdgeBackendModule.html} +25 -124
  43. package/docs/classes/{services.EndpointIPPolicyModule.html → services.TCPEdgeIPRestrictionModule.html} +22 -121
  44. package/docs/classes/services.TLSCertificates.html +6 -105
  45. package/docs/classes/{services.EndpointLoggingModule.html → services.TLSEdgeBackendModule.html} +25 -124
  46. package/docs/classes/{services.EndpointOIDCModule.html → services.TLSEdgeIPRestrictionModule.html} +25 -124
  47. package/docs/classes/{services.EndpointOAuthModule.html → services.TLSEdgeMutualTLSModule.html} +25 -124
  48. package/docs/classes/services.TLSEdgeTLSTerminationModule.html +270 -0
  49. package/docs/classes/services.TunnelGroupBackends.html +351 -0
  50. package/docs/classes/services.TunnelSessions.html +6 -105
  51. package/docs/classes/services.Tunnels.html +34 -101
  52. package/docs/classes/services.WeightedBackends.html +353 -0
  53. package/docs/index.html +0 -27
  54. package/docs/interfaces/client.NgrokConfig.html +2 -2
  55. package/docs/interfaces/datatypes.APIKey.html +6 -6
  56. package/docs/interfaces/datatypes.APIKeyCreate.html +2 -2
  57. package/docs/interfaces/datatypes.APIKeyList.html +3 -3
  58. package/docs/interfaces/datatypes.APIKeyUpdate.html +3 -3
  59. package/docs/interfaces/datatypes.AWSAuth.html +2 -2
  60. package/docs/interfaces/datatypes.AWSCredentials.html +2 -2
  61. package/docs/interfaces/datatypes.AWSRole.html +1 -1
  62. package/docs/interfaces/datatypes.AbuseReport.html +7 -7
  63. package/docs/interfaces/datatypes.AbuseReportCreate.html +2 -2
  64. package/docs/interfaces/datatypes.AbuseReportHostname.html +2 -2
  65. package/docs/interfaces/{datatypes.EventStream.html → datatypes.AgentIngress.html} +52 -71
  66. package/docs/interfaces/datatypes.AgentIngressCreate.html +205 -0
  67. package/docs/interfaces/datatypes.AgentIngressList.html +205 -0
  68. package/docs/interfaces/{datatypes.IPWhitelistEntryUpdate.html → datatypes.AgentIngressUpdate.html} +16 -16
  69. package/docs/interfaces/datatypes.CertificateAuthority.html +11 -11
  70. package/docs/interfaces/datatypes.CertificateAuthorityCreate.html +3 -3
  71. package/docs/interfaces/datatypes.CertificateAuthorityList.html +3 -3
  72. package/docs/interfaces/datatypes.CertificateAuthorityUpdate.html +3 -3
  73. package/docs/interfaces/datatypes.Credential.html +7 -7
  74. package/docs/interfaces/datatypes.CredentialCreate.html +3 -3
  75. package/docs/interfaces/datatypes.CredentialList.html +3 -3
  76. package/docs/interfaces/datatypes.CredentialUpdate.html +4 -4
  77. package/docs/interfaces/{datatypes.EndpointCircuitBreakerReplace.html → datatypes.EdgeBackendReplace.html} +12 -12
  78. package/docs/interfaces/{datatypes.EndpointIPPolicyReplace.html → datatypes.EdgeIPRestrictionReplace.html} +11 -11
  79. package/docs/interfaces/{datatypes.EndpointMutualTLSReplace.html → datatypes.EdgeMutualTLSReplace.html} +11 -11
  80. package/docs/interfaces/datatypes.EdgeRouteBackendReplace.html +190 -0
  81. package/docs/interfaces/datatypes.EdgeRouteCircuitBreakerReplace.html +190 -0
  82. package/docs/interfaces/{datatypes.EndpointCompressionReplace.html → datatypes.EdgeRouteCompressionReplace.html} +25 -11
  83. package/docs/interfaces/datatypes.EdgeRouteIPRestrictionReplace.html +190 -0
  84. package/docs/interfaces/{datatypes.ReservedDomainCertNSTarget.html → datatypes.EdgeRouteItem.html} +19 -19
  85. package/docs/interfaces/{datatypes.EndpointOAuthReplace.html → datatypes.EdgeRouteOAuthReplace.html} +25 -11
  86. package/docs/interfaces/datatypes.EdgeRouteOIDCReplace.html +190 -0
  87. package/docs/interfaces/{datatypes.EndpointRequestHeadersReplace.html → datatypes.EdgeRouteRequestHeadersReplace.html} +25 -11
  88. package/docs/interfaces/datatypes.EdgeRouteResponseHeadersReplace.html +190 -0
  89. package/docs/interfaces/{datatypes.EndpointSAMLReplace.html → datatypes.EdgeRouteSAMLReplace.html} +25 -11
  90. package/docs/interfaces/{datatypes.EndpointWebhookValidationReplace.html → datatypes.EdgeRouteWebhookVerificationReplace.html} +25 -11
  91. package/docs/interfaces/datatypes.EdgeRouteWebsocketTCPConverterReplace.html +190 -0
  92. package/docs/interfaces/{datatypes.EndpointResponseHeadersReplace.html → datatypes.EdgeTLSTerminationAtEdgeReplace.html} +12 -12
  93. package/docs/interfaces/{datatypes.EndpointTLSTerminationReplace.html → datatypes.EdgeTLSTerminationReplace.html} +11 -11
  94. package/docs/interfaces/datatypes.Endpoint.html +395 -0
  95. package/docs/interfaces/{datatypes.EndpointLogging.html → datatypes.EndpointBackend.html} +19 -19
  96. package/docs/interfaces/{datatypes.EndpointLoggingMutate.html → datatypes.EndpointBackendMutate.html} +19 -19
  97. package/docs/interfaces/datatypes.EndpointCircuitBreaker.html +6 -6
  98. package/docs/interfaces/datatypes.EndpointCompression.html +1 -1
  99. package/docs/interfaces/datatypes.EndpointIPPolicy.html +2 -2
  100. package/docs/interfaces/datatypes.EndpointIPPolicyMutate.html +2 -2
  101. package/docs/interfaces/{datatypes.EndpointConfigurationList.html → datatypes.EndpointList.html} +19 -19
  102. package/docs/interfaces/datatypes.EndpointMutualTLS.html +2 -2
  103. package/docs/interfaces/datatypes.EndpointMutualTLSMutate.html +2 -2
  104. package/docs/interfaces/datatypes.EndpointOAuth.html +7 -7
  105. package/docs/interfaces/datatypes.EndpointOAuthFacebook.html +5 -5
  106. package/docs/interfaces/datatypes.EndpointOAuthGitHub.html +7 -7
  107. package/docs/interfaces/datatypes.EndpointOAuthGoogle.html +5 -5
  108. package/docs/interfaces/datatypes.EndpointOAuthMicrosoft.html +5 -5
  109. package/docs/interfaces/datatypes.EndpointOAuthProvider.html +4 -4
  110. package/docs/interfaces/datatypes.EndpointOIDC.html +9 -9
  111. package/docs/interfaces/datatypes.EndpointRequestHeaders.html +3 -3
  112. package/docs/interfaces/datatypes.EndpointResponseHeaders.html +3 -3
  113. package/docs/interfaces/datatypes.EndpointSAML.html +33 -14
  114. package/docs/interfaces/datatypes.EndpointSAMLMutate.html +28 -9
  115. package/docs/interfaces/datatypes.EndpointTLSTermination.html +3 -3
  116. package/docs/interfaces/datatypes.EndpointTLSTerminationAtEdge.html +186 -0
  117. package/docs/interfaces/datatypes.EndpointWebhookValidation.html +4 -4
  118. package/docs/interfaces/{datatypes.EndpointOIDCReplace.html → datatypes.EndpointWebsocketTCPConverter.html} +16 -25
  119. package/docs/interfaces/datatypes.Error.html +4 -4
  120. package/docs/interfaces/datatypes.EventDestination.html +7 -7
  121. package/docs/interfaces/datatypes.EventDestinationCreate.html +4 -4
  122. package/docs/interfaces/datatypes.EventDestinationList.html +3 -3
  123. package/docs/interfaces/datatypes.EventDestinationUpdate.html +5 -5
  124. package/docs/interfaces/datatypes.EventSource.html +2 -2
  125. package/docs/interfaces/datatypes.EventSourceCreate.html +2 -2
  126. package/docs/interfaces/datatypes.EventSourceItem.html +2 -2
  127. package/docs/interfaces/datatypes.EventSourceList.html +2 -2
  128. package/docs/interfaces/datatypes.EventSourcePaging.html +1 -1
  129. package/docs/interfaces/datatypes.EventSourceReplace.html +1 -1
  130. package/docs/interfaces/datatypes.EventSourceUpdate.html +2 -2
  131. package/docs/interfaces/datatypes.EventSubscription.html +7 -7
  132. package/docs/interfaces/datatypes.EventSubscriptionCreate.html +5 -5
  133. package/docs/interfaces/datatypes.EventSubscriptionList.html +3 -3
  134. package/docs/interfaces/datatypes.EventSubscriptionUpdate.html +6 -6
  135. package/docs/interfaces/datatypes.EventTarget.html +3 -3
  136. package/docs/interfaces/datatypes.EventTargetCloudwatchLogs.html +2 -2
  137. package/docs/interfaces/datatypes.EventTargetFirehose.html +2 -2
  138. package/docs/interfaces/datatypes.EventTargetKinesis.html +2 -2
  139. package/docs/interfaces/{datatypes.IPWhitelistEntry.html → datatypes.FailoverBackend.html} +41 -41
  140. package/docs/interfaces/{datatypes.IPWhitelistEntryCreate.html → datatypes.FailoverBackendCreate.html} +23 -23
  141. package/docs/interfaces/datatypes.FailoverBackendList.html +205 -0
  142. package/docs/interfaces/datatypes.FailoverBackendUpdate.html +219 -0
  143. package/docs/interfaces/datatypes.HTTPResponseBackend.html +295 -0
  144. package/docs/interfaces/datatypes.HTTPResponseBackendCreate.html +243 -0
  145. package/docs/interfaces/datatypes.HTTPResponseBackendList.html +190 -0
  146. package/docs/interfaces/datatypes.HTTPResponseBackendUpdate.html +257 -0
  147. package/docs/interfaces/datatypes.HTTPSEdge.html +314 -0
  148. package/docs/interfaces/datatypes.HTTPSEdgeCreate.html +238 -0
  149. package/docs/interfaces/datatypes.HTTPSEdgeList.html +205 -0
  150. package/docs/interfaces/{datatypes.EndpointConfigurationUpdate.html → datatypes.HTTPSEdgeRoute.html} +154 -78
  151. package/docs/interfaces/{datatypes.EndpointConfigurationCreate.html → datatypes.HTTPSEdgeRouteCreate.html} +108 -89
  152. package/docs/interfaces/{datatypes.EndpointConfiguration.html → datatypes.HTTPSEdgeRouteUpdate.html} +104 -123
  153. package/docs/interfaces/datatypes.HTTPSEdgeUpdate.html +257 -0
  154. package/docs/interfaces/datatypes.IPPolicy.html +5 -24
  155. package/docs/interfaces/datatypes.IPPolicyCreate.html +2 -21
  156. package/docs/interfaces/datatypes.IPPolicyList.html +3 -3
  157. package/docs/interfaces/datatypes.IPPolicyRule.html +26 -7
  158. package/docs/interfaces/datatypes.IPPolicyRuleCreate.html +23 -4
  159. package/docs/interfaces/datatypes.IPPolicyRuleList.html +3 -3
  160. package/docs/interfaces/datatypes.IPPolicyRuleUpdate.html +4 -4
  161. package/docs/interfaces/datatypes.IPPolicyUpdate.html +3 -3
  162. package/docs/interfaces/datatypes.IPRestriction.html +8 -8
  163. package/docs/interfaces/datatypes.IPRestrictionCreate.html +5 -5
  164. package/docs/interfaces/datatypes.IPRestrictionList.html +3 -3
  165. package/docs/interfaces/datatypes.IPRestrictionUpdate.html +5 -5
  166. package/docs/interfaces/datatypes.Item.html +1 -1
  167. package/docs/interfaces/datatypes.Paging.html +2 -2
  168. package/docs/interfaces/datatypes.Ref.html +2 -2
  169. package/docs/interfaces/datatypes.ReservedAddr.html +7 -26
  170. package/docs/interfaces/datatypes.ReservedAddrCreate.html +3 -22
  171. package/docs/interfaces/datatypes.ReservedAddrList.html +3 -3
  172. package/docs/interfaces/datatypes.ReservedAddrUpdate.html +3 -22
  173. package/docs/interfaces/datatypes.ReservedDomain.html +30 -49
  174. package/docs/interfaces/datatypes.ReservedDomainCertJob.html +4 -23
  175. package/docs/interfaces/datatypes.ReservedDomainCertPolicy.html +2 -2
  176. package/docs/interfaces/datatypes.ReservedDomainCertStatus.html +2 -2
  177. package/docs/interfaces/datatypes.ReservedDomainCreate.html +6 -44
  178. package/docs/interfaces/datatypes.ReservedDomainList.html +3 -3
  179. package/docs/interfaces/datatypes.ReservedDomainUpdate.html +5 -43
  180. package/docs/interfaces/datatypes.SSHCertificateAuthority.html +7 -7
  181. package/docs/interfaces/datatypes.SSHCertificateAuthorityCreate.html +5 -5
  182. package/docs/interfaces/datatypes.SSHCertificateAuthorityList.html +3 -3
  183. package/docs/interfaces/datatypes.SSHCertificateAuthorityUpdate.html +3 -3
  184. package/docs/interfaces/datatypes.SSHCredential.html +7 -7
  185. package/docs/interfaces/datatypes.SSHCredentialCreate.html +4 -4
  186. package/docs/interfaces/datatypes.SSHCredentialList.html +3 -3
  187. package/docs/interfaces/datatypes.SSHCredentialUpdate.html +4 -4
  188. package/docs/interfaces/datatypes.SSHHostCertificate.html +12 -12
  189. package/docs/interfaces/datatypes.SSHHostCertificateCreate.html +7 -7
  190. package/docs/interfaces/datatypes.SSHHostCertificateList.html +3 -3
  191. package/docs/interfaces/datatypes.SSHHostCertificateUpdate.html +3 -3
  192. package/docs/interfaces/datatypes.SSHUserCertificate.html +14 -14
  193. package/docs/interfaces/datatypes.SSHUserCertificateCreate.html +9 -9
  194. package/docs/interfaces/datatypes.SSHUserCertificateList.html +3 -3
  195. package/docs/interfaces/datatypes.SSHUserCertificateUpdate.html +3 -3
  196. package/docs/interfaces/datatypes.TCPEdge.html +295 -0
  197. package/docs/interfaces/datatypes.TCPEdgeCreate.html +238 -0
  198. package/docs/interfaces/{datatypes.IPWhitelistEntryList.html → datatypes.TCPEdgeList.html} +22 -22
  199. package/docs/interfaces/{datatypes.EventStreamUpdate.html → datatypes.TCPEdgeUpdate.html} +43 -48
  200. package/docs/interfaces/datatypes.TLSCertificate.html +21 -21
  201. package/docs/interfaces/datatypes.TLSCertificateCreate.html +4 -4
  202. package/docs/interfaces/datatypes.TLSCertificateList.html +3 -3
  203. package/docs/interfaces/datatypes.TLSCertificateSANs.html +2 -2
  204. package/docs/interfaces/datatypes.TLSCertificateUpdate.html +3 -3
  205. package/docs/interfaces/datatypes.TLSEdge.html +323 -0
  206. package/docs/interfaces/datatypes.TLSEdgeCreate.html +266 -0
  207. package/docs/interfaces/{datatypes.EventStreamList.html → datatypes.TLSEdgeList.html} +23 -23
  208. package/docs/interfaces/datatypes.TLSEdgeUpdate.html +285 -0
  209. package/docs/interfaces/datatypes.Tunnel.html +85 -9
  210. package/docs/interfaces/datatypes.TunnelGroupBackend.html +281 -0
  211. package/docs/interfaces/datatypes.TunnelGroupBackendCreate.html +205 -0
  212. package/docs/interfaces/datatypes.TunnelGroupBackendList.html +205 -0
  213. package/docs/interfaces/datatypes.TunnelGroupBackendUpdate.html +219 -0
  214. package/docs/interfaces/datatypes.TunnelList.html +3 -3
  215. package/docs/interfaces/datatypes.TunnelSession.html +10 -10
  216. package/docs/interfaces/datatypes.TunnelSessionList.html +3 -3
  217. package/docs/interfaces/datatypes.TunnelSessionsUpdate.html +1 -1
  218. package/docs/interfaces/{datatypes.EventStreamCreate.html → datatypes.WeightedBackend.html} +44 -44
  219. package/docs/interfaces/datatypes.WeightedBackendCreate.html +205 -0
  220. package/docs/interfaces/datatypes.WeightedBackendList.html +205 -0
  221. package/docs/interfaces/datatypes.WeightedBackendUpdate.html +219 -0
  222. package/docs/modules/datatypes.html +213 -89
  223. package/docs/modules/services.html +89 -33
  224. package/lib/client.d.ts +54 -24
  225. package/lib/client.d.ts.map +1 -1
  226. package/lib/client.js +45 -22
  227. package/lib/client.js.map +1 -1
  228. package/lib/datatypes.d.ts +617 -281
  229. package/lib/datatypes.d.ts.map +1 -1
  230. package/lib/services.d.ts +385 -169
  231. package/lib/services.d.ts.map +1 -1
  232. package/lib/services.js +1432 -597
  233. package/lib/services.js.map +1 -1
  234. package/package.json +2 -2
  235. package/src/client.ts +98 -45
  236. package/src/datatypes.ts +669 -302
  237. package/src/services.ts +1426 -610
  238. package/docs/classes/services.EndpointCircuitBreakerModule.html +0 -369
  239. package/docs/classes/services.EndpointCompressionModule.html +0 -369
  240. package/docs/classes/services.EndpointConfigurations.html +0 -451
  241. package/docs/classes/services.EndpointRequestHeadersModule.html +0 -369
  242. package/docs/classes/services.EndpointWebhookValidationModule.html +0 -369
  243. package/docs/interfaces/datatypes.EndpointLoggingReplace.html +0 -176
  244. package/test/endpointConfigurations.test.js +0 -67
package/lib/services.js CHANGED
@@ -129,30 +129,44 @@ exports.Tunnels =
129
129
  exports.SSHCertificateAuthorities =
130
130
  exports.ReservedDomains =
131
131
  exports.ReservedAddrs =
132
- exports.EndpointOIDCModule =
133
- exports.EndpointSAMLModule =
134
- exports.EndpointWebhookValidationModule =
135
- exports.EndpointOAuthModule =
136
- exports.EndpointResponseHeadersModule =
137
- exports.EndpointRequestHeadersModule =
138
- exports.EndpointMutualTLSModule =
139
- exports.EndpointIPPolicyModule =
140
- exports.EndpointTLSTerminationModule =
141
- exports.EndpointCompressionModule =
142
- exports.EndpointCircuitBreakerModule =
143
- exports.EndpointLoggingModule =
144
- exports.IPWhitelist =
145
132
  exports.IPRestrictions =
146
133
  exports.IPPolicyRules =
147
134
  exports.IPPolicies =
148
135
  exports.EventSources =
149
136
  exports.EventSubscriptions =
150
137
  exports.EventDestinations =
151
- exports.EventStreams =
152
- exports.EndpointConfigurations =
138
+ exports.Endpoints =
139
+ exports.TLSEdgeTLSTerminationModule =
140
+ exports.TLSEdgeMutualTLSModule =
141
+ exports.TLSEdgeIPRestrictionModule =
142
+ exports.TLSEdgeBackendModule =
143
+ exports.EdgesTLS =
144
+ exports.TCPEdgeIPRestrictionModule =
145
+ exports.TCPEdgeBackendModule =
146
+ exports.EdgesTCP =
147
+ exports.EdgeRouteWebsocketTCPConverterModule =
148
+ exports.EdgeRouteOIDCModule =
149
+ exports.EdgeRouteSAMLModule =
150
+ exports.EdgeRouteOAuthModule =
151
+ exports.EdgeRouteWebhookVerificationModule =
152
+ exports.EdgeRouteCircuitBreakerModule =
153
+ exports.EdgeRouteCompressionModule =
154
+ exports.EdgeRouteResponseHeadersModule =
155
+ exports.EdgeRouteRequestHeadersModule =
156
+ exports.EdgeRouteIPRestrictionModule =
157
+ exports.EdgeRouteBackendModule =
158
+ exports.HTTPSEdgeTLSTerminationModule =
159
+ exports.HTTPSEdgeMutualTLSModule =
160
+ exports.EdgesHTTPS =
161
+ exports.EdgesHTTPSRoutes =
153
162
  exports.Credentials =
154
163
  exports.CertificateAuthorities =
164
+ exports.WeightedBackends =
165
+ exports.TunnelGroupBackends =
166
+ exports.HTTPResponseBackends =
167
+ exports.FailoverBackends =
155
168
  exports.APIKeys =
169
+ exports.AgentIngresses =
156
170
  exports.AbuseReports =
157
171
  void 0;
158
172
  const util = require('./util');
@@ -187,50 +201,43 @@ class AbuseReports {
187
201
  }
188
202
  }
189
203
  exports.AbuseReports = AbuseReports;
190
- /**
191
- * API Keys are used to authenticate to the [ngrok
192
- API](https://ngrok.com/docs/api#authentication). You may use the API itself
193
- to provision and manage API Keys but you'll need to provision your first API
194
- key from the [API Keys page](https://dashboard.ngrok.com/api/keys) on your
195
- ngrok.com dashboard.
196
- */
197
- class APIKeys {
198
- /** Do not construct this object directly, use the <code>apiKeys</code> property of an <code>Ngrok</code> client object instead. */
204
+ class AgentIngresses {
205
+ /** Do not construct this object directly, use the <code>agentIngresses</code> property of an <code>Ngrok</code> client object instead. */
199
206
  constructor(httpClient) {
200
207
  this.httpClient = httpClient;
201
208
  }
202
209
  /**
203
- * Create a new API key. The generated API key can be used to authenticate to the ngrok API.
210
+ * Create a new Agent Ingress. The ngrok agent can be configured to connect to ngrok via the new set of addresses on the returned Agent Ingress.
204
211
  */
205
212
  create(arg) {
206
213
  return this.httpClient
207
- .url(`/api_keys`)
214
+ .url(`/agent_ingresses`)
208
215
  .post(util.serializeArgument(arg))
209
216
  .json(payload => util.deserializeResult(payload))
210
217
  .then(f => f, util.onRejected);
211
218
  }
212
219
  /**
213
- * Delete an API key by ID
220
+ * Delete an Agent Ingress by ID
214
221
  */
215
222
  delete(arg) {
216
223
  return this.httpClient
217
- .url(`/api_keys/${arg.id}`)
224
+ .url(`/agent_ingresses/${arg.id}`)
218
225
  .delete()
219
226
  .json(payload => util.deserializeResult(payload))
220
227
  .then(f => f, util.onRejected);
221
228
  }
222
229
  /**
223
- * Get the details of an API key by ID.
230
+ * Get the details of an Agent Ingress by ID.
224
231
  */
225
232
  get(arg) {
226
233
  return this.httpClient
227
- .url(`/api_keys/${arg.id}`)
234
+ .url(`/agent_ingresses/${arg.id}`)
228
235
  .get()
229
236
  .json(payload => util.deserializeResult(payload))
230
237
  .then(f => f, util.onRejected);
231
238
  }
232
239
  /**
233
- * List all API keys owned by this account
240
+ * List all Agent Ingresses owned by this account
234
241
  */
235
242
  list() {
236
243
  var e_1, _a;
@@ -259,7 +266,7 @@ class APIKeys {
259
266
  }
260
267
  _pagedList(arg) {
261
268
  return this.httpClient
262
- .url(`/api_keys`)
269
+ .url(`/agent_ingresses`)
263
270
  .query(arg)
264
271
  .get()
265
272
  .json(payload => util.deserializeResult(payload))
@@ -273,7 +280,7 @@ class APIKeys {
273
280
  while (nextPage) {
274
281
  const pagedList = yield __await(this._pagedList(page));
275
282
  nextPage = pagedList.nextPageUri;
276
- const items = pagedList.keys;
283
+ const items = pagedList.ingresses;
277
284
  if (nextPage) {
278
285
  page = {
279
286
  beforeId: items[items.length - 1].id,
@@ -287,61 +294,61 @@ class APIKeys {
287
294
  });
288
295
  }
289
296
  /**
290
- * Update attributes of an API key by ID.
297
+ * Update attributes of an Agent Ingress by ID.
291
298
  */
292
299
  update(arg) {
293
300
  return this.httpClient
294
- .url(`/api_keys/${arg.id}`)
301
+ .url(`/agent_ingresses/${arg.id}`)
295
302
  .patch(util.serializeArgument(arg))
296
303
  .json(payload => util.deserializeResult(payload))
297
304
  .then(f => f, util.onRejected);
298
305
  }
299
306
  }
300
- exports.APIKeys = APIKeys;
307
+ exports.AgentIngresses = AgentIngresses;
301
308
  /**
302
- * Certificate Authorities are x509 certificates that are used to sign other
303
- x509 certificates. Attach a Certificate Authority to the Mutual TLS module
304
- to verify that the TLS certificate presented by a client has been signed by
305
- this CA. Certificate Authorities are used only for mTLS validation only and
306
- thus a private key is not included in the resource.
309
+ * API Keys are used to authenticate to the [ngrok
310
+ API](https://ngrok.com/docs/api#authentication). You may use the API itself
311
+ to provision and manage API Keys but you'll need to provision your first API
312
+ key from the [API Keys page](https://dashboard.ngrok.com/api/keys) on your
313
+ ngrok.com dashboard.
307
314
  */
308
- class CertificateAuthorities {
309
- /** Do not construct this object directly, use the <code>certificateAuthorities</code> property of an <code>Ngrok</code> client object instead. */
315
+ class APIKeys {
316
+ /** Do not construct this object directly, use the <code>apiKeys</code> property of an <code>Ngrok</code> client object instead. */
310
317
  constructor(httpClient) {
311
318
  this.httpClient = httpClient;
312
319
  }
313
320
  /**
314
- * Upload a new Certificate Authority
321
+ * Create a new API key. The generated API key can be used to authenticate to the ngrok API.
315
322
  */
316
323
  create(arg) {
317
324
  return this.httpClient
318
- .url(`/certificate_authorities`)
325
+ .url(`/api_keys`)
319
326
  .post(util.serializeArgument(arg))
320
327
  .json(payload => util.deserializeResult(payload))
321
328
  .then(f => f, util.onRejected);
322
329
  }
323
330
  /**
324
- * Delete a Certificate Authority
331
+ * Delete an API key by ID
325
332
  */
326
333
  delete(arg) {
327
334
  return this.httpClient
328
- .url(`/certificate_authorities/${arg.id}`)
335
+ .url(`/api_keys/${arg.id}`)
329
336
  .delete()
330
337
  .json(payload => util.deserializeResult(payload))
331
338
  .then(f => f, util.onRejected);
332
339
  }
333
340
  /**
334
- * Get detailed information about a certficate authority
341
+ * Get the details of an API key by ID.
335
342
  */
336
343
  get(arg) {
337
344
  return this.httpClient
338
- .url(`/certificate_authorities/${arg.id}`)
345
+ .url(`/api_keys/${arg.id}`)
339
346
  .get()
340
347
  .json(payload => util.deserializeResult(payload))
341
348
  .then(f => f, util.onRejected);
342
349
  }
343
350
  /**
344
- * List all Certificate Authority on this account
351
+ * List all API keys owned by this account
345
352
  */
346
353
  list() {
347
354
  var e_2, _a;
@@ -370,7 +377,7 @@ class CertificateAuthorities {
370
377
  }
371
378
  _pagedList(arg) {
372
379
  return this.httpClient
373
- .url(`/certificate_authorities`)
380
+ .url(`/api_keys`)
374
381
  .query(arg)
375
382
  .get()
376
383
  .json(payload => util.deserializeResult(payload))
@@ -384,7 +391,7 @@ class CertificateAuthorities {
384
391
  while (nextPage) {
385
392
  const pagedList = yield __await(this._pagedList(page));
386
393
  nextPage = pagedList.nextPageUri;
387
- const items = pagedList.certificateAuthorities;
394
+ const items = pagedList.keys;
388
395
  if (nextPage) {
389
396
  page = {
390
397
  beforeId: items[items.length - 1].id,
@@ -398,60 +405,60 @@ class CertificateAuthorities {
398
405
  });
399
406
  }
400
407
  /**
401
- * Update attributes of a Certificate Authority by ID
408
+ * Update attributes of an API key by ID.
402
409
  */
403
410
  update(arg) {
404
411
  return this.httpClient
405
- .url(`/certificate_authorities/${arg.id}`)
412
+ .url(`/api_keys/${arg.id}`)
406
413
  .patch(util.serializeArgument(arg))
407
414
  .json(payload => util.deserializeResult(payload))
408
415
  .then(f => f, util.onRejected);
409
416
  }
410
417
  }
411
- exports.CertificateAuthorities = CertificateAuthorities;
418
+ exports.APIKeys = APIKeys;
412
419
  /**
413
- * Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok
414
- agent to connect the ngrok service as your account. They are installed with
415
- the `ngrok authtoken` command or by specifying it in the `ngrok.yml`
416
- configuration file with the `authtoken` property.
420
+ * A Failover backend defines failover behavior within a list of referenced
421
+ backends. Traffic is sent to the first backend in the list. If that backend
422
+ is offline or no connection can be established, ngrok attempts to connect to
423
+ the next backend in the list until one is successful.
417
424
  */
418
- class Credentials {
419
- /** Do not construct this object directly, use the <code>credentials</code> property of an <code>Ngrok</code> client object instead. */
425
+ class FailoverBackends {
426
+ /** Do not construct this object directly, use the <code>failoverBackends</code> property of an <code>Ngrok</code> client object instead. */
420
427
  constructor(httpClient) {
421
428
  this.httpClient = httpClient;
422
429
  }
423
430
  /**
424
- * Create a new tunnel authtoken credential. This authtoken credential can be used to start a new tunnel session. The response to this API call is the only time the generated token is available. If you need it for future use, you must save it securely yourself.
431
+ * Create a new Failover backend
425
432
  */
426
433
  create(arg) {
427
434
  return this.httpClient
428
- .url(`/credentials`)
435
+ .url(`/backends/failover`)
429
436
  .post(util.serializeArgument(arg))
430
437
  .json(payload => util.deserializeResult(payload))
431
438
  .then(f => f, util.onRejected);
432
439
  }
433
440
  /**
434
- * Delete a tunnel authtoken credential by ID
441
+ * Delete a Failover backend by ID. TODO what if used?
435
442
  */
436
443
  delete(arg) {
437
444
  return this.httpClient
438
- .url(`/credentials/${arg.id}`)
445
+ .url(`/backends/failover/${arg.id}`)
439
446
  .delete()
440
447
  .json(payload => util.deserializeResult(payload))
441
448
  .then(f => f, util.onRejected);
442
449
  }
443
450
  /**
444
- * Get detailed information about a tunnel authtoken credential
451
+ * Get detailed information about a Failover backend by ID
445
452
  */
446
453
  get(arg) {
447
454
  return this.httpClient
448
- .url(`/credentials/${arg.id}`)
455
+ .url(`/backends/failover/${arg.id}`)
449
456
  .get()
450
457
  .json(payload => util.deserializeResult(payload))
451
458
  .then(f => f, util.onRejected);
452
459
  }
453
460
  /**
454
- * List all tunnel authtoken credentials on this account
461
+ * List all Failover backends on this account
455
462
  */
456
463
  list() {
457
464
  var e_3, _a;
@@ -480,7 +487,7 @@ class Credentials {
480
487
  }
481
488
  _pagedList(arg) {
482
489
  return this.httpClient
483
- .url(`/credentials`)
490
+ .url(`/backends/failover`)
484
491
  .query(arg)
485
492
  .get()
486
493
  .json(payload => util.deserializeResult(payload))
@@ -494,7 +501,7 @@ class Credentials {
494
501
  while (nextPage) {
495
502
  const pagedList = yield __await(this._pagedList(page));
496
503
  nextPage = pagedList.nextPageUri;
497
- const items = pagedList.credentials;
504
+ const items = pagedList.backends;
498
505
  if (nextPage) {
499
506
  page = {
500
507
  beforeId: items[items.length - 1].id,
@@ -508,60 +515,43 @@ class Credentials {
508
515
  });
509
516
  }
510
517
  /**
511
- * Update attributes of an tunnel authtoken credential by ID
518
+ * Update Failover backend by ID
512
519
  */
513
520
  update(arg) {
514
521
  return this.httpClient
515
- .url(`/credentials/${arg.id}`)
522
+ .url(`/backends/failover/${arg.id}`)
516
523
  .patch(util.serializeArgument(arg))
517
524
  .json(payload => util.deserializeResult(payload))
518
525
  .then(f => f, util.onRejected);
519
526
  }
520
527
  }
521
- exports.Credentials = Credentials;
522
- /**
523
- * Endpoint Configurations are a reusable group of modules that encapsulate how
524
- traffic to a domain or address is handled. Endpoint configurations are only
525
- applied to Domains and TCP Addresses they have been attached to.
526
- */
527
- class EndpointConfigurations {
528
- /** Do not construct this object directly, use the <code>endpointConfigurations</code> property of an <code>Ngrok</code> client object instead. */
528
+ exports.FailoverBackends = FailoverBackends;
529
+ class HTTPResponseBackends {
530
+ /** Do not construct this object directly, use the <code>httpResponseBackends</code> property of an <code>Ngrok</code> client object instead. */
529
531
  constructor(httpClient) {
530
532
  this.httpClient = httpClient;
531
533
  }
532
- /**
533
- * Create a new endpoint configuration
534
- */
535
534
  create(arg) {
536
535
  return this.httpClient
537
- .url(`/endpoint_configurations`)
536
+ .url(`/backends/http_response`)
538
537
  .post(util.serializeArgument(arg))
539
538
  .json(payload => util.deserializeResult(payload))
540
539
  .then(f => f, util.onRejected);
541
540
  }
542
- /**
543
- * Delete an endpoint configuration. This operation will fail if the endpoint configuration is still referenced by any reserved domain or reserved address.
544
- */
545
541
  delete(arg) {
546
542
  return this.httpClient
547
- .url(`/endpoint_configurations/${arg.id}`)
543
+ .url(`/backends/http_response/${arg.id}`)
548
544
  .delete()
549
545
  .json(payload => util.deserializeResult(payload))
550
546
  .then(f => f, util.onRejected);
551
547
  }
552
- /**
553
- * Returns detailed information about an endpoint configuration
554
- */
555
548
  get(arg) {
556
549
  return this.httpClient
557
- .url(`/endpoint_configurations/${arg.id}`)
550
+ .url(`/backends/http_response/${arg.id}`)
558
551
  .get()
559
552
  .json(payload => util.deserializeResult(payload))
560
553
  .then(f => f, util.onRejected);
561
554
  }
562
- /**
563
- * Returns a list of all endpoint configurations on this account
564
- */
565
555
  list() {
566
556
  var e_4, _a;
567
557
  return __awaiter(this, void 0, void 0, function* () {
@@ -589,7 +579,7 @@ class EndpointConfigurations {
589
579
  }
590
580
  _pagedList(arg) {
591
581
  return this.httpClient
592
- .url(`/endpoint_configurations`)
582
+ .url(`/backends/http_response`)
593
583
  .query(arg)
594
584
  .get()
595
585
  .json(payload => util.deserializeResult(payload))
@@ -603,7 +593,7 @@ class EndpointConfigurations {
603
593
  while (nextPage) {
604
594
  const pagedList = yield __await(this._pagedList(page));
605
595
  nextPage = pagedList.nextPageUri;
606
- const items = pagedList.endpointConfigurations;
596
+ const items = pagedList.backends;
607
597
  if (nextPage) {
608
598
  page = {
609
599
  beforeId: items[items.length - 1].id,
@@ -616,55 +606,56 @@ class EndpointConfigurations {
616
606
  }
617
607
  });
618
608
  }
619
- /**
620
- * Updates an endpoint configuration. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.
621
- */
622
609
  update(arg) {
623
610
  return this.httpClient
624
- .url(`/endpoint_configurations/${arg.id}`)
611
+ .url(`/backends/http_response/${arg.id}`)
625
612
  .patch(util.serializeArgument(arg))
626
613
  .json(payload => util.deserializeResult(payload))
627
614
  .then(f => f, util.onRejected);
628
615
  }
629
616
  }
630
- exports.EndpointConfigurations = EndpointConfigurations;
631
- class EventStreams {
632
- /** Do not construct this object directly, use the <code>eventStreams</code> property of an <code>Ngrok</code> client object instead. */
617
+ exports.HTTPResponseBackends = HTTPResponseBackends;
618
+ /**
619
+ * A Tunnel Group Backend balances traffic among all online tunnels that match
620
+ a label selector.
621
+ */
622
+ class TunnelGroupBackends {
623
+ /** Do not construct this object directly, use the <code>tunnelGroupBackends</code> property of an <code>Ngrok</code> client object instead. */
633
624
  constructor(httpClient) {
634
625
  this.httpClient = httpClient;
635
626
  }
636
627
  /**
637
- * Create a new Event Stream. It will not apply to anything until you associate it with one or more Endpoint Configs.
628
+ * Create a new TunnelGroup backend
638
629
  */
639
630
  create(arg) {
640
631
  return this.httpClient
641
- .url(`/event_streams`)
632
+ .url(`/backends/tunnel_group`)
642
633
  .post(util.serializeArgument(arg))
643
634
  .json(payload => util.deserializeResult(payload))
644
635
  .then(f => f, util.onRejected);
645
636
  }
646
637
  /**
647
- * Delete an Event Stream. Associated Event Destinations will be preserved.
638
+ * Delete a TunnelGroup backend by ID. TODO what if used?
648
639
  */
649
640
  delete(arg) {
650
641
  return this.httpClient
651
- .url(`/event_streams/${arg.id}`)
642
+ .url(`/backends/tunnel_group/${arg.id}`)
652
643
  .delete()
653
644
  .json(payload => util.deserializeResult(payload))
654
645
  .then(f => f, util.onRejected);
655
646
  }
656
647
  /**
657
- * Get detailed information about an Event Stream by ID.
648
+ * Get detailed information about a TunnelGroup backend by ID
658
649
  */
659
650
  get(arg) {
660
651
  return this.httpClient
661
- .url(`/event_streams/${arg.id}`)
652
+ .url(`/backends/tunnel_group/${arg.id}`)
662
653
  .get()
663
654
  .json(payload => util.deserializeResult(payload))
664
655
  .then(f => f, util.onRejected);
665
656
  }
666
657
  /**
667
- * List all Event Streams available on this account.
658
+ * List all TunnelGroup backends on this account
668
659
  */
669
660
  list() {
670
661
  var e_5, _a;
@@ -693,7 +684,7 @@ class EventStreams {
693
684
  }
694
685
  _pagedList(arg) {
695
686
  return this.httpClient
696
- .url(`/event_streams`)
687
+ .url(`/backends/tunnel_group`)
697
688
  .query(arg)
698
689
  .get()
699
690
  .json(payload => util.deserializeResult(payload))
@@ -707,7 +698,7 @@ class EventStreams {
707
698
  while (nextPage) {
708
699
  const pagedList = yield __await(this._pagedList(page));
709
700
  nextPage = pagedList.nextPageUri;
710
- const items = pagedList.eventStreams;
701
+ const items = pagedList.backends;
711
702
  if (nextPage) {
712
703
  page = {
713
704
  beforeId: items[items.length - 1].id,
@@ -721,54 +712,60 @@ class EventStreams {
721
712
  });
722
713
  }
723
714
  /**
724
- * Update attributes of an Event Stream by ID.
715
+ * Update TunnelGroup backend by ID
725
716
  */
726
717
  update(arg) {
727
718
  return this.httpClient
728
- .url(`/event_streams/${arg.id}`)
719
+ .url(`/backends/tunnel_group/${arg.id}`)
729
720
  .patch(util.serializeArgument(arg))
730
721
  .json(payload => util.deserializeResult(payload))
731
722
  .then(f => f, util.onRejected);
732
723
  }
733
724
  }
734
- exports.EventStreams = EventStreams;
735
- class EventDestinations {
736
- /** Do not construct this object directly, use the <code>eventDestinations</code> property of an <code>Ngrok</code> client object instead. */
725
+ exports.TunnelGroupBackends = TunnelGroupBackends;
726
+ /**
727
+ * A Weighted Backend balances traffic among the referenced backends. Traffic
728
+ is assigned proportionally to each based on its weight. The percentage of
729
+ traffic is calculated by dividing a backend's weight by the sum of all
730
+ weights.
731
+ */
732
+ class WeightedBackends {
733
+ /** Do not construct this object directly, use the <code>weightedBackends</code> property of an <code>Ngrok</code> client object instead. */
737
734
  constructor(httpClient) {
738
735
  this.httpClient = httpClient;
739
736
  }
740
737
  /**
741
- * Create a new Event Destination. It will not apply to anything until it is associated with an Event Stream, and that Event Stream is associated with an Endpoint Config.
738
+ * Create a new Weighted backend
742
739
  */
743
740
  create(arg) {
744
741
  return this.httpClient
745
- .url(`/event_destinations`)
742
+ .url(`/backends/weighted`)
746
743
  .post(util.serializeArgument(arg))
747
744
  .json(payload => util.deserializeResult(payload))
748
745
  .then(f => f, util.onRejected);
749
746
  }
750
747
  /**
751
- * Delete an Event Destination. If the Event Destination is still referenced by an Event Stream, this will throw an error until that Event Stream has removed that reference.
748
+ * Delete a Weighted backend by ID. TODO what if used?
752
749
  */
753
750
  delete(arg) {
754
751
  return this.httpClient
755
- .url(`/event_destinations/${arg.id}`)
752
+ .url(`/backends/weighted/${arg.id}`)
756
753
  .delete()
757
754
  .json(payload => util.deserializeResult(payload))
758
755
  .then(f => f, util.onRejected);
759
756
  }
760
757
  /**
761
- * Get detailed information about an Event Destination by ID.
758
+ * Get detailed information about a Weighted backend by ID
762
759
  */
763
760
  get(arg) {
764
761
  return this.httpClient
765
- .url(`/event_destinations/${arg.id}`)
762
+ .url(`/backends/weighted/${arg.id}`)
766
763
  .get()
767
764
  .json(payload => util.deserializeResult(payload))
768
765
  .then(f => f, util.onRejected);
769
766
  }
770
767
  /**
771
- * List all Event Destinations on this account.
768
+ * List all Weighted backends on this account
772
769
  */
773
770
  list() {
774
771
  var e_6, _a;
@@ -797,7 +794,7 @@ class EventDestinations {
797
794
  }
798
795
  _pagedList(arg) {
799
796
  return this.httpClient
800
- .url(`/event_destinations`)
797
+ .url(`/backends/weighted`)
801
798
  .query(arg)
802
799
  .get()
803
800
  .json(payload => util.deserializeResult(payload))
@@ -811,7 +808,7 @@ class EventDestinations {
811
808
  while (nextPage) {
812
809
  const pagedList = yield __await(this._pagedList(page));
813
810
  nextPage = pagedList.nextPageUri;
814
- const items = pagedList.eventDestinations;
811
+ const items = pagedList.backends;
815
812
  if (nextPage) {
816
813
  page = {
817
814
  beforeId: items[items.length - 1].id,
@@ -825,54 +822,61 @@ class EventDestinations {
825
822
  });
826
823
  }
827
824
  /**
828
- * Update attributes of an Event Destination.
825
+ * Update Weighted backend by ID
829
826
  */
830
827
  update(arg) {
831
828
  return this.httpClient
832
- .url(`/event_destinations/${arg.id}`)
829
+ .url(`/backends/weighted/${arg.id}`)
833
830
  .patch(util.serializeArgument(arg))
834
831
  .json(payload => util.deserializeResult(payload))
835
832
  .then(f => f, util.onRejected);
836
833
  }
837
834
  }
838
- exports.EventDestinations = EventDestinations;
839
- class EventSubscriptions {
840
- /** Do not construct this object directly, use the <code>eventSubscriptions</code> property of an <code>Ngrok</code> client object instead. */
835
+ exports.WeightedBackends = WeightedBackends;
836
+ /**
837
+ * Certificate Authorities are x509 certificates that are used to sign other
838
+ x509 certificates. Attach a Certificate Authority to the Mutual TLS module
839
+ to verify that the TLS certificate presented by a client has been signed by
840
+ this CA. Certificate Authorities are used only for mTLS validation only and
841
+ thus a private key is not included in the resource.
842
+ */
843
+ class CertificateAuthorities {
844
+ /** Do not construct this object directly, use the <code>certificateAuthorities</code> property of an <code>Ngrok</code> client object instead. */
841
845
  constructor(httpClient) {
842
846
  this.httpClient = httpClient;
843
847
  }
844
848
  /**
845
- * Create an Event Subscription.
849
+ * Upload a new Certificate Authority
846
850
  */
847
851
  create(arg) {
848
852
  return this.httpClient
849
- .url(`/event_subscriptions`)
853
+ .url(`/certificate_authorities`)
850
854
  .post(util.serializeArgument(arg))
851
855
  .json(payload => util.deserializeResult(payload))
852
856
  .then(f => f, util.onRejected);
853
857
  }
854
858
  /**
855
- * Delete an Event Subscription.
859
+ * Delete a Certificate Authority
856
860
  */
857
861
  delete(arg) {
858
862
  return this.httpClient
859
- .url(`/event_subscriptions/${arg.id}`)
863
+ .url(`/certificate_authorities/${arg.id}`)
860
864
  .delete()
861
865
  .json(payload => util.deserializeResult(payload))
862
866
  .then(f => f, util.onRejected);
863
867
  }
864
868
  /**
865
- * Get an Event Subscription by ID.
869
+ * Get detailed information about a certficate authority
866
870
  */
867
871
  get(arg) {
868
872
  return this.httpClient
869
- .url(`/event_subscriptions/${arg.id}`)
873
+ .url(`/certificate_authorities/${arg.id}`)
870
874
  .get()
871
875
  .json(payload => util.deserializeResult(payload))
872
876
  .then(f => f, util.onRejected);
873
877
  }
874
878
  /**
875
- * List this Account's Event Subscriptions.
879
+ * List all Certificate Authority on this account
876
880
  */
877
881
  list() {
878
882
  var e_7, _a;
@@ -901,7 +905,7 @@ class EventSubscriptions {
901
905
  }
902
906
  _pagedList(arg) {
903
907
  return this.httpClient
904
- .url(`/event_subscriptions`)
908
+ .url(`/certificate_authorities`)
905
909
  .query(arg)
906
910
  .get()
907
911
  .json(payload => util.deserializeResult(payload))
@@ -915,7 +919,7 @@ class EventSubscriptions {
915
919
  while (nextPage) {
916
920
  const pagedList = yield __await(this._pagedList(page));
917
921
  nextPage = pagedList.nextPageUri;
918
- const items = pagedList.eventSubscriptions;
922
+ const items = pagedList.certificateAuthorities;
919
923
  if (nextPage) {
920
924
  page = {
921
925
  beforeId: items[items.length - 1].id,
@@ -929,117 +933,60 @@ class EventSubscriptions {
929
933
  });
930
934
  }
931
935
  /**
932
- * Update an Event Subscription.
933
- */
934
- update(arg) {
935
- return this.httpClient
936
- .url(`/event_subscriptions/${arg.id}`)
937
- .patch(util.serializeArgument(arg))
938
- .json(payload => util.deserializeResult(payload))
939
- .then(f => f, util.onRejected);
940
- }
941
- }
942
- exports.EventSubscriptions = EventSubscriptions;
943
- class EventSources {
944
- /** Do not construct this object directly, use the <code>eventSources</code> property of an <code>Ngrok</code> client object instead. */
945
- constructor(httpClient) {
946
- this.httpClient = httpClient;
947
- }
948
- /**
949
- * Add an additional type for which this event subscription will trigger
950
- */
951
- create(arg) {
952
- return this.httpClient
953
- .url(`/event_subscriptions/${arg.subscriptionId}/sources`)
954
- .post(util.serializeArgument(arg))
955
- .json(payload => util.deserializeResult(payload))
956
- .then(f => f, util.onRejected);
957
- }
958
- /**
959
- * Remove a type for which this event subscription will trigger
960
- */
961
- delete(arg) {
962
- return this.httpClient
963
- .url(`/event_subscriptions/${arg.subscriptionId}/sources/${arg.type}`)
964
- .delete()
965
- .json(payload => util.deserializeResult(payload))
966
- .then(f => f, util.onRejected);
967
- }
968
- /**
969
- * Get the details for a given type that triggers for the given event subscription
970
- */
971
- get(arg) {
972
- return this.httpClient
973
- .url(`/event_subscriptions/${arg.subscriptionId}/sources/${arg.type}`)
974
- .get()
975
- .json(payload => util.deserializeResult(payload))
976
- .then(f => f, util.onRejected);
977
- }
978
- /**
979
- * List the types for which this event subscription will trigger
980
- */
981
- list(arg) {
982
- return this.httpClient
983
- .url(`/event_subscriptions/${arg.subscriptionId}/sources`)
984
- .get()
985
- .json(payload => util.deserializeResult(payload))
986
- .then(f => f, util.onRejected);
987
- }
988
- /**
989
- * Update the type for which this event subscription will trigger
936
+ * Update attributes of a Certificate Authority by ID
990
937
  */
991
938
  update(arg) {
992
939
  return this.httpClient
993
- .url(`/event_subscriptions/${arg.subscriptionId}/sources/${arg.type}`)
940
+ .url(`/certificate_authorities/${arg.id}`)
994
941
  .patch(util.serializeArgument(arg))
995
942
  .json(payload => util.deserializeResult(payload))
996
943
  .then(f => f, util.onRejected);
997
944
  }
998
945
  }
999
- exports.EventSources = EventSources;
946
+ exports.CertificateAuthorities = CertificateAuthorities;
1000
947
  /**
1001
- * IP Policies are reusable groups of CIDR ranges with an `allow` or `deny`
1002
- action. They can be attached to endpoints via the Endpoint Configuration IP
1003
- Policy module. They can also be used with IP Restrictions to control source
1004
- IP ranges that can start tunnel sessions and connect to the API and dashboard.
948
+ * Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok
949
+ agent to connect the ngrok service as your account. They are installed with
950
+ the `ngrok authtoken` command or by specifying it in the `ngrok.yml`
951
+ configuration file with the `authtoken` property.
1005
952
  */
1006
- class IPPolicies {
1007
- /** Do not construct this object directly, use the <code>ipPolicies</code> property of an <code>Ngrok</code> client object instead. */
953
+ class Credentials {
954
+ /** Do not construct this object directly, use the <code>credentials</code> property of an <code>Ngrok</code> client object instead. */
1008
955
  constructor(httpClient) {
1009
956
  this.httpClient = httpClient;
1010
957
  }
1011
958
  /**
1012
- * Create a new IP policy. It will not apply to any traffic until you associate to a traffic source via an endpoint configuration or IP restriction.
959
+ * Create a new tunnel authtoken credential. This authtoken credential can be used to start a new tunnel session. The response to this API call is the only time the generated token is available. If you need it for future use, you must save it securely yourself.
1013
960
  */
1014
961
  create(arg) {
1015
962
  return this.httpClient
1016
- .url(`/ip_policies`)
963
+ .url(`/credentials`)
1017
964
  .post(util.serializeArgument(arg))
1018
965
  .json(payload => util.deserializeResult(payload))
1019
966
  .then(f => f, util.onRejected);
1020
967
  }
1021
968
  /**
1022
- * Delete an IP policy. If the IP policy is referenced by another object for the purposes of traffic restriction it will be treated as if the IP policy remains but has zero rules.
969
+ * Delete a tunnel authtoken credential by ID
1023
970
  */
1024
971
  delete(arg) {
1025
972
  return this.httpClient
1026
- .url(`/ip_policies/${arg.id}`)
973
+ .url(`/credentials/${arg.id}`)
1027
974
  .delete()
1028
975
  .json(payload => util.deserializeResult(payload))
1029
976
  .then(f => f, util.onRejected);
1030
977
  }
1031
978
  /**
1032
- * Get detailed information about an IP policy by ID.
979
+ * Get detailed information about a tunnel authtoken credential
1033
980
  */
1034
981
  get(arg) {
1035
982
  return this.httpClient
1036
- .url(`/ip_policies/${arg.id}`)
983
+ .url(`/credentials/${arg.id}`)
1037
984
  .get()
1038
985
  .json(payload => util.deserializeResult(payload))
1039
986
  .then(f => f, util.onRejected);
1040
987
  }
1041
988
  /**
1042
- * List all IP policies on this account
989
+ * List all tunnel authtoken credentials on this account
1043
990
  */
1044
991
  list() {
1045
992
  var e_8, _a;
@@ -1068,7 +1015,7 @@ class IPPolicies {
1068
1015
  }
1069
1016
  _pagedList(arg) {
1070
1017
  return this.httpClient
1071
- .url(`/ip_policies`)
1018
+ .url(`/credentials`)
1072
1019
  .query(arg)
1073
1020
  .get()
1074
1021
  .json(payload => util.deserializeResult(payload))
@@ -1082,7 +1029,7 @@ class IPPolicies {
1082
1029
  while (nextPage) {
1083
1030
  const pagedList = yield __await(this._pagedList(page));
1084
1031
  nextPage = pagedList.nextPageUri;
1085
- const items = pagedList.ipPolicies;
1032
+ const items = pagedList.credentials;
1086
1033
  if (nextPage) {
1087
1034
  page = {
1088
1035
  beforeId: items[items.length - 1].id,
@@ -1096,60 +1043,93 @@ class IPPolicies {
1096
1043
  });
1097
1044
  }
1098
1045
  /**
1099
- * Update attributes of an IP policy by ID
1046
+ * Update attributes of an tunnel authtoken credential by ID
1100
1047
  */
1101
1048
  update(arg) {
1102
1049
  return this.httpClient
1103
- .url(`/ip_policies/${arg.id}`)
1050
+ .url(`/credentials/${arg.id}`)
1104
1051
  .patch(util.serializeArgument(arg))
1105
1052
  .json(payload => util.deserializeResult(payload))
1106
1053
  .then(f => f, util.onRejected);
1107
1054
  }
1108
1055
  }
1109
- exports.IPPolicies = IPPolicies;
1110
- /**
1111
- * IP Policy Rules are the IPv4 or IPv6 CIDRs entries that
1112
- make up an IP Policy.
1113
- */
1114
- class IPPolicyRules {
1115
- /** Do not construct this object directly, use the <code>ipPolicyRules</code> property of an <code>Ngrok</code> client object instead. */
1056
+ exports.Credentials = Credentials;
1057
+ class EdgesHTTPSRoutes {
1058
+ /** Do not construct this object directly, use the <code>edgesHttpsRoutes</code> property of an <code>Ngrok</code> client object instead. */
1116
1059
  constructor(httpClient) {
1117
1060
  this.httpClient = httpClient;
1118
1061
  }
1119
1062
  /**
1120
- * Create a new IP policy rule attached to an IP Policy.
1063
+ * Create an HTTPS Edge Route
1121
1064
  */
1122
1065
  create(arg) {
1123
1066
  return this.httpClient
1124
- .url(`/ip_policy_rules`)
1067
+ .url(`/edges/https/${arg.edgeId}/routes`)
1125
1068
  .post(util.serializeArgument(arg))
1126
1069
  .json(payload => util.deserializeResult(payload))
1127
1070
  .then(f => f, util.onRejected);
1128
1071
  }
1129
1072
  /**
1130
- * Delete an IP policy rule.
1073
+ * Get an HTTPS Edge Route by ID
1131
1074
  */
1132
- delete(arg) {
1075
+ get(arg) {
1133
1076
  return this.httpClient
1134
- .url(`/ip_policy_rules/${arg.id}`)
1135
- .delete()
1077
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}`)
1078
+ .get()
1136
1079
  .json(payload => util.deserializeResult(payload))
1137
1080
  .then(f => f, util.onRejected);
1138
1081
  }
1139
1082
  /**
1140
- * Get detailed information about an IP policy rule by ID.
1083
+ * Updates an HTTPS Edge Route by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.
1141
1084
  */
1142
- get(arg) {
1085
+ update(arg) {
1143
1086
  return this.httpClient
1144
- .url(`/ip_policy_rules/${arg.id}`)
1145
- .get()
1087
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}`)
1088
+ .patch(util.serializeArgument(arg))
1146
1089
  .json(payload => util.deserializeResult(payload))
1147
1090
  .then(f => f, util.onRejected);
1148
1091
  }
1149
1092
  /**
1150
- * List all IP policy rules on this account
1093
+ * Delete an HTTPS Edge Route by ID
1151
1094
  */
1152
- list() {
1095
+ delete(arg) {
1096
+ return this.httpClient
1097
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}`)
1098
+ .delete()
1099
+ .json(payload => util.deserializeResult(payload))
1100
+ .then(f => f, util.onRejected);
1101
+ }
1102
+ }
1103
+ exports.EdgesHTTPSRoutes = EdgesHTTPSRoutes;
1104
+ class EdgesHTTPS {
1105
+ /** Do not construct this object directly, use the <code>edgesHttps</code> property of an <code>Ngrok</code> client object instead. */
1106
+ constructor(httpClient) {
1107
+ this.httpClient = httpClient;
1108
+ }
1109
+ /**
1110
+ * Create an HTTPS Edge
1111
+ */
1112
+ create(arg) {
1113
+ return this.httpClient
1114
+ .url(`/edges/https`)
1115
+ .post(util.serializeArgument(arg))
1116
+ .json(payload => util.deserializeResult(payload))
1117
+ .then(f => f, util.onRejected);
1118
+ }
1119
+ /**
1120
+ * Get an HTTPS Edge by ID
1121
+ */
1122
+ get(arg) {
1123
+ return this.httpClient
1124
+ .url(`/edges/https/${arg.id}`)
1125
+ .get()
1126
+ .json(payload => util.deserializeResult(payload))
1127
+ .then(f => f, util.onRejected);
1128
+ }
1129
+ /**
1130
+ * Returns a list of all HTTPS Edges on this account
1131
+ */
1132
+ list() {
1153
1133
  var e_9, _a;
1154
1134
  return __awaiter(this, void 0, void 0, function* () {
1155
1135
  const array = [];
@@ -1176,7 +1156,7 @@ class IPPolicyRules {
1176
1156
  }
1177
1157
  _pagedList(arg) {
1178
1158
  return this.httpClient
1179
- .url(`/ip_policy_rules`)
1159
+ .url(`/edges/https`)
1180
1160
  .query(arg)
1181
1161
  .get()
1182
1162
  .json(payload => util.deserializeResult(payload))
@@ -1190,7 +1170,7 @@ class IPPolicyRules {
1190
1170
  while (nextPage) {
1191
1171
  const pagedList = yield __await(this._pagedList(page));
1192
1172
  nextPage = pagedList.nextPageUri;
1193
- const items = pagedList.ipPolicyRules;
1173
+ const items = pagedList.httpsEdges;
1194
1174
  if (nextPage) {
1195
1175
  page = {
1196
1176
  beforeId: items[items.length - 1].id,
@@ -1204,573 +1184,1448 @@ class IPPolicyRules {
1204
1184
  });
1205
1185
  }
1206
1186
  /**
1207
- * Update attributes of an IP policy rule by ID
1187
+ * Updates an HTTPS Edge by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.
1208
1188
  */
1209
1189
  update(arg) {
1210
1190
  return this.httpClient
1211
- .url(`/ip_policy_rules/${arg.id}`)
1191
+ .url(`/edges/https/${arg.id}`)
1212
1192
  .patch(util.serializeArgument(arg))
1213
1193
  .json(payload => util.deserializeResult(payload))
1214
1194
  .then(f => f, util.onRejected);
1215
1195
  }
1196
+ /**
1197
+ * Delete an HTTPS Edge by ID
1198
+ */
1199
+ delete(arg) {
1200
+ return this.httpClient
1201
+ .url(`/edges/https/${arg.id}`)
1202
+ .delete()
1203
+ .json(payload => util.deserializeResult(payload))
1204
+ .then(f => f, util.onRejected);
1205
+ }
1216
1206
  }
1217
- exports.IPPolicyRules = IPPolicyRules;
1218
- /**
1219
- * An IP restriction is a restriction placed on the CIDRs that are allowed to
1220
- initate traffic to a specific aspect of your ngrok account. An IP
1221
- restriction has a type which defines the ingress it applies to. IP
1222
- restrictions can be used to enforce the source IPs that can make API
1223
- requests, log in to the dashboard, start ngrok agents, and connect to your
1224
- public-facing endpoints.
1225
- */
1226
- class IPRestrictions {
1227
- /** Do not construct this object directly, use the <code>ipRestrictions</code> property of an <code>Ngrok</code> client object instead. */
1207
+ exports.EdgesHTTPS = EdgesHTTPS;
1208
+ class HTTPSEdgeMutualTLSModule {
1209
+ /** Do not construct this object directly, use the <code>httpsEdgeMutualTlsModule</code> property of an <code>Ngrok</code> client object instead. */
1228
1210
  constructor(httpClient) {
1229
1211
  this.httpClient = httpClient;
1230
1212
  }
1231
- /**
1232
- * Create a new IP restriction
1233
- */
1234
- create(arg) {
1213
+ replace(arg) {
1235
1214
  return this.httpClient
1236
- .url(`/ip_restrictions`)
1237
- .post(util.serializeArgument(arg))
1215
+ .url(`/edges/https/${arg.id}/mutual_tls`)
1216
+ .put(util.serializeArgument(arg))
1217
+ .json(payload => util.deserializeResult(payload))
1218
+ .then(f => f, util.onRejected);
1219
+ }
1220
+ get(arg) {
1221
+ return this.httpClient
1222
+ .url(`/edges/https/${arg.id}/mutual_tls`)
1223
+ .get()
1238
1224
  .json(payload => util.deserializeResult(payload))
1239
1225
  .then(f => f, util.onRejected);
1240
1226
  }
1241
- /**
1242
- * Delete an IP restriction
1243
- */
1244
1227
  delete(arg) {
1245
1228
  return this.httpClient
1246
- .url(`/ip_restrictions/${arg.id}`)
1229
+ .url(`/edges/https/${arg.id}/mutual_tls`)
1247
1230
  .delete()
1248
1231
  .json(payload => util.deserializeResult(payload))
1249
1232
  .then(f => f, util.onRejected);
1250
1233
  }
1251
- /**
1252
- * Get detailed information about an IP restriction
1253
- */
1254
- get(arg) {
1234
+ }
1235
+ exports.HTTPSEdgeMutualTLSModule = HTTPSEdgeMutualTLSModule;
1236
+ class HTTPSEdgeTLSTerminationModule {
1237
+ /** Do not construct this object directly, use the <code>httpsEdgeTlsTerminationModule</code> property of an <code>Ngrok</code> client object instead. */
1238
+ constructor(httpClient) {
1239
+ this.httpClient = httpClient;
1240
+ }
1241
+ replace(arg) {
1255
1242
  return this.httpClient
1256
- .url(`/ip_restrictions/${arg.id}`)
1257
- .get()
1243
+ .url(`/edges/https/${arg.id}/tls_termination`)
1244
+ .put(util.serializeArgument(arg))
1258
1245
  .json(payload => util.deserializeResult(payload))
1259
1246
  .then(f => f, util.onRejected);
1260
1247
  }
1261
- /**
1262
- * List all IP restrictions on this account
1263
- */
1264
- list() {
1265
- var e_10, _a;
1266
- return __awaiter(this, void 0, void 0, function* () {
1267
- const array = [];
1268
- try {
1269
- for (
1270
- var _b = __asyncValues(this._asyncList()), _c;
1271
- (_c = yield _b.next()), !_c.done;
1272
-
1273
- ) {
1274
- let item = _c.value;
1275
- array.push(item);
1276
- }
1277
- } catch (e_10_1) {
1278
- e_10 = { error: e_10_1 };
1279
- } finally {
1280
- try {
1281
- if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
1282
- } finally {
1283
- if (e_10) throw e_10.error;
1284
- }
1285
- }
1286
- return array;
1287
- });
1288
- }
1289
- _pagedList(arg) {
1248
+ get(arg) {
1290
1249
  return this.httpClient
1291
- .url(`/ip_restrictions`)
1292
- .query(arg)
1250
+ .url(`/edges/https/${arg.id}/tls_termination`)
1293
1251
  .get()
1294
1252
  .json(payload => util.deserializeResult(payload))
1295
- .then(util.onFulfilled, util.onRejected);
1296
- }
1297
- _asyncList() {
1298
- return __asyncGenerator(this, arguments, function* _asyncList_10() {
1299
- const limit = '100';
1300
- let nextPage = 'initial loop';
1301
- let page = { limit: limit };
1302
- while (nextPage) {
1303
- const pagedList = yield __await(this._pagedList(page));
1304
- nextPage = pagedList.nextPageUri;
1305
- const items = pagedList.ipRestrictions;
1306
- if (nextPage) {
1307
- page = {
1308
- beforeId: items[items.length - 1].id,
1309
- limit: limit,
1310
- };
1311
- }
1312
- for (let item of items) {
1313
- yield yield __await(item);
1314
- }
1315
- }
1316
- });
1253
+ .then(f => f, util.onRejected);
1317
1254
  }
1318
- /**
1319
- * Update attributes of an IP restriction by ID
1320
- */
1321
- update(arg) {
1255
+ delete(arg) {
1322
1256
  return this.httpClient
1323
- .url(`/ip_restrictions/${arg.id}`)
1324
- .patch(util.serializeArgument(arg))
1257
+ .url(`/edges/https/${arg.id}/tls_termination`)
1258
+ .delete()
1325
1259
  .json(payload => util.deserializeResult(payload))
1326
1260
  .then(f => f, util.onRejected);
1327
1261
  }
1328
1262
  }
1329
- exports.IPRestrictions = IPRestrictions;
1330
- /**
1331
- * The IP Whitelist is deprecated and will be removed. Use an IP Restriction
1332
- with an `endpoints` type instead.
1333
- */
1334
- class IPWhitelist {
1335
- /** Do not construct this object directly, use the <code>ipWhitelist</code> property of an <code>Ngrok</code> client object instead. */
1263
+ exports.HTTPSEdgeTLSTerminationModule = HTTPSEdgeTLSTerminationModule;
1264
+ class EdgeRouteBackendModule {
1265
+ /** Do not construct this object directly, use the <code>edgeRouteBackendModule</code> property of an <code>Ngrok</code> client object instead. */
1336
1266
  constructor(httpClient) {
1337
1267
  this.httpClient = httpClient;
1338
1268
  }
1339
- /**
1340
- * Create a new IP whitelist entry that will restrict traffic to all tunnel endpoints on the account.
1341
- */
1342
- create(arg) {
1269
+ replace(arg) {
1343
1270
  return this.httpClient
1344
- .url(`/ip_whitelist`)
1345
- .post(util.serializeArgument(arg))
1271
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/backend`)
1272
+ .put(util.serializeArgument(arg))
1273
+ .json(payload => util.deserializeResult(payload))
1274
+ .then(f => f, util.onRejected);
1275
+ }
1276
+ get(arg) {
1277
+ return this.httpClient
1278
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/backend`)
1279
+ .get()
1346
1280
  .json(payload => util.deserializeResult(payload))
1347
1281
  .then(f => f, util.onRejected);
1348
1282
  }
1349
- /**
1350
- * Delete an IP whitelist entry.
1351
- */
1352
1283
  delete(arg) {
1353
1284
  return this.httpClient
1354
- .url(`/ip_whitelist/${arg.id}`)
1285
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/backend`)
1355
1286
  .delete()
1356
1287
  .json(payload => util.deserializeResult(payload))
1357
1288
  .then(f => f, util.onRejected);
1358
1289
  }
1359
- /**
1360
- * Get detailed information about an IP whitelist entry by ID.
1361
- */
1290
+ }
1291
+ exports.EdgeRouteBackendModule = EdgeRouteBackendModule;
1292
+ class EdgeRouteIPRestrictionModule {
1293
+ /** Do not construct this object directly, use the <code>edgeRouteIpRestrictionModule</code> property of an <code>Ngrok</code> client object instead. */
1294
+ constructor(httpClient) {
1295
+ this.httpClient = httpClient;
1296
+ }
1297
+ replace(arg) {
1298
+ return this.httpClient
1299
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/ip_restriction`)
1300
+ .put(util.serializeArgument(arg))
1301
+ .json(payload => util.deserializeResult(payload))
1302
+ .then(f => f, util.onRejected);
1303
+ }
1362
1304
  get(arg) {
1363
1305
  return this.httpClient
1364
- .url(`/ip_whitelist/${arg.id}`)
1306
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/ip_restriction`)
1365
1307
  .get()
1366
1308
  .json(payload => util.deserializeResult(payload))
1367
1309
  .then(f => f, util.onRejected);
1368
1310
  }
1369
- /**
1370
- * List all IP whitelist entries on this account
1371
- */
1372
- list() {
1373
- var e_11, _a;
1374
- return __awaiter(this, void 0, void 0, function* () {
1375
- const array = [];
1376
- try {
1377
- for (
1378
- var _b = __asyncValues(this._asyncList()), _c;
1379
- (_c = yield _b.next()), !_c.done;
1380
-
1381
- ) {
1382
- let item = _c.value;
1383
- array.push(item);
1384
- }
1385
- } catch (e_11_1) {
1386
- e_11 = { error: e_11_1 };
1387
- } finally {
1388
- try {
1389
- if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
1390
- } finally {
1391
- if (e_11) throw e_11.error;
1392
- }
1393
- }
1394
- return array;
1395
- });
1311
+ delete(arg) {
1312
+ return this.httpClient
1313
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/ip_restriction`)
1314
+ .delete()
1315
+ .json(payload => util.deserializeResult(payload))
1316
+ .then(f => f, util.onRejected);
1396
1317
  }
1397
- _pagedList(arg) {
1318
+ }
1319
+ exports.EdgeRouteIPRestrictionModule = EdgeRouteIPRestrictionModule;
1320
+ class EdgeRouteRequestHeadersModule {
1321
+ /** Do not construct this object directly, use the <code>edgeRouteRequestHeadersModule</code> property of an <code>Ngrok</code> client object instead. */
1322
+ constructor(httpClient) {
1323
+ this.httpClient = httpClient;
1324
+ }
1325
+ replace(arg) {
1398
1326
  return this.httpClient
1399
- .url(`/ip_whitelist`)
1400
- .query(arg)
1401
- .get()
1327
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/request_headers`)
1328
+ .put(util.serializeArgument(arg))
1402
1329
  .json(payload => util.deserializeResult(payload))
1403
- .then(util.onFulfilled, util.onRejected);
1330
+ .then(f => f, util.onRejected);
1404
1331
  }
1405
- _asyncList() {
1406
- return __asyncGenerator(this, arguments, function* _asyncList_11() {
1407
- const limit = '100';
1408
- let nextPage = 'initial loop';
1409
- let page = { limit: limit };
1410
- while (nextPage) {
1411
- const pagedList = yield __await(this._pagedList(page));
1412
- nextPage = pagedList.nextPageUri;
1413
- const items = pagedList.whitelist;
1414
- if (nextPage) {
1415
- page = {
1416
- beforeId: items[items.length - 1].id,
1417
- limit: limit,
1418
- };
1419
- }
1420
- for (let item of items) {
1421
- yield yield __await(item);
1422
- }
1423
- }
1424
- });
1332
+ get(arg) {
1333
+ return this.httpClient
1334
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/request_headers`)
1335
+ .get()
1336
+ .json(payload => util.deserializeResult(payload))
1337
+ .then(f => f, util.onRejected);
1425
1338
  }
1426
- /**
1427
- * Update attributes of an IP whitelist entry by ID
1428
- */
1429
- update(arg) {
1339
+ delete(arg) {
1430
1340
  return this.httpClient
1431
- .url(`/ip_whitelist/${arg.id}`)
1432
- .patch(util.serializeArgument(arg))
1341
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/request_headers`)
1342
+ .delete()
1433
1343
  .json(payload => util.deserializeResult(payload))
1434
1344
  .then(f => f, util.onRejected);
1435
1345
  }
1436
1346
  }
1437
- exports.IPWhitelist = IPWhitelist;
1438
- class EndpointLoggingModule {
1439
- /** Do not construct this object directly, use the <code>endpointLoggingModule</code> property of an <code>Ngrok</code> client object instead. */
1347
+ exports.EdgeRouteRequestHeadersModule = EdgeRouteRequestHeadersModule;
1348
+ class EdgeRouteResponseHeadersModule {
1349
+ /** Do not construct this object directly, use the <code>edgeRouteResponseHeadersModule</code> property of an <code>Ngrok</code> client object instead. */
1440
1350
  constructor(httpClient) {
1441
1351
  this.httpClient = httpClient;
1442
1352
  }
1443
1353
  replace(arg) {
1444
1354
  return this.httpClient
1445
- .url(`/endpoint_configurations/${arg.id}/logging`)
1355
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/response_headers`)
1446
1356
  .put(util.serializeArgument(arg))
1447
1357
  .json(payload => util.deserializeResult(payload))
1448
1358
  .then(f => f, util.onRejected);
1449
1359
  }
1450
1360
  get(arg) {
1451
1361
  return this.httpClient
1452
- .url(`/endpoint_configurations/${arg.id}/logging`)
1362
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/response_headers`)
1453
1363
  .get()
1454
1364
  .json(payload => util.deserializeResult(payload))
1455
1365
  .then(f => f, util.onRejected);
1456
1366
  }
1457
1367
  delete(arg) {
1458
1368
  return this.httpClient
1459
- .url(`/endpoint_configurations/${arg.id}/logging`)
1369
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/response_headers`)
1460
1370
  .delete()
1461
1371
  .json(payload => util.deserializeResult(payload))
1462
1372
  .then(f => f, util.onRejected);
1463
1373
  }
1464
1374
  }
1465
- exports.EndpointLoggingModule = EndpointLoggingModule;
1466
- class EndpointCircuitBreakerModule {
1467
- /** Do not construct this object directly, use the <code>endpointCircuitBreakerModule</code> property of an <code>Ngrok</code> client object instead. */
1375
+ exports.EdgeRouteResponseHeadersModule = EdgeRouteResponseHeadersModule;
1376
+ class EdgeRouteCompressionModule {
1377
+ /** Do not construct this object directly, use the <code>edgeRouteCompressionModule</code> property of an <code>Ngrok</code> client object instead. */
1468
1378
  constructor(httpClient) {
1469
1379
  this.httpClient = httpClient;
1470
1380
  }
1471
1381
  replace(arg) {
1472
1382
  return this.httpClient
1473
- .url(`/endpoint_configurations/${arg.id}/circuit_breaker`)
1383
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/compression`)
1474
1384
  .put(util.serializeArgument(arg))
1475
1385
  .json(payload => util.deserializeResult(payload))
1476
1386
  .then(f => f, util.onRejected);
1477
1387
  }
1478
1388
  get(arg) {
1479
1389
  return this.httpClient
1480
- .url(`/endpoint_configurations/${arg.id}/circuit_breaker`)
1390
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/compression`)
1481
1391
  .get()
1482
1392
  .json(payload => util.deserializeResult(payload))
1483
1393
  .then(f => f, util.onRejected);
1484
1394
  }
1485
1395
  delete(arg) {
1486
1396
  return this.httpClient
1487
- .url(`/endpoint_configurations/${arg.id}/circuit_breaker`)
1397
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/compression`)
1488
1398
  .delete()
1489
1399
  .json(payload => util.deserializeResult(payload))
1490
1400
  .then(f => f, util.onRejected);
1491
1401
  }
1492
1402
  }
1493
- exports.EndpointCircuitBreakerModule = EndpointCircuitBreakerModule;
1494
- class EndpointCompressionModule {
1495
- /** Do not construct this object directly, use the <code>endpointCompressionModule</code> property of an <code>Ngrok</code> client object instead. */
1403
+ exports.EdgeRouteCompressionModule = EdgeRouteCompressionModule;
1404
+ class EdgeRouteCircuitBreakerModule {
1405
+ /** Do not construct this object directly, use the <code>edgeRouteCircuitBreakerModule</code> property of an <code>Ngrok</code> client object instead. */
1496
1406
  constructor(httpClient) {
1497
1407
  this.httpClient = httpClient;
1498
1408
  }
1499
1409
  replace(arg) {
1500
1410
  return this.httpClient
1501
- .url(`/endpoint_configurations/${arg.id}/compression`)
1411
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/circuit_breaker`)
1502
1412
  .put(util.serializeArgument(arg))
1503
1413
  .json(payload => util.deserializeResult(payload))
1504
1414
  .then(f => f, util.onRejected);
1505
1415
  }
1506
1416
  get(arg) {
1507
1417
  return this.httpClient
1508
- .url(`/endpoint_configurations/${arg.id}/compression`)
1418
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/circuit_breaker`)
1509
1419
  .get()
1510
1420
  .json(payload => util.deserializeResult(payload))
1511
1421
  .then(f => f, util.onRejected);
1512
1422
  }
1513
1423
  delete(arg) {
1514
1424
  return this.httpClient
1515
- .url(`/endpoint_configurations/${arg.id}/compression`)
1425
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/circuit_breaker`)
1516
1426
  .delete()
1517
1427
  .json(payload => util.deserializeResult(payload))
1518
1428
  .then(f => f, util.onRejected);
1519
1429
  }
1520
1430
  }
1521
- exports.EndpointCompressionModule = EndpointCompressionModule;
1522
- class EndpointTLSTerminationModule {
1523
- /** Do not construct this object directly, use the <code>endpointTlsTerminationModule</code> property of an <code>Ngrok</code> client object instead. */
1431
+ exports.EdgeRouteCircuitBreakerModule = EdgeRouteCircuitBreakerModule;
1432
+ class EdgeRouteWebhookVerificationModule {
1433
+ /** Do not construct this object directly, use the <code>edgeRouteWebhookVerificationModule</code> property of an <code>Ngrok</code> client object instead. */
1524
1434
  constructor(httpClient) {
1525
1435
  this.httpClient = httpClient;
1526
1436
  }
1527
1437
  replace(arg) {
1528
1438
  return this.httpClient
1529
- .url(`/endpoint_configurations/${arg.id}/tls_termination`)
1439
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/webhook_verification`)
1530
1440
  .put(util.serializeArgument(arg))
1531
1441
  .json(payload => util.deserializeResult(payload))
1532
1442
  .then(f => f, util.onRejected);
1533
1443
  }
1534
1444
  get(arg) {
1535
1445
  return this.httpClient
1536
- .url(`/endpoint_configurations/${arg.id}/tls_termination`)
1446
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/webhook_verification`)
1537
1447
  .get()
1538
1448
  .json(payload => util.deserializeResult(payload))
1539
1449
  .then(f => f, util.onRejected);
1540
1450
  }
1541
1451
  delete(arg) {
1542
1452
  return this.httpClient
1543
- .url(`/endpoint_configurations/${arg.id}/tls_termination`)
1453
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/webhook_verification`)
1544
1454
  .delete()
1545
1455
  .json(payload => util.deserializeResult(payload))
1546
1456
  .then(f => f, util.onRejected);
1547
1457
  }
1548
1458
  }
1549
- exports.EndpointTLSTerminationModule = EndpointTLSTerminationModule;
1550
- class EndpointIPPolicyModule {
1551
- /** Do not construct this object directly, use the <code>endpointIpPolicyModule</code> property of an <code>Ngrok</code> client object instead. */
1459
+ exports.EdgeRouteWebhookVerificationModule = EdgeRouteWebhookVerificationModule;
1460
+ class EdgeRouteOAuthModule {
1461
+ /** Do not construct this object directly, use the <code>edgeRouteOAuthModule</code> property of an <code>Ngrok</code> client object instead. */
1552
1462
  constructor(httpClient) {
1553
1463
  this.httpClient = httpClient;
1554
1464
  }
1555
1465
  replace(arg) {
1556
1466
  return this.httpClient
1557
- .url(`/endpoint_configurations/${arg.id}/ip_policy`)
1467
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/oauth`)
1558
1468
  .put(util.serializeArgument(arg))
1559
1469
  .json(payload => util.deserializeResult(payload))
1560
1470
  .then(f => f, util.onRejected);
1561
1471
  }
1562
1472
  get(arg) {
1563
1473
  return this.httpClient
1564
- .url(`/endpoint_configurations/${arg.id}/ip_policy`)
1474
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/oauth`)
1565
1475
  .get()
1566
1476
  .json(payload => util.deserializeResult(payload))
1567
1477
  .then(f => f, util.onRejected);
1568
1478
  }
1569
1479
  delete(arg) {
1570
1480
  return this.httpClient
1571
- .url(`/endpoint_configurations/${arg.id}/ip_policy`)
1481
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/oauth`)
1572
1482
  .delete()
1573
1483
  .json(payload => util.deserializeResult(payload))
1574
1484
  .then(f => f, util.onRejected);
1575
1485
  }
1576
1486
  }
1577
- exports.EndpointIPPolicyModule = EndpointIPPolicyModule;
1578
- class EndpointMutualTLSModule {
1579
- /** Do not construct this object directly, use the <code>endpointMutualTlsModule</code> property of an <code>Ngrok</code> client object instead. */
1487
+ exports.EdgeRouteOAuthModule = EdgeRouteOAuthModule;
1488
+ class EdgeRouteSAMLModule {
1489
+ /** Do not construct this object directly, use the <code>edgeRouteSamlModule</code> property of an <code>Ngrok</code> client object instead. */
1580
1490
  constructor(httpClient) {
1581
1491
  this.httpClient = httpClient;
1582
1492
  }
1583
1493
  replace(arg) {
1584
1494
  return this.httpClient
1585
- .url(`/endpoint_configurations/${arg.id}/mutual_tls`)
1495
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/saml`)
1586
1496
  .put(util.serializeArgument(arg))
1587
1497
  .json(payload => util.deserializeResult(payload))
1588
1498
  .then(f => f, util.onRejected);
1589
1499
  }
1590
1500
  get(arg) {
1591
1501
  return this.httpClient
1592
- .url(`/endpoint_configurations/${arg.id}/mutual_tls`)
1502
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/saml`)
1593
1503
  .get()
1594
1504
  .json(payload => util.deserializeResult(payload))
1595
1505
  .then(f => f, util.onRejected);
1596
1506
  }
1597
1507
  delete(arg) {
1598
1508
  return this.httpClient
1599
- .url(`/endpoint_configurations/${arg.id}/mutual_tls`)
1509
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/saml`)
1600
1510
  .delete()
1601
1511
  .json(payload => util.deserializeResult(payload))
1602
1512
  .then(f => f, util.onRejected);
1603
1513
  }
1604
1514
  }
1605
- exports.EndpointMutualTLSModule = EndpointMutualTLSModule;
1606
- class EndpointRequestHeadersModule {
1607
- /** Do not construct this object directly, use the <code>endpointRequestHeadersModule</code> property of an <code>Ngrok</code> client object instead. */
1515
+ exports.EdgeRouteSAMLModule = EdgeRouteSAMLModule;
1516
+ class EdgeRouteOIDCModule {
1517
+ /** Do not construct this object directly, use the <code>edgeRouteOidcModule</code> property of an <code>Ngrok</code> client object instead. */
1608
1518
  constructor(httpClient) {
1609
1519
  this.httpClient = httpClient;
1610
1520
  }
1611
1521
  replace(arg) {
1612
1522
  return this.httpClient
1613
- .url(`/endpoint_configurations/${arg.id}/request_headers`)
1523
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/oidc`)
1614
1524
  .put(util.serializeArgument(arg))
1615
1525
  .json(payload => util.deserializeResult(payload))
1616
1526
  .then(f => f, util.onRejected);
1617
1527
  }
1618
1528
  get(arg) {
1619
1529
  return this.httpClient
1620
- .url(`/endpoint_configurations/${arg.id}/request_headers`)
1530
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/oidc`)
1621
1531
  .get()
1622
1532
  .json(payload => util.deserializeResult(payload))
1623
1533
  .then(f => f, util.onRejected);
1624
1534
  }
1625
1535
  delete(arg) {
1626
1536
  return this.httpClient
1627
- .url(`/endpoint_configurations/${arg.id}/request_headers`)
1537
+ .url(`/edges/https/${arg.edgeId}/routes/${arg.id}/oidc`)
1628
1538
  .delete()
1629
1539
  .json(payload => util.deserializeResult(payload))
1630
1540
  .then(f => f, util.onRejected);
1631
1541
  }
1632
1542
  }
1633
- exports.EndpointRequestHeadersModule = EndpointRequestHeadersModule;
1634
- class EndpointResponseHeadersModule {
1635
- /** Do not construct this object directly, use the <code>endpointResponseHeadersModule</code> property of an <code>Ngrok</code> client object instead. */
1543
+ exports.EdgeRouteOIDCModule = EdgeRouteOIDCModule;
1544
+ class EdgeRouteWebsocketTCPConverterModule {
1545
+ /** Do not construct this object directly, use the <code>edgeRouteWebsocketTcpConverterModule</code> property of an <code>Ngrok</code> client object instead. */
1636
1546
  constructor(httpClient) {
1637
1547
  this.httpClient = httpClient;
1638
1548
  }
1639
1549
  replace(arg) {
1640
1550
  return this.httpClient
1641
- .url(`/endpoint_configurations/${arg.id}/response_headers`)
1551
+ .url(
1552
+ `/edges/https/${arg.edgeId}/routes/${arg.id}/websocket_tcp_converter`
1553
+ )
1642
1554
  .put(util.serializeArgument(arg))
1643
1555
  .json(payload => util.deserializeResult(payload))
1644
1556
  .then(f => f, util.onRejected);
1645
1557
  }
1646
1558
  get(arg) {
1647
1559
  return this.httpClient
1648
- .url(`/endpoint_configurations/${arg.id}/response_headers`)
1560
+ .url(
1561
+ `/edges/https/${arg.edgeId}/routes/${arg.id}/websocket_tcp_converter`
1562
+ )
1649
1563
  .get()
1650
1564
  .json(payload => util.deserializeResult(payload))
1651
1565
  .then(f => f, util.onRejected);
1652
1566
  }
1653
1567
  delete(arg) {
1654
1568
  return this.httpClient
1655
- .url(`/endpoint_configurations/${arg.id}/response_headers`)
1569
+ .url(
1570
+ `/edges/https/${arg.edgeId}/routes/${arg.id}/websocket_tcp_converter`
1571
+ )
1656
1572
  .delete()
1657
1573
  .json(payload => util.deserializeResult(payload))
1658
1574
  .then(f => f, util.onRejected);
1659
1575
  }
1660
1576
  }
1661
- exports.EndpointResponseHeadersModule = EndpointResponseHeadersModule;
1662
- class EndpointOAuthModule {
1663
- /** Do not construct this object directly, use the <code>endpointOAuthModule</code> property of an <code>Ngrok</code> client object instead. */
1577
+ exports.EdgeRouteWebsocketTCPConverterModule =
1578
+ EdgeRouteWebsocketTCPConverterModule;
1579
+ class EdgesTCP {
1580
+ /** Do not construct this object directly, use the <code>edgesTcp</code> property of an <code>Ngrok</code> client object instead. */
1664
1581
  constructor(httpClient) {
1665
1582
  this.httpClient = httpClient;
1666
1583
  }
1667
- replace(arg) {
1584
+ /**
1585
+ * Create a TCP Edge
1586
+ */
1587
+ create(arg) {
1668
1588
  return this.httpClient
1669
- .url(`/endpoint_configurations/${arg.id}/oauth`)
1670
- .put(util.serializeArgument(arg))
1589
+ .url(`/edges/tcp`)
1590
+ .post(util.serializeArgument(arg))
1671
1591
  .json(payload => util.deserializeResult(payload))
1672
1592
  .then(f => f, util.onRejected);
1673
1593
  }
1674
- get(arg) {
1594
+ /**
1595
+ * Get a TCP Edge by ID
1596
+ */
1597
+ get(arg) {
1598
+ return this.httpClient
1599
+ .url(`/edges/tcp/${arg.id}`)
1600
+ .get()
1601
+ .json(payload => util.deserializeResult(payload))
1602
+ .then(f => f, util.onRejected);
1603
+ }
1604
+ /**
1605
+ * Returns a list of all TCP Edges on this account
1606
+ */
1607
+ list() {
1608
+ var e_10, _a;
1609
+ return __awaiter(this, void 0, void 0, function* () {
1610
+ const array = [];
1611
+ try {
1612
+ for (
1613
+ var _b = __asyncValues(this._asyncList()), _c;
1614
+ (_c = yield _b.next()), !_c.done;
1615
+
1616
+ ) {
1617
+ let item = _c.value;
1618
+ array.push(item);
1619
+ }
1620
+ } catch (e_10_1) {
1621
+ e_10 = { error: e_10_1 };
1622
+ } finally {
1623
+ try {
1624
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
1625
+ } finally {
1626
+ if (e_10) throw e_10.error;
1627
+ }
1628
+ }
1629
+ return array;
1630
+ });
1631
+ }
1632
+ _pagedList(arg) {
1633
+ return this.httpClient
1634
+ .url(`/edges/tcp`)
1635
+ .query(arg)
1636
+ .get()
1637
+ .json(payload => util.deserializeResult(payload))
1638
+ .then(util.onFulfilled, util.onRejected);
1639
+ }
1640
+ _asyncList() {
1641
+ return __asyncGenerator(this, arguments, function* _asyncList_10() {
1642
+ const limit = '100';
1643
+ let nextPage = 'initial loop';
1644
+ let page = { limit: limit };
1645
+ while (nextPage) {
1646
+ const pagedList = yield __await(this._pagedList(page));
1647
+ nextPage = pagedList.nextPageUri;
1648
+ const items = pagedList.tcpEdges;
1649
+ if (nextPage) {
1650
+ page = {
1651
+ beforeId: items[items.length - 1].id,
1652
+ limit: limit,
1653
+ };
1654
+ }
1655
+ for (let item of items) {
1656
+ yield yield __await(item);
1657
+ }
1658
+ }
1659
+ });
1660
+ }
1661
+ /**
1662
+ * Updates a TCP Edge by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.
1663
+ */
1664
+ update(arg) {
1665
+ return this.httpClient
1666
+ .url(`/edges/tcp/${arg.id}`)
1667
+ .patch(util.serializeArgument(arg))
1668
+ .json(payload => util.deserializeResult(payload))
1669
+ .then(f => f, util.onRejected);
1670
+ }
1671
+ /**
1672
+ * Delete a TCP Edge by ID
1673
+ */
1674
+ delete(arg) {
1675
+ return this.httpClient
1676
+ .url(`/edges/tcp/${arg.id}`)
1677
+ .delete()
1678
+ .json(payload => util.deserializeResult(payload))
1679
+ .then(f => f, util.onRejected);
1680
+ }
1681
+ }
1682
+ exports.EdgesTCP = EdgesTCP;
1683
+ class TCPEdgeBackendModule {
1684
+ /** Do not construct this object directly, use the <code>tcpEdgeBackendModule</code> property of an <code>Ngrok</code> client object instead. */
1685
+ constructor(httpClient) {
1686
+ this.httpClient = httpClient;
1687
+ }
1688
+ replace(arg) {
1689
+ return this.httpClient
1690
+ .url(`/edges/tcp/${arg.id}/backend`)
1691
+ .put(util.serializeArgument(arg))
1692
+ .json(payload => util.deserializeResult(payload))
1693
+ .then(f => f, util.onRejected);
1694
+ }
1695
+ get(arg) {
1696
+ return this.httpClient
1697
+ .url(`/edges/tcp/${arg.id}/backend`)
1698
+ .get()
1699
+ .json(payload => util.deserializeResult(payload))
1700
+ .then(f => f, util.onRejected);
1701
+ }
1702
+ delete(arg) {
1703
+ return this.httpClient
1704
+ .url(`/edges/tcp/${arg.id}/backend`)
1705
+ .delete()
1706
+ .json(payload => util.deserializeResult(payload))
1707
+ .then(f => f, util.onRejected);
1708
+ }
1709
+ }
1710
+ exports.TCPEdgeBackendModule = TCPEdgeBackendModule;
1711
+ class TCPEdgeIPRestrictionModule {
1712
+ /** Do not construct this object directly, use the <code>tcpEdgeIpRestrictionModule</code> property of an <code>Ngrok</code> client object instead. */
1713
+ constructor(httpClient) {
1714
+ this.httpClient = httpClient;
1715
+ }
1716
+ replace(arg) {
1717
+ return this.httpClient
1718
+ .url(`/edges/tcp/${arg.id}/ip_restriction`)
1719
+ .put(util.serializeArgument(arg))
1720
+ .json(payload => util.deserializeResult(payload))
1721
+ .then(f => f, util.onRejected);
1722
+ }
1723
+ get(arg) {
1724
+ return this.httpClient
1725
+ .url(`/edges/tcp/${arg.id}/ip_restriction`)
1726
+ .get()
1727
+ .json(payload => util.deserializeResult(payload))
1728
+ .then(f => f, util.onRejected);
1729
+ }
1730
+ delete(arg) {
1731
+ return this.httpClient
1732
+ .url(`/edges/tcp/${arg.id}/ip_restriction`)
1733
+ .delete()
1734
+ .json(payload => util.deserializeResult(payload))
1735
+ .then(f => f, util.onRejected);
1736
+ }
1737
+ }
1738
+ exports.TCPEdgeIPRestrictionModule = TCPEdgeIPRestrictionModule;
1739
+ class EdgesTLS {
1740
+ /** Do not construct this object directly, use the <code>edgesTls</code> property of an <code>Ngrok</code> client object instead. */
1741
+ constructor(httpClient) {
1742
+ this.httpClient = httpClient;
1743
+ }
1744
+ /**
1745
+ * Create a TLS Edge
1746
+ */
1747
+ create(arg) {
1748
+ return this.httpClient
1749
+ .url(`/edges/tls`)
1750
+ .post(util.serializeArgument(arg))
1751
+ .json(payload => util.deserializeResult(payload))
1752
+ .then(f => f, util.onRejected);
1753
+ }
1754
+ /**
1755
+ * Get a TLS Edge by ID
1756
+ */
1757
+ get(arg) {
1758
+ return this.httpClient
1759
+ .url(`/edges/tls/${arg.id}`)
1760
+ .get()
1761
+ .json(payload => util.deserializeResult(payload))
1762
+ .then(f => f, util.onRejected);
1763
+ }
1764
+ /**
1765
+ * Returns a list of all TLS Edges on this account
1766
+ */
1767
+ list() {
1768
+ var e_11, _a;
1769
+ return __awaiter(this, void 0, void 0, function* () {
1770
+ const array = [];
1771
+ try {
1772
+ for (
1773
+ var _b = __asyncValues(this._asyncList()), _c;
1774
+ (_c = yield _b.next()), !_c.done;
1775
+
1776
+ ) {
1777
+ let item = _c.value;
1778
+ array.push(item);
1779
+ }
1780
+ } catch (e_11_1) {
1781
+ e_11 = { error: e_11_1 };
1782
+ } finally {
1783
+ try {
1784
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
1785
+ } finally {
1786
+ if (e_11) throw e_11.error;
1787
+ }
1788
+ }
1789
+ return array;
1790
+ });
1791
+ }
1792
+ _pagedList(arg) {
1793
+ return this.httpClient
1794
+ .url(`/edges/tls`)
1795
+ .query(arg)
1796
+ .get()
1797
+ .json(payload => util.deserializeResult(payload))
1798
+ .then(util.onFulfilled, util.onRejected);
1799
+ }
1800
+ _asyncList() {
1801
+ return __asyncGenerator(this, arguments, function* _asyncList_11() {
1802
+ const limit = '100';
1803
+ let nextPage = 'initial loop';
1804
+ let page = { limit: limit };
1805
+ while (nextPage) {
1806
+ const pagedList = yield __await(this._pagedList(page));
1807
+ nextPage = pagedList.nextPageUri;
1808
+ const items = pagedList.tlsEdges;
1809
+ if (nextPage) {
1810
+ page = {
1811
+ beforeId: items[items.length - 1].id,
1812
+ limit: limit,
1813
+ };
1814
+ }
1815
+ for (let item of items) {
1816
+ yield yield __await(item);
1817
+ }
1818
+ }
1819
+ });
1820
+ }
1821
+ /**
1822
+ * Updates a TLS Edge by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.
1823
+ */
1824
+ update(arg) {
1825
+ return this.httpClient
1826
+ .url(`/edges/tls/${arg.id}`)
1827
+ .patch(util.serializeArgument(arg))
1828
+ .json(payload => util.deserializeResult(payload))
1829
+ .then(f => f, util.onRejected);
1830
+ }
1831
+ /**
1832
+ * Delete a TLS Edge by ID
1833
+ */
1834
+ delete(arg) {
1835
+ return this.httpClient
1836
+ .url(`/edges/tls/${arg.id}`)
1837
+ .delete()
1838
+ .json(payload => util.deserializeResult(payload))
1839
+ .then(f => f, util.onRejected);
1840
+ }
1841
+ }
1842
+ exports.EdgesTLS = EdgesTLS;
1843
+ class TLSEdgeBackendModule {
1844
+ /** Do not construct this object directly, use the <code>tlsEdgeBackendModule</code> property of an <code>Ngrok</code> client object instead. */
1845
+ constructor(httpClient) {
1846
+ this.httpClient = httpClient;
1847
+ }
1848
+ replace(arg) {
1849
+ return this.httpClient
1850
+ .url(`/edges/tls/${arg.id}/backend`)
1851
+ .put(util.serializeArgument(arg))
1852
+ .json(payload => util.deserializeResult(payload))
1853
+ .then(f => f, util.onRejected);
1854
+ }
1855
+ get(arg) {
1856
+ return this.httpClient
1857
+ .url(`/edges/tls/${arg.id}/backend`)
1858
+ .get()
1859
+ .json(payload => util.deserializeResult(payload))
1860
+ .then(f => f, util.onRejected);
1861
+ }
1862
+ delete(arg) {
1863
+ return this.httpClient
1864
+ .url(`/edges/tls/${arg.id}/backend`)
1865
+ .delete()
1866
+ .json(payload => util.deserializeResult(payload))
1867
+ .then(f => f, util.onRejected);
1868
+ }
1869
+ }
1870
+ exports.TLSEdgeBackendModule = TLSEdgeBackendModule;
1871
+ class TLSEdgeIPRestrictionModule {
1872
+ /** Do not construct this object directly, use the <code>tlsEdgeIpRestrictionModule</code> property of an <code>Ngrok</code> client object instead. */
1873
+ constructor(httpClient) {
1874
+ this.httpClient = httpClient;
1875
+ }
1876
+ replace(arg) {
1877
+ return this.httpClient
1878
+ .url(`/edges/tls/${arg.id}/ip_restriction`)
1879
+ .put(util.serializeArgument(arg))
1880
+ .json(payload => util.deserializeResult(payload))
1881
+ .then(f => f, util.onRejected);
1882
+ }
1883
+ get(arg) {
1884
+ return this.httpClient
1885
+ .url(`/edges/tls/${arg.id}/ip_restriction`)
1886
+ .get()
1887
+ .json(payload => util.deserializeResult(payload))
1888
+ .then(f => f, util.onRejected);
1889
+ }
1890
+ delete(arg) {
1891
+ return this.httpClient
1892
+ .url(`/edges/tls/${arg.id}/ip_restriction`)
1893
+ .delete()
1894
+ .json(payload => util.deserializeResult(payload))
1895
+ .then(f => f, util.onRejected);
1896
+ }
1897
+ }
1898
+ exports.TLSEdgeIPRestrictionModule = TLSEdgeIPRestrictionModule;
1899
+ class TLSEdgeMutualTLSModule {
1900
+ /** Do not construct this object directly, use the <code>tlsEdgeMutualTlsModule</code> property of an <code>Ngrok</code> client object instead. */
1901
+ constructor(httpClient) {
1902
+ this.httpClient = httpClient;
1903
+ }
1904
+ replace(arg) {
1905
+ return this.httpClient
1906
+ .url(`/edges/tls/${arg.id}/mutual_tls`)
1907
+ .put(util.serializeArgument(arg))
1908
+ .json(payload => util.deserializeResult(payload))
1909
+ .then(f => f, util.onRejected);
1910
+ }
1911
+ get(arg) {
1912
+ return this.httpClient
1913
+ .url(`/edges/tls/${arg.id}/mutual_tls`)
1914
+ .get()
1915
+ .json(payload => util.deserializeResult(payload))
1916
+ .then(f => f, util.onRejected);
1917
+ }
1918
+ delete(arg) {
1919
+ return this.httpClient
1920
+ .url(`/edges/tls/${arg.id}/mutual_tls`)
1921
+ .delete()
1922
+ .json(payload => util.deserializeResult(payload))
1923
+ .then(f => f, util.onRejected);
1924
+ }
1925
+ }
1926
+ exports.TLSEdgeMutualTLSModule = TLSEdgeMutualTLSModule;
1927
+ class TLSEdgeTLSTerminationModule {
1928
+ /** Do not construct this object directly, use the <code>tlsEdgeTlsTerminationModule</code> property of an <code>Ngrok</code> client object instead. */
1929
+ constructor(httpClient) {
1930
+ this.httpClient = httpClient;
1931
+ }
1932
+ replace(arg) {
1933
+ return this.httpClient
1934
+ .url(`/edges/tls/${arg.id}/tls_termination`)
1935
+ .put(util.serializeArgument(arg))
1936
+ .json(payload => util.deserializeResult(payload))
1937
+ .then(f => f, util.onRejected);
1938
+ }
1939
+ get(arg) {
1940
+ return this.httpClient
1941
+ .url(`/edges/tls/${arg.id}/tls_termination`)
1942
+ .get()
1943
+ .json(payload => util.deserializeResult(payload))
1944
+ .then(f => f, util.onRejected);
1945
+ }
1946
+ delete(arg) {
1947
+ return this.httpClient
1948
+ .url(`/edges/tls/${arg.id}/tls_termination`)
1949
+ .delete()
1950
+ .json(payload => util.deserializeResult(payload))
1951
+ .then(f => f, util.onRejected);
1952
+ }
1953
+ }
1954
+ exports.TLSEdgeTLSTerminationModule = TLSEdgeTLSTerminationModule;
1955
+ /**
1956
+ * Endpoints provides an API for querying the endpoint objects
1957
+ which define what tunnel or edge is used to serve a hostport.
1958
+ Only active endpoints associated with a tunnel or backend are returned.
1959
+ */
1960
+ class Endpoints {
1961
+ /** Do not construct this object directly, use the <code>endpoints</code> property of an <code>Ngrok</code> client object instead. */
1962
+ constructor(httpClient) {
1963
+ this.httpClient = httpClient;
1964
+ }
1965
+ /**
1966
+ * List all active endpoints on the account
1967
+ */
1968
+ list() {
1969
+ var e_12, _a;
1970
+ return __awaiter(this, void 0, void 0, function* () {
1971
+ const array = [];
1972
+ try {
1973
+ for (
1974
+ var _b = __asyncValues(this._asyncList()), _c;
1975
+ (_c = yield _b.next()), !_c.done;
1976
+
1977
+ ) {
1978
+ let item = _c.value;
1979
+ array.push(item);
1980
+ }
1981
+ } catch (e_12_1) {
1982
+ e_12 = { error: e_12_1 };
1983
+ } finally {
1984
+ try {
1985
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
1986
+ } finally {
1987
+ if (e_12) throw e_12.error;
1988
+ }
1989
+ }
1990
+ return array;
1991
+ });
1992
+ }
1993
+ _pagedList(arg) {
1994
+ return this.httpClient
1995
+ .url(`/endpoints`)
1996
+ .query(arg)
1997
+ .get()
1998
+ .json(payload => util.deserializeResult(payload))
1999
+ .then(util.onFulfilled, util.onRejected);
2000
+ }
2001
+ _asyncList() {
2002
+ return __asyncGenerator(this, arguments, function* _asyncList_12() {
2003
+ const limit = '100';
2004
+ let nextPage = 'initial loop';
2005
+ let page = { limit: limit };
2006
+ while (nextPage) {
2007
+ const pagedList = yield __await(this._pagedList(page));
2008
+ nextPage = pagedList.nextPageUri;
2009
+ const items = pagedList.endpoints;
2010
+ if (nextPage) {
2011
+ page = {
2012
+ beforeId: items[items.length - 1].id,
2013
+ limit: limit,
2014
+ };
2015
+ }
2016
+ for (let item of items) {
2017
+ yield yield __await(item);
2018
+ }
2019
+ }
2020
+ });
2021
+ }
2022
+ /**
2023
+ * Get the status of an endpoint by ID
2024
+ */
2025
+ get(arg) {
2026
+ return this.httpClient
2027
+ .url(`/endpoints/${arg.id}`)
2028
+ .get()
2029
+ .json(payload => util.deserializeResult(payload))
2030
+ .then(f => f, util.onRejected);
2031
+ }
2032
+ }
2033
+ exports.Endpoints = Endpoints;
2034
+ class EventDestinations {
2035
+ /** Do not construct this object directly, use the <code>eventDestinations</code> property of an <code>Ngrok</code> client object instead. */
2036
+ constructor(httpClient) {
2037
+ this.httpClient = httpClient;
2038
+ }
2039
+ /**
2040
+ * Create a new Event Destination. It will not apply to anything until it is associated with an Event Stream, and that Event Stream is associated with an Endpoint Config.
2041
+ */
2042
+ create(arg) {
2043
+ return this.httpClient
2044
+ .url(`/event_destinations`)
2045
+ .post(util.serializeArgument(arg))
2046
+ .json(payload => util.deserializeResult(payload))
2047
+ .then(f => f, util.onRejected);
2048
+ }
2049
+ /**
2050
+ * Delete an Event Destination. If the Event Destination is still referenced by an Event Subscription.
2051
+ */
2052
+ delete(arg) {
2053
+ return this.httpClient
2054
+ .url(`/event_destinations/${arg.id}`)
2055
+ .delete()
2056
+ .json(payload => util.deserializeResult(payload))
2057
+ .then(f => f, util.onRejected);
2058
+ }
2059
+ /**
2060
+ * Get detailed information about an Event Destination by ID.
2061
+ */
2062
+ get(arg) {
2063
+ return this.httpClient
2064
+ .url(`/event_destinations/${arg.id}`)
2065
+ .get()
2066
+ .json(payload => util.deserializeResult(payload))
2067
+ .then(f => f, util.onRejected);
2068
+ }
2069
+ /**
2070
+ * List all Event Destinations on this account.
2071
+ */
2072
+ list() {
2073
+ var e_13, _a;
2074
+ return __awaiter(this, void 0, void 0, function* () {
2075
+ const array = [];
2076
+ try {
2077
+ for (
2078
+ var _b = __asyncValues(this._asyncList()), _c;
2079
+ (_c = yield _b.next()), !_c.done;
2080
+
2081
+ ) {
2082
+ let item = _c.value;
2083
+ array.push(item);
2084
+ }
2085
+ } catch (e_13_1) {
2086
+ e_13 = { error: e_13_1 };
2087
+ } finally {
2088
+ try {
2089
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2090
+ } finally {
2091
+ if (e_13) throw e_13.error;
2092
+ }
2093
+ }
2094
+ return array;
2095
+ });
2096
+ }
2097
+ _pagedList(arg) {
2098
+ return this.httpClient
2099
+ .url(`/event_destinations`)
2100
+ .query(arg)
2101
+ .get()
2102
+ .json(payload => util.deserializeResult(payload))
2103
+ .then(util.onFulfilled, util.onRejected);
2104
+ }
2105
+ _asyncList() {
2106
+ return __asyncGenerator(this, arguments, function* _asyncList_13() {
2107
+ const limit = '100';
2108
+ let nextPage = 'initial loop';
2109
+ let page = { limit: limit };
2110
+ while (nextPage) {
2111
+ const pagedList = yield __await(this._pagedList(page));
2112
+ nextPage = pagedList.nextPageUri;
2113
+ const items = pagedList.eventDestinations;
2114
+ if (nextPage) {
2115
+ page = {
2116
+ beforeId: items[items.length - 1].id,
2117
+ limit: limit,
2118
+ };
2119
+ }
2120
+ for (let item of items) {
2121
+ yield yield __await(item);
2122
+ }
2123
+ }
2124
+ });
2125
+ }
2126
+ /**
2127
+ * Update attributes of an Event Destination.
2128
+ */
2129
+ update(arg) {
2130
+ return this.httpClient
2131
+ .url(`/event_destinations/${arg.id}`)
2132
+ .patch(util.serializeArgument(arg))
2133
+ .json(payload => util.deserializeResult(payload))
2134
+ .then(f => f, util.onRejected);
2135
+ }
2136
+ }
2137
+ exports.EventDestinations = EventDestinations;
2138
+ class EventSubscriptions {
2139
+ /** Do not construct this object directly, use the <code>eventSubscriptions</code> property of an <code>Ngrok</code> client object instead. */
2140
+ constructor(httpClient) {
2141
+ this.httpClient = httpClient;
2142
+ }
2143
+ /**
2144
+ * Create an Event Subscription.
2145
+ */
2146
+ create(arg) {
2147
+ return this.httpClient
2148
+ .url(`/event_subscriptions`)
2149
+ .post(util.serializeArgument(arg))
2150
+ .json(payload => util.deserializeResult(payload))
2151
+ .then(f => f, util.onRejected);
2152
+ }
2153
+ /**
2154
+ * Delete an Event Subscription.
2155
+ */
2156
+ delete(arg) {
2157
+ return this.httpClient
2158
+ .url(`/event_subscriptions/${arg.id}`)
2159
+ .delete()
2160
+ .json(payload => util.deserializeResult(payload))
2161
+ .then(f => f, util.onRejected);
2162
+ }
2163
+ /**
2164
+ * Get an Event Subscription by ID.
2165
+ */
2166
+ get(arg) {
2167
+ return this.httpClient
2168
+ .url(`/event_subscriptions/${arg.id}`)
2169
+ .get()
2170
+ .json(payload => util.deserializeResult(payload))
2171
+ .then(f => f, util.onRejected);
2172
+ }
2173
+ /**
2174
+ * List this Account's Event Subscriptions.
2175
+ */
2176
+ list() {
2177
+ var e_14, _a;
2178
+ return __awaiter(this, void 0, void 0, function* () {
2179
+ const array = [];
2180
+ try {
2181
+ for (
2182
+ var _b = __asyncValues(this._asyncList()), _c;
2183
+ (_c = yield _b.next()), !_c.done;
2184
+
2185
+ ) {
2186
+ let item = _c.value;
2187
+ array.push(item);
2188
+ }
2189
+ } catch (e_14_1) {
2190
+ e_14 = { error: e_14_1 };
2191
+ } finally {
2192
+ try {
2193
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2194
+ } finally {
2195
+ if (e_14) throw e_14.error;
2196
+ }
2197
+ }
2198
+ return array;
2199
+ });
2200
+ }
2201
+ _pagedList(arg) {
2202
+ return this.httpClient
2203
+ .url(`/event_subscriptions`)
2204
+ .query(arg)
2205
+ .get()
2206
+ .json(payload => util.deserializeResult(payload))
2207
+ .then(util.onFulfilled, util.onRejected);
2208
+ }
2209
+ _asyncList() {
2210
+ return __asyncGenerator(this, arguments, function* _asyncList_14() {
2211
+ const limit = '100';
2212
+ let nextPage = 'initial loop';
2213
+ let page = { limit: limit };
2214
+ while (nextPage) {
2215
+ const pagedList = yield __await(this._pagedList(page));
2216
+ nextPage = pagedList.nextPageUri;
2217
+ const items = pagedList.eventSubscriptions;
2218
+ if (nextPage) {
2219
+ page = {
2220
+ beforeId: items[items.length - 1].id,
2221
+ limit: limit,
2222
+ };
2223
+ }
2224
+ for (let item of items) {
2225
+ yield yield __await(item);
2226
+ }
2227
+ }
2228
+ });
2229
+ }
2230
+ /**
2231
+ * Update an Event Subscription.
2232
+ */
2233
+ update(arg) {
2234
+ return this.httpClient
2235
+ .url(`/event_subscriptions/${arg.id}`)
2236
+ .patch(util.serializeArgument(arg))
2237
+ .json(payload => util.deserializeResult(payload))
2238
+ .then(f => f, util.onRejected);
2239
+ }
2240
+ }
2241
+ exports.EventSubscriptions = EventSubscriptions;
2242
+ class EventSources {
2243
+ /** Do not construct this object directly, use the <code>eventSources</code> property of an <code>Ngrok</code> client object instead. */
2244
+ constructor(httpClient) {
2245
+ this.httpClient = httpClient;
2246
+ }
2247
+ /**
2248
+ * Add an additional type for which this event subscription will trigger
2249
+ */
2250
+ create(arg) {
2251
+ return this.httpClient
2252
+ .url(`/event_subscriptions/${arg.subscriptionId}/sources`)
2253
+ .post(util.serializeArgument(arg))
2254
+ .json(payload => util.deserializeResult(payload))
2255
+ .then(f => f, util.onRejected);
2256
+ }
2257
+ /**
2258
+ * Remove a type for which this event subscription will trigger
2259
+ */
2260
+ delete(arg) {
2261
+ return this.httpClient
2262
+ .url(`/event_subscriptions/${arg.subscriptionId}/sources/${arg.type}`)
2263
+ .delete()
2264
+ .json(payload => util.deserializeResult(payload))
2265
+ .then(f => f, util.onRejected);
2266
+ }
2267
+ /**
2268
+ * Get the details for a given type that triggers for the given event subscription
2269
+ */
2270
+ get(arg) {
2271
+ return this.httpClient
2272
+ .url(`/event_subscriptions/${arg.subscriptionId}/sources/${arg.type}`)
2273
+ .get()
2274
+ .json(payload => util.deserializeResult(payload))
2275
+ .then(f => f, util.onRejected);
2276
+ }
2277
+ /**
2278
+ * List the types for which this event subscription will trigger
2279
+ */
2280
+ list(arg) {
2281
+ return this.httpClient
2282
+ .url(`/event_subscriptions/${arg.subscriptionId}/sources`)
2283
+ .get()
2284
+ .json(payload => util.deserializeResult(payload))
2285
+ .then(f => f, util.onRejected);
2286
+ }
2287
+ /**
2288
+ * Update the type for which this event subscription will trigger
2289
+ */
2290
+ update(arg) {
2291
+ return this.httpClient
2292
+ .url(`/event_subscriptions/${arg.subscriptionId}/sources/${arg.type}`)
2293
+ .patch(util.serializeArgument(arg))
2294
+ .json(payload => util.deserializeResult(payload))
2295
+ .then(f => f, util.onRejected);
2296
+ }
2297
+ }
2298
+ exports.EventSources = EventSources;
2299
+ /**
2300
+ * IP Policies are reusable groups of CIDR ranges with an `allow` or `deny`
2301
+ action. They can be attached to endpoints via the Endpoint Configuration IP
2302
+ Policy module. They can also be used with IP Restrictions to control source
2303
+ IP ranges that can start tunnel sessions and connect to the API and dashboard.
2304
+ */
2305
+ class IPPolicies {
2306
+ /** Do not construct this object directly, use the <code>ipPolicies</code> property of an <code>Ngrok</code> client object instead. */
2307
+ constructor(httpClient) {
2308
+ this.httpClient = httpClient;
2309
+ }
2310
+ /**
2311
+ * Create a new IP policy. It will not apply to any traffic until you associate to a traffic source via an endpoint configuration or IP restriction.
2312
+ */
2313
+ create(arg) {
2314
+ return this.httpClient
2315
+ .url(`/ip_policies`)
2316
+ .post(util.serializeArgument(arg))
2317
+ .json(payload => util.deserializeResult(payload))
2318
+ .then(f => f, util.onRejected);
2319
+ }
2320
+ /**
2321
+ * Delete an IP policy. If the IP policy is referenced by another object for the purposes of traffic restriction it will be treated as if the IP policy remains but has zero rules.
2322
+ */
2323
+ delete(arg) {
2324
+ return this.httpClient
2325
+ .url(`/ip_policies/${arg.id}`)
2326
+ .delete()
2327
+ .json(payload => util.deserializeResult(payload))
2328
+ .then(f => f, util.onRejected);
2329
+ }
2330
+ /**
2331
+ * Get detailed information about an IP policy by ID.
2332
+ */
2333
+ get(arg) {
2334
+ return this.httpClient
2335
+ .url(`/ip_policies/${arg.id}`)
2336
+ .get()
2337
+ .json(payload => util.deserializeResult(payload))
2338
+ .then(f => f, util.onRejected);
2339
+ }
2340
+ /**
2341
+ * List all IP policies on this account
2342
+ */
2343
+ list() {
2344
+ var e_15, _a;
2345
+ return __awaiter(this, void 0, void 0, function* () {
2346
+ const array = [];
2347
+ try {
2348
+ for (
2349
+ var _b = __asyncValues(this._asyncList()), _c;
2350
+ (_c = yield _b.next()), !_c.done;
2351
+
2352
+ ) {
2353
+ let item = _c.value;
2354
+ array.push(item);
2355
+ }
2356
+ } catch (e_15_1) {
2357
+ e_15 = { error: e_15_1 };
2358
+ } finally {
2359
+ try {
2360
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2361
+ } finally {
2362
+ if (e_15) throw e_15.error;
2363
+ }
2364
+ }
2365
+ return array;
2366
+ });
2367
+ }
2368
+ _pagedList(arg) {
2369
+ return this.httpClient
2370
+ .url(`/ip_policies`)
2371
+ .query(arg)
2372
+ .get()
2373
+ .json(payload => util.deserializeResult(payload))
2374
+ .then(util.onFulfilled, util.onRejected);
2375
+ }
2376
+ _asyncList() {
2377
+ return __asyncGenerator(this, arguments, function* _asyncList_15() {
2378
+ const limit = '100';
2379
+ let nextPage = 'initial loop';
2380
+ let page = { limit: limit };
2381
+ while (nextPage) {
2382
+ const pagedList = yield __await(this._pagedList(page));
2383
+ nextPage = pagedList.nextPageUri;
2384
+ const items = pagedList.ipPolicies;
2385
+ if (nextPage) {
2386
+ page = {
2387
+ beforeId: items[items.length - 1].id,
2388
+ limit: limit,
2389
+ };
2390
+ }
2391
+ for (let item of items) {
2392
+ yield yield __await(item);
2393
+ }
2394
+ }
2395
+ });
2396
+ }
2397
+ /**
2398
+ * Update attributes of an IP policy by ID
2399
+ */
2400
+ update(arg) {
2401
+ return this.httpClient
2402
+ .url(`/ip_policies/${arg.id}`)
2403
+ .patch(util.serializeArgument(arg))
2404
+ .json(payload => util.deserializeResult(payload))
2405
+ .then(f => f, util.onRejected);
2406
+ }
2407
+ }
2408
+ exports.IPPolicies = IPPolicies;
2409
+ /**
2410
+ * IP Policy Rules are the IPv4 or IPv6 CIDRs entries that
2411
+ make up an IP Policy.
2412
+ */
2413
+ class IPPolicyRules {
2414
+ /** Do not construct this object directly, use the <code>ipPolicyRules</code> property of an <code>Ngrok</code> client object instead. */
2415
+ constructor(httpClient) {
2416
+ this.httpClient = httpClient;
2417
+ }
2418
+ /**
2419
+ * Create a new IP policy rule attached to an IP Policy.
2420
+ */
2421
+ create(arg) {
2422
+ return this.httpClient
2423
+ .url(`/ip_policy_rules`)
2424
+ .post(util.serializeArgument(arg))
2425
+ .json(payload => util.deserializeResult(payload))
2426
+ .then(f => f, util.onRejected);
2427
+ }
2428
+ /**
2429
+ * Delete an IP policy rule.
2430
+ */
2431
+ delete(arg) {
2432
+ return this.httpClient
2433
+ .url(`/ip_policy_rules/${arg.id}`)
2434
+ .delete()
2435
+ .json(payload => util.deserializeResult(payload))
2436
+ .then(f => f, util.onRejected);
2437
+ }
2438
+ /**
2439
+ * Get detailed information about an IP policy rule by ID.
2440
+ */
2441
+ get(arg) {
2442
+ return this.httpClient
2443
+ .url(`/ip_policy_rules/${arg.id}`)
2444
+ .get()
2445
+ .json(payload => util.deserializeResult(payload))
2446
+ .then(f => f, util.onRejected);
2447
+ }
2448
+ /**
2449
+ * List all IP policy rules on this account
2450
+ */
2451
+ list() {
2452
+ var e_16, _a;
2453
+ return __awaiter(this, void 0, void 0, function* () {
2454
+ const array = [];
2455
+ try {
2456
+ for (
2457
+ var _b = __asyncValues(this._asyncList()), _c;
2458
+ (_c = yield _b.next()), !_c.done;
2459
+
2460
+ ) {
2461
+ let item = _c.value;
2462
+ array.push(item);
2463
+ }
2464
+ } catch (e_16_1) {
2465
+ e_16 = { error: e_16_1 };
2466
+ } finally {
2467
+ try {
2468
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2469
+ } finally {
2470
+ if (e_16) throw e_16.error;
2471
+ }
2472
+ }
2473
+ return array;
2474
+ });
2475
+ }
2476
+ _pagedList(arg) {
1675
2477
  return this.httpClient
1676
- .url(`/endpoint_configurations/${arg.id}/oauth`)
2478
+ .url(`/ip_policy_rules`)
2479
+ .query(arg)
1677
2480
  .get()
1678
2481
  .json(payload => util.deserializeResult(payload))
1679
- .then(f => f, util.onRejected);
2482
+ .then(util.onFulfilled, util.onRejected);
1680
2483
  }
1681
- delete(arg) {
2484
+ _asyncList() {
2485
+ return __asyncGenerator(this, arguments, function* _asyncList_16() {
2486
+ const limit = '100';
2487
+ let nextPage = 'initial loop';
2488
+ let page = { limit: limit };
2489
+ while (nextPage) {
2490
+ const pagedList = yield __await(this._pagedList(page));
2491
+ nextPage = pagedList.nextPageUri;
2492
+ const items = pagedList.ipPolicyRules;
2493
+ if (nextPage) {
2494
+ page = {
2495
+ beforeId: items[items.length - 1].id,
2496
+ limit: limit,
2497
+ };
2498
+ }
2499
+ for (let item of items) {
2500
+ yield yield __await(item);
2501
+ }
2502
+ }
2503
+ });
2504
+ }
2505
+ /**
2506
+ * Update attributes of an IP policy rule by ID
2507
+ */
2508
+ update(arg) {
1682
2509
  return this.httpClient
1683
- .url(`/endpoint_configurations/${arg.id}/oauth`)
1684
- .delete()
2510
+ .url(`/ip_policy_rules/${arg.id}`)
2511
+ .patch(util.serializeArgument(arg))
1685
2512
  .json(payload => util.deserializeResult(payload))
1686
2513
  .then(f => f, util.onRejected);
1687
2514
  }
1688
2515
  }
1689
- exports.EndpointOAuthModule = EndpointOAuthModule;
1690
- class EndpointWebhookValidationModule {
1691
- /** Do not construct this object directly, use the <code>endpointWebhookValidationModule</code> property of an <code>Ngrok</code> client object instead. */
2516
+ exports.IPPolicyRules = IPPolicyRules;
2517
+ /**
2518
+ * An IP restriction is a restriction placed on the CIDRs that are allowed to
2519
+ initiate traffic to a specific aspect of your ngrok account. An IP
2520
+ restriction has a type which defines the ingress it applies to. IP
2521
+ restrictions can be used to enforce the source IPs that can make API
2522
+ requests, log in to the dashboard, start ngrok agents, and connect to your
2523
+ public-facing endpoints.
2524
+ */
2525
+ class IPRestrictions {
2526
+ /** Do not construct this object directly, use the <code>ipRestrictions</code> property of an <code>Ngrok</code> client object instead. */
1692
2527
  constructor(httpClient) {
1693
2528
  this.httpClient = httpClient;
1694
2529
  }
1695
- replace(arg) {
1696
- return this.httpClient
1697
- .url(`/endpoint_configurations/${arg.id}/webhook_validation`)
1698
- .put(util.serializeArgument(arg))
1699
- .json(payload => util.deserializeResult(payload))
1700
- .then(f => f, util.onRejected);
1701
- }
1702
- get(arg) {
2530
+ /**
2531
+ * Create a new IP restriction
2532
+ */
2533
+ create(arg) {
1703
2534
  return this.httpClient
1704
- .url(`/endpoint_configurations/${arg.id}/webhook_validation`)
1705
- .get()
2535
+ .url(`/ip_restrictions`)
2536
+ .post(util.serializeArgument(arg))
1706
2537
  .json(payload => util.deserializeResult(payload))
1707
2538
  .then(f => f, util.onRejected);
1708
2539
  }
2540
+ /**
2541
+ * Delete an IP restriction
2542
+ */
1709
2543
  delete(arg) {
1710
2544
  return this.httpClient
1711
- .url(`/endpoint_configurations/${arg.id}/webhook_validation`)
2545
+ .url(`/ip_restrictions/${arg.id}`)
1712
2546
  .delete()
1713
2547
  .json(payload => util.deserializeResult(payload))
1714
2548
  .then(f => f, util.onRejected);
1715
2549
  }
1716
- }
1717
- exports.EndpointWebhookValidationModule = EndpointWebhookValidationModule;
1718
- class EndpointSAMLModule {
1719
- /** Do not construct this object directly, use the <code>endpointSamlModule</code> property of an <code>Ngrok</code> client object instead. */
1720
- constructor(httpClient) {
1721
- this.httpClient = httpClient;
1722
- }
1723
- replace(arg) {
1724
- return this.httpClient
1725
- .url(`/endpoint_configurations/${arg.id}/saml`)
1726
- .put(util.serializeArgument(arg))
1727
- .json(payload => util.deserializeResult(payload))
1728
- .then(f => f, util.onRejected);
1729
- }
2550
+ /**
2551
+ * Get detailed information about an IP restriction
2552
+ */
1730
2553
  get(arg) {
1731
2554
  return this.httpClient
1732
- .url(`/endpoint_configurations/${arg.id}/saml`)
2555
+ .url(`/ip_restrictions/${arg.id}`)
1733
2556
  .get()
1734
2557
  .json(payload => util.deserializeResult(payload))
1735
2558
  .then(f => f, util.onRejected);
1736
2559
  }
1737
- delete(arg) {
1738
- return this.httpClient
1739
- .url(`/endpoint_configurations/${arg.id}/saml`)
1740
- .delete()
1741
- .json(payload => util.deserializeResult(payload))
1742
- .then(f => f, util.onRejected);
1743
- }
1744
- }
1745
- exports.EndpointSAMLModule = EndpointSAMLModule;
1746
- class EndpointOIDCModule {
1747
- /** Do not construct this object directly, use the <code>endpointOidcModule</code> property of an <code>Ngrok</code> client object instead. */
1748
- constructor(httpClient) {
1749
- this.httpClient = httpClient;
1750
- }
1751
- replace(arg) {
1752
- return this.httpClient
1753
- .url(`/endpoint_configurations/${arg.id}/oidc`)
1754
- .put(util.serializeArgument(arg))
1755
- .json(payload => util.deserializeResult(payload))
1756
- .then(f => f, util.onRejected);
2560
+ /**
2561
+ * List all IP restrictions on this account
2562
+ */
2563
+ list() {
2564
+ var e_17, _a;
2565
+ return __awaiter(this, void 0, void 0, function* () {
2566
+ const array = [];
2567
+ try {
2568
+ for (
2569
+ var _b = __asyncValues(this._asyncList()), _c;
2570
+ (_c = yield _b.next()), !_c.done;
2571
+
2572
+ ) {
2573
+ let item = _c.value;
2574
+ array.push(item);
2575
+ }
2576
+ } catch (e_17_1) {
2577
+ e_17 = { error: e_17_1 };
2578
+ } finally {
2579
+ try {
2580
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2581
+ } finally {
2582
+ if (e_17) throw e_17.error;
2583
+ }
2584
+ }
2585
+ return array;
2586
+ });
1757
2587
  }
1758
- get(arg) {
2588
+ _pagedList(arg) {
1759
2589
  return this.httpClient
1760
- .url(`/endpoint_configurations/${arg.id}/oidc`)
2590
+ .url(`/ip_restrictions`)
2591
+ .query(arg)
1761
2592
  .get()
1762
2593
  .json(payload => util.deserializeResult(payload))
1763
- .then(f => f, util.onRejected);
2594
+ .then(util.onFulfilled, util.onRejected);
1764
2595
  }
1765
- delete(arg) {
2596
+ _asyncList() {
2597
+ return __asyncGenerator(this, arguments, function* _asyncList_17() {
2598
+ const limit = '100';
2599
+ let nextPage = 'initial loop';
2600
+ let page = { limit: limit };
2601
+ while (nextPage) {
2602
+ const pagedList = yield __await(this._pagedList(page));
2603
+ nextPage = pagedList.nextPageUri;
2604
+ const items = pagedList.ipRestrictions;
2605
+ if (nextPage) {
2606
+ page = {
2607
+ beforeId: items[items.length - 1].id,
2608
+ limit: limit,
2609
+ };
2610
+ }
2611
+ for (let item of items) {
2612
+ yield yield __await(item);
2613
+ }
2614
+ }
2615
+ });
2616
+ }
2617
+ /**
2618
+ * Update attributes of an IP restriction by ID
2619
+ */
2620
+ update(arg) {
1766
2621
  return this.httpClient
1767
- .url(`/endpoint_configurations/${arg.id}/oidc`)
1768
- .delete()
2622
+ .url(`/ip_restrictions/${arg.id}`)
2623
+ .patch(util.serializeArgument(arg))
1769
2624
  .json(payload => util.deserializeResult(payload))
1770
2625
  .then(f => f, util.onRejected);
1771
2626
  }
1772
2627
  }
1773
- exports.EndpointOIDCModule = EndpointOIDCModule;
2628
+ exports.IPRestrictions = IPRestrictions;
1774
2629
  /**
1775
2630
  * Reserved Addresses are TCP addresses that can be used to listen for traffic.
1776
2631
  TCP address hostnames and ports are assigned by ngrok, they cannot be
@@ -1815,7 +2670,7 @@ class ReservedAddrs {
1815
2670
  * List all reserved addresses on this account.
1816
2671
  */
1817
2672
  list() {
1818
- var e_12, _a;
2673
+ var e_18, _a;
1819
2674
  return __awaiter(this, void 0, void 0, function* () {
1820
2675
  const array = [];
1821
2676
  try {
@@ -1827,13 +2682,13 @@ class ReservedAddrs {
1827
2682
  let item = _c.value;
1828
2683
  array.push(item);
1829
2684
  }
1830
- } catch (e_12_1) {
1831
- e_12 = { error: e_12_1 };
2685
+ } catch (e_18_1) {
2686
+ e_18 = { error: e_18_1 };
1832
2687
  } finally {
1833
2688
  try {
1834
2689
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
1835
2690
  } finally {
1836
- if (e_12) throw e_12.error;
2691
+ if (e_18) throw e_18.error;
1837
2692
  }
1838
2693
  }
1839
2694
  return array;
@@ -1848,7 +2703,7 @@ class ReservedAddrs {
1848
2703
  .then(util.onFulfilled, util.onRejected);
1849
2704
  }
1850
2705
  _asyncList() {
1851
- return __asyncGenerator(this, arguments, function* _asyncList_12() {
2706
+ return __asyncGenerator(this, arguments, function* _asyncList_18() {
1852
2707
  const limit = '100';
1853
2708
  let nextPage = 'initial loop';
1854
2709
  let page = { limit: limit };
@@ -1878,16 +2733,6 @@ class ReservedAddrs {
1878
2733
  .json(payload => util.deserializeResult(payload))
1879
2734
  .then(f => f, util.onRejected);
1880
2735
  }
1881
- /**
1882
- * Detach the endpoint configuration attached to a reserved address.
1883
- */
1884
- deleteEndpointConfig(arg) {
1885
- return this.httpClient
1886
- .url(`/reserved_addrs/${arg.id}/endpoint_configuration`)
1887
- .delete()
1888
- .json(payload => util.deserializeResult(payload))
1889
- .then(f => f, util.onRejected);
1890
- }
1891
2736
  }
1892
2737
  exports.ReservedAddrs = ReservedAddrs;
1893
2738
  /**
@@ -1935,7 +2780,7 @@ class ReservedDomains {
1935
2780
  * List all reserved domains on this account.
1936
2781
  */
1937
2782
  list() {
1938
- var e_13, _a;
2783
+ var e_19, _a;
1939
2784
  return __awaiter(this, void 0, void 0, function* () {
1940
2785
  const array = [];
1941
2786
  try {
@@ -1947,13 +2792,13 @@ class ReservedDomains {
1947
2792
  let item = _c.value;
1948
2793
  array.push(item);
1949
2794
  }
1950
- } catch (e_13_1) {
1951
- e_13 = { error: e_13_1 };
2795
+ } catch (e_19_1) {
2796
+ e_19 = { error: e_19_1 };
1952
2797
  } finally {
1953
2798
  try {
1954
2799
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
1955
2800
  } finally {
1956
- if (e_13) throw e_13.error;
2801
+ if (e_19) throw e_19.error;
1957
2802
  }
1958
2803
  }
1959
2804
  return array;
@@ -1968,7 +2813,7 @@ class ReservedDomains {
1968
2813
  .then(util.onFulfilled, util.onRejected);
1969
2814
  }
1970
2815
  _asyncList() {
1971
- return __asyncGenerator(this, arguments, function* _asyncList_13() {
2816
+ return __asyncGenerator(this, arguments, function* _asyncList_19() {
1972
2817
  const limit = '100';
1973
2818
  let nextPage = 'initial loop';
1974
2819
  let page = { limit: limit };
@@ -2018,26 +2863,6 @@ class ReservedDomains {
2018
2863
  .json(payload => util.deserializeResult(payload))
2019
2864
  .then(f => f, util.onRejected);
2020
2865
  }
2021
- /**
2022
- * Detach the http endpoint configuration attached to a reserved domain.
2023
- */
2024
- deleteHttpEndpointConfig(arg) {
2025
- return this.httpClient
2026
- .url(`/reserved_domains/${arg.id}/http_endpoint_configuration`)
2027
- .delete()
2028
- .json(payload => util.deserializeResult(payload))
2029
- .then(f => f, util.onRejected);
2030
- }
2031
- /**
2032
- * Detach the https endpoint configuration attached to a reserved domain.
2033
- */
2034
- deleteHttpsEndpointConfig(arg) {
2035
- return this.httpClient
2036
- .url(`/reserved_domains/${arg.id}/https_endpoint_configuration`)
2037
- .delete()
2038
- .json(payload => util.deserializeResult(payload))
2039
- .then(f => f, util.onRejected);
2040
- }
2041
2866
  }
2042
2867
  exports.ReservedDomains = ReservedDomains;
2043
2868
  /**
@@ -2083,7 +2908,7 @@ class SSHCertificateAuthorities {
2083
2908
  * List all SSH Certificate Authorities on this account
2084
2909
  */
2085
2910
  list() {
2086
- var e_14, _a;
2911
+ var e_20, _a;
2087
2912
  return __awaiter(this, void 0, void 0, function* () {
2088
2913
  const array = [];
2089
2914
  try {
@@ -2095,13 +2920,13 @@ class SSHCertificateAuthorities {
2095
2920
  let item = _c.value;
2096
2921
  array.push(item);
2097
2922
  }
2098
- } catch (e_14_1) {
2099
- e_14 = { error: e_14_1 };
2923
+ } catch (e_20_1) {
2924
+ e_20 = { error: e_20_1 };
2100
2925
  } finally {
2101
2926
  try {
2102
2927
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2103
2928
  } finally {
2104
- if (e_14) throw e_14.error;
2929
+ if (e_20) throw e_20.error;
2105
2930
  }
2106
2931
  }
2107
2932
  return array;
@@ -2116,7 +2941,7 @@ class SSHCertificateAuthorities {
2116
2941
  .then(util.onFulfilled, util.onRejected);
2117
2942
  }
2118
2943
  _asyncList() {
2119
- return __asyncGenerator(this, arguments, function* _asyncList_14() {
2944
+ return __asyncGenerator(this, arguments, function* _asyncList_20() {
2120
2945
  const limit = '100';
2121
2946
  let nextPage = 'initial loop';
2122
2947
  let page = { limit: limit };
@@ -2191,7 +3016,7 @@ class SSHCredentials {
2191
3016
  * List all ssh credentials on this account
2192
3017
  */
2193
3018
  list() {
2194
- var e_15, _a;
3019
+ var e_21, _a;
2195
3020
  return __awaiter(this, void 0, void 0, function* () {
2196
3021
  const array = [];
2197
3022
  try {
@@ -2203,13 +3028,13 @@ class SSHCredentials {
2203
3028
  let item = _c.value;
2204
3029
  array.push(item);
2205
3030
  }
2206
- } catch (e_15_1) {
2207
- e_15 = { error: e_15_1 };
3031
+ } catch (e_21_1) {
3032
+ e_21 = { error: e_21_1 };
2208
3033
  } finally {
2209
3034
  try {
2210
3035
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2211
3036
  } finally {
2212
- if (e_15) throw e_15.error;
3037
+ if (e_21) throw e_21.error;
2213
3038
  }
2214
3039
  }
2215
3040
  return array;
@@ -2224,7 +3049,7 @@ class SSHCredentials {
2224
3049
  .then(util.onFulfilled, util.onRejected);
2225
3050
  }
2226
3051
  _asyncList() {
2227
- return __asyncGenerator(this, arguments, function* _asyncList_15() {
3052
+ return __asyncGenerator(this, arguments, function* _asyncList_21() {
2228
3053
  const limit = '100';
2229
3054
  let nextPage = 'initial loop';
2230
3055
  let page = { limit: limit };
@@ -2300,7 +3125,7 @@ class SSHHostCertificates {
2300
3125
  * List all SSH Host Certificates issued on this account
2301
3126
  */
2302
3127
  list() {
2303
- var e_16, _a;
3128
+ var e_22, _a;
2304
3129
  return __awaiter(this, void 0, void 0, function* () {
2305
3130
  const array = [];
2306
3131
  try {
@@ -2312,13 +3137,13 @@ class SSHHostCertificates {
2312
3137
  let item = _c.value;
2313
3138
  array.push(item);
2314
3139
  }
2315
- } catch (e_16_1) {
2316
- e_16 = { error: e_16_1 };
3140
+ } catch (e_22_1) {
3141
+ e_22 = { error: e_22_1 };
2317
3142
  } finally {
2318
3143
  try {
2319
3144
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2320
3145
  } finally {
2321
- if (e_16) throw e_16.error;
3146
+ if (e_22) throw e_22.error;
2322
3147
  }
2323
3148
  }
2324
3149
  return array;
@@ -2333,7 +3158,7 @@ class SSHHostCertificates {
2333
3158
  .then(util.onFulfilled, util.onRejected);
2334
3159
  }
2335
3160
  _asyncList() {
2336
- return __asyncGenerator(this, arguments, function* _asyncList_16() {
3161
+ return __asyncGenerator(this, arguments, function* _asyncList_22() {
2337
3162
  const limit = '100';
2338
3163
  let nextPage = 'initial loop';
2339
3164
  let page = { limit: limit };
@@ -2409,7 +3234,7 @@ class SSHUserCertificates {
2409
3234
  * List all SSH User Certificates issued on this account
2410
3235
  */
2411
3236
  list() {
2412
- var e_17, _a;
3237
+ var e_23, _a;
2413
3238
  return __awaiter(this, void 0, void 0, function* () {
2414
3239
  const array = [];
2415
3240
  try {
@@ -2421,13 +3246,13 @@ class SSHUserCertificates {
2421
3246
  let item = _c.value;
2422
3247
  array.push(item);
2423
3248
  }
2424
- } catch (e_17_1) {
2425
- e_17 = { error: e_17_1 };
3249
+ } catch (e_23_1) {
3250
+ e_23 = { error: e_23_1 };
2426
3251
  } finally {
2427
3252
  try {
2428
3253
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2429
3254
  } finally {
2430
- if (e_17) throw e_17.error;
3255
+ if (e_23) throw e_23.error;
2431
3256
  }
2432
3257
  }
2433
3258
  return array;
@@ -2442,7 +3267,7 @@ class SSHUserCertificates {
2442
3267
  .then(util.onFulfilled, util.onRejected);
2443
3268
  }
2444
3269
  _asyncList() {
2445
- return __asyncGenerator(this, arguments, function* _asyncList_17() {
3270
+ return __asyncGenerator(this, arguments, function* _asyncList_23() {
2446
3271
  const limit = '100';
2447
3272
  let nextPage = 'initial loop';
2448
3273
  let page = { limit: limit };
@@ -2520,7 +3345,7 @@ class TLSCertificates {
2520
3345
  * List all TLS certificates on this account
2521
3346
  */
2522
3347
  list() {
2523
- var e_18, _a;
3348
+ var e_24, _a;
2524
3349
  return __awaiter(this, void 0, void 0, function* () {
2525
3350
  const array = [];
2526
3351
  try {
@@ -2532,13 +3357,13 @@ class TLSCertificates {
2532
3357
  let item = _c.value;
2533
3358
  array.push(item);
2534
3359
  }
2535
- } catch (e_18_1) {
2536
- e_18 = { error: e_18_1 };
3360
+ } catch (e_24_1) {
3361
+ e_24 = { error: e_24_1 };
2537
3362
  } finally {
2538
3363
  try {
2539
3364
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2540
3365
  } finally {
2541
- if (e_18) throw e_18.error;
3366
+ if (e_24) throw e_24.error;
2542
3367
  }
2543
3368
  }
2544
3369
  return array;
@@ -2553,7 +3378,7 @@ class TLSCertificates {
2553
3378
  .then(util.onFulfilled, util.onRejected);
2554
3379
  }
2555
3380
  _asyncList() {
2556
- return __asyncGenerator(this, arguments, function* _asyncList_18() {
3381
+ return __asyncGenerator(this, arguments, function* _asyncList_24() {
2557
3382
  const limit = '100';
2558
3383
  let nextPage = 'initial loop';
2559
3384
  let page = { limit: limit };
@@ -2599,7 +3424,7 @@ class TunnelSessions {
2599
3424
  * List all online tunnel sessions running on this account.
2600
3425
  */
2601
3426
  list() {
2602
- var e_19, _a;
3427
+ var e_25, _a;
2603
3428
  return __awaiter(this, void 0, void 0, function* () {
2604
3429
  const array = [];
2605
3430
  try {
@@ -2611,13 +3436,13 @@ class TunnelSessions {
2611
3436
  let item = _c.value;
2612
3437
  array.push(item);
2613
3438
  }
2614
- } catch (e_19_1) {
2615
- e_19 = { error: e_19_1 };
3439
+ } catch (e_25_1) {
3440
+ e_25 = { error: e_25_1 };
2616
3441
  } finally {
2617
3442
  try {
2618
3443
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2619
3444
  } finally {
2620
- if (e_19) throw e_19.error;
3445
+ if (e_25) throw e_25.error;
2621
3446
  }
2622
3447
  }
2623
3448
  return array;
@@ -2632,7 +3457,7 @@ class TunnelSessions {
2632
3457
  .then(util.onFulfilled, util.onRejected);
2633
3458
  }
2634
3459
  _asyncList() {
2635
- return __asyncGenerator(this, arguments, function* _asyncList_19() {
3460
+ return __asyncGenerator(this, arguments, function* _asyncList_25() {
2636
3461
  const limit = '100';
2637
3462
  let nextPage = 'initial loop';
2638
3463
  let page = { limit: limit };
@@ -2707,7 +3532,7 @@ class Tunnels {
2707
3532
  * List all online tunnels currently running on the account.
2708
3533
  */
2709
3534
  list() {
2710
- var e_20, _a;
3535
+ var e_26, _a;
2711
3536
  return __awaiter(this, void 0, void 0, function* () {
2712
3537
  const array = [];
2713
3538
  try {
@@ -2719,13 +3544,13 @@ class Tunnels {
2719
3544
  let item = _c.value;
2720
3545
  array.push(item);
2721
3546
  }
2722
- } catch (e_20_1) {
2723
- e_20 = { error: e_20_1 };
3547
+ } catch (e_26_1) {
3548
+ e_26 = { error: e_26_1 };
2724
3549
  } finally {
2725
3550
  try {
2726
3551
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
2727
3552
  } finally {
2728
- if (e_20) throw e_20.error;
3553
+ if (e_26) throw e_26.error;
2729
3554
  }
2730
3555
  }
2731
3556
  return array;
@@ -2740,7 +3565,7 @@ class Tunnels {
2740
3565
  .then(util.onFulfilled, util.onRejected);
2741
3566
  }
2742
3567
  _asyncList() {
2743
- return __asyncGenerator(this, arguments, function* _asyncList_20() {
3568
+ return __asyncGenerator(this, arguments, function* _asyncList_26() {
2744
3569
  const limit = '100';
2745
3570
  let nextPage = 'initial loop';
2746
3571
  let page = { limit: limit };
@@ -2760,6 +3585,16 @@ class Tunnels {
2760
3585
  }
2761
3586
  });
2762
3587
  }
3588
+ /**
3589
+ * Get the status of a tunnel by ID
3590
+ */
3591
+ get(arg) {
3592
+ return this.httpClient
3593
+ .url(`/tunnels/${arg.id}`)
3594
+ .get()
3595
+ .json(payload => util.deserializeResult(payload))
3596
+ .then(f => f, util.onRejected);
3597
+ }
2763
3598
  }
2764
3599
  exports.Tunnels = Tunnels;
2765
3600
  //# sourceMappingURL=services.js.map