@hiver/connector-agent 4.21.2 → 4.22.0-slackM2-beta.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 (66) hide show
  1. package/app/hig-slack/HigSlackSection.d.ts +3 -0
  2. package/app/hig-slack/HigSlackSection.d.ts.map +1 -1
  3. package/constants/tracking-events.d.ts +4 -0
  4. package/constants/tracking-events.d.ts.map +1 -1
  5. package/features/slack/api/__tests__/errors.test.d.ts +2 -0
  6. package/features/slack/api/__tests__/errors.test.d.ts.map +1 -0
  7. package/features/slack/api/__tests__/links.test.d.ts +2 -0
  8. package/features/slack/api/__tests__/links.test.d.ts.map +1 -0
  9. package/features/slack/api/conversations.d.ts +6 -2
  10. package/features/slack/api/conversations.d.ts.map +1 -1
  11. package/features/slack/api/errors.d.ts +37 -0
  12. package/features/slack/api/errors.d.ts.map +1 -0
  13. package/features/slack/api/index.d.ts +2 -0
  14. package/features/slack/api/index.d.ts.map +1 -1
  15. package/features/slack/api/linked-conv.d.ts +11 -2
  16. package/features/slack/api/linked-conv.d.ts.map +1 -1
  17. package/features/slack/api/links.d.ts +90 -0
  18. package/features/slack/api/links.d.ts.map +1 -0
  19. package/features/slack/api/members.d.ts +2 -2
  20. package/features/slack/api/members.d.ts.map +1 -1
  21. package/features/slack/api/messages.d.ts +1 -1
  22. package/features/slack/api/messages.d.ts.map +1 -1
  23. package/features/slack/components/LinkExistingModal/index.d.ts +29 -0
  24. package/features/slack/components/LinkExistingModal/index.d.ts.map +1 -0
  25. package/features/slack/components/LinkedConversationPanel/Composer.d.ts.map +1 -1
  26. package/features/slack/components/LinkedConversationPanel/LinkedChannelHeader.d.ts +10 -3
  27. package/features/slack/components/LinkedConversationPanel/LinkedChannelHeader.d.ts.map +1 -1
  28. package/features/slack/components/LinkedConversationPanel/MessageItem.d.ts.map +1 -1
  29. package/features/slack/components/LinkedConversationPanel/ThreadDetailView.d.ts.map +1 -1
  30. package/features/slack/components/LinkedConversationPanel/index.d.ts +18 -1
  31. package/features/slack/components/LinkedConversationPanel/index.d.ts.map +1 -1
  32. package/features/slack/components/SlackConversationTab.d.ts.map +1 -1
  33. package/features/slack/components/SlackLinkList.d.ts +23 -0
  34. package/features/slack/components/SlackLinkList.d.ts.map +1 -0
  35. package/features/slack/components/StartModal/index.d.ts +8 -2
  36. package/features/slack/components/StartModal/index.d.ts.map +1 -1
  37. package/features/slack/constants/api.d.ts +6 -0
  38. package/features/slack/constants/api.d.ts.map +1 -1
  39. package/features/slack/context.d.ts +18 -0
  40. package/features/slack/context.d.ts.map +1 -1
  41. package/features/slack/hooks/__tests__/useMarkLinkRead.test.d.ts +2 -0
  42. package/features/slack/hooks/__tests__/useMarkLinkRead.test.d.ts.map +1 -0
  43. package/features/slack/hooks/useMarkLinkRead.d.ts +33 -0
  44. package/features/slack/hooks/useMarkLinkRead.d.ts.map +1 -0
  45. package/features/slack/hooks/useSlackLinks.d.ts +32 -0
  46. package/features/slack/hooks/useSlackLinks.d.ts.map +1 -0
  47. package/features/slack/link-scope.d.ts +7 -0
  48. package/features/slack/link-scope.d.ts.map +1 -0
  49. package/features/slack/types/wire.d.ts +75 -0
  50. package/features/slack/types/wire.d.ts.map +1 -1
  51. package/features/slack/utils/__tests__/join-notices.test.d.ts +2 -0
  52. package/features/slack/utils/__tests__/join-notices.test.d.ts.map +1 -0
  53. package/features/slack/utils/__tests__/slack-thread-url.test.d.ts +2 -0
  54. package/features/slack/utils/__tests__/slack-thread-url.test.d.ts.map +1 -0
  55. package/features/slack/utils/join-notices.d.ts +3 -0
  56. package/features/slack/utils/join-notices.d.ts.map +1 -0
  57. package/features/slack/utils/slack-thread-url.d.ts +23 -0
  58. package/features/slack/utils/slack-thread-url.d.ts.map +1 -0
  59. package/index.d.ts +3 -0
  60. package/index.d.ts.map +1 -1
  61. package/index.es.js +13471 -12560
  62. package/index.umd.js +647 -647
  63. package/main-dev.d.ts.map +1 -1
  64. package/package.json +1 -1
  65. package/testing/mocks/handlers/slack.d.ts +22 -12
  66. package/testing/mocks/handlers/slack.d.ts.map +1 -1
package/main-dev.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main-dev.d.ts","sourceRoot":"","sources":["../src/main-dev.tsx"],"names":[],"mappings":"AA4nBA,eAAO,MAAM,OAAO,+CAInB,CAAC"}
1
+ {"version":3,"file":"main-dev.d.ts","sourceRoot":"","sources":["../src/main-dev.tsx"],"names":[],"mappings":"AAstBA,eAAO,MAAM,OAAO,+CAInB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-agent",
3
- "version": "4.21.2",
3
+ "version": "4.22.0-slackM2-beta.0",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",
@@ -1,17 +1,18 @@
1
- import { SlackReaction, SlackTargetKind } from '../../../features/slack/types/wire';
1
+ import { SlackLinkedVia, SlackReaction, SlackTargetKind } from '../../../features/slack/types/wire';
2
2
  /**
3
3
  * MSW handlers for the Slack agent + effective-config endpoints.
4
4
  *
5
- * Mirrors handlers/user-auth.ts:
6
- * - In-memory state per hiverConvId, mutated by POST/PATCH/DELETE.
7
- * - VITE_SLACK_MOCK_STATE env var can pre-seed scenarios:
8
- * { "<hiverConvId>": { "linked": true, "channelName": "ops" } }
9
- * - VITE_SLACK_EFFECTIVE env var forces the effective-config
10
- * response, e.g. {"enabled":false,"reason":"config_not_found"}.
5
+ * M2 REWRITE: state is now MULTI-LINK — each hiverConvId holds an ordered
6
+ * list of link rows (link meta + its own conversation payload), capped at
7
+ * MOCK_LINK_CAP. All M2 endpoints are mocked (links list / unlink /
8
+ * mark-read / link-existing-thread / link-existing-channel / the DUMMY
9
+ * /preview/thread contract), and the M1 endpoints honor the new
10
+ * link_id / linkId selectors with the contract's fallback (omitted ⇒ most
11
+ * recently linked row).
11
12
  *
12
- * Default first-load: effective-config enabled + no linked thread →
13
- * panel renders the Ready state and the Start buttons. Click flow
14
- * mutates state in-memory; reload returns the new linked state.
13
+ * Seeding (VITE_SLACK_MOCK_STATE or __seedSlackLinkedConv) accepts the
14
+ * legacy single-link shape AND a `links: [...]` array for multi-link
15
+ * scenarios; each seeded link can carry its own unreadCount.
15
16
  */
16
17
  interface MockMessageOverrides {
17
18
  text?: string;
@@ -21,14 +22,23 @@ interface MockMessageOverrides {
21
22
  * plain descriptive notice line rather than a chat bubble. */
22
23
  subtype?: string;
23
24
  }
24
- interface MockConvSeed {
25
- linked?: boolean;
25
+ interface MockLinkSeed {
26
26
  channelName?: string;
27
27
  channelId?: string;
28
28
  /** 'channel' seeds the B4 all-threads view; defaults to 'thread'. */
29
29
  targetKind?: SlackTargetKind;
30
30
  messages?: MockMessageOverrides[];
31
+ unreadCount?: number;
32
+ linkedVia?: SlackLinkedVia;
33
+ }
34
+ interface MockConvSeed extends MockLinkSeed {
35
+ linked?: boolean;
36
+ /** Multi-link seed: when present, wins over the legacy single-link
37
+ * fields above and seeds one row per entry (linkedAt ascending). */
38
+ links?: MockLinkSeed[];
31
39
  }
40
+ /** Server-authoritative cap the mock enforces (contract currently 4). */
41
+ export declare const MOCK_LINK_CAP = 4;
32
42
  export declare const handlers: import('msw').HttpHandler[];
33
43
  /**
34
44
  * Test helpers — reset state between test cases.
@@ -1 +1 @@
1
- {"version":3,"file":"slack.d.ts","sourceRoot":"","sources":["../../../../src/testing/mocks/handlers/slack.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAIV,aAAa,EACb,eAAe,EAEhB,MAAM,6BAA6B,CAAC;AAMrC;;;;;;;;;;;;;GAaG;AAEH,UAAU,oBAAoB;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;IAC5B;mEAC+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,YAAY;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;I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