@ngrok/ngrok-api 0.0.9 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +4 -1
- package/CHANGELOG.md +34 -0
- package/README.md +148 -2
- package/docs/CNAME +1 -0
- package/docs/assets/css/main.css +2660 -0
- package/docs/assets/images/icons.png +0 -0
- package/docs/assets/images/icons@2x.png +0 -0
- package/docs/assets/images/widgets.png +0 -0
- package/docs/assets/images/widgets@2x.png +0 -0
- package/docs/assets/js/main.js +248 -0
- package/docs/assets/js/search.js +1 -0
- package/docs/classes/client.Ngrok.html +681 -0
- package/docs/classes/services.APIKeys.html +453 -0
- package/docs/classes/services.AbuseReports.html +360 -0
- package/docs/classes/services.AgentIngresses.html +442 -0
- package/docs/classes/services.CertificateAuthorities.html +453 -0
- package/docs/classes/services.Credentials.html +452 -0
- package/docs/classes/services.EndpointCircuitBreakerModule.html +369 -0
- package/docs/classes/services.EndpointCompressionModule.html +369 -0
- package/docs/classes/services.EndpointConfigurations.html +451 -0
- package/docs/classes/services.EndpointIPPolicyModule.html +369 -0
- package/docs/classes/services.EndpointLoggingModule.html +369 -0
- package/docs/classes/services.EndpointMutualTLSModule.html +369 -0
- package/docs/classes/services.EndpointOAuthModule.html +369 -0
- package/docs/classes/services.EndpointOIDCModule.html +369 -0
- package/docs/classes/services.EndpointRequestHeadersModule.html +369 -0
- package/docs/classes/services.EndpointResponseHeadersModule.html +369 -0
- package/docs/classes/services.EndpointSAMLModule.html +369 -0
- package/docs/classes/services.EndpointTLSTerminationModule.html +369 -0
- package/docs/classes/services.EndpointWebhookValidationModule.html +369 -0
- package/docs/classes/services.EventDestinations.html +442 -0
- package/docs/classes/services.EventSources.html +448 -0
- package/docs/classes/services.EventStreams.html +442 -0
- package/docs/classes/services.EventSubscriptions.html +442 -0
- package/docs/classes/services.IPPolicies.html +452 -0
- package/docs/classes/services.IPPolicyRules.html +450 -0
- package/docs/classes/services.IPRestrictions.html +454 -0
- package/docs/classes/services.ReservedAddrs.html +483 -0
- package/docs/classes/services.ReservedDomains.html +580 -0
- package/docs/classes/services.SSHCertificateAuthorities.html +450 -0
- package/docs/classes/services.SSHCredentials.html +450 -0
- package/docs/classes/services.SSHHostCertificates.html +451 -0
- package/docs/classes/services.SSHUserCertificates.html +451 -0
- package/docs/classes/services.TLSCertificates.html +453 -0
- package/docs/classes/services.TunnelSessions.html +451 -0
- package/docs/classes/services.Tunnels.html +322 -0
- package/docs/index.html +239 -0
- package/docs/interfaces/client.NgrokConfig.html +179 -0
- package/docs/interfaces/datatypes.APIKey.html +262 -0
- package/docs/interfaces/datatypes.APIKeyCreate.html +186 -0
- package/docs/interfaces/datatypes.APIKeyList.html +205 -0
- package/docs/interfaces/datatypes.APIKeyUpdate.html +200 -0
- package/docs/interfaces/datatypes.AWSAuth.html +186 -0
- package/docs/interfaces/datatypes.AWSCredentials.html +186 -0
- package/docs/interfaces/datatypes.AWSRole.html +167 -0
- package/docs/interfaces/datatypes.AbuseReport.html +281 -0
- package/docs/interfaces/datatypes.AbuseReportCreate.html +186 -0
- package/docs/interfaces/datatypes.AbuseReportHostname.html +186 -0
- package/docs/interfaces/datatypes.AgentIngress.html +300 -0
- package/docs/interfaces/datatypes.AgentIngressCreate.html +205 -0
- package/docs/interfaces/datatypes.AgentIngressList.html +205 -0
- package/docs/interfaces/datatypes.AgentIngressUpdate.html +200 -0
- package/docs/interfaces/datatypes.CertificateAuthority.html +357 -0
- package/docs/interfaces/datatypes.CertificateAuthorityCreate.html +205 -0
- package/docs/interfaces/datatypes.CertificateAuthorityList.html +205 -0
- package/docs/interfaces/datatypes.CertificateAuthorityUpdate.html +200 -0
- package/docs/interfaces/datatypes.Credential.html +281 -0
- package/docs/interfaces/datatypes.CredentialCreate.html +205 -0
- package/docs/interfaces/datatypes.CredentialList.html +205 -0
- package/docs/interfaces/datatypes.CredentialUpdate.html +219 -0
- package/docs/interfaces/datatypes.Empty.html +130 -0
- package/docs/interfaces/datatypes.EndpointCircuitBreaker.html +262 -0
- package/docs/interfaces/datatypes.EndpointCircuitBreakerReplace.html +176 -0
- package/docs/interfaces/datatypes.EndpointCompression.html +167 -0
- package/docs/interfaces/datatypes.EndpointCompressionReplace.html +176 -0
- package/docs/interfaces/datatypes.EndpointConfiguration.html +490 -0
- package/docs/interfaces/datatypes.EndpointConfigurationCreate.html +433 -0
- package/docs/interfaces/datatypes.EndpointConfigurationList.html +205 -0
- package/docs/interfaces/datatypes.EndpointConfigurationUpdate.html +433 -0
- package/docs/interfaces/datatypes.EndpointIPPolicy.html +181 -0
- package/docs/interfaces/datatypes.EndpointIPPolicyMutate.html +186 -0
- package/docs/interfaces/datatypes.EndpointIPPolicyReplace.html +176 -0
- package/docs/interfaces/datatypes.EndpointLogging.html +186 -0
- package/docs/interfaces/datatypes.EndpointLoggingMutate.html +186 -0
- package/docs/interfaces/datatypes.EndpointLoggingReplace.html +176 -0
- package/docs/interfaces/datatypes.EndpointMutualTLS.html +186 -0
- package/docs/interfaces/datatypes.EndpointMutualTLSMutate.html +186 -0
- package/docs/interfaces/datatypes.EndpointMutualTLSReplace.html +176 -0
- package/docs/interfaces/datatypes.EndpointOAuth.html +281 -0
- package/docs/interfaces/datatypes.EndpointOAuthFacebook.html +243 -0
- package/docs/interfaces/datatypes.EndpointOAuthGitHub.html +281 -0
- package/docs/interfaces/datatypes.EndpointOAuthGoogle.html +243 -0
- package/docs/interfaces/datatypes.EndpointOAuthMicrosoft.html +243 -0
- package/docs/interfaces/datatypes.EndpointOAuthProvider.html +224 -0
- package/docs/interfaces/datatypes.EndpointOAuthReplace.html +176 -0
- package/docs/interfaces/datatypes.EndpointOIDC.html +319 -0
- package/docs/interfaces/datatypes.EndpointOIDCReplace.html +176 -0
- package/docs/interfaces/datatypes.EndpointRequestHeaders.html +205 -0
- package/docs/interfaces/datatypes.EndpointRequestHeadersReplace.html +176 -0
- package/docs/interfaces/datatypes.EndpointResponseHeaders.html +205 -0
- package/docs/interfaces/datatypes.EndpointResponseHeadersReplace.html +176 -0
- package/docs/interfaces/datatypes.EndpointSAML.html +433 -0
- package/docs/interfaces/datatypes.EndpointSAMLMutate.html +338 -0
- package/docs/interfaces/datatypes.EndpointSAMLReplace.html +176 -0
- package/docs/interfaces/datatypes.EndpointTLSTermination.html +205 -0
- package/docs/interfaces/datatypes.EndpointTLSTerminationReplace.html +176 -0
- package/docs/interfaces/datatypes.EndpointWebhookValidation.html +205 -0
- package/docs/interfaces/datatypes.EndpointWebhookValidationReplace.html +176 -0
- package/docs/interfaces/datatypes.Error.html +204 -0
- package/docs/interfaces/datatypes.EventDestination.html +281 -0
- package/docs/interfaces/datatypes.EventDestinationCreate.html +224 -0
- package/docs/interfaces/datatypes.EventDestinationList.html +205 -0
- package/docs/interfaces/datatypes.EventDestinationUpdate.html +243 -0
- package/docs/interfaces/datatypes.EventSource.html +186 -0
- package/docs/interfaces/datatypes.EventSourceCreate.html +186 -0
- package/docs/interfaces/datatypes.EventSourceItem.html +193 -0
- package/docs/interfaces/datatypes.EventSourceList.html +186 -0
- package/docs/interfaces/datatypes.EventSourcePaging.html +174 -0
- package/docs/interfaces/datatypes.EventSourceReplace.html +167 -0
- package/docs/interfaces/datatypes.EventSourceUpdate.html +186 -0
- package/docs/interfaces/datatypes.EventStream.html +319 -0
- package/docs/interfaces/datatypes.EventStreamCreate.html +262 -0
- package/docs/interfaces/datatypes.EventStreamList.html +205 -0
- package/docs/interfaces/datatypes.EventStreamUpdate.html +262 -0
- package/docs/interfaces/datatypes.EventSubscription.html +281 -0
- package/docs/interfaces/datatypes.EventSubscriptionCreate.html +224 -0
- package/docs/interfaces/datatypes.EventSubscriptionList.html +205 -0
- package/docs/interfaces/datatypes.EventSubscriptionUpdate.html +243 -0
- package/docs/interfaces/datatypes.EventTarget.html +205 -0
- package/docs/interfaces/datatypes.EventTargetCloudwatchLogs.html +186 -0
- package/docs/interfaces/datatypes.EventTargetFirehose.html +186 -0
- package/docs/interfaces/datatypes.EventTargetKinesis.html +186 -0
- package/docs/interfaces/datatypes.IPPolicy.html +262 -0
- package/docs/interfaces/datatypes.IPPolicyCreate.html +205 -0
- package/docs/interfaces/datatypes.IPPolicyList.html +205 -0
- package/docs/interfaces/datatypes.IPPolicyRule.html +281 -0
- package/docs/interfaces/datatypes.IPPolicyRuleCreate.html +224 -0
- package/docs/interfaces/datatypes.IPPolicyRuleList.html +205 -0
- package/docs/interfaces/datatypes.IPPolicyRuleUpdate.html +219 -0
- package/docs/interfaces/datatypes.IPPolicyUpdate.html +200 -0
- package/docs/interfaces/datatypes.IPRestriction.html +300 -0
- package/docs/interfaces/datatypes.IPRestrictionCreate.html +243 -0
- package/docs/interfaces/datatypes.IPRestrictionList.html +205 -0
- package/docs/interfaces/datatypes.IPRestrictionUpdate.html +238 -0
- package/docs/interfaces/datatypes.Item.html +167 -0
- package/docs/interfaces/datatypes.Paging.html +176 -0
- package/docs/interfaces/datatypes.Ref.html +186 -0
- package/docs/interfaces/datatypes.ReservedAddr.html +300 -0
- package/docs/interfaces/datatypes.ReservedAddrCreate.html +224 -0
- package/docs/interfaces/datatypes.ReservedAddrList.html +205 -0
- package/docs/interfaces/datatypes.ReservedAddrUpdate.html +219 -0
- package/docs/interfaces/datatypes.ReservedDomain.html +414 -0
- package/docs/interfaces/datatypes.ReservedDomainCertJob.html +224 -0
- package/docs/interfaces/datatypes.ReservedDomainCertPolicy.html +186 -0
- package/docs/interfaces/datatypes.ReservedDomainCertStatus.html +186 -0
- package/docs/interfaces/datatypes.ReservedDomainCreate.html +300 -0
- package/docs/interfaces/datatypes.ReservedDomainList.html +205 -0
- package/docs/interfaces/datatypes.ReservedDomainUpdate.html +276 -0
- package/docs/interfaces/datatypes.SSHCertificateAuthority.html +281 -0
- package/docs/interfaces/datatypes.SSHCertificateAuthorityCreate.html +243 -0
- package/docs/interfaces/datatypes.SSHCertificateAuthorityList.html +205 -0
- package/docs/interfaces/datatypes.SSHCertificateAuthorityUpdate.html +200 -0
- package/docs/interfaces/datatypes.SSHCredential.html +281 -0
- package/docs/interfaces/datatypes.SSHCredentialCreate.html +224 -0
- package/docs/interfaces/datatypes.SSHCredentialList.html +205 -0
- package/docs/interfaces/datatypes.SSHCredentialUpdate.html +219 -0
- package/docs/interfaces/datatypes.SSHHostCertificate.html +376 -0
- package/docs/interfaces/datatypes.SSHHostCertificateCreate.html +281 -0
- package/docs/interfaces/datatypes.SSHHostCertificateList.html +205 -0
- package/docs/interfaces/datatypes.SSHHostCertificateUpdate.html +200 -0
- package/docs/interfaces/datatypes.SSHUserCertificate.html +414 -0
- package/docs/interfaces/datatypes.SSHUserCertificateCreate.html +319 -0
- package/docs/interfaces/datatypes.SSHUserCertificateList.html +205 -0
- package/docs/interfaces/datatypes.SSHUserCertificateUpdate.html +200 -0
- package/docs/interfaces/datatypes.TLSCertificate.html +547 -0
- package/docs/interfaces/datatypes.TLSCertificateCreate.html +224 -0
- package/docs/interfaces/datatypes.TLSCertificateList.html +205 -0
- package/docs/interfaces/datatypes.TLSCertificateSANs.html +186 -0
- package/docs/interfaces/datatypes.TLSCertificateUpdate.html +200 -0
- package/docs/interfaces/datatypes.Tunnel.html +281 -0
- package/docs/interfaces/datatypes.TunnelList.html +205 -0
- package/docs/interfaces/datatypes.TunnelSession.html +338 -0
- package/docs/interfaces/datatypes.TunnelSessionList.html +205 -0
- package/docs/interfaces/datatypes.TunnelSessionsUpdate.html +162 -0
- package/docs/modules/client.html +137 -0
- package/docs/modules/datatypes.html +668 -0
- package/docs/modules/services.html +260 -0
- package/docs/modules.html +119 -0
- package/lib/client.d.ts +145 -0
- package/lib/client.d.ts.map +1 -0
- package/lib/client.js +102 -0
- package/lib/client.js.map +1 -0
- package/lib/{types.d.ts → datatypes.d.ts} +620 -816
- package/lib/datatypes.d.ts.map +1 -0
- package/lib/{types.js → datatypes.js} +1 -1
- package/lib/datatypes.js.map +1 -0
- package/lib/index.d.ts +3 -314
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +25 -887
- package/lib/index.js.map +1 -1
- package/lib/services.d.ts +773 -0
- package/lib/services.d.ts.map +1 -0
- package/lib/services.js +2761 -0
- package/lib/services.js.map +1 -0
- package/lib/util.d.ts +5 -0
- package/lib/util.d.ts.map +1 -0
- package/lib/util.js +53 -0
- package/lib/util.js.map +1 -0
- package/package.json +12 -3
- package/src/client.ts +265 -0
- package/src/{types.ts → datatypes.ts} +648 -869
- package/src/index.ts +2 -616
- package/src/services.ts +2560 -0
- package/src/util.ts +48 -0
- package/test/apikey.test.js +44 -30
- package/test/endpointConfigurations.test.js +38 -34
- package/tsconfig.json +17 -7
- package/lib/types.js.map +0 -1
package/lib/index.js
CHANGED
|
@@ -1,890 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
Object.defineProperty(o, k2, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return m[k];
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
: function (o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
});
|
|
18
|
+
var __exportStar =
|
|
19
|
+
(this && this.__exportStar) ||
|
|
20
|
+
function (m, exports) {
|
|
21
|
+
for (var p in m)
|
|
22
|
+
if (p !== 'default' && !Object.prototype.hasOwnProperty.call(exports, p))
|
|
23
|
+
__createBinding(exports, m, p);
|
|
24
|
+
};
|
|
3
25
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
exports
|
|
5
|
-
|
|
6
|
-
var Ngrok = /** @class */ (function () {
|
|
7
|
-
/**
|
|
8
|
-
* Creates an instance of the Ngrok REST client
|
|
9
|
-
* @constructor
|
|
10
|
-
* @param {Object} config - config.apiToken and config.baseUrl
|
|
11
|
-
*/
|
|
12
|
-
function Ngrok(_a) {
|
|
13
|
-
var _this = this;
|
|
14
|
-
var _b = _a.baseUrl,
|
|
15
|
-
baseUrl = _b === void 0 ? 'https://api.ngrok.com' : _b,
|
|
16
|
-
apiToken = _a.apiToken;
|
|
17
|
-
this.AbuseReports = {
|
|
18
|
-
/** Creates a new abuse report which will be reviewed by our system and abuse response team. This API is only available to authorized accounts. Contact abuse@ngrok.com to request access */
|
|
19
|
-
create: function (arg) {
|
|
20
|
-
return _this.rest.url('/abuse_reports').post(arg).json();
|
|
21
|
-
},
|
|
22
|
-
/** Get the detailed status of abuse report by ID. */
|
|
23
|
-
get: function (arg) {
|
|
24
|
-
return _this.rest
|
|
25
|
-
.url('/abuse_reports/' + arg.id)
|
|
26
|
-
.get()
|
|
27
|
-
.json();
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
this.APIKeys = {
|
|
31
|
-
/** Create a new API key. The generated API key can be used to authenticate to the ngrok API. */
|
|
32
|
-
create: function (arg) {
|
|
33
|
-
return _this.rest.url('/api_keys').post(arg).json();
|
|
34
|
-
},
|
|
35
|
-
/** Delete an API key by ID */
|
|
36
|
-
delete: function (arg) {
|
|
37
|
-
return _this.rest
|
|
38
|
-
.url('/api_keys/' + arg.id)
|
|
39
|
-
.delete()
|
|
40
|
-
.json();
|
|
41
|
-
},
|
|
42
|
-
/** Get the details of an API key by ID. */
|
|
43
|
-
get: function (arg) {
|
|
44
|
-
return _this.rest
|
|
45
|
-
.url('/api_keys/' + arg.id)
|
|
46
|
-
.get()
|
|
47
|
-
.json();
|
|
48
|
-
},
|
|
49
|
-
/** List all API keys owned by this account */
|
|
50
|
-
list: function (arg) {
|
|
51
|
-
return _this.rest.url('/api_keys').get().json();
|
|
52
|
-
},
|
|
53
|
-
/** Update attributes of an API key by ID. */
|
|
54
|
-
update: function (arg) {
|
|
55
|
-
return _this.rest
|
|
56
|
-
.url('/api_keys/' + arg.id)
|
|
57
|
-
.patch(arg)
|
|
58
|
-
.json();
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
this.CertificateAuthorities = {
|
|
62
|
-
/** Upload a new Certificate Authority */
|
|
63
|
-
create: function (arg) {
|
|
64
|
-
return _this.rest.url('/certificate_authorities').post(arg).json();
|
|
65
|
-
},
|
|
66
|
-
/** Delete a Certificate Authority */
|
|
67
|
-
delete: function (arg) {
|
|
68
|
-
return _this.rest
|
|
69
|
-
.url('/certificate_authorities/' + arg.id)
|
|
70
|
-
.delete()
|
|
71
|
-
.json();
|
|
72
|
-
},
|
|
73
|
-
/** Get detailed information about a certficate authority */
|
|
74
|
-
get: function (arg) {
|
|
75
|
-
return _this.rest
|
|
76
|
-
.url('/certificate_authorities/' + arg.id)
|
|
77
|
-
.get()
|
|
78
|
-
.json();
|
|
79
|
-
},
|
|
80
|
-
/** List all Certificate Authority on this account */
|
|
81
|
-
list: function (arg) {
|
|
82
|
-
return _this.rest.url('/certificate_authorities').get().json();
|
|
83
|
-
},
|
|
84
|
-
/** Update attributes of a Certificate Authority by ID */
|
|
85
|
-
update: function (arg) {
|
|
86
|
-
return _this.rest
|
|
87
|
-
.url('/certificate_authorities/' + arg.id)
|
|
88
|
-
.patch(arg)
|
|
89
|
-
.json();
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
this.Credentials = {
|
|
93
|
-
/** Create a new tunnel authtoken credential. This authtoken credential can be used to start a new tunnel session. The response to this API call is the only time the generated token is available. If you need it for future use, you must save it securely yourself. */
|
|
94
|
-
create: function (arg) {
|
|
95
|
-
return _this.rest.url('/credentials').post(arg).json();
|
|
96
|
-
},
|
|
97
|
-
/** Delete a tunnel authtoken credential by ID */
|
|
98
|
-
delete: function (arg) {
|
|
99
|
-
return _this.rest
|
|
100
|
-
.url('/credentials/' + arg.id)
|
|
101
|
-
.delete()
|
|
102
|
-
.json();
|
|
103
|
-
},
|
|
104
|
-
/** Get detailed information about a tunnel authtoken credential */
|
|
105
|
-
get: function (arg) {
|
|
106
|
-
return _this.rest
|
|
107
|
-
.url('/credentials/' + arg.id)
|
|
108
|
-
.get()
|
|
109
|
-
.json();
|
|
110
|
-
},
|
|
111
|
-
/** List all tunnel authtoken credentials on this account */
|
|
112
|
-
list: function (arg) {
|
|
113
|
-
return _this.rest.url('/credentials').get().json();
|
|
114
|
-
},
|
|
115
|
-
/** Update attributes of an tunnel authtoken credential by ID */
|
|
116
|
-
update: function (arg) {
|
|
117
|
-
return _this.rest
|
|
118
|
-
.url('/credentials/' + arg.id)
|
|
119
|
-
.patch(arg)
|
|
120
|
-
.json();
|
|
121
|
-
},
|
|
122
|
-
};
|
|
123
|
-
this.EventStreams = {
|
|
124
|
-
/** Create a new Event Stream. It will not apply to anything until you associate it with one or more Endpoint Configs. */
|
|
125
|
-
create: function (arg) {
|
|
126
|
-
return _this.rest.url('/event_streams').post(arg).json();
|
|
127
|
-
},
|
|
128
|
-
/** Delete an Event Stream. Associated Event Destinations will be preserved. */
|
|
129
|
-
delete: function (arg) {
|
|
130
|
-
return _this.rest
|
|
131
|
-
.url('/event_streams/' + arg.id)
|
|
132
|
-
.delete()
|
|
133
|
-
.json();
|
|
134
|
-
},
|
|
135
|
-
/** Get detailed information about an Event Stream by ID. */
|
|
136
|
-
get: function (arg) {
|
|
137
|
-
return _this.rest
|
|
138
|
-
.url('/event_streams/' + arg.id)
|
|
139
|
-
.get()
|
|
140
|
-
.json();
|
|
141
|
-
},
|
|
142
|
-
/** List all Event Streams available on this account. */
|
|
143
|
-
list: function (arg) {
|
|
144
|
-
return _this.rest.url('/event_streams').get().json();
|
|
145
|
-
},
|
|
146
|
-
/** Update attributes of an Event Stream by ID. */
|
|
147
|
-
update: function (arg) {
|
|
148
|
-
return _this.rest
|
|
149
|
-
.url('/event_streams/' + arg.id)
|
|
150
|
-
.patch(arg)
|
|
151
|
-
.json();
|
|
152
|
-
},
|
|
153
|
-
};
|
|
154
|
-
this.EventDestinations = {
|
|
155
|
-
/** Create a new Event Destination. It will not apply to anything until it is associated with an Event Stream, and that Event Stream is associated with an Endpoint Config. */
|
|
156
|
-
create: function (arg) {
|
|
157
|
-
return _this.rest.url('/event_destinations').post(arg).json();
|
|
158
|
-
},
|
|
159
|
-
/** Delete an Event Destination. If the Event Destination is still referenced by an Event Stream, this will throw an error until that Event Stream has removed that reference. */
|
|
160
|
-
delete: function (arg) {
|
|
161
|
-
return _this.rest
|
|
162
|
-
.url('/event_destinations/' + arg.id)
|
|
163
|
-
.delete()
|
|
164
|
-
.json();
|
|
165
|
-
},
|
|
166
|
-
/** Get detailed information about an Event Destination by ID. */
|
|
167
|
-
get: function (arg) {
|
|
168
|
-
return _this.rest
|
|
169
|
-
.url('/event_destinations/' + arg.id)
|
|
170
|
-
.get()
|
|
171
|
-
.json();
|
|
172
|
-
},
|
|
173
|
-
/** List all Event Destinations on this account. */
|
|
174
|
-
list: function (arg) {
|
|
175
|
-
return _this.rest.url('/event_destinations').get().json();
|
|
176
|
-
},
|
|
177
|
-
/** Update attributes of an Event Destination. */
|
|
178
|
-
update: function (arg) {
|
|
179
|
-
return _this.rest
|
|
180
|
-
.url('/event_destinations/' + arg.id)
|
|
181
|
-
.patch(arg)
|
|
182
|
-
.json();
|
|
183
|
-
},
|
|
184
|
-
};
|
|
185
|
-
this.IPPolicies = {
|
|
186
|
-
/** Create a new IP policy. It will not apply to any traffic until you associate to a traffic source via an endpoint configuration or IP restriction. */
|
|
187
|
-
create: function (arg) {
|
|
188
|
-
return _this.rest.url('/ip_policies').post(arg).json();
|
|
189
|
-
},
|
|
190
|
-
/** 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. */
|
|
191
|
-
delete: function (arg) {
|
|
192
|
-
return _this.rest
|
|
193
|
-
.url('/ip_policies/' + arg.id)
|
|
194
|
-
.delete()
|
|
195
|
-
.json();
|
|
196
|
-
},
|
|
197
|
-
/** Get detailed information about an IP policy by ID. */
|
|
198
|
-
get: function (arg) {
|
|
199
|
-
return _this.rest
|
|
200
|
-
.url('/ip_policies/' + arg.id)
|
|
201
|
-
.get()
|
|
202
|
-
.json();
|
|
203
|
-
},
|
|
204
|
-
/** List all IP policies on this account */
|
|
205
|
-
list: function (arg) {
|
|
206
|
-
return _this.rest.url('/ip_policies').get().json();
|
|
207
|
-
},
|
|
208
|
-
/** Update attributes of an IP policy by ID */
|
|
209
|
-
update: function (arg) {
|
|
210
|
-
return _this.rest
|
|
211
|
-
.url('/ip_policies/' + arg.id)
|
|
212
|
-
.patch(arg)
|
|
213
|
-
.json();
|
|
214
|
-
},
|
|
215
|
-
};
|
|
216
|
-
this.IPPolicyRules = {
|
|
217
|
-
/** Create a new IP policy rule attached to an IP Policy. */
|
|
218
|
-
create: function (arg) {
|
|
219
|
-
return _this.rest.url('/ip_policy_rules').post(arg).json();
|
|
220
|
-
},
|
|
221
|
-
/** Delete an IP policy rule. */
|
|
222
|
-
delete: function (arg) {
|
|
223
|
-
return _this.rest
|
|
224
|
-
.url('/ip_policy_rules/' + arg.id)
|
|
225
|
-
.delete()
|
|
226
|
-
.json();
|
|
227
|
-
},
|
|
228
|
-
/** Get detailed information about an IP policy rule by ID. */
|
|
229
|
-
get: function (arg) {
|
|
230
|
-
return _this.rest
|
|
231
|
-
.url('/ip_policy_rules/' + arg.id)
|
|
232
|
-
.get()
|
|
233
|
-
.json();
|
|
234
|
-
},
|
|
235
|
-
/** List all IP policy rules on this account */
|
|
236
|
-
list: function (arg) {
|
|
237
|
-
return _this.rest.url('/ip_policy_rules').get().json();
|
|
238
|
-
},
|
|
239
|
-
/** Update attributes of an IP policy rule by ID */
|
|
240
|
-
update: function (arg) {
|
|
241
|
-
return _this.rest
|
|
242
|
-
.url('/ip_policy_rules/' + arg.id)
|
|
243
|
-
.patch(arg)
|
|
244
|
-
.json();
|
|
245
|
-
},
|
|
246
|
-
};
|
|
247
|
-
this.IPRestrictions = {
|
|
248
|
-
/** Create a new IP restriction */
|
|
249
|
-
create: function (arg) {
|
|
250
|
-
return _this.rest.url('/ip_restrictions').post(arg).json();
|
|
251
|
-
},
|
|
252
|
-
/** Delete an IP restriction */
|
|
253
|
-
delete: function (arg) {
|
|
254
|
-
return _this.rest
|
|
255
|
-
.url('/ip_restrictions/' + arg.id)
|
|
256
|
-
.delete()
|
|
257
|
-
.json();
|
|
258
|
-
},
|
|
259
|
-
/** Get detailed information about an IP restriction */
|
|
260
|
-
get: function (arg) {
|
|
261
|
-
return _this.rest
|
|
262
|
-
.url('/ip_restrictions/' + arg.id)
|
|
263
|
-
.get()
|
|
264
|
-
.json();
|
|
265
|
-
},
|
|
266
|
-
/** List all IP restrictions on this account */
|
|
267
|
-
list: function (arg) {
|
|
268
|
-
return _this.rest.url('/ip_restrictions').get().json();
|
|
269
|
-
},
|
|
270
|
-
/** Update attributes of an IP restriction by ID */
|
|
271
|
-
update: function (arg) {
|
|
272
|
-
return _this.rest
|
|
273
|
-
.url('/ip_restrictions/' + arg.id)
|
|
274
|
-
.patch(arg)
|
|
275
|
-
.json();
|
|
276
|
-
},
|
|
277
|
-
};
|
|
278
|
-
this.IPWhitelist = {
|
|
279
|
-
/** Create a new IP whitelist entry that will restrict traffic to all tunnel endpoints on the account. */
|
|
280
|
-
create: function (arg) {
|
|
281
|
-
return _this.rest.url('/ip_whitelist').post(arg).json();
|
|
282
|
-
},
|
|
283
|
-
/** Delete an IP whitelist entry. */
|
|
284
|
-
delete: function (arg) {
|
|
285
|
-
return _this.rest
|
|
286
|
-
.url('/ip_whitelist/' + arg.id)
|
|
287
|
-
.delete()
|
|
288
|
-
.json();
|
|
289
|
-
},
|
|
290
|
-
/** Get detailed information about an IP whitelist entry by ID. */
|
|
291
|
-
get: function (arg) {
|
|
292
|
-
return _this.rest
|
|
293
|
-
.url('/ip_whitelist/' + arg.id)
|
|
294
|
-
.get()
|
|
295
|
-
.json();
|
|
296
|
-
},
|
|
297
|
-
/** List all IP whitelist entries on this account */
|
|
298
|
-
list: function (arg) {
|
|
299
|
-
return _this.rest.url('/ip_whitelist').get().json();
|
|
300
|
-
},
|
|
301
|
-
/** Update attributes of an IP whitelist entry by ID */
|
|
302
|
-
update: function (arg) {
|
|
303
|
-
return _this.rest
|
|
304
|
-
.url('/ip_whitelist/' + arg.id)
|
|
305
|
-
.patch(arg)
|
|
306
|
-
.json();
|
|
307
|
-
},
|
|
308
|
-
};
|
|
309
|
-
this.EndpointConfigurations = {
|
|
310
|
-
/** Create a new endpoint configuration */
|
|
311
|
-
create: function (arg) {
|
|
312
|
-
return _this.rest.url('/endpoint_configurations').post(arg).json();
|
|
313
|
-
},
|
|
314
|
-
/** Delete an endpoint configuration. This operation will fail if the endpoint configuration is still referenced by any reserved domain or reserved address. */
|
|
315
|
-
delete: function (arg) {
|
|
316
|
-
return _this.rest
|
|
317
|
-
.url('/endpoint_configurations/' + arg.id)
|
|
318
|
-
.delete()
|
|
319
|
-
.json();
|
|
320
|
-
},
|
|
321
|
-
/** Returns detailed information about an endpoint configuration */
|
|
322
|
-
get: function (arg) {
|
|
323
|
-
return _this.rest
|
|
324
|
-
.url('/endpoint_configurations/' + arg.id)
|
|
325
|
-
.get()
|
|
326
|
-
.json();
|
|
327
|
-
},
|
|
328
|
-
/** Returns a list of all endpoint configurations on this account */
|
|
329
|
-
list: function (arg) {
|
|
330
|
-
return _this.rest.url('/endpoint_configurations').get().json();
|
|
331
|
-
},
|
|
332
|
-
/** Updates an endpoint configuration. 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. */
|
|
333
|
-
update: function (arg) {
|
|
334
|
-
return _this.rest
|
|
335
|
-
.url('/endpoint_configurations/' + arg.id)
|
|
336
|
-
.patch(arg)
|
|
337
|
-
.json();
|
|
338
|
-
},
|
|
339
|
-
};
|
|
340
|
-
this.EndpointLoggingModule = {
|
|
341
|
-
replace: function (arg) {
|
|
342
|
-
return _this.rest
|
|
343
|
-
.url('/endpoint_configurations/' + arg.id + '/logging')
|
|
344
|
-
.put(arg)
|
|
345
|
-
.json();
|
|
346
|
-
},
|
|
347
|
-
get: function (arg) {
|
|
348
|
-
return _this.rest
|
|
349
|
-
.url('/endpoint_configurations/' + arg.id + '/logging')
|
|
350
|
-
.get()
|
|
351
|
-
.json();
|
|
352
|
-
},
|
|
353
|
-
delete: function (arg) {
|
|
354
|
-
return _this.rest
|
|
355
|
-
.url('/endpoint_configurations/' + arg.id + '/logging')
|
|
356
|
-
.delete()
|
|
357
|
-
.json();
|
|
358
|
-
},
|
|
359
|
-
};
|
|
360
|
-
this.EndpointCircuitBreakerModule = {
|
|
361
|
-
replace: function (arg) {
|
|
362
|
-
return _this.rest
|
|
363
|
-
.url('/endpoint_configurations/' + arg.id + '/circuit_breaker')
|
|
364
|
-
.put(arg)
|
|
365
|
-
.json();
|
|
366
|
-
},
|
|
367
|
-
get: function (arg) {
|
|
368
|
-
return _this.rest
|
|
369
|
-
.url('/endpoint_configurations/' + arg.id + '/circuit_breaker')
|
|
370
|
-
.get()
|
|
371
|
-
.json();
|
|
372
|
-
},
|
|
373
|
-
delete: function (arg) {
|
|
374
|
-
return _this.rest
|
|
375
|
-
.url('/endpoint_configurations/' + arg.id + '/circuit_breaker')
|
|
376
|
-
.delete()
|
|
377
|
-
.json();
|
|
378
|
-
},
|
|
379
|
-
};
|
|
380
|
-
this.EndpointCompressionModule = {
|
|
381
|
-
replace: function (arg) {
|
|
382
|
-
return _this.rest
|
|
383
|
-
.url('/endpoint_configurations/' + arg.id + '/compression')
|
|
384
|
-
.put(arg)
|
|
385
|
-
.json();
|
|
386
|
-
},
|
|
387
|
-
get: function (arg) {
|
|
388
|
-
return _this.rest
|
|
389
|
-
.url('/endpoint_configurations/' + arg.id + '/compression')
|
|
390
|
-
.get()
|
|
391
|
-
.json();
|
|
392
|
-
},
|
|
393
|
-
delete: function (arg) {
|
|
394
|
-
return _this.rest
|
|
395
|
-
.url('/endpoint_configurations/' + arg.id + '/compression')
|
|
396
|
-
.delete()
|
|
397
|
-
.json();
|
|
398
|
-
},
|
|
399
|
-
};
|
|
400
|
-
this.EndpointTLSTerminationModule = {
|
|
401
|
-
replace: function (arg) {
|
|
402
|
-
return _this.rest
|
|
403
|
-
.url('/endpoint_configurations/' + arg.id + '/tls_termination')
|
|
404
|
-
.put(arg)
|
|
405
|
-
.json();
|
|
406
|
-
},
|
|
407
|
-
get: function (arg) {
|
|
408
|
-
return _this.rest
|
|
409
|
-
.url('/endpoint_configurations/' + arg.id + '/tls_termination')
|
|
410
|
-
.get()
|
|
411
|
-
.json();
|
|
412
|
-
},
|
|
413
|
-
delete: function (arg) {
|
|
414
|
-
return _this.rest
|
|
415
|
-
.url('/endpoint_configurations/' + arg.id + '/tls_termination')
|
|
416
|
-
.delete()
|
|
417
|
-
.json();
|
|
418
|
-
},
|
|
419
|
-
};
|
|
420
|
-
this.EndpointIPPolicyModule = {
|
|
421
|
-
replace: function (arg) {
|
|
422
|
-
return _this.rest
|
|
423
|
-
.url('/endpoint_configurations/' + arg.id + '/ip_policy')
|
|
424
|
-
.put(arg)
|
|
425
|
-
.json();
|
|
426
|
-
},
|
|
427
|
-
get: function (arg) {
|
|
428
|
-
return _this.rest
|
|
429
|
-
.url('/endpoint_configurations/' + arg.id + '/ip_policy')
|
|
430
|
-
.get()
|
|
431
|
-
.json();
|
|
432
|
-
},
|
|
433
|
-
delete: function (arg) {
|
|
434
|
-
return _this.rest
|
|
435
|
-
.url('/endpoint_configurations/' + arg.id + '/ip_policy')
|
|
436
|
-
.delete()
|
|
437
|
-
.json();
|
|
438
|
-
},
|
|
439
|
-
};
|
|
440
|
-
this.EndpointMutualTLSModule = {
|
|
441
|
-
replace: function (arg) {
|
|
442
|
-
return _this.rest
|
|
443
|
-
.url('/endpoint_configurations/' + arg.id + '/mutual_tls')
|
|
444
|
-
.put(arg)
|
|
445
|
-
.json();
|
|
446
|
-
},
|
|
447
|
-
get: function (arg) {
|
|
448
|
-
return _this.rest
|
|
449
|
-
.url('/endpoint_configurations/' + arg.id + '/mutual_tls')
|
|
450
|
-
.get()
|
|
451
|
-
.json();
|
|
452
|
-
},
|
|
453
|
-
delete: function (arg) {
|
|
454
|
-
return _this.rest
|
|
455
|
-
.url('/endpoint_configurations/' + arg.id + '/mutual_tls')
|
|
456
|
-
.delete()
|
|
457
|
-
.json();
|
|
458
|
-
},
|
|
459
|
-
};
|
|
460
|
-
this.EndpointRequestHeadersModule = {
|
|
461
|
-
replace: function (arg) {
|
|
462
|
-
return _this.rest
|
|
463
|
-
.url('/endpoint_configurations/' + arg.id + '/request_headers')
|
|
464
|
-
.put(arg)
|
|
465
|
-
.json();
|
|
466
|
-
},
|
|
467
|
-
get: function (arg) {
|
|
468
|
-
return _this.rest
|
|
469
|
-
.url('/endpoint_configurations/' + arg.id + '/request_headers')
|
|
470
|
-
.get()
|
|
471
|
-
.json();
|
|
472
|
-
},
|
|
473
|
-
delete: function (arg) {
|
|
474
|
-
return _this.rest
|
|
475
|
-
.url('/endpoint_configurations/' + arg.id + '/request_headers')
|
|
476
|
-
.delete()
|
|
477
|
-
.json();
|
|
478
|
-
},
|
|
479
|
-
};
|
|
480
|
-
this.EndpointResponseHeadersModule = {
|
|
481
|
-
replace: function (arg) {
|
|
482
|
-
return _this.rest
|
|
483
|
-
.url('/endpoint_configurations/' + arg.id + '/response_headers')
|
|
484
|
-
.put(arg)
|
|
485
|
-
.json();
|
|
486
|
-
},
|
|
487
|
-
get: function (arg) {
|
|
488
|
-
return _this.rest
|
|
489
|
-
.url('/endpoint_configurations/' + arg.id + '/response_headers')
|
|
490
|
-
.get()
|
|
491
|
-
.json();
|
|
492
|
-
},
|
|
493
|
-
delete: function (arg) {
|
|
494
|
-
return _this.rest
|
|
495
|
-
.url('/endpoint_configurations/' + arg.id + '/response_headers')
|
|
496
|
-
.delete()
|
|
497
|
-
.json();
|
|
498
|
-
},
|
|
499
|
-
};
|
|
500
|
-
this.EndpointOAuthModule = {
|
|
501
|
-
replace: function (arg) {
|
|
502
|
-
return _this.rest
|
|
503
|
-
.url('/endpoint_configurations/' + arg.id + '/oauth')
|
|
504
|
-
.put(arg)
|
|
505
|
-
.json();
|
|
506
|
-
},
|
|
507
|
-
get: function (arg) {
|
|
508
|
-
return _this.rest
|
|
509
|
-
.url('/endpoint_configurations/' + arg.id + '/oauth')
|
|
510
|
-
.get()
|
|
511
|
-
.json();
|
|
512
|
-
},
|
|
513
|
-
delete: function (arg) {
|
|
514
|
-
return _this.rest
|
|
515
|
-
.url('/endpoint_configurations/' + arg.id + '/oauth')
|
|
516
|
-
.delete()
|
|
517
|
-
.json();
|
|
518
|
-
},
|
|
519
|
-
};
|
|
520
|
-
this.EndpointWebhookValidationModule = {
|
|
521
|
-
replace: function (arg) {
|
|
522
|
-
return _this.rest
|
|
523
|
-
.url('/endpoint_configurations/' + arg.id + '/webhook_validation')
|
|
524
|
-
.put(arg)
|
|
525
|
-
.json();
|
|
526
|
-
},
|
|
527
|
-
get: function (arg) {
|
|
528
|
-
return _this.rest
|
|
529
|
-
.url('/endpoint_configurations/' + arg.id + '/webhook_validation')
|
|
530
|
-
.get()
|
|
531
|
-
.json();
|
|
532
|
-
},
|
|
533
|
-
delete: function (arg) {
|
|
534
|
-
return _this.rest
|
|
535
|
-
.url('/endpoint_configurations/' + arg.id + '/webhook_validation')
|
|
536
|
-
.delete()
|
|
537
|
-
.json();
|
|
538
|
-
},
|
|
539
|
-
};
|
|
540
|
-
this.EndpointSAMLModule = {
|
|
541
|
-
replace: function (arg) {
|
|
542
|
-
return _this.rest
|
|
543
|
-
.url('/endpoint_configurations/' + arg.id + '/saml')
|
|
544
|
-
.put(arg)
|
|
545
|
-
.json();
|
|
546
|
-
},
|
|
547
|
-
get: function (arg) {
|
|
548
|
-
return _this.rest
|
|
549
|
-
.url('/endpoint_configurations/' + arg.id + '/saml')
|
|
550
|
-
.get()
|
|
551
|
-
.json();
|
|
552
|
-
},
|
|
553
|
-
delete: function (arg) {
|
|
554
|
-
return _this.rest
|
|
555
|
-
.url('/endpoint_configurations/' + arg.id + '/saml')
|
|
556
|
-
.delete()
|
|
557
|
-
.json();
|
|
558
|
-
},
|
|
559
|
-
};
|
|
560
|
-
this.EndpointOIDCModule = {
|
|
561
|
-
replace: function (arg) {
|
|
562
|
-
return _this.rest
|
|
563
|
-
.url('/endpoint_configurations/' + arg.id + '/oidc')
|
|
564
|
-
.put(arg)
|
|
565
|
-
.json();
|
|
566
|
-
},
|
|
567
|
-
get: function (arg) {
|
|
568
|
-
return _this.rest
|
|
569
|
-
.url('/endpoint_configurations/' + arg.id + '/oidc')
|
|
570
|
-
.get()
|
|
571
|
-
.json();
|
|
572
|
-
},
|
|
573
|
-
delete: function (arg) {
|
|
574
|
-
return _this.rest
|
|
575
|
-
.url('/endpoint_configurations/' + arg.id + '/oidc')
|
|
576
|
-
.delete()
|
|
577
|
-
.json();
|
|
578
|
-
},
|
|
579
|
-
};
|
|
580
|
-
this.ReservedAddrs = {
|
|
581
|
-
/** Create a new reserved address. */
|
|
582
|
-
create: function (arg) {
|
|
583
|
-
return _this.rest.url('/reserved_addrs').post(arg).json();
|
|
584
|
-
},
|
|
585
|
-
/** Delete a reserved address. */
|
|
586
|
-
delete: function (arg) {
|
|
587
|
-
return _this.rest
|
|
588
|
-
.url('/reserved_addrs/' + arg.id)
|
|
589
|
-
.delete()
|
|
590
|
-
.json();
|
|
591
|
-
},
|
|
592
|
-
/** Get the details of a reserved address. */
|
|
593
|
-
get: function (arg) {
|
|
594
|
-
return _this.rest
|
|
595
|
-
.url('/reserved_addrs/' + arg.id)
|
|
596
|
-
.get()
|
|
597
|
-
.json();
|
|
598
|
-
},
|
|
599
|
-
/** List all reserved addresses on this account. */
|
|
600
|
-
list: function (arg) {
|
|
601
|
-
return _this.rest.url('/reserved_addrs').get().json();
|
|
602
|
-
},
|
|
603
|
-
/** Update the attributes of a reserved address. */
|
|
604
|
-
update: function (arg) {
|
|
605
|
-
return _this.rest
|
|
606
|
-
.url('/reserved_addrs/' + arg.id)
|
|
607
|
-
.patch(arg)
|
|
608
|
-
.json();
|
|
609
|
-
},
|
|
610
|
-
/** Detach the endpoint configuration attached to a reserved address. */
|
|
611
|
-
deleteEndpointConfig: function (arg) {
|
|
612
|
-
return _this.rest
|
|
613
|
-
.url('/reserved_addrs/' + arg.id + '/endpoint_configuration')
|
|
614
|
-
.delete()
|
|
615
|
-
.json();
|
|
616
|
-
},
|
|
617
|
-
};
|
|
618
|
-
this.ReservedDomains = {
|
|
619
|
-
/** Create a new reserved domain. */
|
|
620
|
-
create: function (arg) {
|
|
621
|
-
return _this.rest.url('/reserved_domains').post(arg).json();
|
|
622
|
-
},
|
|
623
|
-
/** Delete a reserved domain. */
|
|
624
|
-
delete: function (arg) {
|
|
625
|
-
return _this.rest
|
|
626
|
-
.url('/reserved_domains/' + arg.id)
|
|
627
|
-
.delete()
|
|
628
|
-
.json();
|
|
629
|
-
},
|
|
630
|
-
/** Get the details of a reserved domain. */
|
|
631
|
-
get: function (arg) {
|
|
632
|
-
return _this.rest
|
|
633
|
-
.url('/reserved_domains/' + arg.id)
|
|
634
|
-
.get()
|
|
635
|
-
.json();
|
|
636
|
-
},
|
|
637
|
-
/** List all reserved domains on this account. */
|
|
638
|
-
list: function (arg) {
|
|
639
|
-
return _this.rest.url('/reserved_domains').get().json();
|
|
640
|
-
},
|
|
641
|
-
/** Update the attributes of a reserved domain. */
|
|
642
|
-
update: function (arg) {
|
|
643
|
-
return _this.rest
|
|
644
|
-
.url('/reserved_domains/' + arg.id)
|
|
645
|
-
.patch(arg)
|
|
646
|
-
.json();
|
|
647
|
-
},
|
|
648
|
-
/** Detach the certificate management policy attached to a reserved domain. */
|
|
649
|
-
deleteCertificateManagementPolicy: function (arg) {
|
|
650
|
-
return _this.rest
|
|
651
|
-
.url('/reserved_domains/' + arg.id + '/certificate_management_policy')
|
|
652
|
-
.delete()
|
|
653
|
-
.json();
|
|
654
|
-
},
|
|
655
|
-
/** Detach the certificate attached to a reserved domain. */
|
|
656
|
-
deleteCertificate: function (arg) {
|
|
657
|
-
return _this.rest
|
|
658
|
-
.url('/reserved_domains/' + arg.id + '/certificate')
|
|
659
|
-
.delete()
|
|
660
|
-
.json();
|
|
661
|
-
},
|
|
662
|
-
/** Detach the http endpoint configuration attached to a reserved domain. */
|
|
663
|
-
deleteHTTPEndpointConfig: function (arg) {
|
|
664
|
-
return _this.rest
|
|
665
|
-
.url('/reserved_domains/' + arg.id + '/http_endpoint_configuration')
|
|
666
|
-
.delete()
|
|
667
|
-
.json();
|
|
668
|
-
},
|
|
669
|
-
/** Detach the https endpoint configuration attached to a reserved domain. */
|
|
670
|
-
deleteHTTPSEndpointConfig: function (arg) {
|
|
671
|
-
return _this.rest
|
|
672
|
-
.url('/reserved_domains/' + arg.id + '/https_endpoint_configuration')
|
|
673
|
-
.delete()
|
|
674
|
-
.json();
|
|
675
|
-
},
|
|
676
|
-
};
|
|
677
|
-
this.SSHCertificateAuthorities = {
|
|
678
|
-
/** Create a new SSH Certificate Authority */
|
|
679
|
-
create: function (arg) {
|
|
680
|
-
return _this.rest.url('/ssh_certificate_authorities').post(arg).json();
|
|
681
|
-
},
|
|
682
|
-
/** Delete an SSH Certificate Authority */
|
|
683
|
-
delete: function (arg) {
|
|
684
|
-
return _this.rest
|
|
685
|
-
.url('/ssh_certificate_authorities/' + arg.id)
|
|
686
|
-
.delete()
|
|
687
|
-
.json();
|
|
688
|
-
},
|
|
689
|
-
/** Get detailed information about an SSH Certficate Authority */
|
|
690
|
-
get: function (arg) {
|
|
691
|
-
return _this.rest
|
|
692
|
-
.url('/ssh_certificate_authorities/' + arg.id)
|
|
693
|
-
.get()
|
|
694
|
-
.json();
|
|
695
|
-
},
|
|
696
|
-
/** List all SSH Certificate Authorities on this account */
|
|
697
|
-
list: function (arg) {
|
|
698
|
-
return _this.rest.url('/ssh_certificate_authorities').get().json();
|
|
699
|
-
},
|
|
700
|
-
/** Update an SSH Certificate Authority */
|
|
701
|
-
update: function (arg) {
|
|
702
|
-
return _this.rest
|
|
703
|
-
.url('/ssh_certificate_authorities/' + arg.id)
|
|
704
|
-
.patch(arg)
|
|
705
|
-
.json();
|
|
706
|
-
},
|
|
707
|
-
};
|
|
708
|
-
this.SSHCredentials = {
|
|
709
|
-
/** Create a new ssh_credential from an uploaded public SSH key. This ssh credential can be used to start new tunnels via ngrok's SSH gateway. */
|
|
710
|
-
create: function (arg) {
|
|
711
|
-
return _this.rest.url('/ssh_credentials').post(arg).json();
|
|
712
|
-
},
|
|
713
|
-
/** Delete an ssh_credential by ID */
|
|
714
|
-
delete: function (arg) {
|
|
715
|
-
return _this.rest
|
|
716
|
-
.url('/ssh_credentials/' + arg.id)
|
|
717
|
-
.delete()
|
|
718
|
-
.json();
|
|
719
|
-
},
|
|
720
|
-
/** Get detailed information about an ssh_credential */
|
|
721
|
-
get: function (arg) {
|
|
722
|
-
return _this.rest
|
|
723
|
-
.url('/ssh_credentials/' + arg.id)
|
|
724
|
-
.get()
|
|
725
|
-
.json();
|
|
726
|
-
},
|
|
727
|
-
/** List all ssh credentials on this account */
|
|
728
|
-
list: function (arg) {
|
|
729
|
-
return _this.rest.url('/ssh_credentials').get().json();
|
|
730
|
-
},
|
|
731
|
-
/** Update attributes of an ssh_credential by ID */
|
|
732
|
-
update: function (arg) {
|
|
733
|
-
return _this.rest
|
|
734
|
-
.url('/ssh_credentials/' + arg.id)
|
|
735
|
-
.patch(arg)
|
|
736
|
-
.json();
|
|
737
|
-
},
|
|
738
|
-
};
|
|
739
|
-
this.SSHHostCertificates = {
|
|
740
|
-
/** Create a new SSH Host Certificate */
|
|
741
|
-
create: function (arg) {
|
|
742
|
-
return _this.rest.url('/ssh_host_certificates').post(arg).json();
|
|
743
|
-
},
|
|
744
|
-
/** Delete an SSH Host Certificate */
|
|
745
|
-
delete: function (arg) {
|
|
746
|
-
return _this.rest
|
|
747
|
-
.url('/ssh_host_certificates/' + arg.id)
|
|
748
|
-
.delete()
|
|
749
|
-
.json();
|
|
750
|
-
},
|
|
751
|
-
/** Get detailed information about an SSH Host Certficate */
|
|
752
|
-
get: function (arg) {
|
|
753
|
-
return _this.rest
|
|
754
|
-
.url('/ssh_host_certificates/' + arg.id)
|
|
755
|
-
.get()
|
|
756
|
-
.json();
|
|
757
|
-
},
|
|
758
|
-
/** List all SSH Host Certificates issued on this account */
|
|
759
|
-
list: function (arg) {
|
|
760
|
-
return _this.rest.url('/ssh_host_certificates').get().json();
|
|
761
|
-
},
|
|
762
|
-
/** Update an SSH Host Certificate */
|
|
763
|
-
update: function (arg) {
|
|
764
|
-
return _this.rest
|
|
765
|
-
.url('/ssh_host_certificates/' + arg.id)
|
|
766
|
-
.patch(arg)
|
|
767
|
-
.json();
|
|
768
|
-
},
|
|
769
|
-
};
|
|
770
|
-
this.SSHUserCertificates = {
|
|
771
|
-
/** Create a new SSH User Certificate */
|
|
772
|
-
create: function (arg) {
|
|
773
|
-
return _this.rest.url('/ssh_user_certificates').post(arg).json();
|
|
774
|
-
},
|
|
775
|
-
/** Delete an SSH User Certificate */
|
|
776
|
-
delete: function (arg) {
|
|
777
|
-
return _this.rest
|
|
778
|
-
.url('/ssh_user_certificates/' + arg.id)
|
|
779
|
-
.delete()
|
|
780
|
-
.json();
|
|
781
|
-
},
|
|
782
|
-
/** Get detailed information about an SSH User Certficate */
|
|
783
|
-
get: function (arg) {
|
|
784
|
-
return _this.rest
|
|
785
|
-
.url('/ssh_user_certificates/' + arg.id)
|
|
786
|
-
.get()
|
|
787
|
-
.json();
|
|
788
|
-
},
|
|
789
|
-
/** List all SSH User Certificates issued on this account */
|
|
790
|
-
list: function (arg) {
|
|
791
|
-
return _this.rest.url('/ssh_user_certificates').get().json();
|
|
792
|
-
},
|
|
793
|
-
/** Update an SSH User Certificate */
|
|
794
|
-
update: function (arg) {
|
|
795
|
-
return _this.rest
|
|
796
|
-
.url('/ssh_user_certificates/' + arg.id)
|
|
797
|
-
.patch(arg)
|
|
798
|
-
.json();
|
|
799
|
-
},
|
|
800
|
-
};
|
|
801
|
-
this.TLSCertificates = {
|
|
802
|
-
/** Upload a new TLS certificate */
|
|
803
|
-
create: function (arg) {
|
|
804
|
-
return _this.rest.url('/tls_certificates').post(arg).json();
|
|
805
|
-
},
|
|
806
|
-
/** Delete a TLS certificate */
|
|
807
|
-
delete: function (arg) {
|
|
808
|
-
return _this.rest
|
|
809
|
-
.url('/tls_certificates/' + arg.id)
|
|
810
|
-
.delete()
|
|
811
|
-
.json();
|
|
812
|
-
},
|
|
813
|
-
/** Get detailed information about a TLS certificate */
|
|
814
|
-
get: function (arg) {
|
|
815
|
-
return _this.rest
|
|
816
|
-
.url('/tls_certificates/' + arg.id)
|
|
817
|
-
.get()
|
|
818
|
-
.json();
|
|
819
|
-
},
|
|
820
|
-
/** List all TLS certificates on this account */
|
|
821
|
-
list: function (arg) {
|
|
822
|
-
return _this.rest.url('/tls_certificates').get().json();
|
|
823
|
-
},
|
|
824
|
-
/** Update attributes of a TLS Certificate by ID */
|
|
825
|
-
update: function (arg) {
|
|
826
|
-
return _this.rest
|
|
827
|
-
.url('/tls_certificates/' + arg.id)
|
|
828
|
-
.patch(arg)
|
|
829
|
-
.json();
|
|
830
|
-
},
|
|
831
|
-
};
|
|
832
|
-
this.TunnelSessions = {
|
|
833
|
-
/** List all online tunnel sessions running on this account. */
|
|
834
|
-
list: function (arg) {
|
|
835
|
-
return _this.rest.url('/tunnel_sessions').get().json();
|
|
836
|
-
},
|
|
837
|
-
/** Get the detailed status of a tunnel session by ID */
|
|
838
|
-
get: function (arg) {
|
|
839
|
-
return _this.rest
|
|
840
|
-
.url('/tunnel_sessions/' + arg.id)
|
|
841
|
-
.get()
|
|
842
|
-
.json();
|
|
843
|
-
},
|
|
844
|
-
/** 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. */
|
|
845
|
-
restart: function (arg) {
|
|
846
|
-
return _this.rest
|
|
847
|
-
.url('/tunnel_sessions/' + arg.id + '/restart')
|
|
848
|
-
.post(arg)
|
|
849
|
-
.json();
|
|
850
|
-
},
|
|
851
|
-
/** Issues a command instructing the ngrok agent that started this tunnel session to exit. */
|
|
852
|
-
stop: function (arg) {
|
|
853
|
-
return _this.rest
|
|
854
|
-
.url('/tunnel_sessions/' + arg.id + '/stop')
|
|
855
|
-
.post(arg)
|
|
856
|
-
.json();
|
|
857
|
-
},
|
|
858
|
-
/** 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 */
|
|
859
|
-
update: function (arg) {
|
|
860
|
-
return _this.rest
|
|
861
|
-
.url('/tunnel_sessions/' + arg.id + '/update')
|
|
862
|
-
.post(arg)
|
|
863
|
-
.json();
|
|
864
|
-
},
|
|
865
|
-
};
|
|
866
|
-
this.Tunnels = {
|
|
867
|
-
/** List all online tunnels currently running on the account. */
|
|
868
|
-
list: function (arg) {
|
|
869
|
-
return _this.rest.url('/tunnels').get().json();
|
|
870
|
-
},
|
|
871
|
-
};
|
|
872
|
-
this.baseUrl = baseUrl;
|
|
873
|
-
if (apiToken) {
|
|
874
|
-
this.token = apiToken;
|
|
875
|
-
} else {
|
|
876
|
-
throw new Error('Cannot create ngrok client without an API token');
|
|
877
|
-
}
|
|
878
|
-
this.rest = wretch_1
|
|
879
|
-
.default()
|
|
880
|
-
.url(baseUrl)
|
|
881
|
-
.headers({
|
|
882
|
-
'User-Agent': 'ngrok-ts-user-agent',
|
|
883
|
-
'Ngrok-Version': '2',
|
|
884
|
-
})
|
|
885
|
-
.auth('Bearer ' + this.token);
|
|
886
|
-
}
|
|
887
|
-
return Ngrok;
|
|
888
|
-
})();
|
|
889
|
-
exports.Ngrok = Ngrok;
|
|
26
|
+
__exportStar(require('./client'), exports);
|
|
27
|
+
__exportStar(require('./datatypes'), exports);
|
|
890
28
|
//# sourceMappingURL=index.js.map
|