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