@im-more/dsh-slack 0.0.0-stage → 0.1.0

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.
Files changed (226) hide show
  1. package/LICENSE +21 -0
  2. package/cordis.patch.yml +13 -0
  3. package/lib/index.js +2659 -0
  4. package/lib/index.js.map +1 -0
  5. package/lib/types/bot.d.ts +66 -0
  6. package/lib/types/bot.d.ts.map +1 -0
  7. package/lib/types/bot.js +165 -0
  8. package/lib/types/bot.js.map +1 -0
  9. package/lib/types/config.d.ts +49 -0
  10. package/lib/types/config.d.ts.map +1 -0
  11. package/lib/types/config.js +54 -0
  12. package/lib/types/config.js.map +1 -0
  13. package/lib/types/decode.d.ts +126 -0
  14. package/lib/types/decode.d.ts.map +1 -0
  15. package/lib/types/decode.js +396 -0
  16. package/lib/types/decode.js.map +1 -0
  17. package/lib/types/errors.d.ts +61 -0
  18. package/lib/types/errors.d.ts.map +1 -0
  19. package/lib/types/errors.js +196 -0
  20. package/lib/types/errors.js.map +1 -0
  21. package/lib/types/identity.d.ts +27 -0
  22. package/lib/types/identity.d.ts.map +1 -0
  23. package/lib/types/identity.js +35 -0
  24. package/lib/types/identity.js.map +1 -0
  25. package/lib/types/index.d.ts +14 -0
  26. package/lib/types/index.d.ts.map +1 -0
  27. package/lib/types/index.js +14 -0
  28. package/lib/types/index.js.map +1 -0
  29. package/lib/types/modes/mrkdwn.d.ts +17 -0
  30. package/lib/types/modes/mrkdwn.d.ts.map +1 -0
  31. package/lib/types/modes/mrkdwn.js +123 -0
  32. package/lib/types/modes/mrkdwn.js.map +1 -0
  33. package/lib/types/modes/shared.d.ts +164 -0
  34. package/lib/types/modes/shared.d.ts.map +1 -0
  35. package/lib/types/modes/shared.js +411 -0
  36. package/lib/types/modes/shared.js.map +1 -0
  37. package/lib/types/mrkdwn.d.ts +41 -0
  38. package/lib/types/mrkdwn.d.ts.map +1 -0
  39. package/lib/types/mrkdwn.js +137 -0
  40. package/lib/types/mrkdwn.js.map +1 -0
  41. package/lib/types/request.d.ts +225 -0
  42. package/lib/types/request.d.ts.map +1 -0
  43. package/lib/types/request.js +330 -0
  44. package/lib/types/request.js.map +1 -0
  45. package/lib/types/send.d.ts +74 -0
  46. package/lib/types/send.d.ts.map +1 -0
  47. package/lib/types/send.js +200 -0
  48. package/lib/types/send.js.map +1 -0
  49. package/lib/types/transport/socket.d.ts +58 -0
  50. package/lib/types/transport/socket.d.ts.map +1 -0
  51. package/lib/types/transport/socket.js +297 -0
  52. package/lib/types/transport/socket.js.map +1 -0
  53. package/lib/types/transport/webhook.d.ts +48 -0
  54. package/lib/types/transport/webhook.d.ts.map +1 -0
  55. package/lib/types/transport/webhook.js +210 -0
  56. package/lib/types/transport/webhook.js.map +1 -0
  57. package/lib/types/types/admin.d.ts +682 -0
  58. package/lib/types/types/admin.d.ts.map +1 -0
  59. package/lib/types/types/admin.js +172 -0
  60. package/lib/types/types/admin.js.map +1 -0
  61. package/lib/types/types/api.d.ts +20 -0
  62. package/lib/types/types/api.d.ts.map +1 -0
  63. package/lib/types/types/api.js +7 -0
  64. package/lib/types/types/api.js.map +1 -0
  65. package/lib/types/types/apps.d.ts +138 -0
  66. package/lib/types/types/apps.d.ts.map +1 -0
  67. package/lib/types/types/apps.js +28 -0
  68. package/lib/types/types/apps.js.map +1 -0
  69. package/lib/types/types/auth.d.ts +36 -0
  70. package/lib/types/types/auth.d.ts.map +1 -0
  71. package/lib/types/types/auth.js +10 -0
  72. package/lib/types/types/auth.js.map +1 -0
  73. package/lib/types/types/bots.d.ts +32 -0
  74. package/lib/types/types/bots.d.ts.map +1 -0
  75. package/lib/types/types/bots.js +7 -0
  76. package/lib/types/types/bots.js.map +1 -0
  77. package/lib/types/types/calls.d.ts +82 -0
  78. package/lib/types/types/calls.d.ts.map +1 -0
  79. package/lib/types/types/calls.js +22 -0
  80. package/lib/types/types/calls.js.map +1 -0
  81. package/lib/types/types/chat.d.ts +208 -0
  82. package/lib/types/types/chat.d.ts.map +1 -0
  83. package/lib/types/types/chat.js +34 -0
  84. package/lib/types/types/chat.js.map +1 -0
  85. package/lib/types/types/conversations.d.ts +266 -0
  86. package/lib/types/types/conversations.d.ts.map +1 -0
  87. package/lib/types/types/conversations.js +58 -0
  88. package/lib/types/types/conversations.js.map +1 -0
  89. package/lib/types/types/definition.d.ts +505 -0
  90. package/lib/types/types/definition.d.ts.map +1 -0
  91. package/lib/types/types/definition.js +2 -0
  92. package/lib/types/types/definition.js.map +1 -0
  93. package/lib/types/types/dialog.d.ts +20 -0
  94. package/lib/types/types/dialog.d.ts.map +1 -0
  95. package/lib/types/types/dialog.js +7 -0
  96. package/lib/types/types/dialog.js.map +1 -0
  97. package/lib/types/types/dnd.d.ts +70 -0
  98. package/lib/types/types/dnd.d.ts.map +1 -0
  99. package/lib/types/types/dnd.js +19 -0
  100. package/lib/types/types/dnd.js.map +1 -0
  101. package/lib/types/types/emoji.d.ts +18 -0
  102. package/lib/types/types/emoji.d.ts.map +1 -0
  103. package/lib/types/types/emoji.js +7 -0
  104. package/lib/types/types/emoji.js.map +1 -0
  105. package/lib/types/types/events/base-events.d.ts +235 -0
  106. package/lib/types/types/events/base-events.d.ts.map +1 -0
  107. package/lib/types/types/events/base-events.js +3 -0
  108. package/lib/types/types/events/base-events.js.map +1 -0
  109. package/lib/types/types/events/index.d.ts +97 -0
  110. package/lib/types/types/events/index.d.ts.map +1 -0
  111. package/lib/types/types/events/index.js +3 -0
  112. package/lib/types/types/events/index.js.map +1 -0
  113. package/lib/types/types/events/message-events.d.ts +215 -0
  114. package/lib/types/types/events/message-events.d.ts.map +1 -0
  115. package/lib/types/types/events/message-events.js +3 -0
  116. package/lib/types/types/events/message-events.js.map +1 -0
  117. package/lib/types/types/files.d.ts +189 -0
  118. package/lib/types/types/files.d.ts.map +1 -0
  119. package/lib/types/types/files.js +43 -0
  120. package/lib/types/types/files.js.map +1 -0
  121. package/lib/types/types/index.d.ts +82 -0
  122. package/lib/types/types/index.d.ts.map +1 -0
  123. package/lib/types/types/index.js +29 -0
  124. package/lib/types/types/index.js.map +1 -0
  125. package/lib/types/types/internal.d.ts +17 -0
  126. package/lib/types/types/internal.d.ts.map +1 -0
  127. package/lib/types/types/internal.js +60 -0
  128. package/lib/types/types/internal.js.map +1 -0
  129. package/lib/types/types/migration.d.ts +25 -0
  130. package/lib/types/types/migration.d.ts.map +1 -0
  131. package/lib/types/types/migration.js +7 -0
  132. package/lib/types/types/migration.js.map +1 -0
  133. package/lib/types/types/oauth.d.ts +50 -0
  134. package/lib/types/types/oauth.d.ts.map +1 -0
  135. package/lib/types/types/oauth.js +13 -0
  136. package/lib/types/types/oauth.js.map +1 -0
  137. package/lib/types/types/pins.d.ts +39 -0
  138. package/lib/types/types/pins.d.ts.map +1 -0
  139. package/lib/types/types/pins.js +13 -0
  140. package/lib/types/types/pins.js.map +1 -0
  141. package/lib/types/types/reactions.d.ts +75 -0
  142. package/lib/types/types/reactions.d.ts.map +1 -0
  143. package/lib/types/types/reactions.js +16 -0
  144. package/lib/types/types/reactions.js.map +1 -0
  145. package/lib/types/types/reminders.d.ts +64 -0
  146. package/lib/types/types/reminders.d.ts.map +1 -0
  147. package/lib/types/types/reminders.js +19 -0
  148. package/lib/types/types/reminders.js.map +1 -0
  149. package/lib/types/types/rtm.d.ts +30 -0
  150. package/lib/types/types/rtm.d.ts.map +1 -0
  151. package/lib/types/types/rtm.js +7 -0
  152. package/lib/types/types/rtm.js.map +1 -0
  153. package/lib/types/types/search.d.ts +24 -0
  154. package/lib/types/types/search.d.ts.map +1 -0
  155. package/lib/types/types/search.js +7 -0
  156. package/lib/types/types/search.js.map +1 -0
  157. package/lib/types/types/stars.d.ts +56 -0
  158. package/lib/types/types/stars.d.ts.map +1 -0
  159. package/lib/types/types/stars.js +13 -0
  160. package/lib/types/types/stars.js.map +1 -0
  161. package/lib/types/types/team.d.ts +98 -0
  162. package/lib/types/types/team.d.ts.map +1 -0
  163. package/lib/types/types/team.js +19 -0
  164. package/lib/types/types/team.js.map +1 -0
  165. package/lib/types/types/usergroups.d.ts +103 -0
  166. package/lib/types/types/usergroups.d.ts.map +1 -0
  167. package/lib/types/types/usergroups.js +25 -0
  168. package/lib/types/types/usergroups.js.map +1 -0
  169. package/lib/types/types/users.d.ts +169 -0
  170. package/lib/types/types/users.d.ts.map +1 -0
  171. package/lib/types/types/users.js +40 -0
  172. package/lib/types/types/users.js.map +1 -0
  173. package/lib/types/types/views.d.ts +56 -0
  174. package/lib/types/types/views.d.ts.map +1 -0
  175. package/lib/types/types/views.js +16 -0
  176. package/lib/types/types/views.js.map +1 -0
  177. package/lib/types/types/workflows.d.ts +45 -0
  178. package/lib/types/types/workflows.d.ts.map +1 -0
  179. package/lib/types/types/workflows.js +13 -0
  180. package/lib/types/types/workflows.js.map +1 -0
  181. package/package.json +65 -3
  182. package/src/bot.ts +273 -0
  183. package/src/config.ts +92 -0
  184. package/src/decode.ts +489 -0
  185. package/src/errors.ts +230 -0
  186. package/src/identity.ts +59 -0
  187. package/src/index.ts +64 -0
  188. package/src/modes/mrkdwn.ts +159 -0
  189. package/src/modes/shared.ts +515 -0
  190. package/src/mrkdwn.ts +146 -0
  191. package/src/request.ts +449 -0
  192. package/src/send.ts +300 -0
  193. package/src/transport/socket.ts +393 -0
  194. package/src/transport/webhook.ts +269 -0
  195. package/src/types/admin.ts +910 -0
  196. package/src/types/api.ts +28 -0
  197. package/src/types/apps.ts +175 -0
  198. package/src/types/auth.ts +49 -0
  199. package/src/types/bots.ts +40 -0
  200. package/src/types/calls.ts +110 -0
  201. package/src/types/chat.ts +255 -0
  202. package/src/types/conversations.ts +342 -0
  203. package/src/types/definition.ts +530 -0
  204. package/src/types/dialog.ts +28 -0
  205. package/src/types/dnd.ts +94 -0
  206. package/src/types/emoji.ts +26 -0
  207. package/src/types/events/base-events.ts +281 -0
  208. package/src/types/events/index.ts +125 -0
  209. package/src/types/events/message-events.ts +253 -0
  210. package/src/types/files.ts +245 -0
  211. package/src/types/index.ts +84 -0
  212. package/src/types/internal.ts +60 -0
  213. package/src/types/migration.ts +34 -0
  214. package/src/types/oauth.ts +66 -0
  215. package/src/types/pins.ts +55 -0
  216. package/src/types/reactions.ts +95 -0
  217. package/src/types/reminders.ts +88 -0
  218. package/src/types/rtm.ts +38 -0
  219. package/src/types/search.ts +32 -0
  220. package/src/types/stars.ts +72 -0
  221. package/src/types/team.ts +122 -0
  222. package/src/types/usergroups.ts +135 -0
  223. package/src/types/users.ts +221 -0
  224. package/src/types/views.ts +76 -0
  225. package/src/types/workflows.ts +61 -0
  226. package/README.md +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAelE,qCAAqC;AACrC,MAAM,OAAO,aAAc,SAAQ,KAAK;IAC7B,MAAM,CAAQ;IACd,MAAM,CAAQ;IACd,IAAI,CAAoB;IACxB,YAAY,CAAoB;IAEzC,YAAY,OAAe,EAAE,IAAuB;QAClD,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA;QAC5E,IAAI,CAAC,IAAI,GAAG,eAAe,CAAA;QAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;QACrB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAA;IACvC,CAAC;CACF;AAED,wEAAwE;AACxE,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,CACL,CAAC,KAAK,YAAY,KAAK,IAAI,KAAK,YAAY,YAAY,CAAC;QACzD,KAA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EAAE;gBACpD,GAAG,IAAI;gBACP,SAAS,EAAE,OAAO,CAAC,SAAS;aAC7B,CAAC,CAAA;QACJ,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;YACxB,OAAO,IAAI,aAAa,CAAC,WAAW,EAAE,KAAK,CAAC,OAAO,EAAE;gBACnD,GAAG,IAAI;gBACP,SAAS,EAAE,SAAS;aACrB,CAAC,CAAA;QACJ,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;YACxB,OAAO,IAAI,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE;gBACjD,GAAG,IAAI;gBACP,SAAS,EAAE,IAAI;aAChB,CAAC,CAAA;QACJ,CAAC;QACD,qGAAqG;QACrG,OAAO,IAAI,aAAa,CAAC,WAAW,EAAE,KAAK,CAAC,OAAO,EAAE;YACnD,GAAG,IAAI;YACP,SAAS,EAAE,SAAS;SACrB,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACtE,OAAO,IAAI,aAAa,CAAC,WAAW,EAAE,yBAAyB,OAAO,EAAE,EAAE;QACxE,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,KAAK;KACb,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { SlackApi } from './request.ts';
2
+ /** The configured `selfId` and the account the bot token belongs to disagree. */
3
+ export declare class SlackIdentityError extends Error {
4
+ constructor(message: string);
5
+ }
6
+ /** What `auth.test` reports about the installed app. */
7
+ export interface SlackIdentity {
8
+ userId: string;
9
+ userName: string;
10
+ teamId: string;
11
+ teamName: string;
12
+ botId?: string;
13
+ }
14
+ /**
15
+ * Compare `auth.test.user_id` with the configured account.
16
+ *
17
+ * The bot user id of a Slack app is not part of its token, so it has to be configured; a mismatch is a configuration
18
+ * error that reconnecting cannot fix, and the id the host keys everything on (`ctx.bots`, `sources.bot`, the intake
19
+ * dedupe key) would be wrong for every message.
20
+ *
21
+ * @param api - the request dependencies.
22
+ * @param selfId - the configured bot user id.
23
+ * @returns the identity of the matching account.
24
+ * @throws SlackIdentityError when the token belongs to another account.
25
+ */
26
+ export declare function verifyIdentity(api: SlackApi, selfId: string): Promise<SlackIdentity>;
27
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/identity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAG5C,iFAAiF;AACjF,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAED,wDAAwD;AACxD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,aAAa,CAAC,CAuBxB"}
@@ -0,0 +1,35 @@
1
+ import { callApi } from "./request.js";
2
+ /** The configured `selfId` and the account the bot token belongs to disagree. */
3
+ export class SlackIdentityError extends Error {
4
+ constructor(message) {
5
+ super(message);
6
+ this.name = 'SlackIdentityError';
7
+ }
8
+ }
9
+ /**
10
+ * Compare `auth.test.user_id` with the configured account.
11
+ *
12
+ * The bot user id of a Slack app is not part of its token, so it has to be configured; a mismatch is a configuration
13
+ * error that reconnecting cannot fix, and the id the host keys everything on (`ctx.bots`, `sources.bot`, the intake
14
+ * dedupe key) would be wrong for every message.
15
+ *
16
+ * @param api - the request dependencies.
17
+ * @param selfId - the configured bot user id.
18
+ * @returns the identity of the matching account.
19
+ * @throws SlackIdentityError when the token belongs to another account.
20
+ */
21
+ export async function verifyIdentity(api, selfId) {
22
+ const answer = await callApi(api, 'authTest');
23
+ const userId = answer.user_id ?? '';
24
+ if (userId !== selfId) {
25
+ throw new SlackIdentityError(`slack: selfId is configured as ${selfId} but the bot token belongs to ${userId === '' ? 'an unknown user' : userId}; fix selfId and restart`);
26
+ }
27
+ return {
28
+ userId,
29
+ userName: answer.user ?? '',
30
+ teamId: answer.team_id ?? '',
31
+ teamName: answer.team ?? '',
32
+ ...(answer.bot_id === undefined ? {} : { botId: answer.bot_id }),
33
+ };
34
+ }
35
+ //# sourceMappingURL=identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/identity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,iFAAiF;AACjF,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAA;IAClC,CAAC;CACF;AAWD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,GAAa,EACb,MAAc;IAEd,MAAM,MAAM,GAAG,MAAM,OAAO,CAQ1B,GAAG,EAAE,UAAU,CAAC,CAAA;IAClB,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;IACnC,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,IAAI,kBAAkB,CAC1B,kCAAkC,MAAM,iCAAiC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,0BAA0B,CAC9I,CAAA;IACH,CAAC;IACD,OAAO;QACL,MAAM;QACN,QAAQ,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE;QAC3B,MAAM,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE;QAC5B,QAAQ,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE;QAC3B,GAAG,CAAC,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;KACjE,CAAA;AACH,CAAC"}
@@ -0,0 +1,14 @@
1
+ export { Config, configError, routePath, type Config as SlackConfig, type SlackProtocol, } from './config.ts';
2
+ export { SlackBot, SlackBot as default, type SlackModes } from './bot.ts';
3
+ export { classifyCode, classifySlackError, SlackApiError, SlackFatalError, type SlackApiErrorInit, } from './errors.ts';
4
+ export { SlackIdentityError, verifyIdentity, type SlackIdentity, } from './identity.ts';
5
+ export { escape, parseMrkdwn, unescape } from './mrkdwn.ts';
6
+ export { decodeEvent, decodeMessage, type SlackEnvelopeLike, type SlackFile, type SlackMessageLike, type SlackReferrer, } from './decode.ts';
7
+ export { callApi, createSlackApi, downloadFile, ensureOk, finishUpload, isSlackFileUrl, putUploadBytes, retryAfterOf, startUpload, type SlackApi, type SlackEnvelope, type SlackMethod, type SlackParams, type SlackUploadedFile, type SlackUploadTicket, } from './request.ts';
8
+ export { SLACK_LIMITS, type SlackDraft, type SlackMark, type SlackModeTypes, type SlackNode, type SlackPayload, type SlackRun, } from './modes/shared.ts';
9
+ export { createMrkdwnMode } from './modes/mrkdwn.ts';
10
+ export { SlackSocketMode } from './transport/socket.ts';
11
+ export { SlackWebhook, matchesSignature, signatureOf, } from './transport/webhook.ts';
12
+ export { Internal } from './types/internal.ts';
13
+ export * as Slack from './types/index.ts';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EACX,SAAS,EACT,KAAK,MAAM,IAAI,WAAW,EAC1B,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, configError, routePath, } from "./config.js";
2
+ export { SlackBot, SlackBot as default } from "./bot.js";
3
+ export { classifyCode, classifySlackError, SlackApiError, SlackFatalError, } from "./errors.js";
4
+ export { SlackIdentityError, verifyIdentity, } from "./identity.js";
5
+ export { escape, parseMrkdwn, unescape } from "./mrkdwn.js";
6
+ export { decodeEvent, decodeMessage, } from "./decode.js";
7
+ export { callApi, createSlackApi, downloadFile, ensureOk, finishUpload, isSlackFileUrl, putUploadBytes, retryAfterOf, startUpload, } from "./request.js";
8
+ export { SLACK_LIMITS, } from "./modes/shared.js";
9
+ export { createMrkdwnMode } from "./modes/mrkdwn.js";
10
+ export { SlackSocketMode } from "./transport/socket.js";
11
+ export { SlackWebhook, matchesSignature, signatureOf, } from "./transport/webhook.js";
12
+ export { Internal } from "./types/internal.js";
13
+ export * as Slack from "./types/index.js";
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EACX,SAAS,GAGV,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,QAAQ,EAAE,QAAQ,IAAI,OAAO,EAAmB,MAAM,UAAU,CAAA;AACzE,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,eAAe,GAEhB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,kBAAkB,EAClB,cAAc,GAEf,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,EACL,WAAW,EACX,aAAa,GAKd,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,OAAO,EACP,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,cAAc,EACd,YAAY,EACZ,WAAW,GAOZ,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,YAAY,GAOb,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,WAAW,GACZ,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The single `mrkdwn` mode: Slack message text with its mrkdwn markup.
3
+ *
4
+ * Native tags are the ones the upstream encoder writes (`text`, `p`, `br`, `b`, `i`, `s`, `code`, `a`, `at`, `channel`,
5
+ * `emoji`) plus the block structure Slack renders as text (headings, lists, quotes, code fences, a divider) and the
6
+ * attachments that travel as their own message. Everything else takes the core fallback, which keeps its text — the
7
+ * platform has no way to render it, so there is no second mode to offer.
8
+ */
9
+ import type { Mode } from '@deepseek-ai/cordis-plugin-im-core';
10
+ import type { SlackModeTypes } from './shared.ts';
11
+ /**
12
+ * Build the `mrkdwn` mode.
13
+ * @param replyBroadcast - `replyBroadcast` of the profile row.
14
+ * @returns the only mode of this adapter.
15
+ */
16
+ export declare function createMrkdwnMode(replyBroadcast: boolean): Mode<SlackModeTypes>;
17
+ //# sourceMappingURL=mrkdwn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mrkdwn.d.ts","sourceRoot":"","sources":["../../../src/modes/mrkdwn.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAA;AAY9D,OAAO,KAAK,EAAa,cAAc,EAAa,MAAM,aAAa,CAAA;AA6CvE;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,OAAO,GACtB,IAAI,CAAC,cAAc,CAAC,CAoFtB"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * The single `mrkdwn` mode: Slack message text with its mrkdwn markup.
3
+ *
4
+ * Native tags are the ones the upstream encoder writes (`text`, `p`, `br`, `b`, `i`, `s`, `code`, `a`, `at`, `channel`,
5
+ * `emoji`) plus the block structure Slack renders as text (headings, lists, quotes, code fences, a divider) and the
6
+ * attachments that travel as their own message. Everything else takes the core fallback, which keeps its text — the
7
+ * platform has no way to render it, so there is no second mode to offer.
8
+ */
9
+ import { defineMode, ElementRegistry } from '@deepseek-ai/cordis-plugin-im-core';
10
+ import { escape } from "../mrkdwn.js";
11
+ import { assembleDraft, BREAK, mediaNode, serializeDraft, SLACK_LIMITS, textNode, withoutLeadingBreaks, withMark, } from "./shared.js";
12
+ const BOLD = { kind: 'bold' };
13
+ const ITALIC = { kind: 'italic' };
14
+ const STRIKE = { kind: 'strike' };
15
+ const CODE = { kind: 'code' };
16
+ /** A heading: Slack has no heading syntax, so a bold line stands in. */
17
+ function heading(nodes) {
18
+ return [BREAK, ...withMark(nodes, BOLD), BREAK];
19
+ }
20
+ /** A code block: a fenced block with the language on the opening fence line. */
21
+ function fenced(nodes, lang) {
22
+ return withMark([BREAK, ...nodes, BREAK], lang === undefined
23
+ ? { kind: 'fence', lang: undefined }
24
+ : { kind: 'fence', lang });
25
+ }
26
+ /** Prefix every line of a subtree with the quote marker. */
27
+ function quoteLines(nodes) {
28
+ const quoted = [];
29
+ let atLineStart = true;
30
+ for (const node of nodes) {
31
+ if (node.type !== 'text') {
32
+ quoted.push(node);
33
+ continue;
34
+ }
35
+ let text = '';
36
+ for (const char of node.run.text) {
37
+ if (atLineStart && char !== '\n')
38
+ text += '> ';
39
+ text += char;
40
+ atLineStart = char === '\n';
41
+ }
42
+ quoted.push({ type: 'text', run: { text, marks: node.run.marks } });
43
+ }
44
+ return quoted;
45
+ }
46
+ /**
47
+ * Build the `mrkdwn` mode.
48
+ * @param replyBroadcast - `replyBroadcast` of the profile row.
49
+ * @returns the only mode of this adapter.
50
+ */
51
+ export function createMrkdwnMode(replyBroadcast) {
52
+ const elements = new ElementRegistry()
53
+ .register('text', (el) => textNode(escape(el.attrs.content)))
54
+ .register('p', (el, ctx) => [BREAK, ...ctx.render(el.children), BREAK])
55
+ .register('br', () => textNode('\n'))
56
+ .register('b', (el, ctx) => withMark(ctx.render(el.children), BOLD))
57
+ .register('i', (el, ctx) => withMark(ctx.render(el.children), ITALIC))
58
+ .register('s', (el, ctx) => withMark(ctx.render(el.children), STRIKE))
59
+ .register('code', (el, ctx) => withMark(ctx.render(el.children), CODE))
60
+ .register('a', (el, ctx) => {
61
+ const children = ctx.render(el.children);
62
+ const attachments = children.filter((node) => node.type === 'media');
63
+ if (el.attrs.href === '')
64
+ return children;
65
+ // A Slack link carries plain text only, so the label is the subtree's text and the attachments follow the link.
66
+ const label = escape(ctx.text(el.children));
67
+ return [
68
+ textNode(label === '' ? `<${el.attrs.href}>` : `<${el.attrs.href}|${label}>`),
69
+ ...attachments,
70
+ ];
71
+ })
72
+ .register('at', (el) => {
73
+ switch (el.attrs.type) {
74
+ case 'all':
75
+ return textNode('<!everyone>');
76
+ case 'here':
77
+ return textNode('<!here>');
78
+ default:
79
+ return el.attrs.id === undefined
80
+ ? textNode(`@${el.attrs.name ?? ''}`)
81
+ : textNode(`<@${el.attrs.id}>`);
82
+ }
83
+ }, { variants: ['user', 'all', 'here'] })
84
+ .register('channel', (el) => textNode(`<#${el.attrs.id}>`))
85
+ .register('emoji', (el) => el.attrs.id === ''
86
+ ? textNode(el.attrs.name ?? '')
87
+ : textNode(`:${el.attrs.id}:`))
88
+ .register('h1', (el, ctx) => heading(ctx.render(el.children)))
89
+ .register('h2', (el, ctx) => heading(ctx.render(el.children)))
90
+ .register('h3', (el, ctx) => heading(ctx.render(el.children)))
91
+ .register('h4', (el, ctx) => heading(ctx.render(el.children)))
92
+ .register('h5', (el, ctx) => heading(ctx.render(el.children)))
93
+ .register('h6', (el, ctx) => heading(ctx.render(el.children)))
94
+ .register('ul', (el, ctx) => [BREAK, ...ctx.render(el.children), BREAK])
95
+ .register('ol', (el, ctx) => [BREAK, ...ctx.render(el.children), BREAK])
96
+ .register('li', (el, ctx) => {
97
+ const parent = ctx.ancestors[ctx.ancestors.length - 1];
98
+ const ordered = parent?.type === 'ol';
99
+ const siblings = parent === undefined ? [] : parent.children;
100
+ const index = Math.max(siblings.indexOf(el), 0);
101
+ const start = ordered && parent.attrs.start !== undefined ? parent.attrs.start : 1;
102
+ return [
103
+ textNode(ordered ? `${start + index}. ` : '• '),
104
+ ...withoutLeadingBreaks(ctx.render(el.children)),
105
+ BREAK,
106
+ ];
107
+ })
108
+ .register('blockquote', (el, ctx) => quoteLines(ctx.render(el.children)))
109
+ .register('pre', (el, ctx) => fenced(ctx.render(el.children), el.attrs.lang), { variants: ['lang'] })
110
+ .register('hr', () => [BREAK, textNode('———'), BREAK])
111
+ .register('img', (el, ctx) => mediaNode(el, ctx), { variants: ['inline'] })
112
+ .register('audio', (el, ctx) => mediaNode(el, ctx))
113
+ .register('video', (el, ctx) => mediaNode(el, ctx))
114
+ .register('file', (el, ctx) => mediaNode(el, ctx));
115
+ return defineMode()({
116
+ id: 'mrkdwn',
117
+ elements,
118
+ limits: { 'limit.text.chars': SLACK_LIMITS.text },
119
+ assemble: (nodes) => assembleDraft(nodes),
120
+ serialize: (prepared, ctx) => serializeDraft(prepared, ctx, replyBroadcast),
121
+ });
122
+ }
123
+ //# sourceMappingURL=mrkdwn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mrkdwn.js","sourceRoot":"","sources":["../../../src/modes/mrkdwn.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAEhF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EACL,aAAa,EACb,KAAK,EACL,SAAS,EACT,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,oBAAoB,EACpB,QAAQ,GACT,MAAM,aAAa,CAAA;AAGpB,MAAM,IAAI,G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Z,QAAQ;QACR,MAAM,EAAE,EAAE,kBAAkB,EAAE,YAAY,CAAC,IAAI,EAAE;QACjD,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC;QACzC,SAAS,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,EAAE,cAAc,CAAC;KAC5E,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Draft model of the single `mrkdwn` mode: the node stream, the paragraph and media splitting, the 4,000-character
3
+ * split that never loses a character, and the exact request payload of one platform message.
4
+ *
5
+ * A run keeps its markup as data (`marks`) instead of embedding it in the text. That is what makes splitting exact: a
6
+ * cut closes the open markers and reopens them in the next chunk, because the markers are not part of the text being
7
+ * counted.
8
+ */
9
+ import type { ModeTypes, Prepared, RenderContext, ResourceRef, SerializeContext } from '@deepseek-ai/cordis-plugin-im-core';
10
+ import type { Element } from '@deepseek-ai/satori-element';
11
+ /** Slack's documented `text` bound: longer text is split into messages of about that size. */
12
+ export declare const SLACK_LIMITS: {
13
+ readonly text: 4000;
14
+ };
15
+ /** One markup wrapper of a run. */
16
+ export type SlackMark = {
17
+ kind: 'bold';
18
+ } | {
19
+ kind: 'italic';
20
+ } | {
21
+ kind: 'strike';
22
+ } | {
23
+ kind: 'code';
24
+ } | {
25
+ kind: 'link';
26
+ href: string;
27
+ } | {
28
+ kind: 'fence';
29
+ lang: string | undefined;
30
+ };
31
+ /** A piece of body text under a fixed stack of marks, outermost first. */
32
+ export interface SlackRun {
33
+ /** Already escaped text. */
34
+ text: string;
35
+ marks: readonly SlackMark[];
36
+ }
37
+ /** One node a mode handler produces. */
38
+ export type SlackNode = {
39
+ type: 'text';
40
+ run: SlackRun;
41
+ }
42
+ /** A paragraph boundary: at most one newline, and none at the start of a message. */
43
+ | {
44
+ type: 'break';
45
+ }
46
+ /** An attachment, published as a message of its own. */
47
+ | {
48
+ type: 'media';
49
+ ref: ResourceRef;
50
+ name: string;
51
+ };
52
+ /** One platform message before resource resolution. */
53
+ export type SlackDraft = {
54
+ type: 'text';
55
+ text: string;
56
+ } | {
57
+ type: 'file';
58
+ ref: ResourceRef;
59
+ name: string;
60
+ };
61
+ /** Exact request data of one platform message. */
62
+ export type SlackPayload = {
63
+ kind: 'message';
64
+ channel: string;
65
+ text: string;
66
+ threadTs?: string;
67
+ replyBroadcast?: boolean;
68
+ } | {
69
+ kind: 'file';
70
+ channel: string;
71
+ fileId: string;
72
+ name: string;
73
+ threadTs?: string;
74
+ };
75
+ /** Mode types of the single `mrkdwn` mode. */
76
+ export interface SlackModeTypes extends ModeTypes {
77
+ node: SlackNode;
78
+ draft: SlackDraft;
79
+ payload: SlackPayload;
80
+ }
81
+ /** A paragraph break node. */
82
+ export declare const BREAK: SlackNode;
83
+ /**
84
+ * Drop the paragraph break a container put in front of its content, so a list marker is not followed by a newline.
85
+ * @param nodes - rendered children.
86
+ * @returns the children without leading break nodes.
87
+ */
88
+ export declare function withoutLeadingBreaks(nodes: readonly SlackNode[]): SlackNode[];
89
+ /**
90
+ * One text node under the given marks.
91
+ * @param text - the already escaped text.
92
+ * @param marks - the marks wrapping it, outermost first.
93
+ * @returns the node.
94
+ */
95
+ export declare function textNode(text: string, marks?: readonly SlackMark[]): SlackNode;
96
+ /**
97
+ * Wrap every text run of a subtree with one mark.
98
+ *
99
+ * A run already carrying the same mark right above it is left alone, so `<b><b>x</b></b>` does not emit `**x**`.
100
+ *
101
+ * @param nodes - rendered children.
102
+ * @param mark - the mark to add.
103
+ * @returns the children with the mark added to their text runs.
104
+ */
105
+ export declare function withMark(nodes: readonly SlackNode[], mark: SlackMark): SlackNode[];
106
+ /**
107
+ * Render a run list as one message body, closing and reopening marks only where the stack changes.
108
+ * @param runs - the runs of one message.
109
+ * @returns the message body.
110
+ */
111
+ export declare function renderRuns(runs: readonly SlackRun[]): string;
112
+ /** Visible characters of a run list: one per Unicode code point. */
113
+ export declare function visibleLength(runs: readonly SlackRun[]): number;
114
+ /**
115
+ * Split a run list into chunks of at most `limit` visible characters.
116
+ *
117
+ * The cut prefers the last line break of the window, then the last space, then a hard cut; every chunk closes the
118
+ * marks it opened, so each message parses on its own. No visible character is ever dropped.
119
+ *
120
+ * @param runs - the whole message body.
121
+ * @param limit - visible characters per chunk.
122
+ * @returns the chunks, in order.
123
+ */
124
+ export declare function splitRuns(runs: readonly SlackRun[], limit: number): SlackRun[][];
125
+ /**
126
+ * Fold the rendered node stream into platform messages.
127
+ *
128
+ * Inline nodes share one body; a media element flushes the body and becomes a message of its own, as the upstream
129
+ * encoder does. A paragraph break adds one newline and never starts a message with one, and the ends of every message
130
+ * are trimmed.
131
+ *
132
+ * @param nodes - rendered nodes in document order.
133
+ * @returns one draft per platform message; a single empty text draft when the content renders nothing.
134
+ */
135
+ export declare function assembleDraft(nodes: readonly SlackNode[]): SlackDraft[];
136
+ /** The file name of an outbound attachment: the declared name, else the last path segment of the source. */
137
+ export declare function fileName(name: string | undefined, src: string): string;
138
+ /**
139
+ * The attachment node of one media element.
140
+ * @param el - one of `img`, `audio`, `video`, `file`.
141
+ * @param ctx - render context of the mode.
142
+ * @returns the node to publish after the body it was found in.
143
+ */
144
+ export declare function mediaNode(el: Element<'img' | 'audio' | 'video' | 'file'>, ctx: RenderContext<SlackModeTypes>): SlackNode;
145
+ /**
146
+ * The thread one part answers: an explicit thread, the referrer's thread, or — for the first part only — the quote.
147
+ *
148
+ * Slack's "reply to a message" is a thread reply, so a `<quote>` becomes `thread_ts`. Only the first part carries it,
149
+ * because the later parts of a split message would otherwise start threads of their own.
150
+ *
151
+ * @param ctx - serialize context.
152
+ * @returns the thread timestamp, when this part goes into a thread.
153
+ */
154
+ export declare function threadTsOf(ctx: SerializeContext): string | undefined;
155
+ /**
156
+ * Build the exact request data of one draft.
157
+ *
158
+ * @param prepared - the draft with its resources resolved.
159
+ * @param ctx - serialize context (channel, thread, part index).
160
+ * @param replyBroadcast - `replyBroadcast` of the profile row.
161
+ * @returns the request data of one platform message or file message.
162
+ */
163
+ export declare function serializeDraft(prepared: Prepared<SlackDraft>, ctx: SerializeContext, replyBroadcast: boolean): SlackPayload;
164
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/modes/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,QAAQ,EACR,aAAa,EACb,WAAW,EACX,gBAAgB,EACjB,MAAM,oCAAoC,CAAA;AAE3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AAE1D,8FAA8F;AAC9F,eAAO,MAAM,YAAY;;CAA2B,CAAA;AAEpD,mCAAmC;AACnC,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAA;AAE/C,0EAA0E;AAC1E,MAAM,WAAW,QAAQ;IACvB,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,SAAS,EAAE,CAAA;CAC5B;AAED,wCAAwC;AACxC,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,QAAQ,CAAA;CAAE;AACjC,qFAAqF;GACnF;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE;AACnB,wDAAwD;GACtD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,WAAW,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