Generated API changes

This commit is contained in:
ngrok-release-bot
2020-12-14 20:07:26 +00:00
parent 9d8e7d4c4a
commit 3f52a7ebb3
8 changed files with 464 additions and 464 deletions
+24 -24
View File
@@ -56,6 +56,30 @@ export declare class Ngrok {
/** Update attributes of an tunnel authtoken credential by ID */
update: (arg: t.CredentialUpdate) => Promise<t.Credential>;
};
EventStreams: {
/** Create a new Event Stream. It will not apply to anything until you associate it with one or more Endpoint Configs. */
create: (arg: t.EventStreamCreate) => Promise<t.EventStream>;
/** Delete an Event Stream. Associated Event Destinations will be preserved. */
delete: (arg: t.Item) => Promise<t.Empty>;
/** Get detailed information about an Event Stream by ID. */
get: (arg: t.Item) => Promise<t.EventStream>;
/** List all Event Streams available on this account. */
list: (arg: t.Page) => Promise<t.EventStreamList>;
/** Update attributes of an Event Stream by ID. */
update: (arg: t.EventStreamUpdate) => Promise<t.EventStream>;
};
EventDestinations: {
/** 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. */
create: (arg: t.EventDestinationCreate) => Promise<t.EventDestination>;
/** 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. */
delete: (arg: t.Item) => Promise<t.Empty>;
/** Get detailed information about an Event Destination by ID. */
get: (arg: t.Item) => Promise<t.EventDestination>;
/** List all Event Destinations on this account. */
list: (arg: t.Page) => Promise<t.EventDestinationList>;
/** Update attributes of an Event Destination. */
update: (arg: t.EventDestinationUpdate) => Promise<t.EventDestination>;
};
IPPolicies: {
/** 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. */
create: (arg: t.IPPolicyCreate) => Promise<t.IPPolicy>;
@@ -104,30 +128,6 @@ export declare class Ngrok {
/** Update attributes of an IP whitelist entry by ID */
update: (arg: t.IPWhitelistEntryUpdate) => Promise<t.IPWhitelistEntry>;
};
LogConfigs: {
/** Create a new Log Config. It will not apply to anything until you associate it with one or more Endpoint Configs. */
create: (arg: t.LogConfigCreate) => Promise<t.LogConfig>;
/** Delete a Log Config. Associated Log Destinations will be preserved. */
delete: (arg: t.Item) => Promise<t.Empty>;
/** Get detailed information about a Log Config by ID. */
get: (arg: t.Item) => Promise<t.LogConfig>;
/** List all Log Configs available on this account. */
list: (arg: t.Page) => Promise<t.LogConfigList>;
/** Update attributes of an Log Config by ID. */
update: (arg: t.LogConfigUpdate) => Promise<t.LogConfig>;
};
LogDestinations: {
/** Create a new Log Destination. It will not apply to anything until it is associated with a Log Config, and that Log Config is associated with an Endpoint Config. */
create: (arg: t.LogDestinationCreate) => Promise<t.LogDestination>;
/** Delete a Log Destination. If the Log Destination is still referenced by a Log Config, this will throw an error until that Log Config has removed that reference. */
delete: (arg: t.Item) => Promise<t.Empty>;
/** Get detailed information about a Log Destination by ID. */
get: (arg: t.Item) => Promise<t.LogDestination>;
/** List all Log Destinations on this account. */
list: (arg: t.Page) => Promise<t.LogDestinationList>;
/** Update attributes of a Log Destination. */
update: (arg: t.LogDestinationUpdate) => Promise<t.LogDestination>;
};
EndpointConfigurations: {
/** Create a new endpoint configuration */
create: (arg: t.EndpointConfigurationCreate) => Promise<t.EndpointConfiguration>;
+44 -44
View File
@@ -88,6 +88,50 @@ var Ngrok = /** @class */ (function () {
return _this.rest.url("/credentials/" + arg.id).patch(arg).json();
},
};
this.EventStreams = {
/** Create a new Event Stream. It will not apply to anything until you associate it with one or more Endpoint Configs. */
create: function (arg) {
return _this.rest.url("/event_streams").post(arg).json();
},
/** Delete an Event Stream. Associated Event Destinations will be preserved. */
delete: function (arg) {
return _this.rest.url("/event_streams/" + arg.id).delete().json();
},
/** Get detailed information about an Event Stream by ID. */
get: function (arg) {
return _this.rest.url("/event_streams/" + arg.id).get().json();
},
/** List all Event Streams available on this account. */
list: function (arg) {
return _this.rest.url("/event_streams").get().json();
},
/** Update attributes of an Event Stream by ID. */
update: function (arg) {
return _this.rest.url("/event_streams/" + arg.id).patch(arg).json();
},
};
this.EventDestinations = {
/** 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. */
create: function (arg) {
return _this.rest.url("/event_destinations").post(arg).json();
},
/** 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. */
delete: function (arg) {
return _this.rest.url("/event_destinations/" + arg.id).delete().json();
},
/** Get detailed information about an Event Destination by ID. */
get: function (arg) {
return _this.rest.url("/event_destinations/" + arg.id).get().json();
},
/** List all Event Destinations on this account. */
list: function (arg) {
return _this.rest.url("/event_destinations").get().json();
},
/** Update attributes of an Event Destination. */
update: function (arg) {
return _this.rest.url("/event_destinations/" + arg.id).patch(arg).json();
},
};
this.IPPolicies = {
/** 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. */
create: function (arg) {
@@ -176,50 +220,6 @@ var Ngrok = /** @class */ (function () {
return _this.rest.url("/ip_whitelist/" + arg.id).patch(arg).json();
},
};
this.LogConfigs = {
/** Create a new Log Config. It will not apply to anything until you associate it with one or more Endpoint Configs. */
create: function (arg) {
return _this.rest.url("/log_configs").post(arg).json();
},
/** Delete a Log Config. Associated Log Destinations will be preserved. */
delete: function (arg) {
return _this.rest.url("/log_configs/" + arg.id).delete().json();
},
/** Get detailed information about a Log Config by ID. */
get: function (arg) {
return _this.rest.url("/log_configs/" + arg.id).get().json();
},
/** List all Log Configs available on this account. */
list: function (arg) {
return _this.rest.url("/log_configs").get().json();
},
/** Update attributes of an Log Config by ID. */
update: function (arg) {
return _this.rest.url("/log_configs/" + arg.id).patch(arg).json();
},
};
this.LogDestinations = {
/** Create a new Log Destination. It will not apply to anything until it is associated with a Log Config, and that Log Config is associated with an Endpoint Config. */
create: function (arg) {
return _this.rest.url("/log_destinations").post(arg).json();
},
/** Delete a Log Destination. If the Log Destination is still referenced by a Log Config, this will throw an error until that Log Config has removed that reference. */
delete: function (arg) {
return _this.rest.url("/log_destinations/" + arg.id).delete().json();
},
/** Get detailed information about a Log Destination by ID. */
get: function (arg) {
return _this.rest.url("/log_destinations/" + arg.id).get().json();
},
/** List all Log Destinations on this account. */
list: function (arg) {
return _this.rest.url("/log_destinations").get().json();
},
/** Update attributes of a Log Destination. */
update: function (arg) {
return _this.rest.url("/log_destinations/" + arg.id).patch(arg).json();
},
};
this.EndpointConfigurations = {
/** Create a new endpoint configuration */
create: function (arg) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+170 -170
View File
@@ -171,6 +171,172 @@ export interface CredentialList {
/** URI of the next page, or null if there is no next page */
next_page_uri?: string;
}
export interface EventStreamCreate {
/** Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Event Stream. Optional, max 255 bytes. */
description: string;
/** A list of protocol-specific fields you want to collect on each event. */
fields: Array<string>;
/** The protocol that determines which events will be collected. Supported values are <code>tcp_connection_closed</code> and <code>http_request_complete</code>. */
event_type: string;
/** A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination. */
destination_ids: Array<string>;
/** The percentage of all events you would like to capture. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate: number;
}
export interface EventStreamUpdate {
/** Unique identifier for this Event Stream. */
id: string;
/** Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes. */
metadata?: string;
/** Human-readable description of the Event Stream. Optional, max 255 bytes. */
description?: string;
/** A list of protocol-specific fields you want to collect on each event. */
fields?: Array<string>;
/** A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination. */
destination_ids?: Array<string>;
/** The percentage of all events you would like to capture. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate?: number;
}
export interface EventStreamList {
/** The list of all Event Streams on this account. */
event_streams: Array<EventStream>;
/** URI of the Event Stream list API resource. */
uri: string;
/** URI of the next page, or null if there is no next page. */
next_page_uri?: string;
}
export interface EventStream {
/** Unique identifier for this Event Stream. */
id: string;
/** URI of the Event Stream API resource. */
uri: string;
/** Timestamp when the Event Stream was created, RFC 3339 format. */
created_at: string;
/** Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Event Stream. Optional, max 255 bytes. */
description: string;
/** A list of protocol-specific fields you want to collect on each event. */
fields: Array<string>;
/** The protocol that determines which events will be collected. Supported values are <code>tcp_connection_closed</code> and <code>http_request_complete</code>. */
event_type: string;
/** A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination. */
destination_ids: Array<string>;
/** The percentage of all events you would like to capture. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate: number;
}
export interface EventDestinationCreate {
/** Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Event Destination. Optional, max 255 bytes. */
description: string;
/** The output format you would like to serialize events into when sending to their target. Currently the only accepted value is <code>JSON</code>. */
format: string;
/** An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch_logs</code>, or <code>s3</code>. */
target: EventTarget;
}
export interface EventDestinationUpdate {
/** Unique identifier for this Event Destination. */
id: string;
/** Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. */
metadata?: string;
/** Human-readable description of the Event Destination. Optional, max 255 bytes. */
description?: string;
/** The output format you would like to serialize events into when sending to their target. Currently the only accepted value is <code>JSON</code>. */
format?: string;
/** An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch_logs</code>, or <code>s3</code>. */
target?: EventTarget;
}
export interface EventDestination {
/** Unique identifier for this Event Destination. */
id: string;
/** Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. */
metadata: string;
/** Timestamp when the Event Destination was created, RFC 3339 format. */
created_at: string;
/** Human-readable description of the Event Destination. Optional, max 255 bytes. */
description: string;
/** The output format you would like to serialize events into when sending to their target. Currently the only accepted value is <code>JSON</code>. */
format: string;
/** An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch_logs</code>, or <code>s3</code>. */
target: EventTarget;
/** URI of the Event Destination API resource. */
uri: string;
}
export interface EventDestinationList {
/** The list of all Event Destinations on this account. */
event_destinations: Array<EventDestination>;
/** URI of the Event Destinations list API resource. */
uri: string;
/** URI of the next page, or null if there is no next page. */
next_page_uri?: string;
}
export interface EventTarget {
/** Configuration used to send events to Amazon Kinesis Data Firehose. */
firehose?: EventTargetFirehose;
/** Configuration used to send events to Amazon Kinesis. */
kinesis?: EventTargetKinesis;
/** Configuration used to send events to Amazon CloudWatch Logs. */
cloudwatch_logs?: EventTargetCloudwatchLogs;
/** Configuration used for internal debugging. */
debug?: EventTargetDebug;
}
export interface EventTargetFirehose {
/** Configuration for how to authenticate into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the Firehose delivery stream to deposit events into. */
delivery_stream_arn: string;
}
export interface EventTargetKinesis {
/** Configuration for how to authenticate into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the Kinesis stream to deposit events into. */
stream_arn: string;
}
export interface EventTargetCloudwatchLogs {
/** Configuration for how to authenticate into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into. */
log_group_arn: string;
}
export interface EventTargetS3 {
/** Configuration for how to authenticate into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the S3 bucket to deposit events into. */
bucket_arn: string;
/** An optional prefix to prepend to S3 object keys. */
object_prefix: string;
/** Whether or not to compress files with gzip. */
compression: boolean;
/** How many bytes we should accumulate into a single file before sending to S3. */
max_file_size: number;
/** How many seconds we should batch up events before sending them to S3. */
max_file_age: number;
}
export interface EventTargetDebug {
/** Whether or not to output to publisher service logs. */
log: boolean;
/** URL to send events to. */
callback_url: string;
}
export interface AWSAuth {
/** A role for ngrok to assume on your behalf to deposit events into your AWS account. */
role?: AWSRole;
/** Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys. */
creds?: AWSCredentials;
}
export interface AWSRole {
/** An ARN that specifies the role that ngrok should use to deliver to the configured target. */
role_arn: string;
}
export interface AWSCredentials {
/** The ID portion of an AWS access key. */
aws_access_key_id: string;
/** The secret portion of an AWS access key. */
aws_secret_access_key?: string;
}
export interface IPPolicyCreate {
/** human-readable description of the source IPs of this IP policy. optional, max 255 bytes. */
description: string;
@@ -337,172 +503,6 @@ export interface IPWhitelistEntryList {
/** URI of the next page, or null if there is no next page */
next_page_uri?: string;
}
export interface LogConfigCreate {
/** Arbitrary user-defined machine-readable data of this Log Config. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Log Config. Optional, max 255 bytes. */
description: string;
/** A list of protocol-specific fields you want to collect on each logging event. */
fields: Array<string>;
/** The protocol that determines which events can be logged. Supported values are <code>tcp_connection_closed</code> and <code>http_request_complete</code>. */
event_type: string;
/** A list of Log Destination ids which should be applied to this Log Config. Log Configs are required to have at least one Log Destination. */
destination_ids: Array<string>;
/** The percentage of all events you would like to log. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate: number;
}
export interface LogConfigUpdate {
/** Unique identifier for this Log Config. */
id: string;
/** Arbitrary user-defined machine-readable data of this Log Config. Optional, max 4096 bytes. */
metadata?: string;
/** Human-readable description of the Log Config. Optional, max 255 bytes. */
description?: string;
/** A list of protocol-specific fields you want to collect on each logging event. */
fields?: Array<string>;
/** A list of Log Destination ids which should be applied to this Log Config. Log Configs are required to have at least one Log Destination. */
destination_ids?: Array<string>;
/** The percentage of all events you would like to log. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate?: number;
}
export interface LogConfigList {
/** The list of all Log Configs on this account. */
log_configs: Array<LogConfig>;
/** URI of the Log Config list API resource. */
uri: string;
/** URI of the next page, or null if there is no next page. */
next_page_uri?: string;
}
export interface LogConfig {
/** Unique identifier for this Log Config. */
id: string;
/** URI of the Log Config API resource. */
uri: string;
/** Timestamp when the Log Config was created, RFC 3339 format. */
created_at: string;
/** Arbitrary user-defined machine-readable data of this Log Config. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Log Config. Optional, max 255 bytes. */
description: string;
/** A list of protocol-specific fields you want to collect on each logging event. */
fields: Array<string>;
/** The protocol that determines which events can be logged. Supported values are <code>tcp_connection_closed</code> and <code>http_request_complete</code>. */
event_type: string;
/** A list of Log Destination ids which should be applied to this Log Config. Log Configs are required to have at least one Log Destination. */
destination_ids: Array<string>;
/** The percentage of all events you would like to log. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate: number;
}
export interface LogDestinationCreate {
/** Arbitrary user-defined machine-readable data of this Log Destination. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Log Destination. Optional, max 255 bytes. */
description: string;
/** The output format you would like to serialize your logs into before they post to their target. Currently the only accepted value is <code>JSON</code>. */
format: string;
/** An object that encapsulates where and how to send your logs to their ultimate destination. A log destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch</code>, or <code>S3</code>. */
target: LogDestinationTarget;
}
export interface LogDestinationUpdate {
/** Unique identifier for this Log Destination. */
id: string;
/** Arbitrary user-defined machine-readable data of this Log Destination. Optional, max 4096 bytes. */
metadata?: string;
/** Human-readable description of the Log Destination. Optional, max 255 bytes. */
description?: string;
/** The output format you would like to serialize your logs into before they post to their target. Currently the only accepted value is <code>JSON</code>. */
format?: string;
/** An object that encapsulates where and how to send your logs to their ultimate destination. A log destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch</code>, or <code>S3</code>. */
target?: LogDestinationTarget;
}
export interface LogDestination {
/** Unique identifier for this Log Destination. */
id: string;
/** Arbitrary user-defined machine-readable data of this Log Destination. Optional, max 4096 bytes. */
metadata: string;
/** Timestamp when the Log Destination was created, RFC 3339 format. */
created_at: string;
/** Human-readable description of the Log Destination. Optional, max 255 bytes. */
description: string;
/** The output format you would like to serialize your logs into before they post to their target. Currently the only accepted value is <code>JSON</code>. */
format: string;
/** An object that encapsulates where and how to send your logs to their ultimate destination. A log destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch</code>, or <code>S3</code>. */
target: LogDestinationTarget;
/** URI of the Log Destination API resource. */
uri: string;
}
export interface LogDestinationList {
/** The list of all Log Destinations on this account. */
log_destinations: Array<LogDestination>;
/** URI of the Log Destinations list API resource. */
uri: string;
/** URI of the next page, or null if there is no next page. */
next_page_uri?: string;
}
export interface LogDestinationTarget {
/** Configuration used to stream logs to Amazon Kinesis Data Firehose. */
firehose?: Firehose;
/** Configuration used to stream logs to Amazon Kinesis. */
kinesis?: Kinesis;
/** Configuration used to send logs to Amazon CloudWatch Logs. */
cloudwatch?: Cloudwatch;
/** Configuration used for internal debugging. */
debug?: EventTargetDebug;
}
export interface Firehose {
/** Configuration authentication into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the Firehose delivery stream to deposit logs into. */
delivery_stream_arn: string;
}
export interface Kinesis {
/** Configuration authentication into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the Kinesis stream to deposit logs into. */
stream_arn: string;
}
export interface Cloudwatch {
/** Configuration authentication into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the CloudWatch Logs group to deposit logs with. */
log_group_arn: string;
}
export interface S3 {
/** Configuration authentication into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the S3 bucket to post logs into. */
bucket_arn: string;
/** An optional prefix to prepend to S3 object keys. */
object_prefix: string;
/** Whether or not to compress log files with gzip. */
compression: boolean;
/** How large in bytes we should accumulate logs before sending them to S3. */
max_file_size: number;
/** The maximum age in seconds we should accumulate logs before sending them to S3. */
max_file_age: number;
}
export interface EventTargetDebug {
/** Whether or not to output to publisher service logs. */
log: boolean;
/** Url to send events to. */
callback_url: string;
}
export interface AWSAuth {
/** A role for ngrok to assume on your behalf to deposit logs into your AWS account. */
role?: AWSRole;
/** Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys. */
creds?: AWSCredentials;
}
export interface AWSRole {
/** An arn that describes a role that ngrok can assume and use to post to the configured target. */
arn: string;
}
export interface AWSCredentials {
/** The ID portion of an AWS access key. */
aws_access_key_id: string;
/** The secret portion of an AWS access key. */
aws_secret_access_key?: string;
}
export interface EndpointConfiguration {
/** unique identifier of this endpoint configuration */
id: string;
@@ -664,14 +664,14 @@ export interface EndpointBasicAuth {
export interface EndpointLogging {
/** <code>true</code> if the module will be applied to traffic, <code>false</code> to disable. default <code>true</code> if unspecified */
enabled?: boolean;
/** list of all LogConfigs that will be used to configure and export this endpoint's logs */
log_configs: Array<Ref>;
/** list of all EventStreams that will be used to configure and export this endpoint's logs */
event_streams: Array<Ref>;
}
export interface EndpointLoggingMutate {
/** <code>true</code> if the module will be applied to traffic, <code>false</code> to disable. default <code>true</code> if unspecified */
enabled?: boolean;
/** list of all LogConfigs that will be used to configure and export this endpoint's logs */
log_config_ids: Array<string>;
/** list of all EventStreams that will be used to configure and export this endpoint's logs */
event_stream_ids: Array<string>;
}
export interface EndpointRequestHeaders {
/** <code>true</code> if the module will be applied to traffic, <code>false</code> to disable. default <code>true</code> if unspecified */
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ngrok/rest",
"version": "0.0.5",
"version": "0.0.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ngrok/rest",
"version": "0.0.5",
"version": "0.0.6",
"main": "lib/index",
"types": "lib/types",
"scripts": {
+36 -36
View File
@@ -101,6 +101,42 @@ export class Ngrok {
this.rest.url(`/credentials/${arg.id}`).patch(arg).json(),
}
EventStreams = {
/** Create a new Event Stream. It will not apply to anything until you associate it with one or more Endpoint Configs. */
create: (arg: t.EventStreamCreate): Promise<t.EventStream> =>
this.rest.url(`/event_streams`).post(arg).json(),
/** Delete an Event Stream. Associated Event Destinations will be preserved. */
delete: (arg: t.Item): Promise<t.Empty> =>
this.rest.url(`/event_streams/${arg.id}`).delete().json(),
/** Get detailed information about an Event Stream by ID. */
get: (arg: t.Item): Promise<t.EventStream> =>
this.rest.url(`/event_streams/${arg.id}`).get().json(),
/** List all Event Streams available on this account. */
list: (arg: t.Page): Promise<t.EventStreamList> =>
this.rest.url(`/event_streams`).get().json(),
/** Update attributes of an Event Stream by ID. */
update: (arg: t.EventStreamUpdate): Promise<t.EventStream> =>
this.rest.url(`/event_streams/${arg.id}`).patch(arg).json(),
}
EventDestinations = {
/** 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. */
create: (arg: t.EventDestinationCreate): Promise<t.EventDestination> =>
this.rest.url(`/event_destinations`).post(arg).json(),
/** 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. */
delete: (arg: t.Item): Promise<t.Empty> =>
this.rest.url(`/event_destinations/${arg.id}`).delete().json(),
/** Get detailed information about an Event Destination by ID. */
get: (arg: t.Item): Promise<t.EventDestination> =>
this.rest.url(`/event_destinations/${arg.id}`).get().json(),
/** List all Event Destinations on this account. */
list: (arg: t.Page): Promise<t.EventDestinationList> =>
this.rest.url(`/event_destinations`).get().json(),
/** Update attributes of an Event Destination. */
update: (arg: t.EventDestinationUpdate): Promise<t.EventDestination> =>
this.rest.url(`/event_destinations/${arg.id}`).patch(arg).json(),
}
IPPolicies = {
/** 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. */
create: (arg: t.IPPolicyCreate): Promise<t.IPPolicy> =>
@@ -173,42 +209,6 @@ export class Ngrok {
this.rest.url(`/ip_whitelist/${arg.id}`).patch(arg).json(),
}
LogConfigs = {
/** Create a new Log Config. It will not apply to anything until you associate it with one or more Endpoint Configs. */
create: (arg: t.LogConfigCreate): Promise<t.LogConfig> =>
this.rest.url(`/log_configs`).post(arg).json(),
/** Delete a Log Config. Associated Log Destinations will be preserved. */
delete: (arg: t.Item): Promise<t.Empty> =>
this.rest.url(`/log_configs/${arg.id}`).delete().json(),
/** Get detailed information about a Log Config by ID. */
get: (arg: t.Item): Promise<t.LogConfig> =>
this.rest.url(`/log_configs/${arg.id}`).get().json(),
/** List all Log Configs available on this account. */
list: (arg: t.Page): Promise<t.LogConfigList> =>
this.rest.url(`/log_configs`).get().json(),
/** Update attributes of an Log Config by ID. */
update: (arg: t.LogConfigUpdate): Promise<t.LogConfig> =>
this.rest.url(`/log_configs/${arg.id}`).patch(arg).json(),
}
LogDestinations = {
/** Create a new Log Destination. It will not apply to anything until it is associated with a Log Config, and that Log Config is associated with an Endpoint Config. */
create: (arg: t.LogDestinationCreate): Promise<t.LogDestination> =>
this.rest.url(`/log_destinations`).post(arg).json(),
/** Delete a Log Destination. If the Log Destination is still referenced by a Log Config, this will throw an error until that Log Config has removed that reference. */
delete: (arg: t.Item): Promise<t.Empty> =>
this.rest.url(`/log_destinations/${arg.id}`).delete().json(),
/** Get detailed information about a Log Destination by ID. */
get: (arg: t.Item): Promise<t.LogDestination> =>
this.rest.url(`/log_destinations/${arg.id}`).get().json(),
/** List all Log Destinations on this account. */
list: (arg: t.Page): Promise<t.LogDestinationList> =>
this.rest.url(`/log_destinations`).get().json(),
/** Update attributes of a Log Destination. */
update: (arg: t.LogDestinationUpdate): Promise<t.LogDestination> =>
this.rest.url(`/log_destinations/${arg.id}`).patch(arg).json(),
}
EndpointConfigurations = {
/** Create a new endpoint configuration */
create: (arg: t.EndpointConfigurationCreate): Promise<t.EndpointConfiguration> =>
+187 -187
View File
@@ -192,6 +192,189 @@ export interface CredentialList {
next_page_uri?: string;
}
export interface EventStreamCreate {
/** Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Event Stream. Optional, max 255 bytes. */
description: string;
/** A list of protocol-specific fields you want to collect on each event. */
fields: Array<string>;
/** The protocol that determines which events will be collected. Supported values are <code>tcp_connection_closed</code> and <code>http_request_complete</code>. */
event_type: string;
/** A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination. */
destination_ids: Array<string>;
/** The percentage of all events you would like to capture. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate: number;
}
export interface EventStreamUpdate {
/** Unique identifier for this Event Stream. */
id: string;
/** Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes. */
metadata?: string;
/** Human-readable description of the Event Stream. Optional, max 255 bytes. */
description?: string;
/** A list of protocol-specific fields you want to collect on each event. */
fields?: Array<string>;
/** A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination. */
destination_ids?: Array<string>;
/** The percentage of all events you would like to capture. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate?: number;
}
export interface EventStreamList {
/** The list of all Event Streams on this account. */
event_streams: Array<EventStream>;
/** URI of the Event Stream list API resource. */
uri: string;
/** URI of the next page, or null if there is no next page. */
next_page_uri?: string;
}
export interface EventStream {
/** Unique identifier for this Event Stream. */
id: string;
/** URI of the Event Stream API resource. */
uri: string;
/** Timestamp when the Event Stream was created, RFC 3339 format. */
created_at: string;
/** Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Event Stream. Optional, max 255 bytes. */
description: string;
/** A list of protocol-specific fields you want to collect on each event. */
fields: Array<string>;
/** The protocol that determines which events will be collected. Supported values are <code>tcp_connection_closed</code> and <code>http_request_complete</code>. */
event_type: string;
/** A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination. */
destination_ids: Array<string>;
/** The percentage of all events you would like to capture. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate: number;
}
export interface EventDestinationCreate {
/** Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Event Destination. Optional, max 255 bytes. */
description: string;
/** The output format you would like to serialize events into when sending to their target. Currently the only accepted value is <code>JSON</code>. */
format: string;
/** An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch_logs</code>, or <code>s3</code>. */
target: EventTarget;
}
export interface EventDestinationUpdate {
/** Unique identifier for this Event Destination. */
id: string;
/** Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. */
metadata?: string;
/** Human-readable description of the Event Destination. Optional, max 255 bytes. */
description?: string;
/** The output format you would like to serialize events into when sending to their target. Currently the only accepted value is <code>JSON</code>. */
format?: string;
/** An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch_logs</code>, or <code>s3</code>. */
target?: EventTarget;
}
export interface EventDestination {
/** Unique identifier for this Event Destination. */
id: string;
/** Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes. */
metadata: string;
/** Timestamp when the Event Destination was created, RFC 3339 format. */
created_at: string;
/** Human-readable description of the Event Destination. Optional, max 255 bytes. */
description: string;
/** The output format you would like to serialize events into when sending to their target. Currently the only accepted value is <code>JSON</code>. */
format: string;
/** An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch_logs</code>, or <code>s3</code>. */
target: EventTarget;
/** URI of the Event Destination API resource. */
uri: string;
}
export interface EventDestinationList {
/** The list of all Event Destinations on this account. */
event_destinations: Array<EventDestination>;
/** URI of the Event Destinations list API resource. */
uri: string;
/** URI of the next page, or null if there is no next page. */
next_page_uri?: string;
}
export interface EventTarget {
/** Configuration used to send events to Amazon Kinesis Data Firehose. */
firehose?: EventTargetFirehose;
/** Configuration used to send events to Amazon Kinesis. */
kinesis?: EventTargetKinesis;
/** Configuration used to send events to Amazon CloudWatch Logs. */
cloudwatch_logs?: EventTargetCloudwatchLogs;
/** Configuration used for internal debugging. */
debug?: EventTargetDebug;
}
export interface EventTargetFirehose {
/** Configuration for how to authenticate into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the Firehose delivery stream to deposit events into. */
delivery_stream_arn: string;
}
export interface EventTargetKinesis {
/** Configuration for how to authenticate into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the Kinesis stream to deposit events into. */
stream_arn: string;
}
export interface EventTargetCloudwatchLogs {
/** Configuration for how to authenticate into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into. */
log_group_arn: string;
}
export interface EventTargetS3 {
/** Configuration for how to authenticate into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the S3 bucket to deposit events into. */
bucket_arn: string;
/** An optional prefix to prepend to S3 object keys. */
object_prefix: string;
/** Whether or not to compress files with gzip. */
compression: boolean;
/** How many bytes we should accumulate into a single file before sending to S3. */
max_file_size: number;
/** How many seconds we should batch up events before sending them to S3. */
max_file_age: number;
}
export interface EventTargetDebug {
/** Whether or not to output to publisher service logs. */
log: boolean;
/** URL to send events to. */
callback_url: string;
}
export interface AWSAuth {
/** A role for ngrok to assume on your behalf to deposit events into your AWS account. */
role?: AWSRole;
/** Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys. */
creds?: AWSCredentials;
}
export interface AWSRole {
/** An ARN that specifies the role that ngrok should use to deliver to the configured target. */
role_arn: string;
}
export interface AWSCredentials {
/** The ID portion of an AWS access key. */
aws_access_key_id: string;
/** The secret portion of an AWS access key. */
aws_secret_access_key?: string;
}
export interface IPPolicyCreate {
/** human-readable description of the source IPs of this IP policy. optional, max 255 bytes. */
description: string;
@@ -374,189 +557,6 @@ export interface IPWhitelistEntryList {
next_page_uri?: string;
}
export interface LogConfigCreate {
/** Arbitrary user-defined machine-readable data of this Log Config. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Log Config. Optional, max 255 bytes. */
description: string;
/** A list of protocol-specific fields you want to collect on each logging event. */
fields: Array<string>;
/** The protocol that determines which events can be logged. Supported values are <code>tcp_connection_closed</code> and <code>http_request_complete</code>. */
event_type: string;
/** A list of Log Destination ids which should be applied to this Log Config. Log Configs are required to have at least one Log Destination. */
destination_ids: Array<string>;
/** The percentage of all events you would like to log. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate: number;
}
export interface LogConfigUpdate {
/** Unique identifier for this Log Config. */
id: string;
/** Arbitrary user-defined machine-readable data of this Log Config. Optional, max 4096 bytes. */
metadata?: string;
/** Human-readable description of the Log Config. Optional, max 255 bytes. */
description?: string;
/** A list of protocol-specific fields you want to collect on each logging event. */
fields?: Array<string>;
/** A list of Log Destination ids which should be applied to this Log Config. Log Configs are required to have at least one Log Destination. */
destination_ids?: Array<string>;
/** The percentage of all events you would like to log. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate?: number;
}
export interface LogConfigList {
/** The list of all Log Configs on this account. */
log_configs: Array<LogConfig>;
/** URI of the Log Config list API resource. */
uri: string;
/** URI of the next page, or null if there is no next page. */
next_page_uri?: string;
}
export interface LogConfig {
/** Unique identifier for this Log Config. */
id: string;
/** URI of the Log Config API resource. */
uri: string;
/** Timestamp when the Log Config was created, RFC 3339 format. */
created_at: string;
/** Arbitrary user-defined machine-readable data of this Log Config. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Log Config. Optional, max 255 bytes. */
description: string;
/** A list of protocol-specific fields you want to collect on each logging event. */
fields: Array<string>;
/** The protocol that determines which events can be logged. Supported values are <code>tcp_connection_closed</code> and <code>http_request_complete</code>. */
event_type: string;
/** A list of Log Destination ids which should be applied to this Log Config. Log Configs are required to have at least one Log Destination. */
destination_ids: Array<string>;
/** The percentage of all events you would like to log. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events. */
sampling_rate: number;
}
export interface LogDestinationCreate {
/** Arbitrary user-defined machine-readable data of this Log Destination. Optional, max 4096 bytes. */
metadata: string;
/** Human-readable description of the Log Destination. Optional, max 255 bytes. */
description: string;
/** The output format you would like to serialize your logs into before they post to their target. Currently the only accepted value is <code>JSON</code>. */
format: string;
/** An object that encapsulates where and how to send your logs to their ultimate destination. A log destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch</code>, or <code>S3</code>. */
target: LogDestinationTarget;
}
export interface LogDestinationUpdate {
/** Unique identifier for this Log Destination. */
id: string;
/** Arbitrary user-defined machine-readable data of this Log Destination. Optional, max 4096 bytes. */
metadata?: string;
/** Human-readable description of the Log Destination. Optional, max 255 bytes. */
description?: string;
/** The output format you would like to serialize your logs into before they post to their target. Currently the only accepted value is <code>JSON</code>. */
format?: string;
/** An object that encapsulates where and how to send your logs to their ultimate destination. A log destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch</code>, or <code>S3</code>. */
target?: LogDestinationTarget;
}
export interface LogDestination {
/** Unique identifier for this Log Destination. */
id: string;
/** Arbitrary user-defined machine-readable data of this Log Destination. Optional, max 4096 bytes. */
metadata: string;
/** Timestamp when the Log Destination was created, RFC 3339 format. */
created_at: string;
/** Human-readable description of the Log Destination. Optional, max 255 bytes. */
description: string;
/** The output format you would like to serialize your logs into before they post to their target. Currently the only accepted value is <code>JSON</code>. */
format: string;
/** An object that encapsulates where and how to send your logs to their ultimate destination. A log destination must contain exactly one of the following objects, leaving the rest null: <code>kinesis</code>, <code>firehose</code>, <code>cloudwatch</code>, or <code>S3</code>. */
target: LogDestinationTarget;
/** URI of the Log Destination API resource. */
uri: string;
}
export interface LogDestinationList {
/** The list of all Log Destinations on this account. */
log_destinations: Array<LogDestination>;
/** URI of the Log Destinations list API resource. */
uri: string;
/** URI of the next page, or null if there is no next page. */
next_page_uri?: string;
}
export interface LogDestinationTarget {
/** Configuration used to stream logs to Amazon Kinesis Data Firehose. */
firehose?: Firehose;
/** Configuration used to stream logs to Amazon Kinesis. */
kinesis?: Kinesis;
/** Configuration used to send logs to Amazon CloudWatch Logs. */
cloudwatch?: Cloudwatch;
/** Configuration used for internal debugging. */
debug?: EventTargetDebug;
}
export interface Firehose {
/** Configuration authentication into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the Firehose delivery stream to deposit logs into. */
delivery_stream_arn: string;
}
export interface Kinesis {
/** Configuration authentication into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the Kinesis stream to deposit logs into. */
stream_arn: string;
}
export interface Cloudwatch {
/** Configuration authentication into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the CloudWatch Logs group to deposit logs with. */
log_group_arn: string;
}
export interface S3 {
/** Configuration authentication into your AWS account. Exactly one of <code>role</code> or <code>creds</code> should be configured. */
auth: AWSAuth;
/** An Amazon Resource Name specifying the S3 bucket to post logs into. */
bucket_arn: string;
/** An optional prefix to prepend to S3 object keys. */
object_prefix: string;
/** Whether or not to compress log files with gzip. */
compression: boolean;
/** How large in bytes we should accumulate logs before sending them to S3. */
max_file_size: number;
/** The maximum age in seconds we should accumulate logs before sending them to S3. */
max_file_age: number;
}
export interface EventTargetDebug {
/** Whether or not to output to publisher service logs. */
log: boolean;
/** Url to send events to. */
callback_url: string;
}
export interface AWSAuth {
/** A role for ngrok to assume on your behalf to deposit logs into your AWS account. */
role?: AWSRole;
/** Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys. */
creds?: AWSCredentials;
}
export interface AWSRole {
/** An arn that describes a role that ngrok can assume and use to post to the configured target. */
arn: string;
}
export interface AWSCredentials {
/** The ID portion of an AWS access key. */
aws_access_key_id: string;
/** The secret portion of an AWS access key. */
aws_secret_access_key?: string;
}
export interface EndpointConfiguration {
/** unique identifier of this endpoint configuration */
id: string;
@@ -728,15 +728,15 @@ export interface EndpointBasicAuth {
export interface EndpointLogging {
/** <code>true</code> if the module will be applied to traffic, <code>false</code> to disable. default <code>true</code> if unspecified */
enabled?: boolean;
/** list of all LogConfigs that will be used to configure and export this endpoint's logs */
log_configs: Array<Ref>;
/** list of all EventStreams that will be used to configure and export this endpoint's logs */
event_streams: Array<Ref>;
}
export interface EndpointLoggingMutate {
/** <code>true</code> if the module will be applied to traffic, <code>false</code> to disable. default <code>true</code> if unspecified */
enabled?: boolean;
/** list of all LogConfigs that will be used to configure and export this endpoint's logs */
log_config_ids: Array<string>;
/** list of all EventStreams that will be used to configure and export this endpoint's logs */
event_stream_ids: Array<string>;
}
export interface EndpointRequestHeaders {