koishi-plugin-my-pig-group-friends 1.1.1 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ import { Context } from 'koishi';
2
+ /**
3
+ * Search for a photo on Pexels and return a randomly selected large-sized URL
4
+ * Fetches multiple results and randomly selects one to avoid repetitive images
5
+ * @returns The photo URL or null if not found/error
6
+ */
7
+ export declare function searchPexelsPhoto(ctx: Context, apiKey: string, query: string, debug?: boolean): Promise<string | null>;
@@ -0,0 +1,38 @@
1
+ import { Context } from 'koishi';
2
+ import { Config } from '../config';
3
+ import { PigTravelLog } from '../database';
4
+ export interface MonthlySummaryData {
5
+ userId: string;
6
+ platform: string;
7
+ username: string;
8
+ avatarUrl: string;
9
+ year: number;
10
+ month: number;
11
+ logs: PigTravelLog[];
12
+ totalTrips: number;
13
+ countriesVisited: string[];
14
+ locationsVisited: string[];
15
+ }
16
+ export interface SummaryCardResult {
17
+ buffer: Buffer;
18
+ filename: string;
19
+ }
20
+ /**
21
+ * 获取指定用户指定月份的旅行记录
22
+ */
23
+ export declare function getMonthlyLogs(ctx: Context, userId: string, platform: string, year: number, month: number): Promise<PigTravelLog[]>;
24
+ /**
25
+ * 获取所有有旅行记录的用户(指定月份)
26
+ */
27
+ export declare function getUsersWithLogsInMonth(ctx: Context, year: number, month: number): Promise<{
28
+ userId: string;
29
+ platform: string;
30
+ }[]>;
31
+ /**
32
+ * 生成月度总结卡片
33
+ */
34
+ export declare function generateMonthlySummaryCard(ctx: Context, config: Config, data: MonthlySummaryData): Promise<SummaryCardResult>;
35
+ /**
36
+ * 准备月度总结数据
37
+ */
38
+ export declare function prepareMonthlySummary(ctx: Context, userId: string, platform: string, username: string, avatarUrl: string, year: number, month: number): Promise<MonthlySummaryData>;
@@ -1,6 +1,7 @@
1
1
  import { Context } from 'koishi';
2
2
  /**
3
- * Search for a photo on Unsplash and return the regular-sized URL
3
+ * Search for a photo on Unsplash and return a randomly selected regular-sized URL
4
+ * Fetches multiple results and randomly selects one to avoid repetitive images
4
5
  * @returns The photo URL or null if not found/error
5
6
  */
6
7
  export declare function searchUnsplashPhoto(ctx: Context, accessKey: string, query: string, debug?: boolean): Promise<string | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-my-pig-group-friends",
3
- "version": "1.1.1",
3
+ "version": "1.1.4",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [