mirror of
https://github.com/documenso/documenso
synced 2026-04-21 13:27:18 +00:00
31 lines
983 B
TypeScript
31 lines
983 B
TypeScript
import { z } from 'zod';
|
|
|
|
import { type JobDefinition } from '../../client/_internal/job';
|
|
|
|
const PROCESS_SIGNING_REMINDER_JOB_DEFINITION_ID = 'internal.process-signing-reminder';
|
|
|
|
const PROCESS_SIGNING_REMINDER_JOB_DEFINITION_SCHEMA = z.object({
|
|
recipientId: z.number(),
|
|
});
|
|
|
|
export type TProcessSigningReminderJobDefinition = z.infer<
|
|
typeof PROCESS_SIGNING_REMINDER_JOB_DEFINITION_SCHEMA
|
|
>;
|
|
|
|
export const PROCESS_SIGNING_REMINDER_JOB_DEFINITION = {
|
|
id: PROCESS_SIGNING_REMINDER_JOB_DEFINITION_ID,
|
|
name: 'Process Signing Reminder',
|
|
version: '1.0.0',
|
|
trigger: {
|
|
name: PROCESS_SIGNING_REMINDER_JOB_DEFINITION_ID,
|
|
schema: PROCESS_SIGNING_REMINDER_JOB_DEFINITION_SCHEMA,
|
|
},
|
|
handler: async ({ payload, io }) => {
|
|
const handler = await import('./process-signing-reminder.handler');
|
|
|
|
await handler.run({ payload, io });
|
|
},
|
|
} as const satisfies JobDefinition<
|
|
typeof PROCESS_SIGNING_REMINDER_JOB_DEFINITION_ID,
|
|
TProcessSigningReminderJobDefinition
|
|
>;
|