@opentag/lark 0.3.0 → 0.3.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/dist/render.d.ts CHANGED
@@ -1,5 +1,44 @@
1
- import type { OpenTagRunResult } from "@opentag/core";
1
+ import { type OpenTagActionReceiptPresentation, type OpenTagDoctorSummaryPresentation, type OpenTagFinalSummaryPresentation, type OpenTagRunStatusPresentation, type OpenTagRunResult, type OpenTagSourceThreadStatusPresentation } from "@opentag/core";
2
+ export type LarkCardText = {
3
+ tag: "plain_text" | "lark_md";
4
+ content: string;
5
+ };
6
+ export type LarkCardElement = {
7
+ tag: "div";
8
+ text: LarkCardText;
9
+ } | {
10
+ tag: "hr";
11
+ } | {
12
+ tag: "note";
13
+ elements: LarkCardText[];
14
+ };
15
+ export type LarkCard = {
16
+ config: {
17
+ wide_screen_mode: boolean;
18
+ update_multi?: boolean;
19
+ };
20
+ header: {
21
+ template: "green" | "red" | "yellow" | "blue" | "grey";
22
+ title: {
23
+ tag: "plain_text";
24
+ content: string;
25
+ };
26
+ };
27
+ elements: LarkCardElement[];
28
+ };
29
+ export type LarkRenderOptions = {
30
+ auditRunId?: string;
31
+ };
2
32
  export declare function renderLarkAcknowledgement(runId: string): string;
3
- export declare function renderLarkFinalResult(result: OpenTagRunResult): string;
33
+ export declare function renderLarkRunStatusPresentation(presentation: OpenTagRunStatusPresentation): string;
34
+ export declare function createLarkRunStatusCard(presentation: OpenTagRunStatusPresentation): LarkCard;
35
+ export declare function renderLarkFinalResult(result: OpenTagRunResult, options?: LarkRenderOptions): string;
36
+ export declare function renderLarkFinalSummaryPresentation(presentation: OpenTagFinalSummaryPresentation): string;
37
+ export declare function createLarkFinalSummaryCard(presentation: OpenTagFinalSummaryPresentation): LarkCard;
38
+ export declare function renderLarkActionReceiptPresentation(presentation: OpenTagActionReceiptPresentation): string;
39
+ export declare function createLarkActionReceiptCard(presentation: OpenTagActionReceiptPresentation): LarkCard;
40
+ export declare function createLarkDoctorSummaryCard(presentation: OpenTagDoctorSummaryPresentation): LarkCard;
41
+ export declare function createLarkSourceThreadStatusCard(presentation: OpenTagSourceThreadStatusPresentation): LarkCard;
4
42
  export declare function createLarkTextMessageContent(text: string): string;
43
+ export declare function createLarkInteractiveMessageContent(card: LarkCard): string;
5
44
  //# sourceMappingURL=render.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAQtD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAgBtE;AAGD,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjE"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gCAAgC,EAErC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EAEpC,KAAK,4BAA4B,EACjC,KAAK,gBAAgB,EACrB,KAAK,qCAAqC,EAC3C,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,YAAY,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GACvB;IACE,GAAG,EAAE,KAAK,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;CACpB,GACD;IACE,GAAG,EAAE,IAAI,CAAC;CACX,GACD;IACE,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B,CAAC;AAEN,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE;QACN,gBAAgB,EAAE,OAAO,CAAC;QAC1B,YAAY,CAAC,EAAE,OA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 @@
1
1
  {
2
2
  "name": "@opentag/lark",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Lark/Feishu message normalization and callback helpers for OpenTag.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -32,8 +32,8 @@
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
34
  "@larksuiteoapi/node-sdk": "^1.68.0",
35
- "@opentag/client": "0.3.0",
36
- "@opentag/core": "0.3.0"
35
+ "@opentag/client": "0.3.1",
36
+ "@opentag/core": "0.3.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "tsup": "^8.5.1",