All files / src/sdk/types activeTrigger.ts

100% Statements 5/5
100% Branches 0/0
100% Functions 0/0
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 4412x   12x       12x                   12x                           12x                          
import { z } from "zod";
 
export const ZTriggerItemParam = z.object({
  triggerId: z.string(),
});
 
export const ZActiveTriggersQuery = z.object({
  triggerIds: z.string().optional(),
  triggerNames: z.string().optional(),
  connectedAccountIds: z.string().optional(),
  integrationIds: z.string().optional(),
  limit: z.number().optional(),
  page: z.number().optional(),
  showDisabled: z.boolean().optional(),
});
 
const ZConnection = z.object({
  id: z.string(),
  integrationId: z.string(),
  memberId: z.string(),
  clientUniqueUserId: z.string(),
  status: z.string(),
  data: z.record(z.unknown()),
  deleted: z.boolean().optional(),
  enabled: z.boolean(),
  labels: z.array(z.unknown()),
  createdAt: z.string(),
  updatedAt: z.string(),
});
 
export const ZActiveTriggerItemRes = z.object({
  id: z.string(),
  connectionId: z.string(),
  triggerName: z.string(),
  triggerData: z.string(),
  triggerConfig: z.record(z.unknown()),
  state: z.record(z.unknown()),
  createdAt: z.string(),
  updatedAt: z.string(),
  disabledAt: z.string().nullable(),
  disabledReason: z.string().nullable(),
  connection: ZConnection,
});