@tomradex/plugin-sdk 0.2.18 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/im.d.ts +25 -0
- package/dist/im.js +2 -0
- package/dist/manifest.d.ts +1 -1
- package/dist/manifest.js +1 -1
- package/package.json +2 -2
package/dist/im.d.ts
CHANGED
|
@@ -185,6 +185,28 @@ export interface ImAdapterSession {
|
|
|
185
185
|
id: string;
|
|
186
186
|
name?: string;
|
|
187
187
|
};
|
|
188
|
+
/**
|
|
189
|
+
* SDK 0.2.19. Topics the bot opens itself, when `topics`: one per ticket
|
|
190
|
+
* being worked in a group conversation. Messages people write in one arrive
|
|
191
|
+
* with its `topicId`.
|
|
192
|
+
*/
|
|
193
|
+
topics?: {
|
|
194
|
+
open(command: {
|
|
195
|
+
operationId: string;
|
|
196
|
+
address: ImAddress;
|
|
197
|
+
title: string;
|
|
198
|
+
}): Promise<{
|
|
199
|
+
topicId: string;
|
|
200
|
+
}>;
|
|
201
|
+
/** Renames it, and closes it out of the way or opens it again. */
|
|
202
|
+
update(command: {
|
|
203
|
+
address: ImAddress & {
|
|
204
|
+
topicId: string;
|
|
205
|
+
};
|
|
206
|
+
title: string;
|
|
207
|
+
closed: boolean;
|
|
208
|
+
}): Promise<void>;
|
|
209
|
+
};
|
|
188
210
|
close(): void | Promise<void>;
|
|
189
211
|
}
|
|
190
212
|
/** SDK 0.2.5. One value a person copies from the platform's developer console. */
|
|
@@ -221,6 +243,8 @@ export interface ImCapabilities {
|
|
|
221
243
|
maxFileBytes: number;
|
|
222
244
|
/** SDK 0.2.5. Replies can go into a thread under the triggering message. */
|
|
223
245
|
threads?: boolean;
|
|
246
|
+
/** SDK 0.2.19. The bot opens a topic per ticket in a group, through `session.topics`. */
|
|
247
|
+
topics?: boolean;
|
|
224
248
|
reactions?: boolean;
|
|
225
249
|
typing?: boolean;
|
|
226
250
|
/** `native`: session.stream. `edit`: throttled edits of one message. `none`: only the final message. */
|
|
@@ -254,6 +278,7 @@ export declare const ImCapabilitiesSchema: z.ZodObject<{
|
|
|
254
278
|
maxTextLength: z.ZodNumber;
|
|
255
279
|
maxFileBytes: z.ZodNumber;
|
|
256
280
|
threads: z.ZodOptional<z.ZodBoolean>;
|
|
281
|
+
topics: z.ZodOptional<z.ZodBoolean>;
|
|
257
282
|
reactions: z.ZodOptional<z.ZodBoolean>;
|
|
258
283
|
typing: z.ZodOptional<z.ZodBoolean>;
|
|
259
284
|
stream: z.ZodOptional<z.ZodEnum<{
|
package/dist/im.js
CHANGED
|
@@ -10,6 +10,7 @@ export const ImCapabilitiesSchema = z.object({
|
|
|
10
10
|
maxTextLength: z.number().int().min(128),
|
|
11
11
|
maxFileBytes: z.number().int().min(0),
|
|
12
12
|
threads: z.boolean().optional(),
|
|
13
|
+
topics: z.boolean().optional(),
|
|
13
14
|
reactions: z.boolean().optional(),
|
|
14
15
|
typing: z.boolean().optional(),
|
|
15
16
|
stream: z.enum(["native", "edit", "none"]).optional(),
|
|
@@ -28,6 +29,7 @@ export function resolveImCapabilities(caps) {
|
|
|
28
29
|
return {
|
|
29
30
|
...parsed,
|
|
30
31
|
threads: parsed.threads ?? false,
|
|
32
|
+
topics: parsed.topics ?? false,
|
|
31
33
|
reactions: parsed.reactions ?? false,
|
|
32
34
|
typing: parsed.typing ?? false,
|
|
33
35
|
stream: parsed.stream ?? "none",
|
package/dist/manifest.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/** The contract this SDK describes. A plugin's `engines.sdk` range is checked against the host's. */
|
|
3
|
-
export declare const SDK_CONTRACT = "0.2.
|
|
3
|
+
export declare const SDK_CONTRACT = "0.2.19";
|
|
4
4
|
export declare const PLUGIN_ID: RegExp;
|
|
5
5
|
export declare const NAMESPACE: RegExp;
|
|
6
6
|
/** The app's own names, and the official publisher's. */
|
package/dist/manifest.js
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { LANGUAGE_PACK_LIMITS, LanguageEntrySchema } from "./language.js";
|
|
3
3
|
import { isRange, isVersion } from "./semver.js";
|
|
4
4
|
/** The contract this SDK describes. A plugin's `engines.sdk` range is checked against the host's. */
|
|
5
|
-
export const SDK_CONTRACT = "0.2.
|
|
5
|
+
export const SDK_CONTRACT = "0.2.19";
|
|
6
6
|
export const PLUGIN_ID = /^[a-z0-9][a-z0-9-]{0,38}\/[a-z0-9][a-z0-9-]{0,63}$/;
|
|
7
7
|
export const NAMESPACE = /^[a-z][a-z0-9_]{1,31}$/;
|
|
8
8
|
/** The app's own names, and the official publisher's. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomradex/plugin-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Haoyuan Tang",
|
|
6
6
|
"engines": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@tomradex/domain": "0.2.
|
|
32
|
+
"@tomradex/domain": "0.2.19",
|
|
33
33
|
"zod": "^4.4.3"
|
|
34
34
|
}
|
|
35
35
|
}
|