@lobehub/market-sdk 0.23.7 → 0.23.9-beta.1

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.
package/dist/index.d.mts CHANGED
@@ -1040,6 +1040,200 @@ interface PluginQueryParams {
1040
1040
  tags?: string;
1041
1041
  }
1042
1042
 
1043
+ /**
1044
+ * Available tool names for Code Interpreter
1045
+ * Note: Session management (createSession, destroySession, getSessionInfo) is handled
1046
+ * internally by the server - sessions are automatically created when needed and
1047
+ * recreated if expired.
1048
+ */
1049
+ type CodeInterpreterToolName = 'editLocalFile' | 'executeCode' | 'exportFile' | 'getCommandOutput' | 'globLocalFiles' | 'grepContent' | 'killCommand' | 'listLocalFiles' | 'moveLocalFiles' | 'readLocalFile' | 'renameLocalFile' | 'runCommand' | 'searchLocalFiles' | 'writeLocalFile';
1050
+ /**
1051
+ * Request for RunBuildInTools API
1052
+ */
1053
+ interface RunBuildInToolsRequest {
1054
+ /** Tool-specific parameters */
1055
+ params: Record<string, any>;
1056
+ /** Tool name to execute */
1057
+ toolName: CodeInterpreterToolName;
1058
+ /** Topic/conversation ID for session isolation */
1059
+ topicId: string;
1060
+ /** User ID for session isolation */
1061
+ userId: string;
1062
+ }
1063
+ /**
1064
+ * Success response data from RunBuildInTools
1065
+ */
1066
+ interface RunBuildInToolsSuccessData {
1067
+ /** Tool execution result */
1068
+ result: any;
1069
+ /** Indicates if the session was expired and recreated */
1070
+ sessionExpiredAndRecreated: boolean;
1071
+ /** Name of the executed tool */
1072
+ toolName: string;
1073
+ }
1074
+ /**
1075
+ * Error response data from RunBuildInTools
1076
+ */
1077
+ interface RunBuildInToolsError {
1078
+ /** Error code */
1079
+ code: string;
1080
+ /** Additional error details */
1081
+ details?: any;
1082
+ /** Human-readable error message */
1083
+ message: string;
1084
+ }
1085
+ /**
1086
+ * Response from RunBuildInTools API
1087
+ */
1088
+ interface RunBuildInToolsResponse {
1089
+ /** Success data (present when success=true) */
1090
+ data?: RunBuildInToolsSuccessData;
1091
+ /** Error data (present when success=false) */
1092
+ error?: RunBuildInToolsError;
1093
+ /** Whether the operation succeeded */
1094
+ success: boolean;
1095
+ }
1096
+ /**
1097
+ * Supported programming languages for code execution
1098
+ */
1099
+ type ProgrammingLanguage = 'javascript' | 'python' | 'typescript';
1100
+ /** Parameters for executeCode tool */
1101
+ interface ExecuteCodeParams {
1102
+ /** Code to execute */
1103
+ code: string;
1104
+ /** Programming language (default: python) */
1105
+ language?: ProgrammingLanguage;
1106
+ }
1107
+ /** Parameters for runCommand tool */
1108
+ interface RunCommandParams {
1109
+ /** Whether to run in background */
1110
+ background?: boolean;
1111
+ /** Command to execute */
1112
+ command: string;
1113
+ /** Timeout in milliseconds */
1114
+ timeout?: number;
1115
+ }
1116
+ /** Parameters for getCommandOutput tool */
1117
+ interface GetCommandOutputParams {
1118
+ /** Background command ID */
1119
+ commandId: string;
1120
+ }
1121
+ /** Parameters for killCommand tool */
1122
+ interface KillCommandParams {
1123
+ /** Command ID to terminate */
1124
+ commandId: string;
1125
+ }
1126
+ /** Parameters for readLocalFile tool */
1127
+ interface ReadLocalFileParams {
1128
+ /** End line number (1-based, inclusive) */
1129
+ endLine?: number;
1130
+ /** File path to read */
1131
+ path: string;
1132
+ /** Start line number (1-based) */
1133
+ startLine?: number;
1134
+ }
1135
+ /** Parameters for writeLocalFile tool */
1136
+ interface WriteLocalFileParams {
1137
+ /** Content to write */
1138
+ content: string;
1139
+ /** Whether to create parent directories */
1140
+ createDirectories?: boolean;
1141
+ /** File path to write */
1142
+ path: string;
1143
+ }
1144
+ /** Parameters for editLocalFile tool */
1145
+ interface EditLocalFileParams {
1146
+ /** Replace all occurrences (default: false) */
1147
+ all?: boolean;
1148
+ /** File path to edit */
1149
+ path: string;
1150
+ /** String to replace with */
1151
+ replace: string;
1152
+ /** String to search for */
1153
+ search: string;
1154
+ }
1155
+ /** Parameters for listLocalFiles tool */
1156
+ interface ListLocalFilesParams {
1157
+ /** Directory path to list */
1158
+ directoryPath: string;
1159
+ }
1160
+ /** Parameters for globLocalFiles tool */
1161
+ interface GlobLocalFilesParams {
1162
+ /** Base directory (default: current directory) */
1163
+ directory?: string;
1164
+ /** Glob pattern (e.g., "**\/*.ts") */
1165
+ pattern: string;
1166
+ }
1167
+ /** Parameters for searchLocalFiles tool */
1168
+ interface SearchLocalFilesParams {
1169
+ /** Directory to search */
1170
+ directory: string;
1171
+ /** File type/extension filter */
1172
+ fileType?: string;
1173
+ /** Filename keyword filter */
1174
+ keyword?: string;
1175
+ /** Modified time upper bound (ISO date string) */
1176
+ modifiedAfter?: string;
1177
+ /** Modified time lower bound (ISO date string) */
1178
+ modifiedBefore?: string;
1179
+ }
1180
+ /** Parameters for grepContent tool */
1181
+ interface GrepContentParams {
1182
+ /** Directory to search */
1183
+ directory: string;
1184
+ /** File name pattern filter (e.g., "*.ts") */
1185
+ filePattern?: string;
1186
+ /** Regex pattern to search */
1187
+ pattern: string;
1188
+ /** Whether to search recursively (default: true) */
1189
+ recursive?: boolean;
1190
+ }
1191
+ /** Move operation for moveLocalFiles tool */
1192
+ interface MoveOperation {
1193
+ /** Destination path */
1194
+ destination: string;
1195
+ /** Source path */
1196
+ source: string;
1197
+ }
1198
+ /** Parameters for moveLocalFiles tool */
1199
+ interface MoveLocalFilesParams {
1200
+ /** Move operations to perform */
1201
+ operations: MoveOperation[];
1202
+ }
1203
+ /** Parameters for renameLocalFile tool */
1204
+ interface RenameLocalFileParams {
1205
+ /** New name (filename only, not full path) */
1206
+ newName: string;
1207
+ /** Original file/directory path */
1208
+ oldPath: string;
1209
+ }
1210
+ /** Parameters for exportFile tool */
1211
+ interface ExportFileParams {
1212
+ /** File path in sandbox to export */
1213
+ path: string;
1214
+ /** Pre-signed upload URL to upload the file to */
1215
+ uploadUrl: string;
1216
+ }
1217
+ /**
1218
+ * Map of tool names to their parameter types
1219
+ */
1220
+ interface CodeInterpreterToolParams {
1221
+ editLocalFile: EditLocalFileParams;
1222
+ executeCode: ExecuteCodeParams;
1223
+ exportFile: ExportFileParams;
1224
+ getCommandOutput: GetCommandOutputParams;
1225
+ globLocalFiles: GlobLocalFilesParams;
1226
+ grepContent: GrepContentParams;
1227
+ killCommand: KillCommandParams;
1228
+ listLocalFiles: ListLocalFilesParams;
1229
+ moveLocalFiles: MoveLocalFilesParams;
1230
+ readLocalFile: ReadLocalFileParams;
1231
+ renameLocalFile: RenameLocalFileParams;
1232
+ runCommand: RunCommandParams;
1233
+ searchLocalFiles: SearchLocalFilesParams;
1234
+ writeLocalFile: WriteLocalFileParams;
1235
+ }
1236
+
1043
1237
  /**
1044
1238
  * User-related type definitions for LobeHub Market SDK
1045
1239
  *
@@ -1052,6 +1246,8 @@ interface PluginQueryParams {
1052
1246
  * Extended metadata for user profile
1053
1247
  */
1054
1248
  interface AccountMeta {
1249
+ /** Any additional custom fields */
1250
+ [key: string]: any;
1055
1251
  /** User description/bio */
1056
1252
  description?: string;
1057
1253
  /** Social links */
@@ -1060,8 +1256,6 @@ interface AccountMeta {
1060
1256
  twitter?: string;
1061
1257
  website?: string;
1062
1258
  };
1063
- /** Any additional custom fields */
1064
- [key: string]: any;
1065
1259
  }
1066
1260
  /**
1067
1261
  * User Profile
@@ -1161,6 +1355,200 @@ interface UpdateUserInfoResponse {
1161
1355
  /** Updated user profile */
1162
1356
  user: UserProfile;
1163
1357
  }
1358
+ /**
1359
+ * Follow Request
1360
+ *
1361
+ * Request body for follow/unfollow operations
1362
+ */
1363
+ interface FollowRequest {
1364
+ /** The ID of the user to follow/unfollow */
1365
+ followingId: number;
1366
+ }
1367
+ /**
1368
+ * Check Follow Query
1369
+ *
1370
+ * Query parameters for checking follow status
1371
+ */
1372
+ interface CheckFollowQuery {
1373
+ /** The ID of the target user to check */
1374
+ targetUserId: number;
1375
+ }
1376
+ /**
1377
+ * Check Follow Response
1378
+ *
1379
+ * Response structure for check follow status endpoint
1380
+ */
1381
+ interface CheckFollowResponse {
1382
+ /** Whether the authenticated user is following the target user */
1383
+ isFollowing: boolean;
1384
+ /** Whether both users follow each other */
1385
+ isMutual: boolean;
1386
+ }
1387
+ /**
1388
+ * Follow List Item
1389
+ *
1390
+ * Represents a user in following/followers list
1391
+ */
1392
+ interface FollowListItem {
1393
+ /** User's avatar URL */
1394
+ avatarUrl: string | null;
1395
+ /** When the follow relationship was created */
1396
+ createdAt: string;
1397
+ /** User's display name */
1398
+ displayName: string | null;
1399
+ /** Account ID */
1400
+ id: number;
1401
+ /** Unique username */
1402
+ userName: string | null;
1403
+ }
1404
+ /**
1405
+ * Follow List Response
1406
+ *
1407
+ * Response structure for following/followers list endpoints
1408
+ */
1409
+ interface FollowListResponse {
1410
+ /** List of users */
1411
+ data: FollowListItem[];
1412
+ }
1413
+ /**
1414
+ * Target Type for favorites and likes
1415
+ */
1416
+ type InteractionTargetType = 'agent' | 'plugin';
1417
+ /**
1418
+ * Favorite Request
1419
+ *
1420
+ * Request body for add/remove favorite operations
1421
+ */
1422
+ interface FavoriteRequest {
1423
+ /** The ID of the target agent/plugin */
1424
+ targetId: number;
1425
+ /** The type of target */
1426
+ targetType: InteractionTargetType;
1427
+ }
1428
+ /**
1429
+ * Check Favorite Query
1430
+ *
1431
+ * Query parameters for checking favorite status
1432
+ */
1433
+ interface CheckFavoriteQuery {
1434
+ /** The ID of the target agent/plugin */
1435
+ targetId: number;
1436
+ /** The type of target */
1437
+ targetType: InteractionTargetType;
1438
+ }
1439
+ /**
1440
+ * Check Favorite Response
1441
+ *
1442
+ * Response structure for check favorite status endpoint
1443
+ */
1444
+ interface CheckFavoriteResponse {
1445
+ /** Whether the authenticated user has favorited the target */
1446
+ isFavorited: boolean;
1447
+ }
1448
+ /**
1449
+ * Favorite Query
1450
+ *
1451
+ * Query parameters for favorites list endpoints
1452
+ */
1453
+ interface FavoriteQuery {
1454
+ /** Maximum number of results to return */
1455
+ limit?: number;
1456
+ /** Number of results to skip */
1457
+ offset?: number;
1458
+ /** Filter by target type */
1459
+ type?: InteractionTargetType;
1460
+ }
1461
+ /**
1462
+ * Favorite List Response
1463
+ *
1464
+ * Response structure for favorites list endpoints
1465
+ */
1466
+ interface FavoriteListResponse {
1467
+ /** List of favorite items */
1468
+ data: any[];
1469
+ }
1470
+ /**
1471
+ * Like Request
1472
+ *
1473
+ * Request body for like/unlike operations
1474
+ */
1475
+ interface LikeRequest {
1476
+ /** The ID of the target agent/plugin */
1477
+ targetId: number;
1478
+ /** The type of target */
1479
+ targetType: InteractionTargetType;
1480
+ }
1481
+ /**
1482
+ * Check Like Query
1483
+ *
1484
+ * Query parameters for checking like status
1485
+ */
1486
+ interface CheckLikeQuery {
1487
+ /** The ID of the target agent/plugin */
1488
+ targetId: number;
1489
+ /** The type of target */
1490
+ targetType: InteractionTargetType;
1491
+ }
1492
+ /**
1493
+ * Check Like Response
1494
+ *
1495
+ * Response structure for check like status endpoint
1496
+ */
1497
+ interface CheckLikeResponse {
1498
+ /** Whether the authenticated user has liked the target */
1499
+ isLiked: boolean;
1500
+ }
1501
+ /**
1502
+ * Toggle Like Response
1503
+ *
1504
+ * Response structure for toggle like endpoint
1505
+ */
1506
+ interface ToggleLikeResponse {
1507
+ /** Whether the target is now liked */
1508
+ liked: boolean;
1509
+ }
1510
+ /**
1511
+ * Like Query
1512
+ *
1513
+ * Query parameters for likes list endpoints
1514
+ */
1515
+ interface LikeQuery {
1516
+ /** Maximum number of results to return */
1517
+ limit?: number;
1518
+ /** Number of results to skip */
1519
+ offset?: number;
1520
+ /** Filter by target type */
1521
+ type?: InteractionTargetType;
1522
+ }
1523
+ /**
1524
+ * Like List Response
1525
+ *
1526
+ * Response structure for likes list endpoints
1527
+ */
1528
+ interface LikeListResponse {
1529
+ /** List of liked items */
1530
+ data: any[];
1531
+ }
1532
+ /**
1533
+ * Success Response
1534
+ *
1535
+ * Common response structure for success operations
1536
+ */
1537
+ interface SuccessResponse {
1538
+ /** Whether the operation was successful */
1539
+ success: boolean;
1540
+ }
1541
+ /**
1542
+ * Pagination Query
1543
+ *
1544
+ * Common pagination parameters
1545
+ */
1546
+ interface PaginationQuery {
1547
+ /** Maximum number of results to return */
1548
+ limit?: number;
1549
+ /** Number of results to skip */
1550
+ offset?: number;
1551
+ }
1164
1552
 
1165
1553
  /**
1166
1554
  * Base SDK class
@@ -2569,6 +2957,153 @@ declare class PluginsService extends BaseSDK {
2569
2957
  * ```
2570
2958
  */
2571
2959
  callCloudGateway(request: CloudGatewayRequest, options?: globalThis.RequestInit): Promise<CloudGatewayResponse>;
2960
+ /**
2961
+ * Execute a built-in tool via AWS Bedrock AgentCore Code Interpreter
2962
+ *
2963
+ * This method provides access to file operations, command execution, and session management
2964
+ * tools running in an isolated sandbox environment. Sessions are automatically managed
2965
+ * per user/topic combination.
2966
+ *
2967
+ * @param toolName - Name of the tool to execute
2968
+ * @param params - Tool-specific parameters
2969
+ * @param context - User and topic context for session isolation
2970
+ * @param options - Optional request options
2971
+ * @returns Promise resolving to the tool execution result
2972
+ *
2973
+ * @example
2974
+ * ```typescript
2975
+ * // Run a shell command
2976
+ * const result = await sdk.plugins.runBuildInTool(
2977
+ * 'runCommand',
2978
+ * { command: 'ls -la' },
2979
+ * { userId: 'user-123', topicId: 'topic-456' }
2980
+ * );
2981
+ *
2982
+ * // Read a file
2983
+ * const fileResult = await sdk.plugins.runBuildInTool(
2984
+ * 'readLocalFile',
2985
+ * { path: '/tmp/example.txt' },
2986
+ * { userId: 'user-123', topicId: 'topic-456' }
2987
+ * );
2988
+ * ```
2989
+ */
2990
+ runBuildInTool<T extends CodeInterpreterToolName>(toolName: T, params: CodeInterpreterToolParams[T], context: {
2991
+ topicId: string;
2992
+ userId: string;
2993
+ }, options?: globalThis.RequestInit): Promise<RunBuildInToolsResponse>;
2994
+ /**
2995
+ * Execute a shell command in the Code Interpreter sandbox
2996
+ *
2997
+ * @param command - Shell command to execute
2998
+ * @param context - User and topic context
2999
+ * @param options - Additional options (background, timeout)
3000
+ * @returns Promise resolving to command execution result
3001
+ */
3002
+ runCommand(command: string, context: {
3003
+ topicId: string;
3004
+ userId: string;
3005
+ }, options?: {
3006
+ background?: boolean;
3007
+ timeout?: number;
3008
+ }): Promise<RunBuildInToolsResponse>;
3009
+ /**
3010
+ * Read a file from the Code Interpreter sandbox
3011
+ *
3012
+ * @param path - File path to read
3013
+ * @param context - User and topic context
3014
+ * @param options - Line range options (startLine, endLine)
3015
+ * @returns Promise resolving to file content
3016
+ */
3017
+ readFile(path: string, context: {
3018
+ topicId: string;
3019
+ userId: string;
3020
+ }, options?: {
3021
+ endLine?: number;
3022
+ startLine?: number;
3023
+ }): Promise<RunBuildInToolsResponse>;
3024
+ /**
3025
+ * Write content to a file in the Code Interpreter sandbox
3026
+ *
3027
+ * @param path - File path to write
3028
+ * @param content - Content to write
3029
+ * @param context - User and topic context
3030
+ * @param options - Additional options (createDirectories)
3031
+ * @returns Promise resolving to write result
3032
+ */
3033
+ writeFile(path: string, content: string, context: {
3034
+ topicId: string;
3035
+ userId: string;
3036
+ }, options?: {
3037
+ createDirectories?: boolean;
3038
+ }): Promise<RunBuildInToolsResponse>;
3039
+ /**
3040
+ * List files in a directory in the Code Interpreter sandbox
3041
+ *
3042
+ * @param directoryPath - Directory path to list
3043
+ * @param context - User and topic context
3044
+ * @returns Promise resolving to directory listing
3045
+ */
3046
+ listFiles(directoryPath: string, context: {
3047
+ topicId: string;
3048
+ userId: string;
3049
+ }): Promise<RunBuildInToolsResponse>;
3050
+ /**
3051
+ * Search for files matching a glob pattern
3052
+ *
3053
+ * @param pattern - Glob pattern (e.g., "**\/*.ts")
3054
+ * @param context - User and topic context
3055
+ * @param directory - Base directory (optional)
3056
+ * @returns Promise resolving to matching files
3057
+ */
3058
+ globFiles(pattern: string, context: {
3059
+ topicId: string;
3060
+ userId: string;
3061
+ }, directory?: string): Promise<RunBuildInToolsResponse>;
3062
+ /**
3063
+ * Search file contents using regex pattern
3064
+ *
3065
+ * @param pattern - Regex pattern to search
3066
+ * @param directory - Directory to search
3067
+ * @param context - User and topic context
3068
+ * @param options - Additional options (filePattern, recursive)
3069
+ * @returns Promise resolving to grep results
3070
+ */
3071
+ grepContent(pattern: string, directory: string, context: {
3072
+ topicId: string;
3073
+ userId: string;
3074
+ }, options?: {
3075
+ filePattern?: string;
3076
+ recursive?: boolean;
3077
+ }): Promise<RunBuildInToolsResponse>;
3078
+ /**
3079
+ * Export a file from the Code Interpreter sandbox to a pre-signed URL
3080
+ *
3081
+ * This method uploads a file from the sandbox to an external storage location
3082
+ * via a pre-signed URL (e.g., S3 pre-signed URL). The upload is performed
3083
+ * using Python code execution within the sandbox.
3084
+ *
3085
+ * @param path - File path in sandbox to export
3086
+ * @param uploadUrl - Pre-signed URL to upload the file to
3087
+ * @param context - User and topic context
3088
+ * @returns Promise resolving to export result with success status and file info
3089
+ *
3090
+ * @example
3091
+ * ```typescript
3092
+ * const result = await sdk.plugins.exportFile(
3093
+ * './output/result.csv',
3094
+ * 'https://s3.amazonaws.com/bucket/key?X-Amz-Signature=...',
3095
+ * { userId: 'user-123', topicId: 'topic-456' }
3096
+ * );
3097
+ *
3098
+ * if (result.success && result.data?.result.success) {
3099
+ * console.log('File exported:', result.data.result.size, 'bytes');
3100
+ * }
3101
+ * ```
3102
+ */
3103
+ exportFile(path: string, uploadUrl: string, context: {
3104
+ topicId: string;
3105
+ userId: string;
3106
+ }): Promise<RunBuildInToolsResponse>;
2572
3107
  }
2573
3108
 
2574
3109
  /**
@@ -2604,6 +3139,274 @@ declare class UserService extends BaseSDK {
2604
3139
  updateUserInfo(data: UpdateUserInfoRequest, options?: globalThis.RequestInit): Promise<UpdateUserInfoResponse>;
2605
3140
  }
2606
3141
 
3142
+ /**
3143
+ * User Follow Service
3144
+ *
3145
+ * Provides access to user follow functionality in the LobeHub Marketplace.
3146
+ * This service handles following/unfollowing users and retrieving follow relationships.
3147
+ */
3148
+ declare class UserFollowService extends BaseSDK {
3149
+ /**
3150
+ * Follow a user
3151
+ *
3152
+ * Creates a follow relationship where the authenticated user follows the target user.
3153
+ * Requires authentication.
3154
+ *
3155
+ * @param followingId - The ID of the user to follow
3156
+ * @param options - Optional request options
3157
+ * @returns Promise resolving to success response
3158
+ * @throws Error if already following or cannot follow yourself
3159
+ */
3160
+ follow(followingId: number, options?: globalThis.RequestInit): Promise<SuccessResponse>;
3161
+ /**
3162
+ * Unfollow a user
3163
+ *
3164
+ * Removes the follow relationship where the authenticated user unfollows the target user.
3165
+ * Requires authentication.
3166
+ *
3167
+ * @param followingId - The ID of the user to unfollow
3168
+ * @param options - Optional request options
3169
+ * @returns Promise resolving to success response
3170
+ * @throws Error if follow relationship not found
3171
+ */
3172
+ unfollow(followingId: number, options?: globalThis.RequestInit): Promise<SuccessResponse>;
3173
+ /**
3174
+ * Check follow status
3175
+ *
3176
+ * Checks if the authenticated user is following the target user and if they follow each other.
3177
+ * Requires authentication.
3178
+ *
3179
+ * @param targetUserId - The ID of the user to check
3180
+ * @param options - Optional request options
3181
+ * @returns Promise resolving to follow status (isFollowing, isMutual)
3182
+ */
3183
+ checkFollowStatus(targetUserId: number, options?: globalThis.RequestInit): Promise<CheckFollowResponse>;
3184
+ /**
3185
+ * Get following list
3186
+ *
3187
+ * Retrieves the list of users that a user is following.
3188
+ * This is a public endpoint - no authentication required.
3189
+ *
3190
+ * @param userId - The ID of the user whose following list to retrieve
3191
+ * @param params - Pagination parameters
3192
+ * @param options - Optional request options
3193
+ * @returns Promise resolving to list of following users
3194
+ */
3195
+ getFollowing(userId: number, params?: PaginationQuery, options?: globalThis.RequestInit): Promise<FollowListResponse>;
3196
+ /**
3197
+ * Get followers list
3198
+ *
3199
+ * Retrieves the list of users who follow a user.
3200
+ * This is a public endpoint - no authentication required.
3201
+ *
3202
+ * @param userId - The ID of the user whose followers list to retrieve
3203
+ * @param params - Pagination parameters
3204
+ * @param options - Optional request options
3205
+ * @returns Promise resolving to list of followers
3206
+ */
3207
+ getFollowers(userId: number, params?: PaginationQuery, options?: globalThis.RequestInit): Promise<FollowListResponse>;
3208
+ }
3209
+
3210
+ /**
3211
+ * User Favorite Service
3212
+ *
3213
+ * Provides access to user favorite functionality in the LobeHub Marketplace.
3214
+ * This service handles adding/removing favorites and retrieving favorite lists.
3215
+ */
3216
+ declare class UserFavoriteService extends BaseSDK {
3217
+ /**
3218
+ * Add to favorites
3219
+ *
3220
+ * Adds an agent or plugin to the authenticated user's favorites.
3221
+ * Requires authentication.
3222
+ *
3223
+ * @param targetType - The type of target ('agent' or 'plugin')
3224
+ * @param targetId - The ID of the target agent/plugin
3225
+ * @param options - Optional request options
3226
+ * @returns Promise resolving to success response
3227
+ * @throws Error if already in favorites
3228
+ */
3229
+ addFavorite(targetType: InteractionTargetType, targetId: number, options?: globalThis.RequestInit): Promise<SuccessResponse>;
3230
+ /**
3231
+ * Remove from favorites
3232
+ *
3233
+ * Removes an agent or plugin from the authenticated user's favorites.
3234
+ * Requires authentication.
3235
+ *
3236
+ * @param targetType - The type of target ('agent' or 'plugin')
3237
+ * @param targetId - The ID of the target agent/plugin
3238
+ * @param options - Optional request options
3239
+ * @returns Promise resolving to success response
3240
+ * @throws Error if favorite not found
3241
+ */
3242
+ removeFavorite(targetType: InteractionTargetType, targetId: number, options?: globalThis.RequestInit): Promise<SuccessResponse>;
3243
+ /**
3244
+ * Check favorite status
3245
+ *
3246
+ * Checks if the authenticated user has favorited a specific agent or plugin.
3247
+ * Requires authentication.
3248
+ *
3249
+ * @param targetType - The type of target ('agent' or 'plugin')
3250
+ * @param targetId - The ID of the target agent/plugin
3251
+ * @param options - Optional request options
3252
+ * @returns Promise resolving to favorite status
3253
+ */
3254
+ checkFavorite(targetType: InteractionTargetType, targetId: number, options?: globalThis.RequestInit): Promise<CheckFavoriteResponse>;
3255
+ /**
3256
+ * Get my favorites
3257
+ *
3258
+ * Retrieves the authenticated user's favorites.
3259
+ * Requires authentication.
3260
+ *
3261
+ * @param params - Query parameters for filtering and pagination
3262
+ * @param options - Optional request options
3263
+ * @returns Promise resolving to list of favorites
3264
+ */
3265
+ getMyFavorites(params?: FavoriteQuery, options?: globalThis.RequestInit): Promise<FavoriteListResponse>;
3266
+ /**
3267
+ * Get user's favorites
3268
+ *
3269
+ * Retrieves a user's favorites.
3270
+ * This is a public endpoint - no authentication required.
3271
+ *
3272
+ * @param userId - The ID of the user whose favorites to retrieve
3273
+ * @param params - Query parameters for filtering and pagination
3274
+ * @param options - Optional request options
3275
+ * @returns Promise resolving to list of favorites
3276
+ */
3277
+ getUserFavorites(userId: number, params?: FavoriteQuery, options?: globalThis.RequestInit): Promise<FavoriteListResponse>;
3278
+ /**
3279
+ * Get user's favorite agents with details
3280
+ *
3281
+ * Retrieves a user's favorite agents with full details.
3282
+ * This is a public endpoint - no authentication required.
3283
+ *
3284
+ * @param userId - The ID of the user whose favorite agents to retrieve
3285
+ * @param params - Pagination parameters
3286
+ * @param options - Optional request options
3287
+ * @returns Promise resolving to list of favorite agents
3288
+ */
3289
+ getUserFavoriteAgents(userId: number, params?: Pick<FavoriteQuery, 'limit' | 'offset'>, options?: globalThis.RequestInit): Promise<FavoriteListResponse>;
3290
+ /**
3291
+ * Get user's favorite plugins with details
3292
+ *
3293
+ * Retrieves a user's favorite plugins with full details.
3294
+ * This is a public endpoint - no authentication required.
3295
+ *
3296
+ * @param userId - The ID of the user whose favorite plugins to retrieve
3297
+ * @param params - Pagination parameters
3298
+ * @param options - Optional request options
3299
+ * @returns Promise resolving to list of favorite plugins
3300
+ */
3301
+ getUserFavoritePlugins(userId: number, params?: Pick<FavoriteQuery, 'limit' | 'offset'>, options?: globalThis.RequestInit): Promise<FavoriteListResponse>;
3302
+ }
3303
+
3304
+ /**
3305
+ * User Like Service
3306
+ *
3307
+ * Provides access to user like functionality in the LobeHub Marketplace.
3308
+ * This service handles liking/unliking content and retrieving like lists.
3309
+ */
3310
+ declare class UserLikeService extends BaseSDK {
3311
+ /**
3312
+ * Like content
3313
+ *
3314
+ * Likes an agent or plugin for the authenticated user.
3315
+ * Requires authentication.
3316
+ *
3317
+ * @param targetType - The type of target ('agent' or 'plugin')
3318
+ * @param targetId - The ID of the target agent/plugin
3319
+ * @param options - Optional request options
3320
+ * @returns Promise resolving to success response
3321
+ * @throws Error if already liked
3322
+ */
3323
+ like(targetType: InteractionTargetType, targetId: number, options?: globalThis.RequestInit): Promise<SuccessResponse>;
3324
+ /**
3325
+ * Unlike content
3326
+ *
3327
+ * Unlikes an agent or plugin for the authenticated user.
3328
+ * Requires authentication.
3329
+ *
3330
+ * @param targetType - The type of target ('agent' or 'plugin')
3331
+ * @param targetId - The ID of the target agent/plugin
3332
+ * @param options - Optional request options
3333
+ * @returns Promise resolving to success response
3334
+ * @throws Error if like not found
3335
+ */
3336
+ unlike(targetType: InteractionTargetType, targetId: number, options?: globalThis.RequestInit): Promise<SuccessResponse>;
3337
+ /**
3338
+ * Toggle like status
3339
+ *
3340
+ * Toggles the like status - likes if not liked, unlikes if already liked.
3341
+ * Requires authentication.
3342
+ *
3343
+ * @param targetType - The type of target ('agent' or 'plugin')
3344
+ * @param targetId - The ID of the target agent/plugin
3345
+ * @param options - Optional request options
3346
+ * @returns Promise resolving to toggle response with new like status
3347
+ */
3348
+ toggleLike(targetType: InteractionTargetType, targetId: number, options?: globalThis.RequestInit): Promise<ToggleLikeResponse>;
3349
+ /**
3350
+ * Check like status
3351
+ *
3352
+ * Checks if the authenticated user has liked a specific agent or plugin.
3353
+ * Requires authentication.
3354
+ *
3355
+ * @param targetType - The type of target ('agent' or 'plugin')
3356
+ * @param targetId - The ID of the target agent/plugin
3357
+ * @param options - Optional request options
3358
+ * @returns Promise resolving to like status
3359
+ */
3360
+ checkLike(targetType: InteractionTargetType, targetId: number, options?: globalThis.RequestInit): Promise<CheckLikeResponse>;
3361
+ /**
3362
+ * Get my likes
3363
+ *
3364
+ * Retrieves the authenticated user's likes.
3365
+ * Requires authentication.
3366
+ *
3367
+ * @param params - Query parameters for filtering and pagination
3368
+ * @param options - Optional request options
3369
+ * @returns Promise resolving to list of likes
3370
+ */
3371
+ getMyLikes(params?: LikeQuery, options?: globalThis.RequestInit): Promise<LikeListResponse>;
3372
+ /**
3373
+ * Get user's likes
3374
+ *
3375
+ * Retrieves a user's likes.
3376
+ * This is a public endpoint - no authentication required.
3377
+ *
3378
+ * @param userId - The ID of the user whose likes to retrieve
3379
+ * @param params - Query parameters for filtering and pagination
3380
+ * @param options - Optional request options
3381
+ * @returns Promise resolving to list of likes
3382
+ */
3383
+ getUserLikes(userId: number, params?: LikeQuery, options?: globalThis.RequestInit): Promise<LikeListResponse>;
3384
+ /**
3385
+ * Get user's liked agents with details
3386
+ *
3387
+ * Retrieves a user's liked agents with full details.
3388
+ * This is a public endpoint - no authentication required.
3389
+ *
3390
+ * @param userId - The ID of the user whose liked agents to retrieve
3391
+ * @param params - Pagination parameters
3392
+ * @param options - Optional request options
3393
+ * @returns Promise resolving to list of liked agents
3394
+ */
3395
+ getUserLikedAgents(userId: number, params?: Pick<LikeQuery, 'limit' | 'offset'>, options?: globalThis.RequestInit): Promise<LikeListResponse>;
3396
+ /**
3397
+ * Get user's liked plugins with details
3398
+ *
3399
+ * Retrieves a user's liked plugins with full details.
3400
+ * This is a public endpoint - no authentication required.
3401
+ *
3402
+ * @param userId - The ID of the user whose liked plugins to retrieve
3403
+ * @param params - Pagination parameters
3404
+ * @param options - Optional request options
3405
+ * @returns Promise resolving to list of liked plugins
3406
+ */
3407
+ getUserLikedPlugins(userId: number, params?: Pick<LikeQuery, 'limit' | 'offset'>, options?: globalThis.RequestInit): Promise<LikeListResponse>;
3408
+ }
3409
+
2607
3410
  /**
2608
3411
  * LobeHub Market SDK Client
2609
3412
  *
@@ -2633,6 +3436,21 @@ declare class MarketSDK extends BaseSDK {
2633
3436
  * Provides methods to retrieve user profiles and their published agents
2634
3437
  */
2635
3438
  readonly user: UserService;
3439
+ /**
3440
+ * User follow service for follow operations
3441
+ * Provides methods to follow/unfollow users and retrieve follow relationships
3442
+ */
3443
+ readonly follows: UserFollowService;
3444
+ /**
3445
+ * User favorite service for favorite operations
3446
+ * Provides methods to add/remove favorites and retrieve favorite lists
3447
+ */
3448
+ readonly favorites: UserFavoriteService;
3449
+ /**
3450
+ * User like service for like operations
3451
+ * Provides methods to like/unlike content and retrieve like lists
3452
+ */
3453
+ readonly likes: UserLikeService;
2636
3454
  /**
2637
3455
  * Discovery service for retrieving API service information
2638
3456
  * Used to get information about available endpoints and services
@@ -2668,4 +3486,4 @@ declare class MarketSDK extends BaseSDK {
2668
3486
  registerClient(request: ClientRegistrationRequest): Promise<ClientRegistrationResponse>;
2669
3487
  }
2670
3488
 
2671
- export { type AccountMeta, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentItemDetail, type AgentListQuery, type AgentListResponse, type AgentModifyRequest, type AgentModifyResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentSkill, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AuthorizationCodeTokenRequest, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type DiscoveryDocument, MarketAdmin, MarketSDK, type MarketSDKOptions, type OAuthTokenResponse, type OwnAgentListQuery, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginListResponse, type PluginLocalization, type PluginQueryParams, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type RefreshTokenRequest, type ReviewStatus, ReviewStatusEnumSchema, type SharedTokenState, StatusEnumSchema, type UnclaimedPluginItem, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserProfile, VisibilityEnumSchema };
3489
+ export { type AccountMeta, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentItemDetail, type AgentListQuery, type AgentListResponse, type AgentModifyRequest, type AgentModifyResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentSkill, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AuthorizationCodeTokenRequest, type CheckFavoriteQuery, type CheckFavoriteResponse, type CheckFollowQuery, type CheckFollowResponse, type CheckLikeQuery, type CheckLikeResponse, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type CodeInterpreterToolName, type CodeInterpreterToolParams, type DiscoveryDocument, type EditLocalFileParams, type ExecuteCodeParams, type ExportFileParams, type FavoriteListResponse, type FavoriteQuery, type FavoriteRequest, type FollowListItem, type FollowListResponse, type FollowRequest, type GetCommandOutputParams, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListLocalFilesParams, MarketAdmin, MarketSDK, type MarketSDKOptions, type MoveLocalFilesParams, type MoveOperation, type OAuthTokenResponse, type OwnAgentListQuery, type PaginationQuery, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginListResponse, type PluginLocalization, type PluginQueryParams, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type ProgrammingLanguage, type ReadLocalFileParams, type RefreshTokenRequest, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, type SearchLocalFilesParams, type SharedTokenState, StatusEnumSchema, type SuccessResponse, type ToggleLikeResponse, type UnclaimedPluginItem, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserProfile, VisibilityEnumSchema, type WriteLocalFileParams };