@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/.eslintrc.js
CHANGED
|
@@ -21,8 +21,11 @@ module.exports = {
|
|
|
21
21
|
"jest"
|
|
22
22
|
],
|
|
23
23
|
"rules": {
|
|
24
|
+
"no-fallthrough": "warn",
|
|
25
|
+
"no-undef": "warn",
|
|
26
|
+
"no-unsafe-finally": "warn",
|
|
24
27
|
"@typescript-eslint/no-empty-interface": "warn",
|
|
25
28
|
"@typescript-eslint/no-this-alias": "warn",
|
|
26
|
-
"@typescript-eslint/no-var-requires": "warn"
|
|
29
|
+
"@typescript-eslint/no-var-requires": "warn",
|
|
27
30
|
}
|
|
28
31
|
};
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
## 0.2.0 (July 14, 2021)
|
|
2
|
+
|
|
3
|
+
ENHANCEMENTS:
|
|
4
|
+
|
|
5
|
+
* Restructure to use classes instead of embedded objects
|
|
6
|
+
* Added support for namespaces to avoid clutter
|
|
7
|
+
* Rewrote README explaining async usage, error handling, and more examples
|
|
8
|
+
* Run tests against mock or actual API
|
|
9
|
+
* Improved Typedoc generated documentation
|
|
10
|
+
|
|
11
|
+
FIXES:
|
|
12
|
+
|
|
13
|
+
* Use the correct naming convention for TypeScript properties
|
|
14
|
+
* Use Markdown instead of plain text for Typedoc
|
|
15
|
+
* Use Promise when a method returns no result instead of an empty object
|
|
16
|
+
|
|
17
|
+
## 0.1.0 (June 18, 2021)
|
|
18
|
+
|
|
19
|
+
ENHANCEMENTS:
|
|
20
|
+
|
|
21
|
+
* List iterators supporting automatic paging
|
|
22
|
+
* Generate TypeScript documentation
|
|
23
|
+
|
|
24
|
+
## 0.0.11 (June 8, 2021)
|
|
25
|
+
|
|
26
|
+
FIXES:
|
|
27
|
+
|
|
28
|
+
* Fix missing Ngrok module
|
|
29
|
+
* Fix Map type JSON serialization
|
|
30
|
+
|
|
31
|
+
ENHANCEMENTS:
|
|
32
|
+
|
|
33
|
+
* Refine error messages to an Error type
|
|
34
|
+
* Add a CHANGELOG and an example usage
|
package/README.md
CHANGED
|
@@ -1,3 +1,149 @@
|
|
|
1
|
-
|
|
1
|
+
## ngrok API client library for JavaScript and TypeScript
|
|
2
2
|
|
|
3
|
-
[ngrok
|
|
3
|
+
This library wraps the [ngrok HTTP API](https://ngrok.com/docs/api) to make it
|
|
4
|
+
easier to consume in JavaScript or TypeScript.
|
|
5
|
+
|
|
6
|
+
### Installation
|
|
7
|
+
|
|
8
|
+
The published library is available on
|
|
9
|
+
[npm](https://www.npmjs.com/package/@ngrok/ngrok-api).
|
|
10
|
+
|
|
11
|
+
```shell
|
|
12
|
+
npm install @ngrok/ngrok-api
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Documentation
|
|
16
|
+
|
|
17
|
+
A quickstart guide and a full API reference are included in the [ngrok
|
|
18
|
+
TypeScript API documentation](https://typescript-api.docs.ngrok.com)
|
|
19
|
+
|
|
20
|
+
### Quickstart
|
|
21
|
+
|
|
22
|
+
After you've installed the package, you'll need an API Key. Create one on the
|
|
23
|
+
[API Keys page of your ngrok dashboard](https://dashboard.ngrok.com/api/keys).
|
|
24
|
+
|
|
25
|
+
In your application's code, initialize an `Ngrok` client object with an API
|
|
26
|
+
key. API resources can be accessed as properties of the `Ngrok` object.
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { Ngrok } from '@ngrok/ngrok-api';
|
|
30
|
+
|
|
31
|
+
const ngrok = new Ngrok({
|
|
32
|
+
apiToken: '<API KEY>',
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const domain = await ngrok.domains.create({
|
|
36
|
+
name: 'your-name.ngrok.io'
|
|
37
|
+
})
|
|
38
|
+
console.log(domain);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Automatic Paging
|
|
42
|
+
|
|
43
|
+
The ngrok API pages all list resources but this library abstracts that
|
|
44
|
+
implementation detail away from you. `list()` methods will return collections
|
|
45
|
+
that can be iterated over and the implementation will fetch the pages from the
|
|
46
|
+
API for you behind the scenes.
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { Ngrok } from '@ngrok/ngrok-api';
|
|
50
|
+
|
|
51
|
+
const ngrok = new Ngrok({
|
|
52
|
+
apiToken: '<API KEY>',
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
(await ngrok.tunnels.list()).forEach(t => console.log(t));
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Async Programming
|
|
59
|
+
|
|
60
|
+
All API methods return a `Promise` and are suitable for use in asynchronous
|
|
61
|
+
programming. You can use callback chaining with `.then()` and `.catch()` syntax
|
|
62
|
+
or the `await` keyword to wait for completion of an API call.
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
// await style
|
|
67
|
+
const cred = await ngrok.credentials.create({description: "example"});
|
|
68
|
+
console.log(cred);
|
|
69
|
+
|
|
70
|
+
// callback chaining
|
|
71
|
+
ngrok.credentials.create({description: "example"}).then((cred => {
|
|
72
|
+
console.log(cred)
|
|
73
|
+
}));
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Error Handling
|
|
77
|
+
|
|
78
|
+
The ngrok API returns detailed information when an API call fails. If an error
|
|
79
|
+
is encountered, API methods throw the rich `Error` type on resolution of a
|
|
80
|
+
returned `Promise`. This allows your code to gracefully handle different error
|
|
81
|
+
conditions.
|
|
82
|
+
|
|
83
|
+
The `Error` type includes a `statusCode` property which can be used to
|
|
84
|
+
distinguish not found errors when a resource does not exist:
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
|
|
88
|
+
import { Error } from '@ngrok/ngrok-api';
|
|
89
|
+
|
|
90
|
+
try {
|
|
91
|
+
await ngrok.ipPolicies.update({
|
|
92
|
+
id: 'someInvalidId',
|
|
93
|
+
description: 'updated description',
|
|
94
|
+
})
|
|
95
|
+
} catch (err: Error) {
|
|
96
|
+
if (err.statusCode == 404) {
|
|
97
|
+
console.log('no ip policy with that id to update')
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Every error returned by the ngrok API includes a [unique, documented error
|
|
103
|
+
code](https://ngrok.com/docs/errors) that you can use to distinguish unique
|
|
104
|
+
error conditions. Use the `errorCode` property in your application code to
|
|
105
|
+
handle handle different error conditions.
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
import { Error } from '@ngrok/ngrok-api';
|
|
109
|
+
|
|
110
|
+
try {
|
|
111
|
+
await ngrok.ipPolicies.create({
|
|
112
|
+
action: 'something invalid',
|
|
113
|
+
})
|
|
114
|
+
} catch (err: Error) {
|
|
115
|
+
if (err.errorCode == "ERR_NGROK_1410") {
|
|
116
|
+
console.log('not a valid ip policy action')
|
|
117
|
+
} else {
|
|
118
|
+
console.log('some other error', err)
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Additional Examples
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
import { EndpointConfiguration, Error, Ngrok } from '@ngrok/ngrok-api';
|
|
127
|
+
|
|
128
|
+
const ngrok = new Ngrok({
|
|
129
|
+
apiToken: 'an api token',
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
ngrok.endpointConfigurations.create({
|
|
133
|
+
type: 'https',
|
|
134
|
+
description: 'some endpoint configuration description',
|
|
135
|
+
metadata: 'some endpoint configuration metadata',
|
|
136
|
+
requestHeaders: {
|
|
137
|
+
add: new Map([
|
|
138
|
+
['x-frontend', 'ngrok']
|
|
139
|
+
]),
|
|
140
|
+
remove: ['cache-control'],
|
|
141
|
+
},
|
|
142
|
+
})
|
|
143
|
+
.then((epc: EndpointConfiguration) => {
|
|
144
|
+
console.log(epc);
|
|
145
|
+
})
|
|
146
|
+
.catch((err: Error) => {
|
|
147
|
+
console.log(err);
|
|
148
|
+
});
|
|
149
|
+
```
|
package/docs/CNAME
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
typescript-api.docs.ngrok.com
|