@kana-ai/edgar-ext-slack 0.1.4 → 0.1.6

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.
@@ -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>;
@@ -68,10 +69,11 @@ export declare const metadata: z.ZodObject<{
68
69
  event_type: z.ZodString;
69
70
  event_payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
70
71
  }, z.core.$loose>;
71
- /** One message of `conversations.replies` or `conversations.history`. */
72
+ /** One message of `conversations.replies` or `conversations.history`, with its blocks, so a message can change in place and keep them. */
72
73
  export declare const message: z.ZodObject<{
73
74
  ts: z.ZodString;
74
75
  text: z.ZodOptional<z.ZodString>;
76
+ blocks: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
75
77
  user: z.ZodOptional<z.ZodString>;
76
78
  bot_id: z.ZodOptional<z.ZodString>;
77
79
  metadata: z.ZodOptional<z.ZodObject<{
@@ -84,6 +86,7 @@ export declare const messages: z.ZodObject<{
84
86
  messages: z.ZodArray<z.ZodObject<{
85
87
  ts: z.ZodString;
86
88
  text: z.ZodOptional<z.ZodString>;
89
+ blocks: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
87
90
  user: z.ZodOptional<z.ZodString>;
88
91
  bot_id: z.ZodOptional<z.ZodString>;
89
92
  metadata: z.ZodOptional<z.ZodObject<{
@@ -138,7 +141,14 @@ export declare const stopped: z.ZodObject<{
138
141
  thread_ts: z.ZodString;
139
142
  user: z.ZodString;
140
143
  }, z.core.$loose>;
141
- /** A press on one of EDGAR's buttons. */
144
+ /** One block of a message, as far as a press reads it: its type, and the id of each element of an `actions` block. */
145
+ export declare const block: z.ZodObject<{
146
+ type: z.ZodString;
147
+ elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
148
+ action_id: z.ZodOptional<z.ZodString>;
149
+ }, z.core.$loose>>>;
150
+ }, z.core.$loose>;
151
+ /** A press on one of EDGAR's buttons, with the text and the blocks of the message that holds the button. */
142
152
  export declare const pressed: z.ZodObject<{
143
153
  type: z.ZodLiteral<"block_actions">;
144
154
  user: z.ZodObject<{
@@ -150,6 +160,13 @@ export declare const pressed: z.ZodObject<{
150
160
  message: z.ZodOptional<z.ZodObject<{
151
161
  ts: z.ZodString;
152
162
  thread_ts: z.ZodOptional<z.ZodString>;
163
+ text: z.ZodOptional<z.ZodString>;
164
+ blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
165
+ type: z.ZodString;
166
+ elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
167
+ action_id: z.ZodOptional<z.ZodString>;
168
+ }, z.core.$loose>>>;
169
+ }, z.core.$loose>>>;
153
170
  }, z.core.$loose>>;
154
171
  actions: z.ZodArray<z.ZodObject<{
155
172
  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.looseObject({ email: z.string().optional() }).optional(),
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. */
@@ -51,10 +53,11 @@ export const metadata = z.looseObject({
51
53
  event_type: z.string(),
52
54
  event_payload: z.record(z.string(), z.unknown()),
53
55
  });
54
- /** One message of `conversations.replies` or `conversations.history`. */
56
+ /** One message of `conversations.replies` or `conversations.history`, with its blocks, so a message can change in place and keep them. */
55
57
  export const message = z.looseObject({
56
58
  ts: z.string(),
57
59
  text: z.string().optional(),
60
+ blocks: z.array(z.record(z.string(), z.unknown())).optional().catch(undefined),
58
61
  user: z.string().optional(),
59
62
  bot_id: z.string().optional(),
60
63
  metadata: metadata.optional(),
@@ -104,12 +107,24 @@ export const stopped = z.looseObject({
104
107
  thread_ts: z.string(),
105
108
  user: z.string(),
106
109
  });
107
- /** A press on one of EDGAR's buttons. */
110
+ /** One block of a message, as far as a press reads it: its type, and the id of each element of an `actions` block. */
111
+ export const block = z.looseObject({
112
+ type: z.string(),
113
+ elements: z.array(z.looseObject({ action_id: z.string().optional() })).optional(),
114
+ });
115
+ /** A press on one of EDGAR's buttons, with the text and the blocks of the message that holds the button. */
108
116
  export const pressed = z.looseObject({
109
117
  type: z.literal("block_actions"),
110
118
  user: z.looseObject({ id: z.string() }),
111
119
  channel: z.looseObject({ id: z.string() }).optional(),
112
- message: z.looseObject({ ts: z.string(), thread_ts: z.string().optional() }).optional(),
120
+ message: z
121
+ .looseObject({
122
+ ts: z.string(),
123
+ thread_ts: z.string().optional(),
124
+ text: z.string().optional(),
125
+ blocks: z.array(block).optional(),
126
+ })
127
+ .optional(),
113
128
  actions: z.array(z.looseObject({ action_id: z.string(), value: z.string().optional() })).min(1),
114
129
  });
115
130
  /** The value of an answer button: the waiting key and the answer it gives. */
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "contract": 1,
3
3
  "name": "slack",
4
- "version": "0.1.4",
4
+ "version": "0.1.6",
5
5
  "config_schema": "schemas/config.json",
6
6
  "secrets": [
7
7
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kana-ai/edgar-ext-slack",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
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.4",
26
- "@kana-ai/edgar-sdk": "0.1.4",
25
+ "@kana-ai/edgar-contracts": "0.1.6",
26
+ "@kana-ai/edgar-sdk": "0.1.6",
27
27
  "zod": "4.6.7"
28
28
  },
29
29
  "devDependencies": {
@@ -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"