/** * Body of POST v2/platform-connect/link. */ export interface ICreatePlatformConnectLinkPayload { /** Store admin's email, prefilled on the connect page. */ suggested_email?: string; } /** * One Joi validation failure as dashboard-api returns it. */ export interface IValidationDetail { message: string; path?: string[]; } /** * Response of POST v2/platform-connect/link, success or failure. */ export interface ICreatePlatformConnectLinkResponse { success?: boolean; message?: string; error?: string; errors?: string | IValidationDetail[]; status?: number; /** One-shot connect page URL on custom.recomaze.ai. */ url?: string; /** The token inside that URL, for polling the link's status. */ token?: string; /** ISO timestamp after which the link stops working. */ expires_at?: string; } /** * Response of GET v2/platform-connect/:token. Only `success` matters to the * plugin: false means the link was consumed or expired. */ export interface IPlatformConnectLinkStatusResponse { success?: boolean; message?: string; status?: number; }