@lobehub/market-sdk 0.24.0-beta.1 → 0.24.1-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 +549 -4
- package/dist/index.mjs +548 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -851,6 +851,21 @@ interface MarketSDKOptions {
|
|
|
851
851
|
* Base URL for root path
|
|
852
852
|
*/
|
|
853
853
|
rootBaseURL?: string;
|
|
854
|
+
/**
|
|
855
|
+
* Trusted client token (encrypted payload) for trusted client authentication.
|
|
856
|
+
*
|
|
857
|
+
* If provided, the SDK will use the x-lobe-trust-token header for authentication,
|
|
858
|
+
* bypassing the standard OIDC flow. This token should be generated server-side
|
|
859
|
+
* using the shared secret and contain encrypted user identity information.
|
|
860
|
+
*
|
|
861
|
+
* @example
|
|
862
|
+
* ```typescript
|
|
863
|
+
* const sdk = new MarketSDK({
|
|
864
|
+
* trustedClientToken: encryptedToken,
|
|
865
|
+
* });
|
|
866
|
+
* ```
|
|
867
|
+
*/
|
|
868
|
+
trustedClientToken?: string;
|
|
854
869
|
}
|
|
855
870
|
/**
|
|
856
871
|
* Shared token state for SDK instances
|
|
@@ -1046,7 +1061,7 @@ interface PluginQueryParams {
|
|
|
1046
1061
|
* internally by the server - sessions are automatically created when needed and
|
|
1047
1062
|
* recreated if expired.
|
|
1048
1063
|
*/
|
|
1049
|
-
type CodeInterpreterToolName = 'editLocalFile' | 'getCommandOutput' | 'globLocalFiles' | 'grepContent' | 'killCommand' | 'listLocalFiles' | 'moveLocalFiles' | 'readLocalFile' | 'renameLocalFile' | 'runCommand' | 'searchLocalFiles' | 'writeLocalFile';
|
|
1064
|
+
type CodeInterpreterToolName = 'editLocalFile' | 'executeCode' | 'exportFile' | 'getCommandOutput' | 'globLocalFiles' | 'grepContent' | 'killCommand' | 'listLocalFiles' | 'moveLocalFiles' | 'readLocalFile' | 'renameLocalFile' | 'runCommand' | 'searchLocalFiles' | 'writeLocalFile';
|
|
1050
1065
|
/**
|
|
1051
1066
|
* Request for RunBuildInTools API
|
|
1052
1067
|
*/
|
|
@@ -1093,6 +1108,17 @@ interface RunBuildInToolsResponse {
|
|
|
1093
1108
|
/** Whether the operation succeeded */
|
|
1094
1109
|
success: boolean;
|
|
1095
1110
|
}
|
|
1111
|
+
/**
|
|
1112
|
+
* Supported programming languages for code execution
|
|
1113
|
+
*/
|
|
1114
|
+
type ProgrammingLanguage = 'javascript' | 'python' | 'typescript';
|
|
1115
|
+
/** Parameters for executeCode tool */
|
|
1116
|
+
interface ExecuteCodeParams {
|
|
1117
|
+
/** Code to execute */
|
|
1118
|
+
code: string;
|
|
1119
|
+
/** Programming language (default: python) */
|
|
1120
|
+
language?: ProgrammingLanguage;
|
|
1121
|
+
}
|
|
1096
1122
|
/** Parameters for runCommand tool */
|
|
1097
1123
|
interface RunCommandParams {
|
|
1098
1124
|
/** Whether to run in background */
|
|
@@ -1196,11 +1222,20 @@ interface RenameLocalFileParams {
|
|
|
1196
1222
|
/** Original file/directory path */
|
|
1197
1223
|
oldPath: string;
|
|
1198
1224
|
}
|
|
1225
|
+
/** Parameters for exportFile tool */
|
|
1226
|
+
interface ExportFileParams {
|
|
1227
|
+
/** File path in sandbox to export */
|
|
1228
|
+
path: string;
|
|
1229
|
+
/** Pre-signed upload URL to upload the file to */
|
|
1230
|
+
uploadUrl: string;
|
|
1231
|
+
}
|
|
1199
1232
|
/**
|
|
1200
1233
|
* Map of tool names to their parameter types
|
|
1201
1234
|
*/
|
|
1202
1235
|
interface CodeInterpreterToolParams {
|
|
1203
1236
|
editLocalFile: EditLocalFileParams;
|
|
1237
|
+
executeCode: ExecuteCodeParams;
|
|
1238
|
+
exportFile: ExportFileParams;
|
|
1204
1239
|
getCommandOutput: GetCommandOutputParams;
|
|
1205
1240
|
globLocalFiles: GlobLocalFilesParams;
|
|
1206
1241
|
grepContent: GrepContentParams;
|
|
@@ -1226,6 +1261,8 @@ interface CodeInterpreterToolParams {
|
|
|
1226
1261
|
* Extended metadata for user profile
|
|
1227
1262
|
*/
|
|
1228
1263
|
interface AccountMeta {
|
|
1264
|
+
/** Any additional custom fields */
|
|
1265
|
+
[key: string]: any;
|
|
1229
1266
|
/** User description/bio */
|
|
1230
1267
|
description?: string;
|
|
1231
1268
|
/** Social links */
|
|
@@ -1234,8 +1271,6 @@ interface AccountMeta {
|
|
|
1234
1271
|
twitter?: string;
|
|
1235
1272
|
website?: string;
|
|
1236
1273
|
};
|
|
1237
|
-
/** Any additional custom fields */
|
|
1238
|
-
[key: string]: any;
|
|
1239
1274
|
}
|
|
1240
1275
|
/**
|
|
1241
1276
|
* User Profile
|
|
@@ -1249,6 +1284,10 @@ interface UserProfile {
|
|
|
1249
1284
|
createdAt: string;
|
|
1250
1285
|
/** User's display name */
|
|
1251
1286
|
displayName: string | null;
|
|
1287
|
+
/** Number of followers */
|
|
1288
|
+
followerCount: number;
|
|
1289
|
+
/** Number of users this user is following */
|
|
1290
|
+
followingCount: number;
|
|
1252
1291
|
/** Account ID (primary key) */
|
|
1253
1292
|
id: number;
|
|
1254
1293
|
/** Extended metadata for user profile */
|
|
@@ -1335,6 +1374,200 @@ interface UpdateUserInfoResponse {
|
|
|
1335
1374
|
/** Updated user profile */
|
|
1336
1375
|
user: UserProfile;
|
|
1337
1376
|
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Follow Request
|
|
1379
|
+
*
|
|
1380
|
+
* Request body for follow/unfollow operations
|
|
1381
|
+
*/
|
|
1382
|
+
interface FollowRequest {
|
|
1383
|
+
/** The ID of the user to follow/unfollow */
|
|
1384
|
+
followingId: number;
|
|
1385
|
+
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Check Follow Query
|
|
1388
|
+
*
|
|
1389
|
+
* Query parameters for checking follow status
|
|
1390
|
+
*/
|
|
1391
|
+
interface CheckFollowQuery {
|
|
1392
|
+
/** The ID of the target user to check */
|
|
1393
|
+
targetUserId: number;
|
|
1394
|
+
}
|
|
1395
|
+
/**
|
|
1396
|
+
* Check Follow Response
|
|
1397
|
+
*
|
|
1398
|
+
* Response structure for check follow status endpoint
|
|
1399
|
+
*/
|
|
1400
|
+
interface CheckFollowResponse {
|
|
1401
|
+
/** Whether the authenticated user is following the target user */
|
|
1402
|
+
isFollowing: boolean;
|
|
1403
|
+
/** Whether both users follow each other */
|
|
1404
|
+
isMutual: boolean;
|
|
1405
|
+
}
|
|
1406
|
+
/**
|
|
1407
|
+
* Follow List Item
|
|
1408
|
+
*
|
|
1409
|
+
* Represents a user in following/followers list
|
|
1410
|
+
*/
|
|
1411
|
+
interface FollowListItem {
|
|
1412
|
+
/** User's avatar URL */
|
|
1413
|
+
avatarUrl: string | null;
|
|
1414
|
+
/** When the follow relationship was created */
|
|
1415
|
+
createdAt: string;
|
|
1416
|
+
/** User's display name */
|
|
1417
|
+
displayName: string | null;
|
|
1418
|
+
/** Account ID */
|
|
1419
|
+
id: number;
|
|
1420
|
+
/** Unique username */
|
|
1421
|
+
userName: string | null;
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Follow List Response
|
|
1425
|
+
*
|
|
1426
|
+
* Response structure for following/followers list endpoints
|
|
1427
|
+
*/
|
|
1428
|
+
interface FollowListResponse {
|
|
1429
|
+
/** List of users */
|
|
1430
|
+
data: FollowListItem[];
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1433
|
+
* Target Type for favorites and likes
|
|
1434
|
+
*/
|
|
1435
|
+
type InteractionTargetType = 'agent' | 'plugin';
|
|
1436
|
+
/**
|
|
1437
|
+
* Favorite Request
|
|
1438
|
+
*
|
|
1439
|
+
* Request body for add/remove favorite operations
|
|
1440
|
+
*/
|
|
1441
|
+
interface FavoriteRequest {
|
|
1442
|
+
/** The identifier of the target agent/plugin */
|
|
1443
|
+
targetId: string;
|
|
1444
|
+
/** The type of target */
|
|
1445
|
+
targetType: InteractionTargetType;
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* Check Favorite Query
|
|
1449
|
+
*
|
|
1450
|
+
* Query parameters for checking favorite status
|
|
1451
|
+
*/
|
|
1452
|
+
interface CheckFavoriteQuery {
|
|
1453
|
+
/** The identifier of the target agent/plugin */
|
|
1454
|
+
targetId: string;
|
|
1455
|
+
/** The type of target */
|
|
1456
|
+
targetType: InteractionTargetType;
|
|
1457
|
+
}
|
|
1458
|
+
/**
|
|
1459
|
+
* Check Favorite Response
|
|
1460
|
+
*
|
|
1461
|
+
* Response structure for check favorite status endpoint
|
|
1462
|
+
*/
|
|
1463
|
+
interface CheckFavoriteResponse {
|
|
1464
|
+
/** Whether the authenticated user has favorited the target */
|
|
1465
|
+
isFavorited: boolean;
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Favorite Query
|
|
1469
|
+
*
|
|
1470
|
+
* Query parameters for favorites list endpoints
|
|
1471
|
+
*/
|
|
1472
|
+
interface FavoriteQuery {
|
|
1473
|
+
/** Maximum number of results to return */
|
|
1474
|
+
limit?: number;
|
|
1475
|
+
/** Number of results to skip */
|
|
1476
|
+
offset?: number;
|
|
1477
|
+
/** Filter by target type */
|
|
1478
|
+
type?: InteractionTargetType;
|
|
1479
|
+
}
|
|
1480
|
+
/**
|
|
1481
|
+
* Favorite List Response
|
|
1482
|
+
*
|
|
1483
|
+
* Response structure for favorites list endpoints
|
|
1484
|
+
*/
|
|
1485
|
+
interface FavoriteListResponse {
|
|
1486
|
+
/** List of favorite items */
|
|
1487
|
+
data: any[];
|
|
1488
|
+
}
|
|
1489
|
+
/**
|
|
1490
|
+
* Like Request
|
|
1491
|
+
*
|
|
1492
|
+
* Request body for like/unlike operations
|
|
1493
|
+
*/
|
|
1494
|
+
interface LikeRequest {
|
|
1495
|
+
/** The identifier of the target agent/plugin */
|
|
1496
|
+
targetId: string;
|
|
1497
|
+
/** The type of target */
|
|
1498
|
+
targetType: InteractionTargetType;
|
|
1499
|
+
}
|
|
1500
|
+
/**
|
|
1501
|
+
* Check Like Query
|
|
1502
|
+
*
|
|
1503
|
+
* Query parameters for checking like status
|
|
1504
|
+
*/
|
|
1505
|
+
interface CheckLikeQuery {
|
|
1506
|
+
/** The identifier of the target agent/plugin */
|
|
1507
|
+
targetId: string;
|
|
1508
|
+
/** The type of target */
|
|
1509
|
+
targetType: InteractionTargetType;
|
|
1510
|
+
}
|
|
1511
|
+
/**
|
|
1512
|
+
* Check Like Response
|
|
1513
|
+
*
|
|
1514
|
+
* Response structure for check like status endpoint
|
|
1515
|
+
*/
|
|
1516
|
+
interface CheckLikeResponse {
|
|
1517
|
+
/** Whether the authenticated user has liked the target */
|
|
1518
|
+
isLiked: boolean;
|
|
1519
|
+
}
|
|
1520
|
+
/**
|
|
1521
|
+
* Toggle Like Response
|
|
1522
|
+
*
|
|
1523
|
+
* Response structure for toggle like endpoint
|
|
1524
|
+
*/
|
|
1525
|
+
interface ToggleLikeResponse {
|
|
1526
|
+
/** Whether the target is now liked */
|
|
1527
|
+
liked: boolean;
|
|
1528
|
+
}
|
|
1529
|
+
/**
|
|
1530
|
+
* Like Query
|
|
1531
|
+
*
|
|
1532
|
+
* Query parameters for likes list endpoints
|
|
1533
|
+
*/
|
|
1534
|
+
interface LikeQuery {
|
|
1535
|
+
/** Maximum number of results to return */
|
|
1536
|
+
limit?: number;
|
|
1537
|
+
/** Number of results to skip */
|
|
1538
|
+
offset?: number;
|
|
1539
|
+
/** Filter by target type */
|
|
1540
|
+
type?: InteractionTargetType;
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* Like List Response
|
|
1544
|
+
*
|
|
1545
|
+
* Response structure for likes list endpoints
|
|
1546
|
+
*/
|
|
1547
|
+
interface LikeListResponse {
|
|
1548
|
+
/** List of liked items */
|
|
1549
|
+
data: any[];
|
|
1550
|
+
}
|
|
1551
|
+
/**
|
|
1552
|
+
* Success Response
|
|
1553
|
+
*
|
|
1554
|
+
* Common response structure for success operations
|
|
1555
|
+
*/
|
|
1556
|
+
interface SuccessResponse {
|
|
1557
|
+
/** Whether the operation was successful */
|
|
1558
|
+
success: boolean;
|
|
1559
|
+
}
|
|
1560
|
+
/**
|
|
1561
|
+
* Pagination Query
|
|
1562
|
+
*
|
|
1563
|
+
* Common pagination parameters
|
|
1564
|
+
*/
|
|
1565
|
+
interface PaginationQuery {
|
|
1566
|
+
/** Maximum number of results to return */
|
|
1567
|
+
limit?: number;
|
|
1568
|
+
/** Number of results to skip */
|
|
1569
|
+
offset?: number;
|
|
1570
|
+
}
|
|
1338
1571
|
|
|
1339
1572
|
/**
|
|
1340
1573
|
* Base SDK class
|
|
@@ -2861,6 +3094,35 @@ declare class PluginsService extends BaseSDK {
|
|
|
2861
3094
|
filePattern?: string;
|
|
2862
3095
|
recursive?: boolean;
|
|
2863
3096
|
}): Promise<RunBuildInToolsResponse>;
|
|
3097
|
+
/**
|
|
3098
|
+
* Export a file from the Code Interpreter sandbox to a pre-signed URL
|
|
3099
|
+
*
|
|
3100
|
+
* This method uploads a file from the sandbox to an external storage location
|
|
3101
|
+
* via a pre-signed URL (e.g., S3 pre-signed URL). The upload is performed
|
|
3102
|
+
* using Python code execution within the sandbox.
|
|
3103
|
+
*
|
|
3104
|
+
* @param path - File path in sandbox to export
|
|
3105
|
+
* @param uploadUrl - Pre-signed URL to upload the file to
|
|
3106
|
+
* @param context - User and topic context
|
|
3107
|
+
* @returns Promise resolving to export result with success status and file info
|
|
3108
|
+
*
|
|
3109
|
+
* @example
|
|
3110
|
+
* ```typescript
|
|
3111
|
+
* const result = await sdk.plugins.exportFile(
|
|
3112
|
+
* './output/result.csv',
|
|
3113
|
+
* 'https://s3.amazonaws.com/bucket/key?X-Amz-Signature=...',
|
|
3114
|
+
* { userId: 'user-123', topicId: 'topic-456' }
|
|
3115
|
+
* );
|
|
3116
|
+
*
|
|
3117
|
+
* if (result.success && result.data?.result.success) {
|
|
3118
|
+
* console.log('File exported:', result.data.result.size, 'bytes');
|
|
3119
|
+
* }
|
|
3120
|
+
* ```
|
|
3121
|
+
*/
|
|
3122
|
+
exportFile(path: string, uploadUrl: string, context: {
|
|
3123
|
+
topicId: string;
|
|
3124
|
+
userId: string;
|
|
3125
|
+
}): Promise<RunBuildInToolsResponse>;
|
|
2864
3126
|
}
|
|
2865
3127
|
|
|
2866
3128
|
/**
|
|
@@ -2896,6 +3158,274 @@ declare class UserService extends BaseSDK {
|
|
|
2896
3158
|
updateUserInfo(data: UpdateUserInfoRequest, options?: globalThis.RequestInit): Promise<UpdateUserInfoResponse>;
|
|
2897
3159
|
}
|
|
2898
3160
|
|
|
3161
|
+
/**
|
|
3162
|
+
* User Follow Service
|
|
3163
|
+
*
|
|
3164
|
+
* Provides access to user follow functionality in the LobeHub Marketplace.
|
|
3165
|
+
* This service handles following/unfollowing users and retrieving follow relationships.
|
|
3166
|
+
*/
|
|
3167
|
+
declare class UserFollowService extends BaseSDK {
|
|
3168
|
+
/**
|
|
3169
|
+
* Follow a user
|
|
3170
|
+
*
|
|
3171
|
+
* Creates a follow relationship where the authenticated user follows the target user.
|
|
3172
|
+
* Requires authentication.
|
|
3173
|
+
*
|
|
3174
|
+
* @param followingId - The ID of the user to follow
|
|
3175
|
+
* @param options - Optional request options
|
|
3176
|
+
* @returns Promise resolving to success response
|
|
3177
|
+
* @throws Error if already following or cannot follow yourself
|
|
3178
|
+
*/
|
|
3179
|
+
follow(followingId: number, options?: globalThis.RequestInit): Promise<SuccessResponse>;
|
|
3180
|
+
/**
|
|
3181
|
+
* Unfollow a user
|
|
3182
|
+
*
|
|
3183
|
+
* Removes the follow relationship where the authenticated user unfollows the target user.
|
|
3184
|
+
* Requires authentication.
|
|
3185
|
+
*
|
|
3186
|
+
* @param followingId - The ID of the user to unfollow
|
|
3187
|
+
* @param options - Optional request options
|
|
3188
|
+
* @returns Promise resolving to success response
|
|
3189
|
+
* @throws Error if follow relationship not found
|
|
3190
|
+
*/
|
|
3191
|
+
unfollow(followingId: number, options?: globalThis.RequestInit): Promise<SuccessResponse>;
|
|
3192
|
+
/**
|
|
3193
|
+
* Check follow status
|
|
3194
|
+
*
|
|
3195
|
+
* Checks if the authenticated user is following the target user and if they follow each other.
|
|
3196
|
+
* Requires authentication.
|
|
3197
|
+
*
|
|
3198
|
+
* @param targetUserId - The ID of the user to check
|
|
3199
|
+
* @param options - Optional request options
|
|
3200
|
+
* @returns Promise resolving to follow status (isFollowing, isMutual)
|
|
3201
|
+
*/
|
|
3202
|
+
checkFollowStatus(targetUserId: number, options?: globalThis.RequestInit): Promise<CheckFollowResponse>;
|
|
3203
|
+
/**
|
|
3204
|
+
* Get following list
|
|
3205
|
+
*
|
|
3206
|
+
* Retrieves the list of users that a user is following.
|
|
3207
|
+
* This is a public endpoint - no authentication required.
|
|
3208
|
+
*
|
|
3209
|
+
* @param userId - The ID of the user whose following list to retrieve
|
|
3210
|
+
* @param params - Pagination parameters
|
|
3211
|
+
* @param options - Optional request options
|
|
3212
|
+
* @returns Promise resolving to list of following users
|
|
3213
|
+
*/
|
|
3214
|
+
getFollowing(userId: number, params?: PaginationQuery, options?: globalThis.RequestInit): Promise<FollowListResponse>;
|
|
3215
|
+
/**
|
|
3216
|
+
* Get followers list
|
|
3217
|
+
*
|
|
3218
|
+
* Retrieves the list of users who follow a user.
|
|
3219
|
+
* This is a public endpoint - no authentication required.
|
|
3220
|
+
*
|
|
3221
|
+
* @param userId - The ID of the user whose followers list to retrieve
|
|
3222
|
+
* @param params - Pagination parameters
|
|
3223
|
+
* @param options - Optional request options
|
|
3224
|
+
* @returns Promise resolving to list of followers
|
|
3225
|
+
*/
|
|
3226
|
+
getFollowers(userId: number, params?: PaginationQuery, options?: globalThis.RequestInit): Promise<FollowListResponse>;
|
|
3227
|
+
}
|
|
3228
|
+
|
|
3229
|
+
/**
|
|
3230
|
+
* User Favorite Service
|
|
3231
|
+
*
|
|
3232
|
+
* Provides access to user favorite functionality in the LobeHub Marketplace.
|
|
3233
|
+
* This service handles adding/removing favorites and retrieving favorite lists.
|
|
3234
|
+
*/
|
|
3235
|
+
declare class UserFavoriteService extends BaseSDK {
|
|
3236
|
+
/**
|
|
3237
|
+
* Add to favorites
|
|
3238
|
+
*
|
|
3239
|
+
* Adds an agent or plugin to the authenticated user's favorites.
|
|
3240
|
+
* Requires authentication.
|
|
3241
|
+
*
|
|
3242
|
+
* @param targetType - The type of target ('agent' or 'plugin')
|
|
3243
|
+
* @param targetId - The ID of the target agent/plugin
|
|
3244
|
+
* @param options - Optional request options
|
|
3245
|
+
* @returns Promise resolving to success response
|
|
3246
|
+
* @throws Error if already in favorites
|
|
3247
|
+
*/
|
|
3248
|
+
addFavorite(targetType: InteractionTargetType, targetId: string, options?: globalThis.RequestInit): Promise<SuccessResponse>;
|
|
3249
|
+
/**
|
|
3250
|
+
* Remove from favorites
|
|
3251
|
+
*
|
|
3252
|
+
* Removes an agent or plugin from the authenticated user's favorites.
|
|
3253
|
+
* Requires authentication.
|
|
3254
|
+
*
|
|
3255
|
+
* @param targetType - The type of target ('agent' or 'plugin')
|
|
3256
|
+
* @param targetId - The ID of the target agent/plugin
|
|
3257
|
+
* @param options - Optional request options
|
|
3258
|
+
* @returns Promise resolving to success response
|
|
3259
|
+
* @throws Error if favorite not found
|
|
3260
|
+
*/
|
|
3261
|
+
removeFavorite(targetType: InteractionTargetType, targetId: string, options?: globalThis.RequestInit): Promise<SuccessResponse>;
|
|
3262
|
+
/**
|
|
3263
|
+
* Check favorite status
|
|
3264
|
+
*
|
|
3265
|
+
* Checks if the authenticated user has favorited a specific agent or plugin.
|
|
3266
|
+
* Requires authentication.
|
|
3267
|
+
*
|
|
3268
|
+
* @param targetType - The type of target ('agent' or 'plugin')
|
|
3269
|
+
* @param targetId - The ID of the target agent/plugin
|
|
3270
|
+
* @param options - Optional request options
|
|
3271
|
+
* @returns Promise resolving to favorite status
|
|
3272
|
+
*/
|
|
3273
|
+
checkFavorite(targetType: InteractionTargetType, targetId: number, options?: globalThis.RequestInit): Promise<CheckFavoriteResponse>;
|
|
3274
|
+
/**
|
|
3275
|
+
* Get my favorites
|
|
3276
|
+
*
|
|
3277
|
+
* Retrieves the authenticated user's favorites.
|
|
3278
|
+
* Requires authentication.
|
|
3279
|
+
*
|
|
3280
|
+
* @param params - Query parameters for filtering and pagination
|
|
3281
|
+
* @param options - Optional request options
|
|
3282
|
+
* @returns Promise resolving to list of favorites
|
|
3283
|
+
*/
|
|
3284
|
+
getMyFavorites(params?: FavoriteQuery, options?: globalThis.RequestInit): Promise<FavoriteListResponse>;
|
|
3285
|
+
/**
|
|
3286
|
+
* Get user's favorites
|
|
3287
|
+
*
|
|
3288
|
+
* Retrieves a user's favorites.
|
|
3289
|
+
* This is a public endpoint - no authentication required.
|
|
3290
|
+
*
|
|
3291
|
+
* @param userId - The ID of the user whose favorites to retrieve
|
|
3292
|
+
* @param params - Query parameters for filtering and pagination
|
|
3293
|
+
* @param options - Optional request options
|
|
3294
|
+
* @returns Promise resolving to list of favorites
|
|
3295
|
+
*/
|
|
3296
|
+
getUserFavorites(userId: number, params?: FavoriteQuery, options?: globalThis.RequestInit): Promise<FavoriteListResponse>;
|
|
3297
|
+
/**
|
|
3298
|
+
* Get user's favorite agents with details
|
|
3299
|
+
*
|
|
3300
|
+
* Retrieves a user's favorite agents with full details.
|
|
3301
|
+
* This is a public endpoint - no authentication required.
|
|
3302
|
+
*
|
|
3303
|
+
* @param userId - The ID of the user whose favorite agents to retrieve
|
|
3304
|
+
* @param params - Pagination parameters
|
|
3305
|
+
* @param options - Optional request options
|
|
3306
|
+
* @returns Promise resolving to list of favorite agents
|
|
3307
|
+
*/
|
|
3308
|
+
getUserFavoriteAgents(userId: number, params?: Pick<FavoriteQuery, 'limit' | 'offset'>, options?: globalThis.RequestInit): Promise<FavoriteListResponse>;
|
|
3309
|
+
/**
|
|
3310
|
+
* Get user's favorite plugins with details
|
|
3311
|
+
*
|
|
3312
|
+
* Retrieves a user's favorite plugins with full details.
|
|
3313
|
+
* This is a public endpoint - no authentication required.
|
|
3314
|
+
*
|
|
3315
|
+
* @param userId - The ID of the user whose favorite plugins to retrieve
|
|
3316
|
+
* @param params - Pagination parameters
|
|
3317
|
+
* @param options - Optional request options
|
|
3318
|
+
* @returns Promise resolving to list of favorite plugins
|
|
3319
|
+
*/
|
|
3320
|
+
getUserFavoritePlugins(userId: number, params?: Pick<FavoriteQuery, 'limit' | 'offset'>, options?: globalThis.RequestInit): Promise<FavoriteListResponse>;
|
|
3321
|
+
}
|
|
3322
|
+
|
|
3323
|
+
/**
|
|
3324
|
+
* User Like Service
|
|
3325
|
+
*
|
|
3326
|
+
* Provides access to user like functionality in the LobeHub Marketplace.
|
|
3327
|
+
* This service handles liking/unliking content and retrieving like lists.
|
|
3328
|
+
*/
|
|
3329
|
+
declare class UserLikeService extends BaseSDK {
|
|
3330
|
+
/**
|
|
3331
|
+
* Like content
|
|
3332
|
+
*
|
|
3333
|
+
* Likes an agent or plugin for the authenticated user.
|
|
3334
|
+
* Requires authentication.
|
|
3335
|
+
*
|
|
3336
|
+
* @param targetType - The type of target ('agent' or 'plugin')
|
|
3337
|
+
* @param targetId - The ID of the target agent/plugin
|
|
3338
|
+
* @param options - Optional request options
|
|
3339
|
+
* @returns Promise resolving to success response
|
|
3340
|
+
* @throws Error if already liked
|
|
3341
|
+
*/
|
|
3342
|
+
like(targetType: InteractionTargetType, targetId: string, options?: globalThis.RequestInit): Promise<SuccessResponse>;
|
|
3343
|
+
/**
|
|
3344
|
+
* Unlike content
|
|
3345
|
+
*
|
|
3346
|
+
* Unlikes an agent or plugin for the authenticated user.
|
|
3347
|
+
* Requires authentication.
|
|
3348
|
+
*
|
|
3349
|
+
* @param targetType - The type of target ('agent' or 'plugin')
|
|
3350
|
+
* @param targetId - The ID of the target agent/plugin
|
|
3351
|
+
* @param options - Optional request options
|
|
3352
|
+
* @returns Promise resolving to success response
|
|
3353
|
+
* @throws Error if like not found
|
|
3354
|
+
*/
|
|
3355
|
+
unlike(targetType: InteractionTargetType, targetId: string, options?: globalThis.RequestInit): Promise<SuccessResponse>;
|
|
3356
|
+
/**
|
|
3357
|
+
* Toggle like status
|
|
3358
|
+
*
|
|
3359
|
+
* Toggles the like status - likes if not liked, unlikes if already liked.
|
|
3360
|
+
* Requires authentication.
|
|
3361
|
+
*
|
|
3362
|
+
* @param targetType - The type of target ('agent' or 'plugin')
|
|
3363
|
+
* @param targetId - The ID of the target agent/plugin
|
|
3364
|
+
* @param options - Optional request options
|
|
3365
|
+
* @returns Promise resolving to toggle response with new like status
|
|
3366
|
+
*/
|
|
3367
|
+
toggleLike(targetType: InteractionTargetType, targetId: string, options?: globalThis.RequestInit): Promise<ToggleLikeResponse>;
|
|
3368
|
+
/**
|
|
3369
|
+
* Check like status
|
|
3370
|
+
*
|
|
3371
|
+
* Checks if the authenticated user has liked a specific agent or plugin.
|
|
3372
|
+
* Requires authentication.
|
|
3373
|
+
*
|
|
3374
|
+
* @param targetType - The type of target ('agent' or 'plugin')
|
|
3375
|
+
* @param targetId - The ID of the target agent/plugin
|
|
3376
|
+
* @param options - Optional request options
|
|
3377
|
+
* @returns Promise resolving to like status
|
|
3378
|
+
*/
|
|
3379
|
+
checkLike(targetType: InteractionTargetType, targetId: number, options?: globalThis.RequestInit): Promise<CheckLikeResponse>;
|
|
3380
|
+
/**
|
|
3381
|
+
* Get my likes
|
|
3382
|
+
*
|
|
3383
|
+
* Retrieves the authenticated user's likes.
|
|
3384
|
+
* Requires authentication.
|
|
3385
|
+
*
|
|
3386
|
+
* @param params - Query parameters for filtering and pagination
|
|
3387
|
+
* @param options - Optional request options
|
|
3388
|
+
* @returns Promise resolving to list of likes
|
|
3389
|
+
*/
|
|
3390
|
+
getMyLikes(params?: LikeQuery, options?: globalThis.RequestInit): Promise<LikeListResponse>;
|
|
3391
|
+
/**
|
|
3392
|
+
* Get user's likes
|
|
3393
|
+
*
|
|
3394
|
+
* Retrieves a user's likes.
|
|
3395
|
+
* This is a public endpoint - no authentication required.
|
|
3396
|
+
*
|
|
3397
|
+
* @param userId - The ID of the user whose likes to retrieve
|
|
3398
|
+
* @param params - Query parameters for filtering and pagination
|
|
3399
|
+
* @param options - Optional request options
|
|
3400
|
+
* @returns Promise resolving to list of likes
|
|
3401
|
+
*/
|
|
3402
|
+
getUserLikes(userId: number, params?: LikeQuery, options?: globalThis.RequestInit): Promise<LikeListResponse>;
|
|
3403
|
+
/**
|
|
3404
|
+
* Get user's liked agents with details
|
|
3405
|
+
*
|
|
3406
|
+
* Retrieves a user's liked agents with full details.
|
|
3407
|
+
* This is a public endpoint - no authentication required.
|
|
3408
|
+
*
|
|
3409
|
+
* @param userId - The ID of the user whose liked agents to retrieve
|
|
3410
|
+
* @param params - Pagination parameters
|
|
3411
|
+
* @param options - Optional request options
|
|
3412
|
+
* @returns Promise resolving to list of liked agents
|
|
3413
|
+
*/
|
|
3414
|
+
getUserLikedAgents(userId: number, params?: Pick<LikeQuery, 'limit' | 'offset'>, options?: globalThis.RequestInit): Promise<LikeListResponse>;
|
|
3415
|
+
/**
|
|
3416
|
+
* Get user's liked plugins with details
|
|
3417
|
+
*
|
|
3418
|
+
* Retrieves a user's liked plugins with full details.
|
|
3419
|
+
* This is a public endpoint - no authentication required.
|
|
3420
|
+
*
|
|
3421
|
+
* @param userId - The ID of the user whose liked plugins to retrieve
|
|
3422
|
+
* @param params - Pagination parameters
|
|
3423
|
+
* @param options - Optional request options
|
|
3424
|
+
* @returns Promise resolving to list of liked plugins
|
|
3425
|
+
*/
|
|
3426
|
+
getUserLikedPlugins(userId: number, params?: Pick<LikeQuery, 'limit' | 'offset'>, options?: globalThis.RequestInit): Promise<LikeListResponse>;
|
|
3427
|
+
}
|
|
3428
|
+
|
|
2899
3429
|
/**
|
|
2900
3430
|
* LobeHub Market SDK Client
|
|
2901
3431
|
*
|
|
@@ -2925,6 +3455,21 @@ declare class MarketSDK extends BaseSDK {
|
|
|
2925
3455
|
* Provides methods to retrieve user profiles and their published agents
|
|
2926
3456
|
*/
|
|
2927
3457
|
readonly user: UserService;
|
|
3458
|
+
/**
|
|
3459
|
+
* User follow service for follow operations
|
|
3460
|
+
* Provides methods to follow/unfollow users and retrieve follow relationships
|
|
3461
|
+
*/
|
|
3462
|
+
readonly follows: UserFollowService;
|
|
3463
|
+
/**
|
|
3464
|
+
* User favorite service for favorite operations
|
|
3465
|
+
* Provides methods to add/remove favorites and retrieve favorite lists
|
|
3466
|
+
*/
|
|
3467
|
+
readonly favorites: UserFavoriteService;
|
|
3468
|
+
/**
|
|
3469
|
+
* User like service for like operations
|
|
3470
|
+
* Provides methods to like/unlike content and retrieve like lists
|
|
3471
|
+
*/
|
|
3472
|
+
readonly likes: UserLikeService;
|
|
2928
3473
|
/**
|
|
2929
3474
|
* Discovery service for retrieving API service information
|
|
2930
3475
|
* Used to get information about available endpoints and services
|
|
@@ -2960,4 +3505,4 @@ declare class MarketSDK extends BaseSDK {
|
|
|
2960
3505
|
registerClient(request: ClientRegistrationRequest): Promise<ClientRegistrationResponse>;
|
|
2961
3506
|
}
|
|
2962
3507
|
|
|
2963
|
-
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 CodeInterpreterToolName, type CodeInterpreterToolParams, type DiscoveryDocument, type EditLocalFileParams, type GetCommandOutputParams, type GlobLocalFilesParams, type GrepContentParams, type KillCommandParams, type ListLocalFilesParams, MarketAdmin, MarketSDK, type MarketSDKOptions, type MoveLocalFilesParams, type MoveOperation, type OAuthTokenResponse, type OwnAgentListQuery, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginListResponse, type PluginLocalization, type PluginQueryParams, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, 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 UnclaimedPluginItem, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserProfile, VisibilityEnumSchema, type WriteLocalFileParams };
|
|
3508
|
+
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 };
|