/*** * * SaaSquatch Type Definitions * * This file was automatically generated. DO NOT edit it by hand, instead edit the related JSON Schema file. * * Generated on 2026-03-20T21:11:42.771Z * ***/ /*** * ProgramTriggerVariableContext.schema.json * Generated on 2026-03-20T21:11:43.143Z * This file was automatically generated. DO NOT edit it by hand, instead edit the related JSON Schema file. ***/ /** * Defines the variables used for evaluating externally defined inputs (e.g. JSONata) */ export type ProgramTriggerVariables = ({ [k: string]: unknown } & { type?: TriggerType [k: string]: unknown }) /** * The reason the program was triggered (e.g. referral created, user changed something, etc.) */ export type TriggerType = ("AFTER_USER_CREATED_OR_UPDATED" | "SCHEDULED" | "REWARD_SCHEDULED" | "REFERRAL" | "AFTER_USER_EVENT_PROCESSED") /** * The key of the evaluated event (e.g. purchase) */ export type EventKey = string /** * The date this event was created */ export type DateTriggered = number /** * The variables for the event that triggered the program * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "eventContext". */ export interface Event { key?: EventKey dateTriggered?: DateTriggered fields?: EventFields [k: string]: unknown } /** * The body of the event (e.g. a purchase event would have fields for revenue, currency, etc.) * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "eventFieldsContext". */ export interface EventFields { [k: string]: unknown } /** * Defines how custom fields can be specified on a user. Allows alphanumeric numbers and underscores. * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "customFieldsContext". */ export interface UserCustomFieldsSchema { /** * This interface was referenced by `UserCustomFieldsSchema`'s JSON-Schema definition * via the `patternProperty` "^[a-zA-Z0-9_]{1,64}$". */ [k: string]: (string | boolean | number | null) }