@hiver/connector-agent 4.13.2 → 4.13.3-slack-beta.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.
Files changed (136) hide show
  1. package/README.md +9 -9
  2. package/app/connector-cards.d.ts.map +1 -1
  3. package/app/omni-slack/SlackConnectModalIsland.d.ts +22 -0
  4. package/app/omni-slack/SlackConnectModalIsland.d.ts.map +1 -0
  5. package/app/omni-slack/index.d.ts +14 -0
  6. package/app/omni-slack/index.d.ts.map +1 -0
  7. package/app/omni-slack/provider.d.ts +15 -0
  8. package/app/omni-slack/provider.d.ts.map +1 -0
  9. package/app/provider.d.ts.map +1 -1
  10. package/features/connector-cards/api/userAuth.d.ts +25 -0
  11. package/features/connector-cards/api/userAuth.d.ts.map +1 -0
  12. package/features/connector-cards/components/card-list/CardWithUserAuth.d.ts +33 -0
  13. package/features/connector-cards/components/card-list/CardWithUserAuth.d.ts.map +1 -0
  14. package/features/connector-cards/components/card-list/ListCards.d.ts.map +1 -1
  15. package/features/connector-cards/components/card-list/NoCardsUserAuthGate.d.ts +24 -0
  16. package/features/connector-cards/components/card-list/NoCardsUserAuthGate.d.ts.map +1 -0
  17. package/features/connector-cards/components/connection-in-progress-modal/index.d.ts +19 -0
  18. package/features/connector-cards/components/connection-in-progress-modal/index.d.ts.map +1 -0
  19. package/features/connector-cards/components/user-auth-card/__tests__/UserAuthCard.test.d.ts +2 -0
  20. package/features/connector-cards/components/user-auth-card/__tests__/UserAuthCard.test.d.ts.map +1 -0
  21. package/features/connector-cards/components/user-auth-card/index.d.ts +33 -0
  22. package/features/connector-cards/components/user-auth-card/index.d.ts.map +1 -0
  23. package/features/connector-cards/components/user-auth-card/style.d.ts +29 -0
  24. package/features/connector-cards/components/user-auth-card/style.d.ts.map +1 -0
  25. package/features/connector-cards/constants/api.d.ts +2 -0
  26. package/features/connector-cards/constants/api.d.ts.map +1 -1
  27. package/features/connector-cards/hooks/useUserAuthFlow.d.ts +42 -0
  28. package/features/connector-cards/hooks/useUserAuthFlow.d.ts.map +1 -0
  29. package/features/connector-cards/store/userAuth.d.ts +85 -0
  30. package/features/connector-cards/store/userAuth.d.ts.map +1 -0
  31. package/features/connector-cards/store/userAuth.test.d.ts +2 -0
  32. package/features/connector-cards/store/userAuth.test.d.ts.map +1 -0
  33. package/features/connector-cards/utils/registerUserAuthCallback.d.ts +13 -0
  34. package/features/connector-cards/utils/registerUserAuthCallback.d.ts.map +1 -0
  35. package/features/slack/api/channels.d.ts +11 -0
  36. package/features/slack/api/channels.d.ts.map +1 -0
  37. package/features/slack/api/conversations.d.ts +17 -0
  38. package/features/slack/api/conversations.d.ts.map +1 -0
  39. package/features/slack/api/effective-config.d.ts +21 -0
  40. package/features/slack/api/effective-config.d.ts.map +1 -0
  41. package/features/slack/api/index.d.ts +4 -0
  42. package/features/slack/api/index.d.ts.map +1 -0
  43. package/features/slack/api/linked-conv.d.ts +33 -0
  44. package/features/slack/api/linked-conv.d.ts.map +1 -0
  45. package/features/slack/api/members.d.ts +10 -0
  46. package/features/slack/api/members.d.ts.map +1 -0
  47. package/features/slack/api/messages.d.ts +10 -0
  48. package/features/slack/api/messages.d.ts.map +1 -0
  49. package/features/slack/api/normalise.d.ts +3 -0
  50. package/features/slack/api/normalise.d.ts.map +1 -0
  51. package/features/slack/avatar/SlackAvatar.d.ts +20 -0
  52. package/features/slack/avatar/SlackAvatar.d.ts.map +1 -0
  53. package/features/slack/avatar/cache.d.ts +10 -0
  54. package/features/slack/avatar/cache.d.ts.map +1 -0
  55. package/features/slack/avatar/index.d.ts +2 -0
  56. package/features/slack/avatar/index.d.ts.map +1 -0
  57. package/features/slack/components/HeroIllustration.d.ts +16 -0
  58. package/features/slack/components/HeroIllustration.d.ts.map +1 -0
  59. package/features/slack/components/LinkedConversationPanel/ChannelThreadGroup.d.ts +25 -0
  60. package/features/slack/components/LinkedConversationPanel/ChannelThreadGroup.d.ts.map +1 -0
  61. package/features/slack/components/LinkedConversationPanel/Composer.d.ts +41 -0
  62. package/features/slack/components/LinkedConversationPanel/Composer.d.ts.map +1 -0
  63. package/features/slack/components/LinkedConversationPanel/LeftChannelBanner.d.ts +26 -0
  64. package/features/slack/components/LinkedConversationPanel/LeftChannelBanner.d.ts.map +1 -0
  65. package/features/slack/components/LinkedConversationPanel/MentionPicker.d.ts +23 -0
  66. package/features/slack/components/LinkedConversationPanel/MentionPicker.d.ts.map +1 -0
  67. package/features/slack/components/LinkedConversationPanel/MessageItem.d.ts +27 -0
  68. package/features/slack/components/LinkedConversationPanel/MessageItem.d.ts.map +1 -0
  69. package/features/slack/components/LinkedConversationPanel/ReconnectSlackBanner.d.ts +15 -0
  70. package/features/slack/components/LinkedConversationPanel/ReconnectSlackBanner.d.ts.map +1 -0
  71. package/features/slack/components/LinkedConversationPanel/ThreadDetailView.d.ts +19 -0
  72. package/features/slack/components/LinkedConversationPanel/ThreadDetailView.d.ts.map +1 -0
  73. package/features/slack/components/LinkedConversationPanel/ThreadSkeleton.d.ts +3 -0
  74. package/features/slack/components/LinkedConversationPanel/ThreadSkeleton.d.ts.map +1 -0
  75. package/features/slack/components/LinkedConversationPanel/index.d.ts +27 -0
  76. package/features/slack/components/LinkedConversationPanel/index.d.ts.map +1 -0
  77. package/features/slack/components/LinkedConversationPanel/style.d.ts +90 -0
  78. package/features/slack/components/LinkedConversationPanel/style.d.ts.map +1 -0
  79. package/features/slack/components/SlackConnectModal.d.ts +24 -0
  80. package/features/slack/components/SlackConnectModal.d.ts.map +1 -0
  81. package/features/slack/components/SlackConversationTab.d.ts +31 -0
  82. package/features/slack/components/SlackConversationTab.d.ts.map +1 -0
  83. package/features/slack/components/SlackLogo.d.ts +11 -0
  84. package/features/slack/components/SlackLogo.d.ts.map +1 -0
  85. package/features/slack/components/StartModal/SelectField.d.ts +19 -0
  86. package/features/slack/components/StartModal/SelectField.d.ts.map +1 -0
  87. package/features/slack/components/StartModal/SlackChannelTab.d.ts +21 -0
  88. package/features/slack/components/StartModal/SlackChannelTab.d.ts.map +1 -0
  89. package/features/slack/components/StartModal/SlackThreadTab.d.ts +25 -0
  90. package/features/slack/components/StartModal/SlackThreadTab.d.ts.map +1 -0
  91. package/features/slack/components/StartModal/TabIcon.d.ts +16 -0
  92. package/features/slack/components/StartModal/TabIcon.d.ts.map +1 -0
  93. package/features/slack/components/StartModal/index.d.ts +27 -0
  94. package/features/slack/components/StartModal/index.d.ts.map +1 -0
  95. package/features/slack/components/StartModal/style.d.ts +38 -0
  96. package/features/slack/components/StartModal/style.d.ts.map +1 -0
  97. package/features/slack/components/figma-tokens.d.ts +89 -0
  98. package/features/slack/components/figma-tokens.d.ts.map +1 -0
  99. package/features/slack/components/style.d.ts +54 -0
  100. package/features/slack/components/style.d.ts.map +1 -0
  101. package/features/slack/constants/api.d.ts +12 -0
  102. package/features/slack/constants/api.d.ts.map +1 -0
  103. package/features/slack/context.d.ts +30 -0
  104. package/features/slack/context.d.ts.map +1 -0
  105. package/features/slack/hooks/useLeftChannelGuard.d.ts +5 -0
  106. package/features/slack/hooks/useLeftChannelGuard.d.ts.map +1 -0
  107. package/features/slack/hooks/useSlackTabLabel.d.ts +23 -0
  108. package/features/slack/hooks/useSlackTabLabel.d.ts.map +1 -0
  109. package/features/slack/messageType.d.ts +16 -0
  110. package/features/slack/messageType.d.ts.map +1 -0
  111. package/features/slack/types/wire.d.ts +126 -0
  112. package/features/slack/types/wire.d.ts.map +1 -0
  113. package/features/toast-message/ToastRoot.d.ts.map +1 -1
  114. package/features/write-form/utils/response.d.ts.map +1 -1
  115. package/index.d.ts +5 -0
  116. package/index.d.ts.map +1 -1
  117. package/index.es.js +12100 -9258
  118. package/index.umd.js +1002 -404
  119. package/main-dev.d.ts.map +1 -1
  120. package/package.json +1 -1
  121. package/store/hooks.d.ts +2 -0
  122. package/store/hooks.d.ts.map +1 -1
  123. package/store/index.d.ts +6 -0
  124. package/store/index.d.ts.map +1 -1
  125. package/testing/mocks/handlers/fetch-cards.d.ts +2 -2
  126. package/testing/mocks/handlers/fetch-cards.d.ts.map +1 -1
  127. package/testing/mocks/handlers/slack.d.ts +35 -0
  128. package/testing/mocks/handlers/slack.d.ts.map +1 -0
  129. package/testing/mocks/handlers/user-auth.d.ts +31 -0
  130. package/testing/mocks/handlers/user-auth.d.ts.map +1 -0
  131. package/testing/mocks/handlers/write-capability.d.ts.map +1 -1
  132. package/testing/mocks/handlers.d.ts.map +1 -1
  133. package/types/cards.d.ts +1 -0
  134. package/types/cards.d.ts.map +1 -1
  135. package/types/form.d.ts +2 -0
  136. package/types/form.d.ts.map +1 -1
package/README.md CHANGED
@@ -19,10 +19,10 @@ export default tseslint.config({
19
19
  // other options...
20
20
  parserOptions: {
21
21
  project: ['./tsconfig.node.json', './tsconfig.app.json'],
22
- tsconfigRootDir: import.meta.dirname,
23
- },
24
- },
25
- })
22
+ tsconfigRootDir: import.meta.dirname
23
+ }
24
+ }
25
+ });
26
26
  ```
27
27
 
28
28
  - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
@@ -31,20 +31,20 @@ export default tseslint.config({
31
31
 
32
32
  ```js
33
33
  // eslint.config.js
34
- import react from 'eslint-plugin-react'
34
+ import react from 'eslint-plugin-react';
35
35
 
36
36
  export default tseslint.config({
37
37
  // Set the react version
38
38
  settings: { react: { version: '18.3' } },
39
39
  plugins: {
40
40
  // Add the react plugin
41
- react,
41
+ react
42
42
  },
43
43
  rules: {
44
44
  // other rules...
45
45
  // Enable its recommended rules
46
46
  ...react.configs.recommended.rules,
47
- ...react.configs['jsx-runtime'].rules,
48
- },
49
- })
47
+ ...react.configs['jsx-runtime'].rules
48
+ }
49
+ });
50
50
  ```
@@ -1 +1 @@
1
- {"version":3,"file":"connector-cards.d.ts","sourceRoot":"","sources":["../../src/app/connector-cards.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAkF,MAAM,OAAO,CAAC;AAmG3G,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,SAAS,CAomBxC,CAAC"}
1
+ {"version":3,"file":"connector-cards.d.ts","sourceRoot":"","sources":["../../src/app/connector-cards.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAkF,MAAM,OAAO,CAAC;AAuG3G,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,SAAS,CA2oBxC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { FC } from 'react';
2
+ export interface SlackConnectModalIslandProps {
3
+ connectorId: string;
4
+ open: boolean;
5
+ onClose: () => void;
6
+ /** Fired once when user-auth completes. The Vue host re-polls
7
+ * user-auth status and swaps the pre-auth button for the tab. */
8
+ onConnected?: () => void;
9
+ }
10
+ /**
11
+ * Standalone mount point for the Slack connect modal, for hosts
12
+ * (outlook-ui) that render the conversation-thread tab bar themselves
13
+ * and need to trigger the connect/user-auth flow from a host button —
14
+ * WITHOUT mounting the full OmniSlackTab.
15
+ *
16
+ * Wraps only the providers useUserAuthFlow needs (Redux + theme +
17
+ * react-query); no SlackContext, since the modal takes connectorId as
18
+ * a prop. The modal itself portals to document.body, so this island's
19
+ * own DOM node stays empty.
20
+ */
21
+ export declare const SlackConnectModalIsland: FC<SlackConnectModalIslandProps>;
22
+ //# sourceMappingURL=SlackConnectModalIsland.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlackConnectModalIsland.d.ts","sourceRoot":"","sources":["../../../src/app/omni-slack/SlackConnectModalIsland.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQ3B,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;sEACkE;IAClE,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAapE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { SlackContextData } from '../../features/slack/context';
3
+ export type OmniSlackTabProps = SlackContextData;
4
+ /**
5
+ * Top-level mount point outlook-ui consumes for the Slack tab
6
+ * inside the conversation thread area (sibling to "Conversation").
7
+ *
8
+ * Outlook-ui places this component inside its own tab system —
9
+ * NOT alongside <OmniEmailLogger> in the right-panel area. The
10
+ * tab bar / tab labels are host-owned; we only render the active-
11
+ * tab content + the portal-mounted connect modal.
12
+ */
13
+ export declare const OmniSlackTab: FC<OmniSlackTabProps>;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app/omni-slack/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAM3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAIjE,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAEjD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAuB9C,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { SlackContextData } from '../../features/slack/context';
3
+ interface OmniSlackProviderProps extends SlackContextData {
4
+ children: ReactNode;
5
+ }
6
+ /**
7
+ * Provider stack for the Slack right-panel. Mirrors LoggerAppProvider
8
+ * (apps/agent/src/app/email-logger/provider.tsx) — Redux + theme +
9
+ * react-query + feature context, in that order. Slack feature reads
10
+ * `hiverConvId` + `connectorId` from SlackContextProvider via
11
+ * useSlackContext().
12
+ */
13
+ export declare const OmniSlackProvider: FC<OmniSlackProviderProps>;
14
+ export {};
15
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/app/omni-slack/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,UAAU,sBAAuB,SAAQ,gBAAgB;IACvD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAUxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/app/provider.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,WAAW,oKAYrB,gBAAgB,4CA2BlB,CAAC"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/app/provider.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,WAAW,oKAYrB,gBAAgB,4CAqClB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { UserAuthState } from '../store/userAuth';
2
+ export interface UserAuthStatusResponse {
3
+ state: UserAuthState;
4
+ reason?: string;
5
+ external_user_id?: string;
6
+ }
7
+ export interface UserAuthStartResponse {
8
+ auth_url: string;
9
+ tier: 'user';
10
+ }
11
+ /**
12
+ * Reads the signed-in agent's user-tier connection state for a
13
+ * connector. Called on card mount when `connector.userAuthEnabled`
14
+ * is true; not called for legacy connectors so legacy mount paths
15
+ * stay byte-for-byte unchanged.
16
+ */
17
+ export declare const getUserAuthStatus: (connectorId: string) => Promise<import('axios').AxiosResponse<any, any> | undefined>;
18
+ /**
19
+ * Builds the OAuth authorization URL the agent visits in a popup to
20
+ * connect their personal account. The BE encodes `state.tier=user`
21
+ * + `state.user_id` so the callback knows to land in
22
+ * /process_user_callback rather than the workspace flow.
23
+ */
24
+ export declare const startUserAuth: (connectorId: string) => Promise<import('axios').AxiosResponse<any, any> | undefined>;
25
+ //# sourceMappingURL=userAuth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userAuth.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/api/userAuth.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE/E,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,iEAKpD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,gBAAiB,MAAM,iEAKhD,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { FC } from 'react';
2
+ import { ICard, ISpecificCard } from '../../../../types/cards';
3
+ import { ApiStatus } from '../../../../types/api';
4
+ interface IProps {
5
+ card: ICard;
6
+ email: string;
7
+ specificCardData: Record<string, ISpecificCard> | null;
8
+ specificConnectorApiStatus: Record<string, ApiStatus> | null;
9
+ defaultOpenState: boolean;
10
+ onCardUnlinking: () => void;
11
+ isPrimaryUserAuthCard?: boolean;
12
+ }
13
+ /**
14
+ * Wraps the regular Card render with the user-tier auth gate.
15
+ *
16
+ * - When the install has not opted into user-tier auth
17
+ * (`card.userAuthEnabled !== true`) → renders the regular Card.
18
+ * Zero behavior change for legacy connectors.
19
+ *
20
+ * - When opted in:
21
+ * * On mount, fetches /user-auth/status once via tanstack-query
22
+ * (30s staleTime → batches across cards sharing the connector).
23
+ * * If the resolved state is `connected` (or `unknown` while the
24
+ * fetch is in-flight) → renders the regular Card.
25
+ * * Otherwise renders <UserAuthCard /> with the right variant.
26
+ *
27
+ * The `onConnected` callback invalidates the card data query so
28
+ * the regular Card mounts immediately after the popup completes,
29
+ * without forcing the user to refresh or remount.
30
+ */
31
+ export declare const CardWithUserAuth: FC<IProps>;
32
+ export {};
33
+ //# sourceMappingURL=CardWithUserAuth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardWithUserAuth.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/CardWithUserAuth.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAU3B,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,UAAU,MAAM;IACd,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,IAAI,CAAC;IACvD,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC;IAC7D,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;IAK5B,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAgFvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ListCards.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/ListCards.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,UAAU,MAAM;IACd,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,IAAI,CAAC;IACvD,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC;IAC7D,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,MAAM,CAiChC,CAAC"}
1
+ {"version":3,"file":"ListCards.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/ListCards.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,UAAU,MAAM;IACd,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,IAAI,CAAC;IACvD,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC;IAC7D,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,MAAM,CAwChC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface IUserAuthConnector {
3
+ connectorId: string;
4
+ connectorName: string;
5
+ connectorLogo: string;
6
+ }
7
+ interface IProps {
8
+ connectors: IUserAuthConnector[];
9
+ onConnected: () => void;
10
+ children: ReactNode;
11
+ }
12
+ /**
13
+ * Renders the "Sign in to use X" card on the agent panel when there are no
14
+ * linked cards yet but the connector is opted into user-tier auth and the
15
+ * agent hasn't connected. Without this, the sign-in CTA only ever appeared
16
+ * inside ListCards (per linked card), so a brand-new install showed the
17
+ * create/link banner with no way to authenticate.
18
+ *
19
+ * When no connector is blocking (all connected, or status still unknown)
20
+ * the children (create banner) render as before.
21
+ */
22
+ export declare const NoCardsUserAuthGate: FC<IProps>;
23
+ export {};
24
+ //# sourceMappingURL=NoCardsUserAuthGate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NoCardsUserAuthGate.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/NoCardsUserAuthGate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUtC,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,MAAM;IAGd,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,WAAW,EAAE,MAAM,IAAI,CAAC;IAGxB,QAAQ,EAAE,SAAS,CAAC;CACrB;AA8CD;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,MAAM,CAa1C,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { FC } from 'react';
2
+ /**
3
+ * Renders Figma frame 2 — the centered "Connection in progress"
4
+ * overlay shown while a user-tier OAuth popup is open.
5
+ *
6
+ * Mounted once at the app/connector-cards.tsx level rather than
7
+ * per-card. The slice's selectAnyInProgressConnectorId selector
8
+ * naturally dedupes across concurrent connect attempts (which
9
+ * shouldn't happen — the bifrost interceptor only kicks in for
10
+ * one connector at a time — but the design is defensive).
11
+ *
12
+ * Per the spec the modal has no close button. The user must
13
+ * complete the OAuth flow (or close the popup themselves, at
14
+ * which point the 5-min in-progress timeout in useUserAuthFlow
15
+ * fires and the modal disappears with the state transition).
16
+ */
17
+ declare const ConnectionInProgressModal: FC;
18
+ export default ConnectionInProgressModal;
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/connection-in-progress-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAiBpC;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,yBAAyB,EAAE,EA0DhC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=UserAuthCard.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserAuthCard.test.d.ts","sourceRoot":"","sources":["../../../../../../src/features/connector-cards/components/user-auth-card/__tests__/UserAuthCard.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,33 @@
1
+ import { FC } from 'react';
2
+ import { UserAuthState } from '../../store/userAuth';
3
+ interface UserAuthCardProps {
4
+ connectorId: string;
5
+ connectorName: string;
6
+ connectorLogo: string;
7
+ variant: UserAuthState;
8
+ /** Optional reason from the backend (e.g. `workspace_mismatch`,
9
+ * `site_access_denied`, `refresh_failed`). Used to pick
10
+ * variant-specific copy below. */
11
+ reason?: string;
12
+ /** Called once the connect popup flow lands at `connected`.
13
+ * Typically retries the original API call that surfaced the
14
+ * 412. Pass-through to useUserAuthFlow. */
15
+ onConnected?: () => void;
16
+ }
17
+ /**
18
+ * Renders Figma frames 1 and 4 (and their variants). Same component
19
+ * for both — the only difference is the badge + copy.
20
+ *
21
+ * - `disconnected` / `unknown` → frame 1: "Sign in to use X"
22
+ * - `reauth_required` → frame 4: "Authentication failed"
23
+ * - `workspace_mismatch` → frame 4 with workspace-specific copy
24
+ * - `in_progress` → button disabled + spinner; the
25
+ * centered modal owns the user's attention but the card body
26
+ * stays mounted so layout doesn't shift when the modal closes.
27
+ * - `connected` → this component shouldn't render
28
+ * when state === connected; the parent routes to the normal card.
29
+ * Defensive fall-through renders nothing.
30
+ */
31
+ declare const UserAuthCard: FC<UserAuthCardProps>;
32
+ export default UserAuthCard;
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/user-auth-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAe,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAiB/E,UAAU,iBAAiB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,aAAa,CAAC;IACvB;;uCAEmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;gDAE4C;IAC5C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA0GvC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { HTMLAttributes, ImgHTMLAttributes } from 'react';
2
+ import { StackProps, BoxProps, ButtonProps } from '@hiver/hiver-ui-kit';
3
+ import { StyledComponent } from '@emotion/styled';
4
+ /**
5
+ * Outer card — pale purple wash matching the no-connectors empty
6
+ * state. Two visually-distinct sections inside: the logo block on
7
+ * top, the title/body/CTA below. No outer border — the pale
8
+ * background carries enough separation from the page.
9
+ */
10
+ export declare const CardWrapper: StyledComponent<BoxProps>;
11
+ /**
12
+ * The two-logo block sits in its own slightly-inset panel at the
13
+ * top of the card, matching the Figma's two-section composition.
14
+ */
15
+ export declare const LogoPanel: StyledComponent<BoxProps>;
16
+ export declare const LogoRow: StyledComponent<StackProps>;
17
+ export declare const LogoImage: StyledComponent<ImgHTMLAttributes<HTMLImageElement>>;
18
+ /**
19
+ * Red exclamation badge overlaid on the app logo for the
20
+ * reauth_required / workspace_mismatch variants.
21
+ */
22
+ export declare const ErrorBadge: StyledComponent<HTMLAttributes<HTMLSpanElement>>;
23
+ /**
24
+ * Bold indigo CTA matching Figma. theme.palette.purple.primary is
25
+ * the same token the no-connectors card uses for its accent border
26
+ * and text, so the button locks into the existing design system.
27
+ */
28
+ export declare const AuthenticateButton: StyledComponent<ButtonProps>;
29
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/user-auth-card/style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,QAAQ,CAQjD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,eAAe,CAAC,QAAQ,CAO/C,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,eAAe,CAAC,UAAU,CAM/C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAK1E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,cAAc,CAAC,eAAe,CAAC,CAevE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,WAAW,CAiB3D,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export declare const BASE_URL = "/v1/api";
2
2
  export declare const FETCH_ALL_CARDS_API: string;
3
3
  export declare const FETCH_SPECIFIC_CARD_API: string;
4
+ export declare const USER_AUTH_STATUS_API: string;
5
+ export declare const USER_AUTH_START_API: string;
4
6
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/constants/api.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,YAAY,CAAC;AAClC,eAAO,MAAM,mBAAmB,EAAE,MAAuC,CAAC;AAC1E,eAAO,MAAM,uBAAuB,EAAE,MAAgD,CAAC"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/constants/api.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,YAAY,CAAC;AAClC,eAAO,MAAM,mBAAmB,EAAE,MAAuC,CAAC;AAC1E,eAAO,MAAM,uBAAuB,EAAE,MAAgD,CAAC;AAIvF,eAAO,MAAM,oBAAoB,EAAE,MAA+D,CAAC;AACnG,eAAO,MAAM,mBAAmB,EAAE,MAA8D,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { UserAuthEntry, UserAuthState } from '../store/userAuth';
2
+ interface UseUserAuthFlowOptions {
3
+ /**
4
+ * Called when the polling loop transitions to `connected`.
5
+ * Typically used to retry the original failed API call.
6
+ */
7
+ onConnected?: () => void;
8
+ }
9
+ interface UseUserAuthFlowReturn {
10
+ entry: UserAuthEntry;
11
+ state: UserAuthState;
12
+ connect: () => Promise<void>;
13
+ isStarting: boolean;
14
+ }
15
+ /**
16
+ * Orchestrates a user-tier connect flow:
17
+ * 1. `connect()` calls POST /user-auth/start and opens the
18
+ * authorization URL in a popup.
19
+ * 2. Marks the connector in_progress in redux.
20
+ * 3. Polls GET /user-auth/status every 2s via tanstack-query;
21
+ * stops polling on a terminal state.
22
+ * 4. On `connected`, calls onConnected so the caller can retry
23
+ * the original failed API call without forcing a remount.
24
+ *
25
+ * Polling cadence + tanstack-query usage mirrors the admin app's
26
+ * authSuccessQuery — same pattern, scoped per-connector here.
27
+ */
28
+ export declare function useUserAuthFlow(connectorId: string, options?: UseUserAuthFlowOptions): UseUserAuthFlowReturn;
29
+ /**
30
+ * One-shot fetcher used at card-mount time. Doesn't poll — drops
31
+ * the result into the slice and exits. The polling-on-in_progress
32
+ * behavior is handled separately by useUserAuthFlow above.
33
+ */
34
+ export declare function useFetchUserAuthStatus(connectorId: string, enabled: boolean): void;
35
+ /**
36
+ * Exposed for tests + the rare "user clicked Disconnect from the
37
+ * customer-identity-mapping menu" path — wipes the slice entry so
38
+ * the next card mount triggers a fresh status fetch.
39
+ */
40
+ export declare function useResetUserAuth(): (connectorId: string) => void;
41
+ export {};
42
+ //# sourceMappingURL=useUserAuthFlow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUserAuthFlow.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/hooks/useUserAuthFlow.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAkB9F,UAAU,sBAAsB;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,UAAU,qBAAqB;IAC7B,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B,GAAG,qBAAqB,CAuKhH;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,QAqB3E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,kBAGd,MAAM,UAKvB"}
@@ -0,0 +1,85 @@
1
+ import { PayloadAction } from '@reduxjs/toolkit';
2
+ import { RootState } from '../../../store';
3
+ /**
4
+ * Per-connector user-tier authentication state.
5
+ *
6
+ * The resolver on the backend reads three gates: an LD flag,
7
+ * `connector.user_auth_enabled`, and the API's `auth_tier`. When all
8
+ * three open the flow lands at `user_connectors` lookup. This slice
9
+ * mirrors that lookup's result on the client so the right-panel can
10
+ * render the appropriate state without re-hitting the BE on every
11
+ * card mount.
12
+ */
13
+ export type UserAuthState = 'unknown' | 'disconnected' | 'in_progress' | 'connected' | 'reauth_required' | 'workspace_mismatch';
14
+ export interface UserAuthEntry {
15
+ state: UserAuthState;
16
+ reason?: string;
17
+ externalUserId?: string;
18
+ connectUrl?: string;
19
+ lastChecked?: number;
20
+ }
21
+ export interface UserAuthSlice {
22
+ byConnectorId: {
23
+ [connectorId: string]: UserAuthEntry;
24
+ };
25
+ }
26
+ interface StatusReceivedPayload {
27
+ connectorId: string;
28
+ state: UserAuthState;
29
+ reason?: string;
30
+ externalUserId?: string;
31
+ }
32
+ interface AuthRequiredPayload {
33
+ connectorId: string;
34
+ connectUrl: string;
35
+ reason?: string;
36
+ }
37
+ interface InProgressPayload {
38
+ connectorId: string;
39
+ }
40
+ interface CompletedPayload {
41
+ connectorId: string;
42
+ externalUserId?: string;
43
+ }
44
+ interface FailedPayload {
45
+ connectorId: string;
46
+ reason: string;
47
+ }
48
+ interface ResetPayload {
49
+ connectorId: string;
50
+ }
51
+ export declare const userAuthSlice: import('@reduxjs/toolkit').Slice<UserAuthSlice, {
52
+ /**
53
+ * Result of GET /user-auth/status — full picture from the server.
54
+ * Replaces any local in-progress state too: if a poll comes back
55
+ * with `connected` while we thought we were `in_progress`, we
56
+ * adopt the server's view.
57
+ */
58
+ userAuthStatusReceived(state: import('immer').WritableDraft<UserAuthSlice>, action: PayloadAction<StatusReceivedPayload>): void;
59
+ /**
60
+ * Fired from the bifrost 412 interceptor. Carries the connect URL
61
+ * so the UI can launch the popup without a separate
62
+ * /user-auth/start round-trip when the user opts to connect.
63
+ * Multiple concurrent 412s for the same connector are naturally
64
+ * deduped because we key on connectorId.
65
+ */
66
+ userAuthRequired(state: import('immer').WritableDraft<UserAuthSlice>, action: PayloadAction<AuthRequiredPayload>): void;
67
+ userAuthInProgress(state: import('immer').WritableDraft<UserAuthSlice>, action: PayloadAction<InProgressPayload>): void;
68
+ userAuthCompleted(state: import('immer').WritableDraft<UserAuthSlice>, action: PayloadAction<CompletedPayload>): void;
69
+ userAuthFailed(state: import('immer').WritableDraft<UserAuthSlice>, action: PayloadAction<FailedPayload>): void;
70
+ userAuthReset(state: import('immer').WritableDraft<UserAuthSlice>, action: PayloadAction<ResetPayload>): void;
71
+ }, "userAuth", "userAuth", import('@reduxjs/toolkit').SliceSelectors<UserAuthSlice>>;
72
+ export declare const userAuthStatusReceived: import('@reduxjs/toolkit').ActionCreatorWithPayload<StatusReceivedPayload, "userAuth/userAuthStatusReceived">, userAuthRequired: import('@reduxjs/toolkit').ActionCreatorWithPayload<AuthRequiredPayload, "userAuth/userAuthRequired">, userAuthInProgress: import('@reduxjs/toolkit').ActionCreatorWithPayload<InProgressPayload, "userAuth/userAuthInProgress">, userAuthCompleted: import('@reduxjs/toolkit').ActionCreatorWithPayload<CompletedPayload, "userAuth/userAuthCompleted">, userAuthFailed: import('@reduxjs/toolkit').ActionCreatorWithPayload<FailedPayload, "userAuth/userAuthFailed">, userAuthReset: import('@reduxjs/toolkit').ActionCreatorWithPayload<ResetPayload, "userAuth/userAuthReset">;
73
+ declare const _default: import('redux').Reducer<UserAuthSlice>;
74
+ export default _default;
75
+ export declare const selectUserAuthEntry: (state: RootState, connectorId: string) => UserAuthEntry;
76
+ export declare const selectUserAuthState: (state: RootState, connectorId: string) => UserAuthState;
77
+ export declare const selectIsUserConnected: (state: RootState, connectorId: string) => boolean;
78
+ export declare const selectConnectUrl: (state: RootState, connectorId: string) => string | undefined;
79
+ /**
80
+ * Any connector currently in the in_progress state. The modal mounts
81
+ * once at the app level rather than per-card; this selector tells it
82
+ * whether to render.
83
+ */
84
+ export declare const selectAnyInProgressConnectorId: (state: RootState) => string | undefined;
85
+ //# sourceMappingURL=userAuth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userAuth.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/store/userAuth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;GASG;AAEH,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,cAAc,GACd,aAAa,GACb,WAAW,GACX,iBAAiB,GACjB,oBAAoB,CAAC;AAEzB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE;QAAE,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,CAAA;KAAE,CAAC;CACzD;AAMD,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,mBAAmB;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,iBAAiB;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,aAAa;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAYD,UAAU,YAAY;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,aAAa;IAItB;;;;;OAKG;wFACmC,aAAa,CAAC,qBAAqB,CAAC;IAsB1E;;;;;;OAMG;kFAC6B,aAAa,CAAC,mBAAmB,CAAC;oFAiBhC,aAAa,CAAC,iBAAiB,CAAC;mFAUjC,aAAa,CAAC,gBAAgB,CAAC;gFASlC,aAAa,CAAC,aAAa,CAAC;+EAW7B,aAAa,CAAC,YAAY,CAAC;oFAI1D,CAAC;AAEH,eAAO,MACL,sBAAsB,iHACtB,gBAAgB,yGAChB,kBAAkB,yGAClB,iBAAiB,uGACjB,cAAc,iGACd,aAAa,6FACU,CAAC;;AAE1B,wBAAqC;AAMrC,eAAO,MAAM,mBAAmB,UAAW,SAAS,eAAe,MAAM,KAAG,aACxB,CAAC;AAErD,eAAO,MAAM,mBAAmB,UAAW,SAAS,eAAe,MAAM,KAAG,aAC7B,CAAC;AAEhD,eAAO,MAAM,qBAAqB,UAAW,SAAS,eAAe,MAAM,KAAG,OACf,CAAC;AAEhE,eAAO,MAAM,gBAAgB,UAAW,SAAS,eAAe,MAAM,KAAG,MAAM,GAAG,SAC9B,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,UAAW,SAAS,KAAG,MAAM,GAAG,SAK1E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=userAuth.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userAuth.test.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/store/userAuth.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Wires the bifrost transport's 412 USER_AUTH_REQUIRED hook to the
3
+ * agent app's redux store. Bifrost is host-agnostic by design — it
4
+ * holds a callback reference rather than importing redux directly,
5
+ * so we attach the dispatcher here on the agent side.
6
+ *
7
+ * Idempotent: hosts that initialize the agent multiple times in
8
+ * one page session (rare but possible in single-page consumers)
9
+ * won't double-fire the dispatch because the callback assignment
10
+ * just overwrites the previous reference.
11
+ */
12
+ export declare const registerUserAuthCallback: () => void;
13
+ //# sourceMappingURL=registerUserAuthCallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerUserAuthCallback.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/utils/registerUserAuthCallback.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,QAAO,IAsB3C,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { SlackChannel } from '../types/wire';
2
+ /**
3
+ * Lists Slack channels accessible to the signed-in agent. Backend
4
+ * endpoint pending — UI uses MSW mock for now. Once backend ships,
5
+ * the response shape should be `{ channels: SlackChannel[] }`.
6
+ *
7
+ * Drives UI-3's existing-channel picker. Cache the result for 60s
8
+ * so opening the modal multiple times doesn't re-fetch.
9
+ */
10
+ export declare function useSlackChannels(): import('@tanstack/react-query').UseQueryResult<SlackChannel[], Error>;
11
+ //# sourceMappingURL=channels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/api/channels.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,0EAc/B"}
@@ -0,0 +1,17 @@
1
+ import { ExternalConversation, SlackThreadGroup, StartExistingChannelRequest, StartNewChannelRequest, StartResponse } from '../types/wire';
2
+ export declare const startExistingChannel: (payload: StartExistingChannelRequest) => Promise<StartResponse>;
3
+ export declare const startNewChannel: (payload: StartNewChannelRequest) => Promise<StartResponse>;
4
+ export declare const getExternalConversation: (hiverConvId: string) => Promise<ExternalConversation>;
5
+ /**
6
+ * Channel mode (B4): lazily fetch a single thread's full messages
7
+ * (root + replies) when the user drills into it. The list view only
8
+ * carries roots + reply counts, so this is the on-demand fetch.
9
+ */
10
+ export declare const getThread: (hiverConvId: string, threadTs: string) => Promise<SlackThreadGroup>;
11
+ export declare const getExternalConversationsByTarget: (params: {
12
+ channelId: string;
13
+ externalThreadTs?: string;
14
+ }) => Promise<{
15
+ hiverConvIds: string[];
16
+ }>;
17
+ //# sourceMappingURL=conversations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/api/conversations.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,oBAAoB,EAIpB,gBAAgB,EAChB,2BAA2B,EAC3B,sBAAsB,EACtB,aAAa,EACd,MAAM,6BAA6B,CAAC;AA2CrC,eAAO,MAAM,oBAAoB,YAAmB,2BAA2B,KAAG,OAAO,CAAC,aAAa,CAQtG,CAAC;AAEF,eAAO,MAAM,eAAe,YAAmB,sBAAsB,KAAG,OAAO,CAAC,aAAa,CAQ5F,CAAC;AAEF,eAAO,MAAM,uBAAuB,gBAAuB,MAAM,KAAG,OAAO,CAAC,oBAAoB,CAqB/F,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,gBAAuB,MAAM,YAAY,MAAM,KAAG,OAAO,CAAC,gBAAgB,CAM/F,CAAC;AAEF,eAAO,MAAM,gCAAgC,WAAkB;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,KAAG,OAAO,CAAC;IAAE,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAUrC,CAAC"}
@@ -0,0 +1,21 @@
1
+ export type EffectiveConfigReason = 'config_not_found' | 'role_not_allowed' | 'user_not_in_mailbox' | 'feature_flag_off' | 'effective';
2
+ export interface EffectiveConfigResponse {
3
+ enabled: boolean;
4
+ reason: EffectiveConfigReason;
5
+ workspaceConnectorId?: string | null;
6
+ }
7
+ /**
8
+ * Resolves whether the signed-in user can use Slack in this mailbox.
9
+ * Backend evaluates: SM-admin config exists, this user's role is in
10
+ * allow-list, mailbox is in scope, LD flag is on. Returns one of
11
+ * five reason codes (Phase 9 contract).
12
+ *
13
+ * `smId` is required by the backend (`sm_id` query param). Pre-2026-06-09
14
+ * the hook called the endpoint without it and 422'd every time — the
15
+ * caller (SlackConversationTab) now sources smId from SlackContext.
16
+ *
17
+ * Lives on the agent side because every Slack panel mount calls it;
18
+ * admin only consumes it from the Configure page to preview gating.
19
+ */
20
+ export declare function useSlackEffectiveConfig(smId: string): import('@tanstack/react-query').UseQueryResult<EffectiveConfigResponse, Error>;
21
+ //# sourceMappingURL=effective-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effective-config.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/api/effective-config.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,qBAAqB,GAC7B,kBAAkB,GAClB,kBAAkB,GAClB,qBAAqB,GACrB,kBAAkB,GAClB,WAAW,CAAC;AAEhB,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,kFAcnD"}
@@ -0,0 +1,4 @@
1
+ export { getExternalConversation, getExternalConversationsByTarget, startExistingChannel, startNewChannel } from './conversations';
2
+ export { postMessage } from './messages';
3
+ export { getChannelMembers } from './members';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,oBAAoB,EACpB,eAAe,EAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { ExternalConversation, SlackThreadGroup } from '../types/wire';
2
+ /**
3
+ * Polling cadence for the linked-conversation refetch. Currently a
4
+ * stopgap until VS's websocket setup lands ([[plan-slack-m1-phase-X]]
5
+ * — Cross-repo dependency #10) — events don't push into the UI yet,
6
+ * so we pull on a timer to keep inbound Slack messages visible. The
7
+ * 5s default is chosen to be perceptually "live" without hammering
8
+ * the backend; set this constant (or override via `refetchIntervalMs`
9
+ * arg to `useLinkedConversation`) when ws ships and we want to drop
10
+ * the timer.
11
+ */
12
+ export declare const LINKED_CONV_POLL_INTERVAL_MS = 5000;
13
+ /**
14
+ * Reads the linked Slack thread for a Hiver conversation, if any.
15
+ * Returns `null` on 404 (no link yet) and surfaces other errors
16
+ * normally so the panel can render the left-channel / 502 states.
17
+ *
18
+ * Used by SlackEmptyState (UI-1) to branch between the "Start" CTAs
19
+ * and the LinkedConversationPanel (UI-5). Polls every
20
+ * LINKED_CONV_POLL_INTERVAL_MS while the tab is mounted so inbound
21
+ * Slack messages surface without a websocket — react-query pauses
22
+ * the timer automatically when the tab is in the background, so
23
+ * idle conversations don't burn requests.
24
+ */
25
+ export declare function useLinkedConversation(hiverConvId: string, enabled?: boolean, refetchIntervalMs?: number): import('@tanstack/react-query').UseQueryResult<ExternalConversation | null, Error>;
26
+ /**
27
+ * Channel mode (B4): lazily fetch a single thread's messages (root +
28
+ * replies) when the user drills into it from the channel list. Enabled
29
+ * only while a thread is open, so the channel list view never pays for
30
+ * replies. Polls on the same cadence so live replies surface.
31
+ */
32
+ export declare function useThread(hiverConvId: string, threadTs: string | null): import('@tanstack/react-query').UseQueryResult<SlackThreadGroup, Error>;
33
+ //# sourceMappingURL=linked-conv.d.ts.map