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 0ad2764 commit aaf5e87
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/ingestion/model/clientMethodProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,10 @@ export type ListTasksProps = {
* Type of task trigger for filtering the list of tasks.
*/
triggerType?: Array<TriggerType>;
/**
* 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.
*/
Expand Down
8 changes: 8 additions & 0 deletions packages/ingestion/model/emailNotifications.ts
Original file line number Diff line number Diff line change
@@ -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;
};
3 changes: 3 additions & 0 deletions packages/ingestion/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand All @@ -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';
Expand Down
10 changes: 10 additions & 0 deletions packages/ingestion/model/notifications.ts
Original file line number Diff line number Diff line change
@@ -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;
};
11 changes: 11 additions & 0 deletions packages/ingestion/model/policies.ts
Original file line number Diff line number Diff line change
@@ -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;
};
6 changes: 6 additions & 0 deletions packages/ingestion/model/task.ts
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down Expand Up @@ -53,6 +55,10 @@ export type Task = {
*/
cursor?: string;

notifications?: Notifications;

policies?: Policies;

/**
* Date of creation in RFC 3339 format.
*/
Expand Down
6 changes: 6 additions & 0 deletions packages/ingestion/model/taskCreate.ts
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand Down Expand Up @@ -40,4 +42,8 @@ export type TaskCreate = {
* Date of the last cursor in RFC 3339 format.
*/
cursor?: string;

notifications?: Notifications;

policies?: Policies;
};
6 changes: 6 additions & 0 deletions packages/ingestion/model/taskUpdate.ts
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand Down Expand Up @@ -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;
};
6 changes: 6 additions & 0 deletions packages/ingestion/model/taskV1.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -44,6 +46,10 @@ export type TaskV1 = {
*/
cursor?: string;

notifications?: Notifications;

policies?: Policies;

/**
* Date of creation in RFC 3339 format.
*/
Expand Down
6 changes: 6 additions & 0 deletions packages/ingestion/src/ingestionClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -1507,6 +1508,7 @@ export function createIngestionClient({
sourceType,
destinationID,
triggerType,
withEmailNotifications,
sort,
order,
}: ListTasksProps = {},
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit aaf5e87

Please sign in to comment.