Skip to content

Commit 2b8c77d

Browse files
committed
Added some JSDocs
1 parent b4a2090 commit 2b8c77d

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

packages/core/src/v3/schemas/queues.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,36 @@
11
import { z } from "zod";
22

3+
/**
4+
* The type of queue, either "task" or "custom"
5+
* "task" are created automatically for each task.
6+
* "custom" are created by you explicitly in your code.
7+
* */
38
export const QueueType = z.enum(["task", "custom"]);
49
export type QueueType = z.infer<typeof QueueType>;
510

611
export const QueueItem = z.object({
12+
/** The queue name */
713
name: z.string(),
14+
/**
15+
* The queue type, either "task" or "custom"
16+
* "task" are created automatically for each task.
17+
* "custom" are created by you explicitly in your code.
18+
* */
819
type: QueueType,
20+
/** The number of runs currently running */
921
running: z.number(),
22+
/** The number of runs currently queued */
1023
queued: z.number(),
24+
/** The concurrency limit of the queue */
1125
concurrencyLimit: z.number().nullable(),
1226
});
1327

28+
export type QueueItem = z.infer<typeof QueueItem>;
29+
1430
export const ListQueueOptions = z.object({
31+
/** The page number */
1532
page: z.number().optional(),
33+
/** The number of queues per page */
1634
perPage: z.number().optional(),
1735
});
1836

packages/trigger-sdk/src/v3/queues.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import {
99
import { tracer } from "./tracer.js";
1010

1111
/**
12-
* Lists schedules
12+
* Lists queues
1313
* @param options - The list options
1414
* @param options.page - The page number
15-
* @param options.perPage - The number of schedules per page
16-
* @returns The list of schedules
15+
* @param options.perPage - The number of queues per page
16+
* @returns The list of queues
1717
*/
1818
export function list(
1919
options?: ListQueueOptions,

0 commit comments

Comments
 (0)