@laplace.live/internal 1.2.57 → 1.3.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.
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@laplace.live/internal",
3
- "version": "1.2.57",
4
- "module": "index.d.ts",
3
+ "version": "1.3.0",
4
+ "module": "src/index.d.ts",
5
+ "exports": {
6
+ ".": "./src/index.d.ts",
7
+ "./*": "./src/const/*.ts"
8
+ },
5
9
  "devDependencies": {
6
10
  "@types/bun": "latest"
7
11
  },
package/src/aicu.d.ts ADDED
@@ -0,0 +1,120 @@
1
+ /**
2
+ * aicu.cc API
3
+ */
4
+ export declare namespace Aicu {
5
+ /**
6
+ * Root API response
7
+ *
8
+ * @example
9
+ * {
10
+ * code: 0,
11
+ * data: { ... },
12
+ * message: "",
13
+ * ttl: 1
14
+ * }
15
+ * @link https://api.aicu.cc/api/v3/search/getlivedm?uid=32210417&pn=1&ps=100&keyword=
16
+ */
17
+ export interface LiveDm {
18
+ /** Status code, 0 indicates success */
19
+ code: number
20
+
21
+ /** Main payload */
22
+ data: {
23
+ /**
24
+ * List of room + danmu records
25
+ *
26
+ * @example
27
+ * [
28
+ * {
29
+ * roominfo: { ... },
30
+ * danmu: [ ... ]
31
+ * }
32
+ * ]
33
+ */
34
+ list: {
35
+ /**
36
+ * Room metadata
37
+ *
38
+ * @example
39
+ * {
40
+ * upname: "五条悟跳舞",
41
+ * upuid: "32210417",
42
+ * roomid: "2156755",
43
+ * roomname: "让俺移动端看看怎么个事儿"
44
+ * }
45
+ */
46
+ roominfo: {
47
+ /** Streamer display name */
48
+ upname: string
49
+
50
+ /** Streamer UID (stringified number) */
51
+ upuid: string
52
+
53
+ /** Room ID (stringified number) */
54
+ roomid: string
55
+
56
+ /** Room title */
57
+ roomname: string
58
+ }
59
+
60
+ /**
61
+ * Danmu (chat messages) sent in this room
62
+ *
63
+ * @example
64
+ * [
65
+ * { uname: "五条悟跳舞", text: "666", ts: 1766410063 }
66
+ * ]
67
+ */
68
+ danmu: {
69
+ /** Username of the sender */
70
+ uname: string
71
+
72
+ /**
73
+ * Message content
74
+ * Can be plain text or emoticon codes like "[Icomochi_萌萌]"
75
+ */
76
+ text: string
77
+
78
+ /**
79
+ * Unix timestamp (seconds)
80
+ *
81
+ * @example
82
+ * 1767347950
83
+ */
84
+ ts: number
85
+ }[]
86
+ }[]
87
+
88
+ /**
89
+ * Pagination cursor info
90
+ *
91
+ * @example
92
+ * {
93
+ * is_end: false,
94
+ * all_count: 180
95
+ * }
96
+ */
97
+ cursor: {
98
+ /**
99
+ * Whether this is the last page
100
+ *
101
+ * @example false
102
+ */
103
+ is_end: boolean
104
+
105
+ /**
106
+ * Total available records
107
+ *
108
+ * @example 180
109
+ */
110
+ all_count: number
111
+ }
112
+ }
113
+
114
+ /** Optional message, usually empty on success */
115
+ message: string
116
+
117
+ /** Cache TTL in seconds */
118
+ ttl: number
119
+ }
120
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Aliyun API
3
+ */
4
+ export declare namespace Aliyun {
5
+ /**
6
+ * 物流面单信息提取
7
+ * @url https://help.aliyun.com/zh/address-purification/addrpapi/developer-reference/logistics-information-extraction
8
+ */
9
+ export interface ExtractExpress {
10
+ RequestId: string
11
+ /** 正常时返回 */
12
+ Data?: string
13
+ /** 报错时返回 */
14
+ Code?: string
15
+ /** 报错时返回 */
16
+ Message?: string
17
+ /** 报错时返回 */
18
+ HostId?: string
19
+ /** 报错时返回 */
20
+ Recommend?: string
21
+ }
22
+
23
+ /**
24
+ * Need JSON.parse() to get from `ExtractExpress.Data`
25
+ */
26
+ export interface ExtractExpressData {
27
+ /** 提取内容,当传入的地址无效时,会直接返回空对象 */
28
+ express_extract:
29
+ | {
30
+ house_info: string
31
+ poi_info: string
32
+ town: string
33
+ city: string
34
+ district: string
35
+ /** 电话号码 */
36
+ tel: string
37
+ /** 地址信息 */
38
+ addr_info: string
39
+ /** 姓名 */
40
+ per: string
41
+ prov: string
42
+ }
43
+ // biome-ignore lint/complexity/noBannedTypes: expected empty object
44
+ | {}
45
+ /** 状态,'OK',当传入的地址无效时,依然返回 OK 😅 */
46
+ status: string
47
+ /** 算法处理耗时 */
48
+ time_used: {
49
+ rt: {
50
+ basic_chunking: number
51
+ segment: number
52
+ address_correct: number
53
+ complete: number
54
+ express_extract: number
55
+ address_search: number
56
+ structure: number
57
+ }
58
+ start: number
59
+ }
60
+ }
61
+ }