@kevisual/cnb 0.0.56 → 0.0.58

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/routes.d.ts CHANGED
@@ -247,6 +247,76 @@ declare class KnowledgeBase extends CNBCore {
247
247
  }>>>;
248
248
  getBase(repo: string): Promise<Result<any>>;
249
249
  deleteBase(repo: string): Promise<Result<any>>;
250
+ /**
251
+ * 未暴露
252
+ * @param repo
253
+ * @param data
254
+ * @returns
255
+ */
256
+ createKnowledgeBase(repo: string, data: {
257
+ embedding_model_name: string;
258
+ include: string;
259
+ exclude: string;
260
+ issue_sync_enabled?: boolean;
261
+ processing?: {
262
+ chunk_size: number;
263
+ chunk_overlap: number;
264
+ text_separator: string;
265
+ };
266
+ issue?: {
267
+ labels: string;
268
+ state: string;
269
+ };
270
+ }): Promise<Result<any>>;
271
+ /**
272
+ * 未暴露
273
+ * @param repo
274
+ * @param data
275
+ * @returns
276
+ */
277
+ updateKnowledgeBase(repo: string, data: {
278
+ last_commit_sha?: string;
279
+ issue_last_sync_time?: string;
280
+ }): Promise<Result<any>>;
281
+ /**
282
+ * 未暴露
283
+ * @param repo
284
+ * @param text
285
+ * @returns
286
+ */
287
+ getEmbedding(repo: string, text: string): Promise<Result<{
288
+ embedding: number[];
289
+ }>>;
290
+ /**
291
+ * 未暴露
292
+ * @param repo
293
+ * @param chunksData
294
+ * @returns
295
+ */
296
+ addDocument(repo: string, chunksData: {
297
+ path: string;
298
+ chunks: Array<{
299
+ content: string;
300
+ hash: string;
301
+ offset: number;
302
+ size: number;
303
+ }>;
304
+ }): Promise<Result<any>>;
305
+ /**
306
+ * 未暴露
307
+ * @param repo
308
+ * @param paths
309
+ * @returns
310
+ */
311
+ deleteDocument(repo: string, paths: string[]): Promise<Result<any>>;
312
+ /**
313
+ * 未暴露
314
+ * @param repo
315
+ * @param page
316
+ * @param page_size
317
+ * @returns
318
+ */
319
+ listDocument(repo: string, page?: number, page_size?: number): Promise<Result<any[]>>;
250
320
  }
251
321
  type MetadataFilteringConditions = {
252
322
  conditions: Array<{
@@ -257,7 +327,7 @@ type MetadataFilteringConditions = {
257
327
  */
258
328
  value?: string;
259
329
  }>;
260
- logical_operator?: 'adn' | 'or';
330
+ logical_operator?: 'and' | 'or';
261
331
  };
262
332
  type QueryRag = {
263
333
  chunk: string;
@@ -563,8 +633,11 @@ type IssueItem = {
563
633
  number: string;
564
634
  priority: string;
565
635
  started_at: string;
566
- state: string;
567
- state_reason: string;
636
+ state: 'open' | 'closed';
637
+ /**
638
+ * state_reason must be one of completed, not_planned, reopened
639
+ */
640
+ state_reason: 'completed' | 'not_planned' | 'reopened';
568
641
  title: string;
569
642
  updated_at: string;
570
643
  };
@@ -1060,6 +1133,568 @@ type ListIssueLabelsParams = {
1060
1133
  page_size?: number;
1061
1134
  };
1062
1135
 
1136
+ /**
1137
+ * 制品类型
1138
+ */
1139
+ type PackageType = "all" | "docker" | "helm" | "docker-model" | "maven" | "npm" | "ohpm" | "pypi" | "nuget" | "composer" | "conan" | "cargo";
1140
+ /**
1141
+ * 制品库可见性类型
1142
+ */
1143
+ type VisibilityType = "private" | "public";
1144
+ /**
1145
+ * 制品库排序类型
1146
+ */
1147
+ type PackageOrderingType = "pull_count" | "last_push_at" | "name_ascend" | "name_descend";
1148
+ /**
1149
+ * 最后推送者信息
1150
+ */
1151
+ type LastPusher = {
1152
+ is_frozen: boolean;
1153
+ is_lock: boolean;
1154
+ name: string;
1155
+ username: string;
1156
+ };
1157
+ /**
1158
+ * 制品基本信息
1159
+ */
1160
+ type Package = {
1161
+ count: number;
1162
+ description: string;
1163
+ labels: string[];
1164
+ last_artifact_name: string;
1165
+ last_pusher: LastPusher;
1166
+ name: string;
1167
+ package: string;
1168
+ package_type: PackageType;
1169
+ pull_count: number;
1170
+ recent_pull_count: number;
1171
+ };
1172
+ /**
1173
+ * 制品库信息
1174
+ */
1175
+ type Registry = {
1176
+ created_at: string;
1177
+ description: string;
1178
+ name: string;
1179
+ owner: string;
1180
+ type: PackageType;
1181
+ visibility: VisibilityType;
1182
+ };
1183
+ /**
1184
+ * 制品库列表查询参数
1185
+ */
1186
+ type ListGroupRegistriesParams = {
1187
+ /** 页码 */
1188
+ page?: number;
1189
+ /** 每页数量 */
1190
+ page_size?: number;
1191
+ /** 制品仓库类型 */
1192
+ registry_type?: "npm" | "maven" | "ohpm";
1193
+ /** 制品仓库可见性类型 */
1194
+ filter_type?: VisibilityType;
1195
+ /** 排序字段 */
1196
+ order_by?: "created_at" | "name";
1197
+ };
1198
+ /**
1199
+ * 制品列表查询参数
1200
+ */
1201
+ type ListPackagesParams = {
1202
+ /** 顺序类型 */
1203
+ ordering?: PackageOrderingType;
1204
+ /** 关键字,搜索制品名称 */
1205
+ name?: string;
1206
+ };
1207
+ /**
1208
+ * 制品库管理
1209
+ */
1210
+ declare class RegistryPackage extends CNBCore {
1211
+ constructor(options: CNBCoreOptions);
1212
+ /**
1213
+ * 查询组织下面用户有权限查看到的制品仓库
1214
+ * @param slug 组织 slug
1215
+ * @param params 查询参数
1216
+ */
1217
+ listGroupRegistries(slug: string, params?: ListGroupRegistriesParams): Promise<Result<Registry[]>>;
1218
+ /**
1219
+ * 设置制品库可见性
1220
+ * @param registry 制品库路径
1221
+ * @param data 可见性设置
1222
+ */
1223
+ setVisibility(registry: string, data: {
1224
+ visibility: VisibilityType;
1225
+ }): Promise<Result<void>>;
1226
+ /**
1227
+ * 删除制品库
1228
+ * @param registry 制品库路径
1229
+ */
1230
+ remove(registry: string): Promise<Result<void>>;
1231
+ }
1232
+
1233
+ /**
1234
+ * 制品管理
1235
+ */
1236
+ declare class PackageManagement extends CNBCore {
1237
+ constructor(options: CNBCoreOptions);
1238
+ /**
1239
+ * 查询制品列表
1240
+ * @param slug 资源路径
1241
+ * @param type 制品类型
1242
+ * @param params 查询参数
1243
+ */
1244
+ list(slug: string, type: PackageType, params?: ListPackagesParams & {
1245
+ page?: number;
1246
+ page_size?: number;
1247
+ }): Promise<Result<Package[]>>;
1248
+ /**
1249
+ * 获取制品详情
1250
+ * @param slug 资源路径
1251
+ * @param type 制品类型
1252
+ * @param name 制品名称
1253
+ */
1254
+ getOne(slug: string, type: PackageType, name: string): Promise<Result<any>>;
1255
+ /**
1256
+ * 删除制品
1257
+ * @param slug 资源路径
1258
+ * @param type 制品类型
1259
+ * @param name 制品名称
1260
+ */
1261
+ remove(slug: string, type: PackageType, name: string): Promise<Result<void>>;
1262
+ /**
1263
+ * 获取制品标签详情
1264
+ * @param slug 资源路径
1265
+ * @param type 制品类型
1266
+ * @param name 制品名称
1267
+ * @param tag 标签名称
1268
+ */
1269
+ getTag(slug: string, type: PackageType, name: string, tag: string): Promise<Result<any>>;
1270
+ /**
1271
+ * 删除制品标签
1272
+ * @param slug 资源路径
1273
+ * @param type 制品类型
1274
+ * @param name 制品名称
1275
+ * @param tag 标签名称
1276
+ */
1277
+ removeTag(slug: string, type: PackageType, name: string, tag: string): Promise<Result<void>>;
1278
+ /**
1279
+ * 获取制品标签列表
1280
+ * @param slug 资源路径
1281
+ * @param type 制品类型
1282
+ * @param name 制品名称
1283
+ * @param params 查询参数
1284
+ */
1285
+ listTags(slug: string, type: PackageType, name: string, params?: {
1286
+ page?: number;
1287
+ page_size?: number;
1288
+ }): Promise<Result<any>>;
1289
+ }
1290
+
1291
+ /**
1292
+ * @title 组织管理模块
1293
+ * @description 提供组织(Organizations)的管理功能,包括创建、更新、删除组织,获取组织列表、子组织、组织设置等
1294
+ * @tags organization, group, team, cnb, api
1295
+ * @createdAt 2025-12-04
1296
+ */
1297
+
1298
+ /**
1299
+ * 组织角色枚举
1300
+ */
1301
+ declare enum AccessRole {
1302
+ Guest = "Guest",
1303
+ Reporter = "Reporter",
1304
+ Developer = "Developer",
1305
+ Master = "Master",
1306
+ Owner = "Owner"
1307
+ }
1308
+ /**
1309
+ * 创建组织请求参数
1310
+ */
1311
+ interface CreateGroupParams {
1312
+ /** 组织路径 */
1313
+ path: string;
1314
+ /** 组织描述 */
1315
+ description?: string;
1316
+ /** 根组织绑定的域名 */
1317
+ bind_domain?: string;
1318
+ /** 备注 */
1319
+ remark?: string;
1320
+ }
1321
+ /**
1322
+ * 更新组织信息请求参数
1323
+ */
1324
+ interface UpdateGroupParams {
1325
+ /** 组织描述 */
1326
+ description?: string;
1327
+ /** 组织展示名称 */
1328
+ remark?: string;
1329
+ /** 组织网站 */
1330
+ site?: string;
1331
+ /** 组织联系邮箱 */
1332
+ email?: string;
1333
+ /** 绑定的域名 */
1334
+ domain?: string;
1335
+ /** 微信公众号 */
1336
+ wechat_mp?: string;
1337
+ /** README 仓库 ID */
1338
+ readme_repo_id?: number;
1339
+ /** README 仓库路径 */
1340
+ readme_repo_path?: string;
1341
+ }
1342
+ /**
1343
+ * 转移组织请求参数
1344
+ */
1345
+ interface TransferGroupParams {
1346
+ /** 源组织路径 */
1347
+ source: string;
1348
+ /** 目标组织路径 */
1349
+ target: string;
1350
+ }
1351
+ /**
1352
+ * 上传 Logo 请求参数
1353
+ */
1354
+ interface UploadLogoParams {
1355
+ /** 文件名 */
1356
+ name: string;
1357
+ /** 文件大小(字节) */
1358
+ size: number;
1359
+ /** 额外参数 */
1360
+ ext?: Record<string, string>;
1361
+ }
1362
+ /**
1363
+ * 更新组织设置请求参数
1364
+ */
1365
+ interface UpdateGroupSettingParams {
1366
+ /** 是否对外隐藏组织成员,0 - 否, 1 - 是 */
1367
+ hide_members?: number;
1368
+ /** 是否对外隐藏子组织,0 - 否, 1 - 是 */
1369
+ hide_sub_groups?: number;
1370
+ /** 是否对外显示私有仓库水印,0 - 否, 1 - 是 */
1371
+ show_private_repo_watermark?: number;
1372
+ /** 组织保护开关,0 - 关闭,1 - 打开 */
1373
+ group_protection?: number;
1374
+ /** 组织限制指定邮箱认证才能加入 */
1375
+ email_verification?: string[];
1376
+ /** 组织设置值,多个选项用逗号拼接 */
1377
+ values?: string;
1378
+ }
1379
+ /**
1380
+ * 组织信息(包含访问权限)
1381
+ */
1382
+ interface OrganizationAccess {
1383
+ /** 用户在当前资源的最大权限 */
1384
+ access_role?: AccessRole;
1385
+ /** 所有层级成员总数 */
1386
+ all_member_count?: number;
1387
+ /** 所有层级子组织数量 */
1388
+ all_sub_group_count?: number;
1389
+ /** 所有层级子任务数量 */
1390
+ all_sub_mission_count?: number;
1391
+ /** 所有层级制品库数量 */
1392
+ all_sub_registry_count?: number;
1393
+ /** 所有层级仓库数量 */
1394
+ all_sub_repo_count?: number;
1395
+ /** 创建时间 */
1396
+ created_at?: string;
1397
+ /** 组织描述 */
1398
+ description?: string;
1399
+ /** 绑定的域名 */
1400
+ domain?: string;
1401
+ /** 组织邮箱 */
1402
+ email?: string;
1403
+ /** 关注数量 */
1404
+ follow_count?: number;
1405
+ /** 是否冻结 */
1406
+ freeze?: boolean;
1407
+ /** 是否有子组织 */
1408
+ has_sub_group?: boolean;
1409
+ /** 组织 ID */
1410
+ id?: string;
1411
+ /** 直接成员数量 */
1412
+ member_count?: number;
1413
+ /** 组织展示名称 */
1414
+ name?: string;
1415
+ /** 组织路径 */
1416
+ path?: string;
1417
+ /** 是否置顶 */
1418
+ pinned?: boolean;
1419
+ /** 置顶时间 */
1420
+ pinned_time?: string;
1421
+ /** README 仓库路径 */
1422
+ readme_repo_path?: string;
1423
+ /** 备注 */
1424
+ remark?: string;
1425
+ /** 组织网站 */
1426
+ site?: string;
1427
+ /** 下一级子组织数量 */
1428
+ sub_group_count?: number;
1429
+ /** 下一级子任务数量 */
1430
+ sub_mission_count?: number;
1431
+ /** 下一级制品库数量 */
1432
+ sub_registry_count?: number;
1433
+ /** 下一级仓库数量 */
1434
+ sub_repo_count?: number;
1435
+ /** 更新时间 */
1436
+ updated_at?: string;
1437
+ /** 微信公众号 */
1438
+ wechat_mp?: string;
1439
+ }
1440
+ /**
1441
+ * 组织信息(联合类型)
1442
+ */
1443
+ interface OrganizationUnion {
1444
+ /** 所有层级成员总数 */
1445
+ all_member_count?: number;
1446
+ /** 所有层级子组织数量 */
1447
+ all_sub_group_count?: number;
1448
+ /** 所有层级子任务数量 */
1449
+ all_sub_mission_count?: number;
1450
+ /** 所有层级制品库数量 */
1451
+ all_sub_registry_count?: number;
1452
+ /** 所有层级仓库数量 */
1453
+ all_sub_repo_count?: number;
1454
+ /** 创建时间 */
1455
+ created_at?: string;
1456
+ /** 组织描述 */
1457
+ description?: string;
1458
+ /** 绑定的域名 */
1459
+ domain?: string;
1460
+ /** 组织邮箱 */
1461
+ email?: string;
1462
+ /** 关注数量 */
1463
+ follow_count?: number;
1464
+ /** 是否冻结 */
1465
+ freeze?: boolean;
1466
+ /** 是否有子组织 */
1467
+ has_sub_group?: boolean;
1468
+ /** 组织 ID */
1469
+ id?: string;
1470
+ /** 直接成员数量 */
1471
+ member_count?: number;
1472
+ /** 组织展示名称 */
1473
+ name?: string;
1474
+ /** 组织路径 */
1475
+ path?: string;
1476
+ /** 是否置顶 */
1477
+ pinned?: boolean;
1478
+ /** 置顶时间 */
1479
+ pinned_time?: string;
1480
+ /** README 仓库路径 */
1481
+ readme_repo_path?: string;
1482
+ /** 备注 */
1483
+ remark?: string;
1484
+ /** 组织网站 */
1485
+ site?: string;
1486
+ /** 下一级子组织数量 */
1487
+ sub_group_count?: number;
1488
+ /** 下一级子任务数量 */
1489
+ sub_mission_count?: number;
1490
+ /** 下一级制品库数量 */
1491
+ sub_registry_count?: number;
1492
+ /** 下一级仓库数量 */
1493
+ sub_repo_count?: number;
1494
+ /** 更新时间 */
1495
+ updated_at?: string;
1496
+ /** 微信公众号 */
1497
+ wechat_mp?: string;
1498
+ }
1499
+ /**
1500
+ * 上传 Logo 响应
1501
+ */
1502
+ interface UploadLogoResponse {
1503
+ /** 上传后的文件信息 */
1504
+ assets?: {
1505
+ /** 文件大小 */
1506
+ size?: number;
1507
+ /** 文件名 */
1508
+ name?: string;
1509
+ /** 文件路径 */
1510
+ path?: string;
1511
+ /** 内容类型 */
1512
+ content_type?: string;
1513
+ /** 额外信息 */
1514
+ ext?: Record<string, string>;
1515
+ };
1516
+ /** 上传表单字段 */
1517
+ form?: Record<string, string>;
1518
+ /** 上传 URL */
1519
+ upload_url?: string;
1520
+ /** 后续确认接口使用的 token */
1521
+ token?: string;
1522
+ }
1523
+ /**
1524
+ * 组织设置值
1525
+ */
1526
+ interface SettingValues {
1527
+ /** 禁用组织 README */
1528
+ disable_organization_readme?: boolean;
1529
+ /** 云原生开发限制 */
1530
+ cloud_native_dev_only?: boolean;
1531
+ /** 根组织分支保护规则限制 */
1532
+ user_root_group_branch_protection_only?: boolean;
1533
+ /** 禁止重定义分支保护 */
1534
+ forbid_redefine_branch_protection?: boolean;
1535
+ /** TAPD 访问 */
1536
+ enable_tapd_access?: boolean;
1537
+ /** 私有任务水印 */
1538
+ enable_show_private_mission_water_mark?: boolean;
1539
+ /** 禁止组织创建 */
1540
+ prevent_organization_creation?: boolean;
1541
+ /** 禁止仓库创建 */
1542
+ prevent_repository_creation?: boolean;
1543
+ /** 禁止任务集创建 */
1544
+ prevent_mission_creation?: boolean;
1545
+ /** 禁止制品库创建 */
1546
+ prevent_registry_creation?: boolean;
1547
+ /** 禁止邀请 */
1548
+ disable_invitation?: boolean;
1549
+ /** 禁止可见性修改 */
1550
+ prevent_visibility_modification?: boolean;
1551
+ /** 禁止资源删除 */
1552
+ prevent_resource_deletion?: boolean;
1553
+ /** 禁止仓库归档 */
1554
+ prevent_repository_archival?: boolean;
1555
+ /** 禁止组织转移 */
1556
+ prevent_organization_transfer?: boolean;
1557
+ /** 禁止仓库转移 */
1558
+ prevent_repository_transfer?: boolean;
1559
+ /** 禁止任务集转移 */
1560
+ prevent_mission_transfer?: boolean;
1561
+ /** 禁止制品库转移 */
1562
+ prevent_registry_transfer?: boolean;
1563
+ /** 使用组织 Git 配额 */
1564
+ use_group_git_quota?: boolean;
1565
+ /** 使用组织 Git 对象限制 */
1566
+ use_group_git_object_limit?: boolean;
1567
+ /** 仅根组织可添加成员 */
1568
+ enable_add_member_only_root?: boolean;
1569
+ /** 使用根组织 Git 推送限制 */
1570
+ use_root_group_git_push_limit?: boolean;
1571
+ /** 允许添加成员 */
1572
+ enable_add_member?: boolean;
1573
+ /** 仅根组织可修改成员角色 */
1574
+ enable_change_member_role_only_root?: boolean;
1575
+ }
1576
+ /**
1577
+ * 组织设置信息(包含父级继承)
1578
+ */
1579
+ interface OrganizationSettingWithParent {
1580
+ /** 上级是否隐藏成员,true - 上级禁止显示 */
1581
+ can_show_members?: boolean;
1582
+ /** 上级是否隐藏子组织,true - 上级禁止显示 */
1583
+ can_show_sub_groups?: boolean;
1584
+ /** 是否可以显示水印 */
1585
+ can_show_watermark?: boolean;
1586
+ /** 邮箱验证配置 */
1587
+ email_verification?: string[];
1588
+ /** 组织保护开关 */
1589
+ group_protection?: number;
1590
+ /** 是否对外隐藏组织成员,0 - 否, 1 - 是 */
1591
+ hide_members?: number;
1592
+ /** 是否对外隐藏子组织,0 - 否, 1 - 是 */
1593
+ hide_sub_groups?: number;
1594
+ /** 根组织邮箱验证配置 */
1595
+ root_email_verification?: string[];
1596
+ /** 根组织保护开关 */
1597
+ root_group_protection?: boolean;
1598
+ /** 根组织设置值 */
1599
+ root_values?: SettingValues;
1600
+ /** 是否对外显示私有仓库水印 */
1601
+ show_private_repo_watermark?: number;
1602
+ /** 当前组织设置值 */
1603
+ values?: SettingValues;
1604
+ }
1605
+ /**
1606
+ * 组织管理模块
1607
+ * https://api.cnb.cool/#/operations/GetGroup
1608
+ */
1609
+ declare class Organization extends CNBCore {
1610
+ constructor(options: CNBCoreOptions);
1611
+ /**
1612
+ * 创建新组织
1613
+ * @param params 组织信息
1614
+ */
1615
+ create(params: CreateGroupParams): Promise<Result$2<OrganizationAccess>>;
1616
+ /**
1617
+ * 获取当前用户拥有权限的顶层组织列表
1618
+ * @param params 查询参数
1619
+ */
1620
+ listTopGroups(params?: {
1621
+ page?: number;
1622
+ page_size?: number;
1623
+ search?: string;
1624
+ role?: AccessRole;
1625
+ }): Promise<Result$2<OrganizationAccess[]>>;
1626
+ /**
1627
+ * 查询当前用户在指定组织下拥有指定权限的子组织列表
1628
+ * @param slug 组织路径
1629
+ * @param params 查询参数
1630
+ */
1631
+ listGroups(slug: string, params?: {
1632
+ page?: number;
1633
+ page_size?: number;
1634
+ access?: number;
1635
+ }): Promise<Result$2<OrganizationAccess[]>>;
1636
+ /**
1637
+ * 获取指定用户拥有权限的顶层组织列表
1638
+ * @param username 用户名
1639
+ * @param params 查询参数
1640
+ */
1641
+ getGroupsByUsername(username: string, params?: {
1642
+ search?: string;
1643
+ page?: number;
1644
+ page_size?: number;
1645
+ }): Promise<Result$2<OrganizationUnion>>;
1646
+ /**
1647
+ * 获取指定组织信息
1648
+ * @param group 组织路径
1649
+ */
1650
+ getGroup(group: string): Promise<Result$2<OrganizationAccess>>;
1651
+ /**
1652
+ * 更新组织信息,可更新的内容为:组织描述、组织展示名称、组织网站、组织联系邮箱
1653
+ * @param group 组织路径
1654
+ * @param params 更新内容
1655
+ */
1656
+ updateGroup(group: string, params: UpdateGroupParams): Promise<Result$2<OrganizationAccess>>;
1657
+ /**
1658
+ * 删除指定组织
1659
+ * @param group 组织路径
1660
+ * @param identityTicket 微信身份验证票据
1661
+ */
1662
+ deleteGroup(group: string, identityTicket?: string): Promise<Result$2<void>>;
1663
+ /**
1664
+ * 转移组织
1665
+ * @param group 组织路径
1666
+ * @param params 转移参数
1667
+ */
1668
+ transfer(group: string, params: TransferGroupParams): Promise<Result$2<void>>;
1669
+ /**
1670
+ * 上传 Logo,发起上传请求,返回上传文件的 URL,请使用 PUT 发起流式上传
1671
+ * @param group 组织路径
1672
+ * @param params 上传参数
1673
+ */
1674
+ uploadLogo(group: string, params: UploadLogoParams): Promise<Result$2<UploadLogoResponse>>;
1675
+ /**
1676
+ * 获取指定组织的配置详情
1677
+ * @param slug 组织路径
1678
+ */
1679
+ getSetting(slug: string): Promise<Result$2<OrganizationSettingWithParent>>;
1680
+ /**
1681
+ * 更新指定组织的配置
1682
+ * @param slug 组织路径
1683
+ * @param params 设置参数
1684
+ */
1685
+ updateSetting(slug: string, params: UpdateGroupSettingParams): Promise<Result$2<void>>;
1686
+ /**
1687
+ * 获取指定组织下的子组织列表
1688
+ * @param slug 组织路径
1689
+ * @param params 查询参数
1690
+ */
1691
+ listSubgroups(slug: string, params?: {
1692
+ search?: string;
1693
+ page?: number;
1694
+ page_size?: number;
1695
+ }): Promise<Result$2<OrganizationUnion[]>>;
1696
+ }
1697
+
1063
1698
  type CNBOptions = CNBCoreOptions<{}>;
1064
1699
  declare class CNB extends CNBCore {
1065
1700
  workspace: Workspace;
@@ -1074,6 +1709,11 @@ declare class CNB extends CNBCore {
1074
1709
  repoLabel: RepoLabel;
1075
1710
  issueLabel: IssueLabel;
1076
1711
  };
1712
+ packages: {
1713
+ registry: RegistryPackage;
1714
+ package: PackageManagement;
1715
+ };
1716
+ org: Organization;
1077
1717
  constructor(options: CNBOptions);
1078
1718
  init(cnbOptions?: CNBOptions): void;
1079
1719
  setToken(token: string): void;