/*** * * 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 * ***/ /*** * ExportData.schema.json * Generated on 2026-03-20T21:11:43.667Z * This file was automatically generated. DO NOT edit it by hand, instead edit the related JSON Schema file. ***/ /** * The unique identifier for this export */ export type ExportId = string /** * The name of this export (e.g. User Details) */ export type ExportName = (string | null) /** * The person or machine that requested this export */ export type Requester = string /** * The status of this export (e.g. is it running/finished?) */ export type Status = ("PENDING" | "ABORTED" | "COMPLETED") /** * The date this export was created */ export type DateCreated = number /** * The date this export completed */ export type DateCompleted = (number | null) /** * The email address that will receive a download link for this export when it completes */ export type NotificationEmailAddress = (string | null) /** * The date this export expires (e.g. when it will no longer be downloadable) */ export type DateExpires = (number | null) /** * The format this export will be generated in (e.g. CSV or Excel) */ export type OutputFormat = ("XLSX" | "CSV") /** * The type of export generated */ export type ExportType = ("USER" | "REFERRAL" | "REWARD_BALANCE" | "USER_REWARD_BALANCE" | "USER_REFERRAL" | "REFERRAL_PARTICIPANT" | "REDEEMABLE_REWARD_BALANCE") /** * The operation being performed (for exports this is always QUERY) */ export type Operation = string /** * Statistics recorded upon completions of the export */ export type ExportStats = (({ recordsProcessed?: RecordsProcessed errors?: Errors } | (null & { recordsProcessed?: RecordsProcessed errors?: Errors })) & { recordsProcessed?: RecordsProcessed errors?: Errors }) /** * The number of records that were processed to complete this export */ export type RecordsProcessed = number /** * The number of errors that occurred while running this export */ export type Errors = number /** * A link to an uploaded file, if this export was based on an uploaded file (e.g. a list of redemption) */ export type UploadedFileReference = (string | null) /** * Sent whenever a data export activity happens (e.g. export created/completed) */ export interface ExportWebhookSchema { id: ExportId name?: ExportName requester: Requester status: Status dateCreated: DateCreated dateCompleted?: DateCompleted mailtoEmail?: NotificationEmailAddress dateExpires?: DateExpires outputFormat: OutputFormat task: ExportType operation: Operation params?: ExportFilters stats?: ExportStats fileRef?: UploadedFileReference } /** * These parameters are used to filter the export (e.g. by date or program) */ export interface ExportFilters { [k: string]: unknown }