@ngrok/ngrok-api 0.2.0 → 0.3.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 (190) hide show
  1. package/docs/CNAME +1 -0
  2. package/docs/assets/js/search.js +1 -1
  3. package/docs/classes/client.Ngrok.html +37 -43
  4. package/docs/classes/services.APIKeys.html +9 -9
  5. package/docs/classes/services.AbuseReports.html +6 -6
  6. package/docs/classes/{services.IPWhitelist.html → services.AgentIngresses.html} +61 -69
  7. package/docs/classes/services.CertificateAuthorities.html +9 -9
  8. package/docs/classes/services.Credentials.html +9 -9
  9. package/docs/classes/services.EndpointCircuitBreakerModule.html +7 -7
  10. package/docs/classes/services.EndpointCompressionModule.html +7 -7
  11. package/docs/classes/services.EndpointConfigurations.html +9 -9
  12. package/docs/classes/services.EndpointIPPolicyModule.html +7 -7
  13. package/docs/classes/services.EndpointLoggingModule.html +7 -7
  14. package/docs/classes/services.EndpointMutualTLSModule.html +7 -7
  15. package/docs/classes/services.EndpointOAuthModule.html +7 -7
  16. package/docs/classes/services.EndpointOIDCModule.html +7 -7
  17. package/docs/classes/services.EndpointRequestHeadersModule.html +7 -7
  18. package/docs/classes/services.EndpointResponseHeadersModule.html +7 -7
  19. package/docs/classes/services.EndpointSAMLModule.html +7 -7
  20. package/docs/classes/services.EndpointTLSTerminationModule.html +7 -7
  21. package/docs/classes/services.EndpointWebhookValidationModule.html +7 -7
  22. package/docs/classes/services.EventDestinations.html +9 -9
  23. package/docs/classes/services.EventSources.html +9 -9
  24. package/docs/classes/services.EventStreams.html +9 -9
  25. package/docs/classes/services.EventSubscriptions.html +9 -9
  26. package/docs/classes/services.IPPolicies.html +9 -9
  27. package/docs/classes/services.IPPolicyRules.html +9 -9
  28. package/docs/classes/services.IPRestrictions.html +9 -9
  29. package/docs/classes/services.ReservedAddrs.html +10 -10
  30. package/docs/classes/services.ReservedDomains.html +13 -13
  31. package/docs/classes/services.SSHCertificateAuthorities.html +9 -9
  32. package/docs/classes/services.SSHCredentials.html +9 -9
  33. package/docs/classes/services.SSHHostCertificates.html +9 -9
  34. package/docs/classes/services.SSHUserCertificates.html +9 -9
  35. package/docs/classes/services.TLSCertificates.html +9 -9
  36. package/docs/classes/services.TunnelSessions.html +9 -9
  37. package/docs/classes/services.Tunnels.html +5 -5
  38. package/docs/interfaces/client.NgrokConfig.html +2 -2
  39. package/docs/interfaces/datatypes.APIKey.html +6 -6
  40. package/docs/interfaces/datatypes.APIKeyCreate.html +2 -2
  41. package/docs/interfaces/datatypes.APIKeyList.html +3 -3
  42. package/docs/interfaces/datatypes.APIKeyUpdate.html +3 -3
  43. package/docs/interfaces/datatypes.AWSAuth.html +2 -2
  44. package/docs/interfaces/datatypes.AWSCredentials.html +2 -2
  45. package/docs/interfaces/datatypes.AWSRole.html +1 -1
  46. package/docs/interfaces/datatypes.AbuseReport.html +7 -7
  47. package/docs/interfaces/datatypes.AbuseReportCreate.html +2 -2
  48. package/docs/interfaces/datatypes.AbuseReportHostname.html +2 -2
  49. package/docs/interfaces/{datatypes.IPWhitelistEntry.html → datatypes.AgentIngress.html} +73 -35
  50. package/docs/interfaces/{datatypes.IPWhitelistEntryCreate.html → datatypes.AgentIngressCreate.html} +20 -20
  51. package/docs/interfaces/{datatypes.IPWhitelistEntryList.html → datatypes.AgentIngressList.html} +26 -26
  52. package/docs/interfaces/{datatypes.IPWhitelistEntryUpdate.html → datatypes.AgentIngressUpdate.html} +16 -16
  53. package/docs/interfaces/datatypes.CertificateAuthority.html +11 -11
  54. package/docs/interfaces/datatypes.CertificateAuthorityCreate.html +3 -3
  55. package/docs/interfaces/datatypes.CertificateAuthorityList.html +3 -3
  56. package/docs/interfaces/datatypes.CertificateAuthorityUpdate.html +3 -3
  57. package/docs/interfaces/datatypes.Credential.html +7 -7
  58. package/docs/interfaces/datatypes.CredentialCreate.html +3 -3
  59. package/docs/interfaces/datatypes.CredentialList.html +3 -3
  60. package/docs/interfaces/datatypes.CredentialUpdate.html +4 -4
  61. package/docs/interfaces/datatypes.EndpointCircuitBreaker.html +6 -6
  62. package/docs/interfaces/datatypes.EndpointCircuitBreakerReplace.html +2 -2
  63. package/docs/interfaces/datatypes.EndpointCompression.html +1 -1
  64. package/docs/interfaces/datatypes.EndpointCompressionReplace.html +2 -2
  65. package/docs/interfaces/datatypes.EndpointConfiguration.html +18 -18
  66. package/docs/interfaces/datatypes.EndpointConfigurationCreate.html +15 -15
  67. package/docs/interfaces/datatypes.EndpointConfigurationList.html +3 -3
  68. package/docs/interfaces/datatypes.EndpointConfigurationUpdate.html +15 -15
  69. package/docs/interfaces/datatypes.EndpointIPPolicy.html +2 -2
  70. package/docs/interfaces/datatypes.EndpointIPPolicyMutate.html +2 -2
  71. package/docs/interfaces/datatypes.EndpointIPPolicyReplace.html +2 -2
  72. package/docs/interfaces/datatypes.EndpointLogging.html +2 -2
  73. package/docs/interfaces/datatypes.EndpointLoggingMutate.html +2 -2
  74. package/docs/interfaces/datatypes.EndpointLoggingReplace.html +2 -2
  75. package/docs/interfaces/datatypes.EndpointMutualTLS.html +2 -2
  76. package/docs/interfaces/datatypes.EndpointMutualTLSMutate.html +2 -2
  77. package/docs/interfaces/datatypes.EndpointMutualTLSReplace.html +2 -2
  78. package/docs/interfaces/datatypes.EndpointOAuth.html +7 -7
  79. package/docs/interfaces/datatypes.EndpointOAuthFacebook.html +5 -5
  80. package/docs/interfaces/datatypes.EndpointOAuthGitHub.html +7 -7
  81. package/docs/interfaces/datatypes.EndpointOAuthGoogle.html +5 -5
  82. package/docs/interfaces/datatypes.EndpointOAuthMicrosoft.html +5 -5
  83. package/docs/interfaces/datatypes.EndpointOAuthProvider.html +4 -4
  84. package/docs/interfaces/datatypes.EndpointOAuthReplace.html +2 -2
  85. package/docs/interfaces/datatypes.EndpointOIDC.html +9 -9
  86. package/docs/interfaces/datatypes.EndpointOIDCReplace.html +2 -2
  87. package/docs/interfaces/datatypes.EndpointRequestHeaders.html +3 -3
  88. package/docs/interfaces/datatypes.EndpointRequestHeadersReplace.html +2 -2
  89. package/docs/interfaces/datatypes.EndpointResponseHeaders.html +3 -3
  90. package/docs/interfaces/datatypes.EndpointResponseHeadersReplace.html +2 -2
  91. package/docs/interfaces/datatypes.EndpointSAML.html +33 -14
  92. package/docs/interfaces/datatypes.EndpointSAMLMutate.html +28 -9
  93. package/docs/interfaces/datatypes.EndpointSAMLReplace.html +2 -2
  94. package/docs/interfaces/datatypes.EndpointTLSTermination.html +3 -3
  95. package/docs/interfaces/datatypes.EndpointTLSTerminationReplace.html +2 -2
  96. package/docs/interfaces/datatypes.EndpointWebhookValidation.html +4 -4
  97. package/docs/interfaces/datatypes.EndpointWebhookValidationReplace.html +2 -2
  98. package/docs/interfaces/datatypes.Error.html +4 -4
  99. package/docs/interfaces/datatypes.EventDestination.html +7 -7
  100. package/docs/interfaces/datatypes.EventDestinationCreate.html +4 -4
  101. package/docs/interfaces/datatypes.EventDestinationList.html +3 -3
  102. package/docs/interfaces/datatypes.EventDestinationUpdate.html +5 -5
  103. package/docs/interfaces/datatypes.EventSource.html +2 -2
  104. package/docs/interfaces/datatypes.EventSourceCreate.html +2 -2
  105. package/docs/interfaces/datatypes.EventSourceItem.html +2 -2
  106. package/docs/interfaces/datatypes.EventSourceList.html +2 -2
  107. package/docs/interfaces/datatypes.EventSourcePaging.html +1 -1
  108. package/docs/interfaces/datatypes.EventSourceReplace.html +1 -1
  109. package/docs/interfaces/datatypes.EventSourceUpdate.html +2 -2
  110. package/docs/interfaces/datatypes.EventStream.html +9 -9
  111. package/docs/interfaces/datatypes.EventStreamCreate.html +6 -6
  112. package/docs/interfaces/datatypes.EventStreamList.html +3 -3
  113. package/docs/interfaces/datatypes.EventStreamUpdate.html +6 -6
  114. package/docs/interfaces/datatypes.EventSubscription.html +7 -7
  115. package/docs/interfaces/datatypes.EventSubscriptionCreate.html +4 -4
  116. package/docs/interfaces/datatypes.EventSubscriptionList.html +3 -3
  117. package/docs/interfaces/datatypes.EventSubscriptionUpdate.html +5 -5
  118. package/docs/interfaces/datatypes.EventTarget.html +3 -3
  119. package/docs/interfaces/datatypes.EventTargetCloudwatchLogs.html +2 -2
  120. package/docs/interfaces/datatypes.EventTargetFirehose.html +2 -2
  121. package/docs/interfaces/datatypes.EventTargetKinesis.html +2 -2
  122. package/docs/interfaces/datatypes.IPPolicy.html +6 -6
  123. package/docs/interfaces/datatypes.IPPolicyCreate.html +3 -3
  124. package/docs/interfaces/datatypes.IPPolicyList.html +3 -3
  125. package/docs/interfaces/datatypes.IPPolicyRule.html +7 -7
  126. package/docs/interfaces/datatypes.IPPolicyRuleCreate.html +4 -4
  127. package/docs/interfaces/datatypes.IPPolicyRuleList.html +3 -3
  128. package/docs/interfaces/datatypes.IPPolicyRuleUpdate.html +4 -4
  129. package/docs/interfaces/datatypes.IPPolicyUpdate.html +3 -3
  130. package/docs/interfaces/datatypes.IPRestriction.html +8 -8
  131. package/docs/interfaces/datatypes.IPRestrictionCreate.html +5 -5
  132. package/docs/interfaces/datatypes.IPRestrictionList.html +3 -3
  133. package/docs/interfaces/datatypes.IPRestrictionUpdate.html +5 -5
  134. package/docs/interfaces/datatypes.Item.html +1 -1
  135. package/docs/interfaces/datatypes.Paging.html +2 -2
  136. package/docs/interfaces/datatypes.Ref.html +2 -2
  137. package/docs/interfaces/datatypes.ReservedAddr.html +8 -8
  138. package/docs/interfaces/datatypes.ReservedAddrCreate.html +5 -5
  139. package/docs/interfaces/datatypes.ReservedAddrList.html +3 -3
  140. package/docs/interfaces/datatypes.ReservedAddrUpdate.html +4 -4
  141. package/docs/interfaces/datatypes.ReservedDomain.html +32 -13
  142. package/docs/interfaces/datatypes.ReservedDomainCertJob.html +4 -23
  143. package/docs/interfaces/datatypes.ReservedDomainCertPolicy.html +2 -2
  144. package/docs/interfaces/datatypes.ReservedDomainCertStatus.html +2 -2
  145. package/docs/interfaces/datatypes.ReservedDomainCreate.html +8 -8
  146. package/docs/interfaces/datatypes.ReservedDomainList.html +3 -3
  147. package/docs/interfaces/datatypes.ReservedDomainUpdate.html +7 -7
  148. package/docs/interfaces/datatypes.SSHCertificateAuthority.html +7 -7
  149. package/docs/interfaces/datatypes.SSHCertificateAuthorityCreate.html +5 -5
  150. package/docs/interfaces/datatypes.SSHCertificateAuthorityList.html +3 -3
  151. package/docs/interfaces/datatypes.SSHCertificateAuthorityUpdate.html +3 -3
  152. package/docs/interfaces/datatypes.SSHCredential.html +7 -7
  153. package/docs/interfaces/datatypes.SSHCredentialCreate.html +4 -4
  154. package/docs/interfaces/datatypes.SSHCredentialList.html +3 -3
  155. package/docs/interfaces/datatypes.SSHCredentialUpdate.html +4 -4
  156. package/docs/interfaces/datatypes.SSHHostCertificate.html +12 -12
  157. package/docs/interfaces/datatypes.SSHHostCertificateCreate.html +7 -7
  158. package/docs/interfaces/datatypes.SSHHostCertificateList.html +3 -3
  159. package/docs/interfaces/datatypes.SSHHostCertificateUpdate.html +3 -3
  160. package/docs/interfaces/datatypes.SSHUserCertificate.html +14 -14
  161. package/docs/interfaces/datatypes.SSHUserCertificateCreate.html +9 -9
  162. package/docs/interfaces/datatypes.SSHUserCertificateList.html +3 -3
  163. package/docs/interfaces/datatypes.SSHUserCertificateUpdate.html +3 -3
  164. package/docs/interfaces/datatypes.TLSCertificate.html +21 -21
  165. package/docs/interfaces/datatypes.TLSCertificateCreate.html +4 -4
  166. package/docs/interfaces/datatypes.TLSCertificateList.html +3 -3
  167. package/docs/interfaces/datatypes.TLSCertificateSANs.html +2 -2
  168. package/docs/interfaces/datatypes.TLSCertificateUpdate.html +3 -3
  169. package/docs/interfaces/datatypes.Tunnel.html +7 -7
  170. package/docs/interfaces/datatypes.TunnelList.html +3 -3
  171. package/docs/interfaces/datatypes.TunnelSession.html +10 -10
  172. package/docs/interfaces/datatypes.TunnelSessionList.html +3 -3
  173. package/docs/interfaces/datatypes.TunnelSessionsUpdate.html +1 -1
  174. package/docs/modules/datatypes.html +16 -20
  175. package/docs/modules/services.html +4 -4
  176. package/lib/client.d.ts +1 -5
  177. package/lib/client.d.ts.map +1 -1
  178. package/lib/client.js +3 -4
  179. package/lib/client.js.map +1 -1
  180. package/lib/datatypes.d.ts +49 -47
  181. package/lib/datatypes.d.ts.map +1 -1
  182. package/lib/services.d.ts +27 -31
  183. package/lib/services.d.ts.map +1 -1
  184. package/lib/services.js +155 -159
  185. package/lib/services.js.map +1 -1
  186. package/package.json +1 -1
  187. package/src/client.ts +3 -7
  188. package/src/datatypes.ts +53 -52
  189. package/src/services.ts +98 -102
  190. package/docs/interfaces/datatypes.ReservedDomainCertNSTarget.html +0 -186
package/lib/services.js CHANGED
@@ -141,7 +141,6 @@ exports.Tunnels =
141
141
  exports.EndpointCompressionModule =
142
142
  exports.EndpointCircuitBreakerModule =
143
143
  exports.EndpointLoggingModule =
144
- exports.IPWhitelist =
145
144
  exports.IPRestrictions =
146
145
  exports.IPPolicyRules =
147
146
  exports.IPPolicies =
@@ -153,6 +152,7 @@ exports.Tunnels =
153
152
  exports.Credentials =
154
153
  exports.CertificateAuthorities =
155
154
  exports.APIKeys =
155
+ exports.AgentIngresses =
156
156
  exports.AbuseReports =
157
157
  void 0;
158
158
  const util = require('./util');
@@ -187,6 +187,110 @@ class AbuseReports {
187
187
  }
188
188
  }
189
189
  exports.AbuseReports = AbuseReports;
190
+ class AgentIngresses {
191
+ /** Do not construct this object directly, use the <code>agentIngresses</code> property of an <code>Ngrok</code> client object instead. */
192
+ constructor(httpClient) {
193
+ this.httpClient = httpClient;
194
+ }
195
+ /**
196
+ * 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.
197
+ */
198
+ create(arg) {
199
+ return this.httpClient
200
+ .url(`/agent_ingresses`)
201
+ .post(util.serializeArgument(arg))
202
+ .json(payload => util.deserializeResult(payload))
203
+ .then(f => f, util.onRejected);
204
+ }
205
+ /**
206
+ * Delete an Agent Ingress by ID
207
+ */
208
+ delete(arg) {
209
+ return this.httpClient
210
+ .url(`/agent_ingresses/${arg.id}`)
211
+ .delete()
212
+ .json(payload => util.deserializeResult(payload))
213
+ .then(f => f, util.onRejected);
214
+ }
215
+ /**
216
+ * Get the details of an Agent Ingress by ID.
217
+ */
218
+ get(arg) {
219
+ return this.httpClient
220
+ .url(`/agent_ingresses/${arg.id}`)
221
+ .get()
222
+ .json(payload => util.deserializeResult(payload))
223
+ .then(f => f, util.onRejected);
224
+ }
225
+ /**
226
+ * List all Agent Ingresses owned by this account
227
+ */
228
+ list() {
229
+ var e_1, _a;
230
+ return __awaiter(this, void 0, void 0, function* () {
231
+ const array = [];
232
+ try {
233
+ for (
234
+ var _b = __asyncValues(this._asyncList()), _c;
235
+ (_c = yield _b.next()), !_c.done;
236
+
237
+ ) {
238
+ let item = _c.value;
239
+ array.push(item);
240
+ }
241
+ } catch (e_1_1) {
242
+ e_1 = { error: e_1_1 };
243
+ } finally {
244
+ try {
245
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
246
+ } finally {
247
+ if (e_1) throw e_1.error;
248
+ }
249
+ }
250
+ return array;
251
+ });
252
+ }
253
+ _pagedList(arg) {
254
+ return this.httpClient
255
+ .url(`/agent_ingresses`)
256
+ .query(arg)
257
+ .get()
258
+ .json(payload => util.deserializeResult(payload))
259
+ .then(util.onFulfilled, util.onRejected);
260
+ }
261
+ _asyncList() {
262
+ return __asyncGenerator(this, arguments, function* _asyncList_1() {
263
+ const limit = '100';
264
+ let nextPage = 'initial loop';
265
+ let page = { limit: limit };
266
+ while (nextPage) {
267
+ const pagedList = yield __await(this._pagedList(page));
268
+ nextPage = pagedList.nextPageUri;
269
+ const items = pagedList.ingresses;
270
+ if (nextPage) {
271
+ page = {
272
+ beforeId: items[items.length - 1].id,
273
+ limit: limit,
274
+ };
275
+ }
276
+ for (let item of items) {
277
+ yield yield __await(item);
278
+ }
279
+ }
280
+ });
281
+ }
282
+ /**
283
+ * Update attributes of an Agent Ingress by ID.
284
+ */
285
+ update(arg) {
286
+ return this.httpClient
287
+ .url(`/agent_ingresses/${arg.id}`)
288
+ .patch(util.serializeArgument(arg))
289
+ .json(payload => util.deserializeResult(payload))
290
+ .then(f => f, util.onRejected);
291
+ }
292
+ }
293
+ exports.AgentIngresses = AgentIngresses;
190
294
  /**
191
295
  * API Keys are used to authenticate to the [ngrok
192
296
  API](https://ngrok.com/docs/api#authentication). You may use the API itself
@@ -233,7 +337,7 @@ class APIKeys {
233
337
  * List all API keys owned by this account
234
338
  */
235
339
  list() {
236
- var e_1, _a;
340
+ var e_2, _a;
237
341
  return __awaiter(this, void 0, void 0, function* () {
238
342
  const array = [];
239
343
  try {
@@ -245,13 +349,13 @@ class APIKeys {
245
349
  let item = _c.value;
246
350
  array.push(item);
247
351
  }
248
- } catch (e_1_1) {
249
- e_1 = { error: e_1_1 };
352
+ } catch (e_2_1) {
353
+ e_2 = { error: e_2_1 };
250
354
  } finally {
251
355
  try {
252
356
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
253
357
  } finally {
254
- if (e_1) throw e_1.error;
358
+ if (e_2) throw e_2.error;
255
359
  }
256
360
  }
257
361
  return array;
@@ -266,7 +370,7 @@ class APIKeys {
266
370
  .then(util.onFulfilled, util.onRejected);
267
371
  }
268
372
  _asyncList() {
269
- return __asyncGenerator(this, arguments, function* _asyncList_1() {
373
+ return __asyncGenerator(this, arguments, function* _asyncList_2() {
270
374
  const limit = '100';
271
375
  let nextPage = 'initial loop';
272
376
  let page = { limit: limit };
@@ -344,7 +448,7 @@ class CertificateAuthorities {
344
448
  * List all Certificate Authority on this account
345
449
  */
346
450
  list() {
347
- var e_2, _a;
451
+ var e_3, _a;
348
452
  return __awaiter(this, void 0, void 0, function* () {
349
453
  const array = [];
350
454
  try {
@@ -356,13 +460,13 @@ class CertificateAuthorities {
356
460
  let item = _c.value;
357
461
  array.push(item);
358
462
  }
359
- } catch (e_2_1) {
360
- e_2 = { error: e_2_1 };
463
+ } catch (e_3_1) {
464
+ e_3 = { error: e_3_1 };
361
465
  } finally {
362
466
  try {
363
467
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
364
468
  } finally {
365
- if (e_2) throw e_2.error;
469
+ if (e_3) throw e_3.error;
366
470
  }
367
471
  }
368
472
  return array;
@@ -377,7 +481,7 @@ class CertificateAuthorities {
377
481
  .then(util.onFulfilled, util.onRejected);
378
482
  }
379
483
  _asyncList() {
380
- return __asyncGenerator(this, arguments, function* _asyncList_2() {
484
+ return __asyncGenerator(this, arguments, function* _asyncList_3() {
381
485
  const limit = '100';
382
486
  let nextPage = 'initial loop';
383
487
  let page = { limit: limit };
@@ -454,7 +558,7 @@ class Credentials {
454
558
  * List all tunnel authtoken credentials on this account
455
559
  */
456
560
  list() {
457
- var e_3, _a;
561
+ var e_4, _a;
458
562
  return __awaiter(this, void 0, void 0, function* () {
459
563
  const array = [];
460
564
  try {
@@ -466,13 +570,13 @@ class Credentials {
466
570
  let item = _c.value;
467
571
  array.push(item);
468
572
  }
469
- } catch (e_3_1) {
470
- e_3 = { error: e_3_1 };
573
+ } catch (e_4_1) {
574
+ e_4 = { error: e_4_1 };
471
575
  } finally {
472
576
  try {
473
577
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
474
578
  } finally {
475
- if (e_3) throw e_3.error;
579
+ if (e_4) throw e_4.error;
476
580
  }
477
581
  }
478
582
  return array;
@@ -487,7 +591,7 @@ class Credentials {
487
591
  .then(util.onFulfilled, util.onRejected);
488
592
  }
489
593
  _asyncList() {
490
- return __asyncGenerator(this, arguments, function* _asyncList_3() {
594
+ return __asyncGenerator(this, arguments, function* _asyncList_4() {
491
595
  const limit = '100';
492
596
  let nextPage = 'initial loop';
493
597
  let page = { limit: limit };
@@ -563,7 +667,7 @@ class EndpointConfigurations {
563
667
  * Returns a list of all endpoint configurations on this account
564
668
  */
565
669
  list() {
566
- var e_4, _a;
670
+ var e_5, _a;
567
671
  return __awaiter(this, void 0, void 0, function* () {
568
672
  const array = [];
569
673
  try {
@@ -575,13 +679,13 @@ class EndpointConfigurations {
575
679
  let item = _c.value;
576
680
  array.push(item);
577
681
  }
578
- } catch (e_4_1) {
579
- e_4 = { error: e_4_1 };
682
+ } catch (e_5_1) {
683
+ e_5 = { error: e_5_1 };
580
684
  } finally {
581
685
  try {
582
686
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
583
687
  } finally {
584
- if (e_4) throw e_4.error;
688
+ if (e_5) throw e_5.error;
585
689
  }
586
690
  }
587
691
  return array;
@@ -596,7 +700,7 @@ class EndpointConfigurations {
596
700
  .then(util.onFulfilled, util.onRejected);
597
701
  }
598
702
  _asyncList() {
599
- return __asyncGenerator(this, arguments, function* _asyncList_4() {
703
+ return __asyncGenerator(this, arguments, function* _asyncList_5() {
600
704
  const limit = '100';
601
705
  let nextPage = 'initial loop';
602
706
  let page = { limit: limit };
@@ -667,7 +771,7 @@ class EventStreams {
667
771
  * List all Event Streams available on this account.
668
772
  */
669
773
  list() {
670
- var e_5, _a;
774
+ var e_6, _a;
671
775
  return __awaiter(this, void 0, void 0, function* () {
672
776
  const array = [];
673
777
  try {
@@ -679,13 +783,13 @@ class EventStreams {
679
783
  let item = _c.value;
680
784
  array.push(item);
681
785
  }
682
- } catch (e_5_1) {
683
- e_5 = { error: e_5_1 };
786
+ } catch (e_6_1) {
787
+ e_6 = { error: e_6_1 };
684
788
  } finally {
685
789
  try {
686
790
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
687
791
  } finally {
688
- if (e_5) throw e_5.error;
792
+ if (e_6) throw e_6.error;
689
793
  }
690
794
  }
691
795
  return array;
@@ -700,7 +804,7 @@ class EventStreams {
700
804
  .then(util.onFulfilled, util.onRejected);
701
805
  }
702
806
  _asyncList() {
703
- return __asyncGenerator(this, arguments, function* _asyncList_5() {
807
+ return __asyncGenerator(this, arguments, function* _asyncList_6() {
704
808
  const limit = '100';
705
809
  let nextPage = 'initial loop';
706
810
  let page = { limit: limit };
@@ -771,7 +875,7 @@ class EventDestinations {
771
875
  * List all Event Destinations on this account.
772
876
  */
773
877
  list() {
774
- var e_6, _a;
878
+ var e_7, _a;
775
879
  return __awaiter(this, void 0, void 0, function* () {
776
880
  const array = [];
777
881
  try {
@@ -783,13 +887,13 @@ class EventDestinations {
783
887
  let item = _c.value;
784
888
  array.push(item);
785
889
  }
786
- } catch (e_6_1) {
787
- e_6 = { error: e_6_1 };
890
+ } catch (e_7_1) {
891
+ e_7 = { error: e_7_1 };
788
892
  } finally {
789
893
  try {
790
894
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
791
895
  } finally {
792
- if (e_6) throw e_6.error;
896
+ if (e_7) throw e_7.error;
793
897
  }
794
898
  }
795
899
  return array;
@@ -804,7 +908,7 @@ class EventDestinations {
804
908
  .then(util.onFulfilled, util.onRejected);
805
909
  }
806
910
  _asyncList() {
807
- return __asyncGenerator(this, arguments, function* _asyncList_6() {
911
+ return __asyncGenerator(this, arguments, function* _asyncList_7() {
808
912
  const limit = '100';
809
913
  let nextPage = 'initial loop';
810
914
  let page = { limit: limit };
@@ -875,7 +979,7 @@ class EventSubscriptions {
875
979
  * List this Account's Event Subscriptions.
876
980
  */
877
981
  list() {
878
- var e_7, _a;
982
+ var e_8, _a;
879
983
  return __awaiter(this, void 0, void 0, function* () {
880
984
  const array = [];
881
985
  try {
@@ -887,13 +991,13 @@ class EventSubscriptions {
887
991
  let item = _c.value;
888
992
  array.push(item);
889
993
  }
890
- } catch (e_7_1) {
891
- e_7 = { error: e_7_1 };
994
+ } catch (e_8_1) {
995
+ e_8 = { error: e_8_1 };
892
996
  } finally {
893
997
  try {
894
998
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
895
999
  } finally {
896
- if (e_7) throw e_7.error;
1000
+ if (e_8) throw e_8.error;
897
1001
  }
898
1002
  }
899
1003
  return array;
@@ -908,7 +1012,7 @@ class EventSubscriptions {
908
1012
  .then(util.onFulfilled, util.onRejected);
909
1013
  }
910
1014
  _asyncList() {
911
- return __asyncGenerator(this, arguments, function* _asyncList_7() {
1015
+ return __asyncGenerator(this, arguments, function* _asyncList_8() {
912
1016
  const limit = '100';
913
1017
  let nextPage = 'initial loop';
914
1018
  let page = { limit: limit };
@@ -1042,7 +1146,7 @@ class IPPolicies {
1042
1146
  * List all IP policies on this account
1043
1147
  */
1044
1148
  list() {
1045
- var e_8, _a;
1149
+ var e_9, _a;
1046
1150
  return __awaiter(this, void 0, void 0, function* () {
1047
1151
  const array = [];
1048
1152
  try {
@@ -1054,13 +1158,13 @@ class IPPolicies {
1054
1158
  let item = _c.value;
1055
1159
  array.push(item);
1056
1160
  }
1057
- } catch (e_8_1) {
1058
- e_8 = { error: e_8_1 };
1161
+ } catch (e_9_1) {
1162
+ e_9 = { error: e_9_1 };
1059
1163
  } finally {
1060
1164
  try {
1061
1165
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
1062
1166
  } finally {
1063
- if (e_8) throw e_8.error;
1167
+ if (e_9) throw e_9.error;
1064
1168
  }
1065
1169
  }
1066
1170
  return array;
@@ -1075,7 +1179,7 @@ class IPPolicies {
1075
1179
  .then(util.onFulfilled, util.onRejected);
1076
1180
  }
1077
1181
  _asyncList() {
1078
- return __asyncGenerator(this, arguments, function* _asyncList_8() {
1182
+ return __asyncGenerator(this, arguments, function* _asyncList_9() {
1079
1183
  const limit = '100';
1080
1184
  let nextPage = 'initial loop';
1081
1185
  let page = { limit: limit };
@@ -1150,7 +1254,7 @@ class IPPolicyRules {
1150
1254
  * List all IP policy rules on this account
1151
1255
  */
1152
1256
  list() {
1153
- var e_9, _a;
1257
+ var e_10, _a;
1154
1258
  return __awaiter(this, void 0, void 0, function* () {
1155
1259
  const array = [];
1156
1260
  try {
@@ -1162,13 +1266,13 @@ class IPPolicyRules {
1162
1266
  let item = _c.value;
1163
1267
  array.push(item);
1164
1268
  }
1165
- } catch (e_9_1) {
1166
- e_9 = { error: e_9_1 };
1269
+ } catch (e_10_1) {
1270
+ e_10 = { error: e_10_1 };
1167
1271
  } finally {
1168
1272
  try {
1169
1273
  if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
1170
1274
  } finally {
1171
- if (e_9) throw e_9.error;
1275
+ if (e_10) throw e_10.error;
1172
1276
  }
1173
1277
  }
1174
1278
  return array;
@@ -1183,7 +1287,7 @@ class IPPolicyRules {
1183
1287
  .then(util.onFulfilled, util.onRejected);
1184
1288
  }
1185
1289
  _asyncList() {
1186
- return __asyncGenerator(this, arguments, function* _asyncList_9() {
1290
+ return __asyncGenerator(this, arguments, function* _asyncList_10() {
1187
1291
  const limit = '100';
1188
1292
  let nextPage = 'initial loop';
1189
1293
  let page = { limit: limit };
@@ -1261,114 +1365,6 @@ class IPRestrictions {
1261
1365
  /**
1262
1366
  * List all IP restrictions on this account
1263
1367
  */
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) {
1290
- return this.httpClient
1291
- .url(`/ip_restrictions`)
1292
- .query(arg)
1293
- .get()
1294
- .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
- });
1317
- }
1318
- /**
1319
- * Update attributes of an IP restriction by ID
1320
- */
1321
- update(arg) {
1322
- return this.httpClient
1323
- .url(`/ip_restrictions/${arg.id}`)
1324
- .patch(util.serializeArgument(arg))
1325
- .json(payload => util.deserializeResult(payload))
1326
- .then(f => f, util.onRejected);
1327
- }
1328
- }
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. */
1336
- constructor(httpClient) {
1337
- this.httpClient = httpClient;
1338
- }
1339
- /**
1340
- * Create a new IP whitelist entry that will restrict traffic to all tunnel endpoints on the account.
1341
- */
1342
- create(arg) {
1343
- return this.httpClient
1344
- .url(`/ip_whitelist`)
1345
- .post(util.serializeArgument(arg))
1346
- .json(payload => util.deserializeResult(payload))
1347
- .then(f => f, util.onRejected);
1348
- }
1349
- /**
1350
- * Delete an IP whitelist entry.
1351
- */
1352
- delete(arg) {
1353
- return this.httpClient
1354
- .url(`/ip_whitelist/${arg.id}`)
1355
- .delete()
1356
- .json(payload => util.deserializeResult(payload))
1357
- .then(f => f, util.onRejected);
1358
- }
1359
- /**
1360
- * Get detailed information about an IP whitelist entry by ID.
1361
- */
1362
- get(arg) {
1363
- return this.httpClient
1364
- .url(`/ip_whitelist/${arg.id}`)
1365
- .get()
1366
- .json(payload => util.deserializeResult(payload))
1367
- .then(f => f, util.onRejected);
1368
- }
1369
- /**
1370
- * List all IP whitelist entries on this account
1371
- */
1372
1368
  list() {
1373
1369
  var e_11, _a;
1374
1370
  return __awaiter(this, void 0, void 0, function* () {
@@ -1396,7 +1392,7 @@ class IPWhitelist {
1396
1392
  }
1397
1393
  _pagedList(arg) {
1398
1394
  return this.httpClient
1399
- .url(`/ip_whitelist`)
1395
+ .url(`/ip_restrictions`)
1400
1396
  .query(arg)
1401
1397
  .get()
1402
1398
  .json(payload => util.deserializeResult(payload))
@@ -1410,7 +1406,7 @@ class IPWhitelist {
1410
1406
  while (nextPage) {
1411
1407
  const pagedList = yield __await(this._pagedList(page));
1412
1408
  nextPage = pagedList.nextPageUri;
1413
- const items = pagedList.whitelist;
1409
+ const items = pagedList.ipRestrictions;
1414
1410
  if (nextPage) {
1415
1411
  page = {
1416
1412
  beforeId: items[items.length - 1].id,
@@ -1424,17 +1420,17 @@ class IPWhitelist {
1424
1420
  });
1425
1421
  }
1426
1422
  /**
1427
- * Update attributes of an IP whitelist entry by ID
1423
+ * Update attributes of an IP restriction by ID
1428
1424
  */
1429
1425
  update(arg) {
1430
1426
  return this.httpClient
1431
- .url(`/ip_whitelist/${arg.id}`)
1427
+ .url(`/ip_restrictions/${arg.id}`)
1432
1428
  .patch(util.serializeArgument(arg))
1433
1429
  .json(payload => util.deserializeResult(payload))
1434
1430
  .then(f => f, util.onRejected);
1435
1431
  }
1436
1432
  }
1437
- exports.IPWhitelist = IPWhitelist;
1433
+ exports.IPRestrictions = IPRestrictions;
1438
1434
  class EndpointLoggingModule {
1439
1435
  /** Do not construct this object directly, use the <code>endpointLoggingModule</code> property of an <code>Ngrok</code> client object instead. */
1440
1436
  constructor(httpClient) {