redai-automation-web-sdk
Version:
TypeScript SDK for RedAI Automation Web API - Zalo Personal automation, messaging, and search. 100% compatible with automation-web backend. Now includes SearchModule for stickers and link parsing.
147 lines • 2.87 kB
TypeScript
/**
* 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;
}
export interface GetStickersResponse {
/**
* Array of sticker IDs
* @example [123, 456, 789]
*/
result: number[];
}
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;
/**
* Sticker name/title
* @example "Happy Face"
*/
name?: string;
/**
* Sticker image URL
* @example "https://sticker.zalo.me/123.png"
*/
imageUrl?: string;
/**
* Sticker category
* @example "emotions"
*/
category?: string;
/**
* Additional metadata
*/
metadata?: Record<string, 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>;
}
//# sourceMappingURL=search.types.d.ts.map