Skip to content

Commit

Permalink
Generated v4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jun 27, 2023
1 parent cc1fa91 commit b6249aa
Show file tree
Hide file tree
Showing 688 changed files with 1,420 additions and 771 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [v4.3.0](https://github.com/fastly/fastly-js/releases/tag/release/v4.3.0) (2023-06-27)

**Enhancements:**

- feat(rate_limiter): implement POST/PUT endpoints.

**Bug fixes:**

- fix(automation_tokens): generate explicit error response type.
- fix(historical_stats): extract primitive into custom type.

## [v4.2.2](https://github.com/fastly/fastly-js/releases/tag/release/v4.2.2) (2023-06-23)

**Bug fixes:**
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,11 @@ Class | Method | Description
*Fastly.PurgeApi* | [**purgeAll**](docs/PurgeApi.md#purgeAll) | Purge everything from a service
*Fastly.PurgeApi* | [**purgeSingleUrl**](docs/PurgeApi.md#purgeSingleUrl) | Purge a URL
*Fastly.PurgeApi* | [**purgeTag**](docs/PurgeApi.md#purgeTag) | Purge by surrogate key tag
*Fastly.RateLimiterApi* | [**createRateLimiter**](docs/RateLimiterApi.md#createRateLimiter) | Create a rate limiter
*Fastly.RateLimiterApi* | [**deleteRateLimiter**](docs/RateLimiterApi.md#deleteRateLimiter) | Delete a rate limiter
*Fastly.RateLimiterApi* | [**getRateLimiter**](docs/RateLimiterApi.md#getRateLimiter) | Get a rate limiter
*Fastly.RateLimiterApi* | [**listRateLimiters**](docs/RateLimiterApi.md#listRateLimiters) | List rate limiters
*Fastly.RateLimiterApi* | [**updateRateLimiter**](docs/RateLimiterApi.md#updateRateLimiter) | Update a rate limiter
*Fastly.RealtimeApi* | [**getStatsLast120Seconds**](docs/RealtimeApi.md#getStatsLast120Seconds) | Get real-time data for the last 120 seconds
*Fastly.RealtimeApi* | [**getStatsLast120SecondsLimitEntries**](docs/RealtimeApi.md#getStatsLast120SecondsLimitEntries) | Get a limited number of real-time data entries
*Fastly.RealtimeApi* | [**getStatsLastSecond**](docs/RealtimeApi.md#getStatsLastSecond) | Get real-time data from specified time
Expand Down Expand Up @@ -485,7 +487,6 @@ The fastly-js API client currently does not support the following endpoints:
- [`/customer/{customer_id}/contacts`](https://developer.fastly.com/reference/api/account/contact) (POST)
- [`/metrics/domains/services/{service_id}`](https://developer.fastly.com/reference/api/metrics-stats/domain-inspector/historical) (GET)
- [`/metrics/origins/services/{service_id}`](https://developer.fastly.com/reference/api/metrics-stats/origin-inspector/historical) (GET)
- [`/rate-limiters/{rate_limiter_id}`](https://developer.fastly.com/reference/api/vcl-services/rate-limiter) (PUT)
- [`/resources/stores/secret/client-key`](https://developer.fastly.com/reference/api/services/resources/secret-store) (POST)
- [`/resources/stores/secret/signing-key`](https://developer.fastly.com/reference/api/services/resources/secret-store) (GET)
- [`/resources/stores/secret/{store_id}/secrets/{secret_name}`](https://developer.fastly.com/reference/api/services/resources/secret) (DELETE, GET)
Expand All @@ -507,7 +508,6 @@ The fastly-js API client currently does not support the following endpoints:
- [`/service/{service_id}/version/{version_id}/generated_vcl`](https://developer.fastly.com/reference/api/vcl-services/vcl) (GET)
- [`/service/{service_id}/version/{version_id}/logging/kafka/{logging_kafka_name}`](https://developer.fastly.com/reference/api/logging/kafka) (PUT)
- [`/service/{service_id}/version/{version_id}/logging/kinesis/{logging_kinesis_name}`](https://developer.fastly.com/reference/api/logging/kinesis) (PUT)
- [`/service/{service_id}/version/{version_id}/rate-limiters`](https://developer.fastly.com/reference/api/vcl-services/rate-limiter) (POST)
- [`/service/{service_id}/version/{version_id}/request_settings`](https://developer.fastly.com/reference/api/vcl-services/request-settings) (POST)
- [`/service/{service_id}/version/{version_id}/response_object/{response_object_name}`](https://developer.fastly.com/reference/api/vcl-services/response-object) (PUT)
- [`/service/{service_id}/version/{version_id}/response_object`](https://developer.fastly.com/reference/api/vcl-services/response-object) (POST)
Expand Down
6 changes: 3 additions & 3 deletions docs/AutomationTokenCreateResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Name | Type | Description | Notes
**created_at** | **Date** | A UTC time-stamp of when the token was created. | [optional] [readonly]
**deleted_at** | **Date** | Date and time in ISO 8601 format. | [optional] [readonly]
**updated_at** | **Date** | Date and time in ISO 8601 format. | [optional] [readonly]
**id** | **String** | | [optional] [readonly]
**user_id** | **String** | | [optional] [readonly]
**customer_id** | **String** | | [optional] [readonly]
**id** | [**ReadOnlyId**](ReadOnlyId.md) | | [optional]
**user_id** | [**ReadOnlyUserId**](ReadOnlyUserId.md) | | [optional]
**customer_id** | [**ReadOnlyCustomerId**](ReadOnlyCustomerId.md) | | [optional]
**sudo_expires_at** | **Date** | | [optional] [readonly]
**access_token** | **String** | | [optional] [readonly]
**last_used_at** | **Date** | A UTC time-stamp of when the token was last used. | [optional] [readonly]
Expand Down
6 changes: 3 additions & 3 deletions docs/AutomationTokenCreateResponseAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [readonly]
**user_id** | **String** | | [optional] [readonly]
**customer_id** | **String** | | [optional] [readonly]
**id** | [**ReadOnlyId**](ReadOnlyId.md) | | [optional]
**user_id** | [**ReadOnlyUserId**](ReadOnlyUserId.md) | | [optional]
**customer_id** | [**ReadOnlyCustomerId**](ReadOnlyCustomerId.md) | | [optional]
**sudo_expires_at** | **Date** | | [optional] [readonly]
**created_at** | **Date** | A UTC time-stamp of when the token was created. | [optional] [readonly]
**access_token** | **String** | | [optional] [readonly]
Expand Down
4 changes: 2 additions & 2 deletions docs/AutomationTokenResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Name | Type | Description | Notes
**created_at** | **String** | A UTC time-stamp of when the token was created. | [optional]
**deleted_at** | **Date** | Date and time in ISO 8601 format. | [optional] [readonly]
**updated_at** | **Date** | Date and time in ISO 8601 format. | [optional] [readonly]
**id** | **String** | | [optional] [readonly]
**customer_id** | **String** | | [optional] [readonly]
**id** | [**ReadOnlyId**](ReadOnlyId.md) | | [optional]
**customer_id** | [**ReadOnlyCustomerId**](ReadOnlyCustomerId.md) | | [optional]
**ip** | **String** | The IP address of the client that last used the token. | [optional]
**user_agent** | **String** | The User-Agent header of the client that last used the token. | [optional]
**sudo_expires_at** | **String** | | [optional] [readonly]
Expand Down
4 changes: 2 additions & 2 deletions docs/AutomationTokenResponseAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [readonly]
**customer_id** | **String** | | [optional] [readonly]
**id** | [**ReadOnlyId**](ReadOnlyId.md) | | [optional]
**customer_id** | [**ReadOnlyCustomerId**](ReadOnlyCustomerId.md) | | [optional]
**role** | **String** | | [optional]
**ip** | **String** | The IP address of the client that last used the token. | [optional]
**user_agent** | **String** | The User-Agent header of the client that last used the token. | [optional]
Expand Down
6 changes: 3 additions & 3 deletions docs/AutomationTokensApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ const options = {
};

apiInstance.revokeAutomationTokenId(options)
.then(() => {
console.log('API called successfully.');
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
Expand All @@ -192,7 +192,7 @@ Name | Type | Description | Notes

### Return type

null (empty response body)
[**ErrorResponse**](ErrorResponse.md)


[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
Expand Down
13 changes: 13 additions & 0 deletions docs/ErrorResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Fastly.ErrorResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**detail** | **String** | | [optional]
**errors** | **[Object]** | | [optional]
**status** | **Number** | | [optional]
**title** | **String** | | [optional]


[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/HistoricalFieldResultsAttributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Name | Type | Description | Notes
**ddos_action_tarpit** | **Number** | The number of times the tarpit action was taken. The tarpit action delays writing the response to the client. | [optional]
**ddos_action_close** | **Number** | The number of times the close action was taken. The close action aborts the connection as soon as possible. The close action takes effect either right after accept, right after the client hello, or right after the response was sent. | [optional]
**ddos_action_blackhole** | **Number** | The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). | [optional]
**service_id** | **String** | | [optional] [readonly]
**service_id** | [**ReadOnlyIdService**](ReadOnlyIdService.md) | | [optional]
**start_time** | **Number** | | [optional]


Expand Down
2 changes: 1 addition & 1 deletion docs/HistoricalFieldResultsAttributesAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**service_id** | **String** | | [optional] [readonly]
**service_id** | [**ReadOnlyIdService**](ReadOnlyIdService.md) | | [optional]
**start_time** | **Number** | | [optional]


Expand Down
2 changes: 1 addition & 1 deletion docs/RateLimiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Name | Type | Description | Notes
**client_key** | **[String]** | Array of VCL variables used to generate a counter key to identify a client. Example variables include `req.http.Fastly-Client-IP`, `req.http.User-Agent`, or a custom header like `req.http.API-Key`. | [optional]
**penalty_box_duration** | **Number** | Length of time in minutes that the rate limiter is in effect after the initial violation is detected. | [optional]
**action** | **String** | The action to take when a rate limiter violation is detected. | [optional] [one of: "response", "response_object", "log_only"]
**response** | [**RateLimiterResponse1**](RateLimiterResponse1.md) | | [optional]
**response** | **{String: String}** | Custom response to be sent when the rate limit is exceeded. Required if `action` is `response`. | [optional]
**response_object_name** | **String** | Name of existing response object. Required if `action` is `response_object`. Note that the rate limiter response is only updated to reflect the response object content when saving the rate limiter configuration. | [optional]
**logger_type** | **String** | Name of the type of logging endpoint to be used when action is `log_only`. The logging endpoint type is used to determine the appropriate log format to use when emitting log entries. | [optional] [one of: "azureblob", "bigquery", "cloudfiles", "datadog", "digitalocean", "elasticsearch", "ftp", "gcs", "googleanalytics", "heroku", "honeycomb", "http", "https", "kafka", "kinesis", "logentries", "loggly", "logshuttle", "newrelic", "openstack", "papertrail", "pubsub", "s3", "scalyr", "sftp", "splunk", "stackdriver", "sumologic", "syslog"]
**feature_revision** | **Number** | Revision number of the rate limiting feature implementation. Defaults to the most recent revision. | [optional]
Expand Down
118 changes: 118 additions & 0 deletions docs/RateLimiterApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,70 @@ const apiInstance = new Fastly.RateLimiterApi();

Method | Fastly API endpoint | Description
------------- | ------------- | -------------
[**createRateLimiter**](RateLimiterApi.md#createRateLimiter) | **POST** /service/{service_id}/version/{version_id}/rate-limiters | Create a rate limiter
[**deleteRateLimiter**](RateLimiterApi.md#deleteRateLimiter) | **DELETE** /rate-limiters/{rate_limiter_id} | Delete a rate limiter
[**getRateLimiter**](RateLimiterApi.md#getRateLimiter) | **GET** /rate-limiters/{rate_limiter_id} | Get a rate limiter
[**listRateLimiters**](RateLimiterApi.md#listRateLimiters) | **GET** /service/{service_id}/version/{version_id}/rate-limiters | List rate limiters
[**updateRateLimiter**](RateLimiterApi.md#updateRateLimiter) | **PUT** /rate-limiters/{rate_limiter_id} | Update a rate limiter


## `createRateLimiter`

```javascript
createRateLimiter({ service_id, version_id, [name, ][uri_dictionary_name, ][http_methods, ][rps_limit, ][window_size, ][client_key, ][penalty_box_duration, ][action, ][response_object_name, ][logger_type, ][feature_revision] })
```

Create a rate limiter for a particular service and version.

### Example

```javascript
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
name: "name_example",
uri_dictionary_name: "uri_dictionary_name_example",
http_methods: "HEAD",
rps_limit: 56,
window_size: 1,
client_key: ["null"],
penalty_box_duration: 56,
action: "response",
response_object_name: "response_object_name_example",
logger_type: "azureblob",
feature_revision: 56,
};

apiInstance.createRateLimiter(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
```

### Options

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**service_id** | **String** | Alphanumeric string identifying the service. |
**version_id** | **Number** | Integer identifying a service version. |
**name** | **String** | A human readable name for the rate limiting rule. | [optional]
**uri_dictionary_name** | **String** | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional]
**http_methods** | [**[String]**](String.md) | Array of HTTP methods to apply rate limiting to. | [optional] [one of: "HEAD", "OPTIONS", "GET", "POST", "PUT", "PATCH", "DELETE", "TRACE"]
**rps_limit** | **Number** | Upper limit of requests per second allowed by the rate limiter. | [optional]
**window_size** | **Number** | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. | [optional] [one of: 1, 10, 60]
**client_key** | [**[String]**](String.md) | Array of VCL variables used to generate a counter key to identify a client. Example variables include `req.http.Fastly-Client-IP`, `req.http.User-Agent`, or a custom header like `req.http.API-Key`. | [optional]
**penalty_box_duration** | **Number** | Length of time in minutes that the rate limiter is in effect after the initial violation is detected. | [optional]
**action** | **String** | The action to take when a rate limiter violation is detected. | [optional] [one of: "response", "response_object", "log_only"]
**response_object_name** | **String** | Name of existing response object. Required if `action` is `response_object`. Note that the rate limiter response is only updated to reflect the response object content when saving the rate limiter configuration. | [optional]
**logger_type** | **String** | Name of the type of logging endpoint to be used when action is `log_only`. The logging endpoint type is used to determine the appropriate log format to use when emitting log entries. | [optional] [one of: "azureblob", "bigquery", "cloudfiles", "datadog", "digitalocean", "elasticsearch", "ftp", "gcs", "googleanalytics", "heroku", "honeycomb", "http", "https", "kafka", "kinesis", "logentries", "loggly", "logshuttle", "newrelic", "openstack", "papertrail", "pubsub", "s3", "scalyr", "sftp", "splunk", "stackdriver", "sumologic", "syslog"]
**feature_revision** | **Number** | Revision number of the rate limiting feature implementation. Defaults to the most recent revision. | [optional]

### Return type

[**RateLimiterResponse**](RateLimiterResponse.md)


## `deleteRateLimiter`
Expand Down Expand Up @@ -119,5 +180,62 @@ Name | Type | Description | Notes
[**[RateLimiterResponse]**](RateLimiterResponse.md)


## `updateRateLimiter`

```javascript
updateRateLimiter({ rate_limiter_id, [name, ][uri_dictionary_name, ][http_methods, ][rps_limit, ][window_size, ][client_key, ][penalty_box_duration, ][action, ][response_object_name, ][logger_type, ][feature_revision] })
```

Update a rate limiter by its ID.

### Example

```javascript
const options = {
rate_limiter_id: "rate_limiter_id_example", // required
name: "name_example",
uri_dictionary_name: "uri_dictionary_name_example",
http_methods: "HEAD",
rps_limit: 56,
window_size: 1,
client_key: ["null"],
penalty_box_duration: 56,
action: "response",
response_object_name: "response_object_name_example",
logger_type: "azureblob",
feature_revision: 56,
};

apiInstance.updateRateLimiter(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
```

### Options

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**rate_limiter_id** | **String** | Alphanumeric string identifying the rate limiter. |
**name** | **String** | A human readable name for the rate limiting rule. | [optional]
**uri_dictionary_name** | **String** | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional]
**http_methods** | [**[String]**](String.md) | Array of HTTP methods to apply rate limiting to. | [optional] [one of: "HEAD", "OPTIONS", "GET", "POST", "PUT", "PATCH", "DELETE", "TRACE"]
**rps_limit** | **Number** | Upper limit of requests per second allowed by the rate limiter. | [optional]
**window_size** | **Number** | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. | [optional] [one of: 1, 10, 60]
**client_key** | [**[String]**](String.md) | Array of VCL variables used to generate a counter key to identify a client. Example variables include `req.http.Fastly-Client-IP`, `req.http.User-Agent`, or a custom header like `req.http.API-Key`. | [optional]
**penalty_box_duration** | **Number** | Length of time in minutes that the rate limiter is in effect after the initial violation is detected. | [optional]
**action** | **String** | The action to take when a rate limiter violation is detected. | [optional] [one of: "response", "response_object", "log_only"]
**response_object_name** | **String** | Name of existing response object. Required if `action` is `response_object`. Note that the rate limiter response is only updated to reflect the response object content when saving the rate limiter configuration. | [optional]
**logger_type** | **String** | Name of the type of logging endpoint to be used when action is `log_only`. The logging endpoint type is used to determine the appropriate log format to use when emitting log entries. | [optional] [one of: "azureblob", "bigquery", "cloudfiles", "datadog", "digitalocean", "elasticsearch", "ftp", "gcs", "googleanalytics", "heroku", "honeycomb", "http", "https", "kafka", "kinesis", "logentries", "loggly", "logshuttle", "newrelic", "openstack", "papertrail", "pubsub", "s3", "scalyr", "sftp", "splunk", "stackdriver", "sumologic", "syslog"]
**feature_revision** | **Number** | Revision number of the rate limiting feature implementation. Defaults to the most recent revision. | [optional]

### Return type

[**RateLimiterResponse**](RateLimiterResponse.md)


[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to README]](../../README.md)
Loading

0 comments on commit b6249aa

Please sign in to comment.