@ngrok/ngrok-api 0.9.0 → 0.10.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 (271) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc.js +2 -0
  3. package/.prettierrc.js +2 -0
  4. package/CHANGELOG.md +12 -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 +54 -26
  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.CertificateAuthorities.html +20 -11
  15. package/docs/classes/services.Credentials.html +21 -12
  16. package/docs/classes/services.EdgeRouteBackendModule.html +4 -4
  17. package/docs/classes/services.EdgeRouteCircuitBreakerModule.html +4 -4
  18. package/docs/classes/services.EdgeRouteCompressionModule.html +4 -4
  19. package/docs/classes/services.EdgeRouteIPRestrictionModule.html +4 -4
  20. package/docs/classes/services.EdgeRouteOAuthModule.html +4 -4
  21. package/docs/classes/services.EdgeRouteOIDCModule.html +4 -4
  22. package/docs/classes/services.EdgeRouteRequestHeadersModule.html +4 -4
  23. package/docs/classes/services.EdgeRouteResponseHeadersModule.html +4 -4
  24. package/docs/classes/services.EdgeRouteSAMLModule.html +4 -4
  25. package/docs/classes/services.EdgeRouteWebhookVerificationModule.html +4 -4
  26. package/docs/classes/services.EdgeRouteWebsocketTCPConverterModule.html +4 -4
  27. package/docs/classes/services.EdgesHTTPS.html +20 -11
  28. package/docs/classes/services.EdgesHTTPSRoutes.html +5 -5
  29. package/docs/classes/services.EdgesTCP.html +20 -11
  30. package/docs/classes/services.EdgesTLS.html +20 -11
  31. package/docs/classes/services.Endpoints.html +15 -6
  32. package/docs/classes/services.EventDestinations.html +21 -12
  33. package/docs/classes/services.EventSources.html +6 -6
  34. package/docs/classes/services.EventSubscriptions.html +20 -11
  35. package/docs/classes/services.FailoverBackends.html +20 -11
  36. package/docs/classes/services.HTTPResponseBackends.html +20 -11
  37. package/docs/classes/services.HTTPSEdgeMutualTLSModule.html +8 -8
  38. package/docs/classes/services.HTTPSEdgeTLSTerminationModule.html +8 -8
  39. package/docs/classes/services.IPPolicies.html +20 -11
  40. package/docs/classes/services.IPPolicyRules.html +20 -11
  41. package/docs/classes/services.IPRestrictions.html +20 -11
  42. package/docs/classes/services.ReservedAddrs.html +20 -11
  43. package/docs/classes/services.ReservedDomains.html +26 -17
  44. package/docs/classes/services.SSHCertificateAuthorities.html +20 -11
  45. package/docs/classes/services.SSHCredentials.html +20 -11
  46. package/docs/classes/services.SSHHostCertificates.html +20 -11
  47. package/docs/classes/services.SSHUserCertificates.html +20 -11
  48. package/docs/classes/services.TCPEdgeBackendModule.html +8 -8
  49. package/docs/classes/services.TCPEdgeIPRestrictionModule.html +8 -8
  50. package/docs/classes/services.TLSCertificates.html +20 -11
  51. package/docs/classes/services.TLSEdgeBackendModule.html +8 -8
  52. package/docs/classes/services.TLSEdgeIPRestrictionModule.html +8 -8
  53. package/docs/classes/services.TLSEdgeMutualTLSModule.html +8 -8
  54. package/docs/classes/services.TLSEdgeTLSTerminationModule.html +8 -8
  55. package/docs/classes/services.TunnelGroupBackends.html +20 -11
  56. package/docs/classes/services.TunnelSessions.html +22 -13
  57. package/docs/classes/services.Tunnels.html +15 -6
  58. package/docs/classes/services.WeightedBackends.html +20 -11
  59. package/docs/index.html +8 -3
  60. package/docs/interfaces/client.NgrokConfig.html +2 -2
  61. package/docs/interfaces/datatypes.APIKey.html +28 -9
  62. package/docs/interfaces/datatypes.APIKeyCreate.html +23 -4
  63. package/docs/interfaces/datatypes.APIKeyList.html +3 -3
  64. package/docs/interfaces/datatypes.APIKeyUpdate.html +3 -3
  65. package/docs/interfaces/datatypes.AWSAuth.html +2 -2
  66. package/docs/interfaces/datatypes.AWSCredentials.html +2 -2
  67. package/docs/interfaces/datatypes.AWSRole.html +1 -1
  68. package/docs/interfaces/datatypes.AbuseReport.html +9 -9
  69. package/docs/interfaces/datatypes.AbuseReportCreate.html +3 -3
  70. package/docs/interfaces/datatypes.AbuseReportHostname.html +2 -2
  71. package/docs/interfaces/datatypes.AgentIngress.html +49 -11
  72. package/docs/interfaces/datatypes.AgentIngressCertJob.html +224 -0
  73. package/docs/interfaces/datatypes.AgentIngressCertPolicy.html +186 -0
  74. package/docs/interfaces/datatypes.AgentIngressCertStatus.html +186 -0
  75. package/docs/interfaces/datatypes.AgentIngressCreate.html +24 -5
  76. package/docs/interfaces/datatypes.AgentIngressList.html +3 -3
  77. package/docs/interfaces/datatypes.AgentIngressUpdate.html +22 -3
  78. package/docs/interfaces/datatypes.ApplicationSession.html +357 -0
  79. package/docs/interfaces/datatypes.ApplicationSessionList.html +205 -0
  80. package/docs/interfaces/datatypes.ApplicationUser.html +338 -0
  81. package/docs/interfaces/datatypes.ApplicationUserList.html +205 -0
  82. package/docs/interfaces/datatypes.BrowserSession.html +205 -0
  83. package/docs/interfaces/datatypes.CertificateAuthority.html +16 -16
  84. package/docs/interfaces/datatypes.CertificateAuthorityCreate.html +5 -5
  85. package/docs/interfaces/datatypes.CertificateAuthorityList.html +3 -3
  86. package/docs/interfaces/datatypes.CertificateAuthorityUpdate.html +3 -3
  87. package/docs/interfaces/datatypes.Credential.html +30 -11
  88. package/docs/interfaces/datatypes.CredentialCreate.html +25 -6
  89. package/docs/interfaces/datatypes.CredentialList.html +3 -3
  90. package/docs/interfaces/datatypes.CredentialUpdate.html +5 -5
  91. package/docs/interfaces/datatypes.EdgeBackendReplace.html +2 -2
  92. package/docs/interfaces/datatypes.EdgeIPRestrictionReplace.html +2 -2
  93. package/docs/interfaces/datatypes.EdgeMutualTLSReplace.html +2 -2
  94. package/docs/interfaces/datatypes.EdgeRouteBackendReplace.html +3 -3
  95. package/docs/interfaces/datatypes.EdgeRouteCircuitBreakerReplace.html +3 -3
  96. package/docs/interfaces/datatypes.EdgeRouteCompressionReplace.html +3 -3
  97. package/docs/interfaces/datatypes.EdgeRouteIPRestrictionReplace.html +3 -3
  98. package/docs/interfaces/datatypes.EdgeRouteItem.html +2 -2
  99. package/docs/interfaces/datatypes.EdgeRouteOAuthReplace.html +3 -3
  100. package/docs/interfaces/datatypes.EdgeRouteOIDCReplace.html +3 -3
  101. package/docs/interfaces/datatypes.EdgeRouteRequestHeadersReplace.html +3 -3
  102. package/docs/interfaces/datatypes.EdgeRouteResponseHeadersReplace.html +3 -3
  103. package/docs/interfaces/datatypes.EdgeRouteSAMLReplace.html +3 -3
  104. package/docs/interfaces/datatypes.EdgeRouteWebhookVerificationReplace.html +3 -3
  105. package/docs/interfaces/datatypes.EdgeRouteWebsocketTCPConverterReplace.html +3 -3
  106. package/docs/interfaces/datatypes.EdgeTLSTerminationAtEdgeReplace.html +2 -2
  107. package/docs/interfaces/datatypes.EdgeTLSTerminationReplace.html +2 -2
  108. package/docs/interfaces/datatypes.Endpoint.html +19 -19
  109. package/docs/interfaces/datatypes.EndpointBackend.html +2 -2
  110. package/docs/interfaces/datatypes.EndpointBackendMutate.html +2 -2
  111. package/docs/interfaces/datatypes.EndpointCircuitBreaker.html +6 -6
  112. package/docs/interfaces/datatypes.EndpointCompression.html +1 -1
  113. package/docs/interfaces/datatypes.EndpointIPPolicy.html +7 -2
  114. package/docs/interfaces/datatypes.EndpointIPPolicyMutate.html +2 -2
  115. package/docs/interfaces/datatypes.EndpointList.html +3 -3
  116. package/docs/interfaces/datatypes.EndpointMutualTLS.html +2 -2
  117. package/docs/interfaces/datatypes.EndpointMutualTLSMutate.html +2 -2
  118. package/docs/interfaces/datatypes.EndpointOAuth.html +7 -7
  119. package/docs/interfaces/datatypes.EndpointOAuthAmazon.html +218 -0
  120. package/docs/interfaces/datatypes.EndpointOAuthFacebook.html +5 -5
  121. package/docs/interfaces/datatypes.EndpointOAuthGitHub.html +12 -12
  122. package/docs/interfaces/datatypes.EndpointOAuthGitLab.html +218 -0
  123. package/docs/interfaces/datatypes.EndpointOAuthGoogle.html +5 -5
  124. package/docs/interfaces/datatypes.EndpointOAuthLinkedIn.html +218 -0
  125. package/docs/interfaces/datatypes.EndpointOAuthMicrosoft.html +5 -5
  126. package/docs/interfaces/datatypes.EndpointOAuthProvider.html +80 -4
  127. package/docs/interfaces/datatypes.EndpointOAuthTwitch.html +218 -0
  128. package/docs/interfaces/datatypes.EndpointOIDC.html +9 -9
  129. package/docs/interfaces/datatypes.EndpointRequestHeaders.html +3 -3
  130. package/docs/interfaces/datatypes.EndpointResponseHeaders.html +3 -3
  131. package/docs/interfaces/datatypes.EndpointSAML.html +15 -15
  132. package/docs/interfaces/datatypes.EndpointSAMLMutate.html +10 -10
  133. package/docs/interfaces/datatypes.EndpointTLSTermination.html +3 -3
  134. package/docs/interfaces/datatypes.EndpointTLSTerminationAtEdge.html +2 -2
  135. package/docs/interfaces/datatypes.EndpointWebhookValidation.html +4 -4
  136. package/docs/interfaces/datatypes.EndpointWebsocketTCPConverter.html +1 -1
  137. package/docs/interfaces/datatypes.Error.html +4 -4
  138. package/docs/interfaces/datatypes.EventDestination.html +10 -10
  139. package/docs/interfaces/datatypes.EventDestinationCreate.html +6 -6
  140. package/docs/interfaces/datatypes.EventDestinationList.html +3 -3
  141. package/docs/interfaces/datatypes.EventDestinationUpdate.html +5 -5
  142. package/docs/interfaces/datatypes.EventSource.html +2 -2
  143. package/docs/interfaces/datatypes.EventSourceCreate.html +2 -2
  144. package/docs/interfaces/datatypes.EventSourceItem.html +2 -2
  145. package/docs/interfaces/datatypes.EventSourceList.html +2 -2
  146. package/docs/interfaces/datatypes.EventSourcePaging.html +1 -1
  147. package/docs/interfaces/datatypes.EventSourceReplace.html +1 -1
  148. package/docs/interfaces/datatypes.EventSourceUpdate.html +2 -2
  149. package/docs/interfaces/datatypes.EventSubscription.html +10 -10
  150. package/docs/interfaces/datatypes.EventSubscriptionCreate.html +6 -6
  151. package/docs/interfaces/datatypes.EventSubscriptionList.html +3 -3
  152. package/docs/interfaces/datatypes.EventSubscriptionUpdate.html +5 -5
  153. package/docs/interfaces/datatypes.EventTarget.html +22 -3
  154. package/docs/interfaces/datatypes.EventTargetCloudwatchLogs.html +2 -2
  155. package/docs/interfaces/datatypes.EventTargetDatadog.html +224 -0
  156. package/docs/interfaces/datatypes.EventTargetFirehose.html +2 -2
  157. package/docs/interfaces/datatypes.EventTargetKinesis.html +2 -2
  158. package/docs/interfaces/datatypes.FailoverBackend.html +9 -9
  159. package/docs/interfaces/datatypes.FailoverBackendCreate.html +5 -5
  160. package/docs/interfaces/datatypes.FailoverBackendList.html +3 -3
  161. package/docs/interfaces/datatypes.FailoverBackendUpdate.html +4 -4
  162. package/docs/interfaces/datatypes.HTTPResponseBackend.html +11 -11
  163. package/docs/interfaces/datatypes.HTTPResponseBackendCreate.html +7 -7
  164. package/docs/interfaces/datatypes.HTTPResponseBackendList.html +3 -3
  165. package/docs/interfaces/datatypes.HTTPResponseBackendUpdate.html +6 -6
  166. package/docs/interfaces/datatypes.HTTPSEdge.html +12 -12
  167. package/docs/interfaces/datatypes.HTTPSEdgeCreate.html +7 -7
  168. package/docs/interfaces/datatypes.HTTPSEdgeList.html +3 -3
  169. package/docs/interfaces/datatypes.HTTPSEdgeRoute.html +22 -22
  170. package/docs/interfaces/datatypes.HTTPSEdgeRouteCreate.html +18 -18
  171. package/docs/interfaces/datatypes.HTTPSEdgeRouteUpdate.html +19 -19
  172. package/docs/interfaces/datatypes.HTTPSEdgeUpdate.html +6 -6
  173. package/docs/interfaces/datatypes.IPPolicy.html +8 -8
  174. package/docs/interfaces/datatypes.IPPolicyCreate.html +4 -4
  175. package/docs/interfaces/datatypes.IPPolicyList.html +3 -3
  176. package/docs/interfaces/datatypes.IPPolicyRule.html +11 -11
  177. package/docs/interfaces/datatypes.IPPolicyRuleCreate.html +7 -7
  178. package/docs/interfaces/datatypes.IPPolicyRuleList.html +3 -3
  179. package/docs/interfaces/datatypes.IPPolicyRuleUpdate.html +4 -4
  180. package/docs/interfaces/datatypes.IPPolicyUpdate.html +3 -3
  181. package/docs/interfaces/datatypes.IPRestriction.html +11 -11
  182. package/docs/interfaces/datatypes.IPRestrictionCreate.html +7 -7
  183. package/docs/interfaces/datatypes.IPRestrictionList.html +3 -3
  184. package/docs/interfaces/datatypes.IPRestrictionUpdate.html +5 -5
  185. package/docs/interfaces/datatypes.IdentityProvider.html +186 -0
  186. package/docs/interfaces/datatypes.Item.html +1 -1
  187. package/docs/interfaces/datatypes.Location.html +224 -0
  188. package/docs/interfaces/datatypes.Paging.html +2 -2
  189. package/docs/interfaces/datatypes.Ref.html +2 -2
  190. package/docs/interfaces/datatypes.ReservedAddr.html +10 -10
  191. package/docs/interfaces/datatypes.ReservedAddrCreate.html +5 -5
  192. package/docs/interfaces/datatypes.ReservedAddrList.html +3 -3
  193. package/docs/interfaces/datatypes.ReservedAddrUpdate.html +3 -3
  194. package/docs/interfaces/datatypes.ReservedDomain.html +15 -15
  195. package/docs/interfaces/datatypes.ReservedDomainCertJob.html +6 -6
  196. package/docs/interfaces/datatypes.ReservedDomainCertPolicy.html +2 -2
  197. package/docs/interfaces/datatypes.ReservedDomainCertStatus.html +3 -3
  198. package/docs/interfaces/datatypes.ReservedDomainCreate.html +18 -18
  199. package/docs/interfaces/datatypes.ReservedDomainList.html +3 -3
  200. package/docs/interfaces/datatypes.ReservedDomainUpdate.html +5 -5
  201. package/docs/interfaces/datatypes.SSHCertificateAuthority.html +10 -10
  202. package/docs/interfaces/datatypes.SSHCertificateAuthorityCreate.html +7 -7
  203. package/docs/interfaces/datatypes.SSHCertificateAuthorityList.html +3 -3
  204. package/docs/interfaces/datatypes.SSHCertificateAuthorityUpdate.html +3 -3
  205. package/docs/interfaces/datatypes.SSHCredential.html +30 -11
  206. package/docs/interfaces/datatypes.SSHCredentialCreate.html +26 -7
  207. package/docs/interfaces/datatypes.SSHCredentialList.html +3 -3
  208. package/docs/interfaces/datatypes.SSHCredentialUpdate.html +5 -5
  209. package/docs/interfaces/datatypes.SSHHostCertificate.html +17 -17
  210. package/docs/interfaces/datatypes.SSHHostCertificateCreate.html +11 -11
  211. package/docs/interfaces/datatypes.SSHHostCertificateList.html +3 -3
  212. package/docs/interfaces/datatypes.SSHHostCertificateUpdate.html +3 -3
  213. package/docs/interfaces/datatypes.SSHUserCertificate.html +19 -19
  214. package/docs/interfaces/datatypes.SSHUserCertificateCreate.html +13 -13
  215. package/docs/interfaces/datatypes.SSHUserCertificateList.html +3 -3
  216. package/docs/interfaces/datatypes.SSHUserCertificateUpdate.html +3 -3
  217. package/docs/interfaces/datatypes.TCPEdge.html +11 -11
  218. package/docs/interfaces/datatypes.TCPEdgeCreate.html +7 -7
  219. package/docs/interfaces/datatypes.TCPEdgeList.html +3 -3
  220. package/docs/interfaces/datatypes.TCPEdgeUpdate.html +6 -6
  221. package/docs/interfaces/datatypes.TLSCertificate.html +28 -28
  222. package/docs/interfaces/datatypes.TLSCertificateCreate.html +8 -8
  223. package/docs/interfaces/datatypes.TLSCertificateList.html +3 -3
  224. package/docs/interfaces/datatypes.TLSCertificateSANs.html +2 -2
  225. package/docs/interfaces/datatypes.TLSCertificateUpdate.html +3 -3
  226. package/docs/interfaces/datatypes.TLSEdge.html +13 -13
  227. package/docs/interfaces/datatypes.TLSEdgeCreate.html +9 -9
  228. package/docs/interfaces/datatypes.TLSEdgeList.html +3 -3
  229. package/docs/interfaces/datatypes.TLSEdgeUpdate.html +8 -8
  230. package/docs/interfaces/datatypes.Tunnel.html +17 -17
  231. package/docs/interfaces/datatypes.TunnelGroupBackend.html +10 -10
  232. package/docs/interfaces/datatypes.TunnelGroupBackendCreate.html +5 -5
  233. package/docs/interfaces/datatypes.TunnelGroupBackendList.html +3 -3
  234. package/docs/interfaces/datatypes.TunnelGroupBackendUpdate.html +4 -4
  235. package/docs/interfaces/datatypes.TunnelList.html +3 -3
  236. package/docs/interfaces/datatypes.TunnelSession.html +12 -12
  237. package/docs/interfaces/datatypes.TunnelSessionList.html +3 -3
  238. package/docs/interfaces/datatypes.TunnelSessionsUpdate.html +1 -1
  239. package/docs/interfaces/datatypes.UserAgent.html +262 -0
  240. package/docs/interfaces/datatypes.WeightedBackend.html +9 -9
  241. package/docs/interfaces/datatypes.WeightedBackendCreate.html +5 -5
  242. package/docs/interfaces/datatypes.WeightedBackendList.html +3 -3
  243. package/docs/interfaces/datatypes.WeightedBackendUpdate.html +4 -4
  244. package/docs/modules/datatypes.html +64 -0
  245. package/docs/modules/services.html +8 -0
  246. package/jest.config.js +2 -0
  247. package/lib/client.d.ts +9 -7
  248. package/lib/client.d.ts.map +1 -1
  249. package/lib/client.js +89 -119
  250. package/lib/client.js.map +1 -1
  251. package/lib/datatypes.d.ts +392 -201
  252. package/lib/datatypes.d.ts.map +1 -1
  253. package/lib/datatypes.js +4 -3
  254. package/lib/datatypes.js.map +1 -1
  255. package/lib/index.d.ts.map +1 -1
  256. package/lib/index.js +16 -28
  257. package/lib/index.js.map +1 -1
  258. package/lib/services.d.ts +164 -126
  259. package/lib/services.d.ts.map +1 -1
  260. package/lib/services.js +3294 -3356
  261. package/lib/services.js.map +1 -1
  262. package/lib/util.d.ts.map +1 -1
  263. package/lib/util.js +35 -34
  264. package/lib/util.js.map +1 -1
  265. package/package.json +3 -3
  266. package/src/client.ts +16 -32
  267. package/src/datatypes.ts +413 -204
  268. package/src/index.ts +2 -0
  269. package/src/services.ts +768 -519
  270. package/src/util.ts +2 -0
  271. package/test/apikey.test.js +62 -63
@@ -26,11 +26,11 @@ export interface AbuseReport {
26
26
  /** URI of the abuse report API resource */
27
27
  uri: string;
28
28
  /** timestamp that the abuse report record was created in RFC 3339 format */
29
- createdAt: string;
29
+ createdAt: Date;
30
30
  /** a list of URLs containing suspected abusive content */
31
31
  urls: Array<string>;
32
32
  /** arbitrary user-defined data about this abuse report. Optional, max 4096 bytes. */
33
- metadata: string;
33
+ metadata?: string;
34
34
  /** Indicates whether ngrok has processed the abuse report. one of `PENDING`, `PROCESSED`, or `PARTIALLY_PROCESSED` */
35
35
  status: string;
36
36
  /** an array of hostname statuses related to the report */
@@ -46,15 +46,17 @@ export interface AbuseReportCreate {
46
46
  /** a list of URLs containing suspected abusive content */
47
47
  urls: Array<string>;
48
48
  /** arbitrary user-defined data about this abuse report. Optional, max 4096 bytes. */
49
- metadata: string;
49
+ metadata?: string;
50
50
  }
51
51
  export interface AgentIngressCreate {
52
52
  /** human-readable description of the use of this Agent Ingress. optional, max 255 bytes. */
53
- description: string;
53
+ description?: string;
54
54
  /** arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytes */
55
- metadata: string;
55
+ metadata?: string;
56
56
  /** the domain that you own to be used as the base domain name to generate regional agent ingress domains. */
57
57
  domain: string;
58
+ /** configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled. Optional. */
59
+ certificateManagementPolicy?: AgentIngressCertPolicy;
58
60
  }
59
61
  export interface AgentIngressUpdate {
60
62
  id: string;
@@ -62,6 +64,8 @@ export interface AgentIngressUpdate {
62
64
  description?: string;
63
65
  /** arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytes */
64
66
  metadata?: 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
  export interface AgentIngress {
67
71
  /** unique Agent Ingress resource identifier */
@@ -69,9 +73,9 @@ export interface AgentIngress {
69
73
  /** URI to the API resource of this Agent ingress */
70
74
  uri: string;
71
75
  /** human-readable description of the use of this Agent Ingress. optional, max 255 bytes. */
72
- description: string;
76
+ description?: string;
73
77
  /** arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytes */
74
- metadata: string;
78
+ metadata?: string;
75
79
  /** the domain that you own to be used as the base domain name to generate regional agent ingress domains. */
76
80
  domain: string;
77
81
  /** 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 */
@@ -79,7 +83,11 @@ export interface AgentIngress {
79
83
  /** 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 */
80
84
  regionDomains: Array<string>;
81
85
  /** timestamp when the Agent Ingress was created, RFC 3339 format */
82
- createdAt: string;
86
+ createdAt: Date;
87
+ /** configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled */
88
+ certificateManagementPolicy?: AgentIngressCertPolicy;
89
+ /** status of the automatic certificate management for this domain, or null if automatic management is disabled */
90
+ certificateManagementStatus?: AgentIngressCertStatus;
83
91
  }
84
92
  export interface AgentIngressList {
85
93
  /** the list of Agent Ingresses owned by this account */
@@ -89,11 +97,35 @@ export interface AgentIngressList {
89
97
  /** URI of the next page, or null if there is no next page */
90
98
  nextPageUri?: string;
91
99
  }
100
+ export interface AgentIngressCertPolicy {
101
+ /** certificate authority to request certificates from. The only supported value is letsencrypt. */
102
+ authority: string;
103
+ /** type of private key to use when requesting certificates. Defaults to rsa, can be either rsa or ecdsa. */
104
+ privateKeyType: string;
105
+ }
106
+ export interface AgentIngressCertStatus {
107
+ /** timestamp when the next renewal will be requested, RFC 3339 format */
108
+ renewsAt?: Date;
109
+ /** status of the certificate provisioning job, or null if the certificiate isn't being provisioned or renewed */
110
+ provisioningJob?: AgentIngressCertJob;
111
+ }
112
+ export interface AgentIngressCertJob {
113
+ /** 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). */
114
+ errorCode?: string;
115
+ /** a message describing the current status or error */
116
+ msg: string;
117
+ /** timestamp when the provisioning job started, RFC 3339 format */
118
+ startedAt: Date;
119
+ /** timestamp when the provisioning job will be retried */
120
+ retriesAt?: Date;
121
+ }
92
122
  export interface APIKeyCreate {
93
123
  /** human-readable description of what uses the API key to authenticate. optional, max 255 bytes. */
94
- description: string;
124
+ description?: string;
95
125
  /** arbitrary user-defined data of this API key. optional, max 4096 bytes */
96
- metadata: string;
126
+ metadata?: string;
127
+ /** 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. */
128
+ ownerId?: string;
97
129
  }
98
130
  export interface APIKeyUpdate {
99
131
  id: string;
@@ -108,13 +140,15 @@ export interface APIKey {
108
140
  /** URI to the API resource of this API key */
109
141
  uri: string;
110
142
  /** human-readable description of what uses the API key to authenticate. optional, max 255 bytes. */
111
- description: string;
143
+ description?: string;
112
144
  /** arbitrary user-defined data of this API key. optional, max 4096 bytes */
113
- metadata: string;
145
+ metadata?: string;
114
146
  /** timestamp when the api key was created, RFC 3339 format */
115
- createdAt: string;
147
+ createdAt: Date;
116
148
  /** 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.** */
117
149
  token?: string;
150
+ /** 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. */
151
+ ownerId?: string;
118
152
  }
119
153
  export interface APIKeyList {
120
154
  /** the list of API keys for this account */
@@ -124,25 +158,158 @@ export interface APIKeyList {
124
158
  /** URI of the next page, or null if there is no next page */
125
159
  nextPageUri?: string;
126
160
  }
161
+ export interface ApplicationSession {
162
+ /** unique application session resource identifier */
163
+ id: string;
164
+ /** URI of the application session API resource */
165
+ uri: string;
166
+ /** URL of the hostport served by this endpoint */
167
+ publicUrl: string;
168
+ /** browser session details of the application session */
169
+ browserSession: BrowserSession;
170
+ /** application user this session is associated with */
171
+ applicationUser?: Ref;
172
+ /** timestamp when the user was created in RFC 3339 format */
173
+ createdAt?: Date;
174
+ /** timestamp when the user was last active in RFC 3339 format */
175
+ lastActive?: Date;
176
+ /** timestamp when session expires in RFC 3339 format */
177
+ expiresAt?: Date;
178
+ /** ephemeral endpoint this session is associated with */
179
+ endpoint?: Ref;
180
+ /** edge this session is associated with, null if the endpoint is agent-initiated */
181
+ edge?: Ref;
182
+ /** route this session is associated with, null if the endpoint is agent-initiated */
183
+ route?: Ref;
184
+ }
185
+ export interface ApplicationSessionList {
186
+ /** list of all application sessions on this account */
187
+ applicationSessions: Array<ApplicationSession>;
188
+ /** URI of the application session list API resource */
189
+ uri: string;
190
+ /** URI of the next page, or null if there is no next page */
191
+ nextPageUri?: string;
192
+ }
193
+ export interface BrowserSession {
194
+ /** HTTP User-Agent data */
195
+ userAgent: UserAgent;
196
+ /** IP address */
197
+ ipAddress: string;
198
+ /** IP geolocation data */
199
+ location?: Location;
200
+ }
201
+ export interface UserAgent {
202
+ /** raw User-Agent request header */
203
+ raw: string;
204
+ /** browser name (e.g. Chrome) */
205
+ browserName?: string;
206
+ /** browser version (e.g. 102) */
207
+ browserVersion?: string;
208
+ /** type of device (e.g. Desktop) */
209
+ deviceType?: string;
210
+ /** operating system name (e.g. MacOS) */
211
+ osName?: string;
212
+ /** operating system version (e.g. 10.15.7) */
213
+ osVersion?: string;
214
+ }
215
+ export interface Location {
216
+ /** ISO country code */
217
+ countryCode?: string;
218
+ /** geographical latitude */
219
+ latitude?: number;
220
+ /** geographical longitude */
221
+ longitude?: number;
222
+ /** accuracy radius of the geographical coordinates */
223
+ latLongRadiusKm?: number;
224
+ }
225
+ export interface ApplicationUser {
226
+ /** unique application user resource identifier */
227
+ id: string;
228
+ /** URI of the application user API resource */
229
+ uri: string;
230
+ /** identity provider that the user authenticated with */
231
+ identityProvider: IdentityProvider;
232
+ /** unique user identifier */
233
+ providerUserId: string;
234
+ /** user username */
235
+ username?: string;
236
+ /** user email */
237
+ email?: string;
238
+ /** user common name */
239
+ name?: string;
240
+ /** timestamp when the user was created in RFC 3339 format */
241
+ createdAt?: Date;
242
+ /** timestamp when the user was last active in RFC 3339 format */
243
+ lastActive?: Date;
244
+ /** timestamp when the user last signed-in in RFC 3339 format */
245
+ lastLogin?: Date;
246
+ }
247
+ export interface ApplicationUserList {
248
+ /** list of all application users on this account */
249
+ applicationUsers: Array<ApplicationUser>;
250
+ /** URI of the application user list API resource */
251
+ uri: string;
252
+ /** URI of the next page, or null if there is no next page */
253
+ nextPageUri?: string;
254
+ }
255
+ export interface IdentityProvider {
256
+ /** name of the identity provider (e.g. Google) */
257
+ name: string;
258
+ /** URL of the identity provider (e.g. https://accounts.google.com) */
259
+ url: string;
260
+ }
261
+ export interface TunnelSession {
262
+ /** version of the ngrok agent that started this ngrok tunnel session */
263
+ agentVersion: string;
264
+ /** reference to the tunnel credential or ssh credential used by the ngrok agent to start this tunnel session */
265
+ credential: Ref;
266
+ /** unique tunnel session resource identifier */
267
+ id: string;
268
+ /** source ip address of the tunnel session */
269
+ ip: string;
270
+ /** arbitrary user-defined data specified in the metadata property in the ngrok configuration file. See the metadata configuration option */
271
+ metadata?: string;
272
+ /** operating system of the host the ngrok agent is running on */
273
+ os: string;
274
+ /** the ngrok region identifier in which this tunnel session was started */
275
+ region: string;
276
+ /** time when the tunnel session first connected to the ngrok servers */
277
+ startedAt: Date;
278
+ /** the transport protocol used to start the tunnel session. Either `ngrok/v2` or `ssh` */
279
+ transport: string;
280
+ /** URI to the API resource of the tunnel session */
281
+ uri: string;
282
+ }
283
+ export interface TunnelSessionList {
284
+ /** list of all tunnel sessions on this account */
285
+ tunnelSessions: Array<TunnelSession>;
286
+ /** URI to the API resource of the tunnel session list */
287
+ uri: string;
288
+ /** URI of the next page, or null if there is no next page */
289
+ nextPageUri?: string;
290
+ }
291
+ export interface TunnelSessionsUpdate {
292
+ id: string;
293
+ }
127
294
  export interface FailoverBackend {
128
295
  /** unique identifier for this Failover backend */
129
296
  id: string;
130
297
  /** URI of the FailoverBackend API resource */
131
298
  uri: string;
132
299
  /** timestamp when the backend was created, RFC 3339 format */
133
- createdAt: string;
300
+ createdAt: Date;
134
301
  /** human-readable description of this backend. Optional */
135
- description: string;
302
+ description?: string;
136
303
  /** arbitrary user-defined machine-readable data of this backend. Optional */
137
- metadata: string;
304
+ metadata?: string;
138
305
  /** the ids of the child backends in order */
139
306
  backends: Array<string>;
140
307
  }
141
308
  export interface FailoverBackendCreate {
142
309
  /** human-readable description of this backend. Optional */
143
- description: string;
310
+ description?: string;
144
311
  /** arbitrary user-defined machine-readable data of this backend. Optional */
145
- metadata: string;
312
+ metadata?: string;
146
313
  /** the ids of the child backends in order */
147
314
  backends: Array<string>;
148
315
  }
@@ -168,11 +335,11 @@ export interface HTTPResponseBackend {
168
335
  /** URI of the HTTPResponseBackend API resource */
169
336
  uri: string;
170
337
  /** timestamp when the backend was created, RFC 3339 format */
171
- createdAt: string;
338
+ createdAt: Date;
172
339
  /** human-readable description of this backend. Optional */
173
- description: string;
340
+ description?: string;
174
341
  /** arbitrary user-defined machine-readable data of this backend. Optional */
175
- metadata: string;
342
+ metadata?: string;
176
343
  /** body to return as fixed content */
177
344
  body: string;
178
345
  /** headers to return */
@@ -182,9 +349,9 @@ export interface HTTPResponseBackend {
182
349
  }
183
350
  export interface HTTPResponseBackendCreate {
184
351
  /** human-readable description of this backend. Optional */
185
- description: string;
352
+ description?: string;
186
353
  /** arbitrary user-defined machine-readable data of this backend. Optional */
187
- metadata: string;
354
+ metadata?: string;
188
355
  /** body to return as fixed content */
189
356
  body: string;
190
357
  /** headers to return */
@@ -216,11 +383,11 @@ export interface TunnelGroupBackend {
216
383
  /** URI of the TunnelGroupBackend API resource */
217
384
  uri: string;
218
385
  /** timestamp when the backend was created, RFC 3339 format */
219
- createdAt: string;
386
+ createdAt: Date;
220
387
  /** human-readable description of this backend. Optional */
221
- description: string;
388
+ description?: string;
222
389
  /** arbitrary user-defined machine-readable data of this backend. Optional */
223
- metadata: string;
390
+ metadata?: string;
224
391
  /** labels to watch for tunnels on, e.g. app->foo, dc->bar */
225
392
  labels: Map<string, string>;
226
393
  /** tunnels matching this backend */
@@ -228,9 +395,9 @@ export interface TunnelGroupBackend {
228
395
  }
229
396
  export interface TunnelGroupBackendCreate {
230
397
  /** human-readable description of this backend. Optional */
231
- description: string;
398
+ description?: string;
232
399
  /** arbitrary user-defined machine-readable data of this backend. Optional */
233
- metadata: string;
400
+ metadata?: string;
234
401
  /** labels to watch for tunnels on, e.g. app->foo, dc->bar */
235
402
  labels: Map<string, string>;
236
403
  }
@@ -257,19 +424,19 @@ export interface WeightedBackend {
257
424
  /** URI of the WeightedBackend API resource */
258
425
  uri: string;
259
426
  /** timestamp when the backend was created, RFC 3339 format */
260
- createdAt: string;
427
+ createdAt: Date;
261
428
  /** human-readable description of this backend. Optional */
262
- description: string;
429
+ description?: string;
263
430
  /** arbitrary user-defined machine-readable data of this backend. Optional */
264
- metadata: string;
431
+ metadata?: string;
265
432
  /** the ids of the child backends to their weights [0-10000] */
266
433
  backends: Map<string, number>;
267
434
  }
268
435
  export interface WeightedBackendCreate {
269
436
  /** human-readable description of this backend. Optional */
270
- description: string;
437
+ description?: string;
271
438
  /** arbitrary user-defined machine-readable data of this backend. Optional */
272
- metadata: string;
439
+ metadata?: string;
273
440
  /** the ids of the child backends to their weights [0-10000] */
274
441
  backends: Map<string, number>;
275
442
  }
@@ -292,9 +459,9 @@ export interface WeightedBackendList {
292
459
  }
293
460
  export interface CertificateAuthorityCreate {
294
461
  /** human-readable description of this Certificate Authority. optional, max 255 bytes. */
295
- description: string;
462
+ description?: string;
296
463
  /** arbitrary user-defined machine-readable data of this Certificate Authority. optional, max 4096 bytes. */
297
- metadata: string;
464
+ metadata?: string;
298
465
  /** raw PEM of the Certificate Authority */
299
466
  caPem: string;
300
467
  }
@@ -311,19 +478,19 @@ export interface CertificateAuthority {
311
478
  /** URI of the Certificate Authority API resource */
312
479
  uri: string;
313
480
  /** timestamp when the Certificate Authority was created, RFC 3339 format */
314
- createdAt: string;
481
+ createdAt: Date;
315
482
  /** human-readable description of this Certificate Authority. optional, max 255 bytes. */
316
- description: string;
483
+ description?: string;
317
484
  /** arbitrary user-defined machine-readable data of this Certificate Authority. optional, max 4096 bytes. */
318
- metadata: string;
485
+ metadata?: string;
319
486
  /** raw PEM of the Certificate Authority */
320
487
  caPem: string;
321
488
  /** subject common name of the Certificate Authority */
322
489
  subjectCommonName: string;
323
490
  /** timestamp when this Certificate Authority becomes valid, RFC 3339 format */
324
- notBefore: string;
491
+ notBefore: Date;
325
492
  /** timestamp when this Certificate Authority becomes invalid, RFC 3339 format */
326
- notAfter: string;
493
+ notAfter: Date;
327
494
  /** set of actions the private key of this Certificate Authority can be used for */
328
495
  keyUsages: Array<string>;
329
496
  /** extended set of actions the private key of this Certificate Authority can be used for */
@@ -339,11 +506,13 @@ export interface CertificateAuthorityList {
339
506
  }
340
507
  export interface CredentialCreate {
341
508
  /** human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes. */
342
- description: string;
509
+ description?: string;
343
510
  /** arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes. */
344
- metadata: string;
345
- /** 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. */
511
+ metadata?: string;
512
+ /** 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. */
346
513
  acl: Array<string>;
514
+ /** 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. */
515
+ ownerId?: string;
347
516
  }
348
517
  export interface CredentialUpdate {
349
518
  id: string;
@@ -351,7 +520,7 @@ export interface CredentialUpdate {
351
520
  description?: string;
352
521
  /** arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes. */
353
522
  metadata?: string;
354
- /** 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. */
523
+ /** 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. */
355
524
  acl?: Array<string>;
356
525
  }
357
526
  export interface Credential {
@@ -360,15 +529,17 @@ export interface Credential {
360
529
  /** URI of the tunnel credential API resource */
361
530
  uri: string;
362
531
  /** timestamp when the tunnel credential was created, RFC 3339 format */
363
- createdAt: string;
532
+ createdAt: Date;
364
533
  /** human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes. */
365
- description: string;
534
+ description?: string;
366
535
  /** arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes. */
367
- metadata: string;
536
+ metadata?: string;
368
537
  /** 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.** */
369
538
  token?: string;
370
- /** 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. */
539
+ /** 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. */
371
540
  acl: Array<string>;
541
+ /** 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. */
542
+ ownerId?: string;
372
543
  }
373
544
  export interface CredentialList {
374
545
  /** the list of all tunnel credentials on this account */
@@ -381,7 +552,7 @@ export interface CredentialList {
381
552
  export interface EndpointWebhookValidation {
382
553
  /** `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified */
383
554
  enabled?: boolean;
384
- /** 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`. */
555
+ /** 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 */
385
556
  provider: string;
386
557
  /** a string secret used to validate requests from the given provider. All providers except AWS SNS require a secret */
387
558
  secret: string;
@@ -435,6 +606,7 @@ export interface EndpointResponseHeaders {
435
606
  export interface EndpointIPPolicy {
436
607
  /** `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified */
437
608
  enabled?: boolean;
609
+ /** list of all IP policies that will be used to check if a source IP is allowed access to the endpoint */
438
610
  ipPolicies: Array<Ref>;
439
611
  }
440
612
  export interface EndpointIPPolicyMutate {
@@ -482,6 +654,14 @@ export interface EndpointOAuthProvider {
482
654
  microsoft?: EndpointOAuthMicrosoft;
483
655
  /** configuration for using google as the identity provider */
484
656
  google?: EndpointOAuthGoogle;
657
+ /** configuration for using linkedin as the identity provider */
658
+ linkedin?: EndpointOAuthLinkedIn;
659
+ /** configuration for using gitlab as the identity provider */
660
+ gitlab?: EndpointOAuthGitLab;
661
+ /** configuration for using twitch as the identity provider */
662
+ twitch?: EndpointOAuthTwitch;
663
+ /** configuration for using amazon as the identity provider */
664
+ amazon?: EndpointOAuthAmazon;
485
665
  }
486
666
  export interface EndpointOAuthGitHub {
487
667
  /** the OAuth app client ID. retrieve it from the identity provider's dashboard where you created your own OAuth app. optional. if unspecified, ngrok will use its own managed oauth application which has additional restrictions. see the OAuth module docs for more details. if present, client_secret must be present as well. */
@@ -489,15 +669,15 @@ export interface EndpointOAuthGitHub {
489
669
  /** 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`. */
490
670
  clientSecret?: string;
491
671
  /** 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) */
492
- scopes: Array<string>;
672
+ scopes?: Array<string>;
493
673
  /** a list of email addresses of users authenticated by identity provider who are allowed access to the endpoint */
494
- emailAddresses: Array<string>;
674
+ emailAddresses?: Array<string>;
495
675
  /** a list of email domains of users authenticated by identity provider who are allowed access to the endpoint */
496
- emailDomains: Array<string>;
676
+ emailDomains?: Array<string>;
497
677
  /** 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` */
498
- teams: Array<string>;
678
+ teams?: Array<string>;
499
679
  /** 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' */
500
- organizations: Array<string>;
680
+ organizations?: Array<string>;
501
681
  }
502
682
  export interface EndpointOAuthFacebook {
503
683
  /** the OAuth app client ID. retrieve it from the identity provider's dashboard where you created your own OAuth app. optional. if unspecified, ngrok will use its own managed oauth application which has additional restrictions. see the OAuth module docs for more details. if present, client_secret must be present as well. */
@@ -535,6 +715,34 @@ export interface EndpointOAuthGoogle {
535
715
  /** a list of email domains of users authenticated by identity provider who are allowed access to the endpoint */
536
716
  emailDomains: Array<string>;
537
717
  }
718
+ export interface EndpointOAuthLinkedIn {
719
+ clientId?: string;
720
+ clientSecret?: string;
721
+ scopes: Array<string>;
722
+ emailAddresses: Array<string>;
723
+ emailDomains: Array<string>;
724
+ }
725
+ export interface EndpointOAuthGitLab {
726
+ clientId?: string;
727
+ clientSecret?: string;
728
+ scopes: Array<string>;
729
+ emailAddresses: Array<string>;
730
+ emailDomains: Array<string>;
731
+ }
732
+ export interface EndpointOAuthTwitch {
733
+ clientId?: string;
734
+ clientSecret?: string;
735
+ scopes: Array<string>;
736
+ emailAddresses: Array<string>;
737
+ emailDomains: Array<string>;
738
+ }
739
+ export interface EndpointOAuthAmazon {
740
+ clientId?: string;
741
+ clientSecret?: string;
742
+ scopes: Array<string>;
743
+ emailAddresses: Array<string>;
744
+ emailDomains: Array<string>;
745
+ }
538
746
  export interface EndpointSAML {
539
747
  /** `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified */
540
748
  enabled?: boolean;
@@ -639,9 +847,9 @@ export interface HTTPSEdgeRouteCreate {
639
847
  /** Route selector: "/blog" or "example.com" or "example.com/blog" */
640
848
  match: string;
641
849
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
642
- description: string;
850
+ description?: string;
643
851
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
644
- metadata: string;
852
+ metadata?: string;
645
853
  /** backend module configuration or `null` */
646
854
  backend?: EndpointBackendMutate;
647
855
  /** ip restriction module configuration or `null` */
@@ -675,9 +883,9 @@ export interface HTTPSEdgeRouteUpdate {
675
883
  /** Route selector: "/blog" or "example.com" or "example.com/blog" */
676
884
  match: string;
677
885
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
678
- description: string;
886
+ description?: string;
679
887
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
680
- metadata: string;
888
+ metadata?: string;
681
889
  /** backend module configuration or `null` */
682
890
  backend?: EndpointBackendMutate;
683
891
  /** ip restriction module configuration or `null` */
@@ -707,7 +915,7 @@ export interface HTTPSEdgeRoute {
707
915
  /** unique identifier of this edge route */
708
916
  id: string;
709
917
  /** timestamp when the edge configuration was created, RFC 3339 format */
710
- createdAt: string;
918
+ createdAt: Date;
711
919
  /** Type of match to use for this route. Valid values are "exact_path" and "path_prefix". */
712
920
  matchType: string;
713
921
  /** Route selector: "/blog" or "example.com" or "example.com/blog" */
@@ -715,9 +923,9 @@ export interface HTTPSEdgeRoute {
715
923
  /** URI of the edge API resource */
716
924
  uri: string;
717
925
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
718
- description: string;
926
+ description?: string;
719
927
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
720
- metadata: string;
928
+ metadata?: string;
721
929
  /** backend module configuration or `null` */
722
930
  backend?: EndpointBackend;
723
931
  /** ip restriction module configuration or `null` */
@@ -751,9 +959,9 @@ export interface HTTPSEdgeList {
751
959
  }
752
960
  export interface HTTPSEdgeCreate {
753
961
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
754
- description: string;
962
+ description?: string;
755
963
  /** arbitrary user-defined machine-readable data of this edge; optional, max 4096 bytes. */
756
- metadata: string;
964
+ metadata?: string;
757
965
  /** hostports served by this edge */
758
966
  hostports?: Array<string>;
759
967
  /** edge modules */
@@ -777,11 +985,11 @@ export interface HTTPSEdge {
777
985
  /** unique identifier of this edge */
778
986
  id: string;
779
987
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
780
- description: string;
988
+ description?: string;
781
989
  /** arbitrary user-defined machine-readable data of this edge; optional, max 4096 bytes. */
782
- metadata: string;
990
+ metadata?: string;
783
991
  /** timestamp when the edge configuration was created, RFC 3339 format */
784
- createdAt: string;
992
+ createdAt: Date;
785
993
  /** URI of the edge API resource */
786
994
  uri: string;
787
995
  /** hostports served by this edge */
@@ -877,9 +1085,9 @@ export interface TCPEdgeList {
877
1085
  }
878
1086
  export interface TCPEdgeCreate {
879
1087
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
880
- description: string;
1088
+ description?: string;
881
1089
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
882
- metadata: string;
1090
+ metadata?: string;
883
1091
  /** hostports served by this edge */
884
1092
  hostports?: Array<string>;
885
1093
  /** edge modules */
@@ -903,11 +1111,11 @@ export interface TCPEdge {
903
1111
  /** unique identifier of this edge */
904
1112
  id: string;
905
1113
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
906
- description: string;
1114
+ description?: string;
907
1115
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
908
- metadata: string;
1116
+ metadata?: string;
909
1117
  /** timestamp when the edge was created, RFC 3339 format */
910
- createdAt: string;
1118
+ createdAt: Date;
911
1119
  /** URI of the edge API resource */
912
1120
  uri: string;
913
1121
  /** hostports served by this edge */
@@ -926,9 +1134,9 @@ export interface TLSEdgeList {
926
1134
  }
927
1135
  export interface TLSEdgeCreate {
928
1136
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
929
- description: string;
1137
+ description?: string;
930
1138
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
931
- metadata: string;
1139
+ metadata?: string;
932
1140
  /** hostports served by this edge */
933
1141
  hostports?: Array<string>;
934
1142
  /** edge modules */
@@ -956,11 +1164,11 @@ export interface TLSEdge {
956
1164
  /** unique identifier of this edge */
957
1165
  id: string;
958
1166
  /** human-readable description of what this edge will be used for; optional, max 255 bytes. */
959
- description: string;
1167
+ description?: string;
960
1168
  /** arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes. */
961
- metadata: string;
1169
+ metadata?: string;
962
1170
  /** timestamp when the edge configuration was created, RFC 3339 format */
963
- createdAt: string;
1171
+ createdAt: Date;
964
1172
  /** URI of the edge API resource */
965
1173
  uri: string;
966
1174
  /** hostports served by this edge */
@@ -975,11 +1183,11 @@ export interface Endpoint {
975
1183
  /** unique endpoint resource identifier */
976
1184
  id: string;
977
1185
  /** identifier of the region this endpoint belongs to */
978
- region: string;
1186
+ region?: string;
979
1187
  /** timestamp when the endpoint was created in RFC 3339 format */
980
- createdAt: string;
1188
+ createdAt?: Date;
981
1189
  /** timestamp when the endpoint was updated in RFC 3339 format */
982
- updatedAt: string;
1190
+ updatedAt?: Date;
983
1191
  /** URL of the hostport served by this endpoint */
984
1192
  publicUrl: string;
985
1193
  /** protocol served by this endpoint. one of `http`, `https`, `tcp`, or `tls` */
@@ -989,7 +1197,7 @@ export interface Endpoint {
989
1197
  /** whether the endpoint is `ephemeral` (served directly by an agent-initiated tunnel) or `edge` (served by an edge) */
990
1198
  type: string;
991
1199
  /** user-supplied metadata of the associated tunnel or edge object */
992
- metadata: string;
1200
+ metadata?: string;
993
1201
  /** the domain reserved for this endpoint */
994
1202
  domain?: Ref;
995
1203
  /** the address reserved for this endpoint */
@@ -1009,9 +1217,9 @@ export interface EndpointList {
1009
1217
  }
1010
1218
  export interface EventDestinationCreate {
1011
1219
  /** Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. */
1012
- metadata: string;
1220
+ metadata?: string;
1013
1221
  /** Human-readable description of the Event Destination. Optional, max 255 bytes. */
1014
- description: string;
1222
+ description?: string;
1015
1223
  /** The output format you would like to serialize events into when sending to their target. Currently the only accepted value is `JSON`. */
1016
1224
  format: string;
1017
1225
  /** 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`. */
@@ -1033,11 +1241,11 @@ export interface EventDestination {
1033
1241
  /** Unique identifier for this Event Destination. */
1034
1242
  id: string;
1035
1243
  /** Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. */
1036
- metadata: string;
1244
+ metadata?: string;
1037
1245
  /** Timestamp when the Event Destination was created, RFC 3339 format. */
1038
- createdAt: string;
1246
+ createdAt: Date;
1039
1247
  /** Human-readable description of the Event Destination. Optional, max 255 bytes. */
1040
- description: string;
1248
+ description?: string;
1041
1249
  /** The output format you would like to serialize events into when sending to their target. Currently the only accepted value is `JSON`. */
1042
1250
  format: string;
1043
1251
  /** 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`. */
@@ -1060,6 +1268,8 @@ export interface EventTarget {
1060
1268
  kinesis?: EventTargetKinesis;
1061
1269
  /** Configuration used to send events to Amazon CloudWatch Logs. */
1062
1270
  cloudwatchLogs?: EventTargetCloudwatchLogs;
1271
+ /** Configuration used to send events to Datadog. */
1272
+ datadog?: EventTargetDatadog;
1063
1273
  }
1064
1274
  export interface EventTargetFirehose {
1065
1275
  /** Configuration for how to authenticate into your AWS account. Exactly one of `role` or `creds` should be configured. */
@@ -1079,6 +1289,16 @@ export interface EventTargetCloudwatchLogs {
1079
1289
  /** An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into. */
1080
1290
  logGroupArn: string;
1081
1291
  }
1292
+ export interface EventTargetDatadog {
1293
+ /** Datadog API key to use. */
1294
+ apiKey?: string;
1295
+ /** Tags to send with the event. */
1296
+ ddtags?: string;
1297
+ /** Service name to send with the event. */
1298
+ service?: string;
1299
+ /** Datadog site to send event to. */
1300
+ ddsite?: string;
1301
+ }
1082
1302
  export interface AWSAuth {
1083
1303
  /** A role for ngrok to assume on your behalf to deposit events into your AWS account. */
1084
1304
  role?: AWSRole;
@@ -1097,9 +1317,9 @@ export interface AWSCredentials {
1097
1317
  }
1098
1318
  export interface EventSubscriptionCreate {
1099
1319
  /** Arbitrary customer supplied information intended to be machine readable. Optional, max 4096 chars. */
1100
- metadata: string;
1320
+ metadata?: string;
1101
1321
  /** Arbitrary customer supplied information intended to be human readable. Optional, max 255 chars. */
1102
- description: string;
1322
+ description?: string;
1103
1323
  /** Sources containing the types for which this event subscription will trigger */
1104
1324
  sources: Array<EventSourceReplace>;
1105
1325
  /** A list of Event Destination IDs which should be used for this Event Subscription. */
@@ -1131,11 +1351,11 @@ export interface EventSubscription {
1131
1351
  /** URI of the Event Subscription API resource. */
1132
1352
  uri: string;
1133
1353
  /** When the Event Subscription was created (RFC 3339 format). */
1134
- createdAt: string;
1354
+ createdAt: Date;
1135
1355
  /** Arbitrary customer supplied information intended to be machine readable. Optional, max 4096 chars. */
1136
- metadata: string;
1356
+ metadata?: string;
1137
1357
  /** Arbitrary customer supplied information intended to be human readable. Optional, max 255 chars. */
1138
- description: string;
1358
+ description?: string;
1139
1359
  /** Sources containing the types for which this event subscription will trigger */
1140
1360
  sources: Array<EventSource>;
1141
1361
  /** Destinations to which these events will be sent */
@@ -1183,9 +1403,9 @@ export interface EventSourcePaging {
1183
1403
  }
1184
1404
  export interface IPPolicyCreate {
1185
1405
  /** human-readable description of the source IPs of this IP policy. optional, max 255 bytes. */
1186
- description: string;
1406
+ description?: string;
1187
1407
  /** arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes. */
1188
- metadata: string;
1408
+ metadata?: string;
1189
1409
  }
1190
1410
  export interface IPPolicyUpdate {
1191
1411
  id: string;
@@ -1200,11 +1420,11 @@ export interface IPPolicy {
1200
1420
  /** URI of the IP Policy API resource */
1201
1421
  uri: string;
1202
1422
  /** timestamp when the IP policy was created, RFC 3339 format */
1203
- createdAt: string;
1423
+ createdAt: Date;
1204
1424
  /** human-readable description of the source IPs of this IP policy. optional, max 255 bytes. */
1205
- description: string;
1425
+ description?: string;
1206
1426
  /** arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes. */
1207
- metadata: string;
1427
+ metadata?: string;
1208
1428
  }
1209
1429
  export interface IPPolicyList {
1210
1430
  /** the list of all IP policies on this account */
@@ -1216,9 +1436,9 @@ export interface IPPolicyList {
1216
1436
  }
1217
1437
  export interface IPPolicyRuleCreate {
1218
1438
  /** human-readable description of the source IPs of this IP rule. optional, max 255 bytes. */
1219
- description: string;
1439
+ description?: string;
1220
1440
  /** arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes. */
1221
- metadata: string;
1441
+ metadata?: string;
1222
1442
  /** an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported. */
1223
1443
  cidr: string;
1224
1444
  /** ID of the IP policy this IP policy rule will be attached to */
@@ -1241,11 +1461,11 @@ export interface IPPolicyRule {
1241
1461
  /** URI of the IP policy rule API resource */
1242
1462
  uri: string;
1243
1463
  /** timestamp when the IP policy rule was created, RFC 3339 format */
1244
- createdAt: string;
1464
+ createdAt: Date;
1245
1465
  /** human-readable description of the source IPs of this IP rule. optional, max 255 bytes. */
1246
- description: string;
1466
+ description?: string;
1247
1467
  /** arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes. */
1248
- metadata: string;
1468
+ metadata?: string;
1249
1469
  /** an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported. */
1250
1470
  cidr: string;
1251
1471
  /** object describing the IP policy this IP Policy Rule belongs to */
@@ -1263,9 +1483,9 @@ export interface IPPolicyRuleList {
1263
1483
  }
1264
1484
  export interface IPRestrictionCreate {
1265
1485
  /** human-readable description of this IP restriction. optional, max 255 bytes. */
1266
- description: string;
1486
+ description?: string;
1267
1487
  /** arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes. */
1268
- metadata: string;
1488
+ metadata?: string;
1269
1489
  /** true if the IP restriction will be enforced. if false, only warnings will be issued */
1270
1490
  enforced: boolean;
1271
1491
  /** 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` */
@@ -1290,11 +1510,11 @@ export interface IPRestriction {
1290
1510
  /** URI of the IP restriction API resource */
1291
1511
  uri: string;
1292
1512
  /** timestamp when the IP restriction was created, RFC 3339 format */
1293
- createdAt: string;
1513
+ createdAt: Date;
1294
1514
  /** human-readable description of this IP restriction. optional, max 255 bytes. */
1295
- description: string;
1515
+ description?: string;
1296
1516
  /** arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes. */
1297
- metadata: string;
1517
+ metadata?: string;
1298
1518
  /** true if the IP restriction will be enforced. if false, only warnings will be issued */
1299
1519
  enforced: boolean;
1300
1520
  /** 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` */
@@ -1312,9 +1532,9 @@ export interface IPRestrictionList {
1312
1532
  }
1313
1533
  export interface ReservedAddrCreate {
1314
1534
  /** human-readable description of what this reserved address will be used for */
1315
- description: string;
1535
+ description?: string;
1316
1536
  /** arbitrary user-defined machine-readable data of this reserved address. Optional, max 4096 bytes. */
1317
- metadata: string;
1537
+ metadata?: string;
1318
1538
  /** reserve the address in this geographic ngrok datacenter. Optional, default is us. (au, eu, ap, us, jp, in, sa) */
1319
1539
  region: string;
1320
1540
  }
@@ -1331,11 +1551,11 @@ export interface ReservedAddr {
1331
1551
  /** URI of the reserved address API resource */
1332
1552
  uri: string;
1333
1553
  /** timestamp when the reserved address was created, RFC 3339 format */
1334
- createdAt: string;
1554
+ createdAt: Date;
1335
1555
  /** human-readable description of what this reserved address will be used for */
1336
- description: string;
1556
+ description?: string;
1337
1557
  /** arbitrary user-defined machine-readable data of this reserved address. Optional, max 4096 bytes. */
1338
- metadata: string;
1558
+ metadata?: string;
1339
1559
  /** hostname:port of the reserved address that was assigned at creation time */
1340
1560
  addr: string;
1341
1561
  /** reserve the address in this geographic ngrok datacenter. Optional, default is us. (au, eu, ap, us, jp, in, sa) */
@@ -1350,14 +1570,14 @@ export interface ReservedAddrList {
1350
1570
  nextPageUri?: string;
1351
1571
  }
1352
1572
  export interface ReservedDomainCreate {
1353
- /** 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. */
1354
- name: string;
1573
+ /** hostname of the reserved domain */
1574
+ domain: string;
1355
1575
  /** reserve the domain in this geographic ngrok datacenter. Optional, default is us. (au, eu, ap, us, jp, in, sa) */
1356
1576
  region: string;
1357
1577
  /** human-readable description of what this reserved domain will be used for */
1358
- description: string;
1578
+ description?: string;
1359
1579
  /** arbitrary user-defined machine-readable data of this reserved domain. Optional, max 4096 bytes. */
1360
- metadata: string;
1580
+ metadata?: string;
1361
1581
  /** ID of a user-uploaded TLS certificate to use for connections to targeting this domain. Optional, mutually exclusive with `certificate_management_policy`. */
1362
1582
  certificateId?: string;
1363
1583
  /** configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled. Optional, mutually exclusive with `certificate_id`. */
@@ -1380,11 +1600,11 @@ export interface ReservedDomain {
1380
1600
  /** URI of the reserved domain API resource */
1381
1601
  uri: string;
1382
1602
  /** timestamp when the reserved domain was created, RFC 3339 format */
1383
- createdAt: string;
1603
+ createdAt: Date;
1384
1604
  /** human-readable description of what this reserved domain will be used for */
1385
- description: string;
1605
+ description?: string;
1386
1606
  /** arbitrary user-defined machine-readable data of this reserved domain. Optional, max 4096 bytes. */
1387
- metadata: string;
1607
+ metadata?: string;
1388
1608
  /** hostname of the reserved domain */
1389
1609
  domain: string;
1390
1610
  /** reserve the domain in this geographic ngrok datacenter. Optional, default is us. (au, eu, ap, us, jp, in, sa) */
@@ -1416,7 +1636,7 @@ export interface ReservedDomainCertPolicy {
1416
1636
  }
1417
1637
  export interface ReservedDomainCertStatus {
1418
1638
  /** timestamp when the next renewal will be requested, RFC 3339 format */
1419
- renewsAt?: string;
1639
+ renewsAt?: Date;
1420
1640
  /** status of the certificate provisioning job, or null if the certificiate isn't being provisioned or renewed */
1421
1641
  provisioningJob?: ReservedDomainCertJob;
1422
1642
  }
@@ -1426,15 +1646,15 @@ export interface ReservedDomainCertJob {
1426
1646
  /** a message describing the current status or error */
1427
1647
  msg: string;
1428
1648
  /** timestamp when the provisioning job started, RFC 3339 format */
1429
- startedAt: string;
1649
+ startedAt: Date;
1430
1650
  /** timestamp when the provisioning job will be retried */
1431
- retriesAt?: string;
1651
+ retriesAt?: Date;
1432
1652
  }
1433
1653
  export interface SSHCertificateAuthorityCreate {
1434
1654
  /** human-readable description of this SSH Certificate Authority. optional, max 255 bytes. */
1435
- description: string;
1655
+ description?: string;
1436
1656
  /** arbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes. */
1437
- metadata: string;
1657
+ metadata?: string;
1438
1658
  /** the type of private key to generate. one of `rsa`, `ecdsa`, `ed25519` */
1439
1659
  privateKeyType: string;
1440
1660
  /** the type of elliptic curve to use when creating an ECDSA key */
@@ -1455,11 +1675,11 @@ export interface SSHCertificateAuthority {
1455
1675
  /** URI of the SSH Certificate Authority API resource */
1456
1676
  uri: string;
1457
1677
  /** timestamp when the SSH Certificate Authority API resource was created, RFC 3339 format */
1458
- createdAt: string;
1678
+ createdAt: Date;
1459
1679
  /** human-readable description of this SSH Certificate Authority. optional, max 255 bytes. */
1460
- description: string;
1680
+ description?: string;
1461
1681
  /** arbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes. */
1462
- metadata: string;
1682
+ metadata?: string;
1463
1683
  /** raw public key for this SSH Certificate Authority */
1464
1684
  publicKey: string;
1465
1685
  /** the type of private key for this SSH Certificate Authority */
@@ -1475,13 +1695,15 @@ export interface SSHCertificateAuthorityList {
1475
1695
  }
1476
1696
  export interface SSHCredentialCreate {
1477
1697
  /** human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes. */
1478
- description: string;
1698
+ description?: string;
1479
1699
  /** arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes. */
1480
- metadata: string;
1481
- /** 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. */
1700
+ metadata?: string;
1701
+ /** 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. */
1482
1702
  acl: Array<string>;
1483
1703
  /** the PEM-encoded public key of the SSH keypair that will be used to authenticate */
1484
1704
  publicKey: string;
1705
+ /** 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. */
1706
+ ownerId?: string;
1485
1707
  }
1486
1708
  export interface SSHCredentialUpdate {
1487
1709
  id: string;
@@ -1489,7 +1711,7 @@ export interface SSHCredentialUpdate {
1489
1711
  description?: string;
1490
1712
  /** arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes. */
1491
1713
  metadata?: string;
1492
- /** 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. */
1714
+ /** 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. */
1493
1715
  acl?: Array<string>;
1494
1716
  }
1495
1717
  export interface SSHCredential {
@@ -1498,15 +1720,17 @@ export interface SSHCredential {
1498
1720
  /** URI of the ssh credential API resource */
1499
1721
  uri: string;
1500
1722
  /** timestamp when the ssh credential was created, RFC 3339 format */
1501
- createdAt: string;
1723
+ createdAt: Date;
1502
1724
  /** human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes. */
1503
- description: string;
1725
+ description?: string;
1504
1726
  /** arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes. */
1505
- metadata: string;
1727
+ metadata?: string;
1506
1728
  /** the PEM-encoded public key of the SSH keypair that will be used to authenticate */
1507
1729
  publicKey: string;
1508
- /** 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. */
1730
+ /** 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. */
1509
1731
  acl: Array<string>;
1732
+ /** 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. */
1733
+ ownerId?: string;
1510
1734
  }
1511
1735
  export interface SSHCredentialList {
1512
1736
  /** the list of all ssh credentials on this account */
@@ -1524,13 +1748,13 @@ export interface SSHHostCertificateCreate {
1524
1748
  /** 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. */
1525
1749
  principals: Array<string>;
1526
1750
  /** The time when the host certificate becomes valid, in RFC 3339 format. Defaults to the current time if unspecified. */
1527
- validAfter: string;
1751
+ validAfter: Date;
1528
1752
  /** 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`. */
1529
- validUntil: string;
1753
+ validUntil: Date;
1530
1754
  /** human-readable description of this SSH Host Certificate. optional, max 255 bytes. */
1531
- description: string;
1755
+ description?: string;
1532
1756
  /** arbitrary user-defined machine-readable data of this SSH Host Certificate. optional, max 4096 bytes. */
1533
- metadata: string;
1757
+ metadata?: string;
1534
1758
  }
1535
1759
  export interface SSHHostCertificateUpdate {
1536
1760
  id: string;
@@ -1545,11 +1769,11 @@ export interface SSHHostCertificate {
1545
1769
  /** URI of the SSH Host Certificate API resource */
1546
1770
  uri: string;
1547
1771
  /** timestamp when the SSH Host Certificate API resource was created, RFC 3339 format */
1548
- createdAt: string;
1772
+ createdAt: Date;
1549
1773
  /** human-readable description of this SSH Host Certificate. optional, max 255 bytes. */
1550
- description: string;
1774
+ description?: string;
1551
1775
  /** arbitrary user-defined machine-readable data of this SSH Host Certificate. optional, max 4096 bytes. */
1552
- metadata: string;
1776
+ metadata?: string;
1553
1777
  /** a public key in OpenSSH Authorized Keys format that this certificate signs */
1554
1778
  publicKey: string;
1555
1779
  /** the key type of the `public_key`, one of `rsa`, `ecdsa` or `ed25519` */
@@ -1559,9 +1783,9 @@ export interface SSHHostCertificate {
1559
1783
  /** 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. */
1560
1784
  principals: Array<string>;
1561
1785
  /** the time when the ssh host certificate becomes valid, in RFC 3339 format. */
1562
- validAfter: string;
1786
+ validAfter: Date;
1563
1787
  /** the time after which the ssh host certificate becomes invalid, in RFC 3339 format. the OpenSSH certificates RFC calls this `valid_before`. */
1564
- validUntil: string;
1788
+ validUntil: Date;
1565
1789
  /** 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 */
1566
1790
  certificate: string;
1567
1791
  }
@@ -1585,13 +1809,13 @@ export interface SSHUserCertificateCreate {
1585
1809
  /** 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. */
1586
1810
  extensions: Map<string, string>;
1587
1811
  /** The time when the user certificate becomes valid, in RFC 3339 format. Defaults to the current time if unspecified. */
1588
- validAfter: string;
1812
+ validAfter: Date;
1589
1813
  /** 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`. */
1590
- validUntil: string;
1814
+ validUntil: Date;
1591
1815
  /** human-readable description of this SSH User Certificate. optional, max 255 bytes. */
1592
- description: string;
1816
+ description?: string;
1593
1817
  /** arbitrary user-defined machine-readable data of this SSH User Certificate. optional, max 4096 bytes. */
1594
- metadata: string;
1818
+ metadata?: string;
1595
1819
  }
1596
1820
  export interface SSHUserCertificateUpdate {
1597
1821
  id: string;
@@ -1606,11 +1830,11 @@ export interface SSHUserCertificate {
1606
1830
  /** URI of the SSH User Certificate API resource */
1607
1831
  uri: string;
1608
1832
  /** timestamp when the SSH User Certificate API resource was created, RFC 3339 format */
1609
- createdAt: string;
1833
+ createdAt: Date;
1610
1834
  /** human-readable description of this SSH User Certificate. optional, max 255 bytes. */
1611
- description: string;
1835
+ description?: string;
1612
1836
  /** arbitrary user-defined machine-readable data of this SSH User Certificate. optional, max 4096 bytes. */
1613
- metadata: string;
1837
+ metadata?: string;
1614
1838
  /** a public key in OpenSSH Authorized Keys format that this certificate signs */
1615
1839
  publicKey: string;
1616
1840
  /** the key type of the `public_key`, one of `rsa`, `ecdsa` or `ed25519` */
@@ -1624,9 +1848,9 @@ export interface SSHUserCertificate {
1624
1848
  /** 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. */
1625
1849
  extensions: Map<string, string>;
1626
1850
  /** the time when the ssh host certificate becomes valid, in RFC 3339 format. */
1627
- validAfter: string;
1851
+ validAfter: Date;
1628
1852
  /** the time after which the ssh host certificate becomes invalid, in RFC 3339 format. the OpenSSH certificates RFC calls this `valid_before`. */
1629
- validUntil: string;
1853
+ validUntil: Date;
1630
1854
  /** 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 */
1631
1855
  certificate: string;
1632
1856
  }
@@ -1640,12 +1864,12 @@ export interface SSHUserCertificateList {
1640
1864
  }
1641
1865
  export interface TLSCertificateCreate {
1642
1866
  /** human-readable description of this TLS certificate. optional, max 255 bytes. */
1643
- description: string;
1867
+ description?: string;
1644
1868
  /** arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes. */
1645
- metadata: string;
1646
- /** chain of PEM-encoded certificates, leaf first. See [Certificate Bundles](https://ngrok.com/docs/api#tls-certificates-pem). */
1869
+ metadata?: string;
1870
+ /** chain of PEM-encoded certificates, leaf first. See [Certificate Bundles](https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains). */
1647
1871
  certificatePem: string;
1648
- /** private key for the TLS certificate, PEM-encoded. See [Private Keys](https://ngrok.com/docs/ngrok-link#tls-certificates-key). */
1872
+ /** private key for the TLS certificate, PEM-encoded. See [Private Keys](https://ngrok.com/docs/cloud-edge/endpoints#private-keys). */
1649
1873
  privateKeyPem: string;
1650
1874
  }
1651
1875
  export interface TLSCertificateUpdate {
@@ -1661,23 +1885,23 @@ export interface TLSCertificate {
1661
1885
  /** URI of the TLS certificate API resource */
1662
1886
  uri: string;
1663
1887
  /** timestamp when the TLS certificate was created, RFC 3339 format */
1664
- createdAt: string;
1888
+ createdAt: Date;
1665
1889
  /** human-readable description of this TLS certificate. optional, max 255 bytes. */
1666
- description: string;
1890
+ description?: string;
1667
1891
  /** arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes. */
1668
- metadata: string;
1669
- /** chain of PEM-encoded certificates, leaf first. See [Certificate Bundles](https://ngrok.com/docs/api#tls-certificates-pem). */
1892
+ metadata?: string;
1893
+ /** chain of PEM-encoded certificates, leaf first. See [Certificate Bundles](https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains). */
1670
1894
  certificatePem: string;
1671
1895
  /** subject common name from the leaf of this TLS certificate */
1672
1896
  subjectCommonName: string;
1673
1897
  /** subject alternative names (SANs) from the leaf of this TLS certificate */
1674
1898
  subjectAlternativeNames: TLSCertificateSANs;
1675
1899
  /** timestamp (in RFC 3339 format) when this TLS certificate was issued automatically, or null if this certificate was user-uploaded */
1676
- issuedAt?: string;
1900
+ issuedAt?: Date;
1677
1901
  /** timestamp when this TLS certificate becomes valid, RFC 3339 format */
1678
- notBefore: string;
1902
+ notBefore: Date;
1679
1903
  /** timestamp when this TLS certificate becomes invalid, RFC 3339 format */
1680
- notAfter: string;
1904
+ notAfter: Date;
1681
1905
  /** set of actions the private key of this TLS certificate can be used for */
1682
1906
  keyUsages: Array<string>;
1683
1907
  /** extended set of actions the private key of this TLS certificate can be used for */
@@ -1713,50 +1937,17 @@ export interface TLSCertificateSANs {
1713
1937
  /** set of IP addresses this TLS certificate is also valid for */
1714
1938
  ips: Array<string>;
1715
1939
  }
1716
- export interface TunnelSession {
1717
- /** version of the ngrok agent that started this ngrok tunnel session */
1718
- agentVersion: string;
1719
- /** reference to the tunnel credential or ssh credential used by the ngrok agent to start this tunnel session */
1720
- credential: Ref;
1721
- /** unique tunnel session resource identifier */
1722
- id: string;
1723
- /** source ip address of the tunnel session */
1724
- ip: string;
1725
- /** arbitrary user-defined data specified in the metadata property in the ngrok configuration file. See the metadata configuration option */
1726
- metadata: string;
1727
- /** operating system of the host the ngrok agent is running on */
1728
- os: string;
1729
- /** the ngrok region identifier in which this tunnel session was started */
1730
- region: string;
1731
- /** time when the tunnel session first connected to the ngrok servers */
1732
- startedAt: string;
1733
- /** the transport protocol used to start the tunnel session. Either `ngrok/v2` or `ssh` */
1734
- transport: string;
1735
- /** URI to the API resource of the tunnel session */
1736
- uri: string;
1737
- }
1738
- export interface TunnelSessionList {
1739
- /** list of all tunnel sessions on this account */
1740
- tunnelSessions: Array<TunnelSession>;
1741
- /** URI to the API resource of the tunnel session list */
1742
- uri: string;
1743
- /** URI of the next page, or null if there is no next page */
1744
- nextPageUri?: string;
1745
- }
1746
- export interface TunnelSessionsUpdate {
1747
- id: string;
1748
- }
1749
1940
  export interface Tunnel {
1750
1941
  /** unique tunnel resource identifier */
1751
1942
  id: string;
1752
1943
  /** URL of the ephemeral tunnel's public endpoint */
1753
- publicUrl: string;
1944
+ publicUrl?: string;
1754
1945
  /** timestamp when the tunnel was initiated in RFC 3339 format */
1755
- startedAt: string;
1756
- /** 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). */
1757
- metadata: string;
1946
+ startedAt: Date;
1947
+ /** 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). */
1948
+ metadata?: string;
1758
1949
  /** tunnel protocol for ephemeral tunnels. one of `http`, `https`, `tcp` or `tls` */
1759
- proto: string;
1950
+ proto?: string;
1760
1951
  /** identifier of tune region where the tunnel is running */
1761
1952
  region: string;
1762
1953
  /** reference object pointing to the tunnel session on which this tunnel was started */
@@ -1764,7 +1955,7 @@ export interface Tunnel {
1764
1955
  /** the ephemeral endpoint this tunnel is associated with, if this is an agent-initiated tunnel */
1765
1956
  endpoint?: Ref;
1766
1957
  /** the labels the tunnel group backends will match against, if this is a backend tunnel */
1767
- labels: Map<string, string>;
1958
+ labels?: Map<string, string>;
1768
1959
  /** tunnel group backends served by this backend tunnel */
1769
1960
  backends?: Array<Ref>;
1770
1961
  /** upstream address the ngrok agent forwards traffic over this tunnel to. this may be expressed as a URL or a network address. */