alepha 0.20.1 → 0.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/dist/api/files/index.js +2 -1
  2. package/dist/api/files/index.js.map +1 -1
  3. package/dist/api/jobs/index.browser.js +64 -148
  4. package/dist/api/jobs/index.browser.js.map +1 -1
  5. package/dist/api/jobs/index.d.ts +371 -573
  6. package/dist/api/jobs/index.d.ts.map +1 -1
  7. package/dist/api/jobs/index.js +605 -1012
  8. package/dist/api/jobs/index.js.map +1 -1
  9. package/dist/api/notifications/index.d.ts +78 -17
  10. package/dist/api/notifications/index.d.ts.map +1 -1
  11. package/dist/api/notifications/index.js +90 -23
  12. package/dist/api/notifications/index.js.map +1 -1
  13. package/dist/api/payments/index.d.ts +2 -1
  14. package/dist/api/payments/index.d.ts.map +1 -1
  15. package/dist/api/payments/index.js +4 -2
  16. package/dist/api/payments/index.js.map +1 -1
  17. package/dist/api/users/index.d.ts +34 -31
  18. package/dist/api/users/index.d.ts.map +1 -1
  19. package/dist/api/users/index.js +13 -7
  20. package/dist/api/users/index.js.map +1 -1
  21. package/dist/api/verifications/index.js +2 -1
  22. package/dist/api/verifications/index.js.map +1 -1
  23. package/dist/cli/core/index.d.ts +8 -34
  24. package/dist/cli/core/index.d.ts.map +1 -1
  25. package/dist/cli/core/index.js +43 -232
  26. package/dist/cli/core/index.js.map +1 -1
  27. package/dist/cli/platform/index.d.ts +36 -11
  28. package/dist/cli/platform/index.d.ts.map +1 -1
  29. package/dist/cli/platform/index.js +93 -27
  30. package/dist/cli/platform/index.js.map +1 -1
  31. package/dist/command/index.d.ts +1 -1
  32. package/dist/core/index.browser.js +6 -0
  33. package/dist/core/index.browser.js.map +1 -1
  34. package/dist/core/index.d.ts +6 -0
  35. package/dist/core/index.d.ts.map +1 -1
  36. package/dist/core/index.js +6 -0
  37. package/dist/core/index.js.map +1 -1
  38. package/dist/core/index.native.js +6 -0
  39. package/dist/core/index.native.js.map +1 -1
  40. package/dist/core/index.workerd.js +6 -0
  41. package/dist/core/index.workerd.js.map +1 -1
  42. package/dist/react/form/index.d.ts +60 -1
  43. package/dist/react/form/index.d.ts.map +1 -1
  44. package/dist/react/form/index.js +86 -1
  45. package/dist/react/form/index.js.map +1 -1
  46. package/dist/react/head/index.browser.js +16 -1
  47. package/dist/react/head/index.browser.js.map +1 -1
  48. package/dist/react/head/index.d.ts +6 -0
  49. package/dist/react/head/index.d.ts.map +1 -1
  50. package/dist/react/head/index.js +16 -1
  51. package/dist/react/head/index.js.map +1 -1
  52. package/dist/react/router/index.browser.js +0 -10
  53. package/dist/react/router/index.browser.js.map +1 -1
  54. package/dist/react/router/index.d.ts +35 -12
  55. package/dist/react/router/index.d.ts.map +1 -1
  56. package/dist/react/router/index.js +0 -10
  57. package/dist/react/router/index.js.map +1 -1
  58. package/dist/react/ui/index.d.ts +124 -0
  59. package/dist/react/ui/index.d.ts.map +1 -0
  60. package/dist/react/ui/index.js +206 -0
  61. package/dist/react/ui/index.js.map +1 -0
  62. package/dist/router/index.d.ts +13 -13
  63. package/dist/router/index.d.ts.map +1 -1
  64. package/dist/router/index.js +45 -32
  65. package/dist/router/index.js.map +1 -1
  66. package/dist/system/index.d.ts.map +1 -1
  67. package/dist/system/index.js +1 -0
  68. package/dist/system/index.js.map +1 -1
  69. package/dist/topic/core/index.js +1 -1
  70. package/dist/topic/core/index.js.map +1 -1
  71. package/package.json +6 -23
  72. package/src/api/files/jobs/FileJobs.ts +2 -1
  73. package/src/api/jobs/__tests__/$job.spec.ts +316 -2867
  74. package/src/api/jobs/controllers/AdminJobController.ts +29 -138
  75. package/src/api/jobs/entities/jobExecutionEntity.ts +27 -19
  76. package/src/api/jobs/index.browser.ts +5 -7
  77. package/src/api/jobs/index.ts +23 -51
  78. package/src/api/jobs/primitives/$job.ts +66 -58
  79. package/src/api/jobs/providers/JobProvider.ts +561 -566
  80. package/src/api/jobs/providers/JobQueueProvider.ts +18 -19
  81. package/src/api/jobs/schemas/jobConfigAtom.ts +20 -23
  82. package/src/api/jobs/schemas/jobExecutionQuerySchema.ts +3 -27
  83. package/src/api/jobs/schemas/jobExecutionResourceSchema.ts +5 -7
  84. package/src/api/jobs/schemas/jobRegistrationSchema.ts +7 -4
  85. package/src/api/jobs/schemas/triggerJobSchema.ts +0 -1
  86. package/src/api/jobs/services/JobService.ts +90 -483
  87. package/src/api/notifications/controllers/AdminNotificationController.ts +19 -12
  88. package/src/api/notifications/index.ts +7 -4
  89. package/src/api/notifications/jobs/NotificationJobs.ts +83 -12
  90. package/src/api/payments/services/PaymentService.ts +4 -2
  91. package/src/api/users/__tests__/UserJobs.spec.ts +10 -49
  92. package/src/api/users/audits/UserAudits.ts +3 -1
  93. package/src/api/users/buckets/UserBuckets.ts +2 -1
  94. package/src/api/users/index.ts +1 -4
  95. package/src/api/users/jobs/UserJobs.ts +5 -4
  96. package/src/api/verifications/jobs/VerificationJobs.ts +2 -1
  97. package/src/cli/core/__tests__/init.spec.ts +1 -1
  98. package/src/cli/core/commands/init.ts +0 -12
  99. package/src/cli/core/services/PackageManagerUtils.ts +2 -9
  100. package/src/cli/core/services/ProjectScaffolder.ts +17 -65
  101. package/src/cli/core/templates/agentMd.ts +2 -8
  102. package/src/cli/core/templates/apiIndexTs.ts +4 -18
  103. package/src/cli/core/templates/mainCss.ts +1 -36
  104. package/src/cli/core/templates/vitestConfigTs.ts +17 -0
  105. package/src/cli/core/templates/webAppRouterTs.ts +2 -85
  106. package/src/cli/platform/__tests__/CloudflareAdapter.spec.ts +22 -71
  107. package/src/cli/platform/adapters/CloudflareAdapter.ts +12 -11
  108. package/src/cli/platform/atoms/platformOptions.ts +9 -0
  109. package/src/cli/platform/schemas/cloudflare.ts +3 -2
  110. package/src/cli/platform/services/CloudflareApi.ts +164 -25
  111. package/src/cli/platform/services/WranglerApi.ts +0 -17
  112. package/src/core/Alepha.ts +9 -0
  113. package/src/react/form/index.ts +2 -0
  114. package/src/react/form/services/parseField.ts +163 -0
  115. package/src/react/form/services/prettyName.ts +19 -0
  116. package/src/react/head/providers/BrowserHeadProvider.ts +31 -10
  117. package/src/react/router/primitives/$page.ts +35 -12
  118. package/src/react/ui/atoms/uiAtom.ts +28 -0
  119. package/src/react/ui/components/ColorScheme.tsx +36 -0
  120. package/src/react/ui/hooks/useColorMode.ts +49 -0
  121. package/src/react/ui/hooks/useSidebarState.ts +26 -0
  122. package/src/react/ui/hooks/useTheme.ts +22 -0
  123. package/src/react/ui/index.ts +35 -0
  124. package/src/react/ui/services/UiPersistence.ts +41 -0
  125. package/src/router/TemplatedPathParser.ts +50 -51
  126. package/src/router/__tests__/RouterProvider.spec.ts +62 -0
  127. package/src/router/__tests__/TemplatedPathParser.spec.ts +18 -0
  128. package/src/router/providers/RouterProvider.ts +10 -5
  129. package/src/system/providers/NodeShellProvider.ts +1 -0
  130. package/src/topic/core/providers/TopicProvider.ts +1 -1
  131. package/dist/api/invitations/index.d.ts +0 -790
  132. package/dist/api/invitations/index.d.ts.map +0 -1
  133. package/dist/api/invitations/index.js +0 -662
  134. package/dist/api/invitations/index.js.map +0 -1
  135. package/dist/api/issues/index.d.ts +0 -810
  136. package/dist/api/issues/index.d.ts.map +0 -1
  137. package/dist/api/issues/index.js +0 -444
  138. package/dist/api/issues/index.js.map +0 -1
  139. package/dist/api/subscriptions/index.d.ts +0 -1692
  140. package/dist/api/subscriptions/index.d.ts.map +0 -1
  141. package/dist/api/subscriptions/index.js +0 -1867
  142. package/dist/api/subscriptions/index.js.map +0 -1
  143. package/dist/api/workflows/index.browser.js +0 -246
  144. package/dist/api/workflows/index.browser.js.map +0 -1
  145. package/dist/api/workflows/index.d.ts +0 -1618
  146. package/dist/api/workflows/index.d.ts.map +0 -1
  147. package/dist/api/workflows/index.js +0 -1495
  148. package/dist/api/workflows/index.js.map +0 -1
  149. package/src/api/invitations/__tests__/InvitationService.spec.ts +0 -439
  150. package/src/api/invitations/controllers/AdminInvitationController.ts +0 -86
  151. package/src/api/invitations/controllers/InvitationController.ts +0 -84
  152. package/src/api/invitations/entities/invitations.ts +0 -33
  153. package/src/api/invitations/index.ts +0 -58
  154. package/src/api/invitations/jobs/InvitationJobs.ts +0 -37
  155. package/src/api/invitations/providers/InvitationProvider.ts +0 -45
  156. package/src/api/invitations/schemas/createInvitationSchema.ts +0 -12
  157. package/src/api/invitations/schemas/invitationConfigAtom.ts +0 -20
  158. package/src/api/invitations/schemas/invitationQuerySchema.ts +0 -15
  159. package/src/api/invitations/schemas/invitationResourceSchema.ts +0 -6
  160. package/src/api/invitations/schemas/invitationWithResourceInfoSchema.ts +0 -22
  161. package/src/api/invitations/schemas/myInvitationsQuerySchema.ts +0 -10
  162. package/src/api/invitations/services/InvitationService.ts +0 -556
  163. package/src/api/issues/__tests__/IssueService.spec.ts +0 -263
  164. package/src/api/issues/controllers/AdminIssueController.ts +0 -149
  165. package/src/api/issues/controllers/IssueController.ts +0 -44
  166. package/src/api/issues/entities/issues.ts +0 -49
  167. package/src/api/issues/index.ts +0 -50
  168. package/src/api/issues/schemas/createIssueSchema.ts +0 -13
  169. package/src/api/issues/schemas/issueConfigAtom.ts +0 -13
  170. package/src/api/issues/schemas/issueQuerySchema.ts +0 -18
  171. package/src/api/issues/schemas/issueResourceSchema.ts +0 -6
  172. package/src/api/issues/schemas/myIssueQuerySchema.ts +0 -10
  173. package/src/api/issues/schemas/updateIssueSchema.ts +0 -13
  174. package/src/api/issues/services/IssueService.ts +0 -264
  175. package/src/api/jobs/__tests__/$job-middleware.spec.ts +0 -126
  176. package/src/api/jobs/__tests__/JobService.spec.ts +0 -31
  177. package/src/api/jobs/entities/jobExecutionLogEntity.ts +0 -13
  178. package/src/api/jobs/schemas/jobActivitySchema.ts +0 -15
  179. package/src/api/jobs/schemas/jobCronInfoSchema.ts +0 -22
  180. package/src/api/jobs/schemas/jobExecutionDetailResourceSchema.ts +0 -20
  181. package/src/api/jobs/schemas/jobFailureSchema.ts +0 -9
  182. package/src/api/jobs/schemas/jobQueueDepthSchema.ts +0 -14
  183. package/src/api/jobs/schemas/jobStatsSchema.ts +0 -14
  184. package/src/api/jobs/services/JobService-tests.ts +0 -157
  185. package/src/api/subscriptions/__tests__/BillingService.spec.ts +0 -218
  186. package/src/api/subscriptions/__tests__/SubscriptionService.spec.ts +0 -278
  187. package/src/api/subscriptions/controllers/AdminSubscriptionController.ts +0 -212
  188. package/src/api/subscriptions/controllers/SubscriptionController.ts +0 -189
  189. package/src/api/subscriptions/entities/subscriptionEvents.ts +0 -54
  190. package/src/api/subscriptions/entities/subscriptions.ts +0 -68
  191. package/src/api/subscriptions/index.ts +0 -133
  192. package/src/api/subscriptions/jobs/SubscriptionJobs.ts +0 -382
  193. package/src/api/subscriptions/middleware/$requireLimit.ts +0 -50
  194. package/src/api/subscriptions/middleware/$requirePlan.ts +0 -49
  195. package/src/api/subscriptions/notifications/SubscriptionNotifications.ts +0 -110
  196. package/src/api/subscriptions/schemas/cancelSubscriptionSchema.ts +0 -8
  197. package/src/api/subscriptions/schemas/changePlanSchema.ts +0 -9
  198. package/src/api/subscriptions/schemas/createSubscriptionSchema.ts +0 -11
  199. package/src/api/subscriptions/schemas/entitlementsSchema.ts +0 -21
  200. package/src/api/subscriptions/schemas/mrrSchema.ts +0 -13
  201. package/src/api/subscriptions/schemas/planDefinitionSchema.ts +0 -71
  202. package/src/api/subscriptions/schemas/planResourceSchema.ts +0 -25
  203. package/src/api/subscriptions/schemas/subscriptionEventResourceSchema.ts +0 -8
  204. package/src/api/subscriptions/schemas/subscriptionQuerySchema.ts +0 -19
  205. package/src/api/subscriptions/schemas/subscriptionResourceSchema.ts +0 -6
  206. package/src/api/subscriptions/schemas/subscriptionSettingsSchema.ts +0 -32
  207. package/src/api/subscriptions/schemas/subscriptionStatsSchema.ts +0 -23
  208. package/src/api/subscriptions/services/BillingService.ts +0 -437
  209. package/src/api/subscriptions/services/SubscriptionConfig.ts +0 -56
  210. package/src/api/subscriptions/services/SubscriptionService.ts +0 -867
  211. package/src/api/subscriptions/services/UsageService.ts +0 -118
  212. package/src/api/workflows/__tests__/$workflow.spec.ts +0 -616
  213. package/src/api/workflows/controllers/AdminWorkflowController.ts +0 -191
  214. package/src/api/workflows/entities/workflowExecutions.ts +0 -74
  215. package/src/api/workflows/entities/workflowStepExecutions.ts +0 -74
  216. package/src/api/workflows/entities/workflowStepLogs.ts +0 -13
  217. package/src/api/workflows/index.browser.ts +0 -22
  218. package/src/api/workflows/index.ts +0 -115
  219. package/src/api/workflows/jobs/WorkflowJobs.ts +0 -77
  220. package/src/api/workflows/primitives/$workflow.ts +0 -202
  221. package/src/api/workflows/providers/WorkflowProvider.ts +0 -1284
  222. package/src/api/workflows/schemas/workflowActivitySchema.ts +0 -15
  223. package/src/api/workflows/schemas/workflowConfigAtom.ts +0 -51
  224. package/src/api/workflows/schemas/workflowExecutionDetailSchema.ts +0 -18
  225. package/src/api/workflows/schemas/workflowExecutionQuerySchema.ts +0 -26
  226. package/src/api/workflows/schemas/workflowExecutionResourceSchema.ts +0 -30
  227. package/src/api/workflows/schemas/workflowRegistrationSchema.ts +0 -26
  228. package/src/api/workflows/schemas/workflowStatsSchema.ts +0 -16
  229. package/src/api/workflows/schemas/workflowStepExecutionResourceSchema.ts +0 -15
  230. package/src/api/workflows/services/WorkflowService.ts +0 -382
  231. package/src/cli/core/templates/apiAppSecurityTs.ts +0 -43
  232. package/src/cli/core/templates/webAdminDashboardTsx.ts +0 -17
@@ -1,22 +1,19 @@
1
- import { $hook, $inject, t } from "alepha";
1
+ import { $inject, t } from "alepha";
2
2
  import { $queue } from "alepha/queue";
3
3
  import { JobProvider } from "./JobProvider.ts";
4
4
 
5
- // -----------------------------------------------------------------------------------------------------------------
6
-
7
5
  /**
8
- * Optional queue-backed dispatch for the job system.
6
+ * Plumbs outbox-style dispatch through `AlephaQueue`.
9
7
  *
10
- * When registered, `JobProvider` will push work through this queue instead of
11
- * executing inline. This is the default for long-running (non-serverless) environments.
12
- * In serverless environments (Cloudflare Workers, Vercel), this provider is typically
13
- * omitted so jobs execute inline without requiring an external queue resource.
8
+ * Registered only when the app imports `AlephaApiJobsQueue`. Sets
9
+ * `JobProvider.queueDispatch` eagerly at instantiation so queue-mode jobs
10
+ * can dispatch regardless of start-hook ordering.
14
11
  */
15
12
  export class JobQueueProvider {
16
13
  protected readonly jobProvider = $inject(JobProvider);
17
14
 
18
15
  protected readonly queue = $queue({
19
- name: "_alepha:jobs:dispatch",
16
+ name: "api:jobs:dispatch",
20
17
  schema: t.object({ jobName: t.text(), executionId: t.text() }),
21
18
  handler: async (msg) => {
22
19
  await this.jobProvider.processExecution(
@@ -26,17 +23,19 @@ export class JobQueueProvider {
26
23
  },
27
24
  });
28
25
 
29
- protected readonly onStart = $hook({
30
- on: "start",
31
- handler: async () => {
32
- this.jobProvider.queueDispatch = (jobName, executionId) =>
33
- this.push(jobName, executionId);
34
- },
35
- });
26
+ constructor() {
27
+ // Install the dispatcher immediately — before any start hook runs,
28
+ // so JobProvider can validate presence and queue-mode push works
29
+ // from any lifecycle point.
30
+ this.wireDispatcher();
31
+ }
32
+
33
+ protected wireDispatcher(): void {
34
+ // `$inject` is resolved by the time constructor runs; assignment is safe.
35
+ this.jobProvider.queueDispatch = (jobName, executionId) =>
36
+ this.push(jobName, executionId);
37
+ }
36
38
 
37
- /**
38
- * Push a job execution onto the queue for async processing.
39
- */
40
39
  public async push(jobName: string, executionId: string): Promise<void> {
41
40
  await this.queue.push({ jobName, executionId });
42
41
  }
@@ -2,23 +2,24 @@ import { $atom, type Static, t } from "alepha";
2
2
 
3
3
  export const jobConfig = $atom({
4
4
  name: "alepha.jobs",
5
- description: "Configuration for the $job v2 primitive.",
5
+ description: "Configuration for the $job primitive.",
6
6
  schema: t.object({
7
- recovery: t.object({
8
- interval: t.integer({ description: "Sweep interval (ms)." }),
9
- staleThreshold: t.integer({
10
- description: "Pending age (ms) before re-dispatch.",
11
- }),
12
- runTimeout: t.integer({
13
- description:
14
- "Running age (ms) before assumed crash. Used as fallback when no per-job timeout is set.",
15
- }),
7
+ sweepInterval: t.integer({
8
+ description: "Sweep cron interval in milliseconds.",
16
9
  }),
17
- delayed: t.object({
18
- interval: t.integer({ description: "Sweep interval (ms)." }),
10
+ staleThreshold: t.integer({
11
+ description: "Pending age (ms) before the sweep re-dispatches it.",
19
12
  }),
20
- logRetentionDays: t.integer({
21
- description: "Days to keep completed/dead executions.",
13
+ runTimeout: t.integer({
14
+ description:
15
+ "Running age (ms) before assumed crash (fallback when no per-job timeout).",
16
+ }),
17
+ keepLastSuccess: t.integer({
18
+ description:
19
+ "Max successful rows to keep per job. Set 0 to disable and delete on success.",
20
+ }),
21
+ keepLastError: t.integer({
22
+ description: "Max error rows to keep per job.",
22
23
  }),
23
24
  logMaxEntries: t.integer({
24
25
  description: "Max log entries captured per execution.",
@@ -28,15 +29,11 @@ export const jobConfig = $atom({
28
29
  }),
29
30
  }),
30
31
  default: {
31
- recovery: {
32
- interval: 300_000,
33
- staleThreshold: 300_000,
34
- runTimeout: 1_800_000,
35
- },
36
- delayed: {
37
- interval: 300_000,
38
- },
39
- logRetentionDays: 30,
32
+ sweepInterval: 300_000,
33
+ staleThreshold: 300_000,
34
+ runTimeout: 1_800_000,
35
+ keepLastSuccess: 10,
36
+ keepLastError: 10,
40
37
  logMaxEntries: 100,
41
38
  drainTimeout: 30_000,
42
39
  },
@@ -1,34 +1,10 @@
1
1
  import { type Static, t } from "alepha";
2
- import { pageQuerySchema } from "alepha/orm";
3
2
 
4
- export const jobExecutionQuerySchema = t.extend(pageQuerySchema, {
5
- job: t.optional(
6
- t.text({
7
- description: "Filter by job name",
8
- }),
9
- ),
3
+ export const jobExecutionQuerySchema = t.object({
10
4
  status: t.optional(
11
- t.enum([
12
- "pending",
13
- "scheduled",
14
- "retrying",
15
- "running",
16
- "completed",
17
- "dead",
18
- "cancelled",
19
- ]),
20
- ),
21
- priority: t.optional(t.enum(["critical", "high", "normal", "low"])),
22
- from: t.optional(
23
- t.datetime({
24
- description: "From date (ISO)",
25
- }),
26
- ),
27
- to: t.optional(
28
- t.datetime({
29
- description: "To date (ISO)",
30
- }),
5
+ t.enum(["pending", "running", "scheduled", "ok", "error", "cancelled"]),
31
6
  ),
7
+ limit: t.optional(t.integer({ minimum: 1, maximum: 200, default: 20 })),
32
8
  });
33
9
 
34
10
  export type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
@@ -1,19 +1,17 @@
1
1
  import { type Static, t } from "alepha";
2
2
  import { jobExecutionEntity } from "../entities/jobExecutionEntity.ts";
3
3
 
4
- export const jobExecutionCanSchema = t.object({
5
- retry: t.boolean(),
6
- cancel: t.boolean(),
7
- });
8
-
9
4
  export const jobExecutionResourceSchema = t.extend(
10
5
  jobExecutionEntity.schema,
11
6
  {
12
- can: jobExecutionCanSchema,
7
+ can: t.object({
8
+ retry: t.boolean(),
9
+ cancel: t.boolean(),
10
+ }),
13
11
  },
14
12
  {
15
13
  title: "JobExecutionResource",
16
- description: "A job execution resource.",
14
+ description: "A job execution row with derived actions.",
17
15
  },
18
16
  );
19
17
 
@@ -2,10 +2,9 @@ import { type Static, t } from "alepha";
2
2
 
3
3
  export const jobRegistrationSchema = t.object({
4
4
  name: t.text(),
5
- type: t.enum(["cron", "push", "both"]),
5
+ description: t.optional(t.text()),
6
+ type: t.enum(["cron", "queue"]),
6
7
  priority: t.enum(["critical", "high", "normal", "low"]),
7
- concurrency: t.integer(),
8
- hasSchema: t.boolean(),
9
8
  cron: t.optional(t.text()),
10
9
  timeout: t.optional(t.text()),
11
10
  retry: t.optional(
@@ -14,7 +13,11 @@ export const jobRegistrationSchema = t.object({
14
13
  hasBackoff: t.boolean(),
15
14
  }),
16
15
  ),
17
- paused: t.boolean(),
16
+ recent: t.object({
17
+ ok: t.integer(),
18
+ error: t.integer(),
19
+ lastRun: t.optional(t.datetime()),
20
+ }),
18
21
  });
19
22
 
20
23
  export type JobRegistration = Static<typeof jobRegistrationSchema>;
@@ -1,7 +1,6 @@
1
1
  import { type Static, t } from "alepha";
2
2
 
3
3
  export const triggerJobSchema = t.object({
4
- name: t.text(),
5
4
  payload: t.optional(t.record(t.text(), t.any())),
6
5
  });
7
6