/** * Base response structure for all API calls */ export interface BaseResponse { /** Return code, 1 for success, other values for failure */ showapi_res_code: number; /** Error message when showapi_res_code !== 1 */ showapi_res_error: string; } /** * Request parameters for binding a user to a device */ export interface BindUserRequest { /** Access Key */ ak: string; /** Timestamp in format 'YYYY-MM-DD HH:mm:ss' */ timestamp: string; /** Memobird device ID (obtained by double-clicking the device) */ memobirdID: string; /** User unique identifier */ useridentifying: string; } /** * Response from binding a user to a device */ export interface BindUserResponse extends BaseResponse { /** User ID returned after successful binding */ showapi_userid?: number; } /** * Request parameters for printing content */ export interface PrintRequest { /** Access Key */ ak: string; /** Timestamp in format 'YYYY-MM-DD HH:mm:ss' */ timestamp: string; /** Print content in format 'T:base64text' or 'P:base64image' */ printcontent: string; /** Memobird device ID */ memobirdID: string; /** User ID from binding response */ userID: number; } /** * Response from print operations */ export interface PrintResponse extends BaseResponse { /** 1 if printed, 0 or other values if not printed */ result?: number; /** Unique ID for the print content */ printcontentid?: number; /** Device GUID */ smartGuid?: string; } /** * Request parameters for checking print status */ export interface PrintStatusRequest { /** Access Key */ ak: string; /** Timestamp in format 'YYYY-MM-DD HH:mm:ss' */ timestamp: string; /** Print content ID from print response */ printcontentid: string; } /** * Response from print status check */ export interface PrintStatusResponse extends BaseResponse { /** 1 if printed, 0 or other values if not printed */ printflag?: number; /** Print content ID */ printcontentID?: string; } /** * Request parameters for converting image to monochrome bitmap */ export interface ConvertImageRequest { /** Access Key */ ak: string; /** JPG or PNG image as Base64 string */ imgBase64String: string; } /** * Response from image conversion */ export interface ConvertImageResponse extends BaseResponse { /** Monochrome bitmap Base64 string ready for printing */ result?: string; } /** * Request parameters for printing from URL */ export interface PrintFromUrlRequest { /** Access Key */ ak: string; /** Timestamp in format 'YYYY-MM-DD HH:mm:ss' */ timestamp: string; /** URL of the web page to print */ printUrl: string; /** Memobird device ID */ memobirdID: string; /** User ID from binding response */ userID: number; } /** * Request parameters for printing from HTML */ export interface PrintFromHtmlRequest { /** Access Key */ ak: string; /** Timestamp in format 'YYYY-MM-DD HH:mm:ss' */ timestamp: string; /** HTML source as GBK Base64 + URL encoded */ printHtml: string; /** Memobird device ID */ memobirdID: string; /** User ID from binding response */ userID: number; } //# sourceMappingURL=api.d.ts.map