@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.
- package/.eslintignore +2 -0
- package/.eslintrc.js +2 -0
- package/.prettierrc.js +2 -0
- package/CHANGELOG.md +12 -3
- package/CODE_OF_CONDUCT.md +45 -0
- package/README.md +9 -3
- package/docs/assets/js/search.js +1 -1
- package/docs/classes/client.Ngrok.html +54 -26
- package/docs/classes/services.APIKeys.html +20 -11
- package/docs/classes/services.AbuseReports.html +5 -5
- package/docs/classes/services.AgentIngresses.html +20 -11
- package/docs/classes/services.ApplicationSessions.html +288 -0
- package/docs/classes/services.ApplicationUsers.html +288 -0
- package/docs/classes/services.CertificateAuthorities.html +20 -11
- package/docs/classes/services.Credentials.html +21 -12
- 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.EdgeRouteRequestHeadersModule.html +4 -4
- package/docs/classes/services.EdgeRouteResponseHeadersModule.html +4 -4
- package/docs/classes/services.EdgeRouteSAMLModule.html +4 -4
- package/docs/classes/services.EdgeRouteWebhookVerificationModule.html +4 -4
- package/docs/classes/services.EdgeRouteWebsocketTCPConverterModule.html +4 -4
- package/docs/classes/services.EdgesHTTPS.html +20 -11
- package/docs/classes/services.EdgesHTTPSRoutes.html +5 -5
- package/docs/classes/services.EdgesTCP.html +20 -11
- package/docs/classes/services.EdgesTLS.html +20 -11
- package/docs/classes/services.Endpoints.html +15 -6
- package/docs/classes/services.EventDestinations.html +21 -12
- package/docs/classes/services.EventSources.html +6 -6
- package/docs/classes/services.EventSubscriptions.html +20 -11
- package/docs/classes/services.FailoverBackends.html +20 -11
- package/docs/classes/services.HTTPResponseBackends.html +20 -11
- package/docs/classes/services.HTTPSEdgeMutualTLSModule.html +8 -8
- package/docs/classes/services.HTTPSEdgeTLSTerminationModule.html +8 -8
- package/docs/classes/services.IPPolicies.html +20 -11
- package/docs/classes/services.IPPolicyRules.html +20 -11
- package/docs/classes/services.IPRestrictions.html +20 -11
- package/docs/classes/services.ReservedAddrs.html +20 -11
- package/docs/classes/services.ReservedDomains.html +26 -17
- package/docs/classes/services.SSHCertificateAuthorities.html +20 -11
- package/docs/classes/services.SSHCredentials.html +20 -11
- package/docs/classes/services.SSHHostCertificates.html +20 -11
- package/docs/classes/services.SSHUserCertificates.html +20 -11
- package/docs/classes/services.TCPEdgeBackendModule.html +8 -8
- package/docs/classes/services.TCPEdgeIPRestrictionModule.html +8 -8
- package/docs/classes/services.TLSCertificates.html +20 -11
- package/docs/classes/services.TLSEdgeBackendModule.html +8 -8
- package/docs/classes/services.TLSEdgeIPRestrictionModule.html +8 -8
- package/docs/classes/services.TLSEdgeMutualTLSModule.html +8 -8
- package/docs/classes/services.TLSEdgeTLSTerminationModule.html +8 -8
- package/docs/classes/services.TunnelGroupBackends.html +20 -11
- package/docs/classes/services.TunnelSessions.html +22 -13
- package/docs/classes/services.Tunnels.html +15 -6
- package/docs/classes/services.WeightedBackends.html +20 -11
- package/docs/index.html +8 -3
- package/docs/interfaces/client.NgrokConfig.html +2 -2
- package/docs/interfaces/datatypes.APIKey.html +28 -9
- package/docs/interfaces/datatypes.APIKeyCreate.html +23 -4
- 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 +9 -9
- package/docs/interfaces/datatypes.AbuseReportCreate.html +3 -3
- package/docs/interfaces/datatypes.AbuseReportHostname.html +2 -2
- package/docs/interfaces/datatypes.AgentIngress.html +49 -11
- package/docs/interfaces/datatypes.AgentIngressCertJob.html +224 -0
- package/docs/interfaces/datatypes.AgentIngressCertPolicy.html +186 -0
- package/docs/interfaces/datatypes.AgentIngressCertStatus.html +186 -0
- package/docs/interfaces/datatypes.AgentIngressCreate.html +24 -5
- package/docs/interfaces/datatypes.AgentIngressList.html +3 -3
- package/docs/interfaces/datatypes.AgentIngressUpdate.html +22 -3
- package/docs/interfaces/datatypes.ApplicationSession.html +357 -0
- package/docs/interfaces/datatypes.ApplicationSessionList.html +205 -0
- package/docs/interfaces/datatypes.ApplicationUser.html +338 -0
- package/docs/interfaces/datatypes.ApplicationUserList.html +205 -0
- package/docs/interfaces/datatypes.BrowserSession.html +205 -0
- package/docs/interfaces/datatypes.CertificateAuthority.html +16 -16
- package/docs/interfaces/datatypes.CertificateAuthorityCreate.html +5 -5
- package/docs/interfaces/datatypes.CertificateAuthorityList.html +3 -3
- package/docs/interfaces/datatypes.CertificateAuthorityUpdate.html +3 -3
- package/docs/interfaces/datatypes.Credential.html +30 -11
- package/docs/interfaces/datatypes.CredentialCreate.html +25 -6
- package/docs/interfaces/datatypes.CredentialList.html +3 -3
- package/docs/interfaces/datatypes.CredentialUpdate.html +5 -5
- 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.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.EdgeRouteRequestHeadersReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRouteResponseHeadersReplace.html +3 -3
- package/docs/interfaces/datatypes.EdgeRouteSAMLReplace.html +3 -3
- 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 +19 -19
- 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 +7 -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 +218 -0
- package/docs/interfaces/datatypes.EndpointOAuthFacebook.html +5 -5
- package/docs/interfaces/datatypes.EndpointOAuthGitHub.html +12 -12
- package/docs/interfaces/datatypes.EndpointOAuthGitLab.html +218 -0
- package/docs/interfaces/datatypes.EndpointOAuthGoogle.html +5 -5
- package/docs/interfaces/datatypes.EndpointOAuthLinkedIn.html +218 -0
- package/docs/interfaces/datatypes.EndpointOAuthMicrosoft.html +5 -5
- package/docs/interfaces/datatypes.EndpointOAuthProvider.html +80 -4
- package/docs/interfaces/datatypes.EndpointOAuthTwitch.html +218 -0
- package/docs/interfaces/datatypes.EndpointOIDC.html +9 -9
- package/docs/interfaces/datatypes.EndpointRequestHeaders.html +3 -3
- package/docs/interfaces/datatypes.EndpointResponseHeaders.html +3 -3
- 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.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 +10 -10
- package/docs/interfaces/datatypes.EventDestinationCreate.html +6 -6
- 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 +10 -10
- package/docs/interfaces/datatypes.EventSubscriptionCreate.html +6 -6
- package/docs/interfaces/datatypes.EventSubscriptionList.html +3 -3
- package/docs/interfaces/datatypes.EventSubscriptionUpdate.html +5 -5
- package/docs/interfaces/datatypes.EventTarget.html +22 -3
- package/docs/interfaces/datatypes.EventTargetCloudwatchLogs.html +2 -2
- package/docs/interfaces/datatypes.EventTargetDatadog.html +224 -0
- package/docs/interfaces/datatypes.EventTargetFirehose.html +2 -2
- package/docs/interfaces/datatypes.EventTargetKinesis.html +2 -2
- package/docs/interfaces/datatypes.FailoverBackend.html +9 -9
- package/docs/interfaces/datatypes.FailoverBackendCreate.html +5 -5
- package/docs/interfaces/datatypes.FailoverBackendList.html +3 -3
- package/docs/interfaces/datatypes.FailoverBackendUpdate.html +4 -4
- package/docs/interfaces/datatypes.HTTPResponseBackend.html +11 -11
- package/docs/interfaces/datatypes.HTTPResponseBackendCreate.html +7 -7
- package/docs/interfaces/datatypes.HTTPResponseBackendList.html +3 -3
- package/docs/interfaces/datatypes.HTTPResponseBackendUpdate.html +6 -6
- package/docs/interfaces/datatypes.HTTPSEdge.html +12 -12
- package/docs/interfaces/datatypes.HTTPSEdgeCreate.html +7 -7
- package/docs/interfaces/datatypes.HTTPSEdgeList.html +3 -3
- package/docs/interfaces/datatypes.HTTPSEdgeRoute.html +22 -22
- package/docs/interfaces/datatypes.HTTPSEdgeRouteCreate.html +18 -18
- package/docs/interfaces/datatypes.HTTPSEdgeRouteUpdate.html +19 -19
- package/docs/interfaces/datatypes.HTTPSEdgeUpdate.html +6 -6
- package/docs/interfaces/datatypes.IPPolicy.html +8 -8
- package/docs/interfaces/datatypes.IPPolicyCreate.html +4 -4
- package/docs/interfaces/datatypes.IPPolicyList.html +3 -3
- package/docs/interfaces/datatypes.IPPolicyRule.html +11 -11
- package/docs/interfaces/datatypes.IPPolicyRuleCreate.html +7 -7
- 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 +11 -11
- package/docs/interfaces/datatypes.IPRestrictionCreate.html +7 -7
- package/docs/interfaces/datatypes.IPRestrictionList.html +3 -3
- package/docs/interfaces/datatypes.IPRestrictionUpdate.html +5 -5
- package/docs/interfaces/datatypes.IdentityProvider.html +186 -0
- package/docs/interfaces/datatypes.Item.html +1 -1
- package/docs/interfaces/datatypes.Location.html +224 -0
- package/docs/interfaces/datatypes.Paging.html +2 -2
- package/docs/interfaces/datatypes.Ref.html +2 -2
- package/docs/interfaces/datatypes.ReservedAddr.html +10 -10
- package/docs/interfaces/datatypes.ReservedAddrCreate.html +5 -5
- package/docs/interfaces/datatypes.ReservedAddrList.html +3 -3
- package/docs/interfaces/datatypes.ReservedAddrUpdate.html +3 -3
- package/docs/interfaces/datatypes.ReservedDomain.html +15 -15
- package/docs/interfaces/datatypes.ReservedDomainCertJob.html +6 -6
- package/docs/interfaces/datatypes.ReservedDomainCertPolicy.html +2 -2
- package/docs/interfaces/datatypes.ReservedDomainCertStatus.html +3 -3
- package/docs/interfaces/datatypes.ReservedDomainCreate.html +18 -18
- package/docs/interfaces/datatypes.ReservedDomainList.html +3 -3
- package/docs/interfaces/datatypes.ReservedDomainUpdate.html +5 -5
- package/docs/interfaces/datatypes.SSHCertificateAuthority.html +10 -10
- package/docs/interfaces/datatypes.SSHCertificateAuthorityCreate.html +7 -7
- package/docs/interfaces/datatypes.SSHCertificateAuthorityList.html +3 -3
- package/docs/interfaces/datatypes.SSHCertificateAuthorityUpdate.html +3 -3
- package/docs/interfaces/datatypes.SSHCredential.html +30 -11
- package/docs/interfaces/datatypes.SSHCredentialCreate.html +26 -7
- package/docs/interfaces/datatypes.SSHCredentialList.html +3 -3
- package/docs/interfaces/datatypes.SSHCredentialUpdate.html +5 -5
- package/docs/interfaces/datatypes.SSHHostCertificate.html +17 -17
- package/docs/interfaces/datatypes.SSHHostCertificateCreate.html +11 -11
- package/docs/interfaces/datatypes.SSHHostCertificateList.html +3 -3
- package/docs/interfaces/datatypes.SSHHostCertificateUpdate.html +3 -3
- package/docs/interfaces/datatypes.SSHUserCertificate.html +19 -19
- package/docs/interfaces/datatypes.SSHUserCertificateCreate.html +13 -13
- package/docs/interfaces/datatypes.SSHUserCertificateList.html +3 -3
- package/docs/interfaces/datatypes.SSHUserCertificateUpdate.html +3 -3
- package/docs/interfaces/datatypes.TCPEdge.html +11 -11
- package/docs/interfaces/datatypes.TCPEdgeCreate.html +7 -7
- package/docs/interfaces/datatypes.TCPEdgeList.html +3 -3
- package/docs/interfaces/datatypes.TCPEdgeUpdate.html +6 -6
- package/docs/interfaces/datatypes.TLSCertificate.html +28 -28
- package/docs/interfaces/datatypes.TLSCertificateCreate.html +8 -8
- 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 +13 -13
- package/docs/interfaces/datatypes.TLSEdgeCreate.html +9 -9
- package/docs/interfaces/datatypes.TLSEdgeList.html +3 -3
- package/docs/interfaces/datatypes.TLSEdgeUpdate.html +8 -8
- package/docs/interfaces/datatypes.Tunnel.html +17 -17
- package/docs/interfaces/datatypes.TunnelGroupBackend.html +10 -10
- package/docs/interfaces/datatypes.TunnelGroupBackendCreate.html +5 -5
- 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 +12 -12
- package/docs/interfaces/datatypes.TunnelSessionList.html +3 -3
- package/docs/interfaces/datatypes.TunnelSessionsUpdate.html +1 -1
- package/docs/interfaces/datatypes.UserAgent.html +262 -0
- package/docs/interfaces/datatypes.WeightedBackend.html +9 -9
- package/docs/interfaces/datatypes.WeightedBackendCreate.html +5 -5
- 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 +8 -0
- package/jest.config.js +2 -0
- package/lib/client.d.ts +9 -7
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +89 -119
- package/lib/client.js.map +1 -1
- package/lib/datatypes.d.ts +392 -201
- package/lib/datatypes.d.ts.map +1 -1
- package/lib/datatypes.js +4 -3
- package/lib/datatypes.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +16 -28
- package/lib/index.js.map +1 -1
- package/lib/services.d.ts +164 -126
- package/lib/services.d.ts.map +1 -1
- package/lib/services.js +3294 -3356
- package/lib/services.js.map +1 -1
- package/lib/util.d.ts.map +1 -1
- package/lib/util.js +35 -34
- package/lib/util.js.map +1 -1
- package/package.json +3 -3
- package/src/client.ts +16 -32
- package/src/datatypes.ts +413 -204
- package/src/index.ts +2 -0
- package/src/services.ts +768 -519
- package/src/util.ts +2 -0
- package/test/apikey.test.js +62 -63
package/src/services.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Code generated for API Clients. DO NOT EDIT.
|
|
2
|
+
|
|
1
3
|
import { Wretcher } from 'wretch';
|
|
2
4
|
|
|
3
5
|
import * as datatypes from './datatypes';
|
|
@@ -26,14 +28,13 @@ export class AbuseReports {
|
|
|
26
28
|
.json(payload => util.deserializeResult(payload))
|
|
27
29
|
.then(f => f, util.onRejected);
|
|
28
30
|
}
|
|
29
|
-
|
|
30
31
|
/**
|
|
31
32
|
* Get the detailed status of abuse report by ID.
|
|
32
33
|
*/
|
|
33
|
-
public get(
|
|
34
|
+
public get(id): Promise<datatypes.AbuseReport> {
|
|
34
35
|
return this.httpClient
|
|
35
|
-
.url(`/abuse_reports/${
|
|
36
|
-
.get()
|
|
36
|
+
.url(`/abuse_reports/${id}`)
|
|
37
|
+
.get(id)
|
|
37
38
|
.json(payload => util.deserializeResult(payload))
|
|
38
39
|
.then(f => f, util.onRejected);
|
|
39
40
|
}
|
|
@@ -58,39 +59,40 @@ export class AgentIngresses {
|
|
|
58
59
|
.json(payload => util.deserializeResult(payload))
|
|
59
60
|
.then(f => f, util.onRejected);
|
|
60
61
|
}
|
|
61
|
-
|
|
62
62
|
/**
|
|
63
63
|
* Delete an Agent Ingress by ID
|
|
64
64
|
*/
|
|
65
|
-
public delete(
|
|
65
|
+
public delete(id): Promise<void> {
|
|
66
66
|
return this.httpClient
|
|
67
|
-
.url(`/agent_ingresses/${
|
|
68
|
-
.delete()
|
|
67
|
+
.url(`/agent_ingresses/${id}`)
|
|
68
|
+
.delete(id)
|
|
69
69
|
.json(payload => util.deserializeResult(payload))
|
|
70
70
|
.then(f => f, util.onRejected);
|
|
71
71
|
}
|
|
72
|
-
|
|
73
72
|
/**
|
|
74
73
|
* Get the details of an Agent Ingress by ID.
|
|
75
74
|
*/
|
|
76
|
-
public get(
|
|
75
|
+
public get(id): Promise<datatypes.AgentIngress> {
|
|
77
76
|
return this.httpClient
|
|
78
|
-
.url(`/agent_ingresses/${
|
|
79
|
-
.get()
|
|
77
|
+
.url(`/agent_ingresses/${id}`)
|
|
78
|
+
.get(id)
|
|
80
79
|
.json(payload => util.deserializeResult(payload))
|
|
81
80
|
.then(f => f, util.onRejected);
|
|
82
81
|
}
|
|
83
|
-
|
|
84
82
|
/**
|
|
85
83
|
* List all Agent Ingresses owned by this account
|
|
86
84
|
*/
|
|
87
|
-
public async list(
|
|
85
|
+
public async list(
|
|
86
|
+
beforeId?: string,
|
|
87
|
+
limit?: string
|
|
88
|
+
): Promise<Array<datatypes.AgentIngress>> {
|
|
88
89
|
const array: Array<datatypes.AgentIngress> = [];
|
|
89
|
-
for await (const item of this._asyncList()) {
|
|
90
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
90
91
|
array.push(item);
|
|
91
92
|
}
|
|
92
93
|
return array;
|
|
93
94
|
}
|
|
95
|
+
|
|
94
96
|
private _pagedList(
|
|
95
97
|
arg: datatypes.Paging
|
|
96
98
|
): Promise<datatypes.AgentIngressList> {
|
|
@@ -101,11 +103,15 @@ export class AgentIngresses {
|
|
|
101
103
|
.json(payload => util.deserializeResult(payload))
|
|
102
104
|
.then(util.onFulfilled, util.onRejected);
|
|
103
105
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
|
|
107
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
106
108
|
let nextPage = 'initial loop';
|
|
107
109
|
let page: datatypes.Paging = { limit: limit };
|
|
108
110
|
|
|
111
|
+
if (beforeId) {
|
|
112
|
+
page.beforeId = beforeId;
|
|
113
|
+
}
|
|
114
|
+
|
|
109
115
|
while (nextPage) {
|
|
110
116
|
const pagedList = await this._pagedList(page);
|
|
111
117
|
nextPage = pagedList.nextPageUri;
|
|
@@ -161,39 +167,40 @@ export class APIKeys {
|
|
|
161
167
|
.json(payload => util.deserializeResult(payload))
|
|
162
168
|
.then(f => f, util.onRejected);
|
|
163
169
|
}
|
|
164
|
-
|
|
165
170
|
/**
|
|
166
171
|
* Delete an API key by ID
|
|
167
172
|
*/
|
|
168
|
-
public delete(
|
|
173
|
+
public delete(id): Promise<void> {
|
|
169
174
|
return this.httpClient
|
|
170
|
-
.url(`/api_keys/${
|
|
171
|
-
.delete()
|
|
175
|
+
.url(`/api_keys/${id}`)
|
|
176
|
+
.delete(id)
|
|
172
177
|
.json(payload => util.deserializeResult(payload))
|
|
173
178
|
.then(f => f, util.onRejected);
|
|
174
179
|
}
|
|
175
|
-
|
|
176
180
|
/**
|
|
177
181
|
* Get the details of an API key by ID.
|
|
178
182
|
*/
|
|
179
|
-
public get(
|
|
183
|
+
public get(id): Promise<datatypes.APIKey> {
|
|
180
184
|
return this.httpClient
|
|
181
|
-
.url(`/api_keys/${
|
|
182
|
-
.get()
|
|
185
|
+
.url(`/api_keys/${id}`)
|
|
186
|
+
.get(id)
|
|
183
187
|
.json(payload => util.deserializeResult(payload))
|
|
184
188
|
.then(f => f, util.onRejected);
|
|
185
189
|
}
|
|
186
|
-
|
|
187
190
|
/**
|
|
188
191
|
* List all API keys owned by this account
|
|
189
192
|
*/
|
|
190
|
-
public async list(
|
|
193
|
+
public async list(
|
|
194
|
+
beforeId?: string,
|
|
195
|
+
limit?: string
|
|
196
|
+
): Promise<Array<datatypes.APIKey>> {
|
|
191
197
|
const array: Array<datatypes.APIKey> = [];
|
|
192
|
-
for await (const item of this._asyncList()) {
|
|
198
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
193
199
|
array.push(item);
|
|
194
200
|
}
|
|
195
201
|
return array;
|
|
196
202
|
}
|
|
203
|
+
|
|
197
204
|
private _pagedList(arg: datatypes.Paging): Promise<datatypes.APIKeyList> {
|
|
198
205
|
return this.httpClient
|
|
199
206
|
.url(`/api_keys`)
|
|
@@ -202,11 +209,15 @@ export class APIKeys {
|
|
|
202
209
|
.json(payload => util.deserializeResult(payload))
|
|
203
210
|
.then(util.onFulfilled, util.onRejected);
|
|
204
211
|
}
|
|
205
|
-
|
|
206
|
-
|
|
212
|
+
|
|
213
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
207
214
|
let nextPage = 'initial loop';
|
|
208
215
|
let page: datatypes.Paging = { limit: limit };
|
|
209
216
|
|
|
217
|
+
if (beforeId) {
|
|
218
|
+
page.beforeId = beforeId;
|
|
219
|
+
}
|
|
220
|
+
|
|
210
221
|
while (nextPage) {
|
|
211
222
|
const pagedList = await this._pagedList(page);
|
|
212
223
|
nextPage = pagedList.nextPageUri;
|
|
@@ -236,6 +247,269 @@ export class APIKeys {
|
|
|
236
247
|
}
|
|
237
248
|
}
|
|
238
249
|
|
|
250
|
+
export class ApplicationSessions {
|
|
251
|
+
private httpClient: Wretcher;
|
|
252
|
+
|
|
253
|
+
/** Do not construct this object directly, use the <code>applicationSessions</code> property of an <code>Ngrok</code> client object instead. */
|
|
254
|
+
public constructor(httpClient: Wretcher) {
|
|
255
|
+
this.httpClient = httpClient;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Get an application session by ID.
|
|
259
|
+
*/
|
|
260
|
+
public get(id): Promise<datatypes.ApplicationSession> {
|
|
261
|
+
return this.httpClient
|
|
262
|
+
.url(`/app/sessions/${id}`)
|
|
263
|
+
.get(id)
|
|
264
|
+
.json(payload => util.deserializeResult(payload))
|
|
265
|
+
.then(f => f, util.onRejected);
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Delete an application session by ID.
|
|
269
|
+
*/
|
|
270
|
+
public delete(id): Promise<void> {
|
|
271
|
+
return this.httpClient
|
|
272
|
+
.url(`/app/sessions/${id}`)
|
|
273
|
+
.delete(id)
|
|
274
|
+
.json(payload => util.deserializeResult(payload))
|
|
275
|
+
.then(f => f, util.onRejected);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* List all application sessions for this account.
|
|
279
|
+
*/
|
|
280
|
+
public async list(
|
|
281
|
+
beforeId?: string,
|
|
282
|
+
limit?: string
|
|
283
|
+
): Promise<Array<datatypes.ApplicationSession>> {
|
|
284
|
+
const array: Array<datatypes.ApplicationSession> = [];
|
|
285
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
286
|
+
array.push(item);
|
|
287
|
+
}
|
|
288
|
+
return array;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
private _pagedList(
|
|
292
|
+
arg: datatypes.Paging
|
|
293
|
+
): Promise<datatypes.ApplicationSessionList> {
|
|
294
|
+
return this.httpClient
|
|
295
|
+
.url(`/app/sessions`)
|
|
296
|
+
.query(arg)
|
|
297
|
+
.get()
|
|
298
|
+
.json(payload => util.deserializeResult(payload))
|
|
299
|
+
.then(util.onFulfilled, util.onRejected);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
303
|
+
let nextPage = 'initial loop';
|
|
304
|
+
let page: datatypes.Paging = { limit: limit };
|
|
305
|
+
|
|
306
|
+
if (beforeId) {
|
|
307
|
+
page.beforeId = beforeId;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
while (nextPage) {
|
|
311
|
+
const pagedList = await this._pagedList(page);
|
|
312
|
+
nextPage = pagedList.nextPageUri;
|
|
313
|
+
const items: datatypes.ApplicationSession[] =
|
|
314
|
+
pagedList.applicationSessions;
|
|
315
|
+
|
|
316
|
+
if (nextPage) {
|
|
317
|
+
page = {
|
|
318
|
+
beforeId: items[items.length - 1].id,
|
|
319
|
+
limit: limit,
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
for (const item of items) {
|
|
324
|
+
yield item;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export class ApplicationUsers {
|
|
331
|
+
private httpClient: Wretcher;
|
|
332
|
+
|
|
333
|
+
/** Do not construct this object directly, use the <code>applicationUsers</code> property of an <code>Ngrok</code> client object instead. */
|
|
334
|
+
public constructor(httpClient: Wretcher) {
|
|
335
|
+
this.httpClient = httpClient;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Get an application user by ID.
|
|
339
|
+
*/
|
|
340
|
+
public get(id): Promise<datatypes.ApplicationUser> {
|
|
341
|
+
return this.httpClient
|
|
342
|
+
.url(`/app/users/${id}`)
|
|
343
|
+
.get(id)
|
|
344
|
+
.json(payload => util.deserializeResult(payload))
|
|
345
|
+
.then(f => f, util.onRejected);
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Delete an application user by ID.
|
|
349
|
+
*/
|
|
350
|
+
public delete(id): Promise<void> {
|
|
351
|
+
return this.httpClient
|
|
352
|
+
.url(`/app/users/${id}`)
|
|
353
|
+
.delete(id)
|
|
354
|
+
.json(payload => util.deserializeResult(payload))
|
|
355
|
+
.then(f => f, util.onRejected);
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* List all application users for this account.
|
|
359
|
+
*/
|
|
360
|
+
public async list(
|
|
361
|
+
beforeId?: string,
|
|
362
|
+
limit?: string
|
|
363
|
+
): Promise<Array<datatypes.ApplicationUser>> {
|
|
364
|
+
const array: Array<datatypes.ApplicationUser> = [];
|
|
365
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
366
|
+
array.push(item);
|
|
367
|
+
}
|
|
368
|
+
return array;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
private _pagedList(
|
|
372
|
+
arg: datatypes.Paging
|
|
373
|
+
): Promise<datatypes.ApplicationUserList> {
|
|
374
|
+
return this.httpClient
|
|
375
|
+
.url(`/app/users`)
|
|
376
|
+
.query(arg)
|
|
377
|
+
.get()
|
|
378
|
+
.json(payload => util.deserializeResult(payload))
|
|
379
|
+
.then(util.onFulfilled, util.onRejected);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
383
|
+
let nextPage = 'initial loop';
|
|
384
|
+
let page: datatypes.Paging = { limit: limit };
|
|
385
|
+
|
|
386
|
+
if (beforeId) {
|
|
387
|
+
page.beforeId = beforeId;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
while (nextPage) {
|
|
391
|
+
const pagedList = await this._pagedList(page);
|
|
392
|
+
nextPage = pagedList.nextPageUri;
|
|
393
|
+
const items: datatypes.ApplicationUser[] = pagedList.applicationUsers;
|
|
394
|
+
|
|
395
|
+
if (nextPage) {
|
|
396
|
+
page = {
|
|
397
|
+
beforeId: items[items.length - 1].id,
|
|
398
|
+
limit: limit,
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
for (const item of items) {
|
|
403
|
+
yield item;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Tunnel Sessions represent instances of ngrok agents or SSH reverse tunnel
|
|
411
|
+
sessions that are running and connected to the ngrok service. Each tunnel
|
|
412
|
+
session can include one or more Tunnels.
|
|
413
|
+
*/
|
|
414
|
+
export class TunnelSessions {
|
|
415
|
+
private httpClient: Wretcher;
|
|
416
|
+
|
|
417
|
+
/** Do not construct this object directly, use the <code>tunnelSessions</code> property of an <code>Ngrok</code> client object instead. */
|
|
418
|
+
public constructor(httpClient: Wretcher) {
|
|
419
|
+
this.httpClient = httpClient;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* List all online tunnel sessions running on this account.
|
|
423
|
+
*/
|
|
424
|
+
public async list(
|
|
425
|
+
beforeId?: string,
|
|
426
|
+
limit?: string
|
|
427
|
+
): Promise<Array<datatypes.TunnelSession>> {
|
|
428
|
+
const array: Array<datatypes.TunnelSession> = [];
|
|
429
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
430
|
+
array.push(item);
|
|
431
|
+
}
|
|
432
|
+
return array;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
private _pagedList(
|
|
436
|
+
arg: datatypes.Paging
|
|
437
|
+
): Promise<datatypes.TunnelSessionList> {
|
|
438
|
+
return this.httpClient
|
|
439
|
+
.url(`/tunnel_sessions`)
|
|
440
|
+
.query(arg)
|
|
441
|
+
.get()
|
|
442
|
+
.json(payload => util.deserializeResult(payload))
|
|
443
|
+
.then(util.onFulfilled, util.onRejected);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
447
|
+
let nextPage = 'initial loop';
|
|
448
|
+
let page: datatypes.Paging = { limit: limit };
|
|
449
|
+
|
|
450
|
+
if (beforeId) {
|
|
451
|
+
page.beforeId = beforeId;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
while (nextPage) {
|
|
455
|
+
const pagedList = await this._pagedList(page);
|
|
456
|
+
nextPage = pagedList.nextPageUri;
|
|
457
|
+
const items: datatypes.TunnelSession[] = pagedList.tunnelSessions;
|
|
458
|
+
|
|
459
|
+
if (nextPage) {
|
|
460
|
+
page = {
|
|
461
|
+
beforeId: items[items.length - 1].id,
|
|
462
|
+
limit: limit,
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
for (const item of items) {
|
|
467
|
+
yield item;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Get the detailed status of a tunnel session by ID
|
|
473
|
+
*/
|
|
474
|
+
public get(id): Promise<datatypes.TunnelSession> {
|
|
475
|
+
return this.httpClient
|
|
476
|
+
.url(`/tunnel_sessions/${id}`)
|
|
477
|
+
.get(id)
|
|
478
|
+
.json(payload => util.deserializeResult(payload))
|
|
479
|
+
.then(f => f, util.onRejected);
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Issues a command instructing the ngrok agent to restart. The agent restarts itself by calling exec() on platforms that support it. This operation is notably not supported on Windows. When an agent restarts, it reconnects with a new tunnel session ID.
|
|
483
|
+
*/
|
|
484
|
+
public restart(id): Promise<void> {
|
|
485
|
+
return this.httpClient
|
|
486
|
+
.url(`/tunnel_sessions/${id}/restart`)
|
|
487
|
+
.post(id)
|
|
488
|
+
.json(payload => util.deserializeResult(payload))
|
|
489
|
+
.then(f => f, util.onRejected);
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Issues a command instructing the ngrok agent that started this tunnel session to exit.
|
|
493
|
+
*/
|
|
494
|
+
public stop(id): Promise<void> {
|
|
495
|
+
return this.httpClient
|
|
496
|
+
.url(`/tunnel_sessions/${id}/stop`)
|
|
497
|
+
.post(id)
|
|
498
|
+
.json(payload => util.deserializeResult(payload))
|
|
499
|
+
.then(f => f, util.onRejected);
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Issues a command instructing the ngrok agent to update itself to the latest version. After this call completes successfully, the ngrok agent will be in the update process. A caller should wait some amount of time to allow the update to complete (at least 10 seconds) before making a call to the Restart endpoint to request that the agent restart itself to start using the new code. This call will never update an ngrok agent to a new major version which could cause breaking compatibility issues. If you wish to update to a new major version, that must be done manually. Still, please be aware that updating your ngrok agent could break your integration. This call will fail in any of the following circumstances: there is no update available the ngrok agent's configuration disabled update checks the agent is currently in process of updating the agent has already successfully updated but has not yet been restarted
|
|
503
|
+
*/
|
|
504
|
+
public update(arg: datatypes.TunnelSessionsUpdate): Promise<void> {
|
|
505
|
+
return this.httpClient
|
|
506
|
+
.url(`/tunnel_sessions/${arg.id}/update`)
|
|
507
|
+
.post(util.serializeArgument(arg))
|
|
508
|
+
.json(payload => util.deserializeResult(payload))
|
|
509
|
+
.then(f => f, util.onRejected);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
239
513
|
/**
|
|
240
514
|
* A Failover backend defines failover behavior within a list of referenced
|
|
241
515
|
backends. Traffic is sent to the first backend in the list. If that backend
|
|
@@ -261,39 +535,40 @@ export class FailoverBackends {
|
|
|
261
535
|
.json(payload => util.deserializeResult(payload))
|
|
262
536
|
.then(f => f, util.onRejected);
|
|
263
537
|
}
|
|
264
|
-
|
|
265
538
|
/**
|
|
266
539
|
* Delete a Failover backend by ID.
|
|
267
540
|
*/
|
|
268
|
-
public delete(
|
|
541
|
+
public delete(id): Promise<void> {
|
|
269
542
|
return this.httpClient
|
|
270
|
-
.url(`/backends/failover/${
|
|
271
|
-
.delete()
|
|
543
|
+
.url(`/backends/failover/${id}`)
|
|
544
|
+
.delete(id)
|
|
272
545
|
.json(payload => util.deserializeResult(payload))
|
|
273
546
|
.then(f => f, util.onRejected);
|
|
274
547
|
}
|
|
275
|
-
|
|
276
548
|
/**
|
|
277
549
|
* Get detailed information about a Failover backend by ID
|
|
278
550
|
*/
|
|
279
|
-
public get(
|
|
551
|
+
public get(id): Promise<datatypes.FailoverBackend> {
|
|
280
552
|
return this.httpClient
|
|
281
|
-
.url(`/backends/failover/${
|
|
282
|
-
.get()
|
|
553
|
+
.url(`/backends/failover/${id}`)
|
|
554
|
+
.get(id)
|
|
283
555
|
.json(payload => util.deserializeResult(payload))
|
|
284
556
|
.then(f => f, util.onRejected);
|
|
285
557
|
}
|
|
286
|
-
|
|
287
558
|
/**
|
|
288
559
|
* List all Failover backends on this account
|
|
289
560
|
*/
|
|
290
|
-
public async list(
|
|
561
|
+
public async list(
|
|
562
|
+
beforeId?: string,
|
|
563
|
+
limit?: string
|
|
564
|
+
): Promise<Array<datatypes.FailoverBackend>> {
|
|
291
565
|
const array: Array<datatypes.FailoverBackend> = [];
|
|
292
|
-
for await (const item of this._asyncList()) {
|
|
566
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
293
567
|
array.push(item);
|
|
294
568
|
}
|
|
295
569
|
return array;
|
|
296
570
|
}
|
|
571
|
+
|
|
297
572
|
private _pagedList(
|
|
298
573
|
arg: datatypes.Paging
|
|
299
574
|
): Promise<datatypes.FailoverBackendList> {
|
|
@@ -304,11 +579,15 @@ export class FailoverBackends {
|
|
|
304
579
|
.json(payload => util.deserializeResult(payload))
|
|
305
580
|
.then(util.onFulfilled, util.onRejected);
|
|
306
581
|
}
|
|
307
|
-
|
|
308
|
-
|
|
582
|
+
|
|
583
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
309
584
|
let nextPage = 'initial loop';
|
|
310
585
|
let page: datatypes.Paging = { limit: limit };
|
|
311
586
|
|
|
587
|
+
if (beforeId) {
|
|
588
|
+
page.beforeId = beforeId;
|
|
589
|
+
}
|
|
590
|
+
|
|
312
591
|
while (nextPage) {
|
|
313
592
|
const pagedList = await this._pagedList(page);
|
|
314
593
|
nextPage = pagedList.nextPageUri;
|
|
@@ -356,30 +635,31 @@ export class HTTPResponseBackends {
|
|
|
356
635
|
.json(payload => util.deserializeResult(payload))
|
|
357
636
|
.then(f => f, util.onRejected);
|
|
358
637
|
}
|
|
359
|
-
|
|
360
|
-
public delete(arg: datatypes.Item): Promise<void> {
|
|
638
|
+
public delete(id): Promise<void> {
|
|
361
639
|
return this.httpClient
|
|
362
|
-
.url(`/backends/http_response/${
|
|
363
|
-
.delete()
|
|
640
|
+
.url(`/backends/http_response/${id}`)
|
|
641
|
+
.delete(id)
|
|
364
642
|
.json(payload => util.deserializeResult(payload))
|
|
365
643
|
.then(f => f, util.onRejected);
|
|
366
644
|
}
|
|
367
|
-
|
|
368
|
-
public get(arg: datatypes.Item): Promise<datatypes.HTTPResponseBackend> {
|
|
645
|
+
public get(id): Promise<datatypes.HTTPResponseBackend> {
|
|
369
646
|
return this.httpClient
|
|
370
|
-
.url(`/backends/http_response/${
|
|
371
|
-
.get()
|
|
647
|
+
.url(`/backends/http_response/${id}`)
|
|
648
|
+
.get(id)
|
|
372
649
|
.json(payload => util.deserializeResult(payload))
|
|
373
650
|
.then(f => f, util.onRejected);
|
|
374
651
|
}
|
|
375
|
-
|
|
376
|
-
|
|
652
|
+
public async list(
|
|
653
|
+
beforeId?: string,
|
|
654
|
+
limit?: string
|
|
655
|
+
): Promise<Array<datatypes.HTTPResponseBackend>> {
|
|
377
656
|
const array: Array<datatypes.HTTPResponseBackend> = [];
|
|
378
|
-
for await (const item of this._asyncList()) {
|
|
657
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
379
658
|
array.push(item);
|
|
380
659
|
}
|
|
381
660
|
return array;
|
|
382
661
|
}
|
|
662
|
+
|
|
383
663
|
private _pagedList(
|
|
384
664
|
arg: datatypes.Paging
|
|
385
665
|
): Promise<datatypes.HTTPResponseBackendList> {
|
|
@@ -390,11 +670,15 @@ export class HTTPResponseBackends {
|
|
|
390
670
|
.json(payload => util.deserializeResult(payload))
|
|
391
671
|
.then(util.onFulfilled, util.onRejected);
|
|
392
672
|
}
|
|
393
|
-
|
|
394
|
-
|
|
673
|
+
|
|
674
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
395
675
|
let nextPage = 'initial loop';
|
|
396
676
|
let page: datatypes.Paging = { limit: limit };
|
|
397
677
|
|
|
678
|
+
if (beforeId) {
|
|
679
|
+
page.beforeId = beforeId;
|
|
680
|
+
}
|
|
681
|
+
|
|
398
682
|
while (nextPage) {
|
|
399
683
|
const pagedList = await this._pagedList(page);
|
|
400
684
|
nextPage = pagedList.nextPageUri;
|
|
@@ -446,39 +730,40 @@ export class TunnelGroupBackends {
|
|
|
446
730
|
.json(payload => util.deserializeResult(payload))
|
|
447
731
|
.then(f => f, util.onRejected);
|
|
448
732
|
}
|
|
449
|
-
|
|
450
733
|
/**
|
|
451
734
|
* Delete a TunnelGroup backend by ID.
|
|
452
735
|
*/
|
|
453
|
-
public delete(
|
|
736
|
+
public delete(id): Promise<void> {
|
|
454
737
|
return this.httpClient
|
|
455
|
-
.url(`/backends/tunnel_group/${
|
|
456
|
-
.delete()
|
|
738
|
+
.url(`/backends/tunnel_group/${id}`)
|
|
739
|
+
.delete(id)
|
|
457
740
|
.json(payload => util.deserializeResult(payload))
|
|
458
741
|
.then(f => f, util.onRejected);
|
|
459
742
|
}
|
|
460
|
-
|
|
461
743
|
/**
|
|
462
744
|
* Get detailed information about a TunnelGroup backend by ID
|
|
463
745
|
*/
|
|
464
|
-
public get(
|
|
746
|
+
public get(id): Promise<datatypes.TunnelGroupBackend> {
|
|
465
747
|
return this.httpClient
|
|
466
|
-
.url(`/backends/tunnel_group/${
|
|
467
|
-
.get()
|
|
748
|
+
.url(`/backends/tunnel_group/${id}`)
|
|
749
|
+
.get(id)
|
|
468
750
|
.json(payload => util.deserializeResult(payload))
|
|
469
751
|
.then(f => f, util.onRejected);
|
|
470
752
|
}
|
|
471
|
-
|
|
472
753
|
/**
|
|
473
754
|
* List all TunnelGroup backends on this account
|
|
474
755
|
*/
|
|
475
|
-
public async list(
|
|
756
|
+
public async list(
|
|
757
|
+
beforeId?: string,
|
|
758
|
+
limit?: string
|
|
759
|
+
): Promise<Array<datatypes.TunnelGroupBackend>> {
|
|
476
760
|
const array: Array<datatypes.TunnelGroupBackend> = [];
|
|
477
|
-
for await (const item of this._asyncList()) {
|
|
761
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
478
762
|
array.push(item);
|
|
479
763
|
}
|
|
480
764
|
return array;
|
|
481
765
|
}
|
|
766
|
+
|
|
482
767
|
private _pagedList(
|
|
483
768
|
arg: datatypes.Paging
|
|
484
769
|
): Promise<datatypes.TunnelGroupBackendList> {
|
|
@@ -489,11 +774,15 @@ export class TunnelGroupBackends {
|
|
|
489
774
|
.json(payload => util.deserializeResult(payload))
|
|
490
775
|
.then(util.onFulfilled, util.onRejected);
|
|
491
776
|
}
|
|
492
|
-
|
|
493
|
-
|
|
777
|
+
|
|
778
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
494
779
|
let nextPage = 'initial loop';
|
|
495
780
|
let page: datatypes.Paging = { limit: limit };
|
|
496
781
|
|
|
782
|
+
if (beforeId) {
|
|
783
|
+
page.beforeId = beforeId;
|
|
784
|
+
}
|
|
785
|
+
|
|
497
786
|
while (nextPage) {
|
|
498
787
|
const pagedList = await this._pagedList(page);
|
|
499
788
|
nextPage = pagedList.nextPageUri;
|
|
@@ -550,39 +839,40 @@ export class WeightedBackends {
|
|
|
550
839
|
.json(payload => util.deserializeResult(payload))
|
|
551
840
|
.then(f => f, util.onRejected);
|
|
552
841
|
}
|
|
553
|
-
|
|
554
842
|
/**
|
|
555
843
|
* Delete a Weighted backend by ID.
|
|
556
844
|
*/
|
|
557
|
-
public delete(
|
|
845
|
+
public delete(id): Promise<void> {
|
|
558
846
|
return this.httpClient
|
|
559
|
-
.url(`/backends/weighted/${
|
|
560
|
-
.delete()
|
|
847
|
+
.url(`/backends/weighted/${id}`)
|
|
848
|
+
.delete(id)
|
|
561
849
|
.json(payload => util.deserializeResult(payload))
|
|
562
850
|
.then(f => f, util.onRejected);
|
|
563
851
|
}
|
|
564
|
-
|
|
565
852
|
/**
|
|
566
853
|
* Get detailed information about a Weighted backend by ID
|
|
567
854
|
*/
|
|
568
|
-
public get(
|
|
855
|
+
public get(id): Promise<datatypes.WeightedBackend> {
|
|
569
856
|
return this.httpClient
|
|
570
|
-
.url(`/backends/weighted/${
|
|
571
|
-
.get()
|
|
857
|
+
.url(`/backends/weighted/${id}`)
|
|
858
|
+
.get(id)
|
|
572
859
|
.json(payload => util.deserializeResult(payload))
|
|
573
860
|
.then(f => f, util.onRejected);
|
|
574
861
|
}
|
|
575
|
-
|
|
576
862
|
/**
|
|
577
863
|
* List all Weighted backends on this account
|
|
578
864
|
*/
|
|
579
|
-
public async list(
|
|
865
|
+
public async list(
|
|
866
|
+
beforeId?: string,
|
|
867
|
+
limit?: string
|
|
868
|
+
): Promise<Array<datatypes.WeightedBackend>> {
|
|
580
869
|
const array: Array<datatypes.WeightedBackend> = [];
|
|
581
|
-
for await (const item of this._asyncList()) {
|
|
870
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
582
871
|
array.push(item);
|
|
583
872
|
}
|
|
584
873
|
return array;
|
|
585
874
|
}
|
|
875
|
+
|
|
586
876
|
private _pagedList(
|
|
587
877
|
arg: datatypes.Paging
|
|
588
878
|
): Promise<datatypes.WeightedBackendList> {
|
|
@@ -593,11 +883,15 @@ export class WeightedBackends {
|
|
|
593
883
|
.json(payload => util.deserializeResult(payload))
|
|
594
884
|
.then(util.onFulfilled, util.onRejected);
|
|
595
885
|
}
|
|
596
|
-
|
|
597
|
-
|
|
886
|
+
|
|
887
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
598
888
|
let nextPage = 'initial loop';
|
|
599
889
|
let page: datatypes.Paging = { limit: limit };
|
|
600
890
|
|
|
891
|
+
if (beforeId) {
|
|
892
|
+
page.beforeId = beforeId;
|
|
893
|
+
}
|
|
894
|
+
|
|
601
895
|
while (nextPage) {
|
|
602
896
|
const pagedList = await this._pagedList(page);
|
|
603
897
|
nextPage = pagedList.nextPageUri;
|
|
@@ -655,39 +949,40 @@ export class CertificateAuthorities {
|
|
|
655
949
|
.json(payload => util.deserializeResult(payload))
|
|
656
950
|
.then(f => f, util.onRejected);
|
|
657
951
|
}
|
|
658
|
-
|
|
659
952
|
/**
|
|
660
953
|
* Delete a Certificate Authority
|
|
661
954
|
*/
|
|
662
|
-
public delete(
|
|
955
|
+
public delete(id): Promise<void> {
|
|
663
956
|
return this.httpClient
|
|
664
|
-
.url(`/certificate_authorities/${
|
|
665
|
-
.delete()
|
|
957
|
+
.url(`/certificate_authorities/${id}`)
|
|
958
|
+
.delete(id)
|
|
666
959
|
.json(payload => util.deserializeResult(payload))
|
|
667
960
|
.then(f => f, util.onRejected);
|
|
668
961
|
}
|
|
669
|
-
|
|
670
962
|
/**
|
|
671
963
|
* Get detailed information about a certficate authority
|
|
672
964
|
*/
|
|
673
|
-
public get(
|
|
965
|
+
public get(id): Promise<datatypes.CertificateAuthority> {
|
|
674
966
|
return this.httpClient
|
|
675
|
-
.url(`/certificate_authorities/${
|
|
676
|
-
.get()
|
|
967
|
+
.url(`/certificate_authorities/${id}`)
|
|
968
|
+
.get(id)
|
|
677
969
|
.json(payload => util.deserializeResult(payload))
|
|
678
970
|
.then(f => f, util.onRejected);
|
|
679
971
|
}
|
|
680
|
-
|
|
681
972
|
/**
|
|
682
973
|
* List all Certificate Authority on this account
|
|
683
974
|
*/
|
|
684
|
-
public async list(
|
|
975
|
+
public async list(
|
|
976
|
+
beforeId?: string,
|
|
977
|
+
limit?: string
|
|
978
|
+
): Promise<Array<datatypes.CertificateAuthority>> {
|
|
685
979
|
const array: Array<datatypes.CertificateAuthority> = [];
|
|
686
|
-
for await (const item of this._asyncList()) {
|
|
980
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
687
981
|
array.push(item);
|
|
688
982
|
}
|
|
689
983
|
return array;
|
|
690
984
|
}
|
|
985
|
+
|
|
691
986
|
private _pagedList(
|
|
692
987
|
arg: datatypes.Paging
|
|
693
988
|
): Promise<datatypes.CertificateAuthorityList> {
|
|
@@ -698,11 +993,15 @@ export class CertificateAuthorities {
|
|
|
698
993
|
.json(payload => util.deserializeResult(payload))
|
|
699
994
|
.then(util.onFulfilled, util.onRejected);
|
|
700
995
|
}
|
|
701
|
-
|
|
702
|
-
|
|
996
|
+
|
|
997
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
703
998
|
let nextPage = 'initial loop';
|
|
704
999
|
let page: datatypes.Paging = { limit: limit };
|
|
705
1000
|
|
|
1001
|
+
if (beforeId) {
|
|
1002
|
+
page.beforeId = beforeId;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
706
1005
|
while (nextPage) {
|
|
707
1006
|
const pagedList = await this._pagedList(page);
|
|
708
1007
|
nextPage = pagedList.nextPageUri;
|
|
@@ -738,7 +1037,7 @@ export class CertificateAuthorities {
|
|
|
738
1037
|
/**
|
|
739
1038
|
* Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok
|
|
740
1039
|
agent to connect the ngrok service as your account. They are installed with
|
|
741
|
-
the `ngrok authtoken` command or by specifying it in the `ngrok.yml`
|
|
1040
|
+
the `ngrok config add-authtoken` command or by specifying it in the `ngrok.yml`
|
|
742
1041
|
configuration file with the `authtoken` property.
|
|
743
1042
|
*/
|
|
744
1043
|
export class Credentials {
|
|
@@ -760,39 +1059,40 @@ export class Credentials {
|
|
|
760
1059
|
.json(payload => util.deserializeResult(payload))
|
|
761
1060
|
.then(f => f, util.onRejected);
|
|
762
1061
|
}
|
|
763
|
-
|
|
764
1062
|
/**
|
|
765
1063
|
* Delete a tunnel authtoken credential by ID
|
|
766
1064
|
*/
|
|
767
|
-
public delete(
|
|
1065
|
+
public delete(id): Promise<void> {
|
|
768
1066
|
return this.httpClient
|
|
769
|
-
.url(`/credentials/${
|
|
770
|
-
.delete()
|
|
1067
|
+
.url(`/credentials/${id}`)
|
|
1068
|
+
.delete(id)
|
|
771
1069
|
.json(payload => util.deserializeResult(payload))
|
|
772
1070
|
.then(f => f, util.onRejected);
|
|
773
1071
|
}
|
|
774
|
-
|
|
775
1072
|
/**
|
|
776
1073
|
* Get detailed information about a tunnel authtoken credential
|
|
777
1074
|
*/
|
|
778
|
-
public get(
|
|
1075
|
+
public get(id): Promise<datatypes.Credential> {
|
|
779
1076
|
return this.httpClient
|
|
780
|
-
.url(`/credentials/${
|
|
781
|
-
.get()
|
|
1077
|
+
.url(`/credentials/${id}`)
|
|
1078
|
+
.get(id)
|
|
782
1079
|
.json(payload => util.deserializeResult(payload))
|
|
783
1080
|
.then(f => f, util.onRejected);
|
|
784
1081
|
}
|
|
785
|
-
|
|
786
1082
|
/**
|
|
787
1083
|
* List all tunnel authtoken credentials on this account
|
|
788
1084
|
*/
|
|
789
|
-
public async list(
|
|
1085
|
+
public async list(
|
|
1086
|
+
beforeId?: string,
|
|
1087
|
+
limit?: string
|
|
1088
|
+
): Promise<Array<datatypes.Credential>> {
|
|
790
1089
|
const array: Array<datatypes.Credential> = [];
|
|
791
|
-
for await (const item of this._asyncList()) {
|
|
1090
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
792
1091
|
array.push(item);
|
|
793
1092
|
}
|
|
794
1093
|
return array;
|
|
795
1094
|
}
|
|
1095
|
+
|
|
796
1096
|
private _pagedList(arg: datatypes.Paging): Promise<datatypes.CredentialList> {
|
|
797
1097
|
return this.httpClient
|
|
798
1098
|
.url(`/credentials`)
|
|
@@ -801,11 +1101,15 @@ export class Credentials {
|
|
|
801
1101
|
.json(payload => util.deserializeResult(payload))
|
|
802
1102
|
.then(util.onFulfilled, util.onRejected);
|
|
803
1103
|
}
|
|
804
|
-
|
|
805
|
-
|
|
1104
|
+
|
|
1105
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
806
1106
|
let nextPage = 'initial loop';
|
|
807
1107
|
let page: datatypes.Paging = { limit: limit };
|
|
808
1108
|
|
|
1109
|
+
if (beforeId) {
|
|
1110
|
+
page.beforeId = beforeId;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
809
1113
|
while (nextPage) {
|
|
810
1114
|
const pagedList = await this._pagedList(page);
|
|
811
1115
|
nextPage = pagedList.nextPageUri;
|
|
@@ -856,7 +1160,6 @@ export class EdgesHTTPSRoutes {
|
|
|
856
1160
|
.json(payload => util.deserializeResult(payload))
|
|
857
1161
|
.then(f => f, util.onRejected);
|
|
858
1162
|
}
|
|
859
|
-
|
|
860
1163
|
/**
|
|
861
1164
|
* Get an HTTPS Edge Route by ID
|
|
862
1165
|
*/
|
|
@@ -867,7 +1170,6 @@ export class EdgesHTTPSRoutes {
|
|
|
867
1170
|
.json(payload => util.deserializeResult(payload))
|
|
868
1171
|
.then(f => f, util.onRejected);
|
|
869
1172
|
}
|
|
870
|
-
|
|
871
1173
|
/**
|
|
872
1174
|
* Updates an HTTPS Edge Route by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.
|
|
873
1175
|
*/
|
|
@@ -880,7 +1182,6 @@ export class EdgesHTTPSRoutes {
|
|
|
880
1182
|
.json(payload => util.deserializeResult(payload))
|
|
881
1183
|
.then(f => f, util.onRejected);
|
|
882
1184
|
}
|
|
883
|
-
|
|
884
1185
|
/**
|
|
885
1186
|
* Delete an HTTPS Edge Route by ID
|
|
886
1187
|
*/
|
|
@@ -910,28 +1211,30 @@ export class EdgesHTTPS {
|
|
|
910
1211
|
.json(payload => util.deserializeResult(payload))
|
|
911
1212
|
.then(f => f, util.onRejected);
|
|
912
1213
|
}
|
|
913
|
-
|
|
914
1214
|
/**
|
|
915
1215
|
* Get an HTTPS Edge by ID
|
|
916
1216
|
*/
|
|
917
|
-
public get(
|
|
1217
|
+
public get(id): Promise<datatypes.HTTPSEdge> {
|
|
918
1218
|
return this.httpClient
|
|
919
|
-
.url(`/edges/https/${
|
|
920
|
-
.get()
|
|
1219
|
+
.url(`/edges/https/${id}`)
|
|
1220
|
+
.get(id)
|
|
921
1221
|
.json(payload => util.deserializeResult(payload))
|
|
922
1222
|
.then(f => f, util.onRejected);
|
|
923
1223
|
}
|
|
924
|
-
|
|
925
1224
|
/**
|
|
926
1225
|
* Returns a list of all HTTPS Edges on this account
|
|
927
1226
|
*/
|
|
928
|
-
public async list(
|
|
1227
|
+
public async list(
|
|
1228
|
+
beforeId?: string,
|
|
1229
|
+
limit?: string
|
|
1230
|
+
): Promise<Array<datatypes.HTTPSEdge>> {
|
|
929
1231
|
const array: Array<datatypes.HTTPSEdge> = [];
|
|
930
|
-
for await (const item of this._asyncList()) {
|
|
1232
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
931
1233
|
array.push(item);
|
|
932
1234
|
}
|
|
933
1235
|
return array;
|
|
934
1236
|
}
|
|
1237
|
+
|
|
935
1238
|
private _pagedList(arg: datatypes.Paging): Promise<datatypes.HTTPSEdgeList> {
|
|
936
1239
|
return this.httpClient
|
|
937
1240
|
.url(`/edges/https`)
|
|
@@ -940,11 +1243,15 @@ export class EdgesHTTPS {
|
|
|
940
1243
|
.json(payload => util.deserializeResult(payload))
|
|
941
1244
|
.then(util.onFulfilled, util.onRejected);
|
|
942
1245
|
}
|
|
943
|
-
|
|
944
|
-
|
|
1246
|
+
|
|
1247
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
945
1248
|
let nextPage = 'initial loop';
|
|
946
1249
|
let page: datatypes.Paging = { limit: limit };
|
|
947
1250
|
|
|
1251
|
+
if (beforeId) {
|
|
1252
|
+
page.beforeId = beforeId;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
948
1255
|
while (nextPage) {
|
|
949
1256
|
const pagedList = await this._pagedList(page);
|
|
950
1257
|
nextPage = pagedList.nextPageUri;
|
|
@@ -972,14 +1279,13 @@ export class EdgesHTTPS {
|
|
|
972
1279
|
.json(payload => util.deserializeResult(payload))
|
|
973
1280
|
.then(f => f, util.onRejected);
|
|
974
1281
|
}
|
|
975
|
-
|
|
976
1282
|
/**
|
|
977
1283
|
* Delete an HTTPS Edge by ID
|
|
978
1284
|
*/
|
|
979
|
-
public delete(
|
|
1285
|
+
public delete(id): Promise<void> {
|
|
980
1286
|
return this.httpClient
|
|
981
|
-
.url(`/edges/https/${
|
|
982
|
-
.delete()
|
|
1287
|
+
.url(`/edges/https/${id}`)
|
|
1288
|
+
.delete(id)
|
|
983
1289
|
.json(payload => util.deserializeResult(payload))
|
|
984
1290
|
.then(f => f, util.onRejected);
|
|
985
1291
|
}
|
|
@@ -1001,19 +1307,17 @@ export class HTTPSEdgeMutualTLSModule {
|
|
|
1001
1307
|
.json(payload => util.deserializeResult(payload))
|
|
1002
1308
|
.then(f => f, util.onRejected);
|
|
1003
1309
|
}
|
|
1004
|
-
|
|
1005
|
-
public get(arg: datatypes.Item): Promise<datatypes.EndpointMutualTLS> {
|
|
1310
|
+
public get(id): Promise<datatypes.EndpointMutualTLS> {
|
|
1006
1311
|
return this.httpClient
|
|
1007
|
-
.url(`/edges/https/${
|
|
1008
|
-
.get()
|
|
1312
|
+
.url(`/edges/https/${id}/mutual_tls`)
|
|
1313
|
+
.get(id)
|
|
1009
1314
|
.json(payload => util.deserializeResult(payload))
|
|
1010
1315
|
.then(f => f, util.onRejected);
|
|
1011
1316
|
}
|
|
1012
|
-
|
|
1013
|
-
public delete(arg: datatypes.Item): Promise<void> {
|
|
1317
|
+
public delete(id): Promise<void> {
|
|
1014
1318
|
return this.httpClient
|
|
1015
|
-
.url(`/edges/https/${
|
|
1016
|
-
.delete()
|
|
1319
|
+
.url(`/edges/https/${id}/mutual_tls`)
|
|
1320
|
+
.delete(id)
|
|
1017
1321
|
.json(payload => util.deserializeResult(payload))
|
|
1018
1322
|
.then(f => f, util.onRejected);
|
|
1019
1323
|
}
|
|
@@ -1035,19 +1339,17 @@ export class HTTPSEdgeTLSTerminationModule {
|
|
|
1035
1339
|
.json(payload => util.deserializeResult(payload))
|
|
1036
1340
|
.then(f => f, util.onRejected);
|
|
1037
1341
|
}
|
|
1038
|
-
|
|
1039
|
-
public get(arg: datatypes.Item): Promise<datatypes.EndpointTLSTermination> {
|
|
1342
|
+
public get(id): Promise<datatypes.EndpointTLSTermination> {
|
|
1040
1343
|
return this.httpClient
|
|
1041
|
-
.url(`/edges/https/${
|
|
1042
|
-
.get()
|
|
1344
|
+
.url(`/edges/https/${id}/tls_termination`)
|
|
1345
|
+
.get(id)
|
|
1043
1346
|
.json(payload => util.deserializeResult(payload))
|
|
1044
1347
|
.then(f => f, util.onRejected);
|
|
1045
1348
|
}
|
|
1046
|
-
|
|
1047
|
-
public delete(arg: datatypes.Item): Promise<void> {
|
|
1349
|
+
public delete(id): Promise<void> {
|
|
1048
1350
|
return this.httpClient
|
|
1049
|
-
.url(`/edges/https/${
|
|
1050
|
-
.delete()
|
|
1351
|
+
.url(`/edges/https/${id}/tls_termination`)
|
|
1352
|
+
.delete(id)
|
|
1051
1353
|
.json(payload => util.deserializeResult(payload))
|
|
1052
1354
|
.then(f => f, util.onRejected);
|
|
1053
1355
|
}
|
|
@@ -1069,7 +1371,6 @@ export class EdgeRouteBackendModule {
|
|
|
1069
1371
|
.json(payload => util.deserializeResult(payload))
|
|
1070
1372
|
.then(f => f, util.onRejected);
|
|
1071
1373
|
}
|
|
1072
|
-
|
|
1073
1374
|
public get(arg: datatypes.EdgeRouteItem): Promise<datatypes.EndpointBackend> {
|
|
1074
1375
|
return this.httpClient
|
|
1075
1376
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/backend`)
|
|
@@ -1077,7 +1378,6 @@ export class EdgeRouteBackendModule {
|
|
|
1077
1378
|
.json(payload => util.deserializeResult(payload))
|
|
1078
1379
|
.then(f => f, util.onRejected);
|
|
1079
1380
|
}
|
|
1080
|
-
|
|
1081
1381
|
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1082
1382
|
return this.httpClient
|
|
1083
1383
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/backend`)
|
|
@@ -1103,7 +1403,6 @@ export class EdgeRouteIPRestrictionModule {
|
|
|
1103
1403
|
.json(payload => util.deserializeResult(payload))
|
|
1104
1404
|
.then(f => f, util.onRejected);
|
|
1105
1405
|
}
|
|
1106
|
-
|
|
1107
1406
|
public get(
|
|
1108
1407
|
arg: datatypes.EdgeRouteItem
|
|
1109
1408
|
): Promise<datatypes.EndpointIPPolicy> {
|
|
@@ -1113,7 +1412,6 @@ export class EdgeRouteIPRestrictionModule {
|
|
|
1113
1412
|
.json(payload => util.deserializeResult(payload))
|
|
1114
1413
|
.then(f => f, util.onRejected);
|
|
1115
1414
|
}
|
|
1116
|
-
|
|
1117
1415
|
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1118
1416
|
return this.httpClient
|
|
1119
1417
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/ip_restriction`)
|
|
@@ -1139,7 +1437,6 @@ export class EdgeRouteRequestHeadersModule {
|
|
|
1139
1437
|
.json(payload => util.deserializeResult(payload))
|
|
1140
1438
|
.then(f => f, util.onRejected);
|
|
1141
1439
|
}
|
|
1142
|
-
|
|
1143
1440
|
public get(
|
|
1144
1441
|
arg: datatypes.EdgeRouteItem
|
|
1145
1442
|
): Promise<datatypes.EndpointRequestHeaders> {
|
|
@@ -1149,7 +1446,6 @@ export class EdgeRouteRequestHeadersModule {
|
|
|
1149
1446
|
.json(payload => util.deserializeResult(payload))
|
|
1150
1447
|
.then(f => f, util.onRejected);
|
|
1151
1448
|
}
|
|
1152
|
-
|
|
1153
1449
|
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1154
1450
|
return this.httpClient
|
|
1155
1451
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/request_headers`)
|
|
@@ -1175,7 +1471,6 @@ export class EdgeRouteResponseHeadersModule {
|
|
|
1175
1471
|
.json(payload => util.deserializeResult(payload))
|
|
1176
1472
|
.then(f => f, util.onRejected);
|
|
1177
1473
|
}
|
|
1178
|
-
|
|
1179
1474
|
public get(
|
|
1180
1475
|
arg: datatypes.EdgeRouteItem
|
|
1181
1476
|
): Promise<datatypes.EndpointResponseHeaders> {
|
|
@@ -1185,7 +1480,6 @@ export class EdgeRouteResponseHeadersModule {
|
|
|
1185
1480
|
.json(payload => util.deserializeResult(payload))
|
|
1186
1481
|
.then(f => f, util.onRejected);
|
|
1187
1482
|
}
|
|
1188
|
-
|
|
1189
1483
|
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1190
1484
|
return this.httpClient
|
|
1191
1485
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/response_headers`)
|
|
@@ -1211,7 +1505,6 @@ export class EdgeRouteCompressionModule {
|
|
|
1211
1505
|
.json(payload => util.deserializeResult(payload))
|
|
1212
1506
|
.then(f => f, util.onRejected);
|
|
1213
1507
|
}
|
|
1214
|
-
|
|
1215
1508
|
public get(
|
|
1216
1509
|
arg: datatypes.EdgeRouteItem
|
|
1217
1510
|
): Promise<datatypes.EndpointCompression> {
|
|
@@ -1221,7 +1514,6 @@ export class EdgeRouteCompressionModule {
|
|
|
1221
1514
|
.json(payload => util.deserializeResult(payload))
|
|
1222
1515
|
.then(f => f, util.onRejected);
|
|
1223
1516
|
}
|
|
1224
|
-
|
|
1225
1517
|
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1226
1518
|
return this.httpClient
|
|
1227
1519
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/compression`)
|
|
@@ -1247,7 +1539,6 @@ export class EdgeRouteCircuitBreakerModule {
|
|
|
1247
1539
|
.json(payload => util.deserializeResult(payload))
|
|
1248
1540
|
.then(f => f, util.onRejected);
|
|
1249
1541
|
}
|
|
1250
|
-
|
|
1251
1542
|
public get(
|
|
1252
1543
|
arg: datatypes.EdgeRouteItem
|
|
1253
1544
|
): Promise<datatypes.EndpointCircuitBreaker> {
|
|
@@ -1257,7 +1548,6 @@ export class EdgeRouteCircuitBreakerModule {
|
|
|
1257
1548
|
.json(payload => util.deserializeResult(payload))
|
|
1258
1549
|
.then(f => f, util.onRejected);
|
|
1259
1550
|
}
|
|
1260
|
-
|
|
1261
1551
|
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1262
1552
|
return this.httpClient
|
|
1263
1553
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/circuit_breaker`)
|
|
@@ -1283,7 +1573,6 @@ export class EdgeRouteWebhookVerificationModule {
|
|
|
1283
1573
|
.json(payload => util.deserializeResult(payload))
|
|
1284
1574
|
.then(f => f, util.onRejected);
|
|
1285
1575
|
}
|
|
1286
|
-
|
|
1287
1576
|
public get(
|
|
1288
1577
|
arg: datatypes.EdgeRouteItem
|
|
1289
1578
|
): Promise<datatypes.EndpointWebhookValidation> {
|
|
@@ -1293,7 +1582,6 @@ export class EdgeRouteWebhookVerificationModule {
|
|
|
1293
1582
|
.json(payload => util.deserializeResult(payload))
|
|
1294
1583
|
.then(f => f, util.onRejected);
|
|
1295
1584
|
}
|
|
1296
|
-
|
|
1297
1585
|
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1298
1586
|
return this.httpClient
|
|
1299
1587
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/webhook_verification`)
|
|
@@ -1319,7 +1607,6 @@ export class EdgeRouteOAuthModule {
|
|
|
1319
1607
|
.json(payload => util.deserializeResult(payload))
|
|
1320
1608
|
.then(f => f, util.onRejected);
|
|
1321
1609
|
}
|
|
1322
|
-
|
|
1323
1610
|
public get(arg: datatypes.EdgeRouteItem): Promise<datatypes.EndpointOAuth> {
|
|
1324
1611
|
return this.httpClient
|
|
1325
1612
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/oauth`)
|
|
@@ -1327,7 +1614,6 @@ export class EdgeRouteOAuthModule {
|
|
|
1327
1614
|
.json(payload => util.deserializeResult(payload))
|
|
1328
1615
|
.then(f => f, util.onRejected);
|
|
1329
1616
|
}
|
|
1330
|
-
|
|
1331
1617
|
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1332
1618
|
return this.httpClient
|
|
1333
1619
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/oauth`)
|
|
@@ -1353,7 +1639,6 @@ export class EdgeRouteSAMLModule {
|
|
|
1353
1639
|
.json(payload => util.deserializeResult(payload))
|
|
1354
1640
|
.then(f => f, util.onRejected);
|
|
1355
1641
|
}
|
|
1356
|
-
|
|
1357
1642
|
public get(arg: datatypes.EdgeRouteItem): Promise<datatypes.EndpointSAML> {
|
|
1358
1643
|
return this.httpClient
|
|
1359
1644
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/saml`)
|
|
@@ -1361,7 +1646,6 @@ export class EdgeRouteSAMLModule {
|
|
|
1361
1646
|
.json(payload => util.deserializeResult(payload))
|
|
1362
1647
|
.then(f => f, util.onRejected);
|
|
1363
1648
|
}
|
|
1364
|
-
|
|
1365
1649
|
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1366
1650
|
return this.httpClient
|
|
1367
1651
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/saml`)
|
|
@@ -1387,7 +1671,6 @@ export class EdgeRouteOIDCModule {
|
|
|
1387
1671
|
.json(payload => util.deserializeResult(payload))
|
|
1388
1672
|
.then(f => f, util.onRejected);
|
|
1389
1673
|
}
|
|
1390
|
-
|
|
1391
1674
|
public get(arg: datatypes.EdgeRouteItem): Promise<datatypes.EndpointOIDC> {
|
|
1392
1675
|
return this.httpClient
|
|
1393
1676
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/oidc`)
|
|
@@ -1395,7 +1678,6 @@ export class EdgeRouteOIDCModule {
|
|
|
1395
1678
|
.json(payload => util.deserializeResult(payload))
|
|
1396
1679
|
.then(f => f, util.onRejected);
|
|
1397
1680
|
}
|
|
1398
|
-
|
|
1399
1681
|
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1400
1682
|
return this.httpClient
|
|
1401
1683
|
.url(`/edges/https/${arg.edgeId}/routes/${arg.id}/oidc`)
|
|
@@ -1423,7 +1705,6 @@ export class EdgeRouteWebsocketTCPConverterModule {
|
|
|
1423
1705
|
.json(payload => util.deserializeResult(payload))
|
|
1424
1706
|
.then(f => f, util.onRejected);
|
|
1425
1707
|
}
|
|
1426
|
-
|
|
1427
1708
|
public get(
|
|
1428
1709
|
arg: datatypes.EdgeRouteItem
|
|
1429
1710
|
): Promise<datatypes.EndpointWebsocketTCPConverter> {
|
|
@@ -1435,7 +1716,6 @@ export class EdgeRouteWebsocketTCPConverterModule {
|
|
|
1435
1716
|
.json(payload => util.deserializeResult(payload))
|
|
1436
1717
|
.then(f => f, util.onRejected);
|
|
1437
1718
|
}
|
|
1438
|
-
|
|
1439
1719
|
public delete(arg: datatypes.EdgeRouteItem): Promise<void> {
|
|
1440
1720
|
return this.httpClient
|
|
1441
1721
|
.url(
|
|
@@ -1464,28 +1744,30 @@ export class EdgesTCP {
|
|
|
1464
1744
|
.json(payload => util.deserializeResult(payload))
|
|
1465
1745
|
.then(f => f, util.onRejected);
|
|
1466
1746
|
}
|
|
1467
|
-
|
|
1468
1747
|
/**
|
|
1469
1748
|
* Get a TCP Edge by ID
|
|
1470
1749
|
*/
|
|
1471
|
-
public get(
|
|
1750
|
+
public get(id): Promise<datatypes.TCPEdge> {
|
|
1472
1751
|
return this.httpClient
|
|
1473
|
-
.url(`/edges/tcp/${
|
|
1474
|
-
.get()
|
|
1752
|
+
.url(`/edges/tcp/${id}`)
|
|
1753
|
+
.get(id)
|
|
1475
1754
|
.json(payload => util.deserializeResult(payload))
|
|
1476
1755
|
.then(f => f, util.onRejected);
|
|
1477
1756
|
}
|
|
1478
|
-
|
|
1479
1757
|
/**
|
|
1480
1758
|
* Returns a list of all TCP Edges on this account
|
|
1481
1759
|
*/
|
|
1482
|
-
public async list(
|
|
1760
|
+
public async list(
|
|
1761
|
+
beforeId?: string,
|
|
1762
|
+
limit?: string
|
|
1763
|
+
): Promise<Array<datatypes.TCPEdge>> {
|
|
1483
1764
|
const array: Array<datatypes.TCPEdge> = [];
|
|
1484
|
-
for await (const item of this._asyncList()) {
|
|
1765
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
1485
1766
|
array.push(item);
|
|
1486
1767
|
}
|
|
1487
1768
|
return array;
|
|
1488
1769
|
}
|
|
1770
|
+
|
|
1489
1771
|
private _pagedList(arg: datatypes.Paging): Promise<datatypes.TCPEdgeList> {
|
|
1490
1772
|
return this.httpClient
|
|
1491
1773
|
.url(`/edges/tcp`)
|
|
@@ -1494,11 +1776,15 @@ export class EdgesTCP {
|
|
|
1494
1776
|
.json(payload => util.deserializeResult(payload))
|
|
1495
1777
|
.then(util.onFulfilled, util.onRejected);
|
|
1496
1778
|
}
|
|
1497
|
-
|
|
1498
|
-
|
|
1779
|
+
|
|
1780
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
1499
1781
|
let nextPage = 'initial loop';
|
|
1500
1782
|
let page: datatypes.Paging = { limit: limit };
|
|
1501
1783
|
|
|
1784
|
+
if (beforeId) {
|
|
1785
|
+
page.beforeId = beforeId;
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1502
1788
|
while (nextPage) {
|
|
1503
1789
|
const pagedList = await this._pagedList(page);
|
|
1504
1790
|
nextPage = pagedList.nextPageUri;
|
|
@@ -1526,14 +1812,13 @@ export class EdgesTCP {
|
|
|
1526
1812
|
.json(payload => util.deserializeResult(payload))
|
|
1527
1813
|
.then(f => f, util.onRejected);
|
|
1528
1814
|
}
|
|
1529
|
-
|
|
1530
1815
|
/**
|
|
1531
1816
|
* Delete a TCP Edge by ID
|
|
1532
1817
|
*/
|
|
1533
|
-
public delete(
|
|
1818
|
+
public delete(id): Promise<void> {
|
|
1534
1819
|
return this.httpClient
|
|
1535
|
-
.url(`/edges/tcp/${
|
|
1536
|
-
.delete()
|
|
1820
|
+
.url(`/edges/tcp/${id}`)
|
|
1821
|
+
.delete(id)
|
|
1537
1822
|
.json(payload => util.deserializeResult(payload))
|
|
1538
1823
|
.then(f => f, util.onRejected);
|
|
1539
1824
|
}
|
|
@@ -1555,19 +1840,17 @@ export class TCPEdgeBackendModule {
|
|
|
1555
1840
|
.json(payload => util.deserializeResult(payload))
|
|
1556
1841
|
.then(f => f, util.onRejected);
|
|
1557
1842
|
}
|
|
1558
|
-
|
|
1559
|
-
public get(arg: datatypes.Item): Promise<datatypes.EndpointBackend> {
|
|
1843
|
+
public get(id): Promise<datatypes.EndpointBackend> {
|
|
1560
1844
|
return this.httpClient
|
|
1561
|
-
.url(`/edges/tcp/${
|
|
1562
|
-
.get()
|
|
1845
|
+
.url(`/edges/tcp/${id}/backend`)
|
|
1846
|
+
.get(id)
|
|
1563
1847
|
.json(payload => util.deserializeResult(payload))
|
|
1564
1848
|
.then(f => f, util.onRejected);
|
|
1565
1849
|
}
|
|
1566
|
-
|
|
1567
|
-
public delete(arg: datatypes.Item): Promise<void> {
|
|
1850
|
+
public delete(id): Promise<void> {
|
|
1568
1851
|
return this.httpClient
|
|
1569
|
-
.url(`/edges/tcp/${
|
|
1570
|
-
.delete()
|
|
1852
|
+
.url(`/edges/tcp/${id}/backend`)
|
|
1853
|
+
.delete(id)
|
|
1571
1854
|
.json(payload => util.deserializeResult(payload))
|
|
1572
1855
|
.then(f => f, util.onRejected);
|
|
1573
1856
|
}
|
|
@@ -1589,19 +1872,17 @@ export class TCPEdgeIPRestrictionModule {
|
|
|
1589
1872
|
.json(payload => util.deserializeResult(payload))
|
|
1590
1873
|
.then(f => f, util.onRejected);
|
|
1591
1874
|
}
|
|
1592
|
-
|
|
1593
|
-
public get(arg: datatypes.Item): Promise<datatypes.EndpointIPPolicy> {
|
|
1875
|
+
public get(id): Promise<datatypes.EndpointIPPolicy> {
|
|
1594
1876
|
return this.httpClient
|
|
1595
|
-
.url(`/edges/tcp/${
|
|
1596
|
-
.get()
|
|
1877
|
+
.url(`/edges/tcp/${id}/ip_restriction`)
|
|
1878
|
+
.get(id)
|
|
1597
1879
|
.json(payload => util.deserializeResult(payload))
|
|
1598
1880
|
.then(f => f, util.onRejected);
|
|
1599
1881
|
}
|
|
1600
|
-
|
|
1601
|
-
public delete(arg: datatypes.Item): Promise<void> {
|
|
1882
|
+
public delete(id): Promise<void> {
|
|
1602
1883
|
return this.httpClient
|
|
1603
|
-
.url(`/edges/tcp/${
|
|
1604
|
-
.delete()
|
|
1884
|
+
.url(`/edges/tcp/${id}/ip_restriction`)
|
|
1885
|
+
.delete(id)
|
|
1605
1886
|
.json(payload => util.deserializeResult(payload))
|
|
1606
1887
|
.then(f => f, util.onRejected);
|
|
1607
1888
|
}
|
|
@@ -1624,28 +1905,30 @@ export class EdgesTLS {
|
|
|
1624
1905
|
.json(payload => util.deserializeResult(payload))
|
|
1625
1906
|
.then(f => f, util.onRejected);
|
|
1626
1907
|
}
|
|
1627
|
-
|
|
1628
1908
|
/**
|
|
1629
1909
|
* Get a TLS Edge by ID
|
|
1630
1910
|
*/
|
|
1631
|
-
public get(
|
|
1911
|
+
public get(id): Promise<datatypes.TLSEdge> {
|
|
1632
1912
|
return this.httpClient
|
|
1633
|
-
.url(`/edges/tls/${
|
|
1634
|
-
.get()
|
|
1913
|
+
.url(`/edges/tls/${id}`)
|
|
1914
|
+
.get(id)
|
|
1635
1915
|
.json(payload => util.deserializeResult(payload))
|
|
1636
1916
|
.then(f => f, util.onRejected);
|
|
1637
1917
|
}
|
|
1638
|
-
|
|
1639
1918
|
/**
|
|
1640
1919
|
* Returns a list of all TLS Edges on this account
|
|
1641
1920
|
*/
|
|
1642
|
-
public async list(
|
|
1921
|
+
public async list(
|
|
1922
|
+
beforeId?: string,
|
|
1923
|
+
limit?: string
|
|
1924
|
+
): Promise<Array<datatypes.TLSEdge>> {
|
|
1643
1925
|
const array: Array<datatypes.TLSEdge> = [];
|
|
1644
|
-
for await (const item of this._asyncList()) {
|
|
1926
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
1645
1927
|
array.push(item);
|
|
1646
1928
|
}
|
|
1647
1929
|
return array;
|
|
1648
1930
|
}
|
|
1931
|
+
|
|
1649
1932
|
private _pagedList(arg: datatypes.Paging): Promise<datatypes.TLSEdgeList> {
|
|
1650
1933
|
return this.httpClient
|
|
1651
1934
|
.url(`/edges/tls`)
|
|
@@ -1654,11 +1937,15 @@ export class EdgesTLS {
|
|
|
1654
1937
|
.json(payload => util.deserializeResult(payload))
|
|
1655
1938
|
.then(util.onFulfilled, util.onRejected);
|
|
1656
1939
|
}
|
|
1657
|
-
|
|
1658
|
-
|
|
1940
|
+
|
|
1941
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
1659
1942
|
let nextPage = 'initial loop';
|
|
1660
1943
|
let page: datatypes.Paging = { limit: limit };
|
|
1661
1944
|
|
|
1945
|
+
if (beforeId) {
|
|
1946
|
+
page.beforeId = beforeId;
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1662
1949
|
while (nextPage) {
|
|
1663
1950
|
const pagedList = await this._pagedList(page);
|
|
1664
1951
|
nextPage = pagedList.nextPageUri;
|
|
@@ -1686,14 +1973,13 @@ export class EdgesTLS {
|
|
|
1686
1973
|
.json(payload => util.deserializeResult(payload))
|
|
1687
1974
|
.then(f => f, util.onRejected);
|
|
1688
1975
|
}
|
|
1689
|
-
|
|
1690
1976
|
/**
|
|
1691
1977
|
* Delete a TLS Edge by ID
|
|
1692
1978
|
*/
|
|
1693
|
-
public delete(
|
|
1979
|
+
public delete(id): Promise<void> {
|
|
1694
1980
|
return this.httpClient
|
|
1695
|
-
.url(`/edges/tls/${
|
|
1696
|
-
.delete()
|
|
1981
|
+
.url(`/edges/tls/${id}`)
|
|
1982
|
+
.delete(id)
|
|
1697
1983
|
.json(payload => util.deserializeResult(payload))
|
|
1698
1984
|
.then(f => f, util.onRejected);
|
|
1699
1985
|
}
|
|
@@ -1715,19 +2001,17 @@ export class TLSEdgeBackendModule {
|
|
|
1715
2001
|
.json(payload => util.deserializeResult(payload))
|
|
1716
2002
|
.then(f => f, util.onRejected);
|
|
1717
2003
|
}
|
|
1718
|
-
|
|
1719
|
-
public get(arg: datatypes.Item): Promise<datatypes.EndpointBackend> {
|
|
2004
|
+
public get(id): Promise<datatypes.EndpointBackend> {
|
|
1720
2005
|
return this.httpClient
|
|
1721
|
-
.url(`/edges/tls/${
|
|
1722
|
-
.get()
|
|
2006
|
+
.url(`/edges/tls/${id}/backend`)
|
|
2007
|
+
.get(id)
|
|
1723
2008
|
.json(payload => util.deserializeResult(payload))
|
|
1724
2009
|
.then(f => f, util.onRejected);
|
|
1725
2010
|
}
|
|
1726
|
-
|
|
1727
|
-
public delete(arg: datatypes.Item): Promise<void> {
|
|
2011
|
+
public delete(id): Promise<void> {
|
|
1728
2012
|
return this.httpClient
|
|
1729
|
-
.url(`/edges/tls/${
|
|
1730
|
-
.delete()
|
|
2013
|
+
.url(`/edges/tls/${id}/backend`)
|
|
2014
|
+
.delete(id)
|
|
1731
2015
|
.json(payload => util.deserializeResult(payload))
|
|
1732
2016
|
.then(f => f, util.onRejected);
|
|
1733
2017
|
}
|
|
@@ -1749,19 +2033,17 @@ export class TLSEdgeIPRestrictionModule {
|
|
|
1749
2033
|
.json(payload => util.deserializeResult(payload))
|
|
1750
2034
|
.then(f => f, util.onRejected);
|
|
1751
2035
|
}
|
|
1752
|
-
|
|
1753
|
-
public get(arg: datatypes.Item): Promise<datatypes.EndpointIPPolicy> {
|
|
2036
|
+
public get(id): Promise<datatypes.EndpointIPPolicy> {
|
|
1754
2037
|
return this.httpClient
|
|
1755
|
-
.url(`/edges/tls/${
|
|
1756
|
-
.get()
|
|
2038
|
+
.url(`/edges/tls/${id}/ip_restriction`)
|
|
2039
|
+
.get(id)
|
|
1757
2040
|
.json(payload => util.deserializeResult(payload))
|
|
1758
2041
|
.then(f => f, util.onRejected);
|
|
1759
2042
|
}
|
|
1760
|
-
|
|
1761
|
-
public delete(arg: datatypes.Item): Promise<void> {
|
|
2043
|
+
public delete(id): Promise<void> {
|
|
1762
2044
|
return this.httpClient
|
|
1763
|
-
.url(`/edges/tls/${
|
|
1764
|
-
.delete()
|
|
2045
|
+
.url(`/edges/tls/${id}/ip_restriction`)
|
|
2046
|
+
.delete(id)
|
|
1765
2047
|
.json(payload => util.deserializeResult(payload))
|
|
1766
2048
|
.then(f => f, util.onRejected);
|
|
1767
2049
|
}
|
|
@@ -1783,19 +2065,17 @@ export class TLSEdgeMutualTLSModule {
|
|
|
1783
2065
|
.json(payload => util.deserializeResult(payload))
|
|
1784
2066
|
.then(f => f, util.onRejected);
|
|
1785
2067
|
}
|
|
1786
|
-
|
|
1787
|
-
public get(arg: datatypes.Item): Promise<datatypes.EndpointMutualTLS> {
|
|
2068
|
+
public get(id): Promise<datatypes.EndpointMutualTLS> {
|
|
1788
2069
|
return this.httpClient
|
|
1789
|
-
.url(`/edges/tls/${
|
|
1790
|
-
.get()
|
|
2070
|
+
.url(`/edges/tls/${id}/mutual_tls`)
|
|
2071
|
+
.get(id)
|
|
1791
2072
|
.json(payload => util.deserializeResult(payload))
|
|
1792
2073
|
.then(f => f, util.onRejected);
|
|
1793
2074
|
}
|
|
1794
|
-
|
|
1795
|
-
public delete(arg: datatypes.Item): Promise<void> {
|
|
2075
|
+
public delete(id): Promise<void> {
|
|
1796
2076
|
return this.httpClient
|
|
1797
|
-
.url(`/edges/tls/${
|
|
1798
|
-
.delete()
|
|
2077
|
+
.url(`/edges/tls/${id}/mutual_tls`)
|
|
2078
|
+
.delete(id)
|
|
1799
2079
|
.json(payload => util.deserializeResult(payload))
|
|
1800
2080
|
.then(f => f, util.onRejected);
|
|
1801
2081
|
}
|
|
@@ -1817,19 +2097,17 @@ export class TLSEdgeTLSTerminationModule {
|
|
|
1817
2097
|
.json(payload => util.deserializeResult(payload))
|
|
1818
2098
|
.then(f => f, util.onRejected);
|
|
1819
2099
|
}
|
|
1820
|
-
|
|
1821
|
-
public get(arg: datatypes.Item): Promise<datatypes.EndpointTLSTermination> {
|
|
2100
|
+
public get(id): Promise<datatypes.EndpointTLSTermination> {
|
|
1822
2101
|
return this.httpClient
|
|
1823
|
-
.url(`/edges/tls/${
|
|
1824
|
-
.get()
|
|
2102
|
+
.url(`/edges/tls/${id}/tls_termination`)
|
|
2103
|
+
.get(id)
|
|
1825
2104
|
.json(payload => util.deserializeResult(payload))
|
|
1826
2105
|
.then(f => f, util.onRejected);
|
|
1827
2106
|
}
|
|
1828
|
-
|
|
1829
|
-
public delete(arg: datatypes.Item): Promise<void> {
|
|
2107
|
+
public delete(id): Promise<void> {
|
|
1830
2108
|
return this.httpClient
|
|
1831
|
-
.url(`/edges/tls/${
|
|
1832
|
-
.delete()
|
|
2109
|
+
.url(`/edges/tls/${id}/tls_termination`)
|
|
2110
|
+
.delete(id)
|
|
1833
2111
|
.json(payload => util.deserializeResult(payload))
|
|
1834
2112
|
.then(f => f, util.onRejected);
|
|
1835
2113
|
}
|
|
@@ -1850,13 +2128,17 @@ export class Endpoints {
|
|
|
1850
2128
|
/**
|
|
1851
2129
|
* List all active endpoints on the account
|
|
1852
2130
|
*/
|
|
1853
|
-
public async list(
|
|
2131
|
+
public async list(
|
|
2132
|
+
beforeId?: string,
|
|
2133
|
+
limit?: string
|
|
2134
|
+
): Promise<Array<datatypes.Endpoint>> {
|
|
1854
2135
|
const array: Array<datatypes.Endpoint> = [];
|
|
1855
|
-
for await (const item of this._asyncList()) {
|
|
2136
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
1856
2137
|
array.push(item);
|
|
1857
2138
|
}
|
|
1858
2139
|
return array;
|
|
1859
2140
|
}
|
|
2141
|
+
|
|
1860
2142
|
private _pagedList(arg: datatypes.Paging): Promise<datatypes.EndpointList> {
|
|
1861
2143
|
return this.httpClient
|
|
1862
2144
|
.url(`/endpoints`)
|
|
@@ -1865,11 +2147,15 @@ export class Endpoints {
|
|
|
1865
2147
|
.json(payload => util.deserializeResult(payload))
|
|
1866
2148
|
.then(util.onFulfilled, util.onRejected);
|
|
1867
2149
|
}
|
|
1868
|
-
|
|
1869
|
-
|
|
2150
|
+
|
|
2151
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
1870
2152
|
let nextPage = 'initial loop';
|
|
1871
2153
|
let page: datatypes.Paging = { limit: limit };
|
|
1872
2154
|
|
|
2155
|
+
if (beforeId) {
|
|
2156
|
+
page.beforeId = beforeId;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
1873
2159
|
while (nextPage) {
|
|
1874
2160
|
const pagedList = await this._pagedList(page);
|
|
1875
2161
|
nextPage = pagedList.nextPageUri;
|
|
@@ -1890,10 +2176,10 @@ export class Endpoints {
|
|
|
1890
2176
|
/**
|
|
1891
2177
|
* Get the status of an endpoint by ID
|
|
1892
2178
|
*/
|
|
1893
|
-
public get(
|
|
2179
|
+
public get(id): Promise<datatypes.Endpoint> {
|
|
1894
2180
|
return this.httpClient
|
|
1895
|
-
.url(`/endpoints/${
|
|
1896
|
-
.get()
|
|
2181
|
+
.url(`/endpoints/${id}`)
|
|
2182
|
+
.get(id)
|
|
1897
2183
|
.json(payload => util.deserializeResult(payload))
|
|
1898
2184
|
.then(f => f, util.onRejected);
|
|
1899
2185
|
}
|
|
@@ -1907,7 +2193,7 @@ export class EventDestinations {
|
|
|
1907
2193
|
this.httpClient = httpClient;
|
|
1908
2194
|
}
|
|
1909
2195
|
/**
|
|
1910
|
-
* Create a new Event Destination. It will not apply to anything until it is associated with an Event
|
|
2196
|
+
* Create a new Event Destination. It will not apply to anything until it is associated with an Event Subscription.
|
|
1911
2197
|
*/
|
|
1912
2198
|
public create(
|
|
1913
2199
|
arg: datatypes.EventDestinationCreate
|
|
@@ -1918,39 +2204,40 @@ export class EventDestinations {
|
|
|
1918
2204
|
.json(payload => util.deserializeResult(payload))
|
|
1919
2205
|
.then(f => f, util.onRejected);
|
|
1920
2206
|
}
|
|
1921
|
-
|
|
1922
2207
|
/**
|
|
1923
2208
|
* Delete an Event Destination. If the Event Destination is still referenced by an Event Subscription.
|
|
1924
2209
|
*/
|
|
1925
|
-
public delete(
|
|
2210
|
+
public delete(id): Promise<void> {
|
|
1926
2211
|
return this.httpClient
|
|
1927
|
-
.url(`/event_destinations/${
|
|
1928
|
-
.delete()
|
|
2212
|
+
.url(`/event_destinations/${id}`)
|
|
2213
|
+
.delete(id)
|
|
1929
2214
|
.json(payload => util.deserializeResult(payload))
|
|
1930
2215
|
.then(f => f, util.onRejected);
|
|
1931
2216
|
}
|
|
1932
|
-
|
|
1933
2217
|
/**
|
|
1934
2218
|
* Get detailed information about an Event Destination by ID.
|
|
1935
2219
|
*/
|
|
1936
|
-
public get(
|
|
2220
|
+
public get(id): Promise<datatypes.EventDestination> {
|
|
1937
2221
|
return this.httpClient
|
|
1938
|
-
.url(`/event_destinations/${
|
|
1939
|
-
.get()
|
|
2222
|
+
.url(`/event_destinations/${id}`)
|
|
2223
|
+
.get(id)
|
|
1940
2224
|
.json(payload => util.deserializeResult(payload))
|
|
1941
2225
|
.then(f => f, util.onRejected);
|
|
1942
2226
|
}
|
|
1943
|
-
|
|
1944
2227
|
/**
|
|
1945
2228
|
* List all Event Destinations on this account.
|
|
1946
2229
|
*/
|
|
1947
|
-
public async list(
|
|
2230
|
+
public async list(
|
|
2231
|
+
beforeId?: string,
|
|
2232
|
+
limit?: string
|
|
2233
|
+
): Promise<Array<datatypes.EventDestination>> {
|
|
1948
2234
|
const array: Array<datatypes.EventDestination> = [];
|
|
1949
|
-
for await (const item of this._asyncList()) {
|
|
2235
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
1950
2236
|
array.push(item);
|
|
1951
2237
|
}
|
|
1952
2238
|
return array;
|
|
1953
2239
|
}
|
|
2240
|
+
|
|
1954
2241
|
private _pagedList(
|
|
1955
2242
|
arg: datatypes.Paging
|
|
1956
2243
|
): Promise<datatypes.EventDestinationList> {
|
|
@@ -1961,11 +2248,15 @@ export class EventDestinations {
|
|
|
1961
2248
|
.json(payload => util.deserializeResult(payload))
|
|
1962
2249
|
.then(util.onFulfilled, util.onRejected);
|
|
1963
2250
|
}
|
|
1964
|
-
|
|
1965
|
-
|
|
2251
|
+
|
|
2252
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
1966
2253
|
let nextPage = 'initial loop';
|
|
1967
2254
|
let page: datatypes.Paging = { limit: limit };
|
|
1968
2255
|
|
|
2256
|
+
if (beforeId) {
|
|
2257
|
+
page.beforeId = beforeId;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
1969
2260
|
while (nextPage) {
|
|
1970
2261
|
const pagedList = await this._pagedList(page);
|
|
1971
2262
|
nextPage = pagedList.nextPageUri;
|
|
@@ -2016,39 +2307,40 @@ export class EventSubscriptions {
|
|
|
2016
2307
|
.json(payload => util.deserializeResult(payload))
|
|
2017
2308
|
.then(f => f, util.onRejected);
|
|
2018
2309
|
}
|
|
2019
|
-
|
|
2020
2310
|
/**
|
|
2021
2311
|
* Delete an Event Subscription.
|
|
2022
2312
|
*/
|
|
2023
|
-
public delete(
|
|
2313
|
+
public delete(id): Promise<void> {
|
|
2024
2314
|
return this.httpClient
|
|
2025
|
-
.url(`/event_subscriptions/${
|
|
2026
|
-
.delete()
|
|
2315
|
+
.url(`/event_subscriptions/${id}`)
|
|
2316
|
+
.delete(id)
|
|
2027
2317
|
.json(payload => util.deserializeResult(payload))
|
|
2028
2318
|
.then(f => f, util.onRejected);
|
|
2029
2319
|
}
|
|
2030
|
-
|
|
2031
2320
|
/**
|
|
2032
2321
|
* Get an Event Subscription by ID.
|
|
2033
2322
|
*/
|
|
2034
|
-
public get(
|
|
2323
|
+
public get(id): Promise<datatypes.EventSubscription> {
|
|
2035
2324
|
return this.httpClient
|
|
2036
|
-
.url(`/event_subscriptions/${
|
|
2037
|
-
.get()
|
|
2325
|
+
.url(`/event_subscriptions/${id}`)
|
|
2326
|
+
.get(id)
|
|
2038
2327
|
.json(payload => util.deserializeResult(payload))
|
|
2039
2328
|
.then(f => f, util.onRejected);
|
|
2040
2329
|
}
|
|
2041
|
-
|
|
2042
2330
|
/**
|
|
2043
2331
|
* List this Account's Event Subscriptions.
|
|
2044
2332
|
*/
|
|
2045
|
-
public async list(
|
|
2333
|
+
public async list(
|
|
2334
|
+
beforeId?: string,
|
|
2335
|
+
limit?: string
|
|
2336
|
+
): Promise<Array<datatypes.EventSubscription>> {
|
|
2046
2337
|
const array: Array<datatypes.EventSubscription> = [];
|
|
2047
|
-
for await (const item of this._asyncList()) {
|
|
2338
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
2048
2339
|
array.push(item);
|
|
2049
2340
|
}
|
|
2050
2341
|
return array;
|
|
2051
2342
|
}
|
|
2343
|
+
|
|
2052
2344
|
private _pagedList(
|
|
2053
2345
|
arg: datatypes.Paging
|
|
2054
2346
|
): Promise<datatypes.EventSubscriptionList> {
|
|
@@ -2059,11 +2351,15 @@ export class EventSubscriptions {
|
|
|
2059
2351
|
.json(payload => util.deserializeResult(payload))
|
|
2060
2352
|
.then(util.onFulfilled, util.onRejected);
|
|
2061
2353
|
}
|
|
2062
|
-
|
|
2063
|
-
|
|
2354
|
+
|
|
2355
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
2064
2356
|
let nextPage = 'initial loop';
|
|
2065
2357
|
let page: datatypes.Paging = { limit: limit };
|
|
2066
2358
|
|
|
2359
|
+
if (beforeId) {
|
|
2360
|
+
page.beforeId = beforeId;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2067
2363
|
while (nextPage) {
|
|
2068
2364
|
const pagedList = await this._pagedList(page);
|
|
2069
2365
|
nextPage = pagedList.nextPageUri;
|
|
@@ -2114,7 +2410,6 @@ export class EventSources {
|
|
|
2114
2410
|
.json(payload => util.deserializeResult(payload))
|
|
2115
2411
|
.then(f => f, util.onRejected);
|
|
2116
2412
|
}
|
|
2117
|
-
|
|
2118
2413
|
/**
|
|
2119
2414
|
* Remove a type for which this event subscription will trigger
|
|
2120
2415
|
*/
|
|
@@ -2125,7 +2420,6 @@ export class EventSources {
|
|
|
2125
2420
|
.json(payload => util.deserializeResult(payload))
|
|
2126
2421
|
.then(f => f, util.onRejected);
|
|
2127
2422
|
}
|
|
2128
|
-
|
|
2129
2423
|
/**
|
|
2130
2424
|
* Get the details for a given type that triggers for the given event subscription
|
|
2131
2425
|
*/
|
|
@@ -2136,7 +2430,6 @@ export class EventSources {
|
|
|
2136
2430
|
.json(payload => util.deserializeResult(payload))
|
|
2137
2431
|
.then(f => f, util.onRejected);
|
|
2138
2432
|
}
|
|
2139
|
-
|
|
2140
2433
|
/**
|
|
2141
2434
|
* List the types for which this event subscription will trigger
|
|
2142
2435
|
*/
|
|
@@ -2149,7 +2442,6 @@ export class EventSources {
|
|
|
2149
2442
|
.json(payload => util.deserializeResult(payload))
|
|
2150
2443
|
.then(f => f, util.onRejected);
|
|
2151
2444
|
}
|
|
2152
|
-
|
|
2153
2445
|
/**
|
|
2154
2446
|
* Update the type for which this event subscription will trigger
|
|
2155
2447
|
*/
|
|
@@ -2187,39 +2479,40 @@ export class IPPolicies {
|
|
|
2187
2479
|
.json(payload => util.deserializeResult(payload))
|
|
2188
2480
|
.then(f => f, util.onRejected);
|
|
2189
2481
|
}
|
|
2190
|
-
|
|
2191
2482
|
/**
|
|
2192
2483
|
* Delete an IP policy. If the IP policy is referenced by another object for the purposes of traffic restriction it will be treated as if the IP policy remains but has zero rules.
|
|
2193
2484
|
*/
|
|
2194
|
-
public delete(
|
|
2485
|
+
public delete(id): Promise<void> {
|
|
2195
2486
|
return this.httpClient
|
|
2196
|
-
.url(`/ip_policies/${
|
|
2197
|
-
.delete()
|
|
2487
|
+
.url(`/ip_policies/${id}`)
|
|
2488
|
+
.delete(id)
|
|
2198
2489
|
.json(payload => util.deserializeResult(payload))
|
|
2199
2490
|
.then(f => f, util.onRejected);
|
|
2200
2491
|
}
|
|
2201
|
-
|
|
2202
2492
|
/**
|
|
2203
2493
|
* Get detailed information about an IP policy by ID.
|
|
2204
2494
|
*/
|
|
2205
|
-
public get(
|
|
2495
|
+
public get(id): Promise<datatypes.IPPolicy> {
|
|
2206
2496
|
return this.httpClient
|
|
2207
|
-
.url(`/ip_policies/${
|
|
2208
|
-
.get()
|
|
2497
|
+
.url(`/ip_policies/${id}`)
|
|
2498
|
+
.get(id)
|
|
2209
2499
|
.json(payload => util.deserializeResult(payload))
|
|
2210
2500
|
.then(f => f, util.onRejected);
|
|
2211
2501
|
}
|
|
2212
|
-
|
|
2213
2502
|
/**
|
|
2214
2503
|
* List all IP policies on this account
|
|
2215
2504
|
*/
|
|
2216
|
-
public async list(
|
|
2505
|
+
public async list(
|
|
2506
|
+
beforeId?: string,
|
|
2507
|
+
limit?: string
|
|
2508
|
+
): Promise<Array<datatypes.IPPolicy>> {
|
|
2217
2509
|
const array: Array<datatypes.IPPolicy> = [];
|
|
2218
|
-
for await (const item of this._asyncList()) {
|
|
2510
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
2219
2511
|
array.push(item);
|
|
2220
2512
|
}
|
|
2221
2513
|
return array;
|
|
2222
2514
|
}
|
|
2515
|
+
|
|
2223
2516
|
private _pagedList(arg: datatypes.Paging): Promise<datatypes.IPPolicyList> {
|
|
2224
2517
|
return this.httpClient
|
|
2225
2518
|
.url(`/ip_policies`)
|
|
@@ -2228,11 +2521,15 @@ export class IPPolicies {
|
|
|
2228
2521
|
.json(payload => util.deserializeResult(payload))
|
|
2229
2522
|
.then(util.onFulfilled, util.onRejected);
|
|
2230
2523
|
}
|
|
2231
|
-
|
|
2232
|
-
|
|
2524
|
+
|
|
2525
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
2233
2526
|
let nextPage = 'initial loop';
|
|
2234
2527
|
let page: datatypes.Paging = { limit: limit };
|
|
2235
2528
|
|
|
2529
|
+
if (beforeId) {
|
|
2530
|
+
page.beforeId = beforeId;
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2236
2533
|
while (nextPage) {
|
|
2237
2534
|
const pagedList = await this._pagedList(page);
|
|
2238
2535
|
nextPage = pagedList.nextPageUri;
|
|
@@ -2285,39 +2582,40 @@ export class IPPolicyRules {
|
|
|
2285
2582
|
.json(payload => util.deserializeResult(payload))
|
|
2286
2583
|
.then(f => f, util.onRejected);
|
|
2287
2584
|
}
|
|
2288
|
-
|
|
2289
2585
|
/**
|
|
2290
2586
|
* Delete an IP policy rule.
|
|
2291
2587
|
*/
|
|
2292
|
-
public delete(
|
|
2588
|
+
public delete(id): Promise<void> {
|
|
2293
2589
|
return this.httpClient
|
|
2294
|
-
.url(`/ip_policy_rules/${
|
|
2295
|
-
.delete()
|
|
2590
|
+
.url(`/ip_policy_rules/${id}`)
|
|
2591
|
+
.delete(id)
|
|
2296
2592
|
.json(payload => util.deserializeResult(payload))
|
|
2297
2593
|
.then(f => f, util.onRejected);
|
|
2298
2594
|
}
|
|
2299
|
-
|
|
2300
2595
|
/**
|
|
2301
2596
|
* Get detailed information about an IP policy rule by ID.
|
|
2302
2597
|
*/
|
|
2303
|
-
public get(
|
|
2598
|
+
public get(id): Promise<datatypes.IPPolicyRule> {
|
|
2304
2599
|
return this.httpClient
|
|
2305
|
-
.url(`/ip_policy_rules/${
|
|
2306
|
-
.get()
|
|
2600
|
+
.url(`/ip_policy_rules/${id}`)
|
|
2601
|
+
.get(id)
|
|
2307
2602
|
.json(payload => util.deserializeResult(payload))
|
|
2308
2603
|
.then(f => f, util.onRejected);
|
|
2309
2604
|
}
|
|
2310
|
-
|
|
2311
2605
|
/**
|
|
2312
2606
|
* List all IP policy rules on this account
|
|
2313
2607
|
*/
|
|
2314
|
-
public async list(
|
|
2608
|
+
public async list(
|
|
2609
|
+
beforeId?: string,
|
|
2610
|
+
limit?: string
|
|
2611
|
+
): Promise<Array<datatypes.IPPolicyRule>> {
|
|
2315
2612
|
const array: Array<datatypes.IPPolicyRule> = [];
|
|
2316
|
-
for await (const item of this._asyncList()) {
|
|
2613
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
2317
2614
|
array.push(item);
|
|
2318
2615
|
}
|
|
2319
2616
|
return array;
|
|
2320
2617
|
}
|
|
2618
|
+
|
|
2321
2619
|
private _pagedList(
|
|
2322
2620
|
arg: datatypes.Paging
|
|
2323
2621
|
): Promise<datatypes.IPPolicyRuleList> {
|
|
@@ -2328,11 +2626,15 @@ export class IPPolicyRules {
|
|
|
2328
2626
|
.json(payload => util.deserializeResult(payload))
|
|
2329
2627
|
.then(util.onFulfilled, util.onRejected);
|
|
2330
2628
|
}
|
|
2331
|
-
|
|
2332
|
-
|
|
2629
|
+
|
|
2630
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
2333
2631
|
let nextPage = 'initial loop';
|
|
2334
2632
|
let page: datatypes.Paging = { limit: limit };
|
|
2335
2633
|
|
|
2634
|
+
if (beforeId) {
|
|
2635
|
+
page.beforeId = beforeId;
|
|
2636
|
+
}
|
|
2637
|
+
|
|
2336
2638
|
while (nextPage) {
|
|
2337
2639
|
const pagedList = await this._pagedList(page);
|
|
2338
2640
|
nextPage = pagedList.nextPageUri;
|
|
@@ -2391,39 +2693,40 @@ export class IPRestrictions {
|
|
|
2391
2693
|
.json(payload => util.deserializeResult(payload))
|
|
2392
2694
|
.then(f => f, util.onRejected);
|
|
2393
2695
|
}
|
|
2394
|
-
|
|
2395
2696
|
/**
|
|
2396
2697
|
* Delete an IP restriction
|
|
2397
2698
|
*/
|
|
2398
|
-
public delete(
|
|
2699
|
+
public delete(id): Promise<void> {
|
|
2399
2700
|
return this.httpClient
|
|
2400
|
-
.url(`/ip_restrictions/${
|
|
2401
|
-
.delete()
|
|
2701
|
+
.url(`/ip_restrictions/${id}`)
|
|
2702
|
+
.delete(id)
|
|
2402
2703
|
.json(payload => util.deserializeResult(payload))
|
|
2403
2704
|
.then(f => f, util.onRejected);
|
|
2404
2705
|
}
|
|
2405
|
-
|
|
2406
2706
|
/**
|
|
2407
2707
|
* Get detailed information about an IP restriction
|
|
2408
2708
|
*/
|
|
2409
|
-
public get(
|
|
2709
|
+
public get(id): Promise<datatypes.IPRestriction> {
|
|
2410
2710
|
return this.httpClient
|
|
2411
|
-
.url(`/ip_restrictions/${
|
|
2412
|
-
.get()
|
|
2711
|
+
.url(`/ip_restrictions/${id}`)
|
|
2712
|
+
.get(id)
|
|
2413
2713
|
.json(payload => util.deserializeResult(payload))
|
|
2414
2714
|
.then(f => f, util.onRejected);
|
|
2415
2715
|
}
|
|
2416
|
-
|
|
2417
2716
|
/**
|
|
2418
2717
|
* List all IP restrictions on this account
|
|
2419
2718
|
*/
|
|
2420
|
-
public async list(
|
|
2719
|
+
public async list(
|
|
2720
|
+
beforeId?: string,
|
|
2721
|
+
limit?: string
|
|
2722
|
+
): Promise<Array<datatypes.IPRestriction>> {
|
|
2421
2723
|
const array: Array<datatypes.IPRestriction> = [];
|
|
2422
|
-
for await (const item of this._asyncList()) {
|
|
2724
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
2423
2725
|
array.push(item);
|
|
2424
2726
|
}
|
|
2425
2727
|
return array;
|
|
2426
2728
|
}
|
|
2729
|
+
|
|
2427
2730
|
private _pagedList(
|
|
2428
2731
|
arg: datatypes.Paging
|
|
2429
2732
|
): Promise<datatypes.IPRestrictionList> {
|
|
@@ -2434,11 +2737,15 @@ export class IPRestrictions {
|
|
|
2434
2737
|
.json(payload => util.deserializeResult(payload))
|
|
2435
2738
|
.then(util.onFulfilled, util.onRejected);
|
|
2436
2739
|
}
|
|
2437
|
-
|
|
2438
|
-
|
|
2740
|
+
|
|
2741
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
2439
2742
|
let nextPage = 'initial loop';
|
|
2440
2743
|
let page: datatypes.Paging = { limit: limit };
|
|
2441
2744
|
|
|
2745
|
+
if (beforeId) {
|
|
2746
|
+
page.beforeId = beforeId;
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2442
2749
|
while (nextPage) {
|
|
2443
2750
|
const pagedList = await this._pagedList(page);
|
|
2444
2751
|
nextPage = pagedList.nextPageUri;
|
|
@@ -2494,39 +2801,40 @@ export class ReservedAddrs {
|
|
|
2494
2801
|
.json(payload => util.deserializeResult(payload))
|
|
2495
2802
|
.then(f => f, util.onRejected);
|
|
2496
2803
|
}
|
|
2497
|
-
|
|
2498
2804
|
/**
|
|
2499
2805
|
* Delete a reserved address.
|
|
2500
2806
|
*/
|
|
2501
|
-
public delete(
|
|
2807
|
+
public delete(id): Promise<void> {
|
|
2502
2808
|
return this.httpClient
|
|
2503
|
-
.url(`/reserved_addrs/${
|
|
2504
|
-
.delete()
|
|
2809
|
+
.url(`/reserved_addrs/${id}`)
|
|
2810
|
+
.delete(id)
|
|
2505
2811
|
.json(payload => util.deserializeResult(payload))
|
|
2506
2812
|
.then(f => f, util.onRejected);
|
|
2507
2813
|
}
|
|
2508
|
-
|
|
2509
2814
|
/**
|
|
2510
2815
|
* Get the details of a reserved address.
|
|
2511
2816
|
*/
|
|
2512
|
-
public get(
|
|
2817
|
+
public get(id): Promise<datatypes.ReservedAddr> {
|
|
2513
2818
|
return this.httpClient
|
|
2514
|
-
.url(`/reserved_addrs/${
|
|
2515
|
-
.get()
|
|
2819
|
+
.url(`/reserved_addrs/${id}`)
|
|
2820
|
+
.get(id)
|
|
2516
2821
|
.json(payload => util.deserializeResult(payload))
|
|
2517
2822
|
.then(f => f, util.onRejected);
|
|
2518
2823
|
}
|
|
2519
|
-
|
|
2520
2824
|
/**
|
|
2521
2825
|
* List all reserved addresses on this account.
|
|
2522
2826
|
*/
|
|
2523
|
-
public async list(
|
|
2827
|
+
public async list(
|
|
2828
|
+
beforeId?: string,
|
|
2829
|
+
limit?: string
|
|
2830
|
+
): Promise<Array<datatypes.ReservedAddr>> {
|
|
2524
2831
|
const array: Array<datatypes.ReservedAddr> = [];
|
|
2525
|
-
for await (const item of this._asyncList()) {
|
|
2832
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
2526
2833
|
array.push(item);
|
|
2527
2834
|
}
|
|
2528
2835
|
return array;
|
|
2529
2836
|
}
|
|
2837
|
+
|
|
2530
2838
|
private _pagedList(
|
|
2531
2839
|
arg: datatypes.Paging
|
|
2532
2840
|
): Promise<datatypes.ReservedAddrList> {
|
|
@@ -2537,11 +2845,15 @@ export class ReservedAddrs {
|
|
|
2537
2845
|
.json(payload => util.deserializeResult(payload))
|
|
2538
2846
|
.then(util.onFulfilled, util.onRejected);
|
|
2539
2847
|
}
|
|
2540
|
-
|
|
2541
|
-
|
|
2848
|
+
|
|
2849
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
2542
2850
|
let nextPage = 'initial loop';
|
|
2543
2851
|
let page: datatypes.Paging = { limit: limit };
|
|
2544
2852
|
|
|
2853
|
+
if (beforeId) {
|
|
2854
|
+
page.beforeId = beforeId;
|
|
2855
|
+
}
|
|
2856
|
+
|
|
2545
2857
|
while (nextPage) {
|
|
2546
2858
|
const pagedList = await this._pagedList(page);
|
|
2547
2859
|
nextPage = pagedList.nextPageUri;
|
|
@@ -2598,39 +2910,40 @@ export class ReservedDomains {
|
|
|
2598
2910
|
.json(payload => util.deserializeResult(payload))
|
|
2599
2911
|
.then(f => f, util.onRejected);
|
|
2600
2912
|
}
|
|
2601
|
-
|
|
2602
2913
|
/**
|
|
2603
2914
|
* Delete a reserved domain.
|
|
2604
2915
|
*/
|
|
2605
|
-
public delete(
|
|
2916
|
+
public delete(id): Promise<void> {
|
|
2606
2917
|
return this.httpClient
|
|
2607
|
-
.url(`/reserved_domains/${
|
|
2608
|
-
.delete()
|
|
2918
|
+
.url(`/reserved_domains/${id}`)
|
|
2919
|
+
.delete(id)
|
|
2609
2920
|
.json(payload => util.deserializeResult(payload))
|
|
2610
2921
|
.then(f => f, util.onRejected);
|
|
2611
2922
|
}
|
|
2612
|
-
|
|
2613
2923
|
/**
|
|
2614
2924
|
* Get the details of a reserved domain.
|
|
2615
2925
|
*/
|
|
2616
|
-
public get(
|
|
2926
|
+
public get(id): Promise<datatypes.ReservedDomain> {
|
|
2617
2927
|
return this.httpClient
|
|
2618
|
-
.url(`/reserved_domains/${
|
|
2619
|
-
.get()
|
|
2928
|
+
.url(`/reserved_domains/${id}`)
|
|
2929
|
+
.get(id)
|
|
2620
2930
|
.json(payload => util.deserializeResult(payload))
|
|
2621
2931
|
.then(f => f, util.onRejected);
|
|
2622
2932
|
}
|
|
2623
|
-
|
|
2624
2933
|
/**
|
|
2625
2934
|
* List all reserved domains on this account.
|
|
2626
2935
|
*/
|
|
2627
|
-
public async list(
|
|
2936
|
+
public async list(
|
|
2937
|
+
beforeId?: string,
|
|
2938
|
+
limit?: string
|
|
2939
|
+
): Promise<Array<datatypes.ReservedDomain>> {
|
|
2628
2940
|
const array: Array<datatypes.ReservedDomain> = [];
|
|
2629
|
-
for await (const item of this._asyncList()) {
|
|
2941
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
2630
2942
|
array.push(item);
|
|
2631
2943
|
}
|
|
2632
2944
|
return array;
|
|
2633
2945
|
}
|
|
2946
|
+
|
|
2634
2947
|
private _pagedList(
|
|
2635
2948
|
arg: datatypes.Paging
|
|
2636
2949
|
): Promise<datatypes.ReservedDomainList> {
|
|
@@ -2641,11 +2954,15 @@ export class ReservedDomains {
|
|
|
2641
2954
|
.json(payload => util.deserializeResult(payload))
|
|
2642
2955
|
.then(util.onFulfilled, util.onRejected);
|
|
2643
2956
|
}
|
|
2644
|
-
|
|
2645
|
-
|
|
2957
|
+
|
|
2958
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
2646
2959
|
let nextPage = 'initial loop';
|
|
2647
2960
|
let page: datatypes.Paging = { limit: limit };
|
|
2648
2961
|
|
|
2962
|
+
if (beforeId) {
|
|
2963
|
+
page.beforeId = beforeId;
|
|
2964
|
+
}
|
|
2965
|
+
|
|
2649
2966
|
while (nextPage) {
|
|
2650
2967
|
const pagedList = await this._pagedList(page);
|
|
2651
2968
|
nextPage = pagedList.nextPageUri;
|
|
@@ -2675,25 +2992,23 @@ export class ReservedDomains {
|
|
|
2675
2992
|
.json(payload => util.deserializeResult(payload))
|
|
2676
2993
|
.then(f => f, util.onRejected);
|
|
2677
2994
|
}
|
|
2678
|
-
|
|
2679
2995
|
/**
|
|
2680
2996
|
* Detach the certificate management policy attached to a reserved domain.
|
|
2681
2997
|
*/
|
|
2682
|
-
public deleteCertificateManagementPolicy(
|
|
2998
|
+
public deleteCertificateManagementPolicy(id): Promise<void> {
|
|
2683
2999
|
return this.httpClient
|
|
2684
|
-
.url(`/reserved_domains/${
|
|
2685
|
-
.delete()
|
|
3000
|
+
.url(`/reserved_domains/${id}/certificate_management_policy`)
|
|
3001
|
+
.delete(id)
|
|
2686
3002
|
.json(payload => util.deserializeResult(payload))
|
|
2687
3003
|
.then(f => f, util.onRejected);
|
|
2688
3004
|
}
|
|
2689
|
-
|
|
2690
3005
|
/**
|
|
2691
3006
|
* Detach the certificate attached to a reserved domain.
|
|
2692
3007
|
*/
|
|
2693
|
-
public deleteCertificate(
|
|
3008
|
+
public deleteCertificate(id): Promise<void> {
|
|
2694
3009
|
return this.httpClient
|
|
2695
|
-
.url(`/reserved_domains/${
|
|
2696
|
-
.delete()
|
|
3010
|
+
.url(`/reserved_domains/${id}/certificate`)
|
|
3011
|
+
.delete(id)
|
|
2697
3012
|
.json(payload => util.deserializeResult(payload))
|
|
2698
3013
|
.then(f => f, util.onRejected);
|
|
2699
3014
|
}
|
|
@@ -2722,39 +3037,40 @@ export class SSHCertificateAuthorities {
|
|
|
2722
3037
|
.json(payload => util.deserializeResult(payload))
|
|
2723
3038
|
.then(f => f, util.onRejected);
|
|
2724
3039
|
}
|
|
2725
|
-
|
|
2726
3040
|
/**
|
|
2727
3041
|
* Delete an SSH Certificate Authority
|
|
2728
3042
|
*/
|
|
2729
|
-
public delete(
|
|
3043
|
+
public delete(id): Promise<void> {
|
|
2730
3044
|
return this.httpClient
|
|
2731
|
-
.url(`/ssh_certificate_authorities/${
|
|
2732
|
-
.delete()
|
|
3045
|
+
.url(`/ssh_certificate_authorities/${id}`)
|
|
3046
|
+
.delete(id)
|
|
2733
3047
|
.json(payload => util.deserializeResult(payload))
|
|
2734
3048
|
.then(f => f, util.onRejected);
|
|
2735
3049
|
}
|
|
2736
|
-
|
|
2737
3050
|
/**
|
|
2738
3051
|
* Get detailed information about an SSH Certficate Authority
|
|
2739
3052
|
*/
|
|
2740
|
-
public get(
|
|
3053
|
+
public get(id): Promise<datatypes.SSHCertificateAuthority> {
|
|
2741
3054
|
return this.httpClient
|
|
2742
|
-
.url(`/ssh_certificate_authorities/${
|
|
2743
|
-
.get()
|
|
3055
|
+
.url(`/ssh_certificate_authorities/${id}`)
|
|
3056
|
+
.get(id)
|
|
2744
3057
|
.json(payload => util.deserializeResult(payload))
|
|
2745
3058
|
.then(f => f, util.onRejected);
|
|
2746
3059
|
}
|
|
2747
|
-
|
|
2748
3060
|
/**
|
|
2749
3061
|
* List all SSH Certificate Authorities on this account
|
|
2750
3062
|
*/
|
|
2751
|
-
public async list(
|
|
3063
|
+
public async list(
|
|
3064
|
+
beforeId?: string,
|
|
3065
|
+
limit?: string
|
|
3066
|
+
): Promise<Array<datatypes.SSHCertificateAuthority>> {
|
|
2752
3067
|
const array: Array<datatypes.SSHCertificateAuthority> = [];
|
|
2753
|
-
for await (const item of this._asyncList()) {
|
|
3068
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
2754
3069
|
array.push(item);
|
|
2755
3070
|
}
|
|
2756
3071
|
return array;
|
|
2757
3072
|
}
|
|
3073
|
+
|
|
2758
3074
|
private _pagedList(
|
|
2759
3075
|
arg: datatypes.Paging
|
|
2760
3076
|
): Promise<datatypes.SSHCertificateAuthorityList> {
|
|
@@ -2765,11 +3081,15 @@ export class SSHCertificateAuthorities {
|
|
|
2765
3081
|
.json(payload => util.deserializeResult(payload))
|
|
2766
3082
|
.then(util.onFulfilled, util.onRejected);
|
|
2767
3083
|
}
|
|
2768
|
-
|
|
2769
|
-
|
|
3084
|
+
|
|
3085
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
2770
3086
|
let nextPage = 'initial loop';
|
|
2771
3087
|
let page: datatypes.Paging = { limit: limit };
|
|
2772
3088
|
|
|
3089
|
+
if (beforeId) {
|
|
3090
|
+
page.beforeId = beforeId;
|
|
3091
|
+
}
|
|
3092
|
+
|
|
2773
3093
|
while (nextPage) {
|
|
2774
3094
|
const pagedList = await this._pagedList(page);
|
|
2775
3095
|
nextPage = pagedList.nextPageUri;
|
|
@@ -2825,39 +3145,40 @@ export class SSHCredentials {
|
|
|
2825
3145
|
.json(payload => util.deserializeResult(payload))
|
|
2826
3146
|
.then(f => f, util.onRejected);
|
|
2827
3147
|
}
|
|
2828
|
-
|
|
2829
3148
|
/**
|
|
2830
3149
|
* Delete an ssh_credential by ID
|
|
2831
3150
|
*/
|
|
2832
|
-
public delete(
|
|
3151
|
+
public delete(id): Promise<void> {
|
|
2833
3152
|
return this.httpClient
|
|
2834
|
-
.url(`/ssh_credentials/${
|
|
2835
|
-
.delete()
|
|
3153
|
+
.url(`/ssh_credentials/${id}`)
|
|
3154
|
+
.delete(id)
|
|
2836
3155
|
.json(payload => util.deserializeResult(payload))
|
|
2837
3156
|
.then(f => f, util.onRejected);
|
|
2838
3157
|
}
|
|
2839
|
-
|
|
2840
3158
|
/**
|
|
2841
3159
|
* Get detailed information about an ssh_credential
|
|
2842
3160
|
*/
|
|
2843
|
-
public get(
|
|
3161
|
+
public get(id): Promise<datatypes.SSHCredential> {
|
|
2844
3162
|
return this.httpClient
|
|
2845
|
-
.url(`/ssh_credentials/${
|
|
2846
|
-
.get()
|
|
3163
|
+
.url(`/ssh_credentials/${id}`)
|
|
3164
|
+
.get(id)
|
|
2847
3165
|
.json(payload => util.deserializeResult(payload))
|
|
2848
3166
|
.then(f => f, util.onRejected);
|
|
2849
3167
|
}
|
|
2850
|
-
|
|
2851
3168
|
/**
|
|
2852
3169
|
* List all ssh credentials on this account
|
|
2853
3170
|
*/
|
|
2854
|
-
public async list(
|
|
3171
|
+
public async list(
|
|
3172
|
+
beforeId?: string,
|
|
3173
|
+
limit?: string
|
|
3174
|
+
): Promise<Array<datatypes.SSHCredential>> {
|
|
2855
3175
|
const array: Array<datatypes.SSHCredential> = [];
|
|
2856
|
-
for await (const item of this._asyncList()) {
|
|
3176
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
2857
3177
|
array.push(item);
|
|
2858
3178
|
}
|
|
2859
3179
|
return array;
|
|
2860
3180
|
}
|
|
3181
|
+
|
|
2861
3182
|
private _pagedList(
|
|
2862
3183
|
arg: datatypes.Paging
|
|
2863
3184
|
): Promise<datatypes.SSHCredentialList> {
|
|
@@ -2868,11 +3189,15 @@ export class SSHCredentials {
|
|
|
2868
3189
|
.json(payload => util.deserializeResult(payload))
|
|
2869
3190
|
.then(util.onFulfilled, util.onRejected);
|
|
2870
3191
|
}
|
|
2871
|
-
|
|
2872
|
-
|
|
3192
|
+
|
|
3193
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
2873
3194
|
let nextPage = 'initial loop';
|
|
2874
3195
|
let page: datatypes.Paging = { limit: limit };
|
|
2875
3196
|
|
|
3197
|
+
if (beforeId) {
|
|
3198
|
+
page.beforeId = beforeId;
|
|
3199
|
+
}
|
|
3200
|
+
|
|
2876
3201
|
while (nextPage) {
|
|
2877
3202
|
const pagedList = await this._pagedList(page);
|
|
2878
3203
|
nextPage = pagedList.nextPageUri;
|
|
@@ -2928,39 +3253,40 @@ export class SSHHostCertificates {
|
|
|
2928
3253
|
.json(payload => util.deserializeResult(payload))
|
|
2929
3254
|
.then(f => f, util.onRejected);
|
|
2930
3255
|
}
|
|
2931
|
-
|
|
2932
3256
|
/**
|
|
2933
3257
|
* Delete an SSH Host Certificate
|
|
2934
3258
|
*/
|
|
2935
|
-
public delete(
|
|
3259
|
+
public delete(id): Promise<void> {
|
|
2936
3260
|
return this.httpClient
|
|
2937
|
-
.url(`/ssh_host_certificates/${
|
|
2938
|
-
.delete()
|
|
3261
|
+
.url(`/ssh_host_certificates/${id}`)
|
|
3262
|
+
.delete(id)
|
|
2939
3263
|
.json(payload => util.deserializeResult(payload))
|
|
2940
3264
|
.then(f => f, util.onRejected);
|
|
2941
3265
|
}
|
|
2942
|
-
|
|
2943
3266
|
/**
|
|
2944
3267
|
* Get detailed information about an SSH Host Certficate
|
|
2945
3268
|
*/
|
|
2946
|
-
public get(
|
|
3269
|
+
public get(id): Promise<datatypes.SSHHostCertificate> {
|
|
2947
3270
|
return this.httpClient
|
|
2948
|
-
.url(`/ssh_host_certificates/${
|
|
2949
|
-
.get()
|
|
3271
|
+
.url(`/ssh_host_certificates/${id}`)
|
|
3272
|
+
.get(id)
|
|
2950
3273
|
.json(payload => util.deserializeResult(payload))
|
|
2951
3274
|
.then(f => f, util.onRejected);
|
|
2952
3275
|
}
|
|
2953
|
-
|
|
2954
3276
|
/**
|
|
2955
3277
|
* List all SSH Host Certificates issued on this account
|
|
2956
3278
|
*/
|
|
2957
|
-
public async list(
|
|
3279
|
+
public async list(
|
|
3280
|
+
beforeId?: string,
|
|
3281
|
+
limit?: string
|
|
3282
|
+
): Promise<Array<datatypes.SSHHostCertificate>> {
|
|
2958
3283
|
const array: Array<datatypes.SSHHostCertificate> = [];
|
|
2959
|
-
for await (const item of this._asyncList()) {
|
|
3284
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
2960
3285
|
array.push(item);
|
|
2961
3286
|
}
|
|
2962
3287
|
return array;
|
|
2963
3288
|
}
|
|
3289
|
+
|
|
2964
3290
|
private _pagedList(
|
|
2965
3291
|
arg: datatypes.Paging
|
|
2966
3292
|
): Promise<datatypes.SSHHostCertificateList> {
|
|
@@ -2971,11 +3297,15 @@ export class SSHHostCertificates {
|
|
|
2971
3297
|
.json(payload => util.deserializeResult(payload))
|
|
2972
3298
|
.then(util.onFulfilled, util.onRejected);
|
|
2973
3299
|
}
|
|
2974
|
-
|
|
2975
|
-
|
|
3300
|
+
|
|
3301
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
2976
3302
|
let nextPage = 'initial loop';
|
|
2977
3303
|
let page: datatypes.Paging = { limit: limit };
|
|
2978
3304
|
|
|
3305
|
+
if (beforeId) {
|
|
3306
|
+
page.beforeId = beforeId;
|
|
3307
|
+
}
|
|
3308
|
+
|
|
2979
3309
|
while (nextPage) {
|
|
2980
3310
|
const pagedList = await this._pagedList(page);
|
|
2981
3311
|
nextPage = pagedList.nextPageUri;
|
|
@@ -3032,39 +3362,40 @@ export class SSHUserCertificates {
|
|
|
3032
3362
|
.json(payload => util.deserializeResult(payload))
|
|
3033
3363
|
.then(f => f, util.onRejected);
|
|
3034
3364
|
}
|
|
3035
|
-
|
|
3036
3365
|
/**
|
|
3037
3366
|
* Delete an SSH User Certificate
|
|
3038
3367
|
*/
|
|
3039
|
-
public delete(
|
|
3368
|
+
public delete(id): Promise<void> {
|
|
3040
3369
|
return this.httpClient
|
|
3041
|
-
.url(`/ssh_user_certificates/${
|
|
3042
|
-
.delete()
|
|
3370
|
+
.url(`/ssh_user_certificates/${id}`)
|
|
3371
|
+
.delete(id)
|
|
3043
3372
|
.json(payload => util.deserializeResult(payload))
|
|
3044
3373
|
.then(f => f, util.onRejected);
|
|
3045
3374
|
}
|
|
3046
|
-
|
|
3047
3375
|
/**
|
|
3048
3376
|
* Get detailed information about an SSH User Certficate
|
|
3049
3377
|
*/
|
|
3050
|
-
public get(
|
|
3378
|
+
public get(id): Promise<datatypes.SSHUserCertificate> {
|
|
3051
3379
|
return this.httpClient
|
|
3052
|
-
.url(`/ssh_user_certificates/${
|
|
3053
|
-
.get()
|
|
3380
|
+
.url(`/ssh_user_certificates/${id}`)
|
|
3381
|
+
.get(id)
|
|
3054
3382
|
.json(payload => util.deserializeResult(payload))
|
|
3055
3383
|
.then(f => f, util.onRejected);
|
|
3056
3384
|
}
|
|
3057
|
-
|
|
3058
3385
|
/**
|
|
3059
3386
|
* List all SSH User Certificates issued on this account
|
|
3060
3387
|
*/
|
|
3061
|
-
public async list(
|
|
3388
|
+
public async list(
|
|
3389
|
+
beforeId?: string,
|
|
3390
|
+
limit?: string
|
|
3391
|
+
): Promise<Array<datatypes.SSHUserCertificate>> {
|
|
3062
3392
|
const array: Array<datatypes.SSHUserCertificate> = [];
|
|
3063
|
-
for await (const item of this._asyncList()) {
|
|
3393
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
3064
3394
|
array.push(item);
|
|
3065
3395
|
}
|
|
3066
3396
|
return array;
|
|
3067
3397
|
}
|
|
3398
|
+
|
|
3068
3399
|
private _pagedList(
|
|
3069
3400
|
arg: datatypes.Paging
|
|
3070
3401
|
): Promise<datatypes.SSHUserCertificateList> {
|
|
@@ -3075,11 +3406,15 @@ export class SSHUserCertificates {
|
|
|
3075
3406
|
.json(payload => util.deserializeResult(payload))
|
|
3076
3407
|
.then(util.onFulfilled, util.onRejected);
|
|
3077
3408
|
}
|
|
3078
|
-
|
|
3079
|
-
|
|
3409
|
+
|
|
3410
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
3080
3411
|
let nextPage = 'initial loop';
|
|
3081
3412
|
let page: datatypes.Paging = { limit: limit };
|
|
3082
3413
|
|
|
3414
|
+
if (beforeId) {
|
|
3415
|
+
page.beforeId = beforeId;
|
|
3416
|
+
}
|
|
3417
|
+
|
|
3083
3418
|
while (nextPage) {
|
|
3084
3419
|
const pagedList = await this._pagedList(page);
|
|
3085
3420
|
nextPage = pagedList.nextPageUri;
|
|
@@ -3138,39 +3473,40 @@ export class TLSCertificates {
|
|
|
3138
3473
|
.json(payload => util.deserializeResult(payload))
|
|
3139
3474
|
.then(f => f, util.onRejected);
|
|
3140
3475
|
}
|
|
3141
|
-
|
|
3142
3476
|
/**
|
|
3143
3477
|
* Delete a TLS certificate
|
|
3144
3478
|
*/
|
|
3145
|
-
public delete(
|
|
3479
|
+
public delete(id): Promise<void> {
|
|
3146
3480
|
return this.httpClient
|
|
3147
|
-
.url(`/tls_certificates/${
|
|
3148
|
-
.delete()
|
|
3481
|
+
.url(`/tls_certificates/${id}`)
|
|
3482
|
+
.delete(id)
|
|
3149
3483
|
.json(payload => util.deserializeResult(payload))
|
|
3150
3484
|
.then(f => f, util.onRejected);
|
|
3151
3485
|
}
|
|
3152
|
-
|
|
3153
3486
|
/**
|
|
3154
3487
|
* Get detailed information about a TLS certificate
|
|
3155
3488
|
*/
|
|
3156
|
-
public get(
|
|
3489
|
+
public get(id): Promise<datatypes.TLSCertificate> {
|
|
3157
3490
|
return this.httpClient
|
|
3158
|
-
.url(`/tls_certificates/${
|
|
3159
|
-
.get()
|
|
3491
|
+
.url(`/tls_certificates/${id}`)
|
|
3492
|
+
.get(id)
|
|
3160
3493
|
.json(payload => util.deserializeResult(payload))
|
|
3161
3494
|
.then(f => f, util.onRejected);
|
|
3162
3495
|
}
|
|
3163
|
-
|
|
3164
3496
|
/**
|
|
3165
3497
|
* List all TLS certificates on this account
|
|
3166
3498
|
*/
|
|
3167
|
-
public async list(
|
|
3499
|
+
public async list(
|
|
3500
|
+
beforeId?: string,
|
|
3501
|
+
limit?: string
|
|
3502
|
+
): Promise<Array<datatypes.TLSCertificate>> {
|
|
3168
3503
|
const array: Array<datatypes.TLSCertificate> = [];
|
|
3169
|
-
for await (const item of this._asyncList()) {
|
|
3504
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
3170
3505
|
array.push(item);
|
|
3171
3506
|
}
|
|
3172
3507
|
return array;
|
|
3173
3508
|
}
|
|
3509
|
+
|
|
3174
3510
|
private _pagedList(
|
|
3175
3511
|
arg: datatypes.Paging
|
|
3176
3512
|
): Promise<datatypes.TLSCertificateList> {
|
|
@@ -3181,11 +3517,15 @@ export class TLSCertificates {
|
|
|
3181
3517
|
.json(payload => util.deserializeResult(payload))
|
|
3182
3518
|
.then(util.onFulfilled, util.onRejected);
|
|
3183
3519
|
}
|
|
3184
|
-
|
|
3185
|
-
|
|
3520
|
+
|
|
3521
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
3186
3522
|
let nextPage = 'initial loop';
|
|
3187
3523
|
let page: datatypes.Paging = { limit: limit };
|
|
3188
3524
|
|
|
3525
|
+
if (beforeId) {
|
|
3526
|
+
page.beforeId = beforeId;
|
|
3527
|
+
}
|
|
3528
|
+
|
|
3189
3529
|
while (nextPage) {
|
|
3190
3530
|
const pagedList = await this._pagedList(page);
|
|
3191
3531
|
nextPage = pagedList.nextPageUri;
|
|
@@ -3217,105 +3557,6 @@ export class TLSCertificates {
|
|
|
3217
3557
|
}
|
|
3218
3558
|
}
|
|
3219
3559
|
|
|
3220
|
-
/**
|
|
3221
|
-
* Tunnel Sessions represent instances of ngrok agents or SSH reverse tunnel
|
|
3222
|
-
sessions that are running and connected to the ngrok service. Each tunnel
|
|
3223
|
-
session can include one or more Tunnels.
|
|
3224
|
-
*/
|
|
3225
|
-
export class TunnelSessions {
|
|
3226
|
-
private httpClient: Wretcher;
|
|
3227
|
-
|
|
3228
|
-
/** Do not construct this object directly, use the <code>tunnelSessions</code> property of an <code>Ngrok</code> client object instead. */
|
|
3229
|
-
public constructor(httpClient: Wretcher) {
|
|
3230
|
-
this.httpClient = httpClient;
|
|
3231
|
-
}
|
|
3232
|
-
/**
|
|
3233
|
-
* List all online tunnel sessions running on this account.
|
|
3234
|
-
*/
|
|
3235
|
-
public async list(): Promise<Array<datatypes.TunnelSession>> {
|
|
3236
|
-
const array: Array<datatypes.TunnelSession> = [];
|
|
3237
|
-
for await (const item of this._asyncList()) {
|
|
3238
|
-
array.push(item);
|
|
3239
|
-
}
|
|
3240
|
-
return array;
|
|
3241
|
-
}
|
|
3242
|
-
private _pagedList(
|
|
3243
|
-
arg: datatypes.Paging
|
|
3244
|
-
): Promise<datatypes.TunnelSessionList> {
|
|
3245
|
-
return this.httpClient
|
|
3246
|
-
.url(`/tunnel_sessions`)
|
|
3247
|
-
.query(arg)
|
|
3248
|
-
.get()
|
|
3249
|
-
.json(payload => util.deserializeResult(payload))
|
|
3250
|
-
.then(util.onFulfilled, util.onRejected);
|
|
3251
|
-
}
|
|
3252
|
-
private async *_asyncList() {
|
|
3253
|
-
const limit = '100';
|
|
3254
|
-
let nextPage = 'initial loop';
|
|
3255
|
-
let page: datatypes.Paging = { limit: limit };
|
|
3256
|
-
|
|
3257
|
-
while (nextPage) {
|
|
3258
|
-
const pagedList = await this._pagedList(page);
|
|
3259
|
-
nextPage = pagedList.nextPageUri;
|
|
3260
|
-
const items: datatypes.TunnelSession[] = pagedList.tunnelSessions;
|
|
3261
|
-
|
|
3262
|
-
if (nextPage) {
|
|
3263
|
-
page = {
|
|
3264
|
-
beforeId: items[items.length - 1].id,
|
|
3265
|
-
limit: limit,
|
|
3266
|
-
};
|
|
3267
|
-
}
|
|
3268
|
-
|
|
3269
|
-
for (const item of items) {
|
|
3270
|
-
yield item;
|
|
3271
|
-
}
|
|
3272
|
-
}
|
|
3273
|
-
}
|
|
3274
|
-
/**
|
|
3275
|
-
* Get the detailed status of a tunnel session by ID
|
|
3276
|
-
*/
|
|
3277
|
-
public get(arg: datatypes.Item): Promise<datatypes.TunnelSession> {
|
|
3278
|
-
return this.httpClient
|
|
3279
|
-
.url(`/tunnel_sessions/${arg.id}`)
|
|
3280
|
-
.get()
|
|
3281
|
-
.json(payload => util.deserializeResult(payload))
|
|
3282
|
-
.then(f => f, util.onRejected);
|
|
3283
|
-
}
|
|
3284
|
-
|
|
3285
|
-
/**
|
|
3286
|
-
* Issues a command instructing the ngrok agent to restart. The agent restarts itself by calling exec() on platforms that support it. This operation is notably not supported on Windows. When an agent restarts, it reconnects with a new tunnel session ID.
|
|
3287
|
-
*/
|
|
3288
|
-
public restart(arg: datatypes.Item): Promise<void> {
|
|
3289
|
-
return this.httpClient
|
|
3290
|
-
.url(`/tunnel_sessions/${arg.id}/restart`)
|
|
3291
|
-
.post(util.serializeArgument(arg))
|
|
3292
|
-
.json(payload => util.deserializeResult(payload))
|
|
3293
|
-
.then(f => f, util.onRejected);
|
|
3294
|
-
}
|
|
3295
|
-
|
|
3296
|
-
/**
|
|
3297
|
-
* Issues a command instructing the ngrok agent that started this tunnel session to exit.
|
|
3298
|
-
*/
|
|
3299
|
-
public stop(arg: datatypes.Item): Promise<void> {
|
|
3300
|
-
return this.httpClient
|
|
3301
|
-
.url(`/tunnel_sessions/${arg.id}/stop`)
|
|
3302
|
-
.post(util.serializeArgument(arg))
|
|
3303
|
-
.json(payload => util.deserializeResult(payload))
|
|
3304
|
-
.then(f => f, util.onRejected);
|
|
3305
|
-
}
|
|
3306
|
-
|
|
3307
|
-
/**
|
|
3308
|
-
* Issues a command instructing the ngrok agent to update itself to the latest version. After this call completes successfully, the ngrok agent will be in the update process. A caller should wait some amount of time to allow the update to complete (at least 10 seconds) before making a call to the Restart endpoint to request that the agent restart itself to start using the new code. This call will never update an ngrok agent to a new major version which could cause breaking compatibility issues. If you wish to update to a new major version, that must be done manually. Still, please be aware that updating your ngrok agent could break your integration. This call will fail in any of the following circumstances: there is no update available the ngrok agent's configuration disabled update checks the agent is currently in process of updating the agent has already successfully updated but has not yet been restarted
|
|
3309
|
-
*/
|
|
3310
|
-
public update(arg: datatypes.TunnelSessionsUpdate): Promise<void> {
|
|
3311
|
-
return this.httpClient
|
|
3312
|
-
.url(`/tunnel_sessions/${arg.id}/update`)
|
|
3313
|
-
.post(util.serializeArgument(arg))
|
|
3314
|
-
.json(payload => util.deserializeResult(payload))
|
|
3315
|
-
.then(f => f, util.onRejected);
|
|
3316
|
-
}
|
|
3317
|
-
}
|
|
3318
|
-
|
|
3319
3560
|
/**
|
|
3320
3561
|
* Tunnels provide endpoints to access services exposed by a running ngrok
|
|
3321
3562
|
agent tunnel session or an SSH reverse tunnel session.
|
|
@@ -3330,13 +3571,17 @@ export class Tunnels {
|
|
|
3330
3571
|
/**
|
|
3331
3572
|
* List all online tunnels currently running on the account.
|
|
3332
3573
|
*/
|
|
3333
|
-
public async list(
|
|
3574
|
+
public async list(
|
|
3575
|
+
beforeId?: string,
|
|
3576
|
+
limit?: string
|
|
3577
|
+
): Promise<Array<datatypes.Tunnel>> {
|
|
3334
3578
|
const array: Array<datatypes.Tunnel> = [];
|
|
3335
|
-
for await (const item of this._asyncList()) {
|
|
3579
|
+
for await (const item of this._asyncList(beforeId, limit)) {
|
|
3336
3580
|
array.push(item);
|
|
3337
3581
|
}
|
|
3338
3582
|
return array;
|
|
3339
3583
|
}
|
|
3584
|
+
|
|
3340
3585
|
private _pagedList(arg: datatypes.Paging): Promise<datatypes.TunnelList> {
|
|
3341
3586
|
return this.httpClient
|
|
3342
3587
|
.url(`/tunnels`)
|
|
@@ -3345,11 +3590,15 @@ export class Tunnels {
|
|
|
3345
3590
|
.json(payload => util.deserializeResult(payload))
|
|
3346
3591
|
.then(util.onFulfilled, util.onRejected);
|
|
3347
3592
|
}
|
|
3348
|
-
|
|
3349
|
-
|
|
3593
|
+
|
|
3594
|
+
private async *_asyncList(beforeId: string, limit = '100') {
|
|
3350
3595
|
let nextPage = 'initial loop';
|
|
3351
3596
|
let page: datatypes.Paging = { limit: limit };
|
|
3352
3597
|
|
|
3598
|
+
if (beforeId) {
|
|
3599
|
+
page.beforeId = beforeId;
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3353
3602
|
while (nextPage) {
|
|
3354
3603
|
const pagedList = await this._pagedList(page);
|
|
3355
3604
|
nextPage = pagedList.nextPageUri;
|
|
@@ -3370,10 +3619,10 @@ export class Tunnels {
|
|
|
3370
3619
|
/**
|
|
3371
3620
|
* Get the status of a tunnel by ID
|
|
3372
3621
|
*/
|
|
3373
|
-
public get(
|
|
3622
|
+
public get(id): Promise<datatypes.Tunnel> {
|
|
3374
3623
|
return this.httpClient
|
|
3375
|
-
.url(`/tunnels/${
|
|
3376
|
-
.get()
|
|
3624
|
+
.url(`/tunnels/${id}`)
|
|
3625
|
+
.get(id)
|
|
3377
3626
|
.json(payload => util.deserializeResult(payload))
|
|
3378
3627
|
.then(f => f, util.onRejected);
|
|
3379
3628
|
}
|