@lobehub/market-sdk 0.0.1 → 0.0.2
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/README.md +7 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ const result = await market.importManifests([
|
|
|
69
69
|
version: '1.0.0',
|
|
70
70
|
description: '一个示例插件',
|
|
71
71
|
// 其他清单字段...
|
|
72
|
-
}
|
|
72
|
+
},
|
|
73
73
|
]);
|
|
74
74
|
console.log(result);
|
|
75
75
|
```
|
|
@@ -87,6 +87,7 @@ constructor(options?: MarketSDKOptions)
|
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
参数:
|
|
90
|
+
|
|
90
91
|
- `options.baseUrl`: API 基础 URL,默认为 'https://market.lobehub.com/api'
|
|
91
92
|
- `options.defaultLocale`: 默认语言,默认为 'zh-CN'
|
|
92
93
|
- `options.apiKey`: 可选的 API 认证密钥
|
|
@@ -102,6 +103,7 @@ constructor(options?: MarketSDKOptions)
|
|
|
102
103
|
获取插件列表。
|
|
103
104
|
|
|
104
105
|
参数:
|
|
106
|
+
|
|
105
107
|
- `params.page`: 页码,默认为 1
|
|
106
108
|
- `params.pageSize`: 每页数量,默认为 20
|
|
107
109
|
- `params.category`: 按分类筛选
|
|
@@ -116,6 +118,7 @@ constructor(options?: MarketSDKOptions)
|
|
|
116
118
|
获取插件清单。
|
|
117
119
|
|
|
118
120
|
参数:
|
|
121
|
+
|
|
119
122
|
- `identifier`: 插件标识符 (必填)
|
|
120
123
|
- `locale`: 语言,可选,默认为构造函数中设置的值
|
|
121
124
|
- `version`: 版本号,可选,默认获取最新版本
|
|
@@ -125,6 +128,7 @@ constructor(options?: MarketSDKOptions)
|
|
|
125
128
|
导入插件清单 (需要管理员权限)。
|
|
126
129
|
|
|
127
130
|
参数:
|
|
131
|
+
|
|
128
132
|
- `manifests`: 插件清单数组
|
|
129
133
|
- `ownerId`: 所有者 ID (可选)
|
|
130
134
|
|
|
@@ -156,6 +160,7 @@ SDK 导出以下类型:
|
|
|
156
160
|
## 兼容性
|
|
157
161
|
|
|
158
162
|
此SDK使用了原生fetch API,适用于:
|
|
163
|
+
|
|
159
164
|
- 现代浏览器
|
|
160
165
|
- Node.js 18+
|
|
161
166
|
- Deno
|
|
@@ -164,4 +169,4 @@ SDK 导出以下类型:
|
|
|
164
169
|
|
|
165
170
|
## 许可证
|
|
166
171
|
|
|
167
|
-
MIT
|
|
172
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/market-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "LobeHub Market JavaScript SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"author": "LobeHub",
|
|
21
21
|
"main": "dist/index.mjs",
|
|
22
22
|
"module": "dist/index.mjs",
|
|
23
|
-
"types": "dist/index.d.
|
|
23
|
+
"types": "dist/index.d.mts",
|
|
24
24
|
"files": [
|
|
25
25
|
"dist"
|
|
26
26
|
],
|