@huyooo/ui 0.13.8 → 0.14.0

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.
Files changed (41) hide show
  1. package/dist/{AuthkitAppSetting-u2kUUH6q.js → AuthkitAppSetting-Xe-QQSQ4.js} +403 -406
  2. package/dist/{AuthkitGithubBinding-B-YSWc50.js → AuthkitGithubBinding-CK6ijijV.js} +329 -330
  3. package/dist/{Contact-CIMfdt_b.js → Contact-mb7deQOs.js} +1 -1
  4. package/dist/CustomTable-BT-cnhLR.js +280 -0
  5. package/dist/{FeedbackItem-C9FQThXG.js → FeedbackItem-Cfb06ngC.js} +1 -1
  6. package/dist/{FeedbackModal-R3NKRxr7.js → FeedbackModal-DCxum_Iv.js} +1 -1
  7. package/dist/{MessageHandle-D2dcvWVr.js → MessageHandle-DUazbY5b.js} +2 -2
  8. package/dist/{MessageList-Bo6YCfRO.js → MessageList-BGJrcB3d.js} +63 -63
  9. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-CSAIRPOj.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DIJC6K6l.js} +1 -1
  10. package/dist/{PaySubscriptions-BaUlQE-p.js → PaySubscriptions-DN4g7JyM.js} +3 -5
  11. package/dist/{PricingPlans-B0nt843Q.js → PricingPlans-Dw86gjrR.js} +1 -1
  12. package/dist/{ReferrerReferees-B50_V69q.js → ReferrerReferees-DFCwvXJ6.js} +2 -2
  13. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BHXLN2Tu.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DPQZCllL.js} +6 -6
  14. package/dist/WidthContainer-qy7o4c1F.js +691 -0
  15. package/dist/authkit.js +6 -6
  16. package/dist/common.js +2 -2
  17. package/dist/composables/Authkit/resolveRoutePermission.d.ts +4 -0
  18. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +1 -1
  19. package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +1 -1
  20. package/dist/composables.js +6 -6
  21. package/dist/feedback.js +2 -2
  22. package/dist/main.js +22 -22
  23. package/dist/message.js +3 -3
  24. package/dist/pay.js +2 -2
  25. package/dist/privateCom.js +1 -1
  26. package/dist/referrer.js +1 -1
  27. package/dist/style.css +1 -1
  28. package/dist/types/api/ai.generated.d.ts +378 -247
  29. package/dist/types/api/billing.generated.d.ts +1266 -396
  30. package/dist/{useAuthkitAppsAuthPageInfo-CjPdpZ64.js → useAuthkitAppsAuthPageInfo-nCjfAjiw.js} +17 -7
  31. package/dist/useAuthkitCreateAndUpdate-u-ceTc-m.js +25 -0
  32. package/dist/useAuthkitUsersProfile-BC5EsA2f.js +40 -0
  33. package/dist/{useDownloads-CxoyuqyY.js → useDownloads-BC0QyEFr.js} +9 -9
  34. package/dist/{useLegalLinks-DHqsVvIK.js → useLegalLinks-DeXLE-yv.js} +1 -1
  35. package/dist/{useSEO-DypqLVfr.js → useSEO-BWAREYk4.js} +238 -227
  36. package/dist/user.js +1 -1
  37. package/package.json +2 -1
  38. package/dist/CustomTable-BBcd4nNL.js +0 -278
  39. package/dist/WidthContainer-BQIboxrg.js +0 -695
  40. package/dist/useAuthkitCreateAndUpdate-CsYn-oYu.js +0 -25
  41. package/dist/useAuthkitUsersProfile-CIFqG3gd.js +0 -36
@@ -87,6 +87,15 @@ export type Api = {
87
87
  return: any;
88
88
  };
89
89
  };
90
+ manageOptions: {
91
+ /** 管理端表单与筛选用产品选项 */
92
+ post: {
93
+ body: {
94
+ status?: "" | "active" | "archived";
95
+ };
96
+ return: any;
97
+ };
98
+ };
90
99
  updateSort: {
91
100
  /** 批量更新产品排序 */
92
101
  post: {
@@ -99,7 +108,7 @@ export type Api = {
99
108
  return: any;
100
109
  };
101
110
  };
102
- listActive: {
111
+ options: {
103
112
  /** 获取定价页面可用产品列表(公开) */
104
113
  post: {
105
114
  return: any;
@@ -172,21 +181,16 @@ export type Api = {
172
181
  return: any;
173
182
  };
174
183
  };
175
- listByProduct: {
176
- /** 获取指定产品的所有可用价格方案 */
184
+ options: {
185
+ /** 按产品或免费体验筛选可用价格方案 */
177
186
  post: {
178
187
  body: {
179
- productId: string;
188
+ productId?: string;
189
+ freeOnly?: boolean;
180
190
  };
181
191
  return: any;
182
192
  };
183
193
  };
184
- listFreeActive: {
185
- /** 获取当前应用可领取的免费体验价格方案 */
186
- post: {
187
- return: any;
188
- };
189
- };
190
194
  };
191
195
  subscriptions: {
192
196
  create: {
@@ -278,6 +282,15 @@ export type Api = {
278
282
  return: any;
279
283
  };
280
284
  };
285
+ statistics: {
286
+ /** 获取订阅概览页统计数据(状态计数、MRR、产品分布、最近订阅) */
287
+ post: {
288
+ body: {
289
+ recentLimit?: number;
290
+ };
291
+ return: any;
292
+ };
293
+ };
281
294
  history: {
282
295
  /** 查询单个订阅的权益变化历史(管理端) */
283
296
  post: {
@@ -860,7 +873,7 @@ export type Api = {
860
873
  post: {
861
874
  body: {
862
875
  userId?: string;
863
- type?: "earn" | "spend" | "reversal" | "clawback" | "adjust";
876
+ type?: "earn" | "consume" | "reversal" | "clawback" | "adjust";
864
877
  subType?: string;
865
878
  page?: number;
866
879
  pageSize?: number;
@@ -885,11 +898,13 @@ export type Api = {
885
898
  body: {
886
899
  userId?: string;
887
900
  period?: "day" | "week" | "month" | "year";
901
+ startTime?: string;
902
+ endTime?: string;
888
903
  };
889
904
  return: any;
890
905
  };
891
906
  };
892
- getTrendChart: {
907
+ trendChart: {
893
908
  /** 获取积分变动趋势图表数据 */
894
909
  post: {
895
910
  body: {
@@ -901,7 +916,7 @@ export type Api = {
901
916
  return: any;
902
917
  };
903
918
  };
904
- getTypeDistributionChart: {
919
+ typeDistributionChart: {
905
920
  /** 获取积分类型分布图表数据 */
906
921
  post: {
907
922
  body: {
@@ -912,11 +927,22 @@ export type Api = {
912
927
  return: any;
913
928
  };
914
929
  };
915
- getRankingChart: {
930
+ businessLineConsumptionChart: {
931
+ /** 按服务计费引擎业务线聚合积分消费 */
932
+ post: {
933
+ body: {
934
+ userId?: string;
935
+ startTime?: string;
936
+ endTime?: string;
937
+ };
938
+ return: any;
939
+ };
940
+ };
941
+ rankingChart: {
916
942
  /** 获取用户积分排行榜 */
917
943
  post: {
918
944
  body: {
919
- type?: "earn" | "spend" | "reversal" | "clawback" | "adjust";
945
+ type?: "earn" | "consume" | "reversal" | "clawback" | "adjust";
920
946
  startTime?: string;
921
947
  endTime?: string;
922
948
  limit?: number;
@@ -1302,13 +1328,13 @@ export type Api = {
1302
1328
  return: any;
1303
1329
  };
1304
1330
  };
1305
- getConfig: {
1331
+ findOne: {
1306
1332
  /** 获取当前预警配置 */
1307
1333
  post: {
1308
1334
  return: any;
1309
1335
  };
1310
1336
  };
1311
- findAlerts: {
1337
+ find: {
1312
1338
  /** 分页查询预警记录 */
1313
1339
  post: {
1314
1340
  body: {
@@ -1359,27 +1385,36 @@ export type Api = {
1359
1385
  };
1360
1386
  billingUsage: {
1361
1387
  charges: {
1362
- list: {
1363
- /** 查询 billingUsageRecord 全站扣费流水 */
1388
+ find: {
1389
+ /** 查询 billingUsageRecord 全站扣费明细 */
1364
1390
  post: {
1365
1391
  body: {
1392
+ where?: {
1393
+ keyword?: string;
1394
+ userId?: string;
1395
+ serviceGroup?: "ai" | "platform" | "storage";
1396
+ businessLineKey?: string;
1397
+ billingProductLineKey?: string;
1398
+ serviceKey?: string;
1399
+ serviceKeys?: string[];
1400
+ meterKey?: string;
1401
+ priceListId?: string;
1402
+ pricingType?: "flat" | "tiered" | "meters";
1403
+ subjectKey?: string;
1404
+ id?: string;
1405
+ idempotencyKey?: string;
1406
+ resourceId?: string;
1407
+ status?: "pending" | "charged" | "failed" | "canceled";
1408
+ startDate?: string;
1409
+ endDate?: string;
1410
+ };
1366
1411
  page?: number;
1367
1412
  pageSize?: number;
1368
- userId?: string;
1369
- serviceGroup?: "ai" | "platform" | "storage";
1370
- serviceKey?: string;
1371
- chargeMethodKey?: string;
1372
- subjectKey?: string;
1373
- id?: string;
1374
- idempotencyKey?: string;
1375
- resourceId?: string;
1376
- startDate?: string;
1377
- endDate?: string;
1378
1413
  };
1379
1414
  return: any;
1380
1415
  };
1381
1416
  };
1382
- get: {
1417
+ findOne: {
1383
1418
  /** 按 ID 查询单条扣费记录(含 AI 扩展字段,供详情抽屉) */
1384
1419
  post: {
1385
1420
  body: {
@@ -1391,14 +1426,19 @@ export type Api = {
1391
1426
  };
1392
1427
  consumption: {
1393
1428
  overview: {
1394
- /** 聚合 AI / 平台 / 存储积分消耗 */
1429
+ /** 聚合已入账扣费结果 */
1395
1430
  post: {
1396
1431
  body: {
1397
- userId?: string;
1398
- serviceGroup?: "ai" | "platform" | "storage";
1399
- serviceKey?: string;
1400
- startDate?: string;
1401
- endDate?: string;
1432
+ where?: {
1433
+ userId?: string;
1434
+ serviceGroup?: "ai" | "platform" | "storage";
1435
+ businessLineKey?: string;
1436
+ billingProductLineKey?: string;
1437
+ serviceKey?: string;
1438
+ serviceKeys?: string[];
1439
+ startDate?: string;
1440
+ endDate?: string;
1441
+ };
1402
1442
  };
1403
1443
  return: any;
1404
1444
  };
@@ -1407,11 +1447,16 @@ export type Api = {
1407
1447
  /** 按日聚合积分消耗趋势 */
1408
1448
  post: {
1409
1449
  body: {
1410
- userId?: string;
1411
- serviceGroup?: "ai" | "platform" | "storage";
1412
- serviceKey?: string;
1413
- startDate?: string;
1414
- endDate?: string;
1450
+ where?: {
1451
+ userId?: string;
1452
+ serviceGroup?: "ai" | "platform" | "storage";
1453
+ businessLineKey?: string;
1454
+ billingProductLineKey?: string;
1455
+ serviceKey?: string;
1456
+ serviceKeys?: string[];
1457
+ startDate?: string;
1458
+ endDate?: string;
1459
+ };
1415
1460
  limit?: number;
1416
1461
  };
1417
1462
  return: any;
@@ -1484,7 +1529,7 @@ export type Api = {
1484
1529
  return: any;
1485
1530
  };
1486
1531
  };
1487
- detail: {
1532
+ findOne: {
1488
1533
  /** 管理端查询单个积分充值订单详情及操作时间线 */
1489
1534
  post: {
1490
1535
  body: {
@@ -1504,7 +1549,7 @@ export type Api = {
1504
1549
  };
1505
1550
  };
1506
1551
  statistics: {
1507
- /** 获取用户积分充值订单统计 */
1552
+ /** 获取当前 app 积分充值订单统计 */
1508
1553
  post: {
1509
1554
  body: {
1510
1555
  startTime?: string;
@@ -1513,6 +1558,24 @@ export type Api = {
1513
1558
  return: any;
1514
1559
  };
1515
1560
  };
1561
+ accountSummary: {
1562
+ /** 汇总当前 app 下所有用户积分账户余额 */
1563
+ post: {
1564
+ body: Record<string, unknown>;
1565
+ return: any;
1566
+ };
1567
+ };
1568
+ trend: {
1569
+ /** 按日聚合当前 app 已支付充值订单 */
1570
+ post: {
1571
+ body: {
1572
+ startTime: string;
1573
+ endTime: string;
1574
+ limit?: number;
1575
+ };
1576
+ return: any;
1577
+ };
1578
+ };
1516
1579
  statusOptions: {
1517
1580
  /** 获取积分充值订单状态下拉选项与展示文案 */
1518
1581
  post: {
@@ -1539,7 +1602,7 @@ export type Api = {
1539
1602
  };
1540
1603
  };
1541
1604
  rechargePackage: {
1542
- list: {
1605
+ find: {
1543
1606
  /** 获取充值套餐列表(管理端) */
1544
1607
  post: {
1545
1608
  body: {
@@ -1655,7 +1718,7 @@ export type Api = {
1655
1718
  return: any;
1656
1719
  };
1657
1720
  };
1658
- list: {
1721
+ find: {
1659
1722
  /** 查询退款记录列表 */
1660
1723
  post: {
1661
1724
  body: {
@@ -1670,7 +1733,7 @@ export type Api = {
1670
1733
  return: any;
1671
1734
  };
1672
1735
  };
1673
- detail: {
1736
+ findOne: {
1674
1737
  /** 查询单个退款单详情 */
1675
1738
  post: {
1676
1739
  body: {
@@ -1706,7 +1769,7 @@ export type Api = {
1706
1769
  };
1707
1770
  };
1708
1771
  serviceDefinition: {
1709
- list: {
1772
+ find: {
1710
1773
  /** 获取应用的所有服务定义 */
1711
1774
  post: {
1712
1775
  body: {
@@ -1757,7 +1820,7 @@ export type Api = {
1757
1820
  post: {
1758
1821
  body: {
1759
1822
  serviceType: string;
1760
- chargeMethodKey?: string;
1823
+ priceListId?: string;
1761
1824
  metadata: Record<string, unknown>;
1762
1825
  idempotencyKey?: string;
1763
1826
  resourceId?: string;
@@ -1770,7 +1833,7 @@ export type Api = {
1770
1833
  post: {
1771
1834
  body: {
1772
1835
  serviceType: string;
1773
- chargeMethodKey?: string;
1836
+ priceListId?: string;
1774
1837
  metadata: Record<string, unknown>;
1775
1838
  freeQuotaOverride?: number;
1776
1839
  };
@@ -1800,7 +1863,6 @@ export type Api = {
1800
1863
  idempotencyKey?: string;
1801
1864
  resourceId?: string;
1802
1865
  serviceKey?: string;
1803
- chargeMethodKey?: string;
1804
1866
  userId?: string;
1805
1867
  startDate?: string;
1806
1868
  endDate?: string;
@@ -1809,66 +1871,60 @@ export type Api = {
1809
1871
  };
1810
1872
  };
1811
1873
  };
1812
- servicePricing: {
1813
- overview: {
1814
- post: {
1815
- return: any;
1816
- };
1817
- };
1818
- list: {
1819
- post: {
1820
- body: {
1821
- serviceKey?: string;
1822
- };
1823
- return: any;
1824
- };
1825
- };
1826
- get: {
1874
+ priceList: {
1875
+ find: {
1827
1876
  post: {
1828
1877
  body: {
1829
- serviceKey: string;
1830
- chargeMethodKey: string;
1878
+ where?: {
1879
+ priceListId?: string;
1880
+ businessLineKey?: string;
1881
+ billingProductLineKey?: string;
1882
+ serviceKey?: string;
1883
+ meterKey?: string;
1884
+ pricingType?: "flat" | "tiered" | "meters";
1885
+ keyword?: string;
1886
+ enabled?: boolean;
1887
+ accessScope?: "private" | "all_apps";
1888
+ };
1889
+ page?: number;
1890
+ pageSize?: number;
1831
1891
  };
1832
1892
  return: any;
1833
1893
  };
1834
1894
  };
1835
- upsert: {
1895
+ findOne: {
1836
1896
  post: {
1837
1897
  body: {
1838
- serviceKey: string;
1839
- chargeMethodKey: string;
1840
- originalPrice: number;
1841
- sellPrice: number;
1842
- enabled?: boolean;
1898
+ id: string;
1843
1899
  };
1844
1900
  return: any;
1845
1901
  };
1846
1902
  };
1847
- importLegacy: {
1848
- /** 幂等:将旧 pricingRule 导入 billingServicePricing */
1849
- post: {
1850
- return: any;
1851
- };
1852
- };
1853
- };
1854
- priceList: {
1855
- list: {
1903
+ options: {
1904
+ /** 筛选项、绑价表单 Select 用价目表下拉 */
1856
1905
  post: {
1857
1906
  body: {
1907
+ businessLineKey?: string;
1908
+ billingProductLineKey?: string;
1858
1909
  serviceKey?: string;
1859
- chargeMethodKey?: string;
1860
- pricingType?: "flat" | "tiered" | "dimensions";
1910
+ pricingType?: "flat" | "tiered" | "meters";
1861
1911
  enabled?: boolean;
1862
- page?: number;
1863
- pageSize?: number;
1912
+ accessScope?: "private" | "all_apps";
1864
1913
  };
1865
1914
  return: any;
1866
1915
  };
1867
1916
  };
1868
- get: {
1917
+ previewSchema: {
1918
+ /** 由所选计费项生成填价表单结构 */
1869
1919
  post: {
1870
1920
  body: {
1871
- id: string;
1921
+ businessLineKey: string;
1922
+ serviceKey: string;
1923
+ meterRefs: {
1924
+ businessLineKey: string;
1925
+ serviceKey: string;
1926
+ meterKey: string;
1927
+ }[];
1872
1928
  };
1873
1929
  return: any;
1874
1930
  };
@@ -1876,12 +1932,17 @@ export type Api = {
1876
1932
  create: {
1877
1933
  post: {
1878
1934
  body: {
1935
+ businessLineKey: string;
1879
1936
  serviceKey: string;
1880
- chargeMethodKey: string;
1937
+ meterRefs?: {
1938
+ businessLineKey: string;
1939
+ serviceKey: string;
1940
+ meterKey: string;
1941
+ }[];
1881
1942
  name: string;
1882
1943
  currency?: "CNY" | "USD";
1883
1944
  enabled?: boolean;
1884
- pricing: {
1945
+ pricingValues: {
1885
1946
  type: "flat";
1886
1947
  originalPrice: number;
1887
1948
  sellPrice: number;
@@ -1889,7 +1950,7 @@ export type Api = {
1889
1950
  type: "tiered";
1890
1951
  priceStructure: "flat" | "segmented";
1891
1952
  tiers: {
1892
- tierKey?: string;
1953
+ match?: Record<string, string>;
1893
1954
  tierRangeMode?: "at_most" | "at_least" | "between";
1894
1955
  minTokens?: number;
1895
1956
  maxTokens?: number;
@@ -1900,26 +1961,26 @@ export type Api = {
1900
1961
  billingEnabled: boolean;
1901
1962
  }[];
1902
1963
  } | {
1903
- type: "dimensions";
1904
- dimensions: {
1905
- dimensionKey: string;
1906
- unit: string;
1907
- priceStructure?: "flat" | "segmented";
1964
+ type: "meters";
1965
+ meters: {
1966
+ componentKey: string;
1967
+ businessLineKey: string;
1968
+ serviceKey: string;
1969
+ meterKey: string;
1908
1970
  tiers: {
1909
- tierKey?: string;
1971
+ match?: Record<string, string>;
1910
1972
  tierRangeMode?: "at_most" | "at_least" | "between";
1911
1973
  minTokens?: number;
1912
1974
  maxTokens?: number;
1913
1975
  minInclusive?: boolean;
1914
1976
  maxInclusive?: boolean;
1915
- minOutputTokens?: number;
1916
- maxOutputTokens?: number;
1917
1977
  originalFenPerUnit: number;
1918
1978
  sellFenPerUnit: number;
1919
1979
  billingEnabled: boolean;
1920
1980
  }[];
1921
1981
  }[];
1922
1982
  };
1983
+ accessScope?: "private" | "all_apps";
1923
1984
  };
1924
1985
  return: any;
1925
1986
  };
@@ -1931,7 +1992,12 @@ export type Api = {
1931
1992
  name?: string;
1932
1993
  currency?: "CNY" | "USD";
1933
1994
  enabled?: boolean;
1934
- pricing?: {
1995
+ meterRefs?: {
1996
+ businessLineKey: string;
1997
+ serviceKey: string;
1998
+ meterKey: string;
1999
+ }[];
2000
+ pricingValues?: {
1935
2001
  type: "flat";
1936
2002
  originalPrice: number;
1937
2003
  sellPrice: number;
@@ -1939,7 +2005,7 @@ export type Api = {
1939
2005
  type: "tiered";
1940
2006
  priceStructure: "flat" | "segmented";
1941
2007
  tiers: {
1942
- tierKey?: string;
2008
+ match?: Record<string, string>;
1943
2009
  tierRangeMode?: "at_most" | "at_least" | "between";
1944
2010
  minTokens?: number;
1945
2011
  maxTokens?: number;
@@ -1950,26 +2016,26 @@ export type Api = {
1950
2016
  billingEnabled: boolean;
1951
2017
  }[];
1952
2018
  } | {
1953
- type: "dimensions";
1954
- dimensions: {
1955
- dimensionKey: string;
1956
- unit: string;
1957
- priceStructure?: "flat" | "segmented";
2019
+ type: "meters";
2020
+ meters: {
2021
+ componentKey: string;
2022
+ businessLineKey: string;
2023
+ serviceKey: string;
2024
+ meterKey: string;
1958
2025
  tiers: {
1959
- tierKey?: string;
2026
+ match?: Record<string, string>;
1960
2027
  tierRangeMode?: "at_most" | "at_least" | "between";
1961
2028
  minTokens?: number;
1962
2029
  maxTokens?: number;
1963
2030
  minInclusive?: boolean;
1964
2031
  maxInclusive?: boolean;
1965
- minOutputTokens?: number;
1966
- maxOutputTokens?: number;
1967
2032
  originalFenPerUnit: number;
1968
2033
  sellFenPerUnit: number;
1969
2034
  billingEnabled: boolean;
1970
2035
  }[];
1971
2036
  }[];
1972
2037
  };
2038
+ accessScope?: "private" | "all_apps";
1973
2039
  };
1974
2040
  return: any;
1975
2041
  };
@@ -1984,13 +2050,16 @@ export type Api = {
1984
2050
  };
1985
2051
  };
1986
2052
  priceBinding: {
1987
- list: {
2053
+ find: {
1988
2054
  post: {
1989
2055
  body: {
1990
- subjectType?: "model-profile";
1991
- subjectKey?: string;
1992
- serviceKey?: string;
1993
- enabled?: boolean;
2056
+ where?: {
2057
+ subjectType?: "model-profile";
2058
+ subjectKey?: string;
2059
+ serviceKey?: string;
2060
+ businessLineKey?: string;
2061
+ enabled?: boolean;
2062
+ };
1994
2063
  };
1995
2064
  return: any;
1996
2065
  };
@@ -2015,191 +2084,532 @@ export type Api = {
2015
2084
  };
2016
2085
  };
2017
2086
  };
2018
- billingMethodDefinition: {
2019
- list: {
2087
+ businessLine: {
2088
+ find: {
2020
2089
  post: {
2021
2090
  body: {
2022
- serviceKey?: string;
2091
+ where?: {
2092
+ keyword?: string;
2093
+ enabled?: boolean;
2094
+ accessScope?: "private" | "all_apps";
2095
+ };
2096
+ withStats?: boolean;
2023
2097
  page?: number;
2024
2098
  pageSize?: number;
2025
2099
  };
2026
2100
  return: any;
2027
2101
  };
2028
2102
  };
2029
- get: {
2103
+ findOne: {
2030
2104
  post: {
2031
2105
  body: {
2032
- chargeMethodKey: string;
2106
+ businessLineKey: string;
2033
2107
  };
2034
2108
  return: any;
2035
2109
  };
2036
2110
  };
2037
- create: {
2111
+ options: {
2112
+ /** 筛选项、表单 Select 用业务线下拉 */
2038
2113
  post: {
2039
2114
  body: {
2040
- serviceKey: string;
2041
- chargeMethodKey: string;
2042
- label: string;
2043
- billingUnit: string;
2044
- chargeKind: "instant" | "settlement";
2045
- settlementPeriod?: "second" | "minute" | "hour" | "day" | "month";
2046
- priceStructure?: "flat" | "segmented";
2047
- tiers?: {
2048
- tierKey?: string;
2049
- tierRangeMode?: "at_most" | "at_least" | "between";
2050
- minTokens?: number;
2051
- maxTokens?: number;
2052
- minInclusive?: boolean;
2053
- maxInclusive?: boolean;
2054
- originalFenPerUnit: number;
2055
- sellFenPerUnit: number;
2056
- billingEnabled: boolean;
2057
- }[];
2058
2115
  enabled?: boolean;
2116
+ accessScope?: "private" | "all_apps";
2059
2117
  };
2060
2118
  return: any;
2061
2119
  };
2062
2120
  };
2063
- update: {
2121
+ create: {
2064
2122
  post: {
2065
2123
  body: {
2066
- id: string;
2067
- label?: string;
2068
- billingUnit?: string;
2069
- chargeKind?: "instant" | "settlement";
2070
- settlementPeriod?: "second" | "minute" | "hour" | "day" | "month";
2071
- priceStructure?: "flat" | "segmented";
2072
- tiers?: {
2073
- tierKey?: string;
2074
- tierRangeMode?: "at_most" | "at_least" | "between";
2075
- minTokens?: number;
2076
- maxTokens?: number;
2077
- minInclusive?: boolean;
2078
- maxInclusive?: boolean;
2079
- originalFenPerUnit: number;
2080
- sellFenPerUnit: number;
2081
- billingEnabled: boolean;
2082
- }[];
2083
- enabled?: boolean;
2124
+ businessLineKey: string;
2125
+ label: string;
2126
+ accessScope?: "private" | "all_apps";
2084
2127
  };
2085
2128
  return: any;
2086
2129
  };
2087
2130
  };
2088
- delete: {
2131
+ update: {
2089
2132
  post: {
2090
2133
  body: {
2091
- id: string;
2134
+ businessLineKey: string;
2135
+ label?: string;
2136
+ enabled?: boolean;
2137
+ accessScope?: "private" | "all_apps";
2092
2138
  };
2093
2139
  return: any;
2094
2140
  };
2095
2141
  };
2096
- };
2097
- export: {
2098
- recharge: {
2099
- /** 导出充值订单记录为 CSV 格式 */
2142
+ delete: {
2100
2143
  post: {
2101
2144
  body: {
2102
- startDate?: string;
2103
- endDate?: string;
2104
- status?: string;
2145
+ businessLineKey: string;
2105
2146
  };
2106
2147
  return: any;
2107
2148
  };
2108
2149
  };
2109
- refund: {
2110
- /** 导出退款记录为 CSV 格式 */
2150
+ };
2151
+ billingProductLine: {
2152
+ find: {
2111
2153
  post: {
2112
2154
  body: {
2113
- startDate?: string;
2114
- endDate?: string;
2115
- status?: string;
2155
+ where?: {
2156
+ businessLineKey?: string;
2157
+ keyword?: string;
2158
+ enabled?: boolean;
2159
+ accessScope?: "private" | "all_apps";
2160
+ };
2161
+ withStats?: boolean;
2162
+ page?: number;
2163
+ pageSize?: number;
2116
2164
  };
2117
2165
  return: any;
2118
2166
  };
2119
2167
  };
2120
- pointsHistory: {
2121
- /** 导出积分变动记录为 CSV 格式 */
2168
+ findOne: {
2122
2169
  post: {
2123
2170
  body: {
2124
- startDate?: string;
2125
- endDate?: string;
2126
- type?: string;
2127
- userId?: string;
2171
+ productLineId: string;
2128
2172
  };
2129
2173
  return: any;
2130
2174
  };
2131
2175
  };
2132
- };
2133
- financeReport: {
2134
- overview: {
2135
- /** 获取收入概览数据 */
2176
+ options: {
2177
+ /** 筛选项、表单 Select 用产品线下拉 */
2136
2178
  post: {
2137
2179
  body: {
2138
- startDate?: string;
2139
- endDate?: string;
2180
+ businessLineKey?: string;
2181
+ enabled?: boolean;
2182
+ accessScope?: "private" | "all_apps";
2140
2183
  };
2141
2184
  return: any;
2142
2185
  };
2143
2186
  };
2144
- trend: {
2145
- /** 获取收入趋势数据(按日/周/月) */
2187
+ create: {
2146
2188
  post: {
2147
2189
  body: {
2148
- period: "day" | "week" | "month";
2149
- days?: number;
2190
+ businessLineKey: string;
2191
+ productLineKey: string;
2192
+ label: string;
2193
+ accessScope?: "private" | "all_apps";
2150
2194
  };
2151
2195
  return: any;
2152
2196
  };
2153
2197
  };
2154
- packageRank: {
2155
- /** 获取套餐销售排行数据 */
2198
+ update: {
2156
2199
  post: {
2157
2200
  body: {
2158
- startDate?: string;
2159
- endDate?: string;
2160
- limit?: number;
2201
+ productLineId: string;
2202
+ label?: string;
2203
+ enabled?: boolean;
2204
+ accessScope?: "private" | "all_apps";
2161
2205
  };
2162
2206
  return: any;
2163
2207
  };
2164
2208
  };
2165
- userRank: {
2166
- /** 获取用户充值排行数据 */
2209
+ delete: {
2167
2210
  post: {
2168
2211
  body: {
2169
- startDate?: string;
2170
- endDate?: string;
2171
- limit?: number;
2212
+ productLineId: string;
2172
2213
  };
2173
2214
  return: any;
2174
2215
  };
2175
2216
  };
2176
2217
  };
2177
- reconciliation: {
2178
- generate: {
2179
- /** 生成指定日期的对账报告 */
2180
- post: {
2181
- body: {
2182
- date: string;
2218
+ billingServiceCatalog: {
2219
+ service: {
2220
+ find: {
2221
+ post: {
2222
+ body: {
2223
+ where?: {
2224
+ businessLineKey?: string;
2225
+ billingProductLineKey?: string;
2226
+ productLine?: string;
2227
+ source?: "builtin" | "custom";
2228
+ serviceKey?: string;
2229
+ keyword?: string;
2230
+ enabled?: boolean;
2231
+ accessScope?: "private" | "all_apps";
2232
+ };
2233
+ page?: number;
2234
+ pageSize?: number;
2235
+ };
2236
+ return: any;
2183
2237
  };
2184
- return: any;
2185
2238
  };
2186
- };
2187
- list: {
2188
- /** 查询对账报告列表 */
2189
- post: {
2190
- body: {
2191
- page?: number;
2192
- pageSize?: number;
2193
- status?: string;
2194
- startDate?: string;
2195
- endDate?: string;
2239
+ options: {
2240
+ /** 筛选项、表单 Select 用服务下拉 */
2241
+ post: {
2242
+ body: {
2243
+ businessLineKey?: string;
2244
+ billingProductLineKey?: string;
2245
+ enabled?: boolean;
2246
+ accessScope?: "private" | "all_apps";
2247
+ };
2248
+ return: any;
2196
2249
  };
2197
- return: any;
2198
2250
  };
2199
- };
2200
- detail: {
2201
- /** 查询对账报告详情 */
2202
- post: {
2251
+ create: {
2252
+ post: {
2253
+ body: {
2254
+ businessLineKey: string;
2255
+ billingProductLineKey: string;
2256
+ serviceType: string;
2257
+ name: string;
2258
+ description?: string;
2259
+ dependencies?: {
2260
+ businessLineKey: string;
2261
+ billingProductLineKey: string;
2262
+ serviceKey: string;
2263
+ meterKeys?: string[];
2264
+ required?: boolean;
2265
+ }[];
2266
+ accessScope?: "private" | "all_apps";
2267
+ };
2268
+ return: any;
2269
+ };
2270
+ };
2271
+ update: {
2272
+ post: {
2273
+ body: {
2274
+ businessLineKey: string;
2275
+ serviceKey: string;
2276
+ label?: string;
2277
+ description?: string;
2278
+ billingProductLineKey?: string;
2279
+ dependencies?: {
2280
+ businessLineKey: string;
2281
+ billingProductLineKey: string;
2282
+ serviceKey: string;
2283
+ meterKeys?: string[];
2284
+ required?: boolean;
2285
+ }[];
2286
+ enabled?: boolean;
2287
+ accessScope?: "private" | "all_apps";
2288
+ };
2289
+ return: any;
2290
+ };
2291
+ };
2292
+ delete: {
2293
+ post: {
2294
+ body: {
2295
+ businessLineKey: string;
2296
+ serviceKey: string;
2297
+ };
2298
+ return: any;
2299
+ };
2300
+ };
2301
+ };
2302
+ runtime: {
2303
+ export: {
2304
+ /** 前端运行时缓存:服务 + 价目表 operation */
2305
+ post: {
2306
+ return: any;
2307
+ };
2308
+ };
2309
+ };
2310
+ };
2311
+ billingMeter: {
2312
+ find: {
2313
+ post: {
2314
+ body: {
2315
+ where?: {
2316
+ businessLineKey?: string;
2317
+ billingProductLineKey?: string;
2318
+ serviceKey?: string;
2319
+ chargeMode?: "instant" | "settlement";
2320
+ source?: "builtin" | "custom";
2321
+ keyword?: string;
2322
+ enabled?: boolean;
2323
+ accessScope?: "private" | "all_apps";
2324
+ };
2325
+ page?: number;
2326
+ pageSize?: number;
2327
+ };
2328
+ return: any;
2329
+ };
2330
+ };
2331
+ options: {
2332
+ post: {
2333
+ body: {
2334
+ businessLineKey?: string;
2335
+ billingProductLineKey?: string;
2336
+ serviceKey?: string;
2337
+ enabled?: boolean;
2338
+ accessScope?: "private" | "all_apps";
2339
+ };
2340
+ return: any;
2341
+ };
2342
+ };
2343
+ create: {
2344
+ post: {
2345
+ body: {
2346
+ businessLineKey: string;
2347
+ serviceKey: string;
2348
+ meterKey: string;
2349
+ label: string;
2350
+ description?: string;
2351
+ chargeMode?: "instant" | "settlement";
2352
+ settlementPeriod?: "hour" | "day" | "month";
2353
+ pricingSchema?: {
2354
+ unitLabel: string;
2355
+ quantityScale?: number;
2356
+ priceStructure?: "flat" | "segmented" | "keyed";
2357
+ matchKeys?: {
2358
+ key: string;
2359
+ label: string;
2360
+ values: {
2361
+ value: string;
2362
+ label: string;
2363
+ }[];
2364
+ }[];
2365
+ tiers: {
2366
+ match?: Record<string, string>;
2367
+ tierRangeMode?: "at_most" | "at_least" | "between";
2368
+ minTokens?: number;
2369
+ maxTokens?: number;
2370
+ minInclusive?: boolean;
2371
+ maxInclusive?: boolean;
2372
+ }[];
2373
+ };
2374
+ enabled?: boolean;
2375
+ accessScope?: "private" | "all_apps";
2376
+ };
2377
+ return: any;
2378
+ };
2379
+ };
2380
+ update: {
2381
+ post: {
2382
+ body: {
2383
+ id: string;
2384
+ businessLineKey?: string;
2385
+ serviceKey?: string;
2386
+ meterKey?: string;
2387
+ label?: string;
2388
+ description?: string;
2389
+ chargeMode?: "instant" | "settlement";
2390
+ settlementPeriod?: "hour" | "day" | "month";
2391
+ pricingSchema?: {
2392
+ unitLabel: string;
2393
+ quantityScale?: number;
2394
+ priceStructure?: "flat" | "segmented" | "keyed";
2395
+ matchKeys?: {
2396
+ key: string;
2397
+ label: string;
2398
+ values: {
2399
+ value: string;
2400
+ label: string;
2401
+ }[];
2402
+ }[];
2403
+ tiers: {
2404
+ match?: Record<string, string>;
2405
+ tierRangeMode?: "at_most" | "at_least" | "between";
2406
+ minTokens?: number;
2407
+ maxTokens?: number;
2408
+ minInclusive?: boolean;
2409
+ maxInclusive?: boolean;
2410
+ }[];
2411
+ };
2412
+ enabled?: boolean;
2413
+ accessScope?: "private" | "all_apps";
2414
+ };
2415
+ return: any;
2416
+ };
2417
+ };
2418
+ delete: {
2419
+ post: {
2420
+ body: {
2421
+ id: string;
2422
+ };
2423
+ return: any;
2424
+ };
2425
+ };
2426
+ };
2427
+ billingMeterChargeItem: {
2428
+ find: {
2429
+ post: {
2430
+ body: {
2431
+ where?: {
2432
+ keyword?: string;
2433
+ userId?: string;
2434
+ businessLineKey?: string;
2435
+ billingProductLineKey?: string;
2436
+ serviceKey?: string;
2437
+ meterKey?: string;
2438
+ priceListId?: string;
2439
+ pricingType?: "flat" | "tiered" | "meters";
2440
+ resourceId?: string;
2441
+ subjectKey?: string;
2442
+ idempotencyKey?: string;
2443
+ billingUsageRecordId?: string;
2444
+ chargeMode?: "instant" | "settlement";
2445
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
2446
+ startDate?: string;
2447
+ endDate?: string;
2448
+ };
2449
+ page?: number;
2450
+ pageSize?: number;
2451
+ };
2452
+ return: any;
2453
+ };
2454
+ };
2455
+ overview: {
2456
+ post: {
2457
+ body: {
2458
+ where?: {
2459
+ keyword?: string;
2460
+ userId?: string;
2461
+ businessLineKey?: string;
2462
+ billingProductLineKey?: string;
2463
+ serviceKey?: string;
2464
+ meterKey?: string;
2465
+ priceListId?: string;
2466
+ pricingType?: "flat" | "tiered" | "meters";
2467
+ resourceId?: string;
2468
+ subjectKey?: string;
2469
+ idempotencyKey?: string;
2470
+ billingUsageRecordId?: string;
2471
+ chargeMode?: "instant" | "settlement";
2472
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
2473
+ startDate?: string;
2474
+ endDate?: string;
2475
+ };
2476
+ };
2477
+ return: any;
2478
+ };
2479
+ };
2480
+ trend: {
2481
+ post: {
2482
+ body: {
2483
+ where?: {
2484
+ keyword?: string;
2485
+ userId?: string;
2486
+ businessLineKey?: string;
2487
+ billingProductLineKey?: string;
2488
+ serviceKey?: string;
2489
+ meterKey?: string;
2490
+ priceListId?: string;
2491
+ pricingType?: "flat" | "tiered" | "meters";
2492
+ resourceId?: string;
2493
+ subjectKey?: string;
2494
+ idempotencyKey?: string;
2495
+ billingUsageRecordId?: string;
2496
+ chargeMode?: "instant" | "settlement";
2497
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
2498
+ startDate?: string;
2499
+ endDate?: string;
2500
+ };
2501
+ limit?: number;
2502
+ };
2503
+ return: any;
2504
+ };
2505
+ };
2506
+ };
2507
+ export: {
2508
+ recharge: {
2509
+ /** 导出充值订单记录为 CSV 格式 */
2510
+ post: {
2511
+ body: {
2512
+ startDate?: string;
2513
+ endDate?: string;
2514
+ status?: string;
2515
+ };
2516
+ return: any;
2517
+ };
2518
+ };
2519
+ refund: {
2520
+ /** 导出退款记录为 CSV 格式 */
2521
+ post: {
2522
+ body: {
2523
+ startDate?: string;
2524
+ endDate?: string;
2525
+ status?: string;
2526
+ };
2527
+ return: any;
2528
+ };
2529
+ };
2530
+ pointsHistory: {
2531
+ /** 导出积分变动记录为 CSV 格式 */
2532
+ post: {
2533
+ body: {
2534
+ startDate?: string;
2535
+ endDate?: string;
2536
+ type?: string;
2537
+ userId?: string;
2538
+ };
2539
+ return: any;
2540
+ };
2541
+ };
2542
+ };
2543
+ financeReport: {
2544
+ overview: {
2545
+ /** 获取收入概览数据 */
2546
+ post: {
2547
+ body: {
2548
+ startDate?: string;
2549
+ endDate?: string;
2550
+ };
2551
+ return: any;
2552
+ };
2553
+ };
2554
+ trend: {
2555
+ /** 获取收入趋势数据(按日/周/月) */
2556
+ post: {
2557
+ body: {
2558
+ period: "day" | "week" | "month";
2559
+ days?: number;
2560
+ };
2561
+ return: any;
2562
+ };
2563
+ };
2564
+ packageRank: {
2565
+ /** 获取套餐销售排行数据 */
2566
+ post: {
2567
+ body: {
2568
+ startDate?: string;
2569
+ endDate?: string;
2570
+ limit?: number;
2571
+ };
2572
+ return: any;
2573
+ };
2574
+ };
2575
+ userRank: {
2576
+ /** 获取用户充值排行数据 */
2577
+ post: {
2578
+ body: {
2579
+ startDate?: string;
2580
+ endDate?: string;
2581
+ limit?: number;
2582
+ };
2583
+ return: any;
2584
+ };
2585
+ };
2586
+ };
2587
+ reconciliation: {
2588
+ generate: {
2589
+ /** 生成指定日期的对账报告 */
2590
+ post: {
2591
+ body: {
2592
+ date: string;
2593
+ };
2594
+ return: any;
2595
+ };
2596
+ };
2597
+ find: {
2598
+ /** 查询对账报告列表 */
2599
+ post: {
2600
+ body: {
2601
+ page?: number;
2602
+ pageSize?: number;
2603
+ status?: string;
2604
+ startDate?: string;
2605
+ endDate?: string;
2606
+ };
2607
+ return: any;
2608
+ };
2609
+ };
2610
+ findOne: {
2611
+ /** 查询对账报告详情 */
2612
+ post: {
2203
2613
  body: {
2204
2614
  id: string;
2205
2615
  };
@@ -2251,7 +2661,7 @@ export type Api = {
2251
2661
  return: any;
2252
2662
  };
2253
2663
  };
2254
- list: {
2664
+ find: {
2255
2665
  /** 查询发票申请列表 */
2256
2666
  post: {
2257
2667
  body: {
@@ -2265,7 +2675,7 @@ export type Api = {
2265
2675
  return: any;
2266
2676
  };
2267
2677
  };
2268
- detail: {
2678
+ findOne: {
2269
2679
  /** 查询发票详情 */
2270
2680
  post: {
2271
2681
  body: {
@@ -2400,8 +2810,9 @@ export type Api = {
2400
2810
  body: {
2401
2811
  appId: string;
2402
2812
  userId: string;
2813
+ businessLineKey: string;
2403
2814
  serviceKey: string;
2404
- chargeMethodKey: string;
2815
+ priceListId: string;
2405
2816
  amount: number;
2406
2817
  freeQuotaOverride?: number;
2407
2818
  };
@@ -2416,8 +2827,9 @@ export type Api = {
2416
2827
  items: {
2417
2828
  key: string;
2418
2829
  userId: string;
2830
+ businessLineKey: string;
2419
2831
  serviceKey: string;
2420
- chargeMethodKey: string;
2832
+ priceListId?: string;
2421
2833
  amount: number;
2422
2834
  freeQuotaOverride?: number;
2423
2835
  }[];
@@ -2431,8 +2843,9 @@ export type Api = {
2431
2843
  body: {
2432
2844
  appId: string;
2433
2845
  userId: string;
2846
+ businessLineKey: string;
2434
2847
  serviceKey: string;
2435
- chargeMethodKey: string;
2848
+ priceListId?: string;
2436
2849
  amount: number;
2437
2850
  metadata?: Record<string, unknown>;
2438
2851
  idempotencyKey?: string;
@@ -2445,6 +2858,17 @@ export type Api = {
2445
2858
  return: any;
2446
2859
  };
2447
2860
  };
2861
+ 'last-charged-period-ends': {
2862
+ /** 按 resourceId 批量查询已成功结算的最大 periodEnd */
2863
+ post: {
2864
+ body: {
2865
+ appId: string;
2866
+ serviceKey: string;
2867
+ resourceIds: string[];
2868
+ };
2869
+ return: any;
2870
+ };
2871
+ };
2448
2872
  reversal: {
2449
2873
  /** 供内部服务冲正已上报的服务用量并退还积分 */
2450
2874
  post: {
@@ -2458,21 +2882,44 @@ export type Api = {
2458
2882
  return: any;
2459
2883
  };
2460
2884
  };
2885
+ 'preview-meter-charge': {
2886
+ /** 供 ai-server 等根据价目表与 meter 用量计算积分 */
2887
+ post: {
2888
+ body: {
2889
+ appId: string;
2890
+ businessLineKey: string;
2891
+ serviceKey: string;
2892
+ priceListId?: string;
2893
+ meterUsage: Record<string, number>;
2894
+ meterMatchContext?: Record<string, Record<string, string>>;
2895
+ meterTierMatchUsage?: Record<string, number>;
2896
+ exchangeRate?: number;
2897
+ };
2898
+ return: any;
2899
+ };
2900
+ };
2461
2901
  'record-ai': {
2462
- /** 供 ai-server 计价后写入统一用量账本并扣积分 */
2902
+ /** 供 ai-server 传入 meter 用量,由计费引擎算价并扣积分 */
2463
2903
  post: {
2464
2904
  body: {
2465
2905
  appId: string;
2466
2906
  userId: string;
2907
+ businessLineKey: string;
2467
2908
  idempotencyKey: string;
2468
2909
  serviceKey: string;
2469
- chargeMethodKey: string;
2910
+ priceListId: string;
2470
2911
  resourceId?: string;
2471
2912
  subjectKey: string;
2913
+ sourceService?: string;
2914
+ sourceType?: string;
2915
+ sourceId?: string;
2472
2916
  labels?: Record<string, string>;
2473
- pointsConsumed: number;
2474
- quantity?: number;
2475
- unit?: string;
2917
+ quantity: number;
2918
+ unit: string;
2919
+ meterUsage: Record<string, number>;
2920
+ meterMatchContext?: Record<string, Record<string, string>>;
2921
+ meterTierMatchUsage?: Record<string, number>;
2922
+ exchangeRate?: number;
2476
2923
  snapshot?: {
2477
2924
  priceListId?: string;
2478
2925
  usage?: Record<string, number>;
@@ -2482,7 +2929,7 @@ export type Api = {
2482
2929
  return: any;
2483
2930
  };
2484
2931
  };
2485
- list: {
2932
+ find: {
2486
2933
  /** 供 ai-server 等内部服务查询 billingUsageRecord */
2487
2934
  post: {
2488
2935
  body: {
@@ -2490,9 +2937,8 @@ export type Api = {
2490
2937
  userId?: string;
2491
2938
  serviceGroup?: "ai" | "platform" | "storage";
2492
2939
  serviceGroups?: "ai" | "platform" | "storage"[];
2493
- referenceId?: string;
2940
+ resourceId?: string;
2494
2941
  serviceKey?: string;
2495
- chargeMethodKey?: string;
2496
2942
  model?: string;
2497
2943
  subjectKeys?: string[];
2498
2944
  id?: string;
@@ -2519,18 +2965,32 @@ export type Api = {
2519
2965
  return: any;
2520
2966
  };
2521
2967
  };
2522
- 'by-reference': {
2523
- /** 按 referenceId 联合查询用量与积分流水 */
2968
+ 'by-resource': {
2969
+ /** 按 resourceId 联合查询用量与积分流水 */
2524
2970
  post: {
2525
2971
  body: {
2526
2972
  appId: string;
2527
- referenceId: string;
2973
+ resourceId: string;
2528
2974
  serviceKey?: string;
2529
2975
  };
2530
2976
  return: any;
2531
2977
  };
2532
2978
  };
2533
2979
  };
2980
+ billing: {
2981
+ 'settlement-config': {
2982
+ /** 按 app + service 返回 meter 结算周期与价目表 */
2983
+ post: {
2984
+ body: {
2985
+ appId: string;
2986
+ businessLineKey: string;
2987
+ serviceKey: string;
2988
+ priceListId?: string;
2989
+ };
2990
+ return: any;
2991
+ };
2992
+ };
2993
+ };
2534
2994
  pricing: {
2535
2995
  'resolve-model': {
2536
2996
  /** 供 ai-server 运行时读取模型定价 */
@@ -2552,6 +3012,7 @@ export type Api = {
2552
3012
  operatorId: string;
2553
3013
  supplierId: string;
2554
3014
  profileId: string;
3015
+ profileName?: string;
2555
3016
  productLine: string;
2556
3017
  currency: "CNY" | "USD";
2557
3018
  plans: unknown[];
@@ -2583,6 +3044,20 @@ export type Api = {
2583
3044
  post: {
2584
3045
  body: {
2585
3046
  appId: string;
3047
+ subjectKeys?: string[];
3048
+ };
3049
+ return: any;
3050
+ };
3051
+ };
3052
+ };
3053
+ billingCatalog: {
3054
+ list: {
3055
+ /** 服务 + 价目表 operation 列表(供 ai-server 等内部服务) */
3056
+ post: {
3057
+ body: {
3058
+ appId: string;
3059
+ billingProductLineKey?: "ai" | "storage" | "platform";
3060
+ group?: "ai" | "storage" | "platform";
2586
3061
  };
2587
3062
  return: any;
2588
3063
  };
@@ -2694,6 +3169,12 @@ export interface ApiClient {
2694
3169
  id: string;
2695
3170
  }, config?: RequestConfig) => RequestBuilder<any>;
2696
3171
  };
3172
+ manageOptions: {
3173
+ /** 管理端表单与筛选用产品选项 */
3174
+ post: (body: {
3175
+ status?: "" | "active" | "archived";
3176
+ }, config?: RequestConfig) => RequestBuilder<any>;
3177
+ };
2697
3178
  updateSort: {
2698
3179
  /** 批量更新产品排序 */
2699
3180
  post: (body: {
@@ -2703,7 +3184,7 @@ export interface ApiClient {
2703
3184
  }[];
2704
3185
  }, config?: RequestConfig) => RequestBuilder<any>;
2705
3186
  };
2706
- listActive: {
3187
+ options: {
2707
3188
  /** 获取定价页面可用产品列表(公开) */
2708
3189
  post: (config?: RequestConfig) => RequestBuilder<any>;
2709
3190
  };
@@ -2759,16 +3240,13 @@ export interface ApiClient {
2759
3240
  id: string;
2760
3241
  }, config?: RequestConfig) => RequestBuilder<any>;
2761
3242
  };
2762
- listByProduct: {
2763
- /** 获取指定产品的所有可用价格方案 */
3243
+ options: {
3244
+ /** 按产品或免费体验筛选可用价格方案 */
2764
3245
  post: (body: {
2765
- productId: string;
3246
+ productId?: string;
3247
+ freeOnly?: boolean;
2766
3248
  }, config?: RequestConfig) => RequestBuilder<any>;
2767
3249
  };
2768
- listFreeActive: {
2769
- /** 获取当前应用可领取的免费体验价格方案 */
2770
- post: (config?: RequestConfig) => RequestBuilder<any>;
2771
- };
2772
3250
  };
2773
3251
  subscriptions: {
2774
3252
  create: {
@@ -2835,6 +3313,12 @@ export interface ApiClient {
2835
3313
  };
2836
3314
  }, config?: RequestConfig) => RequestBuilder<any>;
2837
3315
  };
3316
+ statistics: {
3317
+ /** 获取订阅概览页统计数据(状态计数、MRR、产品分布、最近订阅) */
3318
+ post: (body: {
3319
+ recentLimit?: number;
3320
+ }, config?: RequestConfig) => RequestBuilder<any>;
3321
+ };
2838
3322
  history: {
2839
3323
  /** 查询单个订阅的权益变化历史(管理端) */
2840
3324
  post: (body: {
@@ -3267,7 +3751,7 @@ export interface ApiClient {
3267
3751
  /** 分页查询积分变动历史 */
3268
3752
  post: (body: {
3269
3753
  userId?: string;
3270
- type?: "earn" | "spend" | "reversal" | "clawback" | "adjust";
3754
+ type?: "earn" | "consume" | "reversal" | "clawback" | "adjust";
3271
3755
  subType?: string;
3272
3756
  page?: number;
3273
3757
  pageSize?: number;
@@ -3286,9 +3770,11 @@ export interface ApiClient {
3286
3770
  post: (body: {
3287
3771
  userId?: string;
3288
3772
  period?: "day" | "week" | "month" | "year";
3773
+ startTime?: string;
3774
+ endTime?: string;
3289
3775
  }, config?: RequestConfig) => RequestBuilder<any>;
3290
3776
  };
3291
- getTrendChart: {
3777
+ trendChart: {
3292
3778
  /** 获取积分变动趋势图表数据 */
3293
3779
  post: (body: {
3294
3780
  userId?: string;
@@ -3297,7 +3783,7 @@ export interface ApiClient {
3297
3783
  granularity: "minute" | "hour" | "day" | "month" | "year";
3298
3784
  }, config?: RequestConfig) => RequestBuilder<any>;
3299
3785
  };
3300
- getTypeDistributionChart: {
3786
+ typeDistributionChart: {
3301
3787
  /** 获取积分类型分布图表数据 */
3302
3788
  post: (body: {
3303
3789
  userId?: string;
@@ -3305,10 +3791,18 @@ export interface ApiClient {
3305
3791
  endTime?: string;
3306
3792
  }, config?: RequestConfig) => RequestBuilder<any>;
3307
3793
  };
3308
- getRankingChart: {
3794
+ businessLineConsumptionChart: {
3795
+ /** 按服务计费引擎业务线聚合积分消费 */
3796
+ post: (body: {
3797
+ userId?: string;
3798
+ startTime?: string;
3799
+ endTime?: string;
3800
+ }, config?: RequestConfig) => RequestBuilder<any>;
3801
+ };
3802
+ rankingChart: {
3309
3803
  /** 获取用户积分排行榜 */
3310
3804
  post: (body: {
3311
- type?: "earn" | "spend" | "reversal" | "clawback" | "adjust";
3805
+ type?: "earn" | "consume" | "reversal" | "clawback" | "adjust";
3312
3806
  startTime?: string;
3313
3807
  endTime?: string;
3314
3808
  limit?: number;
@@ -3604,11 +4098,11 @@ export interface ApiClient {
3604
4098
  cooldownHours?: number;
3605
4099
  }, config?: RequestConfig) => RequestBuilder<any>;
3606
4100
  };
3607
- getConfig: {
4101
+ findOne: {
3608
4102
  /** 获取当前预警配置 */
3609
4103
  post: (config?: RequestConfig) => RequestBuilder<any>;
3610
4104
  };
3611
- findAlerts: {
4105
+ find: {
3612
4106
  /** 分页查询预警记录 */
3613
4107
  post: (body: {
3614
4108
  where?: {
@@ -3647,24 +4141,33 @@ export interface ApiClient {
3647
4141
  };
3648
4142
  billingUsage: {
3649
4143
  charges: {
3650
- list: {
3651
- /** 查询 billingUsageRecord 全站扣费流水 */
4144
+ find: {
4145
+ /** 查询 billingUsageRecord 全站扣费明细 */
3652
4146
  post: (body: {
4147
+ where?: {
4148
+ keyword?: string;
4149
+ userId?: string;
4150
+ serviceGroup?: "ai" | "platform" | "storage";
4151
+ businessLineKey?: string;
4152
+ billingProductLineKey?: string;
4153
+ serviceKey?: string;
4154
+ serviceKeys?: string[];
4155
+ meterKey?: string;
4156
+ priceListId?: string;
4157
+ pricingType?: "flat" | "tiered" | "meters";
4158
+ subjectKey?: string;
4159
+ id?: string;
4160
+ idempotencyKey?: string;
4161
+ resourceId?: string;
4162
+ status?: "pending" | "charged" | "failed" | "canceled";
4163
+ startDate?: string;
4164
+ endDate?: string;
4165
+ };
3653
4166
  page?: number;
3654
4167
  pageSize?: number;
3655
- userId?: string;
3656
- serviceGroup?: "ai" | "platform" | "storage";
3657
- serviceKey?: string;
3658
- chargeMethodKey?: string;
3659
- subjectKey?: string;
3660
- id?: string;
3661
- idempotencyKey?: string;
3662
- resourceId?: string;
3663
- startDate?: string;
3664
- endDate?: string;
3665
4168
  }, config?: RequestConfig) => RequestBuilder<any>;
3666
4169
  };
3667
- get: {
4170
+ findOne: {
3668
4171
  /** 按 ID 查询单条扣费记录(含 AI 扩展字段,供详情抽屉) */
3669
4172
  post: (body: {
3670
4173
  id: string;
@@ -3673,23 +4176,33 @@ export interface ApiClient {
3673
4176
  };
3674
4177
  consumption: {
3675
4178
  overview: {
3676
- /** 聚合 AI / 平台 / 存储积分消耗 */
4179
+ /** 聚合已入账扣费结果 */
3677
4180
  post: (body: {
3678
- userId?: string;
3679
- serviceGroup?: "ai" | "platform" | "storage";
3680
- serviceKey?: string;
3681
- startDate?: string;
3682
- endDate?: string;
4181
+ where?: {
4182
+ userId?: string;
4183
+ serviceGroup?: "ai" | "platform" | "storage";
4184
+ businessLineKey?: string;
4185
+ billingProductLineKey?: string;
4186
+ serviceKey?: string;
4187
+ serviceKeys?: string[];
4188
+ startDate?: string;
4189
+ endDate?: string;
4190
+ };
3683
4191
  }, config?: RequestConfig) => RequestBuilder<any>;
3684
4192
  };
3685
4193
  trend: {
3686
4194
  /** 按日聚合积分消耗趋势 */
3687
4195
  post: (body: {
3688
- userId?: string;
3689
- serviceGroup?: "ai" | "platform" | "storage";
3690
- serviceKey?: string;
3691
- startDate?: string;
3692
- endDate?: string;
4196
+ where?: {
4197
+ userId?: string;
4198
+ serviceGroup?: "ai" | "platform" | "storage";
4199
+ businessLineKey?: string;
4200
+ billingProductLineKey?: string;
4201
+ serviceKey?: string;
4202
+ serviceKeys?: string[];
4203
+ startDate?: string;
4204
+ endDate?: string;
4205
+ };
3693
4206
  limit?: number;
3694
4207
  }, config?: RequestConfig) => RequestBuilder<any>;
3695
4208
  };
@@ -3743,7 +4256,7 @@ export interface ApiClient {
3743
4256
  };
3744
4257
  }, config?: RequestConfig) => RequestBuilder<any>;
3745
4258
  };
3746
- detail: {
4259
+ findOne: {
3747
4260
  /** 管理端查询单个积分充值订单详情及操作时间线 */
3748
4261
  post: (body: {
3749
4262
  orderId: string;
@@ -3757,12 +4270,24 @@ export interface ApiClient {
3757
4270
  }, config?: RequestConfig) => RequestBuilder<any>;
3758
4271
  };
3759
4272
  statistics: {
3760
- /** 获取用户积分充值订单统计 */
4273
+ /** 获取当前 app 积分充值订单统计 */
3761
4274
  post: (body: {
3762
4275
  startTime?: string;
3763
4276
  endTime?: string;
3764
4277
  }, config?: RequestConfig) => RequestBuilder<any>;
3765
4278
  };
4279
+ accountSummary: {
4280
+ /** 汇总当前 app 下所有用户积分账户余额 */
4281
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
4282
+ };
4283
+ trend: {
4284
+ /** 按日聚合当前 app 已支付充值订单 */
4285
+ post: (body: {
4286
+ startTime: string;
4287
+ endTime: string;
4288
+ limit?: number;
4289
+ }, config?: RequestConfig) => RequestBuilder<any>;
4290
+ };
3766
4291
  statusOptions: {
3767
4292
  /** 获取积分充值订单状态下拉选项与展示文案 */
3768
4293
  post: (config?: RequestConfig) => RequestBuilder<any>;
@@ -3781,7 +4306,7 @@ export interface ApiClient {
3781
4306
  };
3782
4307
  };
3783
4308
  rechargePackage: {
3784
- list: {
4309
+ find: {
3785
4310
  /** 获取充值套餐列表(管理端) */
3786
4311
  post: (body: {
3787
4312
  includeDisabled?: boolean;
@@ -3867,7 +4392,7 @@ export interface ApiClient {
3867
4392
  remark: string;
3868
4393
  }, config?: RequestConfig) => RequestBuilder<any>;
3869
4394
  };
3870
- list: {
4395
+ find: {
3871
4396
  /** 查询退款记录列表 */
3872
4397
  post: (body: {
3873
4398
  page?: number;
@@ -3879,7 +4404,7 @@ export interface ApiClient {
3879
4404
  endDate?: string;
3880
4405
  }, config?: RequestConfig) => RequestBuilder<any>;
3881
4406
  };
3882
- detail: {
4407
+ findOne: {
3883
4408
  /** 查询单个退款单详情 */
3884
4409
  post: (body: {
3885
4410
  refundNo: string;
@@ -3904,7 +4429,7 @@ export interface ApiClient {
3904
4429
  };
3905
4430
  };
3906
4431
  serviceDefinition: {
3907
- list: {
4432
+ find: {
3908
4433
  /** 获取应用的所有服务定义 */
3909
4434
  post: (body: {
3910
4435
  page?: number;
@@ -3942,7 +4467,7 @@ export interface ApiClient {
3942
4467
  /** 上报服务用量,自动计费扣费 */
3943
4468
  post: (body: {
3944
4469
  serviceType: string;
3945
- chargeMethodKey?: string;
4470
+ priceListId?: string;
3946
4471
  metadata: Record<string, unknown>;
3947
4472
  idempotencyKey?: string;
3948
4473
  resourceId?: string;
@@ -3952,7 +4477,7 @@ export interface ApiClient {
3952
4477
  /** 按当前定价规则预估本次用量费用,不写入记录、不扣积分 */
3953
4478
  post: (body: {
3954
4479
  serviceType: string;
3955
- chargeMethodKey?: string;
4480
+ priceListId?: string;
3956
4481
  metadata: Record<string, unknown>;
3957
4482
  freeQuotaOverride?: number;
3958
4483
  }, config?: RequestConfig) => RequestBuilder<any>;
@@ -3976,66 +4501,71 @@ export interface ApiClient {
3976
4501
  idempotencyKey?: string;
3977
4502
  resourceId?: string;
3978
4503
  serviceKey?: string;
3979
- chargeMethodKey?: string;
3980
4504
  userId?: string;
3981
4505
  startDate?: string;
3982
4506
  endDate?: string;
3983
4507
  }, config?: RequestConfig) => RequestBuilder<any>;
3984
4508
  };
3985
4509
  };
3986
- servicePricing: {
3987
- overview: {
3988
- post: (config?: RequestConfig) => RequestBuilder<any>;
3989
- };
3990
- list: {
3991
- post: (body: {
3992
- serviceKey?: string;
3993
- }, config?: RequestConfig) => RequestBuilder<any>;
3994
- };
3995
- get: {
3996
- post: (body: {
3997
- serviceKey: string;
3998
- chargeMethodKey: string;
3999
- }, config?: RequestConfig) => RequestBuilder<any>;
4000
- };
4001
- upsert: {
4510
+ priceList: {
4511
+ find: {
4002
4512
  post: (body: {
4003
- serviceKey: string;
4004
- chargeMethodKey: string;
4005
- originalPrice: number;
4006
- sellPrice: number;
4007
- enabled?: boolean;
4513
+ where?: {
4514
+ priceListId?: string;
4515
+ businessLineKey?: string;
4516
+ billingProductLineKey?: string;
4517
+ serviceKey?: string;
4518
+ meterKey?: string;
4519
+ pricingType?: "flat" | "tiered" | "meters";
4520
+ keyword?: string;
4521
+ enabled?: boolean;
4522
+ accessScope?: "private" | "all_apps";
4523
+ };
4524
+ page?: number;
4525
+ pageSize?: number;
4008
4526
  }, config?: RequestConfig) => RequestBuilder<any>;
4009
4527
  };
4010
- importLegacy: {
4011
- /** 幂等:将旧 pricingRule 导入 billingServicePricing */
4012
- post: (config?: RequestConfig) => RequestBuilder<any>;
4528
+ findOne: {
4529
+ post: (body: {
4530
+ id: string;
4531
+ }, config?: RequestConfig) => RequestBuilder<any>;
4013
4532
  };
4014
- };
4015
- priceList: {
4016
- list: {
4533
+ options: {
4534
+ /** 筛选项、绑价表单 Select 用价目表下拉 */
4017
4535
  post: (body: {
4536
+ businessLineKey?: string;
4537
+ billingProductLineKey?: string;
4018
4538
  serviceKey?: string;
4019
- chargeMethodKey?: string;
4020
- pricingType?: "flat" | "tiered" | "dimensions";
4539
+ pricingType?: "flat" | "tiered" | "meters";
4021
4540
  enabled?: boolean;
4022
- page?: number;
4023
- pageSize?: number;
4541
+ accessScope?: "private" | "all_apps";
4024
4542
  }, config?: RequestConfig) => RequestBuilder<any>;
4025
4543
  };
4026
- get: {
4544
+ previewSchema: {
4545
+ /** 由所选计费项生成填价表单结构 */
4027
4546
  post: (body: {
4028
- id: string;
4547
+ businessLineKey: string;
4548
+ serviceKey: string;
4549
+ meterRefs: {
4550
+ businessLineKey: string;
4551
+ serviceKey: string;
4552
+ meterKey: string;
4553
+ }[];
4029
4554
  }, config?: RequestConfig) => RequestBuilder<any>;
4030
4555
  };
4031
4556
  create: {
4032
4557
  post: (body: {
4558
+ businessLineKey: string;
4033
4559
  serviceKey: string;
4034
- chargeMethodKey: string;
4560
+ meterRefs?: {
4561
+ businessLineKey: string;
4562
+ serviceKey: string;
4563
+ meterKey: string;
4564
+ }[];
4035
4565
  name: string;
4036
4566
  currency?: "CNY" | "USD";
4037
4567
  enabled?: boolean;
4038
- pricing: {
4568
+ pricingValues: {
4039
4569
  type: "flat";
4040
4570
  originalPrice: number;
4041
4571
  sellPrice: number;
@@ -4043,7 +4573,7 @@ export interface ApiClient {
4043
4573
  type: "tiered";
4044
4574
  priceStructure: "flat" | "segmented";
4045
4575
  tiers: {
4046
- tierKey?: string;
4576
+ match?: Record<string, string>;
4047
4577
  tierRangeMode?: "at_most" | "at_least" | "between";
4048
4578
  minTokens?: number;
4049
4579
  maxTokens?: number;
@@ -4054,26 +4584,26 @@ export interface ApiClient {
4054
4584
  billingEnabled: boolean;
4055
4585
  }[];
4056
4586
  } | {
4057
- type: "dimensions";
4058
- dimensions: {
4059
- dimensionKey: string;
4060
- unit: string;
4061
- priceStructure?: "flat" | "segmented";
4587
+ type: "meters";
4588
+ meters: {
4589
+ componentKey: string;
4590
+ businessLineKey: string;
4591
+ serviceKey: string;
4592
+ meterKey: string;
4062
4593
  tiers: {
4063
- tierKey?: string;
4594
+ match?: Record<string, string>;
4064
4595
  tierRangeMode?: "at_most" | "at_least" | "between";
4065
4596
  minTokens?: number;
4066
4597
  maxTokens?: number;
4067
4598
  minInclusive?: boolean;
4068
4599
  maxInclusive?: boolean;
4069
- minOutputTokens?: number;
4070
- maxOutputTokens?: number;
4071
4600
  originalFenPerUnit: number;
4072
4601
  sellFenPerUnit: number;
4073
4602
  billingEnabled: boolean;
4074
4603
  }[];
4075
4604
  }[];
4076
4605
  };
4606
+ accessScope?: "private" | "all_apps";
4077
4607
  }, config?: RequestConfig) => RequestBuilder<any>;
4078
4608
  };
4079
4609
  update: {
@@ -4082,7 +4612,12 @@ export interface ApiClient {
4082
4612
  name?: string;
4083
4613
  currency?: "CNY" | "USD";
4084
4614
  enabled?: boolean;
4085
- pricing?: {
4615
+ meterRefs?: {
4616
+ businessLineKey: string;
4617
+ serviceKey: string;
4618
+ meterKey: string;
4619
+ }[];
4620
+ pricingValues?: {
4086
4621
  type: "flat";
4087
4622
  originalPrice: number;
4088
4623
  sellPrice: number;
@@ -4090,7 +4625,7 @@ export interface ApiClient {
4090
4625
  type: "tiered";
4091
4626
  priceStructure: "flat" | "segmented";
4092
4627
  tiers: {
4093
- tierKey?: string;
4628
+ match?: Record<string, string>;
4094
4629
  tierRangeMode?: "at_most" | "at_least" | "between";
4095
4630
  minTokens?: number;
4096
4631
  maxTokens?: number;
@@ -4101,26 +4636,26 @@ export interface ApiClient {
4101
4636
  billingEnabled: boolean;
4102
4637
  }[];
4103
4638
  } | {
4104
- type: "dimensions";
4105
- dimensions: {
4106
- dimensionKey: string;
4107
- unit: string;
4108
- priceStructure?: "flat" | "segmented";
4639
+ type: "meters";
4640
+ meters: {
4641
+ componentKey: string;
4642
+ businessLineKey: string;
4643
+ serviceKey: string;
4644
+ meterKey: string;
4109
4645
  tiers: {
4110
- tierKey?: string;
4646
+ match?: Record<string, string>;
4111
4647
  tierRangeMode?: "at_most" | "at_least" | "between";
4112
4648
  minTokens?: number;
4113
4649
  maxTokens?: number;
4114
4650
  minInclusive?: boolean;
4115
4651
  maxInclusive?: boolean;
4116
- minOutputTokens?: number;
4117
- maxOutputTokens?: number;
4118
4652
  originalFenPerUnit: number;
4119
4653
  sellFenPerUnit: number;
4120
4654
  billingEnabled: boolean;
4121
4655
  }[];
4122
4656
  }[];
4123
4657
  };
4658
+ accessScope?: "private" | "all_apps";
4124
4659
  }, config?: RequestConfig) => RequestBuilder<any>;
4125
4660
  };
4126
4661
  delete: {
@@ -4130,12 +4665,15 @@ export interface ApiClient {
4130
4665
  };
4131
4666
  };
4132
4667
  priceBinding: {
4133
- list: {
4668
+ find: {
4134
4669
  post: (body: {
4135
- subjectType?: "model-profile";
4136
- subjectKey?: string;
4137
- serviceKey?: string;
4138
- enabled?: boolean;
4670
+ where?: {
4671
+ subjectType?: "model-profile";
4672
+ subjectKey?: string;
4673
+ serviceKey?: string;
4674
+ businessLineKey?: string;
4675
+ enabled?: boolean;
4676
+ };
4139
4677
  }, config?: RequestConfig) => RequestBuilder<any>;
4140
4678
  };
4141
4679
  upsert: {
@@ -4152,62 +4690,270 @@ export interface ApiClient {
4152
4690
  }, config?: RequestConfig) => RequestBuilder<any>;
4153
4691
  };
4154
4692
  };
4155
- billingMethodDefinition: {
4156
- list: {
4693
+ businessLine: {
4694
+ find: {
4157
4695
  post: (body: {
4158
- serviceKey?: string;
4696
+ where?: {
4697
+ keyword?: string;
4698
+ enabled?: boolean;
4699
+ accessScope?: "private" | "all_apps";
4700
+ };
4701
+ withStats?: boolean;
4159
4702
  page?: number;
4160
4703
  pageSize?: number;
4161
4704
  }, config?: RequestConfig) => RequestBuilder<any>;
4162
4705
  };
4163
- get: {
4706
+ findOne: {
4707
+ post: (body: {
4708
+ businessLineKey: string;
4709
+ }, config?: RequestConfig) => RequestBuilder<any>;
4710
+ };
4711
+ options: {
4712
+ /** 筛选项、表单 Select 用业务线下拉 */
4713
+ post: (body: {
4714
+ enabled?: boolean;
4715
+ accessScope?: "private" | "all_apps";
4716
+ }, config?: RequestConfig) => RequestBuilder<any>;
4717
+ };
4718
+ create: {
4719
+ post: (body: {
4720
+ businessLineKey: string;
4721
+ label: string;
4722
+ accessScope?: "private" | "all_apps";
4723
+ }, config?: RequestConfig) => RequestBuilder<any>;
4724
+ };
4725
+ update: {
4726
+ post: (body: {
4727
+ businessLineKey: string;
4728
+ label?: string;
4729
+ enabled?: boolean;
4730
+ accessScope?: "private" | "all_apps";
4731
+ }, config?: RequestConfig) => RequestBuilder<any>;
4732
+ };
4733
+ delete: {
4734
+ post: (body: {
4735
+ businessLineKey: string;
4736
+ }, config?: RequestConfig) => RequestBuilder<any>;
4737
+ };
4738
+ };
4739
+ billingProductLine: {
4740
+ find: {
4741
+ post: (body: {
4742
+ where?: {
4743
+ businessLineKey?: string;
4744
+ keyword?: string;
4745
+ enabled?: boolean;
4746
+ accessScope?: "private" | "all_apps";
4747
+ };
4748
+ withStats?: boolean;
4749
+ page?: number;
4750
+ pageSize?: number;
4751
+ }, config?: RequestConfig) => RequestBuilder<any>;
4752
+ };
4753
+ findOne: {
4754
+ post: (body: {
4755
+ productLineId: string;
4756
+ }, config?: RequestConfig) => RequestBuilder<any>;
4757
+ };
4758
+ options: {
4759
+ /** 筛选项、表单 Select 用产品线下拉 */
4760
+ post: (body: {
4761
+ businessLineKey?: string;
4762
+ enabled?: boolean;
4763
+ accessScope?: "private" | "all_apps";
4764
+ }, config?: RequestConfig) => RequestBuilder<any>;
4765
+ };
4766
+ create: {
4767
+ post: (body: {
4768
+ businessLineKey: string;
4769
+ productLineKey: string;
4770
+ label: string;
4771
+ accessScope?: "private" | "all_apps";
4772
+ }, config?: RequestConfig) => RequestBuilder<any>;
4773
+ };
4774
+ update: {
4775
+ post: (body: {
4776
+ productLineId: string;
4777
+ label?: string;
4778
+ enabled?: boolean;
4779
+ accessScope?: "private" | "all_apps";
4780
+ }, config?: RequestConfig) => RequestBuilder<any>;
4781
+ };
4782
+ delete: {
4783
+ post: (body: {
4784
+ productLineId: string;
4785
+ }, config?: RequestConfig) => RequestBuilder<any>;
4786
+ };
4787
+ };
4788
+ billingServiceCatalog: {
4789
+ service: {
4790
+ find: {
4791
+ post: (body: {
4792
+ where?: {
4793
+ businessLineKey?: string;
4794
+ billingProductLineKey?: string;
4795
+ productLine?: string;
4796
+ source?: "builtin" | "custom";
4797
+ serviceKey?: string;
4798
+ keyword?: string;
4799
+ enabled?: boolean;
4800
+ accessScope?: "private" | "all_apps";
4801
+ };
4802
+ page?: number;
4803
+ pageSize?: number;
4804
+ }, config?: RequestConfig) => RequestBuilder<any>;
4805
+ };
4806
+ options: {
4807
+ /** 筛选项、表单 Select 用服务下拉 */
4808
+ post: (body: {
4809
+ businessLineKey?: string;
4810
+ billingProductLineKey?: string;
4811
+ enabled?: boolean;
4812
+ accessScope?: "private" | "all_apps";
4813
+ }, config?: RequestConfig) => RequestBuilder<any>;
4814
+ };
4815
+ create: {
4816
+ post: (body: {
4817
+ businessLineKey: string;
4818
+ billingProductLineKey: string;
4819
+ serviceType: string;
4820
+ name: string;
4821
+ description?: string;
4822
+ dependencies?: {
4823
+ businessLineKey: string;
4824
+ billingProductLineKey: string;
4825
+ serviceKey: string;
4826
+ meterKeys?: string[];
4827
+ required?: boolean;
4828
+ }[];
4829
+ accessScope?: "private" | "all_apps";
4830
+ }, config?: RequestConfig) => RequestBuilder<any>;
4831
+ };
4832
+ update: {
4833
+ post: (body: {
4834
+ businessLineKey: string;
4835
+ serviceKey: string;
4836
+ label?: string;
4837
+ description?: string;
4838
+ billingProductLineKey?: string;
4839
+ dependencies?: {
4840
+ businessLineKey: string;
4841
+ billingProductLineKey: string;
4842
+ serviceKey: string;
4843
+ meterKeys?: string[];
4844
+ required?: boolean;
4845
+ }[];
4846
+ enabled?: boolean;
4847
+ accessScope?: "private" | "all_apps";
4848
+ }, config?: RequestConfig) => RequestBuilder<any>;
4849
+ };
4850
+ delete: {
4851
+ post: (body: {
4852
+ businessLineKey: string;
4853
+ serviceKey: string;
4854
+ }, config?: RequestConfig) => RequestBuilder<any>;
4855
+ };
4856
+ };
4857
+ runtime: {
4858
+ export: {
4859
+ /** 前端运行时缓存:服务 + 价目表 operation */
4860
+ post: (config?: RequestConfig) => RequestBuilder<any>;
4861
+ };
4862
+ };
4863
+ };
4864
+ billingMeter: {
4865
+ find: {
4866
+ post: (body: {
4867
+ where?: {
4868
+ businessLineKey?: string;
4869
+ billingProductLineKey?: string;
4870
+ serviceKey?: string;
4871
+ chargeMode?: "instant" | "settlement";
4872
+ source?: "builtin" | "custom";
4873
+ keyword?: string;
4874
+ enabled?: boolean;
4875
+ accessScope?: "private" | "all_apps";
4876
+ };
4877
+ page?: number;
4878
+ pageSize?: number;
4879
+ }, config?: RequestConfig) => RequestBuilder<any>;
4880
+ };
4881
+ options: {
4164
4882
  post: (body: {
4165
- chargeMethodKey: string;
4883
+ businessLineKey?: string;
4884
+ billingProductLineKey?: string;
4885
+ serviceKey?: string;
4886
+ enabled?: boolean;
4887
+ accessScope?: "private" | "all_apps";
4166
4888
  }, config?: RequestConfig) => RequestBuilder<any>;
4167
4889
  };
4168
4890
  create: {
4169
4891
  post: (body: {
4892
+ businessLineKey: string;
4170
4893
  serviceKey: string;
4171
- chargeMethodKey: string;
4894
+ meterKey: string;
4172
4895
  label: string;
4173
- billingUnit: string;
4174
- chargeKind: "instant" | "settlement";
4175
- settlementPeriod?: "second" | "minute" | "hour" | "day" | "month";
4176
- priceStructure?: "flat" | "segmented";
4177
- tiers?: {
4178
- tierKey?: string;
4179
- tierRangeMode?: "at_most" | "at_least" | "between";
4180
- minTokens?: number;
4181
- maxTokens?: number;
4182
- minInclusive?: boolean;
4183
- maxInclusive?: boolean;
4184
- originalFenPerUnit: number;
4185
- sellFenPerUnit: number;
4186
- billingEnabled: boolean;
4187
- }[];
4896
+ description?: string;
4897
+ chargeMode?: "instant" | "settlement";
4898
+ settlementPeriod?: "hour" | "day" | "month";
4899
+ pricingSchema?: {
4900
+ unitLabel: string;
4901
+ quantityScale?: number;
4902
+ priceStructure?: "flat" | "segmented" | "keyed";
4903
+ matchKeys?: {
4904
+ key: string;
4905
+ label: string;
4906
+ values: {
4907
+ value: string;
4908
+ label: string;
4909
+ }[];
4910
+ }[];
4911
+ tiers: {
4912
+ match?: Record<string, string>;
4913
+ tierRangeMode?: "at_most" | "at_least" | "between";
4914
+ minTokens?: number;
4915
+ maxTokens?: number;
4916
+ minInclusive?: boolean;
4917
+ maxInclusive?: boolean;
4918
+ }[];
4919
+ };
4188
4920
  enabled?: boolean;
4921
+ accessScope?: "private" | "all_apps";
4189
4922
  }, config?: RequestConfig) => RequestBuilder<any>;
4190
4923
  };
4191
4924
  update: {
4192
4925
  post: (body: {
4193
4926
  id: string;
4927
+ businessLineKey?: string;
4928
+ serviceKey?: string;
4929
+ meterKey?: string;
4194
4930
  label?: string;
4195
- billingUnit?: string;
4196
- chargeKind?: "instant" | "settlement";
4197
- settlementPeriod?: "second" | "minute" | "hour" | "day" | "month";
4198
- priceStructure?: "flat" | "segmented";
4199
- tiers?: {
4200
- tierKey?: string;
4201
- tierRangeMode?: "at_most" | "at_least" | "between";
4202
- minTokens?: number;
4203
- maxTokens?: number;
4204
- minInclusive?: boolean;
4205
- maxInclusive?: boolean;
4206
- originalFenPerUnit: number;
4207
- sellFenPerUnit: number;
4208
- billingEnabled: boolean;
4209
- }[];
4931
+ description?: string;
4932
+ chargeMode?: "instant" | "settlement";
4933
+ settlementPeriod?: "hour" | "day" | "month";
4934
+ pricingSchema?: {
4935
+ unitLabel: string;
4936
+ quantityScale?: number;
4937
+ priceStructure?: "flat" | "segmented" | "keyed";
4938
+ matchKeys?: {
4939
+ key: string;
4940
+ label: string;
4941
+ values: {
4942
+ value: string;
4943
+ label: string;
4944
+ }[];
4945
+ }[];
4946
+ tiers: {
4947
+ match?: Record<string, string>;
4948
+ tierRangeMode?: "at_most" | "at_least" | "between";
4949
+ minTokens?: number;
4950
+ maxTokens?: number;
4951
+ minInclusive?: boolean;
4952
+ maxInclusive?: boolean;
4953
+ }[];
4954
+ };
4210
4955
  enabled?: boolean;
4956
+ accessScope?: "private" | "all_apps";
4211
4957
  }, config?: RequestConfig) => RequestBuilder<any>;
4212
4958
  };
4213
4959
  delete: {
@@ -4216,6 +4962,77 @@ export interface ApiClient {
4216
4962
  }, config?: RequestConfig) => RequestBuilder<any>;
4217
4963
  };
4218
4964
  };
4965
+ billingMeterChargeItem: {
4966
+ find: {
4967
+ post: (body: {
4968
+ where?: {
4969
+ keyword?: string;
4970
+ userId?: string;
4971
+ businessLineKey?: string;
4972
+ billingProductLineKey?: string;
4973
+ serviceKey?: string;
4974
+ meterKey?: string;
4975
+ priceListId?: string;
4976
+ pricingType?: "flat" | "tiered" | "meters";
4977
+ resourceId?: string;
4978
+ subjectKey?: string;
4979
+ idempotencyKey?: string;
4980
+ billingUsageRecordId?: string;
4981
+ chargeMode?: "instant" | "settlement";
4982
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
4983
+ startDate?: string;
4984
+ endDate?: string;
4985
+ };
4986
+ page?: number;
4987
+ pageSize?: number;
4988
+ }, config?: RequestConfig) => RequestBuilder<any>;
4989
+ };
4990
+ overview: {
4991
+ post: (body: {
4992
+ where?: {
4993
+ keyword?: string;
4994
+ userId?: string;
4995
+ businessLineKey?: string;
4996
+ billingProductLineKey?: string;
4997
+ serviceKey?: string;
4998
+ meterKey?: string;
4999
+ priceListId?: string;
5000
+ pricingType?: "flat" | "tiered" | "meters";
5001
+ resourceId?: string;
5002
+ subjectKey?: string;
5003
+ idempotencyKey?: string;
5004
+ billingUsageRecordId?: string;
5005
+ chargeMode?: "instant" | "settlement";
5006
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
5007
+ startDate?: string;
5008
+ endDate?: string;
5009
+ };
5010
+ }, config?: RequestConfig) => RequestBuilder<any>;
5011
+ };
5012
+ trend: {
5013
+ post: (body: {
5014
+ where?: {
5015
+ keyword?: string;
5016
+ userId?: string;
5017
+ businessLineKey?: string;
5018
+ billingProductLineKey?: string;
5019
+ serviceKey?: string;
5020
+ meterKey?: string;
5021
+ priceListId?: string;
5022
+ pricingType?: "flat" | "tiered" | "meters";
5023
+ resourceId?: string;
5024
+ subjectKey?: string;
5025
+ idempotencyKey?: string;
5026
+ billingUsageRecordId?: string;
5027
+ chargeMode?: "instant" | "settlement";
5028
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
5029
+ startDate?: string;
5030
+ endDate?: string;
5031
+ };
5032
+ limit?: number;
5033
+ }, config?: RequestConfig) => RequestBuilder<any>;
5034
+ };
5035
+ };
4219
5036
  export: {
4220
5037
  recharge: {
4221
5038
  /** 导出充值订单记录为 CSV 格式 */
@@ -4282,7 +5099,7 @@ export interface ApiClient {
4282
5099
  date: string;
4283
5100
  }, config?: RequestConfig) => RequestBuilder<any>;
4284
5101
  };
4285
- list: {
5102
+ find: {
4286
5103
  /** 查询对账报告列表 */
4287
5104
  post: (body: {
4288
5105
  page?: number;
@@ -4292,7 +5109,7 @@ export interface ApiClient {
4292
5109
  endDate?: string;
4293
5110
  }, config?: RequestConfig) => RequestBuilder<any>;
4294
5111
  };
4295
- detail: {
5112
+ findOne: {
4296
5113
  /** 查询对账报告详情 */
4297
5114
  post: (body: {
4298
5115
  id: string;
@@ -4334,7 +5151,7 @@ export interface ApiClient {
4334
5151
  remark?: string;
4335
5152
  }, config?: RequestConfig) => RequestBuilder<any>;
4336
5153
  };
4337
- list: {
5154
+ find: {
4338
5155
  /** 查询发票申请列表 */
4339
5156
  post: (body: {
4340
5157
  page?: number;
@@ -4345,7 +5162,7 @@ export interface ApiClient {
4345
5162
  endDate?: string;
4346
5163
  }, config?: RequestConfig) => RequestBuilder<any>;
4347
5164
  };
4348
- detail: {
5165
+ findOne: {
4349
5166
  /** 查询发票详情 */
4350
5167
  post: (body: {
4351
5168
  invoiceNo: string;
@@ -4443,8 +5260,9 @@ export interface ApiClient {
4443
5260
  post: (body: {
4444
5261
  appId: string;
4445
5262
  userId: string;
5263
+ businessLineKey: string;
4446
5264
  serviceKey: string;
4447
- chargeMethodKey: string;
5265
+ priceListId: string;
4448
5266
  amount: number;
4449
5267
  freeQuotaOverride?: number;
4450
5268
  }, config?: RequestConfig) => RequestBuilder<any>;
@@ -4456,8 +5274,9 @@ export interface ApiClient {
4456
5274
  items: {
4457
5275
  key: string;
4458
5276
  userId: string;
5277
+ businessLineKey: string;
4459
5278
  serviceKey: string;
4460
- chargeMethodKey: string;
5279
+ priceListId?: string;
4461
5280
  amount: number;
4462
5281
  freeQuotaOverride?: number;
4463
5282
  }[];
@@ -4468,8 +5287,9 @@ export interface ApiClient {
4468
5287
  post: (body: {
4469
5288
  appId: string;
4470
5289
  userId: string;
5290
+ businessLineKey: string;
4471
5291
  serviceKey: string;
4472
- chargeMethodKey: string;
5292
+ priceListId?: string;
4473
5293
  amount: number;
4474
5294
  metadata?: Record<string, unknown>;
4475
5295
  idempotencyKey?: string;
@@ -4480,6 +5300,14 @@ export interface ApiClient {
4480
5300
  freeQuotaOverride?: number;
4481
5301
  }, config?: RequestConfig) => RequestBuilder<any>;
4482
5302
  };
5303
+ 'last-charged-period-ends': {
5304
+ /** 按 resourceId 批量查询已成功结算的最大 periodEnd */
5305
+ post: (body: {
5306
+ appId: string;
5307
+ serviceKey: string;
5308
+ resourceIds: string[];
5309
+ }, config?: RequestConfig) => RequestBuilder<any>;
5310
+ };
4483
5311
  reversal: {
4484
5312
  /** 供内部服务冲正已上报的服务用量并退还积分 */
4485
5313
  post: (body: {
@@ -4490,20 +5318,40 @@ export interface ApiClient {
4490
5318
  reversalIdempotencyKey?: string;
4491
5319
  }, config?: RequestConfig) => RequestBuilder<any>;
4492
5320
  };
5321
+ 'preview-meter-charge': {
5322
+ /** 供 ai-server 等根据价目表与 meter 用量计算积分 */
5323
+ post: (body: {
5324
+ appId: string;
5325
+ businessLineKey: string;
5326
+ serviceKey: string;
5327
+ priceListId?: string;
5328
+ meterUsage: Record<string, number>;
5329
+ meterMatchContext?: Record<string, Record<string, string>>;
5330
+ meterTierMatchUsage?: Record<string, number>;
5331
+ exchangeRate?: number;
5332
+ }, config?: RequestConfig) => RequestBuilder<any>;
5333
+ };
4493
5334
  'record-ai': {
4494
- /** 供 ai-server 计价后写入统一用量账本并扣积分 */
5335
+ /** 供 ai-server 传入 meter 用量,由计费引擎算价并扣积分 */
4495
5336
  post: (body: {
4496
5337
  appId: string;
4497
5338
  userId: string;
5339
+ businessLineKey: string;
4498
5340
  idempotencyKey: string;
4499
5341
  serviceKey: string;
4500
- chargeMethodKey: string;
5342
+ priceListId: string;
4501
5343
  resourceId?: string;
4502
5344
  subjectKey: string;
5345
+ sourceService?: string;
5346
+ sourceType?: string;
5347
+ sourceId?: string;
4503
5348
  labels?: Record<string, string>;
4504
- pointsConsumed: number;
4505
- quantity?: number;
4506
- unit?: string;
5349
+ quantity: number;
5350
+ unit: string;
5351
+ meterUsage: Record<string, number>;
5352
+ meterMatchContext?: Record<string, Record<string, string>>;
5353
+ meterTierMatchUsage?: Record<string, number>;
5354
+ exchangeRate?: number;
4507
5355
  snapshot?: {
4508
5356
  priceListId?: string;
4509
5357
  usage?: Record<string, number>;
@@ -4511,16 +5359,15 @@ export interface ApiClient {
4511
5359
  };
4512
5360
  }, config?: RequestConfig) => RequestBuilder<any>;
4513
5361
  };
4514
- list: {
5362
+ find: {
4515
5363
  /** 供 ai-server 等内部服务查询 billingUsageRecord */
4516
5364
  post: (body: {
4517
5365
  appId: string;
4518
5366
  userId?: string;
4519
5367
  serviceGroup?: "ai" | "platform" | "storage";
4520
5368
  serviceGroups?: "ai" | "platform" | "storage"[];
4521
- referenceId?: string;
5369
+ resourceId?: string;
4522
5370
  serviceKey?: string;
4523
- chargeMethodKey?: string;
4524
5371
  model?: string;
4525
5372
  subjectKeys?: string[];
4526
5373
  id?: string;
@@ -4542,15 +5389,26 @@ export interface ApiClient {
4542
5389
  timezone?: string;
4543
5390
  }, config?: RequestConfig) => RequestBuilder<any>;
4544
5391
  };
4545
- 'by-reference': {
4546
- /** 按 referenceId 联合查询用量与积分流水 */
5392
+ 'by-resource': {
5393
+ /** 按 resourceId 联合查询用量与积分流水 */
4547
5394
  post: (body: {
4548
5395
  appId: string;
4549
- referenceId: string;
5396
+ resourceId: string;
4550
5397
  serviceKey?: string;
4551
5398
  }, config?: RequestConfig) => RequestBuilder<any>;
4552
5399
  };
4553
5400
  };
5401
+ billing: {
5402
+ 'settlement-config': {
5403
+ /** 按 app + service 返回 meter 结算周期与价目表 */
5404
+ post: (body: {
5405
+ appId: string;
5406
+ businessLineKey: string;
5407
+ serviceKey: string;
5408
+ priceListId?: string;
5409
+ }, config?: RequestConfig) => RequestBuilder<any>;
5410
+ };
5411
+ };
4554
5412
  pricing: {
4555
5413
  'resolve-model': {
4556
5414
  /** 供 ai-server 运行时读取模型定价 */
@@ -4568,6 +5426,7 @@ export interface ApiClient {
4568
5426
  operatorId: string;
4569
5427
  supplierId: string;
4570
5428
  profileId: string;
5429
+ profileName?: string;
4571
5430
  productLine: string;
4572
5431
  currency: "CNY" | "USD";
4573
5432
  plans: unknown[];
@@ -4590,6 +5449,17 @@ export interface ApiClient {
4590
5449
  'list-model-pricing-map': {
4591
5450
  post: (body: {
4592
5451
  appId: string;
5452
+ subjectKeys?: string[];
5453
+ }, config?: RequestConfig) => RequestBuilder<any>;
5454
+ };
5455
+ };
5456
+ billingCatalog: {
5457
+ list: {
5458
+ /** 服务 + 价目表 operation 列表(供 ai-server 等内部服务) */
5459
+ post: (body: {
5460
+ appId: string;
5461
+ billingProductLineKey?: "ai" | "storage" | "platform";
5462
+ group?: "ai" | "storage" | "platform";
4593
5463
  }, config?: RequestConfig) => RequestBuilder<any>;
4594
5464
  };
4595
5465
  };