@kodelyth/line 2026.5.42 → 2026.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/klaw.plugin.json +329 -2
- package/package.json +16 -4
- package/api.ts +0 -11
- package/channel-plugin-api.ts +0 -1
- package/contract-api.ts +0 -5
- package/index.ts +0 -53
- package/runtime-api.ts +0 -179
- package/secret-contract-api.ts +0 -4
- package/setup-api.ts +0 -2
- package/setup-entry.ts +0 -9
- package/src/account-helpers.ts +0 -16
- package/src/accounts.test.ts +0 -288
- package/src/accounts.ts +0 -187
- package/src/actions.ts +0 -61
- package/src/auto-reply-delivery.test.ts +0 -253
- package/src/auto-reply-delivery.ts +0 -200
- package/src/bindings.ts +0 -65
- package/src/bot-access.ts +0 -30
- package/src/bot-handlers.test.ts +0 -1094
- package/src/bot-handlers.ts +0 -620
- package/src/bot-message-context.test.ts +0 -420
- package/src/bot-message-context.ts +0 -586
- package/src/bot.ts +0 -66
- package/src/card-command.ts +0 -347
- package/src/channel-access-token.ts +0 -14
- package/src/channel-api.ts +0 -17
- package/src/channel-setup-status.contract.test.ts +0 -70
- package/src/channel-shared.ts +0 -48
- package/src/channel.logout.test.ts +0 -145
- package/src/channel.runtime.ts +0 -3
- package/src/channel.sendPayload.test.ts +0 -659
- package/src/channel.setup.ts +0 -11
- package/src/channel.status.test.ts +0 -63
- package/src/channel.ts +0 -155
- package/src/config-adapter.ts +0 -29
- package/src/config-schema.test.ts +0 -53
- package/src/config-schema.ts +0 -81
- package/src/download.test.ts +0 -164
- package/src/download.ts +0 -34
- package/src/flex-templates/basic-cards.ts +0 -395
- package/src/flex-templates/common.ts +0 -20
- package/src/flex-templates/media-control-cards.ts +0 -555
- package/src/flex-templates/message.ts +0 -13
- package/src/flex-templates/schedule-cards.ts +0 -467
- package/src/flex-templates/types.ts +0 -22
- package/src/flex-templates.ts +0 -32
- package/src/gateway.ts +0 -129
- package/src/group-keys.test.ts +0 -123
- package/src/group-keys.ts +0 -65
- package/src/group-policy.ts +0 -22
- package/src/markdown-to-line.test.ts +0 -348
- package/src/markdown-to-line.ts +0 -416
- package/src/message-cards.test.ts +0 -204
- package/src/monitor-durable.test.ts +0 -57
- package/src/monitor-durable.ts +0 -37
- package/src/monitor.lifecycle.test.ts +0 -499
- package/src/monitor.runtime.ts +0 -1
- package/src/monitor.ts +0 -507
- package/src/outbound-media.test.ts +0 -194
- package/src/outbound-media.ts +0 -120
- package/src/outbound.runtime.ts +0 -12
- package/src/outbound.ts +0 -427
- package/src/probe.contract.test.ts +0 -9
- package/src/probe.runtime.ts +0 -1
- package/src/probe.ts +0 -34
- package/src/quick-reply-fallback.ts +0 -10
- package/src/reply-chunks.test.ts +0 -180
- package/src/reply-chunks.ts +0 -110
- package/src/reply-payload-transform.test.ts +0 -392
- package/src/reply-payload-transform.ts +0 -317
- package/src/rich-menu.test.ts +0 -315
- package/src/rich-menu.ts +0 -326
- package/src/runtime.ts +0 -32
- package/src/send-receipt.ts +0 -32
- package/src/send.test.ts +0 -453
- package/src/send.ts +0 -531
- package/src/setup-core.ts +0 -149
- package/src/setup-runtime-api.ts +0 -9
- package/src/setup-surface.test.ts +0 -481
- package/src/setup-surface.ts +0 -229
- package/src/signature.test.ts +0 -34
- package/src/signature.ts +0 -24
- package/src/status.ts +0 -37
- package/src/template-messages.ts +0 -333
- package/src/types.ts +0 -130
- package/src/webhook-node.test.ts +0 -598
- package/src/webhook-node.ts +0 -155
- package/src/webhook-utils.ts +0 -10
- package/src/webhook.ts +0 -135
- package/tsconfig.json +0 -16
package/klaw.plugin.json
CHANGED
|
@@ -3,13 +3,340 @@
|
|
|
3
3
|
"activation": {
|
|
4
4
|
"onStartup": false
|
|
5
5
|
},
|
|
6
|
-
"channels": [
|
|
6
|
+
"channels": [
|
|
7
|
+
"line"
|
|
8
|
+
],
|
|
7
9
|
"channelEnvVars": {
|
|
8
|
-
"line": [
|
|
10
|
+
"line": [
|
|
11
|
+
"LINE_CHANNEL_ACCESS_TOKEN",
|
|
12
|
+
"LINE_CHANNEL_SECRET"
|
|
13
|
+
]
|
|
9
14
|
},
|
|
10
15
|
"configSchema": {
|
|
11
16
|
"type": "object",
|
|
12
17
|
"additionalProperties": false,
|
|
13
18
|
"properties": {}
|
|
19
|
+
},
|
|
20
|
+
"channelConfigs": {
|
|
21
|
+
"line": {
|
|
22
|
+
"schema": {
|
|
23
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"enabled": {
|
|
27
|
+
"type": "boolean"
|
|
28
|
+
},
|
|
29
|
+
"channelAccessToken": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"channelSecret": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"tokenFile": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"secretFile": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"name": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"allowFrom": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"anyOf": [
|
|
48
|
+
{
|
|
49
|
+
"type": "string"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "number"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"groupAllowFrom": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"anyOf": [
|
|
61
|
+
{
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "number"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"dmPolicy": {
|
|
71
|
+
"default": "pairing",
|
|
72
|
+
"type": "string",
|
|
73
|
+
"enum": [
|
|
74
|
+
"open",
|
|
75
|
+
"allowlist",
|
|
76
|
+
"pairing",
|
|
77
|
+
"disabled"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"groupPolicy": {
|
|
81
|
+
"default": "allowlist",
|
|
82
|
+
"type": "string",
|
|
83
|
+
"enum": [
|
|
84
|
+
"open",
|
|
85
|
+
"allowlist",
|
|
86
|
+
"disabled"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"responsePrefix": {
|
|
90
|
+
"type": "string"
|
|
91
|
+
},
|
|
92
|
+
"mediaMaxMb": {
|
|
93
|
+
"type": "number"
|
|
94
|
+
},
|
|
95
|
+
"webhookPath": {
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
98
|
+
"threadBindings": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"enabled": {
|
|
102
|
+
"type": "boolean"
|
|
103
|
+
},
|
|
104
|
+
"idleHours": {
|
|
105
|
+
"type": "number"
|
|
106
|
+
},
|
|
107
|
+
"maxAgeHours": {
|
|
108
|
+
"type": "number"
|
|
109
|
+
},
|
|
110
|
+
"spawnSessions": {
|
|
111
|
+
"type": "boolean"
|
|
112
|
+
},
|
|
113
|
+
"defaultSpawnContext": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"enum": [
|
|
116
|
+
"isolated",
|
|
117
|
+
"fork"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"spawnSubagentSessions": {
|
|
121
|
+
"type": "boolean"
|
|
122
|
+
},
|
|
123
|
+
"spawnAcpSessions": {
|
|
124
|
+
"type": "boolean"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"additionalProperties": false
|
|
128
|
+
},
|
|
129
|
+
"accounts": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"propertyNames": {
|
|
132
|
+
"type": "string"
|
|
133
|
+
},
|
|
134
|
+
"additionalProperties": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"properties": {
|
|
137
|
+
"enabled": {
|
|
138
|
+
"type": "boolean"
|
|
139
|
+
},
|
|
140
|
+
"channelAccessToken": {
|
|
141
|
+
"type": "string"
|
|
142
|
+
},
|
|
143
|
+
"channelSecret": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
"tokenFile": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"secretFile": {
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
"name": {
|
|
153
|
+
"type": "string"
|
|
154
|
+
},
|
|
155
|
+
"allowFrom": {
|
|
156
|
+
"type": "array",
|
|
157
|
+
"items": {
|
|
158
|
+
"anyOf": [
|
|
159
|
+
{
|
|
160
|
+
"type": "string"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"type": "number"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"groupAllowFrom": {
|
|
169
|
+
"type": "array",
|
|
170
|
+
"items": {
|
|
171
|
+
"anyOf": [
|
|
172
|
+
{
|
|
173
|
+
"type": "string"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"type": "number"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"dmPolicy": {
|
|
182
|
+
"default": "pairing",
|
|
183
|
+
"type": "string",
|
|
184
|
+
"enum": [
|
|
185
|
+
"open",
|
|
186
|
+
"allowlist",
|
|
187
|
+
"pairing",
|
|
188
|
+
"disabled"
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"groupPolicy": {
|
|
192
|
+
"default": "allowlist",
|
|
193
|
+
"type": "string",
|
|
194
|
+
"enum": [
|
|
195
|
+
"open",
|
|
196
|
+
"allowlist",
|
|
197
|
+
"disabled"
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
"responsePrefix": {
|
|
201
|
+
"type": "string"
|
|
202
|
+
},
|
|
203
|
+
"mediaMaxMb": {
|
|
204
|
+
"type": "number"
|
|
205
|
+
},
|
|
206
|
+
"webhookPath": {
|
|
207
|
+
"type": "string"
|
|
208
|
+
},
|
|
209
|
+
"threadBindings": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"properties": {
|
|
212
|
+
"enabled": {
|
|
213
|
+
"type": "boolean"
|
|
214
|
+
},
|
|
215
|
+
"idleHours": {
|
|
216
|
+
"type": "number"
|
|
217
|
+
},
|
|
218
|
+
"maxAgeHours": {
|
|
219
|
+
"type": "number"
|
|
220
|
+
},
|
|
221
|
+
"spawnSessions": {
|
|
222
|
+
"type": "boolean"
|
|
223
|
+
},
|
|
224
|
+
"defaultSpawnContext": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"enum": [
|
|
227
|
+
"isolated",
|
|
228
|
+
"fork"
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
"spawnSubagentSessions": {
|
|
232
|
+
"type": "boolean"
|
|
233
|
+
},
|
|
234
|
+
"spawnAcpSessions": {
|
|
235
|
+
"type": "boolean"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"additionalProperties": false
|
|
239
|
+
},
|
|
240
|
+
"groups": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"propertyNames": {
|
|
243
|
+
"type": "string"
|
|
244
|
+
},
|
|
245
|
+
"additionalProperties": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"properties": {
|
|
248
|
+
"enabled": {
|
|
249
|
+
"type": "boolean"
|
|
250
|
+
},
|
|
251
|
+
"allowFrom": {
|
|
252
|
+
"type": "array",
|
|
253
|
+
"items": {
|
|
254
|
+
"anyOf": [
|
|
255
|
+
{
|
|
256
|
+
"type": "string"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"type": "number"
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"requireMention": {
|
|
265
|
+
"type": "boolean"
|
|
266
|
+
},
|
|
267
|
+
"systemPrompt": {
|
|
268
|
+
"type": "string"
|
|
269
|
+
},
|
|
270
|
+
"skills": {
|
|
271
|
+
"type": "array",
|
|
272
|
+
"items": {
|
|
273
|
+
"type": "string"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"additionalProperties": false
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"required": [
|
|
282
|
+
"dmPolicy",
|
|
283
|
+
"groupPolicy"
|
|
284
|
+
],
|
|
285
|
+
"additionalProperties": false
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"defaultAccount": {
|
|
289
|
+
"type": "string"
|
|
290
|
+
},
|
|
291
|
+
"groups": {
|
|
292
|
+
"type": "object",
|
|
293
|
+
"propertyNames": {
|
|
294
|
+
"type": "string"
|
|
295
|
+
},
|
|
296
|
+
"additionalProperties": {
|
|
297
|
+
"type": "object",
|
|
298
|
+
"properties": {
|
|
299
|
+
"enabled": {
|
|
300
|
+
"type": "boolean"
|
|
301
|
+
},
|
|
302
|
+
"allowFrom": {
|
|
303
|
+
"type": "array",
|
|
304
|
+
"items": {
|
|
305
|
+
"anyOf": [
|
|
306
|
+
{
|
|
307
|
+
"type": "string"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"type": "number"
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"requireMention": {
|
|
316
|
+
"type": "boolean"
|
|
317
|
+
},
|
|
318
|
+
"systemPrompt": {
|
|
319
|
+
"type": "string"
|
|
320
|
+
},
|
|
321
|
+
"skills": {
|
|
322
|
+
"type": "array",
|
|
323
|
+
"items": {
|
|
324
|
+
"type": "string"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"additionalProperties": false
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"required": [
|
|
333
|
+
"dmPolicy",
|
|
334
|
+
"groupPolicy"
|
|
335
|
+
],
|
|
336
|
+
"additionalProperties": false
|
|
337
|
+
},
|
|
338
|
+
"label": "LINE",
|
|
339
|
+
"description": "LINE Messaging API webhook bot."
|
|
340
|
+
}
|
|
14
341
|
}
|
|
15
342
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kodelyth/line",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.6.1",
|
|
4
4
|
"description": "Klaw LINE channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,11 +16,15 @@
|
|
|
16
16
|
"@kodelyth/klaw": "2026.5.42"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@kodelyth/klaw": ">=2026.5.19"
|
|
19
|
+
"@kodelyth/klaw": ">=2026.5.19",
|
|
20
|
+
"klaw": ">=2026.5.39"
|
|
20
21
|
},
|
|
21
22
|
"peerDependenciesMeta": {
|
|
22
23
|
"@kodelyth/klaw": {
|
|
23
24
|
"optional": true
|
|
25
|
+
},
|
|
26
|
+
"klaw": {
|
|
27
|
+
"optional": true
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
"klaw": {
|
|
@@ -54,6 +58,14 @@
|
|
|
54
58
|
"release": {
|
|
55
59
|
"publishToClawHub": true,
|
|
56
60
|
"publishToNpm": true
|
|
57
|
-
}
|
|
58
|
-
|
|
61
|
+
},
|
|
62
|
+
"runtimeExtensions": [
|
|
63
|
+
"./dist/index.js"
|
|
64
|
+
],
|
|
65
|
+
"runtimeSetupEntry": "./dist/setup-entry.js"
|
|
66
|
+
},
|
|
67
|
+
"files": [
|
|
68
|
+
"dist/**",
|
|
69
|
+
"klaw.plugin.json"
|
|
70
|
+
]
|
|
59
71
|
}
|
package/api.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
ChannelAccountSnapshot,
|
|
3
|
-
ChannelPlugin,
|
|
4
|
-
KlawConfig,
|
|
5
|
-
KlawPluginApi,
|
|
6
|
-
PluginRuntime,
|
|
7
|
-
} from "klaw/plugin-sdk/core";
|
|
8
|
-
export type { ReplyPayload } from "klaw/plugin-sdk/reply-runtime";
|
|
9
|
-
export type { ResolvedLineAccount } from "./runtime-api.js";
|
|
10
|
-
export { linePlugin } from "./src/channel.js";
|
|
11
|
-
export { lineSetupPlugin } from "./src/channel.setup.js";
|
package/channel-plugin-api.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { linePlugin } from "./src/channel.js";
|
package/contract-api.ts
DELETED
package/index.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defineBundledChannelEntry,
|
|
3
|
-
type KlawPluginApi,
|
|
4
|
-
} from "klaw/plugin-sdk/channel-entry-contract";
|
|
5
|
-
|
|
6
|
-
type RegisteredLineCardCommand = Parameters<KlawPluginApi["registerCommand"]>[0];
|
|
7
|
-
|
|
8
|
-
let lineCardCommandPromise: Promise<RegisteredLineCardCommand> | null = null;
|
|
9
|
-
|
|
10
|
-
async function loadLineCardCommand(api: KlawPluginApi): Promise<RegisteredLineCardCommand> {
|
|
11
|
-
lineCardCommandPromise ??= (async () => {
|
|
12
|
-
let registered: RegisteredLineCardCommand | null = null;
|
|
13
|
-
const { registerLineCardCommand } = await import("./src/card-command.js");
|
|
14
|
-
registerLineCardCommand({
|
|
15
|
-
...api,
|
|
16
|
-
registerCommand(command: RegisteredLineCardCommand) {
|
|
17
|
-
registered = command;
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
if (!registered) {
|
|
21
|
-
throw new Error("LINE card command registration unavailable");
|
|
22
|
-
}
|
|
23
|
-
return registered;
|
|
24
|
-
})();
|
|
25
|
-
return await lineCardCommandPromise;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default defineBundledChannelEntry({
|
|
29
|
-
id: "line",
|
|
30
|
-
name: "LINE",
|
|
31
|
-
description: "LINE Messaging API channel plugin",
|
|
32
|
-
importMetaUrl: import.meta.url,
|
|
33
|
-
plugin: {
|
|
34
|
-
specifier: "./channel-plugin-api.js",
|
|
35
|
-
exportName: "linePlugin",
|
|
36
|
-
},
|
|
37
|
-
runtime: {
|
|
38
|
-
specifier: "./runtime-api.js",
|
|
39
|
-
exportName: "setLineRuntime",
|
|
40
|
-
},
|
|
41
|
-
registerFull(api) {
|
|
42
|
-
api.registerCommand({
|
|
43
|
-
name: "card",
|
|
44
|
-
description: "Send a rich card message (LINE).",
|
|
45
|
-
acceptsArgs: true,
|
|
46
|
-
requireAuth: false,
|
|
47
|
-
async handler(ctx) {
|
|
48
|
-
const command = await loadLineCardCommand(api);
|
|
49
|
-
return await command.handler(ctx);
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
},
|
|
53
|
-
});
|
package/runtime-api.ts
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
// Private runtime barrel for the bundled LINE extension.
|
|
2
|
-
// Keep this barrel thin and aligned with the local extension surface.
|
|
3
|
-
|
|
4
|
-
export type {
|
|
5
|
-
ChannelAccountSnapshot,
|
|
6
|
-
ChannelPlugin,
|
|
7
|
-
KlawConfig,
|
|
8
|
-
KlawPluginApi,
|
|
9
|
-
PluginRuntime,
|
|
10
|
-
} from "klaw/plugin-sdk/core";
|
|
11
|
-
export type { ChannelGatewayContext, ChannelStatusIssue } from "klaw/plugin-sdk/channel-contract";
|
|
12
|
-
export { clearAccountEntryFields } from "klaw/plugin-sdk/core";
|
|
13
|
-
export { buildChannelConfigSchema } from "klaw/plugin-sdk/channel-config-schema";
|
|
14
|
-
export type { ReplyPayload } from "klaw/plugin-sdk/reply-runtime";
|
|
15
|
-
export type { ChannelSetupDmPolicy, ChannelSetupWizard } from "klaw/plugin-sdk/setup";
|
|
16
|
-
export {
|
|
17
|
-
buildComputedAccountStatusSnapshot,
|
|
18
|
-
buildTokenChannelStatusSummary,
|
|
19
|
-
} from "klaw/plugin-sdk/status-helpers";
|
|
20
|
-
export {
|
|
21
|
-
DEFAULT_ACCOUNT_ID,
|
|
22
|
-
formatDocsLink,
|
|
23
|
-
setSetupChannelEnabled,
|
|
24
|
-
splitSetupEntries,
|
|
25
|
-
} from "klaw/plugin-sdk/setup";
|
|
26
|
-
export { setLineRuntime } from "./src/runtime.js";
|
|
27
|
-
export { firstDefined, normalizeAllowFrom } from "./src/bot-access.js";
|
|
28
|
-
export { downloadLineMedia } from "./src/download.js";
|
|
29
|
-
export { probeLineBot } from "./src/probe.js";
|
|
30
|
-
export { buildTemplateMessageFromPayload } from "./src/template-messages.js";
|
|
31
|
-
export {
|
|
32
|
-
createQuickReplyItems,
|
|
33
|
-
pushFlexMessage,
|
|
34
|
-
pushLocationMessage,
|
|
35
|
-
pushMessageLine,
|
|
36
|
-
pushMessagesLine,
|
|
37
|
-
pushTemplateMessage,
|
|
38
|
-
pushTextMessageWithQuickReplies,
|
|
39
|
-
sendMessageLine,
|
|
40
|
-
} from "./src/send.js";
|
|
41
|
-
export { monitorLineProvider } from "./src/monitor.js";
|
|
42
|
-
export { hasLineDirectives, parseLineDirectives } from "./src/reply-payload-transform.js";
|
|
43
|
-
export {
|
|
44
|
-
listLineAccountIds,
|
|
45
|
-
normalizeAccountId,
|
|
46
|
-
resolveDefaultLineAccountId,
|
|
47
|
-
resolveLineAccount,
|
|
48
|
-
} from "./src/accounts.js";
|
|
49
|
-
export { type NormalizedAllowFrom } from "./src/bot-access.js";
|
|
50
|
-
export { resolveLineChannelAccessToken } from "./src/channel-access-token.js";
|
|
51
|
-
export {
|
|
52
|
-
LineChannelConfigSchema,
|
|
53
|
-
LineConfigSchema,
|
|
54
|
-
type LineConfigSchemaType,
|
|
55
|
-
} from "./src/config-schema.js";
|
|
56
|
-
export {
|
|
57
|
-
resolveExactLineGroupConfigKey,
|
|
58
|
-
resolveLineGroupConfigEntry,
|
|
59
|
-
resolveLineGroupLookupIds,
|
|
60
|
-
resolveLineGroupsConfig,
|
|
61
|
-
} from "./src/group-keys.js";
|
|
62
|
-
export {
|
|
63
|
-
type CodeBlock,
|
|
64
|
-
convertCodeBlockToFlexBubble,
|
|
65
|
-
convertLinksToFlexBubble,
|
|
66
|
-
convertTableToFlexBubble,
|
|
67
|
-
extractCodeBlocks,
|
|
68
|
-
extractLinks,
|
|
69
|
-
extractMarkdownTables,
|
|
70
|
-
hasMarkdownToConvert,
|
|
71
|
-
type MarkdownLink,
|
|
72
|
-
type MarkdownTable,
|
|
73
|
-
type ProcessedLineMessage,
|
|
74
|
-
processLineMessage,
|
|
75
|
-
stripMarkdown,
|
|
76
|
-
} from "./src/markdown-to-line.js";
|
|
77
|
-
export {
|
|
78
|
-
createAudioMessage,
|
|
79
|
-
createFlexMessage,
|
|
80
|
-
createImageMessage,
|
|
81
|
-
createLocationMessage,
|
|
82
|
-
createTextMessageWithQuickReplies,
|
|
83
|
-
createVideoMessage,
|
|
84
|
-
getUserDisplayName,
|
|
85
|
-
getUserProfile,
|
|
86
|
-
pushImageMessage,
|
|
87
|
-
replyMessageLine,
|
|
88
|
-
showLoadingAnimation,
|
|
89
|
-
} from "./src/send.js";
|
|
90
|
-
export { validateLineSignature } from "./src/signature.js";
|
|
91
|
-
export {
|
|
92
|
-
type ButtonsTemplate,
|
|
93
|
-
type CarouselColumn,
|
|
94
|
-
type CarouselTemplate,
|
|
95
|
-
type ConfirmTemplate,
|
|
96
|
-
createButtonMenu,
|
|
97
|
-
createButtonTemplate,
|
|
98
|
-
createCarouselColumn,
|
|
99
|
-
createConfirmTemplate,
|
|
100
|
-
createImageCarousel,
|
|
101
|
-
createImageCarouselColumn,
|
|
102
|
-
createLinkMenu,
|
|
103
|
-
createProductCarousel,
|
|
104
|
-
createTemplateCarousel,
|
|
105
|
-
createYesNoConfirm,
|
|
106
|
-
type ImageCarouselColumn,
|
|
107
|
-
type ImageCarouselTemplate,
|
|
108
|
-
type TemplateMessage,
|
|
109
|
-
} from "./src/template-messages.js";
|
|
110
|
-
export type {
|
|
111
|
-
LineChannelData,
|
|
112
|
-
LineConfig,
|
|
113
|
-
LineProbeResult,
|
|
114
|
-
ResolvedLineAccount,
|
|
115
|
-
} from "./src/types.js";
|
|
116
|
-
export { createLineNodeWebhookHandler, readLineWebhookRequestBody } from "./src/webhook-node.js";
|
|
117
|
-
export {
|
|
118
|
-
createLineWebhookMiddleware,
|
|
119
|
-
type LineWebhookOptions,
|
|
120
|
-
startLineWebhook,
|
|
121
|
-
type StartLineWebhookOptions,
|
|
122
|
-
} from "./src/webhook.js";
|
|
123
|
-
export { parseLineWebhookBody } from "./src/webhook-utils.js";
|
|
124
|
-
export { datetimePickerAction, messageAction, postbackAction, uriAction } from "./src/actions.js";
|
|
125
|
-
export type { Action } from "./src/actions.js";
|
|
126
|
-
export {
|
|
127
|
-
createActionCard,
|
|
128
|
-
createAgendaCard,
|
|
129
|
-
createAppleTvRemoteCard,
|
|
130
|
-
createCarousel,
|
|
131
|
-
createDeviceControlCard,
|
|
132
|
-
createEventCard,
|
|
133
|
-
createImageCard,
|
|
134
|
-
createInfoCard,
|
|
135
|
-
createListCard,
|
|
136
|
-
createMediaPlayerCard,
|
|
137
|
-
createNotificationBubble,
|
|
138
|
-
createReceiptCard,
|
|
139
|
-
toFlexMessage,
|
|
140
|
-
} from "./src/flex-templates.js";
|
|
141
|
-
export type {
|
|
142
|
-
CardAction,
|
|
143
|
-
FlexBox,
|
|
144
|
-
FlexBubble,
|
|
145
|
-
FlexButton,
|
|
146
|
-
FlexCarousel,
|
|
147
|
-
FlexComponent,
|
|
148
|
-
FlexContainer,
|
|
149
|
-
FlexImage,
|
|
150
|
-
FlexText,
|
|
151
|
-
ListItem,
|
|
152
|
-
} from "./src/flex-templates.js";
|
|
153
|
-
export {
|
|
154
|
-
cancelDefaultRichMenu,
|
|
155
|
-
createDefaultMenuConfig,
|
|
156
|
-
createGridLayout,
|
|
157
|
-
createRichMenu,
|
|
158
|
-
createRichMenuAlias,
|
|
159
|
-
deleteRichMenu,
|
|
160
|
-
deleteRichMenuAlias,
|
|
161
|
-
getDefaultRichMenuId,
|
|
162
|
-
getRichMenu,
|
|
163
|
-
getRichMenuIdOfUser,
|
|
164
|
-
getRichMenuList,
|
|
165
|
-
linkRichMenuToUser,
|
|
166
|
-
linkRichMenuToUsers,
|
|
167
|
-
setDefaultRichMenu,
|
|
168
|
-
unlinkRichMenuFromUser,
|
|
169
|
-
unlinkRichMenuFromUsers,
|
|
170
|
-
uploadRichMenuImage,
|
|
171
|
-
} from "./src/rich-menu.js";
|
|
172
|
-
export type {
|
|
173
|
-
CreateRichMenuParams,
|
|
174
|
-
RichMenuArea,
|
|
175
|
-
RichMenuAreaRequest,
|
|
176
|
-
RichMenuRequest,
|
|
177
|
-
RichMenuResponse,
|
|
178
|
-
RichMenuSize,
|
|
179
|
-
} from "./src/rich-menu.js";
|
package/secret-contract-api.ts
DELETED
package/setup-api.ts
DELETED
package/setup-entry.ts
DELETED
package/src/account-helpers.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
type LineCredentialAccount = {
|
|
2
|
-
channelAccessToken?: string;
|
|
3
|
-
channelSecret?: string;
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
export function hasLineCredentials(account: LineCredentialAccount): boolean {
|
|
7
|
-
return Boolean(account.channelAccessToken?.trim() && account.channelSecret?.trim());
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function parseLineAllowFromId(raw: string): string | null {
|
|
11
|
-
const trimmed = raw.trim().replace(/^line:(?:user:)?/i, "");
|
|
12
|
-
if (!/^U[a-f0-9]{32}$/i.test(trimmed)) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
return trimmed;
|
|
16
|
-
}
|