/*** * * 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 * ***/ /*** * ReferralData.schema.json * Generated on 2026-03-20T21:11:43.734Z * This file was automatically generated. DO NOT edit it by hand, instead edit the related JSON Schema file. ***/ /** * Sent whenever a referral event happens */ export type ReferralDataWebhookSchema = (ClassicReferralWebhookSchema | ClassicDisabledReferralWebhookSchema) /** * The unique referral identifier */ export type ReferralId = string /** * This user's unique identifier */ export type UserId = string /** * The unique identifier of the account this user belongs to */ export type AccountId = string /** * The referrers code that was used by the referred for the referral */ export type ReferralCodeUsed = string /** * The sharelink that was used by the referred for the referral */ export type ShareLinkUsed = string /** * The date this referral was created */ export type DateReferralStarted = number /** * The date the referral converted */ export type DateReferralConverted = (number | null) /** * The date this referral was last modified for any reason (e.g. converted, reward added, etc.) */ export type DateReferralModified = (number | null) /** * The date a user was added to or removed from the referral (e.g. removed as a result of user deletion) */ export type DateUserModified = (number | null) /** * The Id of the program this code was created for */ export type ProgramId = (string | null) /** * The userId of the referrer user (Classic-Only) */ export type ReferrerUser1 = string /** * The userId of the referred user (Classic-Only) */ export type ReferredUser1 = string /** * A set of fraud flags generated for the classic referral program (Classic-Only) */ export type FraudSignals = ({ [k: string]: unknown } | null) /** * The referral fraud moderation status for the classic program (Classic-Only) */ export type ModerationStatus = ("PENDING" | "ACTIONED") /** * The referral moderation status for the referrer user classic program (Classic-Only) */ export type ReferrerModerationStatus = ("PENDING" | "APPROVED" | "DENIED") /** * The date the referral was marked as paid (Classic-Only) */ export type DateReferralPaid = (number | null) /** * The date the referral ended (Classic-Only) */ export type DateReferralEnded = (number | null) /** * The moderation status for the referred user in the classic program (Classic-Only) */ export type ReferredModerationStatus = ("PENDING" | "APPROVED" | "DENIED") /** * The date the referral was moderated (Classic-Only) */ export type DateModerated = number /** * The rewardId of the classic program referred user's reward if available (Classic-Only) */ export type ReferredReward = (string | null) /** * The rewardId of the classic program referrer user's reward if available (Classic-Only) */ export type ReferrerReward = (string | null) /** * The unique referral identifier */ export type ReferralId1 = string /** * The referrers code that was used by the referred for the referral */ export type ReferralCodeUsed1 = string /** * The sharelink that was used by the referred for the referral */ export type ShareLinkUsed1 = string /** * The date this referral was created */ export type DateReferralStarted1 = number /** * The date the referral converted */ export type DateReferralConverted1 = (number | null) /** * The date this referral was last modified for any reason (e.g. converted, reward added, etc.) */ export type DateReferralModified1 = (number | null) /** * The date a user was added to or removed from the referral (e.g. removed as a result of user deletion) */ export type DateUserModified1 = (number | null) /** * The Id of the program this code was created for */ export type ProgramId1 = (string | null) /** * Sent whenever a classic referral event happens */ export interface ClassicReferralWebhookSchema { id: ReferralId referrer?: ReferrerUser referred?: ReferredUser referralCodeUsed?: ReferralCodeUsed shareLinkUsed?: ShareLinkUsed dateReferralStarted: DateReferralStarted dateConverted?: DateReferralConverted dateModified?: DateReferralModified dateUserModified?: DateUserModified programId?: ProgramId referrerUser: ReferrerUser1 referredUser?: ReferredUser1 fraudSignals?: FraudSignals moderationStatus: ModerationStatus referrerModerationStatus: ReferrerModerationStatus dateReferralPaid?: DateReferralPaid dateReferralEnded?: DateReferralEnded referredModerationStatus: ReferredModerationStatus dateModerated: DateModerated referredReward?: ReferredReward referrerReward?: ReferrerReward } /** * The referrer user in who initiated this referral */ export interface ReferrerUser { id: UserId accountId: AccountId } /** * The referred user who initiated this referral */ export interface ReferredUser { id: UserId accountId: AccountId } /** * Sent whenever a referral event happens and the classic program is disabled */ export interface ClassicDisabledReferralWebhookSchema { id: ReferralId1 referrer: ReferrerUser2 referred: ReferredUser2 referralCodeUsed?: ReferralCodeUsed1 shareLinkUsed?: ShareLinkUsed1 dateReferralStarted: DateReferralStarted1 dateConverted?: DateReferralConverted1 dateModified?: DateReferralModified1 dateUserModified?: DateUserModified1 programId?: ProgramId1 } /** * The referrer user in who initiated this referral */ export interface ReferrerUser2 { id: UserId accountId: AccountId } /** * The referred user who initiated this referral */ export interface ReferredUser2 { id: UserId accountId: AccountId }