UNPKG

redai-automation-web-sdk

Version:

TypeScript SDK for RedAI Automation Web API - Zalo Personal automation, messaging, advanced sticker search, and bulk operations. 100% compatible with automation-web backend. v1.8.1: Updated GroupInfo interface to match backend controller with complete gro

319 lines 6.01 kB
/** * Search DTOs - 100% khớp với automation-web search.dto.ts */ export interface GetStickersRequest { /** * Session ID của Zalo Personal * @example "session-123" */ sessionId: string; /** * Keyword to search for stickers * @example "hello" */ keyword: string; /** * Số lượng sticker tối đa trả về * @example 20 * @default 20 * @minimum 1 * @maximum 100 */ limit?: number; /** * Có lấy chi tiết sticker luôn không * @example false * @default false */ includeDetails?: boolean; } export interface GetStickersResponse { /** * Array of sticker IDs * @example [123, 456, 789] */ result: number[]; /** * Chi tiết sticker (nếu includeDetails = true) */ details?: StickerDetailItem[]; /** * Tổng số sticker tìm thấy * @example 50 */ total: number; /** * Keyword đã tìm kiếm * @example "hello" */ keyword: string; } export interface GetStickersDetailRequest { /** * Session ID của Zalo Personal * @example "session-123" */ sessionId: string; /** * Array of sticker IDs to get details for * @example [123, 456, 789] */ stickerIds: number[]; } export interface StickerDetailItem { /** * Sticker ID * @example 123 */ id: number; /** * Category ID * @example 1 */ cateId: number; /** * Sticker type * @example 1 */ type: number; /** * Sticker text * @example "Hello" */ text: string; /** * Sticker URI * @example "sticker_uri" */ uri: string; /** * File key * @example 12345 */ fkey: number; /** * Sticker status * @example 1 */ status: number; /** * Sticker URL * @example "https://example.com/sticker.png" */ stickerUrl: string; /** * Sticker sprite URL * @example "https://example.com/sticker_sprite.png" */ stickerSpriteUrl: string; /** * Sticker WebP URL */ stickerWebpUrl: any; /** * Total frames * @example 1 */ totalFrames: number; /** * Duration * @example 0 */ duration: number; /** * Effect ID * @example 0 */ effectId: number; /** * Checksum * @example "abc123def456" */ checksum: string; /** * Extension * @example 0 */ ext: number; /** * Source * @example 0 */ source: number; /** * FSS */ fss: any; /** * FSS Info */ fssInfo: any; /** * Version * @example 1 */ version: number; /** * Extended info */ extInfo: any; } export interface GetStickersDetailResponse { /** * Array of sticker details */ result: StickerDetailItem[]; } export interface ParseLinkRequest { /** * Session ID của Zalo Personal * @example "session-123" */ sessionId: string; /** * URL to parse * @example "https://example.com/article" */ url: string; } export interface LinkMetadata { /** * Page title * @example "Example Article Title" */ title?: string; /** * Page description * @example "This is an example article description" */ description?: string; /** * Page image URL * @example "https://example.com/image.jpg" */ image?: string; /** * Site name * @example "Example Site" */ siteName?: string; /** * Original URL * @example "https://example.com/article" */ url?: string; /** * Content type * @example "article" */ type?: string; /** * Additional metadata */ metadata?: Record<string, any>; } export interface ParseLinkResponse { /** * Parsed link metadata */ result: LinkMetadata; } /** * Base search request interface */ export interface BaseSearchRequest { /** * Session ID của Zalo Personal */ sessionId: string; } /** * Search error response */ export interface SearchErrorResponse { /** * Error message */ error: string; /** * Error code (optional) */ code?: string; /** * Additional error details */ details?: Record<string, any>; } export interface SearchStickersWithDetailsRequest { /** * Session ID của Zalo Personal * @example "session-123" */ sessionId: string; /** * Keyword to search for stickers * @example "hello" */ keyword: string; /** * Số lượng sticker tối đa trả về * @example 10 * @default 10 * @minimum 1 * @maximum 50 */ limit?: number; } export interface SearchStickersWithDetailsResponse { /** * Danh sách sticker với chi tiết đầy đủ */ stickers: StickerDetailItem[]; /** * Tổng số sticker tìm thấy * @example 25 */ total: number; /** * Keyword đã tìm kiếm * @example "hello" */ keyword: string; /** * Thời gian tìm kiếm (ms) * @example 1250 */ searchTime: number; } export interface GetPopularStickersRequest { /** * Session ID của Zalo Personal * @example "session-123" */ sessionId: string; /** * Số lượng sticker phổ biến trả về * @example 20 * @default 20 * @minimum 1 * @maximum 100 */ limit?: number; /** * Category ID để lọc sticker * @example 1 */ categoryId?: number; } export interface GetPopularStickersResponse { /** * Danh sách sticker phổ biến */ stickers: StickerDetailItem[]; /** * Tổng số sticker * @example 20 */ total: number; } //# sourceMappingURL=search.types.d.ts.map