Skip to content

Commit aaf5e87

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 0ad2764 commit aaf5e87

File tree

10 files changed

+66
-0
lines changed

10 files changed

+66
-0
lines changed

packages/ingestion/model/clientMethodProps.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,10 @@ export type ListTasksProps = {
502502
* Type of task trigger for filtering the list of tasks.
503503
*/
504504
triggerType?: Array<TriggerType>;
505+
/**
506+
* If specified, the response only includes tasks with notifications.email.enabled set to this value.
507+
*/
508+
withEmailNotifications?: boolean;
505509
/**
506510
* Property by which to sort the list of tasks.
507511
*/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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+
3+
export type EmailNotifications = {
4+
/**
5+
* Whether to send email notifications, note that this doesn\'t prevent the task from being blocked.
6+
*/
7+
enabled?: boolean;
8+
};

packages/ingestion/model/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export * from './dockerRegistry';
4545
export * from './dockerStreams';
4646
export * from './dockerStreamsInput';
4747
export * from './dockerStreamsSyncMode';
48+
export * from './emailNotifications';
4849
export * from './entityType';
4950
export * from './errorBase';
5051
export * from './event';
@@ -64,6 +65,7 @@ export * from './mappingInput';
6465
export * from './mappingKitAction';
6566
export * from './mappingTypeCSV';
6667
export * from './methodType';
68+
export * from './notifications';
6769
export * from './onDemandTrigger';
6870
export * from './onDemandTriggerInput';
6971
export * from './onDemandTriggerType';
@@ -72,6 +74,7 @@ export * from './pagination';
7274
export * from './platform';
7375
export * from './platformNone';
7476
export * from './platformWithNone';
77+
export * from './policies';
7578
export * from './pushTaskPayload';
7679
export * from './pushTaskRecords';
7780
export * from './recordType';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
3+
import type { EmailNotifications } from './emailNotifications';
4+
5+
/**
6+
* Notifications settings for a task.
7+
*/
8+
export type Notifications = {
9+
email: EmailNotifications;
10+
};

packages/ingestion/model/policies.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
3+
/**
4+
* Set of rules for a task.
5+
*/
6+
export type Policies = {
7+
/**
8+
* The number of critical failures in a row before blocking the task and sending a notification.
9+
*/
10+
criticalThreshold?: number;
11+
};

packages/ingestion/model/task.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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.
22

33
import type { ActionType } from './actionType';
4+
import type { Notifications } from './notifications';
5+
import type { Policies } from './policies';
46
import type { TaskInput } from './taskInput';
57

68
export type Task = {
@@ -53,6 +55,10 @@ export type Task = {
5355
*/
5456
cursor?: string;
5557

58+
notifications?: Notifications;
59+
60+
policies?: Policies;
61+
5662
/**
5763
* Date of creation in RFC 3339 format.
5864
*/

packages/ingestion/model/taskCreate.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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.
22

33
import type { ActionType } from './actionType';
4+
import type { Notifications } from './notifications';
5+
import type { Policies } from './policies';
46
import type { TaskInput } from './taskInput';
57

68
/**
@@ -40,4 +42,8 @@ export type TaskCreate = {
4042
* Date of the last cursor in RFC 3339 format.
4143
*/
4244
cursor?: string;
45+
46+
notifications?: Notifications;
47+
48+
policies?: Policies;
4349
};

packages/ingestion/model/taskUpdate.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
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.
22

3+
import type { Notifications } from './notifications';
4+
import type { Policies } from './policies';
35
import type { TaskInput } from './taskInput';
46

57
/**
@@ -27,4 +29,8 @@ export type TaskUpdate = {
2729
* Maximum accepted percentage of failures for a task run to finish successfully.
2830
*/
2931
failureThreshold?: number;
32+
33+
notifications?: Notifications;
34+
35+
policies?: Policies;
3036
};

packages/ingestion/model/taskV1.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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.
22

33
import type { ActionType } from './actionType';
4+
import type { Notifications } from './notifications';
5+
import type { Policies } from './policies';
46
import type { TaskInput } from './taskInput';
57
import type { Trigger } from './trigger';
68

@@ -44,6 +46,10 @@ export type TaskV1 = {
4446
*/
4547
cursor?: string;
4648

49+
notifications?: Notifications;
50+
51+
policies?: Policies;
52+
4753
/**
4854
* Date of creation in RFC 3339 format.
4955
*/

packages/ingestion/src/ingestionClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,7 @@ export function createIngestionClient({
14931493
* @param listTasks.sourceType - Filters the tasks with the specified source type.
14941494
* @param listTasks.destinationID - Destination IDs for filtering the list of tasks.
14951495
* @param listTasks.triggerType - Type of task trigger for filtering the list of tasks.
1496+
* @param listTasks.withEmailNotifications - If specified, the response only includes tasks with notifications.email.enabled set to this value.
14961497
* @param listTasks.sort - Property by which to sort the list of tasks.
14971498
* @param listTasks.order - Sort order of the response, ascending or descending.
14981499
* @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({
15071508
sourceType,
15081509
destinationID,
15091510
triggerType,
1511+
withEmailNotifications,
15101512
sort,
15111513
order,
15121514
}: ListTasksProps = {},
@@ -1548,6 +1550,10 @@ export function createIngestionClient({
15481550
queryParameters['triggerType'] = triggerType.toString();
15491551
}
15501552

1553+
if (withEmailNotifications !== undefined) {
1554+
queryParameters['withEmailNotifications'] = withEmailNotifications.toString();
1555+
}
1556+
15511557
if (sort !== undefined) {
15521558
queryParameters['sort'] = sort.toString();
15531559
}

0 commit comments

Comments
 (0)