/*** * * 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 * ***/ /*** * ReferralImportLine.schema.json * Generated on 2026-03-20T21:11:42.982Z * This file was automatically generated. DO NOT edit it by hand, instead edit the related JSON Schema file. ***/ /** * This user's unique identifier */ export type UserId = string /** * The unique identifier of the account this user belongs to */ export type AccountId = string /** * This user's unique identifier */ export type UserId1 = string /** * The unique identifier of the account this user belongs to */ export type AccountId1 = string export type ProgramId = string export type DateReferralStarted = number export type DateConverted = number /** * Defines the reward API data input structure. */ export type RewardAPIInput = (({ type: "PCT_DISCOUNT" discountPercent: DiscountPercent name?: RewardName dateExpires?: RewardExpiryDate cancellable?: Cancellable dateScheduledFor?: ScheduledRewardGivenDate programRewardKey?: RewardKey dateGiven?: DateGiven userId?: UserId2 accountId?: AccountId2 } | { type: "FUELTANK" fuelTankCode: FuelTankCode unit?: Unit amount: Amount dateExpires?: RewardExpiryDate fuelTankType: FuelTankType cancellable?: Cancellable programRewardKey?: RewardKey1 dateGiven?: DateGiven1 userId?: UserId3 accountId?: AccountId3 } | { type: "CREDIT" unit: Unit name?: RewardName assignedCredit: AssignedCredit dateExpires?: RewardExpiryDate cancellable?: Cancellable dateScheduledFor?: ScheduledRewardGivenDate redemptions?: Redemptions programRewardKey?: RewardKey2 dateGiven?: DateGiven2 userId?: UserId4 accountId?: AccountId4 } | { type: "INTEGRATION" unit: Unit name?: RewardName description?: RewardDescription valueInCents: RewardAmount integrationSettings: IntegrationSettings programRewardKey?: RewardKey3 dateGiven?: DateGiven3 userId?: UserId5 accountId?: AccountId5 }) & { type?: RewardType [k: string]: unknown }) /** * The discount associated with this reward */ export type DiscountPercent = number /** * This interface was referenced by `ReferralImportLine`'s JSON-Schema * via the `definition` "rewardName". */ export type RewardName = (string | null) /** * The date this reward will expire * * This interface was referenced by `ReferralImportLine`'s JSON-Schema * via the `definition` "rewardDateExpires". */ export type RewardExpiryDate = (number | null) /** * Whether this reward can be cancelled * * This interface was referenced by `ReferralImportLine`'s JSON-Schema * via the `definition` "rewardCancellable". */ export type Cancellable = (boolean | null) /** * If the reward is created in a PENDING state this is the date we will attempt to 'give' it * * This interface was referenced by `ReferralImportLine`'s JSON-Schema * via the `definition` "rewardDateScheduledFor". */ export type ScheduledRewardGivenDate = (number | null) export type RewardKey = string export type DateGiven = number export type UserId2 = string export type AccountId2 = string /** * The associated coupon code uploaded via the fuel tank API or portal code manager */ export type FuelTankCode = string /** * The unit of credit associated with this reward (i.e. months or usd) * * This interface was referenced by `ReferralImportLine`'s JSON-Schema * via the `definition` "rewardUnit". */ export type Unit = string /** * The amount of credit or discount to be given */ export type Amount = string /** * The type of fuel tank reward being given */ export type FuelTankType = ("PCT_DISCOUNT" | "CREDIT") export type RewardKey1 = string export type DateGiven1 = number export type UserId3 = string export type AccountId3 = string /** * The initial redeemable credit assigned to be assigned to reward */ export type AssignedCredit = number export type RedeemedAmount = number export type DateRedeemed = number /** * This interface was referenced by `ReferralImportLine`'s JSON-Schema * via the `definition` "redemptions". */ export type Redemptions = { quantityRedeemed: RedeemedAmount dateRedeemed?: DateRedeemed }[] export type RewardKey2 = string export type DateGiven2 = number export type UserId4 = string export type AccountId4 = string /** * This text describes the integration reward given in more detail */ export type RewardDescription = string /** * The value in base currency unit (i.e. cents) to be assigned to this reward */ export type RewardAmount = string export type EmailTemplateID = string export type RewardKey3 = string export type DateGiven3 = number export type UserId5 = string export type AccountId5 = string export type RewardType = ("PCT_DISCOUNT" | "FUELTANK" | "CREDIT" | "INTEGRATION") /** * The unit of credit associated with this reward (i.e. months or usd) * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "rewardUnit". */ export type Unit1 = string /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "rewardName". */ export type RewardName1 = (string | null) /** * The date this reward will expire * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "rewardDateExpires". */ export type RewardExpiryDate1 = (number | null) /** * Whether this reward can be cancelled * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "rewardCancellable". */ export type Cancellable1 = (boolean | null) /** * If the reward is created in a PENDING state this is the date we will attempt to 'give' it * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "rewardDateScheduledFor". */ export type ScheduledRewardGivenDate1 = (number | null) export type EmailTemplateID1 = string /** * This interface was referenced by `ReferralImportLine`'s JSON-Schema * via the `definition` "rewards". */ export type Rewards = RewardAPIInput[] /** * Represents the schema for a single line of the referral import JSONL file */ export interface ReferralImportLine { referrerUser: UserIdentifierSchema referredUser: UserIdentifierSchema1 programId: ProgramId dateReferralStarted?: DateReferralStarted dateConverted?: DateConverted rewards?: Rewards } /** * The unique identifiers used to distinguish a user. */ export interface UserIdentifierSchema { id: UserId accountId: AccountId } /** * The unique identifiers used to distinguish a user. */ export interface UserIdentifierSchema1 { id: UserId1 accountId: AccountId1 } /** * This interface was referenced by `ReferralImportLine`'s JSON-Schema * via the `definition` "integrationSettings". */ export interface IntegrationSettings { templateId?: EmailTemplateID giftId?: string utid?: string [k: string]: unknown } /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "integrationSettings". */ export interface IntegrationSettings1 { templateId?: EmailTemplateID1 giftId?: string utid?: string [k: string]: unknown }