diff --git a/packages/ingestion/model/clientMethodProps.ts b/packages/ingestion/model/clientMethodProps.ts index e4d4059dc..24a6412d4 100644 --- a/packages/ingestion/model/clientMethodProps.ts +++ b/packages/ingestion/model/clientMethodProps.ts @@ -502,6 +502,10 @@ export type ListTasksProps = { * Type of task trigger for filtering the list of tasks. */ triggerType?: Array; + /** + * If specified, the response only includes tasks with notifications.email.enabled set to this value. + */ + withEmailNotifications?: boolean; /** * Property by which to sort the list of tasks. */ diff --git a/packages/ingestion/model/emailNotifications.ts b/packages/ingestion/model/emailNotifications.ts new file mode 100644 index 000000000..c4fb89879 --- /dev/null +++ b/packages/ingestion/model/emailNotifications.ts @@ -0,0 +1,8 @@ +// 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. + +export type EmailNotifications = { + /** + * Whether to send email notifications, note that this doesn\'t prevent the task from being blocked. + */ + enabled?: boolean; +}; diff --git a/packages/ingestion/model/index.ts b/packages/ingestion/model/index.ts index 326c43533..64249b9d3 100644 --- a/packages/ingestion/model/index.ts +++ b/packages/ingestion/model/index.ts @@ -45,6 +45,7 @@ export * from './dockerRegistry'; export * from './dockerStreams'; export * from './dockerStreamsInput'; export * from './dockerStreamsSyncMode'; +export * from './emailNotifications'; export * from './entityType'; export * from './errorBase'; export * from './event'; @@ -64,6 +65,7 @@ export * from './mappingInput'; export * from './mappingKitAction'; export * from './mappingTypeCSV'; export * from './methodType'; +export * from './notifications'; export * from './onDemandTrigger'; export * from './onDemandTriggerInput'; export * from './onDemandTriggerType'; @@ -72,6 +74,7 @@ export * from './pagination'; export * from './platform'; export * from './platformNone'; export * from './platformWithNone'; +export * from './policies'; export * from './pushTaskPayload'; export * from './pushTaskRecords'; export * from './recordType'; diff --git a/packages/ingestion/model/notifications.ts b/packages/ingestion/model/notifications.ts new file mode 100644 index 000000000..67e3fa4e5 --- /dev/null +++ b/packages/ingestion/model/notifications.ts @@ -0,0 +1,10 @@ +// 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. + +import type { EmailNotifications } from './emailNotifications'; + +/** + * Notifications settings for a task. + */ +export type Notifications = { + email: EmailNotifications; +}; diff --git a/packages/ingestion/model/policies.ts b/packages/ingestion/model/policies.ts new file mode 100644 index 000000000..618d463b4 --- /dev/null +++ b/packages/ingestion/model/policies.ts @@ -0,0 +1,11 @@ +// 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. + +/** + * Set of rules for a task. + */ +export type Policies = { + /** + * The number of critical failures in a row before blocking the task and sending a notification. + */ + criticalThreshold?: number; +}; diff --git a/packages/ingestion/model/task.ts b/packages/ingestion/model/task.ts index 6e6f7aa68..6c9d7dfa8 100644 --- a/packages/ingestion/model/task.ts +++ b/packages/ingestion/model/task.ts @@ -1,6 +1,8 @@ // 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. import type { ActionType } from './actionType'; +import type { Notifications } from './notifications'; +import type { Policies } from './policies'; import type { TaskInput } from './taskInput'; export type Task = { @@ -53,6 +55,10 @@ export type Task = { */ cursor?: string; + notifications?: Notifications; + + policies?: Policies; + /** * Date of creation in RFC 3339 format. */ diff --git a/packages/ingestion/model/taskCreate.ts b/packages/ingestion/model/taskCreate.ts index bee731bb4..d59329326 100644 --- a/packages/ingestion/model/taskCreate.ts +++ b/packages/ingestion/model/taskCreate.ts @@ -1,6 +1,8 @@ // 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. import type { ActionType } from './actionType'; +import type { Notifications } from './notifications'; +import type { Policies } from './policies'; import type { TaskInput } from './taskInput'; /** @@ -40,4 +42,8 @@ export type TaskCreate = { * Date of the last cursor in RFC 3339 format. */ cursor?: string; + + notifications?: Notifications; + + policies?: Policies; }; diff --git a/packages/ingestion/model/taskUpdate.ts b/packages/ingestion/model/taskUpdate.ts index 1f21937c3..dd6e27573 100644 --- a/packages/ingestion/model/taskUpdate.ts +++ b/packages/ingestion/model/taskUpdate.ts @@ -1,5 +1,7 @@ // 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. +import type { Notifications } from './notifications'; +import type { Policies } from './policies'; import type { TaskInput } from './taskInput'; /** @@ -27,4 +29,8 @@ export type TaskUpdate = { * Maximum accepted percentage of failures for a task run to finish successfully. */ failureThreshold?: number; + + notifications?: Notifications; + + policies?: Policies; }; diff --git a/packages/ingestion/model/taskV1.ts b/packages/ingestion/model/taskV1.ts index 3da9d3ebf..4d1ba8810 100644 --- a/packages/ingestion/model/taskV1.ts +++ b/packages/ingestion/model/taskV1.ts @@ -1,6 +1,8 @@ // 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. import type { ActionType } from './actionType'; +import type { Notifications } from './notifications'; +import type { Policies } from './policies'; import type { TaskInput } from './taskInput'; import type { Trigger } from './trigger'; @@ -44,6 +46,10 @@ export type TaskV1 = { */ cursor?: string; + notifications?: Notifications; + + policies?: Policies; + /** * Date of creation in RFC 3339 format. */ diff --git a/packages/ingestion/src/ingestionClient.ts b/packages/ingestion/src/ingestionClient.ts index 5b6633241..dbcdffc97 100644 --- a/packages/ingestion/src/ingestionClient.ts +++ b/packages/ingestion/src/ingestionClient.ts @@ -1493,6 +1493,7 @@ export function createIngestionClient({ * @param listTasks.sourceType - Filters the tasks with the specified source type. * @param listTasks.destinationID - Destination IDs for filtering the list of tasks. * @param listTasks.triggerType - Type of task trigger for filtering the list of tasks. + * @param listTasks.withEmailNotifications - If specified, the response only includes tasks with notifications.email.enabled set to this value. * @param listTasks.sort - Property by which to sort the list of tasks. * @param listTasks.order - Sort order of the response, ascending or descending. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -1507,6 +1508,7 @@ export function createIngestionClient({ sourceType, destinationID, triggerType, + withEmailNotifications, sort, order, }: ListTasksProps = {}, @@ -1548,6 +1550,10 @@ export function createIngestionClient({ queryParameters['triggerType'] = triggerType.toString(); } + if (withEmailNotifications !== undefined) { + queryParameters['withEmailNotifications'] = withEmailNotifications.toString(); + } + if (sort !== undefined) { queryParameters['sort'] = sort.toString(); }