import { type BadgeResult } from "@raytio/core"; import type { AId, IId, Instance, RealVer } from "@raytio/types"; import { type Config, type InstanceDataToPassOn } from "../constants.js"; import { type FlatPO } from "../helpers/index.js"; import { type EnvConfig } from "../api/index.js"; import type { ApplicationEncryptorLike } from "../types.js"; type DecryptData = { apiToken: string; instance: Instance; encryptedInstance: Instance; applicationDecryptor: ApplicationEncryptorLike; realVers?: RealVer[]; badgeResults?: BadgeResult[]; }; export interface ProcessSubmissionInput { /** The a_id of the application */ applicationId: AId; /** The i_id of this submission */ instanceId: IId; /** whether to enable extra logging. Default = false */ verbose?: boolean; /** * the configuration options. You can extract these from the environment * variables by using @see getAndValidateConfig */ config: Config; /** You can optionally supply Instance data and an API token - for Raytio internal use */ _supliedConfig?: DecryptData; } export interface ProcessSubmissionOutput { /** details of the submission, included the decrypted profile objects */ json: InstanceDataToPassOn & { profile_objects: { [schemaName: string]: FlatPO[]; }; badgeResults?: BadgeResult[]; }; /** A string of a CSV file containing the same data as in `json` */ csv: string; /** an object of files that were attached to the submission, such as images */ files: { [nId: string]: [dataUrl: string, fileExtension: string]; }; /** the a_id is passed on */ a_id: AId; /** passed down so that pdf generation has access to it */ client_url: string; /** passed down so that pdf generation has access to it */ envConfig: EnvConfig; } export declare function processSubmission({ applicationId, instanceId, verbose, config, _supliedConfig, }: ProcessSubmissionInput): Promise; export {};