@lobehub/market-sdk 0.0.27 → 0.0.29

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
@@ -1,675 +1,888 @@
1
- import { ConnectionType, PluginCompatibility, PluginManifest, AdminPluginItem, AdminDeploymentOption, SystemDependency } from '@lobehub/market-types';
1
+ import { PluginManifest, PluginCompatibility, ConnectionType, AdminPluginItem, AdminPluginItemDetail, PluginVersion, AdminDeploymentOption, InstallationDetails, SystemDependency } from '@lobehub/market-types';
2
2
  export * from '@lobehub/market-types';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
6
- * 市场服务发现文档
6
+ * Visibility levels for plugins in the marketplace
7
+ * - public: Visible to all users
8
+ * - private: Visible only to the owner and authorized users
9
+ * - internal: Visible only within the organization
7
10
  */
8
- interface DiscoveryDocument {
9
- issuer: string;
10
- market_index_schema_version: number;
11
- resource_types_supported: string[];
12
- resource_endpoints: Record<string, string>;
13
- manifest_endpoint_template: string | Record<string, string>;
14
- support_locales: string[];
15
- response_types_supported: string[];
16
- authentication?: {
17
- schemes_supported: Array<'none' | 'apiKey' | 'oauth2'>;
18
- };
19
- api_documentation_url?: string;
20
- policy_url?: string;
21
- terms_of_service_url?: string;
22
- }
11
+ declare const VisibilityEnumSchema: z.ZodEnum<["public", "private", "internal"]>;
23
12
  /**
24
- * SDK 配置选项
13
+ * Publication status options for plugins
14
+ * - published: Publicly available in the marketplace
15
+ * - unpublished: Not publicly visible
16
+ * - archived: Marked as no longer maintained
17
+ * - deprecated: Marked as deprecated, but still available
25
18
  */
26
- interface MarketSDKOptions {
27
- baseURL?: string;
28
- defaultLocale?: string;
29
- apiKey?: string;
30
- }
31
-
32
- interface PluginItem {
33
- identifier: string;
34
- version: string;
35
- isLatest: boolean;
36
- name: string;
37
- createdAt: string;
38
- manifestUrl?: string;
39
- manifestVersion: string;
40
- icon?: string;
41
- author?: string;
42
- homepage?: string;
43
- category?: string;
44
- connectionType?: ConnectionType;
45
- compatibility?: PluginCompatibility;
46
- capabilities: {
47
- tools: boolean;
48
- prompts: boolean;
49
- resources: boolean;
50
- };
51
- description: string;
52
- tags?: string[];
53
- authRequirement?: string;
54
- isInstallable?: boolean;
55
- toolsCount?: number;
56
- promptsCount?: number;
57
- resourcesCount?: number;
58
- isValidated?: boolean;
59
- installCount?: number;
60
- ratingAverage?: number;
61
- ratingCount?: number;
62
- commentCount?: number;
63
- }
64
- interface PluginListResponse {
65
- items: PluginItem[];
66
- totalCount: number;
67
- currentPage: number;
68
- pageSize: number;
69
- totalPages: number;
70
- categories: string[];
71
- tags: string[];
72
- }
73
- interface PluginQueryParams {
74
- page?: number;
75
- pageSize?: number;
76
- category?: string;
77
- tags?: string;
78
- q?: string;
79
- sort?: 'installCount' | 'createdAt' | 'updatedAt' | 'ratingAverage';
80
- order?: 'asc' | 'desc';
81
- locale?: string;
82
- }
83
-
84
- declare const VisibilityEnumSchema: z.ZodEnum<["public", "private", "internal"]>;
85
19
  declare const StatusEnumSchema: z.ZodEnum<["published", "unpublished", "archived", "deprecated"]>;
86
20
  /**
87
- * 通用列表查询参数
21
+ * Common query parameters for admin list endpoints
22
+ * These parameters are used for pagination, filtering, and sorting.
88
23
  */
89
24
  interface AdminListQueryParams {
25
+ /** Current page number (1-based) */
90
26
  current?: number;
27
+ /** Search keyword for filtering results */
28
+ keyword?: string;
29
+ /** Number of items per page */
91
30
  pageSize?: number;
31
+ /** Field to sort results by */
92
32
  sortField?: string;
33
+ /** Sort direction */
93
34
  sortOrder?: 'ascend' | 'descend';
94
- keyword?: string;
95
35
  }
96
36
  /**
97
- * 通用列表响应格式
37
+ * Common response format for paginated admin list endpoints
38
+ * This structure provides both the data and pagination information.
98
39
  */
99
40
  interface AdminListResponse<T> {
41
+ /** Current page number (1-based) */
42
+ current: number;
43
+ /** Array of items for the current page */
100
44
  data: T[];
45
+ /** Number of items per page */
46
+ pageSize: number;
47
+ /** Total number of items across all pages */
101
48
  total: number;
49
+ /** Total number of pages */
102
50
  totalPages: number;
103
- current: number;
104
- pageSize: number;
105
51
  }
106
52
  /**
107
- * 插件版本数据库模型
53
+ * Review status options
54
+ * - pending: Awaiting review
55
+ * - approved: Review approved
56
+ * - rejected: Review rejected
108
57
  */
109
- interface PluginVersion {
110
- id: number;
111
- pluginId: number;
112
- version: string;
113
- isLatest: boolean;
114
- manifestUrl: string | null;
115
- toolsCount: number;
116
- promptsCount: number;
117
- resourcesCount: number;
118
- isValidated: boolean;
119
- createdAt: string;
120
- updatedAt: string;
121
- manifest: PluginManifest;
122
- meta: Record<string, any> | null;
123
- }
124
58
  type ReviewStatus = 'pending' | 'approved' | 'rejected';
59
+ /**
60
+ * Review status schema for validation
61
+ */
125
62
  declare const ReviewStatusEnumSchema: z.ZodEnum<["published", "draft", "review", "rejected"]>;
126
63
  /**
127
- * 管理员获取插件列表参数
64
+ * Parameters for admin plugin listing
65
+ * Extends the common query parameters with plugin-specific filters.
128
66
  */
129
67
  interface AdminPluginParams {
130
- status?: 'published' | 'draft' | 'review' | 'rejected';
131
- visibility?: 'public' | 'private' | 'unlisted';
68
+ /** Filter for featured plugins */
132
69
  featured?: boolean;
133
- ownerId?: number;
70
+ /** Maximum number of items to return */
134
71
  limit?: number;
72
+ /** Number of items to skip */
135
73
  offset?: number;
136
- query?: string;
137
- orderBy?: 'createdAt' | 'updatedAt' | 'installCount' | 'ratingAverage';
74
+ /** Sort direction */
138
75
  order?: 'asc' | 'desc';
76
+ /** Field to sort by */
77
+ orderBy?: 'createdAt' | 'updatedAt' | 'installCount' | 'ratingAverage';
78
+ /** Filter by owner ID */
79
+ ownerId?: number;
80
+ /** Search query string */
81
+ query?: string;
82
+ /** Filter by plugin status */
83
+ status?: 'published' | 'draft' | 'review' | 'rejected';
84
+ /** Filter by visibility level */
85
+ visibility?: 'public' | 'private' | 'unlisted';
139
86
  }
140
87
  /**
141
- * 创建插件版本参数
88
+ * Parameters for creating a new plugin version
142
89
  */
143
90
  interface PluginVersionCreateParams {
144
- version: string;
145
- manifest: PluginManifest;
146
- manifestUrl?: string;
91
+ /** Whether this is the latest version */
147
92
  isLatest?: boolean;
93
+ /** Whether this version has been validated */
148
94
  isValidated?: boolean;
95
+ /** The complete plugin manifest */
96
+ manifest: PluginManifest;
97
+ /** Optional URL to the manifest file */
98
+ manifestUrl?: string;
99
+ /** Additional metadata for the version */
149
100
  meta?: Record<string, any>;
101
+ /** Semantic version string (e.g., "1.0.0") */
102
+ version: string;
150
103
  }
151
104
  /**
152
- * 更新插件版本参数
105
+ * Parameters for updating an existing plugin version
153
106
  */
154
107
  interface PluginVersionUpdateParams {
155
- manifestUrl?: string;
108
+ /** Whether this version has been validated */
156
109
  isValidated?: boolean;
110
+ /** URL to the manifest file */
111
+ manifestUrl?: string;
112
+ /** Additional metadata for the version */
157
113
  meta?: Record<string, any>;
158
114
  }
159
115
  /**
160
- * 更新插件信息参数
116
+ * Parameters for updating a plugin
161
117
  */
162
118
  interface PluginUpdateParams {
119
+ /** Unique identifier for the plugin */
163
120
  identifier?: string;
164
- visibility?: 'public' | 'private' | 'unlisted';
165
- status?: 'published' | 'draft' | 'review' | 'rejected';
121
+ /** Whether this plugin is featured */
166
122
  isFeatured?: boolean;
167
- tags?: string[];
123
+ /** Additional metadata for the plugin */
168
124
  meta?: Record<string, any>;
125
+ /** Publication status */
126
+ status?: 'published' | 'draft' | 'review' | 'rejected';
127
+ /** Tags for categorization */
128
+ tags?: string[];
129
+ /** Visibility level */
130
+ visibility?: 'public' | 'private' | 'unlisted';
131
+ }
132
+
133
+ /**
134
+ * Market Service Discovery Document
135
+ *
136
+ * Defines the structure of the discovery document returned by the API.
137
+ * This document provides information about available endpoints, authentication
138
+ * methods, and other capabilities of the Market API.
139
+ */
140
+ interface DiscoveryDocument {
141
+ /** URL to the API documentation */
142
+ api_documentation_url?: string;
143
+ /** Authentication schemes supported by the API */
144
+ authentication?: {
145
+ /** List of supported authentication methods */
146
+ schemes_supported: Array<'none' | 'apiKey' | 'oauth2'>;
147
+ };
148
+ /** API issuer identifier (typically the base domain) */
149
+ issuer: string;
150
+ /** Template for constructing manifest endpoint URLs */
151
+ manifest_endpoint_template: string | Record<string, string>;
152
+ /** Version of the market index schema */
153
+ market_index_schema_version: number;
154
+ /** URL to the privacy policy */
155
+ policy_url?: string;
156
+ /** Mapping of resource types to their endpoint paths */
157
+ resource_endpoints: Record<string, string>;
158
+ /** List of resource types available in the marketplace */
159
+ resource_types_supported: string[];
160
+ /** List of response types supported by the API */
161
+ response_types_supported: string[];
162
+ /** List of locales supported for content localization */
163
+ support_locales: string[];
164
+ /** URL to the terms of service */
165
+ terms_of_service_url?: string;
166
+ }
167
+ /**
168
+ * SDK Configuration Options
169
+ *
170
+ * Options for configuring the behavior of the Market SDK.
171
+ */
172
+ interface MarketSDKOptions {
173
+ /** API key for authentication */
174
+ apiKey?: string;
175
+ /** Base URL for the Market API */
176
+ baseURL?: string;
177
+ /** Default locale to use for localized content */
178
+ defaultLocale?: string;
179
+ }
180
+
181
+ /**
182
+ * Category with count information
183
+ * Represents a plugin category and the number of plugins in that category.
184
+ */
185
+ interface CategoryItem {
186
+ /** Category name */
187
+ category: string;
188
+ /** Number of plugins in this category */
189
+ count: number;
190
+ }
191
+ /**
192
+ * Plugin item in the marketplace
193
+ * Represents a plugin as displayed in the marketplace listing.
194
+ */
195
+ interface PluginItem {
196
+ /** Authentication requirements for using the plugin */
197
+ authRequirement?: string;
198
+ /** Author or organization name */
199
+ author?: string;
200
+ /** Plugin capabilities */
201
+ capabilities: {
202
+ /** Whether the plugin provides custom prompts */
203
+ prompts: boolean;
204
+ /** Whether the plugin provides resources (assets) */
205
+ resources: boolean;
206
+ /** Whether the plugin provides tools (functions) */
207
+ tools: boolean;
208
+ };
209
+ /** Category for classification */
210
+ category?: string;
211
+ /** Number of comments on this plugin */
212
+ commentCount?: number;
213
+ /** Compatibility information for different platforms/versions */
214
+ compatibility?: PluginCompatibility;
215
+ /** Connection type for communicating with the plugin */
216
+ connectionType?: ConnectionType;
217
+ /** Creation timestamp (ISO 8601 format) */
218
+ createdAt: string;
219
+ /** Short description of the plugin */
220
+ description: string;
221
+ /** URL to the plugin's homepage or documentation */
222
+ homepage?: string;
223
+ /** Icon URL or emoji */
224
+ icon?: string;
225
+ /** Unique identifier for the plugin */
226
+ identifier: string;
227
+ /** Number of installations */
228
+ installCount?: number;
229
+ /** Whether the plugin can be installed */
230
+ isInstallable?: boolean;
231
+ /** Whether this is the latest version */
232
+ isLatest: boolean;
233
+ /** Whether this plugin has been validated */
234
+ isValidated?: boolean;
235
+ /** URL to the manifest file */
236
+ manifestUrl?: string;
237
+ /** Manifest schema version */
238
+ manifestVersion: string;
239
+ /** Display name of the plugin */
240
+ name: string;
241
+ /** Number of prompts provided by this plugin */
242
+ promptsCount?: number;
243
+ /** Average rating (typically 1-5 scale) */
244
+ ratingAverage?: number;
245
+ /** Number of ratings received */
246
+ ratingCount?: number;
247
+ /** Number of resources provided by this plugin */
248
+ resourcesCount?: number;
249
+ /** Tags for filtering and discovery */
250
+ tags?: string[];
251
+ /** Number of tools provided by this plugin */
252
+ toolsCount?: number;
253
+ /** Version string (e.g., "1.0.0") */
254
+ version: string;
255
+ }
256
+ /**
257
+ * Response structure for plugin listing endpoints
258
+ * Contains both the plugin items and pagination/filtering metadata.
259
+ */
260
+ interface PluginListResponse {
261
+ /** Available categories for filtering */
262
+ categories: string[];
263
+ /** Current page number (1-based) */
264
+ currentPage: number;
265
+ /** Array of plugin items for the current page */
266
+ items: PluginItem[];
267
+ /** Number of items per page */
268
+ pageSize: number;
269
+ /** Available tags for filtering */
270
+ tags: string[];
271
+ /** Total number of items across all pages */
272
+ totalCount: number;
273
+ /** Total number of pages */
274
+ totalPages: number;
275
+ }
276
+ /**
277
+ * Query parameters for plugin listing
278
+ * Used to filter, sort, and paginate plugin results.
279
+ */
280
+ interface PluginQueryParams {
281
+ /** Filter by category */
282
+ category?: string;
283
+ /** Locale for localized content */
284
+ locale?: string;
285
+ /** Sort direction */
286
+ order?: 'asc' | 'desc';
287
+ /** Page number (1-based) */
288
+ page?: number;
289
+ /** Number of items per page */
290
+ pageSize?: number;
291
+ /** Search query string */
292
+ q?: string;
293
+ /** Field to sort by */
294
+ sort?: 'installCount' | 'createdAt' | 'updatedAt' | 'ratingAverage';
295
+ /** Filter by tags (comma-separated) */
296
+ tags?: string;
169
297
  }
170
298
 
171
299
  /**
172
- * 基础 SDK
173
- * 提供共享的请求逻辑和认证功能
300
+ * Base SDK class
301
+ *
302
+ * Provides shared request handling and authentication functionality that is used
303
+ * by both the Market SDK and Admin SDK. This class handles the common concerns:
304
+ * - API endpoint configuration
305
+ * - Authentication header management
306
+ * - HTTP request handling
307
+ * - Error handling
308
+ * - Query string building
174
309
  */
175
310
  declare class BaseSDK {
311
+ /** Base API URL */
176
312
  protected baseUrl: string;
313
+ /** Default locale for requests that require localization */
177
314
  protected defaultLocale: string;
315
+ /** HTTP headers to include with all requests */
178
316
  protected headers: Record<string, string>;
179
317
  /**
180
- * 创建基础 SDK 实例
181
- * @param options SDK 配置选项
182
- * @param sharedHeaders 共享的 headers 对象(可选)
318
+ * Creates a new BaseSDK instance
319
+ *
320
+ * @param options - Configuration options for the SDK
321
+ * @param sharedHeaders - Optional shared headers object for reuse across services
183
322
  */
184
323
  constructor(options?: MarketSDKOptions, sharedHeaders?: Record<string, string>);
185
324
  /**
186
- * 发送请求并处理响应
187
- * @param url 请求 URL
188
- * @param options fetch 选项
189
- * @returns 响应数据
325
+ * Sends an HTTP request to the API and handles the response
326
+ *
327
+ * @param url - Request URL path (will be appended to baseUrl)
328
+ * @param options - Fetch API request options
329
+ * @returns Promise resolving to the parsed JSON response
330
+ * @throws Error if the request fails
190
331
  */
191
332
  protected request<T>(url: string, options?: RequestInit): Promise<T>;
192
333
  /**
193
- * 构建查询字符串
194
- * @param params 查询参数
195
- * @returns 查询字符串
334
+ * Builds a URL query string from a parameters object
335
+ *
336
+ * @param params - Object containing query parameters
337
+ * @returns Formatted query string (including leading ? if params exist)
196
338
  */
197
339
  protected buildQueryString(params: Record<string, any>): string;
198
340
  /**
199
- * 设置认证令牌
200
- * @param token 认证令牌
341
+ * Sets an authentication token for API requests
342
+ *
343
+ * @param token - API authentication token
201
344
  */
202
345
  setAuthToken(token: string): void;
203
346
  /**
204
- * 清除认证令牌
347
+ * Clears the authentication token
205
348
  */
206
349
  clearAuthToken(): void;
207
350
  }
208
351
 
209
352
  /**
210
- * 插件服务
211
- * 处理插件相关功能
212
- */
213
- declare class PluginsService extends BaseSDK {
214
- /**
215
- * 创建插件服务实例
216
- * @param options SDK 配置选项
217
- * @param sharedHeaders 共享的 headers 对象(可选)
218
- */
219
- constructor(options?: MarketSDKOptions, sharedHeaders?: Record<string, string>);
220
- /**
221
- * 获取插件列表
222
- * @param params 查询参数
223
- * @returns 插件列表响应
224
- */
225
- getPluginList(params?: PluginQueryParams): Promise<PluginListResponse>;
226
- /**
227
- * 获取插件清单
228
- * @param identifier 插件标识符
229
- * @param locale 语言
230
- * @param version 版本
231
- * @returns 插件清单
232
- */
233
- getPluginManifest(identifier: string, locale?: string, version?: string): Promise<PluginManifest>;
234
- }
235
-
236
- /**
237
- * LobeHub Market SDK Client
238
- * 采用组合模式组合各个领域服务
239
- */
240
- declare class MarketSDK extends BaseSDK {
241
- /**
242
- * 插件服务
243
- */
244
- readonly plugins: PluginsService;
245
- /**
246
- * 发现服务
247
- */
248
- private readonly discovery;
249
- /**
250
- * Create MarketSDK instance
251
- * @param options SDK configuration options
252
- */
253
- constructor(options?: MarketSDKOptions);
254
- /**
255
- * Get market service discovery document
256
- * @returns Service discovery document
257
- */
258
- getDiscoveryDocument(): Promise<DiscoveryDocument>;
259
- }
260
-
261
- /**
262
- * 插件管理服务
263
- * 处理插件相关的管理功能
353
+ * Plugin Management Service
354
+ *
355
+ * Provides administrative functionality for managing plugins in the marketplace.
356
+ * This service handles CRUD operations for plugins, plugin versions, and deployment options.
264
357
  */
265
358
  declare class PluginService extends BaseSDK {
266
359
  /**
267
- * 创建插件管理服务实例
268
- * @param options SDK 配置选项
269
- * @param sharedHeaders 共享的 headers 对象(可选)
360
+ * Creates a new PluginService instance
361
+ *
362
+ * @param options - Configuration options for the SDK
363
+ * @param sharedHeaders - Optional shared headers object for reuse across services
270
364
  */
271
365
  constructor(options?: MarketSDKOptions, sharedHeaders?: Record<string, string>);
272
366
  /**
273
- * 导入插件清单(需要管理员权限)
274
- * @param manifests 插件清单数组
275
- * @param ownerId 所有者 ID
276
- * @returns 导入结果
367
+ * Imports plugin manifests (requires admin privileges)
368
+ *
369
+ * Allows batch importing of plugin manifests into the marketplace.
370
+ *
371
+ * @param manifests - Array of plugin manifests to import
372
+ * @param ownerId - Optional owner ID to associate with the imported plugins
373
+ * @returns Promise resolving to the import results with counts of success and failure
277
374
  */
278
375
  importManifests(manifests: PluginManifest[], ownerId?: number): Promise<{
279
- success: number;
280
376
  failed: number;
377
+ success: number;
281
378
  }>;
282
379
  /**
283
- * 获取插件列表
284
- * @param params 查询参数
285
- * @returns 插件列表响应
380
+ * Retrieves a list of plugins with admin details
381
+ *
382
+ * Supports filtering, pagination, and sorting of results.
383
+ *
384
+ * @param params - Query parameters for filtering and pagination
385
+ * @returns Promise resolving to the plugin list response with admin details
286
386
  */
287
387
  getPlugins(params?: AdminListQueryParams): Promise<AdminListResponse<AdminPluginItem>>;
288
388
  /**
289
- * 获取单个插件
290
- * @param id 插件 ID
291
- * @returns 插件详情
389
+ * Retrieves a single plugin with full admin details
390
+ *
391
+ * @param id - Plugin ID or identifier
392
+ * @returns Promise resolving to the detailed plugin information with version history
292
393
  */
293
- getPlugin(id: number | string): Promise<AdminPluginItem & {
294
- versions: PluginVersion[];
295
- }>;
394
+ getPlugin(id: number | string): Promise<AdminPluginItemDetail>;
296
395
  /**
297
- * 更新插件信息
298
- * @param id 插件 ID
299
- * @param data 插件更新数据
300
- * @returns 更新后的插件
396
+ * Updates plugin information
397
+ *
398
+ * @param id - Plugin ID
399
+ * @param data - Plugin update data containing fields to update
400
+ * @returns Promise resolving to the updated plugin
301
401
  */
302
402
  updatePlugin(id: number, data: PluginUpdateParams): Promise<AdminPluginItem>;
303
403
  /**
304
- * 更新插件状态
305
- * @param id 插件 ID
306
- * @param status 新状态
307
- * @returns 成功响应
404
+ * Updates plugin publication status
405
+ *
406
+ * @param id - Plugin ID
407
+ * @param status - New status to set
408
+ * @returns Promise resolving to success response
308
409
  */
309
410
  updatePluginStatus(id: number, status: 'published' | 'draft' | 'review' | 'rejected'): Promise<{
310
- success: boolean;
311
411
  message: string;
412
+ success: boolean;
312
413
  }>;
313
414
  /**
314
- * 删除插件
315
- * @param id 插件 ID
316
- * @returns 成功响应
415
+ * Deletes a plugin
416
+ *
417
+ * @param id - Plugin ID
418
+ * @returns Promise resolving to success response
317
419
  */
318
420
  deletePlugin(id: number): Promise<{
319
- success: boolean;
320
421
  message: string;
422
+ success: boolean;
321
423
  }>;
322
424
  /**
323
- * 获取插件版本列表
324
- * @param pluginId 插件 ID
325
- * @returns 插件版本列表
425
+ * Retrieves the version history for a plugin
426
+ *
427
+ * @param pluginId - Plugin ID
428
+ * @returns Promise resolving to an array of plugin versions
326
429
  */
327
430
  getPluginVersions(pluginId: number): Promise<PluginVersion[]>;
328
431
  /**
329
- * 获取单个插件版本
330
- * @param pluginId 插件 ID
331
- * @param versionId 版本 ID
332
- * @returns 插件版本
432
+ * Retrieves a specific plugin version
433
+ *
434
+ * @param pluginId - Plugin ID
435
+ * @param versionId - Version ID
436
+ * @returns Promise resolving to the plugin version details
333
437
  */
334
438
  getPluginVersion(pluginId: number, versionId: number): Promise<PluginVersion>;
335
439
  /**
336
- * 创建插件版本
337
- * @param pluginId 插件 ID
338
- * @param data 版本创建数据
339
- * @returns 创建的版本
440
+ * Creates a new plugin version
441
+ *
442
+ * @param pluginId - Plugin ID
443
+ * @param data - Version creation data including manifest and version string
444
+ * @returns Promise resolving to the created plugin version
340
445
  */
341
446
  createPluginVersion(pluginId: number, data: PluginVersionCreateParams): Promise<PluginVersion>;
342
447
  /**
343
- * 更新插件版本
344
- * @param pluginId 插件 ID
345
- * @param versionId 版本 ID
346
- * @param data 版本更新数据
347
- * @returns 更新后的版本
448
+ * Updates a plugin version
449
+ *
450
+ * @param pluginId - Plugin ID
451
+ * @param versionId - Version ID
452
+ * @param data - Version update data
453
+ * @returns Promise resolving to the updated plugin version
348
454
  */
349
455
  updatePluginVersion(pluginId: number, versionId: number, data: PluginVersionUpdateParams): Promise<PluginVersion>;
350
456
  /**
351
- * 删除插件版本
352
- * @param pluginId 插件 ID
353
- * @param versionId 版本 ID
354
- * @returns 成功响应
457
+ * Deletes a plugin version
458
+ *
459
+ * @param pluginId - Plugin ID
460
+ * @param versionId - Version ID
461
+ * @returns Promise resolving to success response
355
462
  */
356
463
  deletePluginVersion(pluginId: number, versionId: number): Promise<{
357
- success: boolean;
358
464
  message: string;
465
+ success: boolean;
359
466
  }>;
360
467
  /**
361
- * 设置插件版本为最新版本
362
- * @param pluginId 插件 ID
363
- * @param versionId 版本 ID
364
- * @returns 成功响应
468
+ * Sets a specific version as the latest version of a plugin
469
+ *
470
+ * @param pluginId - Plugin ID
471
+ * @param versionId - Version ID to set as latest
472
+ * @returns Promise resolving to success response
365
473
  */
366
474
  setPluginVersionAsLatest(pluginId: number, versionId: number): Promise<{
367
- success: boolean;
368
475
  message: string;
476
+ success: boolean;
369
477
  }>;
370
478
  /**
371
- * 更新插件可见性
372
- * @param id 插件 ID
373
- * @param visibility 新的可见性状态
374
- * @returns 成功响应
479
+ * Updates plugin visibility
480
+ *
481
+ * @param id - Plugin ID
482
+ * @param visibility - New visibility setting
483
+ * @returns Promise resolving to success response
375
484
  */
376
485
  updatePluginVisibility(id: number, visibility: 'public' | 'private' | 'unlisted'): Promise<{
377
- success: boolean;
378
486
  message: string;
487
+ success: boolean;
379
488
  }>;
380
489
  /**
381
- * 批量更新插件状态
382
- * @param ids 插件 ID 数组
383
- * @param status 新的状态
384
- * @returns 成功响应
490
+ * Updates status for multiple plugins in a single operation
491
+ *
492
+ * @param ids - Array of plugin IDs to update
493
+ * @param status - New status to set for all specified plugins
494
+ * @returns Promise resolving to success response
385
495
  */
386
496
  batchUpdatePluginStatus(ids: number[], status: 'published' | 'draft' | 'review' | 'rejected'): Promise<{
387
- success: boolean;
388
497
  message: string;
498
+ success: boolean;
389
499
  }>;
390
500
  /**
391
- * 批量删除插件
392
- * @param ids 插件 ID 数组
393
- * @returns 成功响应
501
+ * Deletes multiple plugins in a single operation
502
+ *
503
+ * @param ids - Array of plugin IDs to delete
504
+ * @returns Promise resolving to success response
394
505
  */
395
506
  batchDeletePlugins(ids: number[]): Promise<{
396
- success: boolean;
397
507
  message: string;
508
+ success: boolean;
398
509
  }>;
399
510
  /**
400
- * 获取插件版本详情
401
- * @param pluginId 插件 ID
402
- * @param versionId 版本 ID
403
- * @returns 版本详情
511
+ * Retrieves detailed information about a plugin version including deployment options
512
+ *
513
+ * @param pluginId - Plugin ID
514
+ * @param versionId - Version ID
515
+ * @returns Promise resolving to version details with deployment options
404
516
  */
405
517
  getPluginVersionDetails(pluginId: number, versionId: number): Promise<PluginVersion & {
406
518
  deploymentOptions: any;
407
519
  }>;
408
520
  /**
409
- * 更新插件版本信息
410
- * @param pluginId 插件 ID
411
- * @param versionId 版本 ID
412
- * @param data 版本更新数据
413
- * @returns 更新后的版本
521
+ * Updates detailed information for a plugin version
522
+ *
523
+ * @param pluginId - Plugin ID
524
+ * @param versionId - Version ID
525
+ * @param data - Detailed version update data including metadata and capabilities
526
+ * @returns Promise resolving to the updated plugin version
414
527
  */
415
528
  updatePluginVersionDetails(pluginId: number, versionId: number, data: {
416
529
  author?: string;
417
530
  authorUrl?: string;
418
- name?: string;
419
- description?: string;
420
- tags?: string[];
421
- icon?: string;
422
- category?: string;
423
- capabilitiesTools?: boolean;
424
531
  capabilitiesPrompts?: boolean;
425
532
  capabilitiesResources?: boolean;
426
- tools?: any;
427
- resources?: any;
428
- prompts?: any;
533
+ capabilitiesTools?: boolean;
534
+ category?: string;
535
+ description?: string;
536
+ icon?: string;
429
537
  isValidated?: boolean;
430
538
  meta?: Record<string, any>;
539
+ name?: string;
540
+ prompts?: any;
541
+ resources?: any;
542
+ tags?: string[];
543
+ tools?: any;
431
544
  }): Promise<PluginVersion>;
432
545
  /**
433
- * 获取插件版本的部署选项列表
434
- * @param pluginId 插件 ID
435
- * @param versionId 版本 ID
436
- * @returns 部署选项列表
546
+ * Retrieves deployment options for a specific plugin version
547
+ *
548
+ * @param pluginId - Plugin ID
549
+ * @param versionId - Version ID
550
+ * @returns Promise resolving to an array of deployment options
437
551
  */
438
552
  getDeploymentOptions(pluginId: number, versionId: number): Promise<AdminDeploymentOption[]>;
439
553
  /**
440
- * 创建部署选项
441
- * @param pluginId 插件 ID
442
- * @param versionId 版本 ID
443
- * @param data 部署选项数据
444
- * @returns 创建的部署选项
554
+ * Creates a new deployment option for a plugin version
555
+ *
556
+ * @param pluginId - Plugin ID
557
+ * @param versionId - Version ID
558
+ * @param data - Deployment option configuration data
559
+ * @returns Promise resolving to the created deployment option
445
560
  */
446
561
  createDeploymentOption(pluginId: number, versionId: number, data: {
447
- installationMethod: string;
448
- installationDetails: Record<string, any>;
449
- connectionType: string;
450
- connectionCommand?: string;
451
562
  connectionArgs?: string[];
452
- isRecommended?: boolean;
563
+ connectionCommand?: string;
564
+ connectionType: string;
453
565
  description?: string;
566
+ installationDetails?: InstallationDetails;
567
+ installationMethod: string;
568
+ isRecommended?: boolean;
454
569
  }): Promise<AdminDeploymentOption>;
455
570
  /**
456
- * 更新部署选项
457
- * @param pluginId 插件 ID
458
- * @param versionId 版本 ID
459
- * @param optionId 部署选项 ID
460
- * @param data 部署选项更新数据
461
- * @returns 更新后的部署选项
571
+ * Updates an existing deployment option
572
+ *
573
+ * @param pluginId - Plugin ID
574
+ * @param versionId - Version ID
575
+ * @param optionId - Deployment option ID
576
+ * @param data - Updated deployment option configuration
577
+ * @returns Promise resolving to the updated deployment option
462
578
  */
463
579
  updateDeploymentOption(pluginId: number, versionId: number, optionId: number, data: {
464
- installationMethod?: string;
465
- installationDetails?: Record<string, any>;
466
- connectionType?: string;
467
- connectionCommand?: string;
468
580
  connectionArgs?: string[];
469
- isRecommended?: boolean;
581
+ connectionCommand?: string;
582
+ connectionType?: string;
470
583
  description?: string;
584
+ installationDetails?: Record<string, any>;
585
+ installationMethod?: string;
586
+ isRecommended?: boolean;
471
587
  }): Promise<AdminDeploymentOption>;
472
588
  /**
473
- * 删除部署选项
474
- * @param pluginId 插件 ID
475
- * @param versionId 版本 ID
476
- * @param optionId 部署选项 ID
477
- * @returns 成功响应
589
+ * Deletes a deployment option
590
+ *
591
+ * @param pluginId - Plugin ID
592
+ * @param versionId - Version ID
593
+ * @param optionId - Deployment option ID
594
+ * @returns Promise resolving to success response
478
595
  */
479
596
  deleteDeploymentOption(pluginId: number, versionId: number, optionId: number): Promise<{
480
- success: boolean;
481
597
  message: string;
598
+ success: boolean;
482
599
  }>;
483
600
  /**
484
- * 获取部署选项的系统依赖
485
- * @param pluginId 插件 ID
486
- * @param versionId 版本 ID
487
- * @param optionId 部署选项 ID
488
- * @returns 系统依赖列表
601
+ * Retrieves system dependencies for a deployment option
602
+ *
603
+ * @param pluginId - Plugin ID
604
+ * @param versionId - Version ID
605
+ * @param optionId - Deployment option ID
606
+ * @returns Promise resolving to an array of system dependencies
489
607
  */
490
608
  getDeploymentOptionSystemDependencies(pluginId: number, versionId: number, optionId: number): Promise<SystemDependency[]>;
491
609
  }
492
610
 
493
611
  /**
494
- * 系统依赖管理服务
612
+ * System Dependency Management Service
613
+ *
614
+ * Provides administrative functionality for managing system dependencies
615
+ * required by plugins. This service handles creating, updating, deleting,
616
+ * and listing system dependencies that plugins may require.
495
617
  */
496
618
  declare class SystemDependencyService extends BaseSDK {
497
619
  /**
498
- * 创建系统依赖管理服务实例
499
- * @param options SDK 配置选项
500
- * @param sharedHeaders 共享的 headers 对象(可选)
620
+ * Creates a new SystemDependencyService instance
621
+ *
622
+ * @param options - Configuration options for the SDK
623
+ * @param sharedHeaders - Optional shared headers object for reuse across services
501
624
  */
502
625
  constructor(options?: MarketSDKOptions, sharedHeaders?: Record<string, string>);
503
626
  /**
504
- * 获取所有系统依赖项
505
- * @returns 系统依赖项列表
627
+ * Retrieves all system dependencies
628
+ *
629
+ * Gets a list of all defined system dependencies that plugins may require.
630
+ *
631
+ * @returns Promise resolving to an array of system dependencies
506
632
  */
507
633
  getSystemDependencies(): Promise<SystemDependency[]>;
508
634
  /**
509
- * 获取特定系统依赖项
510
- * @param id 依赖项 ID
511
- * @returns 系统依赖项
635
+ * Retrieves a specific system dependency by ID
636
+ *
637
+ * @param id - System dependency ID
638
+ * @returns Promise resolving to the system dependency details
512
639
  */
513
640
  getSystemDependency(id: number): Promise<SystemDependency>;
514
641
  /**
515
- * 创建系统依赖项
516
- * @param data 依赖项创建数据
517
- * @returns 创建的依赖项
642
+ * Creates a new system dependency
643
+ *
644
+ * @param data - System dependency creation data
645
+ * @returns Promise resolving to the created system dependency
518
646
  */
519
647
  createSystemDependency(data: Omit<SystemDependency, 'id'>): Promise<SystemDependency>;
520
648
  /**
521
- * 更新系统依赖项
522
- * @param id 依赖项 ID
523
- * @param data 依赖项更新数据
524
- * @returns 更新后的依赖项
649
+ * Updates an existing system dependency
650
+ *
651
+ * @param id - System dependency ID
652
+ * @param data - System dependency update data
653
+ * @returns Promise resolving to the updated system dependency
525
654
  */
526
655
  updateSystemDependency(id: number, data: Partial<SystemDependency>): Promise<SystemDependency>;
527
656
  /**
528
- * 删除系统依赖项
529
- * @param id 依赖项 ID
530
- * @returns 成功响应
657
+ * Deletes a system dependency
658
+ *
659
+ * @param id - System dependency ID
660
+ * @returns Promise resolving to success response
531
661
  */
532
662
  deleteSystemDependency(id: number): Promise<{
533
- success: boolean;
534
663
  message: string;
664
+ success: boolean;
535
665
  }>;
536
666
  }
537
667
 
668
+ /**
669
+ * Settings entity representing a system setting
670
+ */
538
671
  interface Settings {
672
+ /** Creation timestamp (ISO 8601 format) */
673
+ createdAt: string;
674
+ /** Optional description of the setting's purpose */
675
+ description?: string;
676
+ /** Unique identifier for the setting */
539
677
  id: number;
678
+ /** Setting key name used for retrieving the setting */
540
679
  key: string;
541
- value: string;
542
- description?: string;
543
- createdAt: string;
680
+ /** Last update timestamp (ISO 8601 format) */
544
681
  updatedAt: string;
682
+ /** Setting value (stored as string) */
683
+ value: string;
545
684
  }
685
+ /**
686
+ * Configuration for enabled resource types
687
+ */
546
688
  interface EnabledResources {
547
- plugins: boolean;
689
+ /** Whether agent resources are enabled */
548
690
  agents: boolean;
691
+ /** Whether plugin resources are enabled */
692
+ plugins: boolean;
549
693
  }
694
+ /**
695
+ * Authentication configuration
696
+ */
550
697
  interface AuthenticationConfig {
698
+ /** Whether authentication is required */
551
699
  enabled: boolean;
700
+ /** Supported authentication schemes */
552
701
  schemes: string[];
553
702
  }
703
+ /**
704
+ * Documentation URL configuration
705
+ */
554
706
  interface DocumentationConfig {
707
+ /** URL to API documentation */
555
708
  apiUrl?: string;
709
+ /** URL to privacy policy */
556
710
  policyUrl?: string;
711
+ /** URL to terms of service */
557
712
  termsOfServiceUrl?: string;
558
713
  }
714
+ /**
715
+ * Map of all system settings with typed properties
716
+ */
559
717
  interface SettingsMap {
560
- baseURL: string;
561
- enabledResources: EnabledResources;
718
+ /** Additional settings (dynamically added) */
719
+ [key: string]: any;
720
+ /** Authentication configuration */
562
721
  authentication: AuthenticationConfig;
722
+ /** Base URL for the marketplace */
723
+ baseURL: string;
724
+ /** Documentation URL configuration */
563
725
  documentation: DocumentationConfig;
726
+ /** Configuration for enabled resource types */
727
+ enabledResources: EnabledResources;
728
+ /** Supported locales */
564
729
  locales: string[];
565
- [key: string]: any;
566
730
  }
731
+ /**
732
+ * Parameters for creating a new setting
733
+ */
567
734
  interface CreateSettingsParams {
735
+ /** Optional description of the setting's purpose */
736
+ description?: string;
737
+ /** Setting key name */
568
738
  key: string;
739
+ /** Setting value (will be stored as string) */
569
740
  value: string;
570
- description?: string;
571
741
  }
742
+ /**
743
+ * Parameters for updating an existing setting
744
+ */
572
745
  interface UpdateSettingsParams {
573
- value: string;
746
+ /** Optional new description */
574
747
  description?: string;
748
+ /** New setting value */
749
+ value: string;
575
750
  }
576
751
  /**
577
- * 系统设置管理服务
578
- * 处理系统设置相关的管理功能
752
+ * Settings Management Service
753
+ *
754
+ * Provides administrative functionality for managing system settings.
755
+ * This service handles getting, creating, updating, and deleting
756
+ * configuration settings for the marketplace.
579
757
  */
580
758
  declare class SettingsService extends BaseSDK {
581
759
  /**
582
- * 获取设置列表
583
- * @param params 查询参数
584
- * @returns 设置键值对对象
760
+ * Retrieves all system settings
761
+ *
762
+ * Returns a consolidated map of all settings with typed values
763
+ * for known setting keys.
764
+ *
765
+ * @returns Promise resolving to the settings map
585
766
  */
586
767
  getSettings(): Promise<SettingsMap>;
587
768
  /**
588
- * 获取单个设置
589
- * @param key 设置键名
590
- * @returns 设置详情
769
+ * Retrieves a specific setting by key
770
+ *
771
+ * @param key - Setting key name
772
+ * @returns Promise resolving to the setting details
591
773
  */
592
774
  getSettingByKey(key: string): Promise<{
593
775
  data: Settings;
594
776
  }>;
595
777
  /**
596
- * 创建设置
597
- * @param data 设置数据
598
- * @returns 创建的设置
778
+ * Creates a new system setting
779
+ *
780
+ * @param data - Setting creation parameters
781
+ * @returns Promise resolving to the created setting
599
782
  */
600
783
  createSetting(data: CreateSettingsParams): Promise<{
601
784
  data: Settings;
602
785
  }>;
603
786
  /**
604
- * 更新设置
605
- * @param key 设置键名
606
- * @param data 更新数据
607
- * @returns 更新后的设置
787
+ * Updates an existing setting
788
+ *
789
+ * @param key - Setting key name
790
+ * @param data - Setting update parameters
791
+ * @returns Promise resolving to the updated setting
608
792
  */
609
793
  updateSetting(key: string, data: UpdateSettingsParams): Promise<{
610
794
  data: Settings;
611
795
  }>;
612
796
  /**
613
- * 删除设置
614
- * @param key 设置键名
615
- * @returns 删除结果
797
+ * Deletes a setting
798
+ *
799
+ * @param key - Setting key name
800
+ * @returns Promise resolving to success message
616
801
  */
617
802
  deleteSetting(key: string): Promise<{
618
803
  message: string;
619
804
  }>;
620
805
  }
621
806
 
807
+ /**
808
+ * Review entity representing a plugin review
809
+ */
622
810
  interface Review {
811
+ /** Optional comment providing feedback */
812
+ comment?: string;
813
+ /** Creation timestamp (ISO 8601 format) */
814
+ createdAt: string;
815
+ /** Unique identifier for the review */
623
816
  id: number;
817
+ /** ID of the plugin being reviewed */
624
818
  pluginId: number;
625
- status: ReviewStatus;
626
- comment?: string;
819
+ /** ID of the reviewer (if available) */
627
820
  reviewerId?: number;
628
- createdAt: string;
821
+ /** Current status of the review */
822
+ status: ReviewStatus;
823
+ /** Last update timestamp (ISO 8601 format) */
629
824
  updatedAt: string;
630
825
  }
826
+ /**
827
+ * Extended review information with related entities
828
+ */
631
829
  interface PluginReviewWithRelations extends Review {
830
+ /** Related plugin information */
632
831
  plugin?: any;
832
+ /** Related version information */
633
833
  version?: any;
634
834
  }
835
+ /**
836
+ * Parameters for updating a review
837
+ */
635
838
  interface UpdateReviewParams {
636
- status: ReviewStatus;
839
+ /** Optional comment or feedback */
637
840
  comment?: string;
841
+ /** New status to set for the review */
842
+ status: ReviewStatus;
638
843
  }
639
844
  /**
640
- * 审核管理服务
641
- * 处理插件审核相关的管理功能
845
+ * Review Management Service
846
+ *
847
+ * Provides administrative functionality for managing plugin reviews.
848
+ * This service handles listing, fetching, and updating review statuses
849
+ * for plugins in the marketplace.
642
850
  */
643
851
  declare class ReviewService extends BaseSDK {
644
852
  /**
645
- * 创建审核管理服务实例
646
- * @param options SDK 配置选项
647
- * @param sharedHeaders 共享的 headers 对象(可选)
853
+ * Creates a new ReviewService instance
854
+ *
855
+ * @param options - Configuration options for the SDK
856
+ * @param sharedHeaders - Optional shared headers object for reuse across services
648
857
  */
649
858
  constructor(options?: MarketSDKOptions, sharedHeaders?: Record<string, string>);
650
859
  /**
651
- * 获取审核列表
652
- * @param params 查询参数
653
- * @returns 审核列表响应
860
+ * Retrieves a list of reviews with filtering options
861
+ *
862
+ * @param params - Query parameters for filtering and pagination
863
+ * @returns Promise resolving to the review list response
654
864
  */
655
865
  getReviews(params?: AdminListQueryParams): Promise<AdminListResponse<PluginReviewWithRelations>>;
656
866
  /**
657
- * 获取审核详情
658
- * @param id 审核 ID
659
- * @returns 审核详情
867
+ * Retrieves a specific review by ID
868
+ *
869
+ * @param id - Review ID
870
+ * @returns Promise resolving to the review details
660
871
  */
661
872
  getReviewById(id: number): Promise<Review>;
662
873
  /**
663
- * 更新审核状态
664
- * @param id 审核 ID
665
- * @param data 更新数据
666
- * @returns 更新后的审核信息
874
+ * Updates a review's status and comment
875
+ *
876
+ * @param id - Review ID
877
+ * @param data - Update parameters containing new status and optional comment
878
+ * @returns Promise resolving to the updated review
667
879
  */
668
880
  updateReview(id: number, data: UpdateReviewParams): Promise<Review>;
669
881
  /**
670
- * 获取插件的审核历史
671
- * @param pluginId 插件 ID
672
- * @returns 审核历史列表
882
+ * Retrieves the review history for a specific plugin
883
+ *
884
+ * @param pluginId - Plugin ID
885
+ * @returns Promise resolving to an array of reviews for the plugin
673
886
  */
674
887
  getPluginReviews(pluginId: number): Promise<{
675
888
  data: Review[];
@@ -677,31 +890,122 @@ declare class ReviewService extends BaseSDK {
677
890
  }
678
891
 
679
892
  /**
680
- * LobeHub 市场管理 SDK 客户端
681
- * 专门用于管理市场的管理功能
893
+ * LobeHub Market Admin SDK Client
894
+ *
895
+ * Client for accessing administrative functionality of the LobeHub Marketplace.
896
+ * This SDK provides privileged operations for managing plugins, reviews,
897
+ * system settings, and dependencies. It requires admin-level authentication.
682
898
  */
683
899
  declare class MarketAdmin extends BaseSDK {
684
900
  /**
685
- * 插件管理服务
901
+ * Plugin management service
902
+ * Provides methods for creating, updating, and managing plugins
686
903
  */
687
904
  readonly plugins: PluginService;
688
905
  /**
689
- * 审核管理服务
906
+ * Review management service
907
+ * Provides methods for moderating and managing user reviews
690
908
  */
691
909
  readonly reviews: ReviewService;
692
910
  /**
693
- * 系统设置管理服务
911
+ * System settings management service
912
+ * Provides methods for configuring marketplace settings
694
913
  */
695
914
  readonly settings: SettingsService;
696
915
  /**
697
- * 系统依赖管理服务
916
+ * System dependency management service
917
+ * Provides methods for managing system dependencies required by plugins
698
918
  */
699
919
  readonly dependencies: SystemDependencyService;
700
920
  /**
701
- * 创建 MarketAdmin 实例
702
- * @param options SDK 配置选项
921
+ * Creates a new MarketAdmin instance
922
+ *
923
+ * @param options - Configuration options for the SDK
924
+ */
925
+ constructor(options?: MarketSDKOptions);
926
+ }
927
+
928
+ /**
929
+ * Plugins Service
930
+ *
931
+ * Provides access to plugin-related functionality in the LobeHub Marketplace.
932
+ * This service handles listing, searching, and retrieving detailed information
933
+ * about plugins available in the marketplace.
934
+ */
935
+ declare class PluginsService extends BaseSDK {
936
+ /**
937
+ * Creates a new PluginsService instance
938
+ *
939
+ * @param options - Configuration options for the SDK
940
+ * @param sharedHeaders - Optional shared headers object for reuse across services
941
+ */
942
+ constructor(options?: MarketSDKOptions, sharedHeaders?: Record<string, string>);
943
+ /**
944
+ * Retrieves a list of plugins from the marketplace
945
+ *
946
+ * Supports filtering, pagination, and localization of results.
947
+ *
948
+ * @param params - Query parameters for filtering and pagination
949
+ * @returns Promise resolving to the plugin list response containing items and pagination info
950
+ */
951
+ getPluginList(params?: PluginQueryParams): Promise<PluginListResponse>;
952
+ /**
953
+ * Retrieves all plugin categories and their counts
954
+ *
955
+ * Returns a list of categories along with the number of plugins in each category.
956
+ * Useful for building category filters in a UI.
957
+ *
958
+ * @returns Promise resolving to an array of category items with counts
959
+ */
960
+ getCategories(): Promise<CategoryItem[]>;
961
+ /**
962
+ * Retrieves the manifest for a specific plugin
963
+ *
964
+ * The manifest contains detailed information about a plugin, including
965
+ * its capabilities, tools, prompts, and resources.
966
+ *
967
+ * @param identifier - Unique identifier of the plugin
968
+ * @param locale - Optional locale for localized content (defaults to SDK default locale)
969
+ * @param version - Optional specific version to retrieve (defaults to latest)
970
+ * @returns Promise resolving to the plugin manifest
971
+ */
972
+ getPluginManifest(identifier: string, locale?: string, version?: string): Promise<PluginManifest>;
973
+ }
974
+
975
+ /**
976
+ * LobeHub Market SDK Client
977
+ *
978
+ * Main client for accessing the LobeHub Marketplace API.
979
+ * This class provides access to marketplace resources like plugins, agents,
980
+ * and service discovery information. It follows a composition pattern
981
+ * by combining specialized domain services.
982
+ */
983
+ declare class MarketSDK extends BaseSDK {
984
+ /**
985
+ * Plugins service for accessing plugin-related functionality
986
+ * Provides methods to list, search, and retrieve plugin information
987
+ */
988
+ readonly plugins: PluginsService;
989
+ /**
990
+ * Discovery service for retrieving API service information
991
+ * Used to get information about available endpoints and services
992
+ */
993
+ private readonly discovery;
994
+ /**
995
+ * Creates a new MarketSDK instance
996
+ *
997
+ * @param options - Configuration options for the SDK
703
998
  */
704
999
  constructor(options?: MarketSDKOptions);
1000
+ /**
1001
+ * Retrieves the service discovery document
1002
+ *
1003
+ * The discovery document provides information about available API endpoints,
1004
+ * versions, and capabilities of the Market API.
1005
+ *
1006
+ * @returns Promise resolving to the service discovery document
1007
+ */
1008
+ getDiscoveryDocument(): Promise<DiscoveryDocument>;
705
1009
  }
706
1010
 
707
- export { type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type DiscoveryDocument, MarketAdmin, MarketSDK, type MarketSDKOptions, type PluginItem, type PluginListResponse, type PluginQueryParams, type PluginUpdateParams, type PluginVersion, type PluginVersionCreateParams, type PluginVersionUpdateParams, type ReviewStatus, ReviewStatusEnumSchema, StatusEnumSchema, VisibilityEnumSchema };
1011
+ export { type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type CategoryItem, type DiscoveryDocument, MarketAdmin, MarketSDK, type MarketSDKOptions, type PluginItem, type PluginListResponse, type PluginQueryParams, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type ReviewStatus, ReviewStatusEnumSchema, StatusEnumSchema, VisibilityEnumSchema };