@ngrok/ngrok-api 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/docs/assets/js/search.js +1 -1
- package/docs/classes/client.Ngrok.html +55 -29
- package/docs/classes/services.APIKeys.html +6 -6
- package/docs/classes/services.AbuseReports.html +3 -3
- package/docs/classes/services.AgentIngresses.html +6 -6
- package/docs/classes/services.ApplicationSessions.html +4 -4
- package/docs/classes/services.ApplicationUsers.html +4 -4
- package/docs/classes/services.BotUsers.html +352 -0
- package/docs/classes/services.CertificateAuthorities.html +6 -6
- package/docs/classes/services.Credentials.html +6 -6
- package/docs/classes/services.EdgeRouteBackendModule.html +4 -4
- package/docs/classes/services.EdgeRouteCircuitBreakerModule.html +4 -4
- package/docs/classes/services.EdgeRouteCompressionModule.html +4 -4
- package/docs/classes/services.EdgeRouteIPRestrictionModule.html +4 -4
- package/docs/classes/services.EdgeRouteOAuthModule.html +4 -4
- package/docs/classes/services.EdgeRouteOIDCModule.html +4 -4
- package/docs/classes/services.EdgeRoutePolicyModule.html +270 -0
- package/docs/classes/services.EdgeRouteRequestHeadersModule.html +4 -4
- package/docs/classes/services.EdgeRouteResponseHeadersModule.html +4 -4
- package/docs/classes/services.EdgeRouteSAMLModule.html +4 -4
- package/docs/classes/services.EdgeRouteUserAgentFilterModule.html +270 -0
- package/docs/classes/services.EdgeRouteWebhookVerificationModule.html +4 -4
- package/docs/classes/services.EdgeRouteWebsocketTCPConverterModule.html +4 -4
- package/docs/classes/services.EdgesHTTPS.html +6 -6
- package/docs/classes/services.EdgesHTTPSRoutes.html +5 -5
- package/docs/classes/services.EdgesTCP.html +6 -6
- package/docs/classes/services.EdgesTLS.html +6 -6
- package/docs/classes/services.Endpoints.html +3 -3
- package/docs/classes/services.EventDestinations.html +6 -6
- package/docs/classes/services.EventSources.html +6 -6
- package/docs/classes/services.EventSubscriptions.html +6 -6
- package/docs/classes/services.FailoverBackends.html +6 -6
- package/docs/classes/services.HTTPResponseBackends.html +6 -6
- package/docs/classes/services.HTTPSEdgeMutualTLSModule.html +4 -4
- package/docs/classes/services.HTTPSEdgeTLSTerminationModule.html +4 -4
- package/docs/classes/services.IPPolicies.html +6 -6
- package/docs/classes/services.IPPolicyRules.html +6 -6
- package/docs/classes/services.IPRestrictions.html +6 -6
- package/docs/classes/services.ReservedAddrs.html +6 -6
- package/docs/classes/services.ReservedDomains.html +8 -8
- package/docs/classes/services.SSHCertificateAuthorities.html +6 -6
- package/docs/classes/services.SSHCredentials.html +6 -6
- package/docs/classes/services.SSHHostCertificates.html +6 -6
- package/docs/classes/services.SSHUserCertificates.html +6 -6
- package/docs/classes/services.StaticBackends.html +360 -0
- package/docs/classes/services.TCPEdgeBackendModule.html +4 -4
- package/docs/classes/services.TCPEdgeIPRestrictionModule.html +4 -4
- package/docs/classes/services.TCPEdgePolicyModule.html +270 -0
- package/docs/classes/services.TLSCertificates.html +6 -6
- package/docs/classes/services.TLSEdgeBackendModule.html +4 -4
- package/docs/classes/services.TLSEdgeIPRestrictionModule.html +4 -4
- package/docs/classes/services.TLSEdgeMutualTLSModule.html +4 -4
- package/docs/classes/services.TLSEdgePolicyModule.html +270 -0
- package/docs/classes/services.TLSEdgeTLSTerminationModule.html +4 -4
- package/docs/classes/services.TunnelGroupBackends.html +6 -6
- package/docs/classes/services.TunnelSessions.html +6 -6
- package/docs/classes/services.Tunnels.html +3 -3
- package/docs/classes/services.WeightedBackends.html +6 -6
- package/docs/interfaces/client.NgrokConfig.html +3 -3
- package/docs/interfaces/datatypes.APIKey.html +7 -7
- package/docs/interfaces/datatypes.APIKeyCreate.html +3 -3
- package/docs/interfaces/datatypes.APIKeyList.html +3 -3
- package/docs/interfaces/datatypes.APIKeyUpdate.html +3 -3
- package/docs/interfaces/datatypes.AWSAuth.html +2 -2
- package/docs/interfaces/datatypes.AWSCredentials.html +2 -2
- package/docs/interfaces/datatypes.AWSRole.html +1 -1
- package/docs/interfaces/datatypes.AbuseReport.html +7 -7
- package/docs/interfaces/datatypes.AbuseReportCreate.html +2 -2
- package/docs/interfaces/datatypes.AbuseReportHostname.html +2 -2
- package/docs/interfaces/datatypes.AgentIngress.html +10 -10
- package/docs/interfaces/datatypes.AgentIngressCertJob.html +4 -4
- package/docs/interfaces/datatypes.AgentIngressCertPolicy.html +2 -2
- package/docs/interfaces/datatypes.AgentIngressCertStatus.html +2 -2
- package/docs/interfaces/datatypes.AgentIngressCreate.html +4 -4
- package/docs/interfaces/datatypes.AgentIngressList.html +3 -3
- package/docs/interfaces/datatypes.AgentIngressUpdate.html +4 -4
- package/docs/interfaces/datatypes.ApplicationSession.html +11 -11
- package/docs/interfaces/datatypes.ApplicationSessionList.html +3 -3
- package/docs/interfaces/datatypes.ApplicationUser.html +10 -10
- package/docs/interfaces/datatypes.ApplicationUserList.html +3 -3
- package/docs/interfaces/datatypes.BotUser.html +243 -0
- package/docs/interfaces/datatypes.BotUserCreate.html +186 -0
- package/docs/interfaces/datatypes.BotUserList.html +205 -0
- package/docs/interfaces/datatypes.BotUserUpdate.html +200 -0
- package/docs/interfaces/datatypes.BrowserSession.html +3 -3
- package/docs/interfaces/datatypes.CertificateAuthority.html +11 -11
- package/docs/interfaces/datatypes.CertificateAuthorityCreate.html +3 -3
- package/docs/interfaces/datatypes.CertificateAuthorityList.html +3 -3
- package/docs/interfaces/datatypes.CertificateAuthorityUpdate.html +3 -3
- package/docs/interfaces/datatypes.Credential.html +8 -8
- package/docs/interfaces/datatypes.CredentialCreate.html +4 -4
- package/docs/interfaces/datatypes.CredentialList.html +3 -3
- package/docs/interfaces/datatypes.CredentialUpdate.html +4 -4
- package/docs/interfaces/datatypes.EdgeBackendReplace.html +2 -2
- package/docs/interfaces/datatypes.EdgeIPRestrictionReplace.html +2 -2
- package/docs/interfaces/datatypes.EdgeMutualTLSReplace.html +2 -2
- package/docs/interfaces/datatypes.EdgePolicyReplace.html +176 -0
- package/docs/interfaces/datatypes.EdgeRouteBackendReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRouteCircuitBreakerReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRouteCompressionReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRouteIPRestrictionReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRouteItem.html +2 -2
- package/docs/interfaces/datatypes.EdgeRouteOAuthReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRouteOIDCReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRoutePolicyReplace.html +190 -0
- package/docs/interfaces/datatypes.EdgeRouteRequestHeadersReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRouteResponseHeadersReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRouteSAMLReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRouteUserAgentFilterReplace.html +190 -0
- package/docs/interfaces/datatypes.EdgeRouteWebhookVerificationReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRouteWebsocketTCPConverterReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeTLSTerminationAtEdgeReplace.html +2 -2
- package/docs/interfaces/datatypes.EdgeTLSTerminationReplace.html +2 -2
- package/docs/interfaces/datatypes.Endpoint.html +13 -13
- package/docs/interfaces/datatypes.EndpointAction.html +186 -0
- package/docs/interfaces/datatypes.EndpointBackend.html +2 -2
- package/docs/interfaces/datatypes.EndpointBackendMutate.html +2 -2
- package/docs/interfaces/datatypes.EndpointCircuitBreaker.html +6 -6
- package/docs/interfaces/datatypes.EndpointCompression.html +1 -1
- package/docs/interfaces/datatypes.EndpointIPPolicy.html +2 -2
- package/docs/interfaces/datatypes.EndpointIPPolicyMutate.html +2 -2
- package/docs/interfaces/datatypes.EndpointList.html +3 -3
- package/docs/interfaces/datatypes.EndpointMutualTLS.html +2 -2
- package/docs/interfaces/datatypes.EndpointMutualTLSMutate.html +2 -2
- package/docs/interfaces/datatypes.EndpointOAuth.html +7 -7
- package/docs/interfaces/datatypes.EndpointOAuthAmazon.html +5 -5
- package/docs/interfaces/datatypes.EndpointOAuthFacebook.html +5 -5
- package/docs/interfaces/datatypes.EndpointOAuthGitHub.html +7 -7
- package/docs/interfaces/datatypes.EndpointOAuthGitLab.html +5 -5
- package/docs/interfaces/datatypes.EndpointOAuthGoogle.html +5 -5
- package/docs/interfaces/datatypes.EndpointOAuthLinkedIn.html +5 -5
- package/docs/interfaces/datatypes.EndpointOAuthMicrosoft.html +5 -5
- package/docs/interfaces/datatypes.EndpointOAuthProvider.html +8 -8
- package/docs/interfaces/datatypes.EndpointOAuthTwitch.html +5 -5
- package/docs/interfaces/datatypes.EndpointOIDC.html +9 -9
- package/docs/interfaces/datatypes.EndpointPolicy.html +205 -0
- package/docs/interfaces/datatypes.EndpointRequestHeaders.html +3 -3
- package/docs/interfaces/datatypes.EndpointResponseHeaders.html +3 -3
- package/docs/interfaces/datatypes.EndpointRule.html +205 -0
- package/docs/interfaces/datatypes.EndpointSAML.html +15 -15
- package/docs/interfaces/datatypes.EndpointSAMLMutate.html +10 -10
- package/docs/interfaces/datatypes.EndpointTLSTermination.html +3 -3
- package/docs/interfaces/datatypes.EndpointTLSTerminationAtEdge.html +2 -2
- package/docs/interfaces/datatypes.EndpointUserAgentFilter.html +190 -0
- package/docs/interfaces/datatypes.EndpointWebhookValidation.html +4 -4
- package/docs/interfaces/datatypes.EndpointWebsocketTCPConverter.html +1 -1
- package/docs/interfaces/datatypes.Error.html +4 -4
- package/docs/interfaces/datatypes.EventDestination.html +7 -7
- package/docs/interfaces/datatypes.EventDestinationCreate.html +4 -4
- package/docs/interfaces/datatypes.EventDestinationList.html +3 -3
- package/docs/interfaces/datatypes.EventDestinationUpdate.html +5 -5
- package/docs/interfaces/datatypes.EventSource.html +2 -2
- package/docs/interfaces/datatypes.EventSourceCreate.html +2 -2
- package/docs/interfaces/datatypes.EventSourceItem.html +2 -2
- package/docs/interfaces/datatypes.EventSourceList.html +2 -2
- package/docs/interfaces/datatypes.EventSourcePaging.html +1 -1
- package/docs/interfaces/datatypes.EventSourceReplace.html +1 -1
- package/docs/interfaces/datatypes.EventSourceUpdate.html +2 -2
- package/docs/interfaces/datatypes.EventSubscription.html +7 -7
- package/docs/interfaces/datatypes.EventSubscriptionCreate.html +4 -4
- package/docs/interfaces/datatypes.EventSubscriptionList.html +3 -3
- package/docs/interfaces/datatypes.EventSubscriptionUpdate.html +5 -5
- package/docs/interfaces/datatypes.EventTarget.html +4 -4
- package/docs/interfaces/datatypes.EventTargetCloudwatchLogs.html +2 -2
- package/docs/interfaces/datatypes.EventTargetDatadog.html +4 -4
- package/docs/interfaces/datatypes.EventTargetFirehose.html +2 -2
- package/docs/interfaces/datatypes.EventTargetKinesis.html +2 -2
- package/docs/interfaces/datatypes.FailoverBackend.html +6 -6
- package/docs/interfaces/datatypes.FailoverBackendCreate.html +3 -3
- package/docs/interfaces/datatypes.FailoverBackendList.html +3 -3
- package/docs/interfaces/datatypes.FailoverBackendUpdate.html +4 -4
- package/docs/interfaces/datatypes.HTTPResponseBackend.html +8 -8
- package/docs/interfaces/datatypes.HTTPResponseBackendCreate.html +5 -5
- package/docs/interfaces/datatypes.HTTPResponseBackendList.html +3 -3
- package/docs/interfaces/datatypes.HTTPResponseBackendUpdate.html +6 -6
- package/docs/interfaces/datatypes.HTTPSEdge.html +9 -9
- package/docs/interfaces/datatypes.HTTPSEdgeCreate.html +5 -5
- package/docs/interfaces/datatypes.HTTPSEdgeList.html +3 -3
- package/docs/interfaces/datatypes.HTTPSEdgeRoute.html +52 -19
- package/docs/interfaces/datatypes.HTTPSEdgeRouteCreate.html +49 -16
- package/docs/interfaces/datatypes.HTTPSEdgeRouteUpdate.html +50 -17
- package/docs/interfaces/datatypes.HTTPSEdgeUpdate.html +6 -6
- package/docs/interfaces/datatypes.IPPolicy.html +5 -5
- package/docs/interfaces/datatypes.IPPolicyCreate.html +2 -2
- package/docs/interfaces/datatypes.IPPolicyList.html +3 -3
- package/docs/interfaces/datatypes.IPPolicyRule.html +8 -8
- package/docs/interfaces/datatypes.IPPolicyRuleCreate.html +5 -5
- package/docs/interfaces/datatypes.IPPolicyRuleList.html +3 -3
- package/docs/interfaces/datatypes.IPPolicyRuleUpdate.html +4 -4
- package/docs/interfaces/datatypes.IPPolicyUpdate.html +3 -3
- package/docs/interfaces/datatypes.IPRestriction.html +8 -8
- package/docs/interfaces/datatypes.IPRestrictionCreate.html +5 -5
- package/docs/interfaces/datatypes.IPRestrictionList.html +3 -3
- package/docs/interfaces/datatypes.IPRestrictionUpdate.html +5 -5
- package/docs/interfaces/datatypes.IdentityProvider.html +2 -2
- package/docs/interfaces/datatypes.Item.html +1 -1
- package/docs/interfaces/datatypes.Location.html +4 -4
- package/docs/interfaces/datatypes.Paging.html +2 -2
- package/docs/interfaces/datatypes.Ref.html +2 -2
- package/docs/interfaces/datatypes.ReservedAddr.html +7 -7
- package/docs/interfaces/datatypes.ReservedAddrCreate.html +3 -3
- package/docs/interfaces/datatypes.ReservedAddrList.html +3 -3
- package/docs/interfaces/datatypes.ReservedAddrUpdate.html +3 -3
- package/docs/interfaces/datatypes.ReservedDomain.html +14 -14
- package/docs/interfaces/datatypes.ReservedDomainCertJob.html +4 -4
- package/docs/interfaces/datatypes.ReservedDomainCertPolicy.html +2 -2
- package/docs/interfaces/datatypes.ReservedDomainCertStatus.html +2 -2
- package/docs/interfaces/datatypes.ReservedDomainCreate.html +7 -7
- package/docs/interfaces/datatypes.ReservedDomainList.html +3 -3
- package/docs/interfaces/datatypes.ReservedDomainUpdate.html +5 -5
- package/docs/interfaces/datatypes.SSHCertificateAuthority.html +7 -7
- package/docs/interfaces/datatypes.SSHCertificateAuthorityCreate.html +5 -5
- package/docs/interfaces/datatypes.SSHCertificateAuthorityList.html +3 -3
- package/docs/interfaces/datatypes.SSHCertificateAuthorityUpdate.html +3 -3
- package/docs/interfaces/datatypes.SSHCredential.html +8 -8
- package/docs/interfaces/datatypes.SSHCredentialCreate.html +5 -5
- package/docs/interfaces/datatypes.SSHCredentialList.html +3 -3
- package/docs/interfaces/datatypes.SSHCredentialUpdate.html +4 -4
- package/docs/interfaces/datatypes.SSHHostCertificate.html +12 -12
- package/docs/interfaces/datatypes.SSHHostCertificateCreate.html +7 -7
- package/docs/interfaces/datatypes.SSHHostCertificateList.html +3 -3
- package/docs/interfaces/datatypes.SSHHostCertificateUpdate.html +3 -3
- package/docs/interfaces/datatypes.SSHUserCertificate.html +14 -14
- package/docs/interfaces/datatypes.SSHUserCertificateCreate.html +9 -9
- package/docs/interfaces/datatypes.SSHUserCertificateList.html +3 -3
- package/docs/interfaces/datatypes.SSHUserCertificateUpdate.html +3 -3
- package/docs/interfaces/datatypes.StaticBackend.html +281 -0
- package/docs/interfaces/datatypes.StaticBackendCreate.html +224 -0
- package/docs/interfaces/datatypes.StaticBackendList.html +205 -0
- package/docs/interfaces/datatypes.StaticBackendTLS.html +167 -0
- package/docs/interfaces/datatypes.StaticBackendUpdate.html +238 -0
- package/docs/interfaces/datatypes.TCPEdge.html +27 -8
- package/docs/interfaces/datatypes.TCPEdgeCreate.html +24 -5
- package/docs/interfaces/datatypes.TCPEdgeList.html +3 -3
- package/docs/interfaces/datatypes.TCPEdgeUpdate.html +25 -6
- package/docs/interfaces/datatypes.TLSCertificate.html +21 -21
- package/docs/interfaces/datatypes.TLSCertificateCreate.html +4 -4
- package/docs/interfaces/datatypes.TLSCertificateList.html +3 -3
- package/docs/interfaces/datatypes.TLSCertificateSANs.html +2 -2
- package/docs/interfaces/datatypes.TLSCertificateUpdate.html +3 -3
- package/docs/interfaces/datatypes.TLSEdge.html +29 -10
- package/docs/interfaces/datatypes.TLSEdgeCreate.html +26 -7
- package/docs/interfaces/datatypes.TLSEdgeList.html +3 -3
- package/docs/interfaces/datatypes.TLSEdgeUpdate.html +27 -8
- package/docs/interfaces/datatypes.Tunnel.html +11 -11
- package/docs/interfaces/datatypes.TunnelGroupBackend.html +7 -7
- package/docs/interfaces/datatypes.TunnelGroupBackendCreate.html +3 -3
- package/docs/interfaces/datatypes.TunnelGroupBackendList.html +3 -3
- package/docs/interfaces/datatypes.TunnelGroupBackendUpdate.html +4 -4
- package/docs/interfaces/datatypes.TunnelList.html +3 -3
- package/docs/interfaces/datatypes.TunnelSession.html +10 -10
- package/docs/interfaces/datatypes.TunnelSessionList.html +3 -3
- package/docs/interfaces/datatypes.TunnelSessionsUpdate.html +1 -1
- package/docs/interfaces/datatypes.UserAgent.html +6 -6
- package/docs/interfaces/datatypes.WeightedBackend.html +6 -6
- package/docs/interfaces/datatypes.WeightedBackendCreate.html +3 -3
- package/docs/interfaces/datatypes.WeightedBackendList.html +3 -3
- package/docs/interfaces/datatypes.WeightedBackendUpdate.html +4 -4
- package/docs/modules/datatypes.html +64 -0
- package/docs/modules/services.html +24 -0
- package/lib/client.d.ts +8 -1
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +3 -0
- package/lib/client.js.map +1 -1
- package/lib/datatypes.d.ts +148 -4
- package/lib/datatypes.d.ts.map +1 -1
- package/lib/services.d.ts +90 -0
- package/lib/services.d.ts.map +1 -1
- package/lib/services.js +404 -85
- package/lib/services.js.map +1 -1
- package/package.json +2 -1
- package/src/client.ts +12 -1
- package/src/datatypes.ts +164 -4
- package/src/services.ts +334 -0
package/src/datatypes.ts
CHANGED
|
@@ -416,6 +416,60 @@ export interface HTTPResponseBackendList {
|
|
|
416
416
|
nextPageUri?: string;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
+
export interface StaticBackend {
|
|
420
|
+
/** unique identifier for this static backend */
|
|
421
|
+
id: string;
|
|
422
|
+
/** URI of the StaticBackend API resource */
|
|
423
|
+
uri: string;
|
|
424
|
+
/** timestamp when the backend was created, RFC 3339 format */
|
|
425
|
+
createdAt: Date;
|
|
426
|
+
/** human-readable description of this backend. Optional */
|
|
427
|
+
description?: string;
|
|
428
|
+
/** arbitrary user-defined machine-readable data of this backend. Optional */
|
|
429
|
+
metadata?: string;
|
|
430
|
+
/** the address to forward to */
|
|
431
|
+
address: string;
|
|
432
|
+
/** tls configuration to use */
|
|
433
|
+
tls: StaticBackendTLS;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
export interface StaticBackendTLS {
|
|
437
|
+
/** if TLS is checked */
|
|
438
|
+
enabled: boolean;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
export interface StaticBackendCreate {
|
|
442
|
+
/** human-readable description of this backend. Optional */
|
|
443
|
+
description?: string;
|
|
444
|
+
/** arbitrary user-defined machine-readable data of this backend. Optional */
|
|
445
|
+
metadata?: string;
|
|
446
|
+
/** the address to forward to */
|
|
447
|
+
address: string;
|
|
448
|
+
/** tls configuration to use */
|
|
449
|
+
tls: StaticBackendTLS;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export interface StaticBackendUpdate {
|
|
453
|
+
id: string;
|
|
454
|
+
/** human-readable description of this backend. Optional */
|
|
455
|
+
description?: string;
|
|
456
|
+
/** arbitrary user-defined machine-readable data of this backend. Optional */
|
|
457
|
+
metadata?: string;
|
|
458
|
+
/** the address to forward to */
|
|
459
|
+
address: string;
|
|
460
|
+
/** tls configuration to use */
|
|
461
|
+
tls: StaticBackendTLS;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export interface StaticBackendList {
|
|
465
|
+
/** the list of all static backends on this account */
|
|
466
|
+
backends: Array<StaticBackend>;
|
|
467
|
+
/** URI of the static backends list API resource */
|
|
468
|
+
uri: string;
|
|
469
|
+
/** URI of the next page, or null if there is no next page */
|
|
470
|
+
nextPageUri?: string;
|
|
471
|
+
}
|
|
472
|
+
|
|
419
473
|
export interface TunnelGroupBackend {
|
|
420
474
|
/** unique identifier for this TunnelGroup backend */
|
|
421
475
|
id: string;
|
|
@@ -504,6 +558,43 @@ export interface WeightedBackendList {
|
|
|
504
558
|
nextPageUri?: string;
|
|
505
559
|
}
|
|
506
560
|
|
|
561
|
+
export interface BotUser {
|
|
562
|
+
/** unique API key resource identifier */
|
|
563
|
+
id: string;
|
|
564
|
+
/** URI to the API resource of this bot user */
|
|
565
|
+
uri: string;
|
|
566
|
+
/** human-readable name used to identify the bot */
|
|
567
|
+
name: string;
|
|
568
|
+
/** whether or not the bot is active */
|
|
569
|
+
active: boolean;
|
|
570
|
+
/** timestamp when the api key was created, RFC 3339 format */
|
|
571
|
+
createdAt: Date;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export interface BotUserCreate {
|
|
575
|
+
/** human-readable name used to identify the bot */
|
|
576
|
+
name: string;
|
|
577
|
+
/** whether or not the bot is active */
|
|
578
|
+
active?: boolean;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export interface BotUserUpdate {
|
|
582
|
+
id: string;
|
|
583
|
+
/** human-readable name used to identify the bot */
|
|
584
|
+
name?: string;
|
|
585
|
+
/** whether or not the bot is active */
|
|
586
|
+
active?: boolean;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
export interface BotUserList {
|
|
590
|
+
/** the list of all bot users on this account */
|
|
591
|
+
botUsers: Array<BotUser>;
|
|
592
|
+
/** URI of the bot users list API resource */
|
|
593
|
+
uri: string;
|
|
594
|
+
/** URI of the next page, or null if there is no next page */
|
|
595
|
+
nextPageUri?: string;
|
|
596
|
+
}
|
|
597
|
+
|
|
507
598
|
export interface CertificateAuthorityCreate {
|
|
508
599
|
/** human-readable description of this Certificate Authority. optional, max 255 bytes. */
|
|
509
600
|
description?: string;
|
|
@@ -607,7 +698,7 @@ export interface CredentialList {
|
|
|
607
698
|
export interface EndpointWebhookValidation {
|
|
608
699
|
/** `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified */
|
|
609
700
|
enabled?: boolean;
|
|
610
|
-
/** 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 */
|
|
701
|
+
/** a string indicating which webhook provider will be sending webhooks to this endpoint. Value must be one of the supported providers defined at https://ngrok.com/docs/cloud-edge/modules/webhook-verification */
|
|
611
702
|
provider: string;
|
|
612
703
|
/** a string secret used to validate requests from the given provider. All providers except AWS SNS require a secret */
|
|
613
704
|
secret: string;
|
|
@@ -915,6 +1006,37 @@ export interface EndpointWebsocketTCPConverter {
|
|
|
915
1006
|
enabled?: boolean;
|
|
916
1007
|
}
|
|
917
1008
|
|
|
1009
|
+
export interface EndpointUserAgentFilter {
|
|
1010
|
+
enabled?: boolean;
|
|
1011
|
+
allow: Array<string>;
|
|
1012
|
+
deny: Array<string>;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
export interface EndpointPolicy {
|
|
1016
|
+
/** `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified */
|
|
1017
|
+
enabled?: boolean;
|
|
1018
|
+
/** the inbound rules of the traffic policy. */
|
|
1019
|
+
inbound: Array<EndpointRule>;
|
|
1020
|
+
/** the outbound rules on the traffic policy. */
|
|
1021
|
+
outbound: Array<EndpointRule>;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
export interface EndpointRule {
|
|
1025
|
+
/** cel expressions that filter traffic the policy rule applies to. */
|
|
1026
|
+
expressions: Array<string>;
|
|
1027
|
+
/** the set of actions on a policy rule. */
|
|
1028
|
+
actions: Array<EndpointAction>;
|
|
1029
|
+
/** the name of the rule that is part of the traffic policy. */
|
|
1030
|
+
name: string;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
export interface EndpointAction {
|
|
1034
|
+
/** the type of action on the policy rule. */
|
|
1035
|
+
type: string;
|
|
1036
|
+
/** the configuration for the action on the policy rule. */
|
|
1037
|
+
config: Record<string, unknown> | undefined;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
918
1040
|
export interface EdgeRouteItem {
|
|
919
1041
|
/** unique identifier of this edge */
|
|
920
1042
|
edgeId: string;
|
|
@@ -955,6 +1077,9 @@ export interface HTTPSEdgeRouteCreate {
|
|
|
955
1077
|
oidc?: EndpointOIDC;
|
|
956
1078
|
/** websocket to tcp adapter configuration or `null` */
|
|
957
1079
|
websocketTcpConverter?: EndpointWebsocketTCPConverter;
|
|
1080
|
+
userAgentFilter?: EndpointUserAgentFilter;
|
|
1081
|
+
/** the traffic policy associated with this edge or null */
|
|
1082
|
+
policy?: EndpointPolicy;
|
|
958
1083
|
}
|
|
959
1084
|
|
|
960
1085
|
export interface HTTPSEdgeRouteUpdate {
|
|
@@ -992,6 +1117,9 @@ export interface HTTPSEdgeRouteUpdate {
|
|
|
992
1117
|
oidc?: EndpointOIDC;
|
|
993
1118
|
/** websocket to tcp adapter configuration or `null` */
|
|
994
1119
|
websocketTcpConverter?: EndpointWebsocketTCPConverter;
|
|
1120
|
+
userAgentFilter?: EndpointUserAgentFilter;
|
|
1121
|
+
/** the traffic policy associated with this edge or null */
|
|
1122
|
+
policy?: EndpointPolicy;
|
|
995
1123
|
}
|
|
996
1124
|
|
|
997
1125
|
export interface HTTPSEdgeRoute {
|
|
@@ -1033,6 +1161,9 @@ export interface HTTPSEdgeRoute {
|
|
|
1033
1161
|
oidc?: EndpointOIDC;
|
|
1034
1162
|
/** websocket to tcp adapter configuration or `null` */
|
|
1035
1163
|
websocketTcpConverter?: EndpointWebsocketTCPConverter;
|
|
1164
|
+
userAgentFilter?: EndpointUserAgentFilter;
|
|
1165
|
+
/** the traffic policy associated with this edge or null */
|
|
1166
|
+
policy?: EndpointPolicy;
|
|
1036
1167
|
}
|
|
1037
1168
|
|
|
1038
1169
|
export interface HTTPSEdgeList {
|
|
@@ -1115,6 +1246,11 @@ export interface EdgeTLSTerminationAtEdgeReplace {
|
|
|
1115
1246
|
module: EndpointTLSTerminationAtEdge;
|
|
1116
1247
|
}
|
|
1117
1248
|
|
|
1249
|
+
export interface EdgePolicyReplace {
|
|
1250
|
+
id: string;
|
|
1251
|
+
module: EndpointPolicy;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1118
1254
|
export interface EdgeRouteBackendReplace {
|
|
1119
1255
|
edgeId: string;
|
|
1120
1256
|
id: string;
|
|
@@ -1181,6 +1317,18 @@ export interface EdgeRouteWebsocketTCPConverterReplace {
|
|
|
1181
1317
|
module: EndpointWebsocketTCPConverter;
|
|
1182
1318
|
}
|
|
1183
1319
|
|
|
1320
|
+
export interface EdgeRouteUserAgentFilterReplace {
|
|
1321
|
+
edgeId: string;
|
|
1322
|
+
id: string;
|
|
1323
|
+
module: EndpointUserAgentFilter;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
export interface EdgeRoutePolicyReplace {
|
|
1327
|
+
edgeId: string;
|
|
1328
|
+
id: string;
|
|
1329
|
+
module: EndpointPolicy;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1184
1332
|
export interface TCPEdgeList {
|
|
1185
1333
|
/** the list of all TCP Edges on this account */
|
|
1186
1334
|
tcpEdges: Array<TCPEdge>;
|
|
@@ -1200,6 +1348,8 @@ export interface TCPEdgeCreate {
|
|
|
1200
1348
|
/** edge modules */
|
|
1201
1349
|
backend?: EndpointBackendMutate;
|
|
1202
1350
|
ipRestriction?: EndpointIPPolicyMutate;
|
|
1351
|
+
/** the traffic policy associated with this edge or null */
|
|
1352
|
+
policy?: EndpointPolicy;
|
|
1203
1353
|
}
|
|
1204
1354
|
|
|
1205
1355
|
export interface TCPEdgeUpdate {
|
|
@@ -1214,6 +1364,8 @@ export interface TCPEdgeUpdate {
|
|
|
1214
1364
|
/** edge modules */
|
|
1215
1365
|
backend?: EndpointBackendMutate;
|
|
1216
1366
|
ipRestriction?: EndpointIPPolicyMutate;
|
|
1367
|
+
/** the traffic policy associated with this edge or null */
|
|
1368
|
+
policy?: EndpointPolicy;
|
|
1217
1369
|
}
|
|
1218
1370
|
|
|
1219
1371
|
export interface TCPEdge {
|
|
@@ -1232,6 +1384,8 @@ export interface TCPEdge {
|
|
|
1232
1384
|
/** edge modules */
|
|
1233
1385
|
backend?: EndpointBackend;
|
|
1234
1386
|
ipRestriction?: EndpointIPPolicy;
|
|
1387
|
+
/** the traffic policy associated with this edge or null */
|
|
1388
|
+
policy?: EndpointPolicy;
|
|
1235
1389
|
}
|
|
1236
1390
|
|
|
1237
1391
|
export interface TLSEdgeList {
|
|
@@ -1255,6 +1409,8 @@ export interface TLSEdgeCreate {
|
|
|
1255
1409
|
ipRestriction?: EndpointIPPolicyMutate;
|
|
1256
1410
|
mutualTls?: EndpointMutualTLSMutate;
|
|
1257
1411
|
tlsTermination?: EndpointTLSTermination;
|
|
1412
|
+
/** the traffic policy associated with this edge or null */
|
|
1413
|
+
policy?: EndpointPolicy;
|
|
1258
1414
|
}
|
|
1259
1415
|
|
|
1260
1416
|
export interface TLSEdgeUpdate {
|
|
@@ -1271,6 +1427,8 @@ export interface TLSEdgeUpdate {
|
|
|
1271
1427
|
ipRestriction?: EndpointIPPolicyMutate;
|
|
1272
1428
|
mutualTls?: EndpointMutualTLSMutate;
|
|
1273
1429
|
tlsTermination?: EndpointTLSTermination;
|
|
1430
|
+
/** the traffic policy associated with this edge or null */
|
|
1431
|
+
policy?: EndpointPolicy;
|
|
1274
1432
|
}
|
|
1275
1433
|
|
|
1276
1434
|
export interface TLSEdge {
|
|
@@ -1291,6 +1449,8 @@ export interface TLSEdge {
|
|
|
1291
1449
|
ipRestriction?: EndpointIPPolicy;
|
|
1292
1450
|
mutualTls?: EndpointMutualTLS;
|
|
1293
1451
|
tlsTermination?: EndpointTLSTermination;
|
|
1452
|
+
/** the traffic policy associated with this edge or null */
|
|
1453
|
+
policy?: EndpointPolicy;
|
|
1294
1454
|
}
|
|
1295
1455
|
|
|
1296
1456
|
export interface Endpoint {
|
|
@@ -1727,7 +1887,7 @@ export interface ReservedAddrList {
|
|
|
1727
1887
|
export interface ReservedDomainCreate {
|
|
1728
1888
|
/** hostname of the reserved domain */
|
|
1729
1889
|
domain: string;
|
|
1730
|
-
/**
|
|
1890
|
+
/** deprecated: With the launch of the ngrok Global Network domains traffic is now handled globally. This field applied only to endpoints. Note that agents may still connect to specific regions. Optional, null by default. (au, eu, ap, us, jp, in, sa) */
|
|
1731
1891
|
region: string;
|
|
1732
1892
|
/** human-readable description of what this reserved domain will be used for */
|
|
1733
1893
|
description?: string;
|
|
@@ -1764,9 +1924,9 @@ export interface ReservedDomain {
|
|
|
1764
1924
|
metadata?: string;
|
|
1765
1925
|
/** hostname of the reserved domain */
|
|
1766
1926
|
domain: string;
|
|
1767
|
-
/**
|
|
1927
|
+
/** deprecated: With the launch of the ngrok Global Network domains traffic is now handled globally. This field applied only to endpoints. Note that agents may still connect to specific regions. Optional, null by default. (au, eu, ap, us, jp, in, sa) */
|
|
1768
1928
|
region: string;
|
|
1769
|
-
/** DNS CNAME target for a custom hostname, or null if the reserved domain is a subdomain of *.ngrok.
|
|
1929
|
+
/** DNS CNAME target for a custom hostname, or null if the reserved domain is a subdomain of an ngrok owned domain (e.g. *.ngrok.app) */
|
|
1770
1930
|
cnameTarget?: string;
|
|
1771
1931
|
/** object referencing the TLS certificate used for connections to this domain. This can be either a user-uploaded certificate, the most recently issued automatic one, or null otherwise. */
|
|
1772
1932
|
certificate?: Ref;
|
package/src/services.ts
CHANGED
|
@@ -707,6 +707,113 @@ export class HTTPResponseBackends {
|
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
|
|
710
|
+
/**
|
|
711
|
+
* A static backend sends traffic to a TCP address (hostname and port) that
|
|
712
|
+
is reachable on the public internet.
|
|
713
|
+
*/
|
|
714
|
+
export class StaticBackends {
|
|
715
|
+
private httpClient: Wretcher;
|
|
716
|
+
|
|
717
|
+
/** Do not construct this object directly, use the <code>staticBackends</code> property of an <code>Ngrok</code> client object instead. */
|
|
718
|
+
public constructor(httpClient: Wretcher) {
|
|
719
|
+
this.httpClient = httpClient;
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Create a new static backend
|
|
723
|
+
*/
|
|
724
|
+
public create(
|
|
725
|
+
arg: datatypes.StaticBackendCreate
|
|
726
|
+
): Promise<datatypes.StaticBackend> {
|
|
727
|
+
return this.httpClient
|
|
728
|
+
.url(`/backends/static`)
|
|
729
|
+
.post(util.serializeArgument(arg))
|
|
730
|
+
.json(payload => util.deserializeResult(payload))
|
|
731
|
+
.then(f => f, util.onRejected);
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Delete a static backend by ID.
|
|
735
|
+
*/
|
|
736
|
+
public delete(id): Promise<void> {
|
|
737
|
+
return this.httpClient
|
|
738
|
+
.url(`/backends/static/${id}`)
|
|
739
|
+
.delete(id)
|
|
740
|
+
.json(payload => util.deserializeResult(payload))
|
|
741
|
+
.then(f => f, util.onRejected);
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Get detailed information about a static backend by ID
|
|
745
|
+
*/
|
|
746
|
+
public get(id): Promise<datatypes.StaticBackend> {
|
|
747
|
+
return this.httpClient
|
|
748
|
+
.url(`/backends/static/${id}`)
|
|
749
|
+
.get(id)
|
|
750
|
+
.json(payload => util.deserializeResult(payload))
|
|
751
|
+
.then(f => f, util.onRejected);
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* List all static backends on this account
|
|
755
|
+
*/
|
|
756
|
+
public async list(
|
|
757
|
+
beforeId?: string,
|
|
758
|
+
limit?: string
|
|
759
|
+
): Promise<Array<datatypes.StaticBackend>> {
|
|
760
|
+
const array: Array<datatypes.StaticBackend> = [];
|
|
761
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
762
|
+
array.push(item);
|
|
763
|
+
}
|
|
764
|
+
return array;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
private _pagedList(
|
|
768
|
+
arg: datatypes.Paging
|
|
769
|
+
): Promise<datatypes.StaticBackendList> {
|
|
770
|
+
return this.httpClient
|
|
771
|
+
.url(`/backends/static`)
|
|
772
|
+
.query(arg)
|
|
773
|
+
.get()
|
|
774
|
+
.json(payload => util.deserializeResult(payload))
|
|
775
|
+
.then(util.onFulfilled, util.onRejected);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
779
|
+
let nextPage = 'initial loop';
|
|
780
|
+
let page: datatypes.Paging = { limit: limit };
|
|
781
|
+
|
|
782
|
+
if (beforeId) {
|
|
783
|
+
page.beforeId = beforeId;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
while (nextPage) {
|
|
787
|
+
const pagedList = await this._pagedList(page);
|
|
788
|
+
nextPage = pagedList.nextPageUri;
|
|
789
|
+
const items: datatypes.StaticBackend[] = pagedList.backends;
|
|
790
|
+
|
|
791
|
+
if (nextPage) {
|
|
792
|
+
page = {
|
|
793
|
+
beforeId: items[items.length - 1].id,
|
|
794
|
+
limit: limit,
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
for (const item of items) {
|
|
799
|
+
yield item;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* Update static backend by ID
|
|
805
|
+
*/
|
|
806
|
+
public update(
|
|
807
|
+
arg: datatypes.StaticBackendUpdate
|
|
808
|
+
): Promise<datatypes.StaticBackend> {
|
|
809
|
+
return this.httpClient
|
|
810
|
+
.url(`/backends/static/${arg.id}`)
|
|
811
|
+
.patch(util.serializeArgument(arg))
|
|
812
|
+
.json(payload => util.deserializeResult(payload))
|
|
813
|
+
.then(f => f, util.onRejected);
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
|
|
710
817
|
/**
|
|
711
818
|
* A Tunnel Group Backend balances traffic among all online tunnels that match
|
|
712
819
|
a label selector.
|
|
@@ -923,6 +1030,103 @@ export class WeightedBackends {
|
|
|
923
1030
|
}
|
|
924
1031
|
}
|
|
925
1032
|
|
|
1033
|
+
export class BotUsers {
|
|
1034
|
+
private httpClient: Wretcher;
|
|
1035
|
+
|
|
1036
|
+
/** Do not construct this object directly, use the <code>botUsers</code> property of an <code>Ngrok</code> client object instead. */
|
|
1037
|
+
public constructor(httpClient: Wretcher) {
|
|
1038
|
+
this.httpClient = httpClient;
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Create a new bot user
|
|
1042
|
+
*/
|
|
1043
|
+
public create(arg: datatypes.BotUserCreate): Promise<datatypes.BotUser> {
|
|
1044
|
+
return this.httpClient
|
|
1045
|
+
.url(`/bot_users`)
|
|
1046
|
+
.post(util.serializeArgument(arg))
|
|
1047
|
+
.json(payload => util.deserializeResult(payload))
|
|
1048
|
+
.then(f => f, util.onRejected);
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* Delete a bot user by ID
|
|
1052
|
+
*/
|
|
1053
|
+
public delete(id): Promise<void> {
|
|
1054
|
+
return this.httpClient
|
|
1055
|
+
.url(`/bot_users/${id}`)
|
|
1056
|
+
.delete(id)
|
|
1057
|
+
.json(payload => util.deserializeResult(payload))
|
|
1058
|
+
.then(f => f, util.onRejected);
|
|
1059
|
+
}
|
|
1060
|
+
/**
|
|
1061
|
+
* Get the details of a Bot User by ID.
|
|
1062
|
+
*/
|
|
1063
|
+
public get(id): Promise<datatypes.BotUser> {
|
|
1064
|
+
return this.httpClient
|
|
1065
|
+
.url(`/bot_users/${id}`)
|
|
1066
|
+
.get(id)
|
|
1067
|
+
.json(payload => util.deserializeResult(payload))
|
|
1068
|
+
.then(f => f, util.onRejected);
|
|
1069
|
+
}
|
|
1070
|
+
/**
|
|
1071
|
+
* List all bot users in this account.
|
|
1072
|
+
*/
|
|
1073
|
+
public async list(
|
|
1074
|
+
beforeId?: string,
|
|
1075
|
+
limit?: string
|
|
1076
|
+
): Promise<Array<datatypes.BotUser>> {
|
|
1077
|
+
const array: Array<datatypes.BotUser> = [];
|
|
1078
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
1079
|
+
array.push(item);
|
|
1080
|
+
}
|
|
1081
|
+
return array;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
private _pagedList(arg: datatypes.Paging): Promise<datatypes.BotUserList> {
|
|
1085
|
+
return this.httpClient
|
|
1086
|
+
.url(`/bot_users`)
|
|
1087
|
+
.query(arg)
|
|
1088
|
+
.get()
|
|
1089
|
+
.json(payload => util.deserializeResult(payload))
|
|
1090
|
+
.then(util.onFulfilled, util.onRejected);
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
1094
|
+
let nextPage = 'initial loop';
|
|
1095
|
+
let page: datatypes.Paging = { limit: limit };
|
|
1096
|
+
|
|
1097
|
+
if (beforeId) {
|
|
1098
|
+
page.beforeId = beforeId;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
while (nextPage) {
|
|
1102
|
+
const pagedList = await this._pagedList(page);
|
|
1103
|
+
nextPage = pagedList.nextPageUri;
|
|
1104
|
+
const items: datatypes.BotUser[] = pagedList.botUsers;
|
|
1105
|
+
|
|
1106
|
+
if (nextPage) {
|
|
1107
|
+
page = {
|
|
1108
|
+
beforeId: items[items.length - 1].id,
|
|
1109
|
+
limit: limit,
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
for (const item of items) {
|
|
1114
|
+
yield item;
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Update attributes of a bot user by ID.
|
|
1120
|
+
*/
|
|
1121
|
+
public update(arg: datatypes.BotUserUpdate): Promise<datatypes.BotUser> {
|
|
1122
|
+
return this.httpClient
|
|
1123
|
+
.url(`/bot_users/${arg.id}`)
|
|
1124
|
+
.patch(util.serializeArgument(arg))
|
|
1125
|
+
.json(payload => util.deserializeResult(payload))
|
|
1126
|
+
.then(f => f, util.onRejected);
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
|
|
926
1130
|
/**
|
|
927
1131
|
* Certificate Authorities are x509 certificates that are used to sign other
|
|
928
1132
|
x509 certificates. Attach a Certificate Authority to the Mutual TLS module
|
|
@@ -1727,6 +1931,72 @@ export class EdgeRouteWebsocketTCPConverterModule {
|
|
|
1727
1931
|
}
|
|
1728
1932
|
}
|
|
1729
1933
|
|
|
1934
|
+
export class EdgeRouteUserAgentFilterModule {
|
|
1935
|
+
private httpClient: Wretcher;
|
|
1936
|
+
|
|
1937
|
+
/** Do not construct this object directly, use the <code>edgeRouteUserAgentFilterModule</code> property of an <code>Ngrok</code> client object instead. */
|
|
1938
|
+
public constructor(httpClient: Wretcher) {
|
|
1939
|
+
this.httpClient = httpClient;
|
|
1940
|
+
}
|
|
1941
|
+
public replace(
|
|
1942
|
+
arg: datatypes.EdgeRouteUserAgentFilterReplace
|
|
1943
|
+
): Promise<datatypes.EndpointUserAgentFilter> {
|
|
1944
|
+
return this.httpClient
|
|
1945
|
+
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/user_agent_filter`)
|
|
1946
|
+
.put(util.serializeArgument(arg))
|
|
1947
|
+
.json(payload => util.deserializeResult(payload))
|
|
1948
|
+
.then(f => f, util.onRejected);
|
|
1949
|
+
}
|
|
1950
|
+
public get(
|
|
1951
|
+
arg: datatypes.EdgeRouteItem
|
|
1952
|
+
): Promise<datatypes.EndpointUserAgentFilter> {
|
|
1953
|
+
return this.httpClient
|
|
1954
|
+
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/user_agent_filter`)
|
|
1955
|
+
.get()
|
|
1956
|
+
.json(payload => util.deserializeResult(payload))
|
|
1957
|
+
.then(f => f, util.onRejected);
|
|
1958
|
+
}
|
|
1959
|
+
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1960
|
+
return this.httpClient
|
|
1961
|
+
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/user_agent_filter`)
|
|
1962
|
+
.delete()
|
|
1963
|
+
.json(payload => util.deserializeResult(payload))
|
|
1964
|
+
.then(f => f, util.onRejected);
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
export class EdgeRoutePolicyModule {
|
|
1969
|
+
private httpClient: Wretcher;
|
|
1970
|
+
|
|
1971
|
+
/** Do not construct this object directly, use the <code>edgeRoutePolicyModule</code> property of an <code>Ngrok</code> client object instead. */
|
|
1972
|
+
public constructor(httpClient: Wretcher) {
|
|
1973
|
+
this.httpClient = httpClient;
|
|
1974
|
+
}
|
|
1975
|
+
public replace(
|
|
1976
|
+
arg: datatypes.EdgeRoutePolicyReplace
|
|
1977
|
+
): Promise<datatypes.EndpointPolicy> {
|
|
1978
|
+
return this.httpClient
|
|
1979
|
+
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/policy`)
|
|
1980
|
+
.put(util.serializeArgument(arg))
|
|
1981
|
+
.json(payload => util.deserializeResult(payload))
|
|
1982
|
+
.then(f => f, util.onRejected);
|
|
1983
|
+
}
|
|
1984
|
+
public get(arg: datatypes.EdgeRouteItem): Promise<datatypes.EndpointPolicy> {
|
|
1985
|
+
return this.httpClient
|
|
1986
|
+
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/policy`)
|
|
1987
|
+
.get()
|
|
1988
|
+
.json(payload => util.deserializeResult(payload))
|
|
1989
|
+
.then(f => f, util.onRejected);
|
|
1990
|
+
}
|
|
1991
|
+
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1992
|
+
return this.httpClient
|
|
1993
|
+
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/policy`)
|
|
1994
|
+
.delete()
|
|
1995
|
+
.json(payload => util.deserializeResult(payload))
|
|
1996
|
+
.then(f => f, util.onRejected);
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
|
|
1730
2000
|
export class EdgesTCP {
|
|
1731
2001
|
private httpClient: Wretcher;
|
|
1732
2002
|
|
|
@@ -1888,6 +2158,38 @@ export class TCPEdgeIPRestrictionModule {
|
|
|
1888
2158
|
}
|
|
1889
2159
|
}
|
|
1890
2160
|
|
|
2161
|
+
export class TCPEdgePolicyModule {
|
|
2162
|
+
private httpClient: Wretcher;
|
|
2163
|
+
|
|
2164
|
+
/** Do not construct this object directly, use the <code>tcpEdgePolicyModule</code> property of an <code>Ngrok</code> client object instead. */
|
|
2165
|
+
public constructor(httpClient: Wretcher) {
|
|
2166
|
+
this.httpClient = httpClient;
|
|
2167
|
+
}
|
|
2168
|
+
public replace(
|
|
2169
|
+
arg: datatypes.EdgePolicyReplace
|
|
2170
|
+
): Promise<datatypes.EndpointPolicy> {
|
|
2171
|
+
return this.httpClient
|
|
2172
|
+
.url(`/edges/tcp/${arg.id}/policy`)
|
|
2173
|
+
.put(util.serializeArgument(arg))
|
|
2174
|
+
.json(payload => util.deserializeResult(payload))
|
|
2175
|
+
.then(f => f, util.onRejected);
|
|
2176
|
+
}
|
|
2177
|
+
public get(id): Promise<datatypes.EndpointPolicy> {
|
|
2178
|
+
return this.httpClient
|
|
2179
|
+
.url(`/edges/tcp/${id}/policy`)
|
|
2180
|
+
.get(id)
|
|
2181
|
+
.json(payload => util.deserializeResult(payload))
|
|
2182
|
+
.then(f => f, util.onRejected);
|
|
2183
|
+
}
|
|
2184
|
+
public delete(id): Promise<void> {
|
|
2185
|
+
return this.httpClient
|
|
2186
|
+
.url(`/edges/tcp/${id}/policy`)
|
|
2187
|
+
.delete(id)
|
|
2188
|
+
.json(payload => util.deserializeResult(payload))
|
|
2189
|
+
.then(f => f, util.onRejected);
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
|
|
1891
2193
|
export class EdgesTLS {
|
|
1892
2194
|
private httpClient: Wretcher;
|
|
1893
2195
|
|
|
@@ -2113,6 +2415,38 @@ export class TLSEdgeTLSTerminationModule {
|
|
|
2113
2415
|
}
|
|
2114
2416
|
}
|
|
2115
2417
|
|
|
2418
|
+
export class TLSEdgePolicyModule {
|
|
2419
|
+
private httpClient: Wretcher;
|
|
2420
|
+
|
|
2421
|
+
/** Do not construct this object directly, use the <code>tlsEdgePolicyModule</code> property of an <code>Ngrok</code> client object instead. */
|
|
2422
|
+
public constructor(httpClient: Wretcher) {
|
|
2423
|
+
this.httpClient = httpClient;
|
|
2424
|
+
}
|
|
2425
|
+
public replace(
|
|
2426
|
+
arg: datatypes.EdgePolicyReplace
|
|
2427
|
+
): Promise<datatypes.EndpointPolicy> {
|
|
2428
|
+
return this.httpClient
|
|
2429
|
+
.url(`/edges/tls/${arg.id}/policy`)
|
|
2430
|
+
.put(util.serializeArgument(arg))
|
|
2431
|
+
.json(payload => util.deserializeResult(payload))
|
|
2432
|
+
.then(f => f, util.onRejected);
|
|
2433
|
+
}
|
|
2434
|
+
public get(id): Promise<datatypes.EndpointPolicy> {
|
|
2435
|
+
return this.httpClient
|
|
2436
|
+
.url(`/edges/tls/${id}/policy`)
|
|
2437
|
+
.get(id)
|
|
2438
|
+
.json(payload => util.deserializeResult(payload))
|
|
2439
|
+
.then(f => f, util.onRejected);
|
|
2440
|
+
}
|
|
2441
|
+
public delete(id): Promise<void> {
|
|
2442
|
+
return this.httpClient
|
|
2443
|
+
.url(`/edges/tls/${id}/policy`)
|
|
2444
|
+
.delete(id)
|
|
2445
|
+
.json(payload => util.deserializeResult(payload))
|
|
2446
|
+
.then(f => f, util.onRejected);
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2116
2450
|
/**
|
|
2117
2451
|
* Endpoints provides an API for querying the endpoint objects
|
|
2118
2452
|
which define what tunnel or edge is used to serve a hostport.
|