@hiver/connector-agent 4.14.0-multiRef-beta.1 → 4.14.0-slack-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/app/connector-cards.d.ts.map +1 -1
- package/app/omni-slack/SlackConnectModalIsland.d.ts +26 -0
- package/app/omni-slack/SlackConnectModalIsland.d.ts.map +1 -0
- package/app/omni-slack/index.d.ts +14 -0
- package/app/omni-slack/index.d.ts.map +1 -0
- package/app/omni-slack/provider.d.ts +15 -0
- package/app/omni-slack/provider.d.ts.map +1 -0
- package/app/provider.d.ts.map +1 -1
- package/constants/tracking-events.d.ts +8 -0
- package/constants/tracking-events.d.ts.map +1 -1
- package/features/connector-cards/api/userAuth.d.ts +25 -0
- package/features/connector-cards/api/userAuth.d.ts.map +1 -0
- package/features/connector-cards/components/card-list/CardWithUserAuth.d.ts +33 -0
- package/features/connector-cards/components/card-list/CardWithUserAuth.d.ts.map +1 -0
- package/features/connector-cards/components/card-list/ListCards.d.ts.map +1 -1
- package/features/connector-cards/components/card-list/NoCardsUserAuthGate.d.ts +24 -0
- package/features/connector-cards/components/card-list/NoCardsUserAuthGate.d.ts.map +1 -0
- package/features/connector-cards/components/card-list/card-content-value.d.ts +2 -2
- package/features/connector-cards/components/card-list/card-content-value.d.ts.map +1 -1
- package/features/connector-cards/components/card-list/list-item-modal.d.ts.map +1 -1
- package/features/connector-cards/components/card-list/style.d.ts +0 -2
- package/features/connector-cards/components/card-list/style.d.ts.map +1 -1
- package/features/connector-cards/components/connection-in-progress-modal/index.d.ts +19 -0
- package/features/connector-cards/components/connection-in-progress-modal/index.d.ts.map +1 -0
- package/features/connector-cards/components/user-auth-card/__tests__/UserAuthCard.test.d.ts +2 -0
- package/features/connector-cards/components/user-auth-card/__tests__/UserAuthCard.test.d.ts.map +1 -0
- package/features/connector-cards/components/user-auth-card/index.d.ts +33 -0
- package/features/connector-cards/components/user-auth-card/index.d.ts.map +1 -0
- package/features/connector-cards/components/user-auth-card/style.d.ts +29 -0
- package/features/connector-cards/components/user-auth-card/style.d.ts.map +1 -0
- package/features/connector-cards/constants/api.d.ts +2 -0
- package/features/connector-cards/constants/api.d.ts.map +1 -1
- package/features/connector-cards/hooks/useUserAuthFlow.d.ts +42 -0
- package/features/connector-cards/hooks/useUserAuthFlow.d.ts.map +1 -0
- package/features/connector-cards/store/userAuth.d.ts +85 -0
- package/features/connector-cards/store/userAuth.d.ts.map +1 -0
- package/features/connector-cards/store/userAuth.test.d.ts +2 -0
- package/features/connector-cards/store/userAuth.test.d.ts.map +1 -0
- package/features/connector-cards/utils/registerUserAuthCallback.d.ts +13 -0
- package/features/connector-cards/utils/registerUserAuthCallback.d.ts.map +1 -0
- package/features/connector-cards/utils.d.ts +0 -1
- package/features/connector-cards/utils.d.ts.map +1 -1
- package/features/slack/api/channels.d.ts +11 -0
- package/features/slack/api/channels.d.ts.map +1 -0
- package/features/slack/api/conversations.d.ts +41 -0
- package/features/slack/api/conversations.d.ts.map +1 -0
- package/features/slack/api/effective-config.d.ts +21 -0
- package/features/slack/api/effective-config.d.ts.map +1 -0
- package/features/slack/api/index.d.ts +4 -0
- package/features/slack/api/index.d.ts.map +1 -0
- package/features/slack/api/linked-conv.d.ts +33 -0
- package/features/slack/api/linked-conv.d.ts.map +1 -0
- package/features/slack/api/members.d.ts +10 -0
- package/features/slack/api/members.d.ts.map +1 -0
- package/features/slack/api/messages.d.ts +10 -0
- package/features/slack/api/messages.d.ts.map +1 -0
- package/features/slack/api/normalise.d.ts +3 -0
- package/features/slack/api/normalise.d.ts.map +1 -0
- package/features/slack/avatar/SlackAvatar.d.ts +20 -0
- package/features/slack/avatar/SlackAvatar.d.ts.map +1 -0
- package/features/slack/avatar/cache.d.ts +10 -0
- package/features/slack/avatar/cache.d.ts.map +1 -0
- package/features/slack/avatar/index.d.ts +2 -0
- package/features/slack/avatar/index.d.ts.map +1 -0
- package/features/slack/components/HeroIllustration.d.ts +16 -0
- package/features/slack/components/HeroIllustration.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ChannelThreadGroup.d.ts +25 -0
- package/features/slack/components/LinkedConversationPanel/ChannelThreadGroup.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/Composer.d.ts +45 -0
- package/features/slack/components/LinkedConversationPanel/Composer.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/LeftChannelBanner.d.ts +26 -0
- package/features/slack/components/LinkedConversationPanel/LeftChannelBanner.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/LoadOlderMessages.d.ts +16 -0
- package/features/slack/components/LinkedConversationPanel/LoadOlderMessages.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/MentionPicker.d.ts +23 -0
- package/features/slack/components/LinkedConversationPanel/MentionPicker.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/MessageItem.d.ts +27 -0
- package/features/slack/components/LinkedConversationPanel/MessageItem.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ReconnectSlackBanner.d.ts +15 -0
- package/features/slack/components/LinkedConversationPanel/ReconnectSlackBanner.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ThreadDetailView.d.ts +19 -0
- package/features/slack/components/LinkedConversationPanel/ThreadDetailView.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ThreadSkeleton.d.ts +3 -0
- package/features/slack/components/LinkedConversationPanel/ThreadSkeleton.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/index.d.ts +27 -0
- package/features/slack/components/LinkedConversationPanel/index.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/style.d.ts +96 -0
- package/features/slack/components/LinkedConversationPanel/style.d.ts.map +1 -0
- package/features/slack/components/SlackConnectModal.d.ts +29 -0
- package/features/slack/components/SlackConnectModal.d.ts.map +1 -0
- package/features/slack/components/SlackConversationTab.d.ts +31 -0
- package/features/slack/components/SlackConversationTab.d.ts.map +1 -0
- package/features/slack/components/SlackLogo.d.ts +11 -0
- package/features/slack/components/SlackLogo.d.ts.map +1 -0
- package/features/slack/components/StartModal/SelectField.d.ts +19 -0
- package/features/slack/components/StartModal/SelectField.d.ts.map +1 -0
- package/features/slack/components/StartModal/SlackChannelTab.d.ts +21 -0
- package/features/slack/components/StartModal/SlackChannelTab.d.ts.map +1 -0
- package/features/slack/components/StartModal/SlackThreadTab.d.ts +25 -0
- package/features/slack/components/StartModal/SlackThreadTab.d.ts.map +1 -0
- package/features/slack/components/StartModal/TabIcon.d.ts +16 -0
- package/features/slack/components/StartModal/TabIcon.d.ts.map +1 -0
- package/features/slack/components/StartModal/index.d.ts +27 -0
- package/features/slack/components/StartModal/index.d.ts.map +1 -0
- package/features/slack/components/StartModal/style.d.ts +38 -0
- package/features/slack/components/StartModal/style.d.ts.map +1 -0
- package/features/slack/components/figma-tokens.d.ts +89 -0
- package/features/slack/components/figma-tokens.d.ts.map +1 -0
- package/features/slack/components/style.d.ts +54 -0
- package/features/slack/components/style.d.ts.map +1 -0
- package/features/slack/constants/api.d.ts +12 -0
- package/features/slack/constants/api.d.ts.map +1 -0
- package/features/slack/context.d.ts +40 -0
- package/features/slack/context.d.ts.map +1 -0
- package/features/slack/hooks/__tests__/useOlderMessages.test.d.ts +2 -0
- package/features/slack/hooks/__tests__/useOlderMessages.test.d.ts.map +1 -0
- package/features/slack/hooks/useLeftChannelGuard.d.ts +5 -0
- package/features/slack/hooks/useLeftChannelGuard.d.ts.map +1 -0
- package/features/slack/hooks/useOlderMessages.d.ts +51 -0
- package/features/slack/hooks/useOlderMessages.d.ts.map +1 -0
- package/features/slack/hooks/useSlackTabLabel.d.ts +23 -0
- package/features/slack/hooks/useSlackTabLabel.d.ts.map +1 -0
- package/features/slack/messageType.d.ts +16 -0
- package/features/slack/messageType.d.ts.map +1 -0
- package/features/slack/types/wire.d.ts +154 -0
- package/features/slack/types/wire.d.ts.map +1 -0
- package/features/toast-message/ToastRoot.d.ts.map +1 -1
- package/features/write-form/components/map-form-defaults/index.d.ts.map +1 -1
- package/features/write-form/components/write-form/index.d.ts.map +1 -1
- package/features/write-form/store/slice.d.ts.map +1 -1
- package/features/write-form/types/form.d.ts +0 -1
- package/features/write-form/types/form.d.ts.map +1 -1
- package/features/write-form/utils/response.d.ts.map +1 -1
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -1
- package/index.es.js +12491 -9617
- package/index.umd.js +1014 -423
- package/main-dev.d.ts.map +1 -1
- package/package.json +1 -1
- package/store/hooks.d.ts +2 -0
- package/store/hooks.d.ts.map +1 -1
- package/store/index.d.ts +6 -0
- package/store/index.d.ts.map +1 -1
- package/store/slice.d.ts +4 -4
- package/store/slice.d.ts.map +1 -1
- package/testing/mocks/handlers/fetch-cards.d.ts +4 -4
- package/testing/mocks/handlers/fetch-cards.d.ts.map +1 -1
- package/testing/mocks/handlers/slack.d.ts +35 -0
- package/testing/mocks/handlers/slack.d.ts.map +1 -0
- package/testing/mocks/handlers/user-auth.d.ts +31 -0
- package/testing/mocks/handlers/user-auth.d.ts.map +1 -0
- package/testing/mocks/handlers/write-capability.d.ts.map +1 -1
- package/testing/mocks/handlers.d.ts.map +1 -1
- package/types/cards.d.ts +6 -6
- package/types/cards.d.ts.map +1 -1
- package/types/form.d.ts +3 -2
- package/types/form.d.ts.map +1 -1
- package/utils/form.d.ts +3 -3
- package/utils/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;
|
|
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,26 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ITrackingData } from '../../context';
|
|
3
|
+
export interface SlackConnectModalIslandProps {
|
|
4
|
+
connectorId: string;
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** Fired once when user-auth completes. The Vue host re-polls
|
|
8
|
+
* user-auth status and swaps the pre-auth button for the tab. */
|
|
9
|
+
onConnected?: () => void;
|
|
10
|
+
/** Gainsight sink injected by the host. This mount path has no
|
|
11
|
+
* SlackContextProvider, so tracking is a direct prop. */
|
|
12
|
+
sendTrackingEvent?: (event: string, data?: ITrackingData) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Standalone mount point for the Slack connect modal, for hosts
|
|
16
|
+
* (outlook-ui) that render the conversation-thread tab bar themselves
|
|
17
|
+
* and need to trigger the connect/user-auth flow from a host button —
|
|
18
|
+
* WITHOUT mounting the full OmniSlackTab.
|
|
19
|
+
*
|
|
20
|
+
* Wraps only the providers useUserAuthFlow needs (Redux + theme +
|
|
21
|
+
* react-query); no SlackContext, since the modal takes connectorId as
|
|
22
|
+
* a prop. The modal itself portals to document.body, so this island's
|
|
23
|
+
* own DOM node stays empty.
|
|
24
|
+
*/
|
|
25
|
+
export declare const SlackConnectModalIsland: FC<SlackConnectModalIslandProps>;
|
|
26
|
+
//# 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;AAK3B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAK/C,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;IACzB;8DAC0D;IAC1D,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CACnE;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CA+BpE,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,CAYxD,CAAC"}
|
package/app/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/app/provider.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -48,4 +48,12 @@ export declare const LOOKUP_FIELD_CLICKED = "clicked_on_lookup_field";
|
|
|
48
48
|
export declare const LOOKUP_SAVED = "saved_lookup_config";
|
|
49
49
|
export declare const FIELD_MAP_BUTTON_CLICKED = "settings_defaults_modal_opened";
|
|
50
50
|
export declare const FIELD_MAP_CONFIG_SAVED = "defaults_configuration_saved";
|
|
51
|
+
export declare const SLACK_CONNECT_INITIATED = "slack_connect_initiated";
|
|
52
|
+
export declare const SLACK_CONNECT_SUCCESS = "slack_connect_success";
|
|
53
|
+
export declare const SLACK_START_CLICKED = "slack_start_clicked";
|
|
54
|
+
export declare const SLACK_START_SUBOPTION_SELECTED = "slack_start_suboption_selected";
|
|
55
|
+
export declare const SLACK_EXISTING_CHANNEL_LINKED = "slack_existing_channel_linked";
|
|
56
|
+
export declare const SLACK_NEW_CHANNEL_LINKED = "slack_new_channel_linked";
|
|
57
|
+
export declare const SLACK_REPLY_SENT = "slack_reply_sent";
|
|
58
|
+
export declare const SLACK_OLDER_MESSAGES_LOADED = "slack_older_messages_loaded";
|
|
51
59
|
//# sourceMappingURL=tracking-events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracking-events.d.ts","sourceRoot":"","sources":["../../src/constants/tracking-events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM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,4BAA4B,CAAC;AACjE,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,8BAA8B,mCAAmC,CAAC;AAC/E,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAC7D,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AACzE,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAChE,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,YAAY,wBAAwB,CAAC;AAClD,eAAO,MAAM,wBAAwB,mCAAmC,CAAC;AACzE,eAAO,MAAM,sBAAsB,iCAAiC,CAAC;AAGrE,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AACjE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAC7D,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,8BAA8B,mCAAmC,CAAC;AAC/E,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAC7E,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAInD,eAAO,MAAM,2BAA2B,gCAAgC,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,
|
|
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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ICard
|
|
1
|
+
import { ICard } from '../../../../types/cards';
|
|
2
2
|
interface IProps {
|
|
3
|
-
value?:
|
|
3
|
+
value?: string | null;
|
|
4
4
|
error?: string | null;
|
|
5
5
|
deepLink?: string | null;
|
|
6
6
|
statusCode?: string | number | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-content-value.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/card-content-value.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"card-content-value.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/card-content-value.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,UAAU,MAAM;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,gBAAgB,UAAW,MAAM,4CA4J7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-modal.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/list-item-modal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list-item-modal.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/list-item-modal.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEzD,UAAU,MAAM;IACd,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAC7D;AAaD,eAAO,MAAM,aAAa,+CAAgD,MAAM,4CAoG/E,CAAC"}
|
|
@@ -21,8 +21,6 @@ export declare const ErrorMessageDeepLink: StyledComponent<LinkProps>;
|
|
|
21
21
|
export declare const FeatureUpdatesText: StyledComponent<TypographyProps>;
|
|
22
22
|
export declare const DeepLink: StyledComponent<LinkProps>;
|
|
23
23
|
export declare const ValueText: StyledComponent<TypographyProps>;
|
|
24
|
-
export declare const ValueChipsWrapper: StyledComponent<BoxProps>;
|
|
25
|
-
export declare const ValueChip: StyledComponent<BoxProps>;
|
|
26
24
|
export declare const Arrow: StyledComponent<BoxProps>;
|
|
27
25
|
export declare const CustomSkeleton: StyledComponent<SkeletonProps & {
|
|
28
26
|
margin?: string;
|
|
@@ -1 +1 @@
|
|
|
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D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,GAAG;IAAE,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,CAIlH,CAAC;AAEJ,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,eAAe,CAO3D,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,eAAe,CAKzD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,QAAQ,CAIrD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,UAAU,CAQtD,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAAe,CAAC,QAAQ,CAW7D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eAAe,CAAC,QAAQ,CAI5D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,QAAQ,CAMpD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,UAAU,CActD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,WAAW,CAIvD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,eAAe,CAGvD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,QAAQ,CAIpD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAAe,CAAC,eAAe,CAOjE,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,UAAU,CAGvD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAAC,eAAe,CAO7D,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"}
|
package/features/connector-cards/components/user-auth-card/__tests__/UserAuthCard.test.d.ts.map
ADDED
|
@@ -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,MAA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AAqB,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 @@
|
|
|
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"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ConnectorAppMetrics, ICard, SpecificCardData, SpecificConnectorApiStatus } from '../../types/cards';
|
|
2
|
-
export declare const formatPrimitive: (item: string | number | boolean) => string;
|
|
3
2
|
export declare const extractErrorParams: (cardErrorMessage: string) => {
|
|
4
3
|
error_code: string | null;
|
|
5
4
|
error_message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/features/connector-cards/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,mBAAmB,EAAE,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/features/connector-cards/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,mBAAmB,EAAE,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAInH,eAAO,MAAM,kBAAkB,qBAAsB,MAAM;;;CAQ1D,CAAC;AAEF,eAAO,MAAM,yBAAyB,iBAAkB,MAAM,mBAAmB,MAAM,EAAE,WAIxF,CAAC;AAEF,eAAO,MAAM,WAAW,SAChB,KAAK,oBACO,gBAAgB,8BACN,0BAA0B,YAgBvD,CAAC;AAEF,eAAO,MAAM,WAAW,SAChB,KAAK,oBACO,gBAAgB,8BACN,0BAA0B,iCAWvD,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,KAAK,EAAE,EACd,gBAAgB,EAAE,gBAAgB,EAClC,0BAA0B,EAAE,0BAA0B;;;;EAkDvD"}
|