@lobehub/market-sdk 0.33.5 → 0.33.6
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 +42 -0
- package/dist/index.mjs +76 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -7380,6 +7380,14 @@ interface ClaimableAsset {
|
|
|
7380
7380
|
interface ClaimAssetResponse {
|
|
7381
7381
|
success: boolean;
|
|
7382
7382
|
}
|
|
7383
|
+
interface DeleteAssetResponse {
|
|
7384
|
+
success: boolean;
|
|
7385
|
+
}
|
|
7386
|
+
interface UpdateStatusResponse {
|
|
7387
|
+
identifier: string;
|
|
7388
|
+
status: string;
|
|
7389
|
+
success: boolean;
|
|
7390
|
+
}
|
|
7383
7391
|
interface PluginPublishData {
|
|
7384
7392
|
author?: string;
|
|
7385
7393
|
authorUrl?: string;
|
|
@@ -7446,6 +7454,40 @@ declare class UserPublishService extends BaseSDK {
|
|
|
7446
7454
|
* @returns Promise resolving to the claim result
|
|
7447
7455
|
*/
|
|
7448
7456
|
claimAsset(assetId: number, assetType: 'plugin' | 'skill'): Promise<ClaimAssetResponse>;
|
|
7457
|
+
/**
|
|
7458
|
+
* Deletes an owned skill permanently
|
|
7459
|
+
*
|
|
7460
|
+
* @param identifier - The skill identifier
|
|
7461
|
+
* @param options - Optional request options (must include authentication)
|
|
7462
|
+
* @returns Promise resolving to the delete result
|
|
7463
|
+
*/
|
|
7464
|
+
deleteSkill(identifier: string, options?: globalThis.RequestInit): Promise<DeleteAssetResponse>;
|
|
7465
|
+
/**
|
|
7466
|
+
* Updates the publish status of an owned skill (上架/下架)
|
|
7467
|
+
*
|
|
7468
|
+
* @param identifier - The skill identifier
|
|
7469
|
+
* @param status - 'published' to list (上架) or 'unpublished' to delist (下架)
|
|
7470
|
+
* @param options - Optional request options (must include authentication)
|
|
7471
|
+
* @returns Promise resolving to the updated status
|
|
7472
|
+
*/
|
|
7473
|
+
updateSkillStatus(identifier: string, status: 'published' | 'unpublished', options?: globalThis.RequestInit): Promise<UpdateStatusResponse>;
|
|
7474
|
+
/**
|
|
7475
|
+
* Deletes an owned plugin permanently
|
|
7476
|
+
*
|
|
7477
|
+
* @param identifier - The plugin identifier
|
|
7478
|
+
* @param options - Optional request options (must include authentication)
|
|
7479
|
+
* @returns Promise resolving to the delete result
|
|
7480
|
+
*/
|
|
7481
|
+
deletePlugin(identifier: string, options?: globalThis.RequestInit): Promise<DeleteAssetResponse>;
|
|
7482
|
+
/**
|
|
7483
|
+
* Updates the publish status of an owned plugin (上架/下架)
|
|
7484
|
+
*
|
|
7485
|
+
* @param identifier - The plugin identifier
|
|
7486
|
+
* @param status - 'published' to list (上架) or 'unpublished' to delist (下架)
|
|
7487
|
+
* @param options - Optional request options (must include authentication)
|
|
7488
|
+
* @returns Promise resolving to the updated status
|
|
7489
|
+
*/
|
|
7490
|
+
updatePluginStatus(identifier: string, status: 'published' | 'unpublished', options?: globalThis.RequestInit): Promise<UpdateStatusResponse>;
|
|
7449
7491
|
/**
|
|
7450
7492
|
* Publishes a new version of a plugin by submitting JSON data
|
|
7451
7493
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -5522,6 +5522,82 @@ var UserPublishService = class extends BaseSDK {
|
|
|
5522
5522
|
log27("Claim result for %s %d: %s", assetType, assetId, result.success);
|
|
5523
5523
|
return result;
|
|
5524
5524
|
}
|
|
5525
|
+
/**
|
|
5526
|
+
* Deletes an owned skill permanently
|
|
5527
|
+
*
|
|
5528
|
+
* @param identifier - The skill identifier
|
|
5529
|
+
* @param options - Optional request options (must include authentication)
|
|
5530
|
+
* @returns Promise resolving to the delete result
|
|
5531
|
+
*/
|
|
5532
|
+
async deleteSkill(identifier, options) {
|
|
5533
|
+
log27("Deleting skill: %s", identifier);
|
|
5534
|
+
const result = await this.request(
|
|
5535
|
+
`/v1/user/skills/${encodeURIComponent(identifier)}`,
|
|
5536
|
+
{ method: "DELETE", ...options }
|
|
5537
|
+
);
|
|
5538
|
+
log27("Deleted skill: %s", identifier);
|
|
5539
|
+
return result;
|
|
5540
|
+
}
|
|
5541
|
+
/**
|
|
5542
|
+
* Updates the publish status of an owned skill (上架/下架)
|
|
5543
|
+
*
|
|
5544
|
+
* @param identifier - The skill identifier
|
|
5545
|
+
* @param status - 'published' to list (上架) or 'unpublished' to delist (下架)
|
|
5546
|
+
* @param options - Optional request options (must include authentication)
|
|
5547
|
+
* @returns Promise resolving to the updated status
|
|
5548
|
+
*/
|
|
5549
|
+
async updateSkillStatus(identifier, status, options) {
|
|
5550
|
+
log27("Updating skill status: %s \u2192 %s", identifier, status);
|
|
5551
|
+
const result = await this.request(
|
|
5552
|
+
`/v1/user/skills/${encodeURIComponent(identifier)}/status`,
|
|
5553
|
+
{
|
|
5554
|
+
body: JSON.stringify({ status }),
|
|
5555
|
+
headers: { "Content-Type": "application/json" },
|
|
5556
|
+
method: "PATCH",
|
|
5557
|
+
...options
|
|
5558
|
+
}
|
|
5559
|
+
);
|
|
5560
|
+
log27("Updated skill status: %s \u2192 %s", identifier, result.status);
|
|
5561
|
+
return result;
|
|
5562
|
+
}
|
|
5563
|
+
/**
|
|
5564
|
+
* Deletes an owned plugin permanently
|
|
5565
|
+
*
|
|
5566
|
+
* @param identifier - The plugin identifier
|
|
5567
|
+
* @param options - Optional request options (must include authentication)
|
|
5568
|
+
* @returns Promise resolving to the delete result
|
|
5569
|
+
*/
|
|
5570
|
+
async deletePlugin(identifier, options) {
|
|
5571
|
+
log27("Deleting plugin: %s", identifier);
|
|
5572
|
+
const result = await this.request(
|
|
5573
|
+
`/v1/user/plugins/${encodeURIComponent(identifier)}`,
|
|
5574
|
+
{ method: "DELETE", ...options }
|
|
5575
|
+
);
|
|
5576
|
+
log27("Deleted plugin: %s", identifier);
|
|
5577
|
+
return result;
|
|
5578
|
+
}
|
|
5579
|
+
/**
|
|
5580
|
+
* Updates the publish status of an owned plugin (上架/下架)
|
|
5581
|
+
*
|
|
5582
|
+
* @param identifier - The plugin identifier
|
|
5583
|
+
* @param status - 'published' to list (上架) or 'unpublished' to delist (下架)
|
|
5584
|
+
* @param options - Optional request options (must include authentication)
|
|
5585
|
+
* @returns Promise resolving to the updated status
|
|
5586
|
+
*/
|
|
5587
|
+
async updatePluginStatus(identifier, status, options) {
|
|
5588
|
+
log27("Updating plugin status: %s \u2192 %s", identifier, status);
|
|
5589
|
+
const result = await this.request(
|
|
5590
|
+
`/v1/user/plugins/${encodeURIComponent(identifier)}/status`,
|
|
5591
|
+
{
|
|
5592
|
+
body: JSON.stringify({ status }),
|
|
5593
|
+
headers: { "Content-Type": "application/json" },
|
|
5594
|
+
method: "PATCH",
|
|
5595
|
+
...options
|
|
5596
|
+
}
|
|
5597
|
+
);
|
|
5598
|
+
log27("Updated plugin status: %s \u2192 %s", identifier, result.status);
|
|
5599
|
+
return result;
|
|
5600
|
+
}
|
|
5525
5601
|
/**
|
|
5526
5602
|
* Publishes a new version of a plugin by submitting JSON data
|
|
5527
5603
|
*
|