@kana-ai/edgar-ext-slack 0.1.4 → 0.1.5
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/README.md +36 -25
- package/dist/src/api/client.d.ts +1 -1
- package/dist/src/api/client.js +4 -2
- package/dist/src/api/tags.d.ts +5 -0
- package/dist/src/api/tags.js +100 -0
- package/dist/src/inbound/route.d.ts +3 -1
- package/dist/src/inbound/route.js +100 -16
- package/dist/src/outbound/layout.d.ts +38 -12
- package/dist/src/outbound/layout.js +296 -60
- package/dist/src/outbound/messages.d.ts +15 -3
- package/dist/src/outbound/messages.js +37 -2
- package/dist/src/outbound/places.d.ts +11 -6
- package/dist/src/outbound/places.js +90 -26
- package/dist/src/outbound/progress.js +314 -80
- package/dist/src/outbound/tools.js +2 -3
- package/dist/src/outbound/words.d.ts +56 -7
- package/dist/src/outbound/words.js +124 -12
- package/dist/src/schemas/config.d.ts +1 -0
- package/dist/src/schemas/config.js +5 -1
- package/dist/src/schemas/events.d.ts +66 -3
- package/dist/src/schemas/events.js +65 -5
- package/dist/src/schemas/slack.d.ts +16 -1
- package/dist/src/schemas/slack.js +17 -3
- package/edgar-extension.json +1 -1
- package/package.json +3 -3
- package/schemas/config.json +9 -1
|
@@ -36,6 +36,7 @@ export declare const userInfo: z.ZodObject<{
|
|
|
36
36
|
}, z.core.$loose>>;
|
|
37
37
|
profile: z.ZodOptional<z.ZodObject<{
|
|
38
38
|
email: z.ZodOptional<z.ZodString>;
|
|
39
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
39
40
|
}, z.core.$loose>>;
|
|
40
41
|
}, z.core.$loose>;
|
|
41
42
|
}, z.core.$loose>;
|
|
@@ -138,7 +139,14 @@ export declare const stopped: z.ZodObject<{
|
|
|
138
139
|
thread_ts: z.ZodString;
|
|
139
140
|
user: z.ZodString;
|
|
140
141
|
}, z.core.$loose>;
|
|
141
|
-
/**
|
|
142
|
+
/** One block of a message, as far as a press reads it: its type, and the id of each element of an `actions` block. */
|
|
143
|
+
export declare const block: z.ZodObject<{
|
|
144
|
+
type: z.ZodString;
|
|
145
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
146
|
+
action_id: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$loose>>>;
|
|
148
|
+
}, z.core.$loose>;
|
|
149
|
+
/** A press on one of EDGAR's buttons, with the text and the blocks of the message that holds the button. */
|
|
142
150
|
export declare const pressed: z.ZodObject<{
|
|
143
151
|
type: z.ZodLiteral<"block_actions">;
|
|
144
152
|
user: z.ZodObject<{
|
|
@@ -150,6 +158,13 @@ export declare const pressed: z.ZodObject<{
|
|
|
150
158
|
message: z.ZodOptional<z.ZodObject<{
|
|
151
159
|
ts: z.ZodString;
|
|
152
160
|
thread_ts: z.ZodOptional<z.ZodString>;
|
|
161
|
+
text: z.ZodOptional<z.ZodString>;
|
|
162
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
163
|
+
type: z.ZodString;
|
|
164
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
165
|
+
action_id: z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$loose>>>;
|
|
167
|
+
}, z.core.$loose>>>;
|
|
153
168
|
}, z.core.$loose>>;
|
|
154
169
|
actions: z.ZodArray<z.ZodObject<{
|
|
155
170
|
action_id: z.ZodString;
|
|
@@ -23,7 +23,9 @@ export const userInfo = z.looseObject({
|
|
|
23
23
|
is_ultra_restricted: z.boolean().optional(),
|
|
24
24
|
is_stranger: z.boolean().optional(),
|
|
25
25
|
enterprise_user: z.looseObject({ enterprise_id: z.string().optional() }).optional(),
|
|
26
|
-
profile: z
|
|
26
|
+
profile: z
|
|
27
|
+
.looseObject({ email: z.string().optional(), display_name: z.string().optional() })
|
|
28
|
+
.optional(),
|
|
27
29
|
}),
|
|
28
30
|
});
|
|
29
31
|
/** The envelope of an Events API event: the workspace the app is installed in and, on Enterprise Grid, its organization. */
|
|
@@ -104,12 +106,24 @@ export const stopped = z.looseObject({
|
|
|
104
106
|
thread_ts: z.string(),
|
|
105
107
|
user: z.string(),
|
|
106
108
|
});
|
|
107
|
-
/**
|
|
109
|
+
/** One block of a message, as far as a press reads it: its type, and the id of each element of an `actions` block. */
|
|
110
|
+
export const block = z.looseObject({
|
|
111
|
+
type: z.string(),
|
|
112
|
+
elements: z.array(z.looseObject({ action_id: z.string().optional() })).optional(),
|
|
113
|
+
});
|
|
114
|
+
/** A press on one of EDGAR's buttons, with the text and the blocks of the message that holds the button. */
|
|
108
115
|
export const pressed = z.looseObject({
|
|
109
116
|
type: z.literal("block_actions"),
|
|
110
117
|
user: z.looseObject({ id: z.string() }),
|
|
111
118
|
channel: z.looseObject({ id: z.string() }).optional(),
|
|
112
|
-
message: z
|
|
119
|
+
message: z
|
|
120
|
+
.looseObject({
|
|
121
|
+
ts: z.string(),
|
|
122
|
+
thread_ts: z.string().optional(),
|
|
123
|
+
text: z.string().optional(),
|
|
124
|
+
blocks: z.array(block).optional(),
|
|
125
|
+
})
|
|
126
|
+
.optional(),
|
|
113
127
|
actions: z.array(z.looseObject({ action_id: z.string(), value: z.string().optional() })).min(1),
|
|
114
128
|
});
|
|
115
129
|
/** The value of an answer button: the waiting key and the answer it gives. */
|
package/edgar-extension.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kana-ai/edgar-ext-slack",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "EDGAR extension for Slack: a DM or a mention opens a card, the thread shows each stage, and tools post the summary, send a DM, ask a person and delete a message.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
".": "./dist/src/index.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@kana-ai/edgar-contracts": "0.1.
|
|
26
|
-
"@kana-ai/edgar-sdk": "0.1.
|
|
25
|
+
"@kana-ai/edgar-contracts": "0.1.5",
|
|
26
|
+
"@kana-ai/edgar-sdk": "0.1.5",
|
|
27
27
|
"zod": "4.6.7"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
package/schemas/config.json
CHANGED
|
@@ -110,6 +110,14 @@
|
|
|
110
110
|
]
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
|
+
"tag": {
|
|
114
|
+
"description": "The only people a message may tag, so only they are notified: each a name of `people` or `operators`, or a Slack user id. Everyone else is written as their name. Not set: everyone may be tagged. Empty: nobody is.",
|
|
115
|
+
"type": "array",
|
|
116
|
+
"items": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"minLength": 1
|
|
119
|
+
}
|
|
120
|
+
},
|
|
113
121
|
"close_on_done": {
|
|
114
122
|
"default": false,
|
|
115
123
|
"description": "With true, a run that ends done sets the Slack session status to closed; otherwise it goes back to active. Default false.",
|
|
@@ -122,7 +130,7 @@
|
|
|
122
130
|
},
|
|
123
131
|
"status": {
|
|
124
132
|
"default": {},
|
|
125
|
-
"description": "The phrase of the status line while a stage works, by stage name, such as fix = \"is reading the code\". A stage with no phrase shows \"is on it:\" and its label.",
|
|
133
|
+
"description": "The phrase of the status line while a stage works, by stage name, such as fix = \"is reading the code\". A stage with no phrase shows the built-in phrase of a long stage, else \"is on it:\" and its label.",
|
|
126
134
|
"type": "object",
|
|
127
135
|
"propertyNames": {
|
|
128
136
|
"type": "string"
|