@lobehub/market-sdk 0.40.0 → 0.40.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
@@ -8256,6 +8256,17 @@ declare class UserPublishService extends BaseSDK {
8256
8256
  * @returns Promise resolving to the claim result
8257
8257
  */
8258
8258
  claimAsset(assetId: number, assetType: 'plugin' | 'skill'): Promise<ClaimAssetResponse>;
8259
+ /**
8260
+ * Claims ownership of an asset by its public identifier
8261
+ *
8262
+ * Prefer this over {@link claimAsset}: it does not require the caller to
8263
+ * resolve a numeric asset ID through a scan first.
8264
+ *
8265
+ * @param identifier - The public asset identifier
8266
+ * @param assetType - 'plugin' or 'skill'
8267
+ * @returns Promise resolving to the claim result
8268
+ */
8269
+ claimAssetByIdentifier(identifier: string, assetType: 'plugin' | 'skill'): Promise<ClaimAssetResponse>;
8259
8270
  /**
8260
8271
  * Submits a GitHub repository the authenticated user owns or can push to for
8261
8272
  * import as a new skill listing
package/dist/index.mjs CHANGED
@@ -6208,6 +6208,26 @@ var UserPublishService = class extends BaseSDK {
6208
6208
  log32("Claim result for %s %d: %s", assetType, assetId, result.success);
6209
6209
  return result;
6210
6210
  }
6211
+ /**
6212
+ * Claims ownership of an asset by its public identifier
6213
+ *
6214
+ * Prefer this over {@link claimAsset}: it does not require the caller to
6215
+ * resolve a numeric asset ID through a scan first.
6216
+ *
6217
+ * @param identifier - The public asset identifier
6218
+ * @param assetType - 'plugin' or 'skill'
6219
+ * @returns Promise resolving to the claim result
6220
+ */
6221
+ async claimAssetByIdentifier(identifier, assetType) {
6222
+ log32("Claiming %s with identifier: %s", assetType, identifier);
6223
+ const result = await this.request("/v1/user/claims", {
6224
+ body: JSON.stringify({ assetType, identifier }),
6225
+ headers: { "Content-Type": "application/json" },
6226
+ method: "POST"
6227
+ });
6228
+ log32("Claim result for %s %s: %s", assetType, identifier, result.success);
6229
+ return result;
6230
+ }
6211
6231
  /**
6212
6232
  * Submits a GitHub repository the authenticated user owns or can push to for
6213
6233
  * import as a new skill listing