Skip to content

Commit 94a2179

Browse files
algolia-botmillotp
andcommitted
feat(specs): add notification settings to tasks [skip-bc] (generated)
algolia/api-clients-automation#4297 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent a61fcd7 commit 94a2179

File tree

8 files changed

+77
-1
lines changed

8 files changed

+77
-1
lines changed

client/src/commonMain/kotlin/com/algolia/client/api/IngestionClient.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,11 +816,12 @@ public class IngestionClient(
816816
* @param sourceType Filters the tasks with the specified source type.
817817
* @param destinationID Destination IDs for filtering the list of tasks.
818818
* @param triggerType Type of task trigger for filtering the list of tasks.
819+
* @param withEmailNotifications If specified, the response only includes tasks with notifications.email.enabled set to this value.
819820
* @param sort Property by which to sort the list of tasks. (default to createdAt)
820821
* @param order Sort order of the response, ascending or descending. (default to desc)
821822
* @param requestOptions additional request configuration.
822823
*/
823-
public suspend fun listTasks(itemsPerPage: Int? = null, page: Int? = null, action: List<ActionType>? = null, enabled: Boolean? = null, sourceID: List<String>? = null, sourceType: List<SourceType>? = null, destinationID: List<String>? = null, triggerType: List<TriggerType>? = null, sort: TaskSortKeys? = null, order: OrderKeys? = null, requestOptions: RequestOptions? = null): ListTasksResponse {
824+
public suspend fun listTasks(itemsPerPage: Int? = null, page: Int? = null, action: List<ActionType>? = null, enabled: Boolean? = null, sourceID: List<String>? = null, sourceType: List<SourceType>? = null, destinationID: List<String>? = null, triggerType: List<TriggerType>? = null, withEmailNotifications: Boolean? = null, sort: TaskSortKeys? = null, order: OrderKeys? = null, requestOptions: RequestOptions? = null): ListTasksResponse {
824825
val requestConfig = RequestConfig(
825826
method = RequestMethod.GET,
826827
path = listOf("2", "tasks"),
@@ -833,6 +834,7 @@ public class IngestionClient(
833834
sourceType?.let { put("sourceType", it.joinToString(",")) }
834835
destinationID?.let { put("destinationID", it.joinToString(",")) }
835836
triggerType?.let { put("triggerType", it.joinToString(",")) }
837+
withEmailNotifications?.let { put("withEmailNotifications", it) }
836838
sort?.let { put("sort", it) }
837839
order?.let { put("order", it) }
838840
},
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/** Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. */
2+
package com.algolia.client.model.ingestion
3+
4+
import kotlinx.serialization.*
5+
import kotlinx.serialization.json.*
6+
7+
/**
8+
* EmailNotifications
9+
*
10+
* @param enabled Whether to send email notifications, note that this doesn't prevent the task from being blocked.
11+
*/
12+
@Serializable
13+
public data class EmailNotifications(
14+
15+
/** Whether to send email notifications, note that this doesn't prevent the task from being blocked. */
16+
@SerialName(value = "enabled") val enabled: Boolean? = null,
17+
)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/** Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. */
2+
package com.algolia.client.model.ingestion
3+
4+
import kotlinx.serialization.*
5+
import kotlinx.serialization.json.*
6+
7+
/**
8+
* Notifications settings for a task.
9+
*
10+
* @param email
11+
*/
12+
@Serializable
13+
public data class Notifications(
14+
15+
@SerialName(value = "email") val email: EmailNotifications,
16+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/** Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. */
2+
package com.algolia.client.model.ingestion
3+
4+
import kotlinx.serialization.*
5+
import kotlinx.serialization.json.*
6+
7+
/**
8+
* Set of rules for a task.
9+
*
10+
* @param criticalThreshold The number of critical failures in a row before blocking the task and sending a notification.
11+
*/
12+
@Serializable
13+
public data class Policies(
14+
15+
/** The number of critical failures in a row before blocking the task and sending a notification. */
16+
@SerialName(value = "criticalThreshold") val criticalThreshold: Int? = null,
17+
)

client/src/commonMain/kotlin/com/algolia/client/model/ingestion/Task.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import kotlinx.serialization.json.*
1919
* @param failureThreshold Maximum accepted percentage of failures for a task run to finish successfully.
2020
* @param action
2121
* @param cursor Date of the last cursor in RFC 3339 format.
22+
* @param notifications
23+
* @param policies
2224
* @param updatedAt Date of last update in RFC 3339 format.
2325
*/
2426
@Serializable
@@ -58,6 +60,10 @@ public data class Task(
5860
/** Date of the last cursor in RFC 3339 format. */
5961
@SerialName(value = "cursor") val cursor: String? = null,
6062

63+
@SerialName(value = "notifications") val notifications: Notifications? = null,
64+
65+
@SerialName(value = "policies") val policies: Policies? = null,
66+
6167
/** Date of last update in RFC 3339 format. */
6268
@SerialName(value = "updatedAt") val updatedAt: String? = null,
6369
)

client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TaskCreate.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import kotlinx.serialization.json.*
1515
* @param failureThreshold Maximum accepted percentage of failures for a task run to finish successfully.
1616
* @param input
1717
* @param cursor Date of the last cursor in RFC 3339 format.
18+
* @param notifications
19+
* @param policies
1820
*/
1921
@Serializable
2022
public data class TaskCreate(
@@ -40,4 +42,8 @@ public data class TaskCreate(
4042

4143
/** Date of the last cursor in RFC 3339 format. */
4244
@SerialName(value = "cursor") val cursor: String? = null,
45+
46+
@SerialName(value = "notifications") val notifications: Notifications? = null,
47+
48+
@SerialName(value = "policies") val policies: Policies? = null,
4349
)

client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TaskUpdate.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import kotlinx.serialization.json.*
1212
* @param input
1313
* @param enabled Whether the task is enabled.
1414
* @param failureThreshold Maximum accepted percentage of failures for a task run to finish successfully.
15+
* @param notifications
16+
* @param policies
1517
*/
1618
@Serializable
1719
public data class TaskUpdate(
@@ -29,4 +31,8 @@ public data class TaskUpdate(
2931

3032
/** Maximum accepted percentage of failures for a task run to finish successfully. */
3133
@SerialName(value = "failureThreshold") val failureThreshold: Int? = null,
34+
35+
@SerialName(value = "notifications") val notifications: Notifications? = null,
36+
37+
@SerialName(value = "policies") val policies: Policies? = null,
3238
)

client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TaskV1.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import kotlinx.serialization.json.*
1717
* @param failureThreshold Maximum accepted percentage of failures for a task run to finish successfully.
1818
* @param action
1919
* @param cursor Date of the last cursor in RFC 3339 format.
20+
* @param notifications
21+
* @param policies
2022
* @param updatedAt Date of last update in RFC 3339 format.
2123
*/
2224
@Deprecated(message = "This schema is deprecated.")
@@ -50,6 +52,10 @@ public data class TaskV1(
5052
/** Date of the last cursor in RFC 3339 format. */
5153
@SerialName(value = "cursor") val cursor: String? = null,
5254

55+
@SerialName(value = "notifications") val notifications: Notifications? = null,
56+
57+
@SerialName(value = "policies") val policies: Policies? = null,
58+
5359
/** Date of last update in RFC 3339 format. */
5460
@SerialName(value = "updatedAt") val updatedAt: String? = null,
5561
)

0 commit comments

Comments
 (0)