UNPKG

@warriorteam/redai-zalo-sdk

Version:

Comprehensive TypeScript/JavaScript SDK for Zalo APIs - Official Account, ZNS, Consultation Service, Group Messaging, and Social APIs

285 lines 4.87 kB
/** * Official Account (OA) related types and interfaces */ /** * Official Account information */ export interface OAInfo { /** * Official Account ID */ oa_id: string; /** * OA name */ name: string; /** * OA description */ description: string; /** * OA alias */ oa_alias: string; /** * Verification status */ is_verified: boolean; /** * OA type (number) */ oa_type: number; /** * Category name */ cate_name: string; /** * Number of followers */ num_follower: number; /** * Avatar URL */ avatar: string; /** * Cover image URL */ cover: string; /** * Package name */ package_name: string; /** * Package expiration date */ package_valid_through_date: string; /** * Package auto-renewal date */ package_auto_renew_date: string; /** * Linked Zalo Cloud Account */ linked_ZCA: string; } /** * Message quota information */ export interface MessageQuota { /** * Daily quota limit */ daily_quota: number; /** * Remaining quota for today */ remaining_quota: number; /** * Quota type (e.g., "free", "paid") */ quota_type: string; /** * Quota reset time (Unix timestamp) */ reset_time: number; } /** * Detailed quota information request */ export interface QuotaMessageRequest { /** * Quota owner (OA or APP) */ quota_owner: string; /** * Product type */ product_type?: 'cs' | 'transaction' | 'gmf10' | 'gmf50' | 'gmf100'; /** * Quota type */ quota_type?: 'sub_quota' | 'purchase_quota' | 'reward_quota'; } /** * Quota asset information */ export interface QuotaAsset { /** * Asset ID */ asset_id: string; /** * Product type */ product_type: string; /** * Quota type */ quota_type: string; /** * Expiration date */ valid_through: string; /** * Auto-renewal status */ auto_renew: boolean; /** * Asset status */ status: 'available' | 'used'; /** * Used ID (for GMF, this is group_id) */ used_id: string | null; /** * Total quota (legacy) */ total?: number; /** * Remaining quota (legacy) */ remain?: number; } /** * Quota message response */ export interface QuotaMessageResponse { /** * List of quota assets */ data: QuotaAsset[]; /** * Error code */ error: number; /** * Response message */ message: string; } /** * GMF product types */ export declare enum GMFProductType { GMF10 = "gmf10", GMF50 = "gmf50", GMF100 = "gmf100" } /** * Quota types */ export declare enum QuotaType { SUB_QUOTA = "sub_quota", PURCHASE_QUOTA = "purchase_quota", REWARD_QUOTA = "reward_quota" } /** * OA settings */ export interface OASettings { /** * Auto-reply settings */ auto_reply?: { enabled: boolean; message?: string; }; /** * Welcome message settings */ welcome_message?: { enabled: boolean; message?: string; }; /** * Business hours */ business_hours?: { enabled: boolean; schedule?: Array<{ day: number; start_time: string; end_time: string; }>; }; } /** * OA statistics */ export interface OAStatistics { /** * Total followers */ total_followers: number; /** * New followers today */ new_followers_today: number; /** * Messages sent today */ messages_sent_today: number; /** * Messages received today */ messages_received_today: number; /** * Engagement rate */ engagement_rate?: number; } /** * OA profile update request */ export interface UpdateOAProfileRequest { /** * OA name */ name?: string; /** * OA description */ description?: string; /** * Avatar image (base64 or URL) */ avatar?: string; /** * Cover image (base64 or URL) */ cover?: string; } /** * OA verification request */ export interface OAVerificationRequest { /** * Business license number */ business_license: string; /** * Business name */ business_name: string; /** * Contact person name */ contact_name: string; /** * Contact phone number */ contact_phone: string; /** * Contact email */ contact_email: string; /** * Additional documents */ documents?: Array<{ type: string; url: string; }>; } //# sourceMappingURL=oa.d.ts.map