@ngrok/ngrok-api 0.9.0 → 0.11.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 (293) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc.js +2 -0
  3. package/.prettierrc.js +2 -0
  4. package/CHANGELOG.md +16 -3
  5. package/CODE_OF_CONDUCT.md +45 -0
  6. package/README.md +9 -3
  7. package/docs/assets/js/search.js +1 -1
  8. package/docs/classes/client.Ngrok.html +82 -28
  9. package/docs/classes/services.APIKeys.html +20 -11
  10. package/docs/classes/services.AbuseReports.html +5 -5
  11. package/docs/classes/services.AgentIngresses.html +20 -11
  12. package/docs/classes/services.ApplicationSessions.html +288 -0
  13. package/docs/classes/services.ApplicationUsers.html +288 -0
  14. package/docs/classes/services.BotUsers.html +352 -0
  15. package/docs/classes/services.CertificateAuthorities.html +20 -11
  16. package/docs/classes/services.Credentials.html +21 -12
  17. package/docs/classes/services.EdgeRouteBackendModule.html +4 -4
  18. package/docs/classes/services.EdgeRouteCircuitBreakerModule.html +4 -4
  19. package/docs/classes/services.EdgeRouteCompressionModule.html +4 -4
  20. package/docs/classes/services.EdgeRouteIPRestrictionModule.html +4 -4
  21. package/docs/classes/services.EdgeRouteOAuthModule.html +4 -4
  22. package/docs/classes/services.EdgeRouteOIDCModule.html +4 -4
  23. package/docs/classes/services.EdgeRoutePolicyModule.html +270 -0
  24. package/docs/classes/services.EdgeRouteRequestHeadersModule.html +4 -4
  25. package/docs/classes/services.EdgeRouteResponseHeadersModule.html +4 -4
  26. package/docs/classes/services.EdgeRouteSAMLModule.html +4 -4
  27. package/docs/classes/services.EdgeRouteUserAgentFilterModule.html +270 -0
  28. package/docs/classes/services.EdgeRouteWebhookVerificationModule.html +4 -4
  29. package/docs/classes/services.EdgeRouteWebsocketTCPConverterModule.html +4 -4
  30. package/docs/classes/services.EdgesHTTPS.html +20 -11
  31. package/docs/classes/services.EdgesHTTPSRoutes.html +5 -5
  32. package/docs/classes/services.EdgesTCP.html +20 -11
  33. package/docs/classes/services.EdgesTLS.html +20 -11
  34. package/docs/classes/services.Endpoints.html +15 -6
  35. package/docs/classes/services.EventDestinations.html +21 -12
  36. package/docs/classes/services.EventSources.html +6 -6
  37. package/docs/classes/services.EventSubscriptions.html +20 -11
  38. package/docs/classes/services.FailoverBackends.html +20 -11
  39. package/docs/classes/services.HTTPResponseBackends.html +20 -11
  40. package/docs/classes/services.HTTPSEdgeMutualTLSModule.html +8 -8
  41. package/docs/classes/services.HTTPSEdgeTLSTerminationModule.html +8 -8
  42. package/docs/classes/services.IPPolicies.html +20 -11
  43. package/docs/classes/services.IPPolicyRules.html +20 -11
  44. package/docs/classes/services.IPRestrictions.html +20 -11
  45. package/docs/classes/services.ReservedAddrs.html +20 -11
  46. package/docs/classes/services.ReservedDomains.html +26 -17
  47. package/docs/classes/services.SSHCertificateAuthorities.html +20 -11
  48. package/docs/classes/services.SSHCredentials.html +20 -11
  49. package/docs/classes/services.SSHHostCertificates.html +20 -11
  50. package/docs/classes/services.SSHUserCertificates.html +20 -11
  51. package/docs/classes/services.StaticBackends.html +360 -0
  52. package/docs/classes/services.TCPEdgeBackendModule.html +8 -8
  53. package/docs/classes/services.TCPEdgeIPRestrictionModule.html +8 -8
  54. package/docs/classes/services.TCPEdgePolicyModule.html +270 -0
  55. package/docs/classes/services.TLSCertificates.html +20 -11
  56. package/docs/classes/services.TLSEdgeBackendModule.html +8 -8
  57. package/docs/classes/services.TLSEdgeIPRestrictionModule.html +8 -8
  58. package/docs/classes/services.TLSEdgeMutualTLSModule.html +8 -8
  59. package/docs/classes/services.TLSEdgePolicyModule.html +270 -0
  60. package/docs/classes/services.TLSEdgeTLSTerminationModule.html +8 -8
  61. package/docs/classes/services.TunnelGroupBackends.html +20 -11
  62. package/docs/classes/services.TunnelSessions.html +22 -13
  63. package/docs/classes/services.Tunnels.html +15 -6
  64. package/docs/classes/services.WeightedBackends.html +20 -11
  65. package/docs/index.html +8 -3
  66. package/docs/interfaces/client.NgrokConfig.html +3 -3
  67. package/docs/interfaces/datatypes.APIKey.html +28 -9
  68. package/docs/interfaces/datatypes.APIKeyCreate.html +23 -4
  69. package/docs/interfaces/datatypes.APIKeyList.html +3 -3
  70. package/docs/interfaces/datatypes.APIKeyUpdate.html +3 -3
  71. package/docs/interfaces/datatypes.AWSAuth.html +2 -2
  72. package/docs/interfaces/datatypes.AWSCredentials.html +2 -2
  73. package/docs/interfaces/datatypes.AWSRole.html +1 -1
  74. package/docs/interfaces/datatypes.AbuseReport.html +9 -9
  75. package/docs/interfaces/datatypes.AbuseReportCreate.html +3 -3
  76. package/docs/interfaces/datatypes.AbuseReportHostname.html +2 -2
  77. package/docs/interfaces/datatypes.AgentIngress.html +49 -11
  78. package/docs/interfaces/datatypes.AgentIngressCertJob.html +224 -0
  79. package/docs/interfaces/datatypes.AgentIngressCertPolicy.html +186 -0
  80. package/docs/interfaces/datatypes.AgentIngressCertStatus.html +186 -0
  81. package/docs/interfaces/datatypes.AgentIngressCreate.html +24 -5
  82. package/docs/interfaces/datatypes.AgentIngressList.html +3 -3
  83. package/docs/interfaces/datatypes.AgentIngressUpdate.html +22 -3
  84. package/docs/interfaces/datatypes.ApplicationSession.html +357 -0
  85. package/docs/interfaces/datatypes.ApplicationSessionList.html +205 -0
  86. package/docs/interfaces/datatypes.ApplicationUser.html +338 -0
  87. package/docs/interfaces/datatypes.ApplicationUserList.html +205 -0
  88. package/docs/interfaces/datatypes.BotUser.html +243 -0
  89. package/docs/interfaces/datatypes.BotUserCreate.html +186 -0
  90. package/docs/interfaces/datatypes.BotUserList.html +205 -0
  91. package/docs/interfaces/datatypes.BotUserUpdate.html +200 -0
  92. package/docs/interfaces/datatypes.BrowserSession.html +205 -0
  93. package/docs/interfaces/datatypes.CertificateAuthority.html +16 -16
  94. package/docs/interfaces/datatypes.CertificateAuthorityCreate.html +5 -5
  95. package/docs/interfaces/datatypes.CertificateAuthorityList.html +3 -3
  96. package/docs/interfaces/datatypes.CertificateAuthorityUpdate.html +3 -3
  97. package/docs/interfaces/datatypes.Credential.html +30 -11
  98. package/docs/interfaces/datatypes.CredentialCreate.html +25 -6
  99. package/docs/interfaces/datatypes.CredentialList.html +3 -3
  100. package/docs/interfaces/datatypes.CredentialUpdate.html +5 -5
  101. package/docs/interfaces/datatypes.EdgeBackendReplace.html +2 -2
  102. package/docs/interfaces/datatypes.EdgeIPRestrictionReplace.html +2 -2
  103. package/docs/interfaces/datatypes.EdgeMutualTLSReplace.html +2 -2
  104. package/docs/interfaces/datatypes.EdgePolicyReplace.html +176 -0
  105. package/docs/interfaces/datatypes.EdgeRouteBackendReplace.html +3 -3
  106. package/docs/interfaces/datatypes.EdgeRouteCircuitBreakerReplace.html +3 -3
  107. package/docs/interfaces/datatypes.EdgeRouteCompressionReplace.html +3 -3
  108. package/docs/interfaces/datatypes.EdgeRouteIPRestrictionReplace.html +3 -3
  109. package/docs/interfaces/datatypes.EdgeRouteItem.html +2 -2
  110. package/docs/interfaces/datatypes.EdgeRouteOAuthReplace.html +3 -3
  111. package/docs/interfaces/datatypes.EdgeRouteOIDCReplace.html +3 -3
  112. package/docs/interfaces/datatypes.EdgeRoutePolicyReplace.html +190 -0
  113. package/docs/interfaces/datatypes.EdgeRouteRequestHeadersReplace.html +3 -3
  114. package/docs/interfaces/datatypes.EdgeRouteResponseHeadersReplace.html +3 -3
  115. package/docs/interfaces/datatypes.EdgeRouteSAMLReplace.html +3 -3
  116. package/docs/interfaces/datatypes.EdgeRouteUserAgentFilterReplace.html +190 -0
  117. package/docs/interfaces/datatypes.EdgeRouteWebhookVerificationReplace.html +3 -3
  118. package/docs/interfaces/datatypes.EdgeRouteWebsocketTCPConverterReplace.html +3 -3
  119. package/docs/interfaces/datatypes.EdgeTLSTerminationAtEdgeReplace.html +2 -2
  120. package/docs/interfaces/datatypes.EdgeTLSTerminationReplace.html +2 -2
  121. package/docs/interfaces/datatypes.Endpoint.html +19 -19
  122. package/docs/interfaces/datatypes.EndpointAction.html +186 -0
  123. package/docs/interfaces/datatypes.EndpointBackend.html +2 -2
  124. package/docs/interfaces/datatypes.EndpointBackendMutate.html +2 -2
  125. package/docs/interfaces/datatypes.EndpointCircuitBreaker.html +6 -6
  126. package/docs/interfaces/datatypes.EndpointCompression.html +1 -1
  127. package/docs/interfaces/datatypes.EndpointIPPolicy.html +7 -2
  128. package/docs/interfaces/datatypes.EndpointIPPolicyMutate.html +2 -2
  129. package/docs/interfaces/datatypes.EndpointList.html +3 -3
  130. package/docs/interfaces/datatypes.EndpointMutualTLS.html +2 -2
  131. package/docs/interfaces/datatypes.EndpointMutualTLSMutate.html +2 -2
  132. package/docs/interfaces/datatypes.EndpointOAuth.html +7 -7
  133. package/docs/interfaces/datatypes.EndpointOAuthAmazon.html +218 -0
  134. package/docs/interfaces/datatypes.EndpointOAuthFacebook.html +5 -5
  135. package/docs/interfaces/datatypes.EndpointOAuthGitHub.html +12 -12
  136. package/docs/interfaces/datatypes.EndpointOAuthGitLab.html +218 -0
  137. package/docs/interfaces/datatypes.EndpointOAuthGoogle.html +5 -5
  138. package/docs/interfaces/datatypes.EndpointOAuthLinkedIn.html +218 -0
  139. package/docs/interfaces/datatypes.EndpointOAuthMicrosoft.html +5 -5
  140. package/docs/interfaces/datatypes.EndpointOAuthProvider.html +80 -4
  141. package/docs/interfaces/datatypes.EndpointOAuthTwitch.html +218 -0
  142. package/docs/interfaces/datatypes.EndpointOIDC.html +9 -9
  143. package/docs/interfaces/datatypes.EndpointPolicy.html +205 -0
  144. package/docs/interfaces/datatypes.EndpointRequestHeaders.html +3 -3
  145. package/docs/interfaces/datatypes.EndpointResponseHeaders.html +3 -3
  146. package/docs/interfaces/datatypes.EndpointRule.html +205 -0
  147. package/docs/interfaces/datatypes.EndpointSAML.html +15 -15
  148. package/docs/interfaces/datatypes.EndpointSAMLMutate.html +10 -10
  149. package/docs/interfaces/datatypes.EndpointTLSTermination.html +3 -3
  150. package/docs/interfaces/datatypes.EndpointTLSTerminationAtEdge.html +2 -2
  151. package/docs/interfaces/datatypes.EndpointUserAgentFilter.html +190 -0
  152. package/docs/interfaces/datatypes.EndpointWebhookValidation.html +4 -4
  153. package/docs/interfaces/datatypes.EndpointWebsocketTCPConverter.html +1 -1
  154. package/docs/interfaces/datatypes.Error.html +4 -4
  155. package/docs/interfaces/datatypes.EventDestination.html +10 -10
  156. package/docs/interfaces/datatypes.EventDestinationCreate.html +6 -6
  157. package/docs/interfaces/datatypes.EventDestinationList.html +3 -3
  158. package/docs/interfaces/datatypes.EventDestinationUpdate.html +5 -5
  159. package/docs/interfaces/datatypes.EventSource.html +2 -2
  160. package/docs/interfaces/datatypes.EventSourceCreate.html +2 -2
  161. package/docs/interfaces/datatypes.EventSourceItem.html +2 -2
  162. package/docs/interfaces/datatypes.EventSourceList.html +2 -2
  163. package/docs/interfaces/datatypes.EventSourcePaging.html +1 -1
  164. package/docs/interfaces/datatypes.EventSourceReplace.html +1 -1
  165. package/docs/interfaces/datatypes.EventSourceUpdate.html +2 -2
  166. package/docs/interfaces/datatypes.EventSubscription.html +10 -10
  167. package/docs/interfaces/datatypes.EventSubscriptionCreate.html +6 -6
  168. package/docs/interfaces/datatypes.EventSubscriptionList.html +3 -3
  169. package/docs/interfaces/datatypes.EventSubscriptionUpdate.html +5 -5
  170. package/docs/interfaces/datatypes.EventTarget.html +22 -3
  171. package/docs/interfaces/datatypes.EventTargetCloudwatchLogs.html +2 -2
  172. package/docs/interfaces/datatypes.EventTargetDatadog.html +224 -0
  173. package/docs/interfaces/datatypes.EventTargetFirehose.html +2 -2
  174. package/docs/interfaces/datatypes.EventTargetKinesis.html +2 -2
  175. package/docs/interfaces/datatypes.FailoverBackend.html +9 -9
  176. package/docs/interfaces/datatypes.FailoverBackendCreate.html +5 -5
  177. package/docs/interfaces/datatypes.FailoverBackendList.html +3 -3
  178. package/docs/interfaces/datatypes.FailoverBackendUpdate.html +4 -4
  179. package/docs/interfaces/datatypes.HTTPResponseBackend.html +11 -11
  180. package/docs/interfaces/datatypes.HTTPResponseBackendCreate.html +7 -7
  181. package/docs/interfaces/datatypes.HTTPResponseBackendList.html +3 -3
  182. package/docs/interfaces/datatypes.HTTPResponseBackendUpdate.html +6 -6
  183. package/docs/interfaces/datatypes.HTTPSEdge.html +12 -12
  184. package/docs/interfaces/datatypes.HTTPSEdgeCreate.html +7 -7
  185. package/docs/interfaces/datatypes.HTTPSEdgeList.html +3 -3
  186. package/docs/interfaces/datatypes.HTTPSEdgeRoute.html +55 -22
  187. package/docs/interfaces/datatypes.HTTPSEdgeRouteCreate.html +51 -18
  188. package/docs/interfaces/datatypes.HTTPSEdgeRouteUpdate.html +52 -19
  189. package/docs/interfaces/datatypes.HTTPSEdgeUpdate.html +6 -6
  190. package/docs/interfaces/datatypes.IPPolicy.html +8 -8
  191. package/docs/interfaces/datatypes.IPPolicyCreate.html +4 -4
  192. package/docs/interfaces/datatypes.IPPolicyList.html +3 -3
  193. package/docs/interfaces/datatypes.IPPolicyRule.html +11 -11
  194. package/docs/interfaces/datatypes.IPPolicyRuleCreate.html +7 -7
  195. package/docs/interfaces/datatypes.IPPolicyRuleList.html +3 -3
  196. package/docs/interfaces/datatypes.IPPolicyRuleUpdate.html +4 -4
  197. package/docs/interfaces/datatypes.IPPolicyUpdate.html +3 -3
  198. package/docs/interfaces/datatypes.IPRestriction.html +11 -11
  199. package/docs/interfaces/datatypes.IPRestrictionCreate.html +7 -7
  200. package/docs/interfaces/datatypes.IPRestrictionList.html +3 -3
  201. package/docs/interfaces/datatypes.IPRestrictionUpdate.html +5 -5
  202. package/docs/interfaces/datatypes.IdentityProvider.html +186 -0
  203. package/docs/interfaces/datatypes.Item.html +1 -1
  204. package/docs/interfaces/datatypes.Location.html +224 -0
  205. package/docs/interfaces/datatypes.Paging.html +2 -2
  206. package/docs/interfaces/datatypes.Ref.html +2 -2
  207. package/docs/interfaces/datatypes.ReservedAddr.html +10 -10
  208. package/docs/interfaces/datatypes.ReservedAddrCreate.html +5 -5
  209. package/docs/interfaces/datatypes.ReservedAddrList.html +3 -3
  210. package/docs/interfaces/datatypes.ReservedAddrUpdate.html +3 -3
  211. package/docs/interfaces/datatypes.ReservedDomain.html +17 -17
  212. package/docs/interfaces/datatypes.ReservedDomainCertJob.html +6 -6
  213. package/docs/interfaces/datatypes.ReservedDomainCertPolicy.html +2 -2
  214. package/docs/interfaces/datatypes.ReservedDomainCertStatus.html +3 -3
  215. package/docs/interfaces/datatypes.ReservedDomainCreate.html +19 -19
  216. package/docs/interfaces/datatypes.ReservedDomainList.html +3 -3
  217. package/docs/interfaces/datatypes.ReservedDomainUpdate.html +5 -5
  218. package/docs/interfaces/datatypes.SSHCertificateAuthority.html +10 -10
  219. package/docs/interfaces/datatypes.SSHCertificateAuthorityCreate.html +7 -7
  220. package/docs/interfaces/datatypes.SSHCertificateAuthorityList.html +3 -3
  221. package/docs/interfaces/datatypes.SSHCertificateAuthorityUpdate.html +3 -3
  222. package/docs/interfaces/datatypes.SSHCredential.html +30 -11
  223. package/docs/interfaces/datatypes.SSHCredentialCreate.html +26 -7
  224. package/docs/interfaces/datatypes.SSHCredentialList.html +3 -3
  225. package/docs/interfaces/datatypes.SSHCredentialUpdate.html +5 -5
  226. package/docs/interfaces/datatypes.SSHHostCertificate.html +17 -17
  227. package/docs/interfaces/datatypes.SSHHostCertificateCreate.html +11 -11
  228. package/docs/interfaces/datatypes.SSHHostCertificateList.html +3 -3
  229. package/docs/interfaces/datatypes.SSHHostCertificateUpdate.html +3 -3
  230. package/docs/interfaces/datatypes.SSHUserCertificate.html +19 -19
  231. package/docs/interfaces/datatypes.SSHUserCertificateCreate.html +13 -13
  232. package/docs/interfaces/datatypes.SSHUserCertificateList.html +3 -3
  233. package/docs/interfaces/datatypes.SSHUserCertificateUpdate.html +3 -3
  234. package/docs/interfaces/datatypes.StaticBackend.html +281 -0
  235. package/docs/interfaces/datatypes.StaticBackendCreate.html +224 -0
  236. package/docs/interfaces/datatypes.StaticBackendList.html +205 -0
  237. package/docs/interfaces/datatypes.StaticBackendTLS.html +167 -0
  238. package/docs/interfaces/datatypes.StaticBackendUpdate.html +238 -0
  239. package/docs/interfaces/datatypes.TCPEdge.html +30 -11
  240. package/docs/interfaces/datatypes.TCPEdgeCreate.html +26 -7
  241. package/docs/interfaces/datatypes.TCPEdgeList.html +3 -3
  242. package/docs/interfaces/datatypes.TCPEdgeUpdate.html +25 -6
  243. package/docs/interfaces/datatypes.TLSCertificate.html +28 -28
  244. package/docs/interfaces/datatypes.TLSCertificateCreate.html +8 -8
  245. package/docs/interfaces/datatypes.TLSCertificateList.html +3 -3
  246. package/docs/interfaces/datatypes.TLSCertificateSANs.html +2 -2
  247. package/docs/interfaces/datatypes.TLSCertificateUpdate.html +3 -3
  248. package/docs/interfaces/datatypes.TLSEdge.html +32 -13
  249. package/docs/interfaces/datatypes.TLSEdgeCreate.html +28 -9
  250. package/docs/interfaces/datatypes.TLSEdgeList.html +3 -3
  251. package/docs/interfaces/datatypes.TLSEdgeUpdate.html +27 -8
  252. package/docs/interfaces/datatypes.Tunnel.html +17 -17
  253. package/docs/interfaces/datatypes.TunnelGroupBackend.html +10 -10
  254. package/docs/interfaces/datatypes.TunnelGroupBackendCreate.html +5 -5
  255. package/docs/interfaces/datatypes.TunnelGroupBackendList.html +3 -3
  256. package/docs/interfaces/datatypes.TunnelGroupBackendUpdate.html +4 -4
  257. package/docs/interfaces/datatypes.TunnelList.html +3 -3
  258. package/docs/interfaces/datatypes.TunnelSession.html +12 -12
  259. package/docs/interfaces/datatypes.TunnelSessionList.html +3 -3
  260. package/docs/interfaces/datatypes.TunnelSessionsUpdate.html +1 -1
  261. package/docs/interfaces/datatypes.UserAgent.html +262 -0
  262. package/docs/interfaces/datatypes.WeightedBackend.html +9 -9
  263. package/docs/interfaces/datatypes.WeightedBackendCreate.html +5 -5
  264. package/docs/interfaces/datatypes.WeightedBackendList.html +3 -3
  265. package/docs/interfaces/datatypes.WeightedBackendUpdate.html +4 -4
  266. package/docs/modules/datatypes.html +128 -0
  267. package/docs/modules/services.html +32 -0
  268. package/jest.config.js +2 -0
  269. package/lib/client.d.ts +17 -8
  270. package/lib/client.d.ts.map +1 -1
  271. package/lib/client.js +92 -119
  272. package/lib/client.js.map +1 -1
  273. package/lib/datatypes.d.ts +539 -204
  274. package/lib/datatypes.d.ts.map +1 -1
  275. package/lib/datatypes.js +4 -3
  276. package/lib/datatypes.js.map +1 -1
  277. package/lib/index.d.ts.map +1 -1
  278. package/lib/index.js +16 -28
  279. package/lib/index.js.map +1 -1
  280. package/lib/services.d.ts +254 -126
  281. package/lib/services.d.ts.map +1 -1
  282. package/lib/services.js +3613 -3356
  283. package/lib/services.js.map +1 -1
  284. package/lib/util.d.ts.map +1 -1
  285. package/lib/util.js +35 -34
  286. package/lib/util.js.map +1 -1
  287. package/package.json +4 -3
  288. package/src/client.ts +28 -33
  289. package/src/datatypes.ts +576 -207
  290. package/src/index.ts +2 -0
  291. package/src/services.ts +1136 -553
  292. package/src/util.ts +2 -0
  293. package/test/apikey.test.js +62 -63
package/src/datatypes.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Code generated for API Clients. DO NOT EDIT.
2
+
1
3
  export interface Empty {}
2
4
 
3
5
  export interface Item {
@@ -30,11 +32,11 @@ export interface AbuseReport {
30
32
  /** URI of the abuse report API resource */
31
33
  uri: string;
32
34
  /** timestamp that the abuse report record was created in RFC 3339 format */
33
- createdAt: string;
35
+ createdAt: Date;
34
36
  /** a list of URLs containing suspected abusive content */
35
37
  urls: Array<string>;
36
38
  /** arbitrary user-defined data about this abuse report. Optional, max 4096 bytes. */
37
- metadata: string;
39
+ metadata?: string;
38
40
  /** Indicates whether ngrok has processed the abuse report. one of `PENDING`, `PROCESSED`, or `PARTIALLY_PROCESSED` */
39
41
  status: string;
40
42
  /** an array of hostname statuses related to the report */
@@ -52,16 +54,18 @@ export interface AbuseReportCreate {
52
54
  /** a list of URLs containing suspected abusive content */
53
55
  urls: Array<string>;
54
56
  /** arbitrary user-defined data about this abuse report. Optional, max 4096 bytes. */
55
- metadata: string;
57
+ metadata?: string;
56
58
  }
57
59
 
58
60
  export interface AgentIngressCreate {
59
61
  /** human-readable description of the use of this Agent Ingress. optional, max 255 bytes. */
60
- description: string;
62
+ description?: string;
61
63
  /** arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytes */
62
- metadata: string;
64
+ metadata?: string;
63
65
  /** the domain that you own to be used as the base domain name to generate regional agent ingress domains. */
64
66
  domain: string;
67
+ /** configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled. Optional. */
68
+ certificateManagementPolicy?: AgentIngressCertPolicy;
65
69
  }
66
70
 
67
71
  export interface AgentIngressUpdate {
@@ -70,6 +74,8 @@ export interface AgentIngressUpdate {
70
74
  description?: string;
71
75
  /** arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytes */
72
76
  metadata?: string;
77
+ /** configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled. Optional. */
78
+ certificateManagementPolicy?: AgentIngressCertPolicy;
73
79
  }
74
80
 
75
81
  export interface AgentIngress {
@@ -78,9 +84,9 @@ export interface AgentIngress {
78
84
  /** URI to the API resource of this Agent ingress */
79
85
  uri: string;
80
86
  /** human-readable description of the use of this Agent Ingress. optional, max 255 bytes. */
81
- description: string;
87
+ description?: string;
82
88
  /** arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytes */
83
- metadata: string;
89
+ metadata?: string;
84
90
  /** the domain that you own to be used as the base domain name to generate regional agent ingress domains. */
85
91
  domain: string;
86
92
  /** a list of target values to use as the values of NS records for the domain property these values will delegate control over the domain to ngrok */
@@ -88,7 +94,11 @@ export interface AgentIngress {
88
94
  /** a list of regional agent ingress domains that are subdomains of the value of domain this value may increase over time as ngrok adds more regions */
89
95
  regionDomains: Array<string>;
90
96
  /** timestamp when the Agent Ingress was created, RFC 3339 format */
91
- createdAt: string;
97
+ createdAt: Date;
98
+ /** configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled */
99
+ certificateManagementPolicy?: AgentIngressCertPolicy;
100
+ /** status of the automatic certificate management for this domain, or null if automatic management is disabled */
101
+ certificateManagementStatus?: AgentIngressCertStatus;
92
102
  }
93
103
 
94
104
  export interface AgentIngressList {
@@ -100,11 +110,38 @@ export interface AgentIngressList {
100
110
  nextPageUri?: string;
101
111
  }
102
112
 
113
+ export interface AgentIngressCertPolicy {
114
+ /** certificate authority to request certificates from. The only supported value is letsencrypt. */
115
+ authority: string;
116
+ /** type of private key to use when requesting certificates. Defaults to rsa, can be either rsa or ecdsa. */
117
+ privateKeyType: string;
118
+ }
119
+
120
+ export interface AgentIngressCertStatus {
121
+ /** timestamp when the next renewal will be requested, RFC 3339 format */
122
+ renewsAt?: Date;
123
+ /** status of the certificate provisioning job, or null if the certificiate isn't being provisioned or renewed */
124
+ provisioningJob?: AgentIngressCertJob;
125
+ }
126
+
127
+ export interface AgentIngressCertJob {
128
+ /** if present, an error code indicating why provisioning is failing. It may be either a temporary condition (INTERNAL_ERROR), or a permanent one the user must correct (DNS_ERROR). */
129
+ errorCode?: string;
130
+ /** a message describing the current status or error */
131
+ msg: string;
132
+ /** timestamp when the provisioning job started, RFC 3339 format */
133
+ startedAt: Date;
134
+ /** timestamp when the provisioning job will be retried */
135
+ retriesAt?: Date;
136
+ }
137
+
103
138
  export interface APIKeyCreate {
104
139
  /** human-readable description of what uses the API key to authenticate. optional, max 255 bytes. */
105
- description: string;
140
+ description?: string;
106
141
  /** arbitrary user-defined data of this API key. optional, max 4096 bytes */
107
- metadata: string;
142
+ metadata?: string;
143
+ /** If supplied at credential creation, ownership will be assigned to the specified User or Bot. Only admins may specify an owner other than themselves. Defaults to the authenticated User or Bot. */
144
+ ownerId?: string;
108
145
  }
109
146
 
110
147
  export interface APIKeyUpdate {
@@ -121,13 +158,15 @@ export interface APIKey {
121
158
  /** URI to the API resource of this API key */
122
159
  uri: string;
123
160
  /** human-readable description of what uses the API key to authenticate. optional, max 255 bytes. */
124
- description: string;
161
+ description?: string;
125
162
  /** arbitrary user-defined data of this API key. optional, max 4096 bytes */
126
- metadata: string;
163
+ metadata?: string;
127
164
  /** timestamp when the api key was created, RFC 3339 format */
128
- createdAt: string;
165
+ createdAt: Date;
129
166
  /** the bearer token that can be placed into the Authorization header to authenticate request to the ngrok API. **This value is only available one time, on the API response from key creation. Otherwise it is null.** */
130
167
  token?: string;
168
+ /** If supplied at credential creation, ownership will be assigned to the specified User or Bot. Only admins may specify an owner other than themselves. Defaults to the authenticated User or Bot. */
169
+ ownerId?: string;
131
170
  }
132
171
 
133
172
  export interface APIKeyList {
@@ -139,26 +178,170 @@ export interface APIKeyList {
139
178
  nextPageUri?: string;
140
179
  }
141
180
 
181
+ export interface ApplicationSession {
182
+ /** unique application session resource identifier */
183
+ id: string;
184
+ /** URI of the application session API resource */
185
+ uri: string;
186
+ /** URL of the hostport served by this endpoint */
187
+ publicUrl: string;
188
+ /** browser session details of the application session */
189
+ browserSession: BrowserSession;
190
+ /** application user this session is associated with */
191
+ applicationUser?: Ref;
192
+ /** timestamp when the user was created in RFC 3339 format */
193
+ createdAt?: Date;
194
+ /** timestamp when the user was last active in RFC 3339 format */
195
+ lastActive?: Date;
196
+ /** timestamp when session expires in RFC 3339 format */
197
+ expiresAt?: Date;
198
+ /** ephemeral endpoint this session is associated with */
199
+ endpoint?: Ref;
200
+ /** edge this session is associated with, null if the endpoint is agent-initiated */
201
+ edge?: Ref;
202
+ /** route this session is associated with, null if the endpoint is agent-initiated */
203
+ route?: Ref;
204
+ }
205
+
206
+ export interface ApplicationSessionList {
207
+ /** list of all application sessions on this account */
208
+ applicationSessions: Array<ApplicationSession>;
209
+ /** URI of the application session list API resource */
210
+ uri: string;
211
+ /** URI of the next page, or null if there is no next page */
212
+ nextPageUri?: string;
213
+ }
214
+
215
+ export interface BrowserSession {
216
+ /** HTTP User-Agent data */
217
+ userAgent: UserAgent;
218
+ /** IP address */
219
+ ipAddress: string;
220
+ /** IP geolocation data */
221
+ location?: Location;
222
+ }
223
+
224
+ export interface UserAgent {
225
+ /** raw User-Agent request header */
226
+ raw: string;
227
+ /** browser name (e.g. Chrome) */
228
+ browserName?: string;
229
+ /** browser version (e.g. 102) */
230
+ browserVersion?: string;
231
+ /** type of device (e.g. Desktop) */
232
+ deviceType?: string;
233
+ /** operating system name (e.g. MacOS) */
234
+ osName?: string;
235
+ /** operating system version (e.g. 10.15.7) */
236
+ osVersion?: string;
237
+ }
238
+
239
+ export interface Location {
240
+ /** ISO country code */
241
+ countryCode?: string;
242
+ /** geographical latitude */
243
+ latitude?: number;
244
+ /** geographical longitude */
245
+ longitude?: number;
246
+ /** accuracy radius of the geographical coordinates */
247
+ latLongRadiusKm?: number;
248
+ }
249
+
250
+ export interface ApplicationUser {
251
+ /** unique application user resource identifier */
252
+ id: string;
253
+ /** URI of the application user API resource */
254
+ uri: string;
255
+ /** identity provider that the user authenticated with */
256
+ identityProvider: IdentityProvider;
257
+ /** unique user identifier */
258
+ providerUserId: string;
259
+ /** user username */
260
+ username?: string;
261
+ /** user email */
262
+ email?: string;
263
+ /** user common name */
264
+ name?: string;
265
+ /** timestamp when the user was created in RFC 3339 format */
266
+ createdAt?: Date;
267
+ /** timestamp when the user was last active in RFC 3339 format */
268
+ lastActive?: Date;
269
+ /** timestamp when the user last signed-in in RFC 3339 format */
270
+ lastLogin?: Date;
271
+ }
272
+
273
+ export interface ApplicationUserList {
274
+ /** list of all application users on this account */
275
+ applicationUsers: Array<ApplicationUser>;
276
+ /** URI of the application user list API resource */
277
+ uri: string;
278
+ /** URI of the next page, or null if there is no next page */
279
+ nextPageUri?: string;
280
+ }
281
+
282
+ export interface IdentityProvider {
283
+ /** name of the identity provider (e.g. Google) */
284
+ name: string;
285
+ /** URL of the identity provider (e.g. https://accounts.google.com) */
286
+ url: string;
287
+ }
288
+
289
+ export interface TunnelSession {
290
+ /** version of the ngrok agent that started this ngrok tunnel session */
291
+ agentVersion: string;
292
+ /** reference to the tunnel credential or ssh credential used by the ngrok agent to start this tunnel session */
293
+ credential: Ref;
294
+ /** unique tunnel session resource identifier */
295
+ id: string;
296
+ /** source ip address of the tunnel session */
297
+ ip: string;
298
+ /** arbitrary user-defined data specified in the metadata property in the ngrok configuration file. See the metadata configuration option */
299
+ metadata?: string;
300
+ /** operating system of the host the ngrok agent is running on */
301
+ os: string;
302
+ /** the ngrok region identifier in which this tunnel session was started */
303
+ region: string;
304
+ /** time when the tunnel session first connected to the ngrok servers */
305
+ startedAt: Date;
306
+ /** the transport protocol used to start the tunnel session. Either `ngrok/v2` or `ssh` */
307
+ transport: string;
308
+ /** URI to the API resource of the tunnel session */
309
+ uri: string;
310
+ }
311
+
312
+ export interface TunnelSessionList {
313
+ /** list of all tunnel sessions on this account */
314
+ tunnelSessions: Array<TunnelSession>;
315
+ /** URI to the API resource of the tunnel session list */
316
+ uri: string;
317
+ /** URI of the next page, or null if there is no next page */
318
+ nextPageUri?: string;
319
+ }
320
+
321
+ export interface TunnelSessionsUpdate {
322
+ id: string;
323
+ }
324
+
142
325
  export interface FailoverBackend {
143
326
  /** unique identifier for this Failover backend */
144
327
  id: string;
145
328
  /** URI of the FailoverBackend API resource */
146
329
  uri: string;
147
330
  /** timestamp when the backend was created, RFC 3339 format */
148
- createdAt: string;
331
+ createdAt: Date;
149
332
  /** human-readable description of this backend. Optional */
150
- description: string;
333
+ description?: string;
151
334
  /** arbitrary user-defined machine-readable data of this backend. Optional */
152
- metadata: string;
335
+ metadata?: string;
153
336
  /** the ids of the child backends in order */
154
337
  backends: Array<string>;
155
338
  }
156
339
 
157
340
  export interface FailoverBackendCreate {
158
341
  /** human-readable description of this backend. Optional */
159
- description: string;
342
+ description?: string;
160
343
  /** arbitrary user-defined machine-readable data of this backend. Optional */
161
- metadata: string;
344
+ metadata?: string;
162
345
  /** the ids of the child backends in order */
163
346
  backends: Array<string>;
164
347
  }
@@ -187,11 +370,11 @@ export interface HTTPResponseBackend {
187
370
  /** URI of the HTTPResponseBackend API resource */
188
371
  uri: string;
189
372
  /** timestamp when the backend was created, RFC 3339 format */
190
- createdAt: string;
373
+ createdAt: Date;
191
374
  /** human-readable description of this backend. Optional */
192
- description: string;
375
+ description?: string;
193
376
  /** arbitrary user-defined machine-readable data of this backend. Optional */
194
- metadata: string;
377
+ metadata?: string;
195
378
  /** body to return as fixed content */
196
379
  body: string;
197
380
  /** headers to return */
@@ -202,9 +385,9 @@ export interface HTTPResponseBackend {
202
385
 
203
386
  export interface HTTPResponseBackendCreate {
204
387
  /** human-readable description of this backend. Optional */
205
- description: string;
388
+ description?: string;
206
389
  /** arbitrary user-defined machine-readable data of this backend. Optional */
207
- metadata: string;
390
+ metadata?: string;
208
391
  /** body to return as fixed content */
209
392
  body: string;
210
393
  /** headers to return */
@@ -233,17 +416,71 @@ export interface HTTPResponseBackendList {
233
416
  nextPageUri?: string;
234
417
  }
235
418
 
419
+ export interface StaticBackend {
420
+ /** unique identifier for this static backend */
421
+ id: string;
422
+ /** URI of the StaticBackend API resource */
423
+ uri: string;
424
+ /** timestamp when the backend was created, RFC 3339 format */
425
+ createdAt: Date;
426
+ /** human-readable description of this backend. Optional */
427
+ description?: string;
428
+ /** arbitrary user-defined machine-readable data of this backend. Optional */
429
+ metadata?: string;
430
+ /** the address to forward to */
431
+ address: string;
432
+ /** tls configuration to use */
433
+ tls: StaticBackendTLS;
434
+ }
435
+
436
+ export interface StaticBackendTLS {
437
+ /** if TLS is checked */
438
+ enabled: boolean;
439
+ }
440
+
441
+ export interface StaticBackendCreate {
442
+ /** human-readable description of this backend. Optional */
443
+ description?: string;
444
+ /** arbitrary user-defined machine-readable data of this backend. Optional */
445
+ metadata?: string;
446
+ /** the address to forward to */
447
+ address: string;
448
+ /** tls configuration to use */
449
+ tls: StaticBackendTLS;
450
+ }
451
+
452
+ export interface StaticBackendUpdate {
453
+ id: string;
454
+ /** human-readable description of this backend. Optional */
455
+ description?: string;
456
+ /** arbitrary user-defined machine-readable data of this backend. Optional */
457
+ metadata?: string;
458
+ /** the address to forward to */
459
+ address: string;
460
+ /** tls configuration to use */
461
+ tls: StaticBackendTLS;
462
+ }
463
+
464
+ export interface StaticBackendList {
465
+ /** the list of all static backends on this account */
466
+ backends: Array<StaticBackend>;
467
+ /** URI of the static backends list API resource */
468
+ uri: string;
469
+ /** URI of the next page, or null if there is no next page */
470
+ nextPageUri?: string;
471
+ }
472
+
236
473
  export interface TunnelGroupBackend {
237
474
  /** unique identifier for this TunnelGroup backend */
238
475
  id: string;
239
476
  /** URI of the TunnelGroupBackend API resource */
240
477
  uri: string;
241
478
  /** timestamp when the backend was created, RFC 3339 format */
242
- createdAt: string;
479
+ createdAt: Date;
243
480
  /** human-readable description of this backend. Optional */
244
- description: string;
481
+ description?: string;
245
482
  /** arbitrary user-defined machine-readable data of this backend. Optional */
246
- metadata: string;
483
+ metadata?: string;
247
484
  /** labels to watch for tunnels on, e.g. app->foo, dc->bar */
248
485
  labels: Map<string, string>;
249
486
  /** tunnels matching this backend */
@@ -252,9 +489,9 @@ export interface TunnelGroupBackend {
252
489
 
253
490
  export interface TunnelGroupBackendCreate {
254
491
  /** human-readable description of this backend. Optional */
255
- description: string;
492
+ description?: string;
256
493
  /** arbitrary user-defined machine-readable data of this backend. Optional */
257
- metadata: string;
494
+ metadata?: string;
258
495
  /** labels to watch for tunnels on, e.g. app->foo, dc->bar */
259
496
  labels: Map<string, string>;
260
497
  }
@@ -284,20 +521,20 @@ export interface WeightedBackend {
284
521
  /** URI of the WeightedBackend API resource */
285
522
  uri: string;
286
523
  /** timestamp when the backend was created, RFC 3339 format */
287
- createdAt: string;
524
+ createdAt: Date;
288
525
  /** human-readable description of this backend. Optional */
289
- description: string;
526
+ description?: string;
290
527
  /** arbitrary user-defined machine-readable data of this backend. Optional */
291
- metadata: string;
528
+ metadata?: string;
292
529
  /** the ids of the child backends to their weights [0-10000] */
293
530
  backends: Map<string, number>;
294
531
  }
295
532
 
296
533
  export interface WeightedBackendCreate {
297
534
  /** human-readable description of this backend. Optional */
298
- description: string;
535
+ description?: string;
299
536
  /** arbitrary user-defined machine-readable data of this backend. Optional */
300
- metadata: string;
537
+ metadata?: string;
301
538
  /** the ids of the child backends to their weights [0-10000] */
302
539
  backends: Map<string, number>;
303
540
  }
@@ -321,11 +558,48 @@ export interface WeightedBackendList {
321
558
  nextPageUri?: string;
322
559
  }
323
560
 
561
+ export interface BotUser {
562
+ /** unique API key resource identifier */
563
+ id: string;
564
+ /** URI to the API resource of this bot user */
565
+ uri: string;
566
+ /** human-readable name used to identify the bot */
567
+ name: string;
568
+ /** whether or not the bot is active */
569
+ active: boolean;
570
+ /** timestamp when the api key was created, RFC 3339 format */
571
+ createdAt: Date;
572
+ }
573
+
574
+ export interface BotUserCreate {
575
+ /** human-readable name used to identify the bot */
576
+ name: string;
577
+ /** whether or not the bot is active */
578
+ active?: boolean;
579
+ }
580
+
581
+ export interface BotUserUpdate {
582
+ id: string;
583
+ /** human-readable name used to identify the bot */
584
+ name?: string;
585
+ /** whether or not the bot is active */
586
+ active?: boolean;
587
+ }
588
+
589
+ export interface BotUserList {
590
+ /** the list of all bot users on this account */
591
+ botUsers: Array<BotUser>;
592
+ /** URI of the bot users list API resource */
593
+ uri: string;
594
+ /** URI of the next page, or null if there is no next page */
595
+ nextPageUri?: string;
596
+ }
597
+
324
598
  export interface CertificateAuthorityCreate {
325
599
  /** human-readable description of this Certificate Authority. optional, max 255 bytes. */
326
- description: string;
600
+ description?: string;
327
601
  /** arbitrary user-defined machine-readable data of this Certificate Authority. optional, max 4096 bytes. */
328
- metadata: string;
602
+ metadata?: string;
329
603
  /** raw PEM of the Certificate Authority */
330
604
  caPem: string;
331
605
  }
@@ -344,19 +618,19 @@ export interface CertificateAuthority {
344
618
  /** URI of the Certificate Authority API resource */
345
619
  uri: string;
346
620
  /** timestamp when the Certificate Authority was created, RFC 3339 format */
347
- createdAt: string;
621
+ createdAt: Date;
348
622
  /** human-readable description of this Certificate Authority. optional, max 255 bytes. */
349
- description: string;
623
+ description?: string;
350
624
  /** arbitrary user-defined machine-readable data of this Certificate Authority. optional, max 4096 bytes. */
351
- metadata: string;
625
+ metadata?: string;
352
626
  /** raw PEM of the Certificate Authority */
353
627
  caPem: string;
354
628
  /** subject common name of the Certificate Authority */
355
629
  subjectCommonName: string;
356
630
  /** timestamp when this Certificate Authority becomes valid, RFC 3339 format */
357
- notBefore: string;
631
+ notBefore: Date;
358
632
  /** timestamp when this Certificate Authority becomes invalid, RFC 3339 format */
359
- notAfter: string;
633
+ notAfter: Date;
360
634
  /** set of actions the private key of this Certificate Authority can be used for */
361
635
  keyUsages: Array<string>;
362
636
  /** extended set of actions the private key of this Certificate Authority can be used for */
@@ -374,11 +648,13 @@ export interface CertificateAuthorityList {
374
648
 
375
649
  export interface CredentialCreate {
376
650
  /** human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes. */
377
- description: string;
651
+ description?: string;
378
652
  /** arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes. */
379
- metadata: string;
380
- /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
653
+ metadata?: string;
654
+ /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains, addresses, and labels the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules for domains may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or value to match multiple labels. For example, you may specify a rule of `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
381
655
  acl: Array<string>;
656
+ /** If supplied at credential creation, ownership will be assigned to the specified User or Bot. Only admins may specify an owner other than themselves. Defaults to the authenticated User or Bot. */
657
+ ownerId?: string;
382
658
  }
383
659
 
384
660
  export interface CredentialUpdate {
@@ -387,7 +663,7 @@ export interface CredentialUpdate {
387
663
  description?: string;
388
664
  /** arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes. */
389
665
  metadata?: string;
390
- /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
666
+ /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains, addresses, and labels the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules for domains may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or value to match multiple labels. For example, you may specify a rule of `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
391
667
  acl?: Array<string>;
392
668
  }
393
669
 
@@ -397,15 +673,17 @@ export interface Credential {
397
673
  /** URI of the tunnel credential API resource */
398
674
  uri: string;
399
675
  /** timestamp when the tunnel credential was created, RFC 3339 format */
400
- createdAt: string;
676
+ createdAt: Date;
401
677
  /** human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes. */
402
- description: string;
678
+ description?: string;
403
679
  /** arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes. */
404
- metadata: string;
680
+ metadata?: string;
405
681
  /** the credential's authtoken that can be used to authenticate an ngrok agent. **This value is only available one time, on the API response from credential creation, otherwise it is null.** */
406
682
  token?: string;
407
- /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
683
+ /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains, addresses, and labels the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules for domains may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or value to match multiple labels. For example, you may specify a rule of `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
408
684
  acl: Array<string>;
685
+ /** If supplied at credential creation, ownership will be assigned to the specified User or Bot. Only admins may specify an owner other than themselves. Defaults to the authenticated User or Bot. */
686
+ ownerId?: string;
409
687
  }
410
688
 
411
689
  export interface CredentialList {
@@ -420,7 +698,7 @@ export interface CredentialList {
420
698
  export interface EndpointWebhookValidation {
421
699
  /** `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified */
422
700
  enabled?: boolean;
423
- /** a string indicating which webhook provider will be sending webhooks to this endpoint. Value must be one of the supported providers: `SLACK`, `SNS`, `STRIPE`, `GITHUB`, `TWILIO`, `SHOPIFY`, `GITLAB`, `INTERCOM`, `SENDGRID`, `XERO`, `PAGERDUTY`. */
701
+ /** a string indicating which webhook provider will be sending webhooks to this endpoint. Value must be one of the supported providers defined at https://ngrok.com/docs/cloud-edge/modules/webhook-verification */
424
702
  provider: string;
425
703
  /** a string secret used to validate requests from the given provider. All providers except AWS SNS require a secret */
426
704
  secret: string;
@@ -482,6 +760,7 @@ export interface EndpointResponseHeaders {
482
760
  export interface EndpointIPPolicy {
483
761
  /** `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified */
484
762
  enabled?: boolean;
763
+ /** list of all IP policies that will be used to check if a source IP is allowed access to the endpoint */
485
764
  ipPolicies: Array<Ref>;
486
765
  }
487
766
 
@@ -533,6 +812,14 @@ export interface EndpointOAuthProvider {
533
812
  microsoft?: EndpointOAuthMicrosoft;
534
813
  /** configuration for using google as the identity provider */
535
814
  google?: EndpointOAuthGoogle;
815
+ /** configuration for using linkedin as the identity provider */
816
+ linkedin?: EndpointOAuthLinkedIn;
817
+ /** configuration for using gitlab as the identity provider */
818
+ gitlab?: EndpointOAuthGitLab;
819
+ /** configuration for using twitch as the identity provider */
820
+ twitch?: EndpointOAuthTwitch;
821
+ /** configuration for using amazon as the identity provider */
822
+ amazon?: EndpointOAuthAmazon;
536
823
  }
537
824
 
538
825
  export interface EndpointOAuthGitHub {
@@ -541,15 +828,15 @@ export interface EndpointOAuthGitHub {
541
828
  /** the OAuth app client secret. retrieve if from the identity provider's dashboard where you created your own OAuth app. optional, see all of the caveats in the docs for `client_id`. */
542
829
  clientSecret?: string;
543
830
  /** a list of provider-specific OAuth scopes with the permissions your OAuth app would like to ask for. these may not be set if you are using the ngrok-managed oauth app (i.e. you must pass both `client_id` and `client_secret` to set scopes) */
544
- scopes: Array<string>;
831
+ scopes?: Array<string>;
545
832
  /** a list of email addresses of users authenticated by identity provider who are allowed access to the endpoint */
546
- emailAddresses: Array<string>;
833
+ emailAddresses?: Array<string>;
547
834
  /** a list of email domains of users authenticated by identity provider who are allowed access to the endpoint */
548
- emailDomains: Array<string>;
835
+ emailDomains?: Array<string>;
549
836
  /** a list of github teams identifiers. users will be allowed access to the endpoint if they are a member of any of these teams. identifiers should be in the 'slug' format qualified with the org name, e.g. `org-name/team-name` */
550
- teams: Array<string>;
837
+ teams?: Array<string>;
551
838
  /** a list of github org identifiers. users who are members of any of the listed organizations will be allowed access. identifiers should be the organization's 'slug' */
552
- organizations: Array<string>;
839
+ organizations?: Array<string>;
553
840
  }
554
841
 
555
842
  export interface EndpointOAuthFacebook {
@@ -591,6 +878,38 @@ export interface EndpointOAuthGoogle {
591
878
  emailDomains: Array<string>;
592
879
  }
593
880
 
881
+ export interface EndpointOAuthLinkedIn {
882
+ clientId?: string;
883
+ clientSecret?: string;
884
+ scopes: Array<string>;
885
+ emailAddresses: Array<string>;
886
+ emailDomains: Array<string>;
887
+ }
888
+
889
+ export interface EndpointOAuthGitLab {
890
+ clientId?: string;
891
+ clientSecret?: string;
892
+ scopes: Array<string>;
893
+ emailAddresses: Array<string>;
894
+ emailDomains: Array<string>;
895
+ }
896
+
897
+ export interface EndpointOAuthTwitch {
898
+ clientId?: string;
899
+ clientSecret?: string;
900
+ scopes: Array<string>;
901
+ emailAddresses: Array<string>;
902
+ emailDomains: Array<string>;
903
+ }
904
+
905
+ export interface EndpointOAuthAmazon {
906
+ clientId?: string;
907
+ clientSecret?: string;
908
+ scopes: Array<string>;
909
+ emailAddresses: Array<string>;
910
+ emailDomains: Array<string>;
911
+ }
912
+
594
913
  export interface EndpointSAML {
595
914
  /** `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified */
596
915
  enabled?: boolean;
@@ -687,6 +1006,37 @@ export interface EndpointWebsocketTCPConverter {
687
1006
  enabled?: boolean;
688
1007
  }
689
1008
 
1009
+ export interface EndpointUserAgentFilter {
1010
+ enabled?: boolean;
1011
+ allow: Array<string>;
1012
+ deny: Array<string>;
1013
+ }
1014
+
1015
+ export interface EndpointPolicy {
1016
+ /** `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified */
1017
+ enabled?: boolean;
1018
+ /** the inbound rules of the traffic policy. */
1019
+ inbound: Array<EndpointRule>;
1020
+ /** the outbound rules on the traffic policy. */
1021
+ outbound: Array<EndpointRule>;
1022
+ }
1023
+
1024
+ export interface EndpointRule {
1025
+ /** cel expressions that filter traffic the policy rule applies to. */
1026
+ expressions: Array<string>;
1027
+ /** the set of actions on a policy rule. */
1028
+ actions: Array<EndpointAction>;
1029
+ /** the name of the rule that is part of the traffic policy. */
1030
+ name: string;
1031
+ }
1032
+
1033
+ export interface EndpointAction {
1034
+ /** the type of action on the policy rule. */
1035
+ type: string;
1036
+ /** the configuration for the action on the policy rule. */
1037
+ config: Record<string, unknown> | undefined;
1038
+ }
1039
+
690
1040
  export interface EdgeRouteItem {
691
1041
  /** unique identifier of this edge */
692
1042
  edgeId: string;
@@ -702,9 +1052,9 @@ export interface HTTPSEdgeRouteCreate {
702
1052
  /** Route selector: "/blog" or "example.com" or "example.com/blog" */
703
1053
  match: string;
704
1054
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
705
- description: string;
1055
+ description?: string;
706
1056
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
707
- metadata: string;
1057
+ metadata?: string;
708
1058
  /** backend module configuration or `null` */
709
1059
  backend?: EndpointBackendMutate;
710
1060
  /** ip restriction module configuration or `null` */
@@ -727,6 +1077,9 @@ export interface HTTPSEdgeRouteCreate {
727
1077
  oidc?: EndpointOIDC;
728
1078
  /** websocket to tcp adapter configuration or `null` */
729
1079
  websocketTcpConverter?: EndpointWebsocketTCPConverter;
1080
+ userAgentFilter?: EndpointUserAgentFilter;
1081
+ /** the traffic policy associated with this edge or null */
1082
+ policy?: EndpointPolicy;
730
1083
  }
731
1084
 
732
1085
  export interface HTTPSEdgeRouteUpdate {
@@ -739,9 +1092,9 @@ export interface HTTPSEdgeRouteUpdate {
739
1092
  /** Route selector: "/blog" or "example.com" or "example.com/blog" */
740
1093
  match: string;
741
1094
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
742
- description: string;
1095
+ description?: string;
743
1096
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
744
- metadata: string;
1097
+ metadata?: string;
745
1098
  /** backend module configuration or `null` */
746
1099
  backend?: EndpointBackendMutate;
747
1100
  /** ip restriction module configuration or `null` */
@@ -764,6 +1117,9 @@ export interface HTTPSEdgeRouteUpdate {
764
1117
  oidc?: EndpointOIDC;
765
1118
  /** websocket to tcp adapter configuration or `null` */
766
1119
  websocketTcpConverter?: EndpointWebsocketTCPConverter;
1120
+ userAgentFilter?: EndpointUserAgentFilter;
1121
+ /** the traffic policy associated with this edge or null */
1122
+ policy?: EndpointPolicy;
767
1123
  }
768
1124
 
769
1125
  export interface HTTPSEdgeRoute {
@@ -772,7 +1128,7 @@ export interface HTTPSEdgeRoute {
772
1128
  /** unique identifier of this edge route */
773
1129
  id: string;
774
1130
  /** timestamp when the edge configuration was created, RFC 3339 format */
775
- createdAt: string;
1131
+ createdAt: Date;
776
1132
  /** Type of match to use for this route. Valid values are "exact_path" and "path_prefix". */
777
1133
  matchType: string;
778
1134
  /** Route selector: "/blog" or "example.com" or "example.com/blog" */
@@ -780,9 +1136,9 @@ export interface HTTPSEdgeRoute {
780
1136
  /** URI of the edge API resource */
781
1137
  uri: string;
782
1138
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
783
- description: string;
1139
+ description?: string;
784
1140
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
785
- metadata: string;
1141
+ metadata?: string;
786
1142
  /** backend module configuration or `null` */
787
1143
  backend?: EndpointBackend;
788
1144
  /** ip restriction module configuration or `null` */
@@ -805,6 +1161,9 @@ export interface HTTPSEdgeRoute {
805
1161
  oidc?: EndpointOIDC;
806
1162
  /** websocket to tcp adapter configuration or `null` */
807
1163
  websocketTcpConverter?: EndpointWebsocketTCPConverter;
1164
+ userAgentFilter?: EndpointUserAgentFilter;
1165
+ /** the traffic policy associated with this edge or null */
1166
+ policy?: EndpointPolicy;
808
1167
  }
809
1168
 
810
1169
  export interface HTTPSEdgeList {
@@ -818,9 +1177,9 @@ export interface HTTPSEdgeList {
818
1177
 
819
1178
  export interface HTTPSEdgeCreate {
820
1179
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
821
- description: string;
1180
+ description?: string;
822
1181
  /** arbitrary user-defined machine-readable data of this edge; optional, max 4096 bytes. */
823
- metadata: string;
1182
+ metadata?: string;
824
1183
  /** hostports served by this edge */
825
1184
  hostports?: Array<string>;
826
1185
  /** edge modules */
@@ -846,11 +1205,11 @@ export interface HTTPSEdge {
846
1205
  /** unique identifier of this edge */
847
1206
  id: string;
848
1207
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
849
- description: string;
1208
+ description?: string;
850
1209
  /** arbitrary user-defined machine-readable data of this edge; optional, max 4096 bytes. */
851
- metadata: string;
1210
+ metadata?: string;
852
1211
  /** timestamp when the edge configuration was created, RFC 3339 format */
853
- createdAt: string;
1212
+ createdAt: Date;
854
1213
  /** URI of the edge API resource */
855
1214
  uri: string;
856
1215
  /** hostports served by this edge */
@@ -887,6 +1246,11 @@ export interface EdgeTLSTerminationAtEdgeReplace {
887
1246
  module: EndpointTLSTerminationAtEdge;
888
1247
  }
889
1248
 
1249
+ export interface EdgePolicyReplace {
1250
+ id: string;
1251
+ module: EndpointPolicy;
1252
+ }
1253
+
890
1254
  export interface EdgeRouteBackendReplace {
891
1255
  edgeId: string;
892
1256
  id: string;
@@ -953,6 +1317,18 @@ export interface EdgeRouteWebsocketTCPConverterReplace {
953
1317
  module: EndpointWebsocketTCPConverter;
954
1318
  }
955
1319
 
1320
+ export interface EdgeRouteUserAgentFilterReplace {
1321
+ edgeId: string;
1322
+ id: string;
1323
+ module: EndpointUserAgentFilter;
1324
+ }
1325
+
1326
+ export interface EdgeRoutePolicyReplace {
1327
+ edgeId: string;
1328
+ id: string;
1329
+ module: EndpointPolicy;
1330
+ }
1331
+
956
1332
  export interface TCPEdgeList {
957
1333
  /** the list of all TCP Edges on this account */
958
1334
  tcpEdges: Array<TCPEdge>;
@@ -964,14 +1340,16 @@ export interface TCPEdgeList {
964
1340
 
965
1341
  export interface TCPEdgeCreate {
966
1342
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
967
- description: string;
1343
+ description?: string;
968
1344
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
969
- metadata: string;
1345
+ metadata?: string;
970
1346
  /** hostports served by this edge */
971
1347
  hostports?: Array<string>;
972
1348
  /** edge modules */
973
1349
  backend?: EndpointBackendMutate;
974
1350
  ipRestriction?: EndpointIPPolicyMutate;
1351
+ /** the traffic policy associated with this edge or null */
1352
+ policy?: EndpointPolicy;
975
1353
  }
976
1354
 
977
1355
  export interface TCPEdgeUpdate {
@@ -986,17 +1364,19 @@ export interface TCPEdgeUpdate {
986
1364
  /** edge modules */
987
1365
  backend?: EndpointBackendMutate;
988
1366
  ipRestriction?: EndpointIPPolicyMutate;
1367
+ /** the traffic policy associated with this edge or null */
1368
+ policy?: EndpointPolicy;
989
1369
  }
990
1370
 
991
1371
  export interface TCPEdge {
992
1372
  /** unique identifier of this edge */
993
1373
  id: string;
994
1374
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
995
- description: string;
1375
+ description?: string;
996
1376
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
997
- metadata: string;
1377
+ metadata?: string;
998
1378
  /** timestamp when the edge was created, RFC 3339 format */
999
- createdAt: string;
1379
+ createdAt: Date;
1000
1380
  /** URI of the edge API resource */
1001
1381
  uri: string;
1002
1382
  /** hostports served by this edge */
@@ -1004,6 +1384,8 @@ export interface TCPEdge {
1004
1384
  /** edge modules */
1005
1385
  backend?: EndpointBackend;
1006
1386
  ipRestriction?: EndpointIPPolicy;
1387
+ /** the traffic policy associated with this edge or null */
1388
+ policy?: EndpointPolicy;
1007
1389
  }
1008
1390
 
1009
1391
  export interface TLSEdgeList {
@@ -1017,9 +1399,9 @@ export interface TLSEdgeList {
1017
1399
 
1018
1400
  export interface TLSEdgeCreate {
1019
1401
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
1020
- description: string;
1402
+ description?: string;
1021
1403
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
1022
- metadata: string;
1404
+ metadata?: string;
1023
1405
  /** hostports served by this edge */
1024
1406
  hostports?: Array<string>;
1025
1407
  /** edge modules */
@@ -1027,6 +1409,8 @@ export interface TLSEdgeCreate {
1027
1409
  ipRestriction?: EndpointIPPolicyMutate;
1028
1410
  mutualTls?: EndpointMutualTLSMutate;
1029
1411
  tlsTermination?: EndpointTLSTermination;
1412
+ /** the traffic policy associated with this edge or null */
1413
+ policy?: EndpointPolicy;
1030
1414
  }
1031
1415
 
1032
1416
  export interface TLSEdgeUpdate {
@@ -1043,17 +1427,19 @@ export interface TLSEdgeUpdate {
1043
1427
  ipRestriction?: EndpointIPPolicyMutate;
1044
1428
  mutualTls?: EndpointMutualTLSMutate;
1045
1429
  tlsTermination?: EndpointTLSTermination;
1430
+ /** the traffic policy associated with this edge or null */
1431
+ policy?: EndpointPolicy;
1046
1432
  }
1047
1433
 
1048
1434
  export interface TLSEdge {
1049
1435
  /** unique identifier of this edge */
1050
1436
  id: string;
1051
1437
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
1052
- description: string;
1438
+ description?: string;
1053
1439
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
1054
- metadata: string;
1440
+ metadata?: string;
1055
1441
  /** timestamp when the edge configuration was created, RFC 3339 format */
1056
- createdAt: string;
1442
+ createdAt: Date;
1057
1443
  /** URI of the edge API resource */
1058
1444
  uri: string;
1059
1445
  /** hostports served by this edge */
@@ -1063,17 +1449,19 @@ export interface TLSEdge {
1063
1449
  ipRestriction?: EndpointIPPolicy;
1064
1450
  mutualTls?: EndpointMutualTLS;
1065
1451
  tlsTermination?: EndpointTLSTermination;
1452
+ /** the traffic policy associated with this edge or null */
1453
+ policy?: EndpointPolicy;
1066
1454
  }
1067
1455
 
1068
1456
  export interface Endpoint {
1069
1457
  /** unique endpoint resource identifier */
1070
1458
  id: string;
1071
1459
  /** identifier of the region this endpoint belongs to */
1072
- region: string;
1460
+ region?: string;
1073
1461
  /** timestamp when the endpoint was created in RFC 3339 format */
1074
- createdAt: string;
1462
+ createdAt?: Date;
1075
1463
  /** timestamp when the endpoint was updated in RFC 3339 format */
1076
- updatedAt: string;
1464
+ updatedAt?: Date;
1077
1465
  /** URL of the hostport served by this endpoint */
1078
1466
  publicUrl: string;
1079
1467
  /** protocol served by this endpoint. one of `http`, `https`, `tcp`, or `tls` */
@@ -1083,7 +1471,7 @@ export interface Endpoint {
1083
1471
  /** whether the endpoint is `ephemeral` (served directly by an agent-initiated tunnel) or `edge` (served by an edge) */
1084
1472
  type: string;
1085
1473
  /** user-supplied metadata of the associated tunnel or edge object */
1086
- metadata: string;
1474
+ metadata?: string;
1087
1475
  /** the domain reserved for this endpoint */
1088
1476
  domain?: Ref;
1089
1477
  /** the address reserved for this endpoint */
@@ -1105,9 +1493,9 @@ export interface EndpointList {
1105
1493
 
1106
1494
  export interface EventDestinationCreate {
1107
1495
  /** Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. */
1108
- metadata: string;
1496
+ metadata?: string;
1109
1497
  /** Human-readable description of the Event Destination. Optional, max 255 bytes. */
1110
- description: string;
1498
+ description?: string;
1111
1499
  /** The output format you would like to serialize events into when sending to their target. Currently the only accepted value is `JSON`. */
1112
1500
  format: string;
1113
1501
  /** An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: `kinesis`, `firehose`, `cloudwatch_logs`, or `s3`. */
@@ -1131,11 +1519,11 @@ export interface EventDestination {
1131
1519
  /** Unique identifier for this Event Destination. */
1132
1520
  id: string;
1133
1521
  /** Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. */
1134
- metadata: string;
1522
+ metadata?: string;
1135
1523
  /** Timestamp when the Event Destination was created, RFC 3339 format. */
1136
- createdAt: string;
1524
+ createdAt: Date;
1137
1525
  /** Human-readable description of the Event Destination. Optional, max 255 bytes. */
1138
- description: string;
1526
+ description?: string;
1139
1527
  /** The output format you would like to serialize events into when sending to their target. Currently the only accepted value is `JSON`. */
1140
1528
  format: string;
1141
1529
  /** An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: `kinesis`, `firehose`, `cloudwatch_logs`, or `s3`. */
@@ -1160,6 +1548,8 @@ export interface EventTarget {
1160
1548
  kinesis?: EventTargetKinesis;
1161
1549
  /** Configuration used to send events to Amazon CloudWatch Logs. */
1162
1550
  cloudwatchLogs?: EventTargetCloudwatchLogs;
1551
+ /** Configuration used to send events to Datadog. */
1552
+ datadog?: EventTargetDatadog;
1163
1553
  }
1164
1554
 
1165
1555
  export interface EventTargetFirehose {
@@ -1183,6 +1573,17 @@ export interface EventTargetCloudwatchLogs {
1183
1573
  logGroupArn: string;
1184
1574
  }
1185
1575
 
1576
+ export interface EventTargetDatadog {
1577
+ /** Datadog API key to use. */
1578
+ apiKey?: string;
1579
+ /** Tags to send with the event. */
1580
+ ddtags?: string;
1581
+ /** Service name to send with the event. */
1582
+ service?: string;
1583
+ /** Datadog site to send event to. */
1584
+ ddsite?: string;
1585
+ }
1586
+
1186
1587
  export interface AWSAuth {
1187
1588
  /** A role for ngrok to assume on your behalf to deposit events into your AWS account. */
1188
1589
  role?: AWSRole;
@@ -1204,9 +1605,9 @@ export interface AWSCredentials {
1204
1605
 
1205
1606
  export interface EventSubscriptionCreate {
1206
1607
  /** Arbitrary customer supplied information intended to be machine readable. Optional, max 4096 chars. */
1207
- metadata: string;
1608
+ metadata?: string;
1208
1609
  /** Arbitrary customer supplied information intended to be human readable. Optional, max 255 chars. */
1209
- description: string;
1610
+ description?: string;
1210
1611
  /** Sources containing the types for which this event subscription will trigger */
1211
1612
  sources: Array<EventSourceReplace>;
1212
1613
  /** A list of Event Destination IDs which should be used for this Event Subscription. */
@@ -1241,11 +1642,11 @@ export interface EventSubscription {
1241
1642
  /** URI of the Event Subscription API resource. */
1242
1643
  uri: string;
1243
1644
  /** When the Event Subscription was created (RFC 3339 format). */
1244
- createdAt: string;
1645
+ createdAt: Date;
1245
1646
  /** Arbitrary customer supplied information intended to be machine readable. Optional, max 4096 chars. */
1246
- metadata: string;
1647
+ metadata?: string;
1247
1648
  /** Arbitrary customer supplied information intended to be human readable. Optional, max 255 chars. */
1248
- description: string;
1649
+ description?: string;
1249
1650
  /** Sources containing the types for which this event subscription will trigger */
1250
1651
  sources: Array<EventSource>;
1251
1652
  /** Destinations to which these events will be sent */
@@ -1301,9 +1702,9 @@ export interface EventSourcePaging {
1301
1702
 
1302
1703
  export interface IPPolicyCreate {
1303
1704
  /** human-readable description of the source IPs of this IP policy. optional, max 255 bytes. */
1304
- description: string;
1705
+ description?: string;
1305
1706
  /** arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes. */
1306
- metadata: string;
1707
+ metadata?: string;
1307
1708
  }
1308
1709
 
1309
1710
  export interface IPPolicyUpdate {
@@ -1320,11 +1721,11 @@ export interface IPPolicy {
1320
1721
  /** URI of the IP Policy API resource */
1321
1722
  uri: string;
1322
1723
  /** timestamp when the IP policy was created, RFC 3339 format */
1323
- createdAt: string;
1724
+ createdAt: Date;
1324
1725
  /** human-readable description of the source IPs of this IP policy. optional, max 255 bytes. */
1325
- description: string;
1726
+ description?: string;
1326
1727
  /** arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes. */
1327
- metadata: string;
1728
+ metadata?: string;
1328
1729
  }
1329
1730
 
1330
1731
  export interface IPPolicyList {
@@ -1338,9 +1739,9 @@ export interface IPPolicyList {
1338
1739
 
1339
1740
  export interface IPPolicyRuleCreate {
1340
1741
  /** human-readable description of the source IPs of this IP rule. optional, max 255 bytes. */
1341
- description: string;
1742
+ description?: string;
1342
1743
  /** arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes. */
1343
- metadata: string;
1744
+ metadata?: string;
1344
1745
  /** an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported. */
1345
1746
  cidr: string;
1346
1747
  /** ID of the IP policy this IP policy rule will be attached to */
@@ -1365,11 +1766,11 @@ export interface IPPolicyRule {
1365
1766
  /** URI of the IP policy rule API resource */
1366
1767
  uri: string;
1367
1768
  /** timestamp when the IP policy rule was created, RFC 3339 format */
1368
- createdAt: string;
1769
+ createdAt: Date;
1369
1770
  /** human-readable description of the source IPs of this IP rule. optional, max 255 bytes. */
1370
- description: string;
1771
+ description?: string;
1371
1772
  /** arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes. */
1372
- metadata: string;
1773
+ metadata?: string;
1373
1774
  /** an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported. */
1374
1775
  cidr: string;
1375
1776
  /** object describing the IP policy this IP Policy Rule belongs to */
@@ -1389,9 +1790,9 @@ export interface IPPolicyRuleList {
1389
1790
 
1390
1791
  export interface IPRestrictionCreate {
1391
1792
  /** human-readable description of this IP restriction. optional, max 255 bytes. */
1392
- description: string;
1793
+ description?: string;
1393
1794
  /** arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes. */
1394
- metadata: string;
1795
+ metadata?: string;
1395
1796
  /** true if the IP restriction will be enforced. if false, only warnings will be issued */
1396
1797
  enforced: boolean;
1397
1798
  /** the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: `dashboard`, `api`, `agent`, and `endpoints` */
@@ -1418,11 +1819,11 @@ export interface IPRestriction {
1418
1819
  /** URI of the IP restriction API resource */
1419
1820
  uri: string;
1420
1821
  /** timestamp when the IP restriction was created, RFC 3339 format */
1421
- createdAt: string;
1822
+ createdAt: Date;
1422
1823
  /** human-readable description of this IP restriction. optional, max 255 bytes. */
1423
- description: string;
1824
+ description?: string;
1424
1825
  /** arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes. */
1425
- metadata: string;
1826
+ metadata?: string;
1426
1827
  /** true if the IP restriction will be enforced. if false, only warnings will be issued */
1427
1828
  enforced: boolean;
1428
1829
  /** the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: `dashboard`, `api`, `agent`, and `endpoints` */
@@ -1442,9 +1843,9 @@ export interface IPRestrictionList {
1442
1843
 
1443
1844
  export interface ReservedAddrCreate {
1444
1845
  /** human-readable description of what this reserved address will be used for */
1445
- description: string;
1846
+ description?: string;
1446
1847
  /** arbitrary user-defined machine-readable data of this reserved address. Optional, max 4096 bytes. */
1447
- metadata: string;
1848
+ metadata?: string;
1448
1849
  /** reserve the address in this geographic ngrok datacenter. Optional, default is us. (au, eu, ap, us, jp, in, sa) */
1449
1850
  region: string;
1450
1851
  }
@@ -1463,11 +1864,11 @@ export interface ReservedAddr {
1463
1864
  /** URI of the reserved address API resource */
1464
1865
  uri: string;
1465
1866
  /** timestamp when the reserved address was created, RFC 3339 format */
1466
- createdAt: string;
1867
+ createdAt: Date;
1467
1868
  /** human-readable description of what this reserved address will be used for */
1468
- description: string;
1869
+ description?: string;
1469
1870
  /** arbitrary user-defined machine-readable data of this reserved address. Optional, max 4096 bytes. */
1470
- metadata: string;
1871
+ metadata?: string;
1471
1872
  /** hostname:port of the reserved address that was assigned at creation time */
1472
1873
  addr: string;
1473
1874
  /** reserve the address in this geographic ngrok datacenter. Optional, default is us. (au, eu, ap, us, jp, in, sa) */
@@ -1484,14 +1885,14 @@ export interface ReservedAddrList {
1484
1885
  }
1485
1886
 
1486
1887
  export interface ReservedDomainCreate {
1487
- /** the domain name to reserve. It may be a full domain name like app.example.com. If the name does not contain a '.' it will reserve that subdomain on ngrok.io. */
1488
- name: string;
1489
- /** reserve the domain in this geographic ngrok datacenter. Optional, default is us. (au, eu, ap, us, jp, in, sa) */
1888
+ /** hostname of the reserved domain */
1889
+ domain: string;
1890
+ /** deprecated: With the launch of the ngrok Global Network domains traffic is now handled globally. This field applied only to endpoints. Note that agents may still connect to specific regions. Optional, null by default. (au, eu, ap, us, jp, in, sa) */
1490
1891
  region: string;
1491
1892
  /** human-readable description of what this reserved domain will be used for */
1492
- description: string;
1893
+ description?: string;
1493
1894
  /** arbitrary user-defined machine-readable data of this reserved domain. Optional, max 4096 bytes. */
1494
- metadata: string;
1895
+ metadata?: string;
1495
1896
  /** ID of a user-uploaded TLS certificate to use for connections to targeting this domain. Optional, mutually exclusive with `certificate_management_policy`. */
1496
1897
  certificateId?: string;
1497
1898
  /** configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled. Optional, mutually exclusive with `certificate_id`. */
@@ -1516,16 +1917,16 @@ export interface ReservedDomain {
1516
1917
  /** URI of the reserved domain API resource */
1517
1918
  uri: string;
1518
1919
  /** timestamp when the reserved domain was created, RFC 3339 format */
1519
- createdAt: string;
1920
+ createdAt: Date;
1520
1921
  /** human-readable description of what this reserved domain will be used for */
1521
- description: string;
1922
+ description?: string;
1522
1923
  /** arbitrary user-defined machine-readable data of this reserved domain. Optional, max 4096 bytes. */
1523
- metadata: string;
1924
+ metadata?: string;
1524
1925
  /** hostname of the reserved domain */
1525
1926
  domain: string;
1526
- /** reserve the domain in this geographic ngrok datacenter. Optional, default is us. (au, eu, ap, us, jp, in, sa) */
1927
+ /** deprecated: With the launch of the ngrok Global Network domains traffic is now handled globally. This field applied only to endpoints. Note that agents may still connect to specific regions. Optional, null by default. (au, eu, ap, us, jp, in, sa) */
1527
1928
  region: string;
1528
- /** DNS CNAME target for a custom hostname, or null if the reserved domain is a subdomain of *.ngrok.io */
1929
+ /** DNS CNAME target for a custom hostname, or null if the reserved domain is a subdomain of an ngrok owned domain (e.g. *.ngrok.app) */
1529
1930
  cnameTarget?: string;
1530
1931
  /** object referencing the TLS certificate used for connections to this domain. This can be either a user-uploaded certificate, the most recently issued automatic one, or null otherwise. */
1531
1932
  certificate?: Ref;
@@ -1555,7 +1956,7 @@ export interface ReservedDomainCertPolicy {
1555
1956
 
1556
1957
  export interface ReservedDomainCertStatus {
1557
1958
  /** timestamp when the next renewal will be requested, RFC 3339 format */
1558
- renewsAt?: string;
1959
+ renewsAt?: Date;
1559
1960
  /** status of the certificate provisioning job, or null if the certificiate isn't being provisioned or renewed */
1560
1961
  provisioningJob?: ReservedDomainCertJob;
1561
1962
  }
@@ -1566,16 +1967,16 @@ export interface ReservedDomainCertJob {
1566
1967
  /** a message describing the current status or error */
1567
1968
  msg: string;
1568
1969
  /** timestamp when the provisioning job started, RFC 3339 format */
1569
- startedAt: string;
1970
+ startedAt: Date;
1570
1971
  /** timestamp when the provisioning job will be retried */
1571
- retriesAt?: string;
1972
+ retriesAt?: Date;
1572
1973
  }
1573
1974
 
1574
1975
  export interface SSHCertificateAuthorityCreate {
1575
1976
  /** human-readable description of this SSH Certificate Authority. optional, max 255 bytes. */
1576
- description: string;
1977
+ description?: string;
1577
1978
  /** arbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes. */
1578
- metadata: string;
1979
+ metadata?: string;
1579
1980
  /** the type of private key to generate. one of `rsa`, `ecdsa`, `ed25519` */
1580
1981
  privateKeyType: string;
1581
1982
  /** the type of elliptic curve to use when creating an ECDSA key */
@@ -1598,11 +1999,11 @@ export interface SSHCertificateAuthority {
1598
1999
  /** URI of the SSH Certificate Authority API resource */
1599
2000
  uri: string;
1600
2001
  /** timestamp when the SSH Certificate Authority API resource was created, RFC 3339 format */
1601
- createdAt: string;
2002
+ createdAt: Date;
1602
2003
  /** human-readable description of this SSH Certificate Authority. optional, max 255 bytes. */
1603
- description: string;
2004
+ description?: string;
1604
2005
  /** arbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes. */
1605
- metadata: string;
2006
+ metadata?: string;
1606
2007
  /** raw public key for this SSH Certificate Authority */
1607
2008
  publicKey: string;
1608
2009
  /** the type of private key for this SSH Certificate Authority */
@@ -1620,13 +2021,15 @@ export interface SSHCertificateAuthorityList {
1620
2021
 
1621
2022
  export interface SSHCredentialCreate {
1622
2023
  /** human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes. */
1623
- description: string;
2024
+ description?: string;
1624
2025
  /** arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes. */
1625
- metadata: string;
1626
- /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
2026
+ metadata?: string;
2027
+ /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains, addresses, and labels the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules for domains may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or value to match multiple labels. For example, you may specify a rule of `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
1627
2028
  acl: Array<string>;
1628
2029
  /** the PEM-encoded public key of the SSH keypair that will be used to authenticate */
1629
2030
  publicKey: string;
2031
+ /** If supplied at credential creation, ownership will be assigned to the specified User or Bot. Only admins may specify an owner other than themselves. Defaults to the authenticated User or Bot. */
2032
+ ownerId?: string;
1630
2033
  }
1631
2034
 
1632
2035
  export interface SSHCredentialUpdate {
@@ -1635,7 +2038,7 @@ export interface SSHCredentialUpdate {
1635
2038
  description?: string;
1636
2039
  /** arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes. */
1637
2040
  metadata?: string;
1638
- /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
2041
+ /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains, addresses, and labels the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules for domains may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or value to match multiple labels. For example, you may specify a rule of `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
1639
2042
  acl?: Array<string>;
1640
2043
  }
1641
2044
 
@@ -1645,15 +2048,17 @@ export interface SSHCredential {
1645
2048
  /** URI of the ssh credential API resource */
1646
2049
  uri: string;
1647
2050
  /** timestamp when the ssh credential was created, RFC 3339 format */
1648
- createdAt: string;
2051
+ createdAt: Date;
1649
2052
  /** human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes. */
1650
- description: string;
2053
+ description?: string;
1651
2054
  /** arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes. */
1652
- metadata: string;
2055
+ metadata?: string;
1653
2056
  /** the PEM-encoded public key of the SSH keypair that will be used to authenticate */
1654
2057
  publicKey: string;
1655
- /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
2058
+ /** optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the `bind` rule. The `bind` rule allows the caller to restrict what domains, addresses, and labels the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`. Bind rules for domains may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of `bind:*.example.com` which will allow `x.example.com`, `y.example.com`, `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or value to match multiple labels. For example, you may specify a rule of `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'` is equivalent to no acl at all and will explicitly permit all actions. */
1656
2059
  acl: Array<string>;
2060
+ /** If supplied at credential creation, ownership will be assigned to the specified User or Bot. Only admins may specify an owner other than themselves. Defaults to the authenticated User or Bot. */
2061
+ ownerId?: string;
1657
2062
  }
1658
2063
 
1659
2064
  export interface SSHCredentialList {
@@ -1673,13 +2078,13 @@ export interface SSHHostCertificateCreate {
1673
2078
  /** the list of principals included in the ssh host certificate. This is the list of hostnames and/or IP addresses that are authorized to serve SSH traffic with this certificate. Dangerously, if no principals are specified, this certificate is considered valid for all hosts. */
1674
2079
  principals: Array<string>;
1675
2080
  /** The time when the host certificate becomes valid, in RFC 3339 format. Defaults to the current time if unspecified. */
1676
- validAfter: string;
2081
+ validAfter: Date;
1677
2082
  /** The time when this host certificate becomes invalid, in RFC 3339 format. If unspecified, a default value of one year in the future will be used. The OpenSSH certificates RFC calls this `valid_before`. */
1678
- validUntil: string;
2083
+ validUntil: Date;
1679
2084
  /** human-readable description of this SSH Host Certificate. optional, max 255 bytes. */
1680
- description: string;
2085
+ description?: string;
1681
2086
  /** arbitrary user-defined machine-readable data of this SSH Host Certificate. optional, max 4096 bytes. */
1682
- metadata: string;
2087
+ metadata?: string;
1683
2088
  }
1684
2089
 
1685
2090
  export interface SSHHostCertificateUpdate {
@@ -1696,11 +2101,11 @@ export interface SSHHostCertificate {
1696
2101
  /** URI of the SSH Host Certificate API resource */
1697
2102
  uri: string;
1698
2103
  /** timestamp when the SSH Host Certificate API resource was created, RFC 3339 format */
1699
- createdAt: string;
2104
+ createdAt: Date;
1700
2105
  /** human-readable description of this SSH Host Certificate. optional, max 255 bytes. */
1701
- description: string;
2106
+ description?: string;
1702
2107
  /** arbitrary user-defined machine-readable data of this SSH Host Certificate. optional, max 4096 bytes. */
1703
- metadata: string;
2108
+ metadata?: string;
1704
2109
  /** a public key in OpenSSH Authorized Keys format that this certificate signs */
1705
2110
  publicKey: string;
1706
2111
  /** the key type of the `public_key`, one of `rsa`, `ecdsa` or `ed25519` */
@@ -1710,9 +2115,9 @@ export interface SSHHostCertificate {
1710
2115
  /** the list of principals included in the ssh host certificate. This is the list of hostnames and/or IP addresses that are authorized to serve SSH traffic with this certificate. Dangerously, if no principals are specified, this certificate is considered valid for all hosts. */
1711
2116
  principals: Array<string>;
1712
2117
  /** the time when the ssh host certificate becomes valid, in RFC 3339 format. */
1713
- validAfter: string;
2118
+ validAfter: Date;
1714
2119
  /** the time after which the ssh host certificate becomes invalid, in RFC 3339 format. the OpenSSH certificates RFC calls this `valid_before`. */
1715
- validUntil: string;
2120
+ validUntil: Date;
1716
2121
  /** the signed SSH certificate in OpenSSH Authorized Keys format. this value should be placed in a `-cert.pub` certificate file on disk that should be referenced in your `sshd_config` configuration file with a `HostCertificate` directive */
1717
2122
  certificate: string;
1718
2123
  }
@@ -1738,13 +2143,13 @@ export interface SSHUserCertificateCreate {
1738
2143
  /** A map of extensions included in the certificate. Extensions are additional metadata that can be interpreted by the SSH server for any purpose. These can be used to permit or deny the ability to open a terminal, do port forwarding, x11 forwarding, and more. If unspecified, the certificate will include limited permissions with the following extension map: `{"permit-pty": "", "permit-user-rc": ""}` OpenSSH understands a number of predefined extensions. See [the OpenSSH certificate protocol spec](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys) for additional details. */
1739
2144
  extensions: Map<string, string>;
1740
2145
  /** The time when the user certificate becomes valid, in RFC 3339 format. Defaults to the current time if unspecified. */
1741
- validAfter: string;
2146
+ validAfter: Date;
1742
2147
  /** The time when this host certificate becomes invalid, in RFC 3339 format. If unspecified, a default value of 24 hours will be used. The OpenSSH certificates RFC calls this `valid_before`. */
1743
- validUntil: string;
2148
+ validUntil: Date;
1744
2149
  /** human-readable description of this SSH User Certificate. optional, max 255 bytes. */
1745
- description: string;
2150
+ description?: string;
1746
2151
  /** arbitrary user-defined machine-readable data of this SSH User Certificate. optional, max 4096 bytes. */
1747
- metadata: string;
2152
+ metadata?: string;
1748
2153
  }
1749
2154
 
1750
2155
  export interface SSHUserCertificateUpdate {
@@ -1761,11 +2166,11 @@ export interface SSHUserCertificate {
1761
2166
  /** URI of the SSH User Certificate API resource */
1762
2167
  uri: string;
1763
2168
  /** timestamp when the SSH User Certificate API resource was created, RFC 3339 format */
1764
- createdAt: string;
2169
+ createdAt: Date;
1765
2170
  /** human-readable description of this SSH User Certificate. optional, max 255 bytes. */
1766
- description: string;
2171
+ description?: string;
1767
2172
  /** arbitrary user-defined machine-readable data of this SSH User Certificate. optional, max 4096 bytes. */
1768
- metadata: string;
2173
+ metadata?: string;
1769
2174
  /** a public key in OpenSSH Authorized Keys format that this certificate signs */
1770
2175
  publicKey: string;
1771
2176
  /** the key type of the `public_key`, one of `rsa`, `ecdsa` or `ed25519` */
@@ -1779,9 +2184,9 @@ export interface SSHUserCertificate {
1779
2184
  /** A map of extensions included in the certificate. Extensions are additional metadata that can be interpreted by the SSH server for any purpose. These can be used to permit or deny the ability to open a terminal, do port forwarding, x11 forwarding, and more. If unspecified, the certificate will include limited permissions with the following extension map: `{"permit-pty": "", "permit-user-rc": ""}` OpenSSH understands a number of predefined extensions. See [the OpenSSH certificate protocol spec](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys) for additional details. */
1780
2185
  extensions: Map<string, string>;
1781
2186
  /** the time when the ssh host certificate becomes valid, in RFC 3339 format. */
1782
- validAfter: string;
2187
+ validAfter: Date;
1783
2188
  /** the time after which the ssh host certificate becomes invalid, in RFC 3339 format. the OpenSSH certificates RFC calls this `valid_before`. */
1784
- validUntil: string;
2189
+ validUntil: Date;
1785
2190
  /** the signed SSH certificate in OpenSSH Authorized Keys Format. this value should be placed in a `-cert.pub` certificate file on disk that should be referenced in your `sshd_config` configuration file with a `HostCertificate` directive */
1786
2191
  certificate: string;
1787
2192
  }
@@ -1797,12 +2202,12 @@ export interface SSHUserCertificateList {
1797
2202
 
1798
2203
  export interface TLSCertificateCreate {
1799
2204
  /** human-readable description of this TLS certificate. optional, max 255 bytes. */
1800
- description: string;
2205
+ description?: string;
1801
2206
  /** arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes. */
1802
- metadata: string;
1803
- /** chain of PEM-encoded certificates, leaf first. See [Certificate Bundles](https://ngrok.com/docs/api#tls-certificates-pem). */
2207
+ metadata?: string;
2208
+ /** chain of PEM-encoded certificates, leaf first. See [Certificate Bundles](https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains). */
1804
2209
  certificatePem: string;
1805
- /** private key for the TLS certificate, PEM-encoded. See [Private Keys](https://ngrok.com/docs/ngrok-link#tls-certificates-key). */
2210
+ /** private key for the TLS certificate, PEM-encoded. See [Private Keys](https://ngrok.com/docs/cloud-edge/endpoints#private-keys). */
1806
2211
  privateKeyPem: string;
1807
2212
  }
1808
2213
 
@@ -1820,23 +2225,23 @@ export interface TLSCertificate {
1820
2225
  /** URI of the TLS certificate API resource */
1821
2226
  uri: string;
1822
2227
  /** timestamp when the TLS certificate was created, RFC 3339 format */
1823
- createdAt: string;
2228
+ createdAt: Date;
1824
2229
  /** human-readable description of this TLS certificate. optional, max 255 bytes. */
1825
- description: string;
2230
+ description?: string;
1826
2231
  /** arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes. */
1827
- metadata: string;
1828
- /** chain of PEM-encoded certificates, leaf first. See [Certificate Bundles](https://ngrok.com/docs/api#tls-certificates-pem). */
2232
+ metadata?: string;
2233
+ /** chain of PEM-encoded certificates, leaf first. See [Certificate Bundles](https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains). */
1829
2234
  certificatePem: string;
1830
2235
  /** subject common name from the leaf of this TLS certificate */
1831
2236
  subjectCommonName: string;
1832
2237
  /** subject alternative names (SANs) from the leaf of this TLS certificate */
1833
2238
  subjectAlternativeNames: TLSCertificateSANs;
1834
2239
  /** timestamp (in RFC 3339 format) when this TLS certificate was issued automatically, or null if this certificate was user-uploaded */
1835
- issuedAt?: string;
2240
+ issuedAt?: Date;
1836
2241
  /** timestamp when this TLS certificate becomes valid, RFC 3339 format */
1837
- notBefore: string;
2242
+ notBefore: Date;
1838
2243
  /** timestamp when this TLS certificate becomes invalid, RFC 3339 format */
1839
- notAfter: string;
2244
+ notAfter: Date;
1840
2245
  /** set of actions the private key of this TLS certificate can be used for */
1841
2246
  keyUsages: Array<string>;
1842
2247
  /** extended set of actions the private key of this TLS certificate can be used for */
@@ -1875,53 +2280,17 @@ export interface TLSCertificateSANs {
1875
2280
  ips: Array<string>;
1876
2281
  }
1877
2282
 
1878
- export interface TunnelSession {
1879
- /** version of the ngrok agent that started this ngrok tunnel session */
1880
- agentVersion: string;
1881
- /** reference to the tunnel credential or ssh credential used by the ngrok agent to start this tunnel session */
1882
- credential: Ref;
1883
- /** unique tunnel session resource identifier */
1884
- id: string;
1885
- /** source ip address of the tunnel session */
1886
- ip: string;
1887
- /** arbitrary user-defined data specified in the metadata property in the ngrok configuration file. See the metadata configuration option */
1888
- metadata: string;
1889
- /** operating system of the host the ngrok agent is running on */
1890
- os: string;
1891
- /** the ngrok region identifier in which this tunnel session was started */
1892
- region: string;
1893
- /** time when the tunnel session first connected to the ngrok servers */
1894
- startedAt: string;
1895
- /** the transport protocol used to start the tunnel session. Either `ngrok/v2` or `ssh` */
1896
- transport: string;
1897
- /** URI to the API resource of the tunnel session */
1898
- uri: string;
1899
- }
1900
-
1901
- export interface TunnelSessionList {
1902
- /** list of all tunnel sessions on this account */
1903
- tunnelSessions: Array<TunnelSession>;
1904
- /** URI to the API resource of the tunnel session list */
1905
- uri: string;
1906
- /** URI of the next page, or null if there is no next page */
1907
- nextPageUri?: string;
1908
- }
1909
-
1910
- export interface TunnelSessionsUpdate {
1911
- id: string;
1912
- }
1913
-
1914
2283
  export interface Tunnel {
1915
2284
  /** unique tunnel resource identifier */
1916
2285
  id: string;
1917
2286
  /** URL of the ephemeral tunnel's public endpoint */
1918
- publicUrl: string;
2287
+ publicUrl?: string;
1919
2288
  /** timestamp when the tunnel was initiated in RFC 3339 format */
1920
- startedAt: string;
1921
- /** user-supplied metadata for the tunnel defined in the ngrok configuration file. See the tunnel [metadata configuration option](https://ngrok.com/docs#tunnel-definitions-metadata) In API version 0, this value was instead pulled from the top-level [metadata configuration option](https://ngrok.com/docs#config_metadata). */
1922
- metadata: string;
2289
+ startedAt: Date;
2290
+ /** user-supplied metadata for the tunnel defined in the ngrok configuration file. See the tunnel [metadata configuration option](https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config#common-tunnel-configuration-properties) In API version 0, this value was instead pulled from the top-level [metadata configuration option](https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config#metadata). */
2291
+ metadata?: string;
1923
2292
  /** tunnel protocol for ephemeral tunnels. one of `http`, `https`, `tcp` or `tls` */
1924
- proto: string;
2293
+ proto?: string;
1925
2294
  /** identifier of tune region where the tunnel is running */
1926
2295
  region: string;
1927
2296
  /** reference object pointing to the tunnel session on which this tunnel was started */
@@ -1929,7 +2298,7 @@ export interface Tunnel {
1929
2298
  /** the ephemeral endpoint this tunnel is associated with, if this is an agent-initiated tunnel */
1930
2299
  endpoint?: Ref;
1931
2300
  /** the labels the tunnel group backends will match against, if this is a backend tunnel */
1932
- labels: Map<string, string>;
2301
+ labels?: Map<string, string>;
1933
2302
  /** tunnel group backends served by this backend tunnel */
1934
2303
  backends?: Array<Ref>;
1935
2304
  /** upstream address the ngrok agent forwards traffic over this tunnel to. this may be expressed as a URL or a network address. */