Skip to content

Commit

Permalink
[TM-1531] updates for job service
Browse files Browse the repository at this point in the history
  • Loading branch information
egrojMonroy committed Dec 12, 2024
1 parent 153050a commit fa4d2c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/generated/v3/jobService/jobServiceComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const delayedJobsFind = (variables: DelayedJobsFindVariables, signal?: Ab
signal
});

export type BulkClearJobsError = Fetcher.ErrorWrapper<
export type BulkUpdateJobsError = Fetcher.ErrorWrapper<
| {
status: 400;
payload: {
Expand Down Expand Up @@ -173,7 +173,7 @@ export type BulkClearJobsError = Fetcher.ErrorWrapper<
}
>;

export type BulkClearJobsResponse = {
export type BulkUpdateJobsResponse = {
data?: {
/**
* @example delayedJobs
Expand All @@ -187,16 +187,16 @@ export type BulkClearJobsResponse = {
};
};

export type BulkClearJobsVariables = {
export type BulkUpdateJobsVariables = {
body: Schemas.DelayedJobBulkUpdateBodyDto;
};

/**
* Accepts a JSON:API-compliant payload to bulk update jobs, allowing each job's isAcknowledged attribute to be set to true or false.
*/
export const bulkClearJobs = (variables: BulkClearJobsVariables, signal?: AbortSignal) =>
jobServiceFetch<BulkClearJobsResponse, BulkClearJobsError, Schemas.DelayedJobBulkUpdateBodyDto, {}, {}, {}>({
url: "/jobs/v3/delayedJobs/bulk-clear",
export const bulkUpdateJobs = (variables: BulkUpdateJobsVariables, signal?: AbortSignal) =>
jobServiceFetch<BulkUpdateJobsResponse, BulkUpdateJobsError, Schemas.DelayedJobBulkUpdateBodyDto, {}, {}, {}>({
url: "/jobs/v3/delayedJobs/bulk-update",
method: "patch",
...variables,
signal
Expand Down
8 changes: 4 additions & 4 deletions src/generated/v3/jobService/jobServicePredicates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const delayedJobsFindFetchFailed = (variables: DelayedJobsFindVariables)
...variables
});

export const bulkClearJobsIsFetching = (store: ApiDataStore) =>
isFetching<{}, {}>({ store, url: "/jobs/v3/delayedJobs/bulk-clear", method: "patch" });
export const bulkUpdateJobsIsFetching = (store: ApiDataStore) =>
isFetching<{}, {}>({ store, url: "/jobs/v3/delayedJobs/bulk-update", method: "patch" });

export const bulkClearJobsFetchFailed = (store: ApiDataStore) =>
fetchFailed<{}, {}>({ store, url: "/jobs/v3/delayedJobs/bulk-clear", method: "patch" });
export const bulkUpdateJobsFetchFailed = (store: ApiDataStore) =>
fetchFailed<{}, {}>({ store, url: "/jobs/v3/delayedJobs/bulk-update", method: "patch" });
2 changes: 1 addition & 1 deletion src/generated/v3/jobService/jobServiceSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type DelayedJobDto = {
*/
progressMessage: string | null;
/**
* Indicates whether the jobs have been cleared
* Indicates whether the jobs have been acknowledged (cleared)
*/
isAcknowledged: boolean | null;
};
Expand Down

0 comments on commit fa4d2c4

Please sign in to comment.