@lobehub/market-sdk 0.34.0-beta.0 → 0.34.0-beta.3

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
@@ -3831,6 +3831,8 @@ interface FollowListItem {
3831
3831
  interface FollowListResponse {
3832
3832
  /** List of users */
3833
3833
  data: FollowListItem[];
3834
+ /** Total number of users in the full list (not just the current page) */
3835
+ totalCount: number;
3834
3836
  }
3835
3837
  /**
3836
3838
  * Target Type for favorites and likes
@@ -5311,6 +5313,133 @@ declare class PluginEnvService extends BaseSDK {
5311
5313
  }>;
5312
5314
  }
5313
5315
 
5316
+ /**
5317
+ * Organization membership-authority source
5318
+ */
5319
+ type AdminOrganizationSource = 'native' | 'workspace';
5320
+ /**
5321
+ * Admin organization list query parameters
5322
+ */
5323
+ interface AdminOrganizationListQueryParams extends AdminListQueryParams {
5324
+ /** Filter by membership-authority source (defaults to all) */
5325
+ source?: AdminOrganizationSource | 'all';
5326
+ }
5327
+ /**
5328
+ * Organization list item in admin context
5329
+ */
5330
+ interface AdminOrganizationItem {
5331
+ accountId: number;
5332
+ archivedAt: string | null;
5333
+ avatarUrl: string | null;
5334
+ createdAt: string;
5335
+ description: string | null;
5336
+ displayName: string | null;
5337
+ email: string | null;
5338
+ memberCount: number;
5339
+ namespace: string;
5340
+ source: AdminOrganizationSource;
5341
+ updatedAt: string | null;
5342
+ websiteUrl: string | null;
5343
+ /** Associated cloud workspace id, derived from clerkId for workspace-source orgs */
5344
+ workspaceId: string | null;
5345
+ }
5346
+ /**
5347
+ * Organization member in admin context
5348
+ */
5349
+ interface AdminOrganizationMember {
5350
+ avatarUrl: string | null;
5351
+ createdAt: string;
5352
+ displayName: string | null;
5353
+ email: string | null;
5354
+ namespace: string | null;
5355
+ role: 'admin' | 'member';
5356
+ userAccountId: number;
5357
+ }
5358
+ /**
5359
+ * Organization detail in admin context (profile + members + published content)
5360
+ */
5361
+ interface AdminOrganizationDetail extends Omit<AdminOrganizationItem, 'memberCount' | 'workspaceId'> {
5362
+ agentGroups?: unknown[];
5363
+ agents?: unknown[];
5364
+ clerkId?: string | null;
5365
+ members: AdminOrganizationMember[];
5366
+ plugins?: unknown[];
5367
+ skills?: unknown[];
5368
+ }
5369
+ /**
5370
+ * Organization update parameters
5371
+ */
5372
+ interface AdminOrganizationUpdateParams {
5373
+ avatarUrl?: string;
5374
+ bannerUrl?: string | null;
5375
+ description?: string;
5376
+ displayName?: string;
5377
+ email?: string;
5378
+ websiteUrl?: string;
5379
+ }
5380
+ /**
5381
+ * Organization Management Service
5382
+ *
5383
+ * Provides administrative functionality for managing organization accounts in the
5384
+ * marketplace, including the workspace-mirrored orgs created by LobeHub Cloud.
5385
+ */
5386
+ declare class OrganizationService$1 extends BaseSDK {
5387
+ /**
5388
+ * Retrieves a paginated list of organizations with admin details
5389
+ *
5390
+ * @param params - Query parameters for filtering, search and pagination
5391
+ * @returns Promise resolving to the organization list response
5392
+ */
5393
+ getOrganizations(params?: AdminOrganizationListQueryParams): Promise<AdminListResponse<AdminOrganizationItem>>;
5394
+ /**
5395
+ * Retrieves a single organization detail (profile + members + published content)
5396
+ *
5397
+ * @param id - Organization account ID
5398
+ * @returns Promise resolving to the organization detail
5399
+ */
5400
+ getOrganization(id: number): Promise<{
5401
+ data: AdminOrganizationDetail;
5402
+ }>;
5403
+ /**
5404
+ * Lists an organization's members
5405
+ *
5406
+ * @param id - Organization account ID
5407
+ * @returns Promise resolving to the member list
5408
+ */
5409
+ getOrganizationMembers(id: number): Promise<{
5410
+ data: AdminOrganizationMember[];
5411
+ total: number;
5412
+ }>;
5413
+ /**
5414
+ * Updates an organization's information
5415
+ *
5416
+ * @param id - Organization account ID
5417
+ * @param data - Fields to update
5418
+ * @returns Promise resolving to the updated organization
5419
+ */
5420
+ updateOrganization(id: number, data: AdminOrganizationUpdateParams): Promise<{
5421
+ data: AdminOrganizationItem;
5422
+ }>;
5423
+ /**
5424
+ * Archives (soft-disables) an organization
5425
+ *
5426
+ * @param id - Organization account ID
5427
+ * @returns Promise resolving to the archived organization
5428
+ */
5429
+ archiveOrganization(id: number): Promise<{
5430
+ data: AdminOrganizationItem;
5431
+ }>;
5432
+ /**
5433
+ * Unarchives (restores) an organization
5434
+ *
5435
+ * @param id - Organization account ID
5436
+ * @returns Promise resolving to the restored organization
5437
+ */
5438
+ unarchiveOrganization(id: number): Promise<{
5439
+ data: AdminOrganizationItem;
5440
+ }>;
5441
+ }
5442
+
5314
5443
  /**
5315
5444
  * LobeHub Market Admin SDK Client
5316
5445
  *
@@ -5333,6 +5462,11 @@ declare class MarketAdmin extends BaseSDK {
5333
5462
  * Plugin environment service
5334
5463
  */
5335
5464
  readonly env: PluginEnvService;
5465
+ /**
5466
+ * Organization management service
5467
+ * Provides methods for managing organization accounts (including workspace mirrors)
5468
+ */
5469
+ readonly organizations: OrganizationService$1;
5336
5470
  /**
5337
5471
  * Plugin management service
5338
5472
  * Provides methods for creating, updating, and managing plugins
@@ -7757,6 +7891,14 @@ interface ClaimableAsset {
7757
7891
  interface ClaimAssetResponse {
7758
7892
  success: boolean;
7759
7893
  }
7894
+ interface DeleteAssetResponse {
7895
+ success: boolean;
7896
+ }
7897
+ interface UpdateStatusResponse {
7898
+ identifier: string;
7899
+ status: string;
7900
+ success: boolean;
7901
+ }
7760
7902
  interface PluginPublishData {
7761
7903
  author?: string;
7762
7904
  authorUrl?: string;
@@ -7823,6 +7965,40 @@ declare class UserPublishService extends BaseSDK {
7823
7965
  * @returns Promise resolving to the claim result
7824
7966
  */
7825
7967
  claimAsset(assetId: number, assetType: 'plugin' | 'skill'): Promise<ClaimAssetResponse>;
7968
+ /**
7969
+ * Deletes an owned skill permanently
7970
+ *
7971
+ * @param identifier - The skill identifier
7972
+ * @param options - Optional request options (must include authentication)
7973
+ * @returns Promise resolving to the delete result
7974
+ */
7975
+ deleteSkill(identifier: string, options?: globalThis.RequestInit): Promise<DeleteAssetResponse>;
7976
+ /**
7977
+ * Updates the publish status of an owned skill (上架/下架)
7978
+ *
7979
+ * @param identifier - The skill identifier
7980
+ * @param status - 'published' to list (上架) or 'unpublished' to delist (下架)
7981
+ * @param options - Optional request options (must include authentication)
7982
+ * @returns Promise resolving to the updated status
7983
+ */
7984
+ updateSkillStatus(identifier: string, status: 'published' | 'unpublished', options?: globalThis.RequestInit): Promise<UpdateStatusResponse>;
7985
+ /**
7986
+ * Deletes an owned plugin permanently
7987
+ *
7988
+ * @param identifier - The plugin identifier
7989
+ * @param options - Optional request options (must include authentication)
7990
+ * @returns Promise resolving to the delete result
7991
+ */
7992
+ deletePlugin(identifier: string, options?: globalThis.RequestInit): Promise<DeleteAssetResponse>;
7993
+ /**
7994
+ * Updates the publish status of an owned plugin (上架/下架)
7995
+ *
7996
+ * @param identifier - The plugin identifier
7997
+ * @param status - 'published' to list (上架) or 'unpublished' to delist (下架)
7998
+ * @param options - Optional request options (must include authentication)
7999
+ * @returns Promise resolving to the updated status
8000
+ */
8001
+ updatePluginStatus(identifier: string, status: 'published' | 'unpublished', options?: globalThis.RequestInit): Promise<UpdateStatusResponse>;
7826
8002
  /**
7827
8003
  * Publishes a new version of a plugin by submitting JSON data
7828
8004
  *