UNPKG

@warriorteam/redai-zalo-sdk

Version:

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

68 lines 2.42 kB
/** * Official Account (OA) service for Zalo API */ import { ZaloClient } from '../clients/zalo-client'; import { OAInfo, MessageQuota, QuotaMessageRequest, QuotaAsset, OAStatistics, UpdateOAProfileRequest, GMFProductType } from '../types/oa'; /** * Official Account service for managing OA information and settings */ export declare class OAService { private readonly client; private readonly endpoints; constructor(client: ZaloClient); /** * Get Official Account information */ getOAInfo(accessToken: string): Promise<OAInfo>; /** * Get message quota information */ getMessageQuota(accessToken: string): Promise<MessageQuota>; /** * Get detailed quota message information */ getDetailedQuotaMessage(accessToken: string, request: QuotaMessageRequest): Promise<QuotaAsset[]>; /** * Get quota for specific product type */ getQuotaByProductType(accessToken: string, productType: 'cs' | 'transaction' | 'gmf10' | 'gmf50' | 'gmf100', quotaType?: 'sub_quota' | 'purchase_quota' | 'reward_quota'): Promise<QuotaAsset[]>; /** * Get available GMF quota */ getGMFQuota(accessToken: string, gmfType?: GMFProductType): Promise<QuotaAsset[]>; /** * Get consultation message quota */ getConsultationQuota(accessToken: string): Promise<QuotaAsset[]>; /** * Get transaction message quota */ getTransactionQuota(accessToken: string): Promise<QuotaAsset[]>; /** * Update OA profile information */ updateOAProfile(accessToken: string, profileData: UpdateOAProfileRequest): Promise<boolean>; /** * Get OA statistics (if available) */ getOAStatistics(accessToken: string): Promise<OAStatistics>; /** * Check if OA has sufficient quota for message type */ hasQuotaForMessageType(accessToken: string, messageType: 'cs' | 'transaction' | 'promotion', requiredCount?: number): Promise<boolean>; /** * Get quota summary for all message types */ getQuotaSummary(accessToken: string): Promise<{ consultation: QuotaAsset[]; transaction: QuotaAsset[]; gmf10: QuotaAsset[]; gmf50: QuotaAsset[]; gmf100: QuotaAsset[]; }>; /** * Validate OA access token by getting OA info */ validateOAToken(accessToken: string): Promise<boolean>; } //# sourceMappingURL=oa.service.d.ts.map