Skip to content

Commit

Permalink
feat(specs): add notification settings to tasks [skip-bc] (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4297

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot and millotp committed Jan 6, 2025
1 parent 4d9b926 commit 68b98ea
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/main/scala/algoliasearch/api/IngestionClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,8 @@ class IngestionClient(
* Destination IDs for filtering the list of tasks.
* @param triggerType
* Type of task trigger for filtering the list of tasks.
* @param withEmailNotifications
* If specified, the response only includes tasks with notifications.email.enabled set to this value.
* @param sort
* Property by which to sort the list of tasks.
* @param order
Expand All @@ -1072,6 +1074,7 @@ class IngestionClient(
sourceType: Option[Seq[SourceType]] = None,
destinationID: Option[Seq[String]] = None,
triggerType: Option[Seq[TriggerType]] = None,
withEmailNotifications: Option[Boolean] = None,
sort: Option[TaskSortKeys] = None,
order: Option[OrderKeys] = None,
requestOptions: Option[RequestOptions] = None
Expand All @@ -1089,6 +1092,7 @@ class IngestionClient(
.withQueryParameter("sourceType", sourceType)
.withQueryParameter("destinationID", destinationID)
.withQueryParameter("triggerType", triggerType)
.withQueryParameter("withEmailNotifications", withEmailNotifications)
.withQueryParameter("sort", sort)
.withQueryParameter("order", order)
.build()
Expand Down
29 changes: 29 additions & 0 deletions src/main/scala/algoliasearch/ingestion/EmailNotifications.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/** Ingestion API The Ingestion API lets you connect third-party services and platforms with Algolia and schedule tasks
* to ingest your data. The Ingestion API powers the no-code [data
* connectors](https://dashboard.algolia.com/connectors). ## Base URLs The base URLs for requests to the Ingestion API
* are: - `https://data.us.algolia.com` - `https://data.eu.algolia.com` Use the URL that matches your [analytics
* region](https://dashboard.algolia.com/account/infrastructure/analytics). **All requests must use HTTPS.** ##
* Authentication To authenticate your API requests, add these headers: - `x-algolia-application-id`. Your Algolia
* application ID. - `x-algolia-api-key`. An API key with the necessary permissions to make the request. The required
* access control list (ACL) to make a request is listed in each endpoint's reference. You can find your application ID
* and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). ## Request format Request bodies must
* be JSON objects. ## Response status and errors Response bodies are JSON objects. Successful responses return a `2xx`
* status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a
* `message` property with more information. ## Version The current version of the Ingestion API is version 1, as
* indicated by the `/1/` in each endpoint's URL.
*
* The version of the OpenAPI document: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech Do not edit the class manually.
*/
package algoliasearch.ingestion

/** EmailNotifications
*
* @param enabled
* Whether to send email notifications, note that this doesn't prevent the task from being blocked.
*/
case class EmailNotifications(
enabled: Option[Boolean] = scala.None
)
26 changes: 26 additions & 0 deletions src/main/scala/algoliasearch/ingestion/Notifications.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/** Ingestion API The Ingestion API lets you connect third-party services and platforms with Algolia and schedule tasks
* to ingest your data. The Ingestion API powers the no-code [data
* connectors](https://dashboard.algolia.com/connectors). ## Base URLs The base URLs for requests to the Ingestion API
* are: - `https://data.us.algolia.com` - `https://data.eu.algolia.com` Use the URL that matches your [analytics
* region](https://dashboard.algolia.com/account/infrastructure/analytics). **All requests must use HTTPS.** ##
* Authentication To authenticate your API requests, add these headers: - `x-algolia-application-id`. Your Algolia
* application ID. - `x-algolia-api-key`. An API key with the necessary permissions to make the request. The required
* access control list (ACL) to make a request is listed in each endpoint's reference. You can find your application ID
* and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). ## Request format Request bodies must
* be JSON objects. ## Response status and errors Response bodies are JSON objects. Successful responses return a `2xx`
* status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a
* `message` property with more information. ## Version The current version of the Ingestion API is version 1, as
* indicated by the `/1/` in each endpoint's URL.
*
* The version of the OpenAPI document: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech Do not edit the class manually.
*/
package algoliasearch.ingestion

/** Notifications settings for a task.
*/
case class Notifications(
email: EmailNotifications
)
29 changes: 29 additions & 0 deletions src/main/scala/algoliasearch/ingestion/Policies.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/** Ingestion API The Ingestion API lets you connect third-party services and platforms with Algolia and schedule tasks
* to ingest your data. The Ingestion API powers the no-code [data
* connectors](https://dashboard.algolia.com/connectors). ## Base URLs The base URLs for requests to the Ingestion API
* are: - `https://data.us.algolia.com` - `https://data.eu.algolia.com` Use the URL that matches your [analytics
* region](https://dashboard.algolia.com/account/infrastructure/analytics). **All requests must use HTTPS.** ##
* Authentication To authenticate your API requests, add these headers: - `x-algolia-application-id`. Your Algolia
* application ID. - `x-algolia-api-key`. An API key with the necessary permissions to make the request. The required
* access control list (ACL) to make a request is listed in each endpoint's reference. You can find your application ID
* and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). ## Request format Request bodies must
* be JSON objects. ## Response status and errors Response bodies are JSON objects. Successful responses return a `2xx`
* status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a
* `message` property with more information. ## Version The current version of the Ingestion API is version 1, as
* indicated by the `/1/` in each endpoint's URL.
*
* The version of the OpenAPI document: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech Do not edit the class manually.
*/
package algoliasearch.ingestion

/** Set of rules for a task.
*
* @param criticalThreshold
* The number of critical failures in a row before blocking the task and sending a notification.
*/
case class Policies(
criticalThreshold: Option[Int] = scala.None
)
2 changes: 2 additions & 0 deletions src/main/scala/algoliasearch/ingestion/Task.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ case class Task(
failureThreshold: Option[Int] = scala.None,
action: Option[ActionType] = scala.None,
cursor: Option[String] = scala.None,
notifications: Option[Notifications] = scala.None,
policies: Option[Policies] = scala.None,
createdAt: String,
updatedAt: Option[String] = scala.None
)
4 changes: 3 additions & 1 deletion src/main/scala/algoliasearch/ingestion/TaskCreate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,7 @@ case class TaskCreate(
enabled: Option[Boolean] = scala.None,
failureThreshold: Option[Int] = scala.None,
input: Option[TaskInput] = scala.None,
cursor: Option[String] = scala.None
cursor: Option[String] = scala.None,
notifications: Option[Notifications] = scala.None,
policies: Option[Policies] = scala.None
)
4 changes: 3 additions & 1 deletion src/main/scala/algoliasearch/ingestion/TaskUpdate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ case class TaskUpdate(
cron: Option[String] = scala.None,
input: Option[TaskInput] = scala.None,
enabled: Option[Boolean] = scala.None,
failureThreshold: Option[Int] = scala.None
failureThreshold: Option[Int] = scala.None,
notifications: Option[Notifications] = scala.None,
policies: Option[Policies] = scala.None
)
2 changes: 2 additions & 0 deletions src/main/scala/algoliasearch/ingestion/TaskV1.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ case class TaskV1(
failureThreshold: Option[Int] = scala.None,
action: Option[ActionType] = scala.None,
cursor: Option[String] = scala.None,
notifications: Option[Notifications] = scala.None,
policies: Option[Policies] = scala.None,
createdAt: String,
updatedAt: Option[String] = scala.None
)

0 comments on commit 68b98ea

Please sign in to comment.