/*** * * 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 * ***/ /*** * UserCreatedData.schema.json * Generated on 2026-03-20T21:11:43.825Z * This file was automatically generated. DO NOT edit it by hand, instead edit the related JSON Schema file. ***/ /** * Sent whenever a new user is created in SaaSquatch program where the classic program is enabled. */ export type ClassicUserCreatedWebhookSchema = (ClassicUserCreatedWebhookSchema1 | UserCreatedWebhookSchema) /** * The user's unique identifier */ export type UserId = string /** * The user's unique account identifier */ export type AccountId = string /** * The user's email address */ export type Email = (string | null) /** * The user's first name */ export type FirstName = (string | null) /** * The user's last name */ export type LastName = (string | null) /** * The initial of the user's last name */ export type LastInitial = (string | null) /** * The referral code this user will share to refer others */ export type ReferralCode = string /** * The URL to an image of this user */ export type ImageUrl = (string | null) /** * The IP address of this user when they were first seen by SaaSquatch */ export type FirstSeenIP = (string | null) /** * The IP address of this user when they were most recently seen by SaaSquatch */ export type LastSeenIP = (string | null) /** * A timestamp of the date this user was created */ export type DateCreated = number /** * An MD5 has of this user's email address */ export type EmailHash = (string | null) /** * The source of the referral as defined by referral cookie (deprecated) */ export type ReferralSource = (string | null) /** * This user's unique locale */ export type Locale = (string | null) /** * The user's country code */ export type CountryCode = (string | null) /** * The primary referral code associated with the programId key * * This interface was referenced by `ReferralCodes`'s JSON-Schema definition * via the `patternProperty` "^[a-zA-Z0-9-]{1,64}$". */ export type ReferralCode1 = string /** * The anonymous cookie user identifier associated with this user if applicable (see anonymous users) */ export type AnonymousCookieUserId = (string | null) /** * Unique user identifier for tenants using a v1 payment provider integration (e.g. Stripe/Recurly) */ export type PaymentProviderId = (string | null) /** * True if this user can be referred in a program by other users */ export type Referable = boolean /** * The date the referral was blocked */ export type DateBlocked = (string | null) /** * The share link tracked with DIRECT share medium and UNKNOWN engagement medium */ export type DirectShareLink = string /** * The share link tracked with FACEBOOK share medium and UNKNOWN engagement medium */ export type FacebookShareLink = string /** * The share link tracked with TWITTER share medium and UNKNOWN engagement medium */ export type TwitterShareLink = string /** * The share link tracked with EMAIL share medium and UNKNOWN engagement medium */ export type EmailShareLink = string /** * The share link tracked with LINKEDIN share medium and UNKNOWN engagement medium */ export type LinkedInShareLink = string /** * The share link tracked with DIRECT share medium and MOBILE engagement medium */ export type MobileDirectShareLink = string /** * The share link tracked with FACEBOOK share medium and MOBILE engagement medium */ export type MobileFacebookShareLink = string /** * The share link tracked with TWITTER share medium and MOBILE engagement medium */ export type MobileTwitterShareLink = string /** * The share link tracked with EMAIL share medium and MOBILE engagement medium */ export type MobileEmailShareLink = string /** * The share link tracked with DIRECT share medium */ export type DirectShareLink1 = string /** * The share link tracked with FACEBOOK share medium */ export type FacebookShareLink1 = string /** * The share link tracked with TWITTER share medium */ export type TwitterShareLink1 = string /** * The share link tracked with EMAIL share medium */ export type EmailShareLink1 = string /** * The share link tracked with LINKEDIN share medium */ export type LinkedInShareLink1 = string /** * Any codes used to refer this user */ export type ReferredByCodes = string[] /** * Any segments this user belongs to */ export type UserSegments = string[] /** * If the program's primary link is a vanity link then this will be the unencoded link, if not it is the UNKNOWN engagement medium and UNKOWN share medium link */ export type CleanLinkForGivenProgram = string /** * Share link associated with the DIRECT share medium */ export type DirectShareLink2 = string /** * The user's unique identifier */ export type UserId1 = string /** * The user's unique account identifier */ export type AccountId1 = string /** * The user's email address */ export type Email1 = (string | null) /** * The user's first name */ export type FirstName1 = (string | null) /** * The user's last name */ export type LastName1 = (string | null) /** * The URL to an image of this user */ export type ImageUrl1 = (string | null) /** * The IP address of this user when they were first seen by SaaSquatch */ export type FirstSeenIP1 = (string | null) /** * The IP address of this user when they were most recently seen by SaaSquatch */ export type LastSeenIP1 = (string | null) /** * A timestamp of the date this user was created */ export type DateCreated1 = number /** * This user's unique locale */ export type Locale1 = (string | null) /** * The user's country code */ export type CountryCode1 = (string | null) /** * True if this user can be referred in a program by other users */ export type Referable1 = boolean /** * Any codes used to refer this user */ export type ReferredByCodes1 = string[] /** * The anonymous cookie user identifier associated with this user if applicable (see anonymous users) */ export type AnonymousCookieUserId1 = (string | null) /** * The date the referral was blocked */ export type DateBlocked1 = (string | null) /** * Any segments this user belongs to */ export type UserSegments1 = string[] /** * Sent whenever a new user is created in SaaSquatch program where the classic program is enabled. */ export interface ClassicUserCreatedWebhookSchema1 { id: UserId accountId: AccountId email?: Email firstName?: FirstName lastName?: LastName lastInitial?: LastInitial referralCode: ReferralCode imageUrl?: ImageUrl firstSeenIP?: FirstSeenIP lastSeenIP?: LastSeenIP dateCreated: DateCreated emailHash?: EmailHash referralSource?: ReferralSource locale?: Locale countryCode?: CountryCode referralCodes: ReferralCodes cookieId?: AnonymousCookieUserId paymentProviderId?: PaymentProviderId referable: Referable dateBlocked?: DateBlocked shareLinks: ShareLinks referredByCodes?: ReferredByCodes customFields?: CustomFields segments?: UserSegments programShareLinks?: ProgramShareLinks } /** * A map of programs to referral codes. */ export interface ReferralCodes { [k: string]: ReferralCode1 } /** * Links this user can share to make referrals * * This interface was referenced by `ClassicUserCreatedWebhookSchema1`'s JSON-Schema * via the `definition` "classicShareLinks". */ export interface ShareLinks { shareLink: DirectShareLink facebookShareLink: FacebookShareLink twitterShareLink: TwitterShareLink emailShareLink: EmailShareLink linkedinShareLink: LinkedInShareLink mobileShareLink: MobileDirectShareLink mobileFacebookShareLink: MobileFacebookShareLink mobileTwitterShareLink: MobileTwitterShareLink mobileEmailShareLink: MobileEmailShareLink EMBED: EmbeddedWidgetShareLinks POPUP: PopupWidgetShareLinks HOSTED: HostedWidgetShareLinks MOBILE: MobileWidgetShareLinks EMAIL: EmailWidgetShareLinks } /** * A list of share links associated with the EMBED engagement medium */ export interface EmbeddedWidgetShareLinks { shareLink: DirectShareLink1 facebookShareLink: FacebookShareLink1 twitterShareLink: TwitterShareLink1 emailShareLink: EmailShareLink1 linkedinShareLink: LinkedInShareLink1 } /** * A list of share links associated with the POPUP engagement medium */ export interface PopupWidgetShareLinks { shareLink: DirectShareLink1 facebookShareLink: FacebookShareLink1 twitterShareLink: TwitterShareLink1 emailShareLink: EmailShareLink1 linkedinShareLink: LinkedInShareLink1 } /** * A list of share links associated with the HOSTED engagement medium */ export interface HostedWidgetShareLinks { shareLink: DirectShareLink1 facebookShareLink: FacebookShareLink1 twitterShareLink: TwitterShareLink1 emailShareLink: EmailShareLink1 linkedinShareLink: LinkedInShareLink1 } /** * A list of share links associated with the MOBILE engagement medium */ export interface MobileWidgetShareLinks { shareLink: DirectShareLink1 facebookShareLink: FacebookShareLink1 twitterShareLink: TwitterShareLink1 emailShareLink: EmailShareLink1 linkedinShareLink: LinkedInShareLink1 } /** * A list of share links associated with the EMAIL engagement medium */ export interface EmailWidgetShareLinks { shareLink: DirectShareLink1 facebookShareLink: FacebookShareLink1 twitterShareLink: TwitterShareLink1 emailShareLink: EmailShareLink1 linkedinShareLink: LinkedInShareLink1 } /** * Any custom fields set for this user */ export interface CustomFields { /** * This interface was referenced by `CustomFields`'s JSON-Schema definition * via the `patternProperty` "^[a-zA-Z0-9_]{1,64}$". * * This interface was referenced by `CustomFields1`'s JSON-Schema definition * via the `patternProperty` "^[a-zA-Z0-9_]{1,64}$". */ [k: string]: (string | boolean | number | null) } /** * Links this user can share to make referrals */ export interface ProgramShareLinks { [k: string]: ProgramShareLink } /** * The primary share links available for this program * * This interface was referenced by `ProgramShareLinks`'s JSON-Schema definition * via the `patternProperty` "^[a-zA-Z0-9-]{1,64}$". */ export interface ProgramShareLink { cleanShareLink: CleanLinkForGivenProgram MOBILE: MobileShareLinks EMAIL: EmailShareLinks UNKNOWN: ShareLinks1 } /** * Share links tracked with the MOBILE engagement medium */ export interface MobileShareLinks { DIRECT: DirectShareLink2 } /** * Share links tracked with the EMAIL engagement medium */ export interface EmailShareLinks { DIRECT: DirectShareLink2 } /** * Share links tracked with the UNKNOWN engagement medium */ export interface ShareLinks1 { DIRECT: DirectShareLink2 } /** * Sent whenever a new user is created in SaaSquatch program where the classic program is disabled. */ export interface UserCreatedWebhookSchema { id: UserId1 accountId: AccountId1 email?: Email1 firstName?: FirstName1 lastName?: LastName1 imageUrl?: ImageUrl1 firstSeenIP?: FirstSeenIP1 lastSeenIP?: LastSeenIP1 dateCreated: DateCreated1 locale?: Locale1 countryCode?: CountryCode1 referralCodes?: ReferralCodes referable: Referable1 referredByCodes?: ReferredByCodes1 cookieId?: AnonymousCookieUserId1 dateBlocked?: DateBlocked1 customFields?: CustomFields1 segments?: UserSegments1 programShareLinks?: ProgramShareLinks } /** * Any custom fields set for this user */ export interface CustomFields1 { /** * This interface was referenced by `CustomFields`'s JSON-Schema definition * via the `patternProperty` "^[a-zA-Z0-9_]{1,64}$". * * This interface was referenced by `CustomFields1`'s JSON-Schema definition * via the `patternProperty` "^[a-zA-Z0-9_]{1,64}$". */ [k: string]: (string | boolean | number | null) }