import { AppCategory } from '../config/app-category'; import { AppStatus } from '../types/status'; import { BusinessProfileStatus } from './business-profile.interface'; import { BaseResult } from './response.interface'; export type TypeOfBusiness = 'COMPANY' | 'PERSONAL' | 'ORGANIZATION'; export declare class AppInfo { appName: string; appDescription: string; appCategory: keyof typeof AppCategory; appLogoUrl: string; coverUrl?: string; browsable?: boolean; /** * Mini app's ZaloAppId is being created. * It is only available when using version 2. */ zaloAppId?: string; appSubCategory?: string; subCateIds?: number[] | string; typeOfBusiness?: TypeOfBusiness; } export interface App { appName: string; appId: string; appCategory: keyof typeof AppCategory; appSubCategory?: string; appLogoUrl: string; coverUrl: string; appStatus: AppStatus; zaloAppId?: string; } export interface CreateAppResult extends BaseResult { appId: string; appName: string; zaloAppId?: string; } export interface OAData { oaId: string; name: string; logoUrl: string; certified: boolean; businessInfo?: any; } export interface OAInfo { hasOALinked: boolean; oa?: OAData; status?: number; } /** * App Info Extended * Detailed app metadata including business profile and OA info * Returned by GET /partners/apps/{id}/app-info */ export interface AppInfoExtended { appId: string; zaloAppId: string; appName: string; category: string; subCateIds: number[]; appLogoUrl: string; appStatus: string; browsable: boolean; searchableOnZalo: boolean; typeOfBusiness: TypeOfBusiness; verifyStatus: BusinessProfileStatus; oaInfo: OAInfo; } /** * Get App Info Request (Partner API only) */ export interface GetAppInfoRequest { miniAppId: string; } /** * Get App Info Response * Returns detailed app metadata * Note: doGet() spreads the data object, so response is flattened */ export interface GetAppInfoResponse extends BaseResult, AppInfoExtended { } /** * Update App Info Request (Partner API only) * Updates app category and/or sub-category IDs */ export interface UpdateAppInfoRequest { miniAppId: string; /** Main category (e.g. ECOMMERCE, REAL_ESTATE). Optional if only updating subCateIds. */ category?: keyof typeof AppCategory; subCateIds: number[]; } /** * Update App Info Response */ export interface UpdateAppInfoResponse { error: number; message: string; }