@mgamadeus/ddd-agents 0.11.13 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -6
- package/boundary.json +5 -0
- package/dist/admin.js +13712 -0
- package/dist/admin.js.map +1 -0
- package/dist/chat.js +1627 -109
- package/dist/chat.js.map +1 -1
- package/dist/chunks/{AgentsConversationClientContext-C4T7g_Qk.js → AgentsConversationClientContext-B_UJSLXU.js} +2 -2
- package/dist/chunks/{AgentsConversationClientContext-C4T7g_Qk.js.map → AgentsConversationClientContext-B_UJSLXU.js.map} +1 -1
- package/dist/chunks/{ConversationMarkdown-D-aP3Ssl.js → ConversationMarkdown-DlvwT3Qk.js} +5 -4
- package/dist/chunks/{ConversationMarkdown-D-aP3Ssl.js.map → ConversationMarkdown-DlvwT3Qk.js.map} +1 -1
- package/dist/chunks/{ConversationMessageInputComposerWidgets-7HNAmZE1.js → ConversationMessageInputComposerWidgets-TchR1lPj.js} +6 -6
- package/dist/chunks/{ConversationMessageInputComposerWidgets-7HNAmZE1.js.map → ConversationMessageInputComposerWidgets-TchR1lPj.js.map} +1 -1
- package/dist/chunks/{VoiceBarsIcon-FhLAcgLG.js → VoiceBarsIcon-y3mgSqbn.js} +4 -4
- package/dist/chunks/{VoiceBarsIcon-FhLAcgLG.js.map → VoiceBarsIcon-y3mgSqbn.js.map} +1 -1
- package/dist/chunks/{WebSearchResultsConversationWidget-dEq19U7k.js → WebSearchResultsConversationWidget-l9Aek_lG.js} +3 -2
- package/dist/chunks/WebSearchResultsConversationWidget-l9Aek_lG.js.map +1 -0
- package/dist/chunks/agents-http-trace-mappers-LWNi-3a4.js +759 -0
- package/dist/chunks/agents-http-trace-mappers-LWNi-3a4.js.map +1 -0
- package/dist/chunks/{browser-request-interception-ydNOzeUL.js → browser-request-interception-D678IemW.js} +2 -2
- package/dist/chunks/{browser-request-interception-ydNOzeUL.js.map → browser-request-interception-D678IemW.js.map} +1 -1
- package/dist/chunks/{canvas-reducers-BInd3xNz.js → canvas-reducers-BYArW_Ji.js} +2 -2
- package/dist/chunks/{canvas-reducers-BInd3xNz.js.map → canvas-reducers-BYArW_Ji.js.map} +1 -1
- package/dist/chunks/{canvas-title-slot-context-BI1PLnPn.js → canvas-title-slot-context-BRGnFzYP.js} +3 -3
- package/dist/chunks/{canvas-title-slot-context-BI1PLnPn.js.map → canvas-title-slot-context-BRGnFzYP.js.map} +1 -1
- package/dist/chunks/{canvasBodies-CRVh8pCw.js → canvasBodies-BjXypuHf.js} +4 -4
- package/dist/chunks/{canvasBodies-CRVh8pCw.js.map → canvasBodies-BjXypuHf.js.map} +1 -1
- package/dist/chunks/{canvasStorage-Cr3omZeI.js → canvasStorage-DSspwRMg.js} +2 -2
- package/dist/chunks/{canvasStorage-Cr3omZeI.js.map → canvasStorage-DSspwRMg.js.map} +1 -1
- package/dist/chunks/content-from-unified-diff-CovnmG2Q.js +2927 -0
- package/dist/chunks/content-from-unified-diff-CovnmG2Q.js.map +1 -0
- package/dist/chunks/{contract-C18owGKs.js → contract-886XjdID.js} +2 -2
- package/dist/chunks/{contract-C18owGKs.js.map → contract-886XjdID.js.map} +1 -1
- package/dist/chunks/{conversation-CbWEHPbL.js → conversation-B7-evdj_.js} +4 -4
- package/dist/chunks/{conversation-CbWEHPbL.js.map → conversation-B7-evdj_.js.map} +1 -1
- package/dist/chunks/{icon-names-Di6c4zLo.js → icon-names-C5PeVvkJ.js} +32 -1
- package/dist/chunks/icon-names-C5PeVvkJ.js.map +1 -0
- package/dist/chunks/{link-navigation-DRHt6g7U.js → index-DZovGMpG.js} +65 -106
- package/dist/chunks/index-DZovGMpG.js.map +1 -0
- package/dist/chunks/link-navigation-a_sRfmsj.js +49 -0
- package/dist/chunks/link-navigation-a_sRfmsj.js.map +1 -0
- package/dist/chunks/{widget-name-resolver-Dq6Ejo7d.js → widget-name-resolver-DS3zH_5W.js} +5 -4
- package/dist/chunks/{widget-name-resolver-Dq6Ejo7d.js.map → widget-name-resolver-DS3zH_5W.js.map} +1 -1
- package/dist/chunks/{withPollingChangeSubscription-ClyOABgu.js → withPollingChangeSubscription-XvCpjGmd.js} +13 -2
- package/dist/chunks/{withPollingChangeSubscription-ClyOABgu.js.map → withPollingChangeSubscription-XvCpjGmd.js.map} +1 -1
- package/dist/client-testing.js +5 -5
- package/dist/client.js +50 -231
- package/dist/client.js.map +1 -1
- package/dist/contract.js +5 -5
- package/dist/files/i18n-keys.json +18091 -1287
- package/dist/files/widgets/DriveFilesConversationWidget/DriveFilesConversationWidget.md +3 -3
- package/dist/image-render.js +7 -7
- package/dist/index.js +62 -61
- package/dist/index.js.map +1 -1
- package/dist/kit.js +2 -2
- package/dist/preview.js +7 -7
- package/dist/provider.js +57 -56
- package/dist/provider.js.map +1 -1
- package/dist/renderer.js +15 -15
- package/dist/styles.css +2962 -15
- package/dist/types/admin/blocks/CodeBlock.d.ts +28 -0
- package/dist/types/admin/blocks/DetailModal.d.ts +34 -0
- package/dist/types/admin/blocks/Disclosure.d.ts +25 -0
- package/dist/types/admin/blocks/JsonTree.d.ts +18 -0
- package/dist/types/admin/blocks/LineDiffView.d.ts +18 -0
- package/dist/types/admin/blocks/ProportionBar.d.ts +43 -0
- package/dist/types/admin/blocks/TokenFigure.d.ts +14 -0
- package/dist/types/admin/blocks/json-tree.d.ts +40 -0
- package/dist/types/admin/blocks/line-diff.d.ts +46 -0
- package/dist/types/admin/blocks/proportion-bar.d.ts +34 -0
- package/dist/types/admin/blocks/series-fill-classes.d.ts +13 -0
- package/dist/types/admin/blocks/token-figure.d.ts +8 -0
- package/dist/types/admin/connections/AgentConnectionCard.d.ts +21 -0
- package/dist/types/admin/connections/AgentConnectionDriveRootSpaces.d.ts +25 -0
- package/dist/types/admin/connections/AgentConnectionDriveScopeDialog.d.ts +20 -0
- package/dist/types/admin/connections/AgentConnectionDriveSearchFilters.d.ts +34 -0
- package/dist/types/admin/connections/AgentConnectionDrivesDrawer.d.ts +39 -0
- package/dist/types/admin/connections/AgentConnectionLevelsDrawer.d.ts +27 -0
- package/dist/types/admin/connections/AgentConnectionSharingDialog.d.ts +12 -0
- package/dist/types/admin/connections/AgentConnectionsPanel.d.ts +97 -0
- package/dist/types/admin/connections/AgentConnectionsScreen.d.ts +18 -0
- package/dist/types/admin/connections/ConnectDialogs.d.ts +22 -0
- package/dist/types/admin/connections/agent-connection-drive-scope.d.ts +112 -0
- package/dist/types/admin/connections/agent-connection-drives.d.ts +107 -0
- package/dist/types/admin/connections/agent-connection-format.d.ts +82 -0
- package/dist/types/admin/connections/agent-connection-oauth.d.ts +122 -0
- package/dist/types/admin/connections/agent-connections-api.d.ts +420 -0
- package/dist/types/admin/connections/agent-connections-context.d.ts +60 -0
- package/dist/types/admin/connections/agent-connections-types.d.ts +447 -0
- package/dist/types/admin/connections/connection-logos.d.ts +53 -0
- package/dist/types/admin/connections/connection-parts.d.ts +84 -0
- package/dist/types/admin/connections/use-agent-connect.d.ts +25 -0
- package/dist/types/admin/context/CompactionThresholdBanner.d.ts +13 -0
- package/dist/types/admin/context/ContextCompositionPanel.d.ts +27 -0
- package/dist/types/admin/context/ContextSegmentList.d.ts +20 -0
- package/dist/types/admin/context/SentPayloadPanel.d.ts +37 -0
- package/dist/types/admin/context/agent-inspect-context-api.d.ts +53 -0
- package/dist/types/admin/context/agent-inspect-context-types.d.ts +98 -0
- package/dist/types/admin/context/context-composition-grouping.d.ts +78 -0
- package/dist/types/admin/context/context-segment-families.d.ts +18 -0
- package/dist/types/admin/context/context-segment-label-texts.d.ts +19 -0
- package/dist/types/admin/context/context-segment-labels.d.ts +18 -0
- package/dist/types/admin/control-panel/AgentControlPanelScreen.d.ts +71 -0
- package/dist/types/admin/control-panel/BudgetsTab.d.ts +13 -0
- package/dist/types/admin/control-panel/SettingsTab.d.ts +22 -0
- package/dist/types/admin/control-panel/SpacesTab.d.ts +24 -0
- package/dist/types/admin/control-panel/StatisticsTab.d.ts +26 -0
- package/dist/types/admin/control-panel/TimeSeriesChartCard.d.ts +37 -0
- package/dist/types/admin/control-panel/ToolResponseSamplesDrawer.d.ts +22 -0
- package/dist/types/admin/control-panel/agent-control-panel-api.d.ts +104 -0
- package/dist/types/admin/control-panel/agent-control-panel-types.d.ts +241 -0
- package/dist/types/admin/control-panel/budget-meters.d.ts +35 -0
- package/dist/types/admin/control-panel/control-panel-statistics.d.ts +49 -0
- package/dist/types/admin/control-panel/runtime-settings-form.d.ts +44 -0
- package/dist/types/admin/control-panel/time-series-chart.d.ts +54 -0
- package/dist/types/admin/conversations/AgentConversationDetailScreen.d.ts +128 -0
- package/dist/types/admin/conversations/AgentConversationsScreen.d.ts +60 -0
- package/dist/types/admin/conversations/ContextPanel.d.ts +9 -0
- package/dist/types/admin/conversations/ConversationActions.d.ts +32 -0
- package/dist/types/admin/conversations/ConversationTurns.d.ts +56 -0
- package/dist/types/admin/conversations/DebugSwitchBar.d.ts +23 -0
- package/dist/types/admin/conversations/DelegationPanel.d.ts +6 -0
- package/dist/types/admin/conversations/ModelContextDialog.d.ts +31 -0
- package/dist/types/admin/conversations/RequestCompositionRows.d.ts +14 -0
- package/dist/types/admin/conversations/RequestsPanel.d.ts +21 -0
- package/dist/types/admin/conversations/SandboxPanel.d.ts +42 -0
- package/dist/types/admin/conversations/StepDetailDialog.d.ts +19 -0
- package/dist/types/admin/conversations/agent-inspect-api.d.ts +259 -0
- package/dist/types/admin/conversations/agent-inspect-mappers.d.ts +23 -0
- package/dist/types/admin/conversations/agent-inspect-types.d.ts +517 -0
- package/dist/types/admin/conversations/conversation-list-export.d.ts +64 -0
- package/dist/types/admin/conversations/conversation-list-filters.d.ts +59 -0
- package/dist/types/admin/conversations/debug-switches.d.ts +27 -0
- package/dist/types/admin/conversations/delegation-swimlanes.d.ts +78 -0
- package/dist/types/admin/conversations/header-facts.d.ts +23 -0
- package/dist/types/admin/conversations/inspect-format.d.ts +44 -0
- package/dist/types/admin/conversations/inspect-parts.d.ts +42 -0
- package/dist/types/admin/conversations/inspect-scope.d.ts +92 -0
- package/dist/types/admin/conversations/model-call-rows.d.ts +78 -0
- package/dist/types/admin/conversations/step-descriptions.d.ts +43 -0
- package/dist/types/admin/conversations/touched-files-tree.d.ts +47 -0
- package/dist/types/admin/conversations/turn-paging.d.ts +56 -0
- package/dist/types/admin/conversations/turn-segments.d.ts +36 -0
- package/dist/types/admin/conversations/turn-timeline.d.ts +22 -0
- package/dist/types/admin/conversations/use-query-loader.d.ts +8 -0
- package/dist/types/admin/period/AdminPeriodControl.d.ts +15 -0
- package/dist/types/admin/period/admin-period.d.ts +51 -0
- package/dist/types/admin/quality/AgentQualityEvalRunScreen.d.ts +30 -0
- package/dist/types/admin/quality/AgentQualityScreen.d.ts +38 -0
- package/dist/types/admin/quality/SaveAsEvalCaseDialog.d.ts +27 -0
- package/dist/types/admin/quality/agent-quality-api.d.ts +86 -0
- package/dist/types/admin/quality/agent-quality-format.d.ts +52 -0
- package/dist/types/admin/quality/agent-quality-types.d.ts +161 -0
- package/dist/types/admin/schedules/AgentSchedulesPanel.d.ts +43 -0
- package/dist/types/admin/schedules/agent-schedules-api.d.ts +116 -0
- package/dist/types/admin/schedules/agent-schedules-format.d.ts +25 -0
- package/dist/types/admin/schedules/agent-schedules-types.d.ts +113 -0
- package/dist/types/admin/shared/AdminHrefLink.d.ts +13 -0
- package/dist/types/admin/skills/AgentSkillCatalogScreen.d.ts +51 -0
- package/dist/types/admin/skills/SharedBlocksPanel.d.ts +14 -0
- package/dist/types/admin/skills/SkillPurposesPanel.d.ts +16 -0
- package/dist/types/admin/skills/SkillTreeRowView.d.ts +31 -0
- package/dist/types/admin/skills/ToolSchemaDrawer.d.ts +21 -0
- package/dist/types/admin/skills/agent-skill-catalog-api.d.ts +89 -0
- package/dist/types/admin/skills/agent-skill-catalog-types.d.ts +223 -0
- package/dist/types/admin/skills/skill-catalog-colors.d.ts +10 -0
- package/dist/types/admin/skills/skill-catalog-tree.d.ts +159 -0
- package/dist/types/admin/skills/skill-purpose-texts.d.ts +11 -0
- package/dist/types/admin/wire/admin-wire.d.ts +21 -0
- package/dist/types/chat/controller/AgentChatController.d.ts +22 -0
- package/dist/types/chat/controller/turn-initiators.d.ts +21 -0
- package/dist/types/chat/trace/BackgroundTasksList.d.ts +35 -0
- package/dist/types/chat/trace/ChangeSetCard.d.ts +34 -0
- package/dist/types/chat/trace/ChangedFilesPane.d.ts +33 -0
- package/dist/types/chat/trace/ChangedRecordsList.d.ts +34 -0
- package/dist/types/chat/trace/ConsentRequestCard.d.ts +23 -0
- package/dist/types/chat/trace/ContextRing.d.ts +19 -0
- package/dist/types/chat/trace/ConversationChildTrace.d.ts +18 -0
- package/dist/types/chat/trace/ConversationTurnTrace.d.ts +48 -0
- package/dist/types/chat/trace/EntityChip.d.ts +23 -0
- package/dist/types/chat/trace/FileChangesSummary.d.ts +14 -0
- package/dist/types/chat/trace/FileEditBlock.d.ts +42 -0
- package/dist/types/chat/trace/LoadedSkillsDisclosure.d.ts +16 -0
- package/dist/types/chat/trace/QueuedMessageChip.d.ts +17 -0
- package/dist/types/chat/trace/RunStatusLine.d.ts +27 -0
- package/dist/types/chat/trace/StepKindDetails.d.ts +59 -0
- package/dist/types/chat/trace/SubAgentStepGroup.d.ts +53 -0
- package/dist/types/chat/trace/TaskPlanPane.d.ts +31 -0
- package/dist/types/chat/trace/TaskPlanRow.d.ts +28 -0
- package/dist/types/chat/trace/TerminalBlock.d.ts +16 -0
- package/dist/types/chat/trace/ThinkingBlock.d.ts +19 -0
- package/dist/types/chat/trace/ToolStepDetail.d.ts +49 -0
- package/dist/types/chat/trace/ToolStepGroup.d.ts +58 -0
- package/dist/types/chat/trace/ToolStepRow.d.ts +52 -0
- package/dist/types/chat/trace/TraceViewModeSwitch.d.ts +14 -0
- package/dist/types/chat/trace/TurnMetaLine.d.ts +27 -0
- package/dist/types/chat/trace/content-from-unified-diff.d.ts +25 -0
- package/dist/types/chat/trace/conversation-trace-loader.d.ts +133 -0
- package/dist/types/chat/trace/index.d.ts +34 -0
- package/dist/types/chat/trace/parse-unified-diff.d.ts +51 -0
- package/dist/types/chat/trace/task-plan-counts.d.ts +41 -0
- package/dist/types/chat/trace/trace-collect.d.ts +91 -0
- package/dist/types/chat/trace/trace-counts.d.ts +21 -0
- package/dist/types/chat/trace/trace-format.d.ts +73 -0
- package/dist/types/chat/trace/trace-labels.d.ts +60 -0
- package/dist/types/chat/trace/trace-parts.d.ts +63 -0
- package/dist/types/chat/trace/trace-step-focus.d.ts +12 -0
- package/dist/types/chat/trace/trace-types.d.ts +370 -0
- package/dist/types/chat/trace/use-conversation-trace.d.ts +47 -0
- package/dist/types/client/AgentsConversationClient.d.ts +20 -0
- package/dist/types/client/http/agents-http-trace-mappers.d.ts +31 -0
- package/dist/types/client/http/agents-http-trace-wire.d.ts +433 -0
- package/dist/types/contract/conversation-trace.d.ts +594 -0
- package/dist/types/entries/admin.d.ts +85 -0
- package/dist/types/entries/chat.d.ts +3 -1
- package/dist/types/entries/client.d.ts +2 -0
- package/dist/types/entries/contract.d.ts +1 -0
- package/dist/types/provider/components/icon-names.d.ts +4 -2
- package/dist/types/provider/components/types.d.ts +3 -1
- package/dist/types/widgets/DriveFilesConversationWidget/shared/drive-files.d.ts +1 -1
- package/dist/voice.js +3 -3
- package/dist/widgets.js +6 -6
- package/package.json +7 -3
- package/public-api.json +1036 -3
- package/dist/chunks/WebSearchResultsConversationWidget-dEq19U7k.js.map +0 -1
- package/dist/chunks/icon-names-Di6c4zLo.js.map +0 -1
- package/dist/chunks/link-navigation-DRHt6g7U.js.map +0 -1
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import { type ApiMutationHook, type ApiQueryHook, type InjectableBaseApi, type InjectedRequest, type StaticQueryFailure } from "@mgamadeus/ddd-admin-ui/logic/pure";
|
|
2
|
+
import type { AgentConnectionAccountLinkArg, AgentConnectionAddressArg, AgentConnectionApprovalAnswerArg, AgentConnectionApprovalsArg, AgentConnectionApprovalsResponse, AgentConnectionDetailResponse, AgentConnectionDriveItemsArg, AgentConnectionDriveItemsSearchArg, AgentConnectionDriveRootAddArg, AgentConnectionDriveRootItemArg, AgentConnectionDriveRootReleaseArg, AgentConnectionDriveRootReleaseRevokeArg, AgentConnectionDriveRootReleasesArg, AgentConnectionDriveRootRevokeArg, AgentConnectionDriveRootsArg, AgentConnectionDriveRootsResponse, AgentConnectionIdArg, AgentConnectionImapArg, AgentConnectionLevelArg, AgentConnectionOAuthStartArg, AgentConnectionOAuthStartResponse, AgentConnectionReleaseArg, AgentConnectionReleaseToAgentArg, AgentConnectionSettingsArg, AgentConnectionSlackArg, AgentConnectionsResponse } from "./agent-connections-types";
|
|
3
|
+
/** The cache tag type of the connection operations (ids `LIST`, `DETAIL`, `DRIVES`, `APPROVALS`). */
|
|
4
|
+
export declare const AGENT_CONNECTIONS_TAG = "AdminUiAgentConnections";
|
|
5
|
+
/**
|
|
6
|
+
* The hooks `createAgentConnectionsApi` returns: every route of `AdminAgentConnectionsTrait` a browser calls with the
|
|
7
|
+
* session, and the drive routes of `AdminAgentConnectionDrivesTrait` (a host that does not mount that trait answers
|
|
8
|
+
* 404 there: the panel then shows no drive section, see `AgentConnectionsPanelProps.driveRoots`). The OAuth callback
|
|
9
|
+
* (`GET /oauth/{provider}/callback`) is opened by the provider's redirect, never by a hook.
|
|
10
|
+
*/
|
|
11
|
+
export interface AgentConnectionsApi {
|
|
12
|
+
/** `GET /connections`: the connections the account sees, the connectable providers, the system right, the share targets. */
|
|
13
|
+
useAgentConnectionsQuery: ApiQueryHook<void, AgentConnectionsResponse>;
|
|
14
|
+
/** `GET /connections/{connectionId}`: levels, releases, channels, account links, granted scopes and levels, audit rows. */
|
|
15
|
+
useAgentConnectionQuery: ApiQueryHook<AgentConnectionIdArg, AgentConnectionDetailResponse>;
|
|
16
|
+
/** `POST /connections/{connectionId}/level`. */
|
|
17
|
+
useSetAgentConnectionLevelMutation: ApiMutationHook<AgentConnectionLevelArg, AgentConnectionDetailResponse>;
|
|
18
|
+
/** `POST /connections/{connectionId}/settings`: name, visibility, boundaries, default flag, pause. */
|
|
19
|
+
useUpdateAgentConnectionSettingsMutation: ApiMutationHook<AgentConnectionSettingsArg, AgentConnectionDetailResponse>;
|
|
20
|
+
/** `POST /connections/{connectionId}/release`: to an agent space, with ceilings and boundaries. */
|
|
21
|
+
useReleaseAgentConnectionMutation: ApiMutationHook<AgentConnectionReleaseArg, AgentConnectionDetailResponse>;
|
|
22
|
+
/** `POST /connections/{connectionId}/disconnect`. */
|
|
23
|
+
useDisconnectAgentConnectionMutation: ApiMutationHook<AgentConnectionIdArg, AgentConnectionDetailResponse>;
|
|
24
|
+
/** `POST /oauth/{provider}/start`: answers the consent URL and sets the browser nonce cookie. */
|
|
25
|
+
useStartAgentConnectionOAuthMutation: ApiMutationHook<AgentConnectionOAuthStartArg, AgentConnectionOAuthStartResponse>;
|
|
26
|
+
/** `POST /connections/imap`. */
|
|
27
|
+
useConnectAgentConnectionImapMutation: ApiMutationHook<AgentConnectionImapArg, AgentConnectionDetailResponse>;
|
|
28
|
+
/** `POST /system/slack`. */
|
|
29
|
+
useConnectAgentConnectionSlackMutation: ApiMutationHook<AgentConnectionSlackArg, AgentConnectionDetailResponse>;
|
|
30
|
+
/** `POST /connections/{connectionId}/addresses`. */
|
|
31
|
+
useUpsertAgentConnectionAddressMutation: ApiMutationHook<AgentConnectionAddressArg, AgentConnectionDetailResponse>;
|
|
32
|
+
/** `POST /connections/{connectionId}/accountLinks`. */
|
|
33
|
+
useLinkAgentConnectionAccountMutation: ApiMutationHook<AgentConnectionAccountLinkArg, AgentConnectionDetailResponse>;
|
|
34
|
+
/** `GET /approvals?includeAnswered`. */
|
|
35
|
+
useAgentConnectionApprovalsQuery: ApiQueryHook<AgentConnectionApprovalsArg | void, AgentConnectionApprovalsResponse>;
|
|
36
|
+
/** `POST /approvals/{approvalRequestId}/answer`. */
|
|
37
|
+
useAnswerAgentConnectionApprovalMutation: ApiMutationHook<AgentConnectionApprovalAnswerArg, AgentConnectionApprovalsResponse>;
|
|
38
|
+
/** `GET /connections/{connectionId}/driveRoots?includeRevoked`: the roots (the ended ones too by default) and their releases to agent spaces. */
|
|
39
|
+
useAgentConnectionDriveRootsQuery: ApiQueryHook<AgentConnectionDriveRootsArg, AgentConnectionDriveRootsResponse>;
|
|
40
|
+
/** `GET /connections/{connectionId}/driveItems?section&folderId&pageToken`: a top of the drive or the items of a folder, to pick roots. */
|
|
41
|
+
useAgentConnectionDriveItemsQuery: ApiQueryHook<AgentConnectionDriveItemsArg, AgentConnectionDriveRootsResponse>;
|
|
42
|
+
/** `GET /connections/{connectionId}/driveItems/search?query&pageToken`: folders and shared drives by name, to pick roots. */
|
|
43
|
+
useSearchDriveItemsQuery: ApiQueryHook<AgentConnectionDriveItemsSearchArg, AgentConnectionDriveRootsResponse>;
|
|
44
|
+
/** `POST /connections/{connectionId}/driveRoots`. */
|
|
45
|
+
useAddAgentConnectionDriveRootMutation: ApiMutationHook<AgentConnectionDriveRootAddArg, AgentConnectionDriveRootsResponse>;
|
|
46
|
+
/** `POST /connections/{connectionId}/driveRoots/remove`. */
|
|
47
|
+
useRemoveAgentConnectionDriveRootMutation: ApiMutationHook<AgentConnectionDriveRootItemArg, AgentConnectionDriveRootsResponse>;
|
|
48
|
+
/** `POST /connections/{connectionId}/driveRoots/assign`. */
|
|
49
|
+
useAssignAgentConnectionDriveRootMutation: ApiMutationHook<AgentConnectionDriveRootItemArg, AgentConnectionDriveRootsResponse>;
|
|
50
|
+
/** `POST /connections/{connectionId}/driveRoots/discover`. */
|
|
51
|
+
useDiscoverAgentConnectionDriveItemsMutation: ApiMutationHook<AgentConnectionIdArg, AgentConnectionDriveRootsResponse>;
|
|
52
|
+
/** `POST /connections/{connectionId}/releaseToAgent`. */
|
|
53
|
+
useReleaseAgentConnectionDriveItemToAgentMutation: ApiMutationHook<AgentConnectionReleaseToAgentArg, AgentConnectionDriveRootsResponse>;
|
|
54
|
+
/** `POST /driveRoots/{driveRootId}/revoke`. */
|
|
55
|
+
useRevokeAgentConnectionDriveReleaseMutation: ApiMutationHook<AgentConnectionDriveRootRevokeArg, AgentConnectionDriveRootsResponse>;
|
|
56
|
+
/** `POST /connections/{connectionId}/driveRoots/check`: asks the provider; a root it no longer has becomes `LOST`. */
|
|
57
|
+
useCheckAgentConnectionDriveRootsMutation: ApiMutationHook<AgentConnectionIdArg, AgentConnectionDriveRootsResponse>;
|
|
58
|
+
/** `GET /driveRoots/{driveRootId}/releases?includeRevoked`: the releases of one root to agent spaces. */
|
|
59
|
+
useAgentConnectionDriveRootReleasesQuery: ApiQueryHook<AgentConnectionDriveRootReleasesArg, AgentConnectionDriveRootsResponse>;
|
|
60
|
+
/** `POST /driveRoots/{driveRootId}/releases`: to one agent space; the first release restricts the root to its released spaces. */
|
|
61
|
+
useReleaseAgentConnectionDriveRootToAgentSpaceMutation: ApiMutationHook<AgentConnectionDriveRootReleaseArg, AgentConnectionDriveRootsResponse>;
|
|
62
|
+
/** `POST /driveRootReleases/{driveRootReleaseId}/revoke`. */
|
|
63
|
+
useRevokeAgentConnectionDriveRootReleaseMutation: ApiMutationHook<AgentConnectionDriveRootReleaseRevokeArg, AgentConnectionDriveRootsResponse>;
|
|
64
|
+
/** `POST /driveRoots/{driveRootId}/restrict`: no agent space uses the root until it is released to one. */
|
|
65
|
+
useRestrictAgentConnectionDriveRootMutation: ApiMutationHook<AgentConnectionDriveRootRevokeArg, AgentConnectionDriveRootsResponse>;
|
|
66
|
+
/** `POST /driveRoots/{driveRootId}/followConnection`: the root follows the connection's sharing again. */
|
|
67
|
+
useFollowAgentConnectionSharingWithDriveRootMutation: ApiMutationHook<AgentConnectionDriveRootRevokeArg, AgentConnectionDriveRootsResponse>;
|
|
68
|
+
}
|
|
69
|
+
export interface CreateAgentConnectionsApiOptions {
|
|
70
|
+
/** The host's RTK Query api (`createApi` with the React hooks module). */
|
|
71
|
+
baseApi: InjectableBaseApi;
|
|
72
|
+
/** Where the host mounts `AdminAgentConnectionsTrait`, without a trailing slash (`/api/admin/agent-connections`). */
|
|
73
|
+
apiPrefix: string;
|
|
74
|
+
}
|
|
75
|
+
/** The request of every operation, on `apiPrefix`. Pure: no RTK runtime. */
|
|
76
|
+
export declare const buildAgentConnectionsRequests: (apiPrefix: string) => {
|
|
77
|
+
list: () => InjectedRequest;
|
|
78
|
+
detail: ({ connectionId }: AgentConnectionIdArg) => InjectedRequest;
|
|
79
|
+
setLevel: ({ connectionId, ...body }: AgentConnectionLevelArg) => InjectedRequest;
|
|
80
|
+
updateSettings: ({ connectionId, ...body }: AgentConnectionSettingsArg) => InjectedRequest;
|
|
81
|
+
release: ({ connectionId, ...body }: AgentConnectionReleaseArg) => InjectedRequest;
|
|
82
|
+
disconnect: ({ connectionId }: AgentConnectionIdArg) => InjectedRequest;
|
|
83
|
+
startOAuth: ({ provider, ...body }: AgentConnectionOAuthStartArg) => InjectedRequest;
|
|
84
|
+
connectImap: (body: AgentConnectionImapArg) => InjectedRequest;
|
|
85
|
+
connectSlack: (body: AgentConnectionSlackArg) => InjectedRequest;
|
|
86
|
+
upsertAddress: ({ connectionId, ...body }: AgentConnectionAddressArg) => InjectedRequest;
|
|
87
|
+
linkAccount: ({ connectionId, ...body }: AgentConnectionAccountLinkArg) => InjectedRequest;
|
|
88
|
+
approvals: (arg: AgentConnectionApprovalsArg | void) => InjectedRequest;
|
|
89
|
+
answerApproval: ({ approvalRequestId, option }: AgentConnectionApprovalAnswerArg) => InjectedRequest;
|
|
90
|
+
driveRoots: ({ connectionId, includeRevoked }: AgentConnectionDriveRootsArg) => InjectedRequest;
|
|
91
|
+
searchDriveItems: ({ connectionId, query, pageToken, modifiedFrom, modifiedTo, createdFrom, createdTo, types, minSizeBytes, maxSizeBytes, inFolderId }: AgentConnectionDriveItemsSearchArg) => InjectedRequest;
|
|
92
|
+
driveItems: ({ connectionId, section, folderId, pageToken }: AgentConnectionDriveItemsArg) => InjectedRequest;
|
|
93
|
+
addDriveRoot: ({ connectionId, ...body }: AgentConnectionDriveRootAddArg) => InjectedRequest;
|
|
94
|
+
removeDriveRoot: ({ connectionId, itemId, rootKind }: AgentConnectionDriveRootItemArg) => InjectedRequest;
|
|
95
|
+
assignDriveRoot: ({ connectionId, itemId }: AgentConnectionDriveRootItemArg) => InjectedRequest;
|
|
96
|
+
discoverDriveItems: ({ connectionId }: AgentConnectionIdArg) => InjectedRequest;
|
|
97
|
+
releaseDriveItemToAgent: ({ connectionId, ...body }: AgentConnectionReleaseToAgentArg) => InjectedRequest;
|
|
98
|
+
revokeDriveRelease: ({ driveRootId }: AgentConnectionDriveRootRevokeArg) => InjectedRequest;
|
|
99
|
+
checkDriveRoots: ({ connectionId }: AgentConnectionIdArg) => InjectedRequest;
|
|
100
|
+
driveRootReleases: ({ driveRootId, includeRevoked }: AgentConnectionDriveRootReleasesArg) => InjectedRequest;
|
|
101
|
+
releaseDriveRootToAgentSpace: ({ driveRootId, agentSpaceId }: AgentConnectionDriveRootReleaseArg) => InjectedRequest;
|
|
102
|
+
revokeDriveRootRelease: ({ driveRootReleaseId }: AgentConnectionDriveRootReleaseRevokeArg) => InjectedRequest;
|
|
103
|
+
restrictDriveRoot: ({ driveRootId }: AgentConnectionDriveRootRevokeArg) => InjectedRequest;
|
|
104
|
+
followConnectionWithDriveRoot: ({ driveRootId }: AgentConnectionDriveRootRevokeArg) => InjectedRequest;
|
|
105
|
+
};
|
|
106
|
+
/** The operations as injected. A write on a connection refreshes the list and every open detail; a drive write the roots. */
|
|
107
|
+
export declare const agentConnectionsEndpointDefinitions: (apiPrefix: string) => {
|
|
108
|
+
readonly adminUiAgentConnections: {
|
|
109
|
+
readonly kind: "query";
|
|
110
|
+
readonly request: () => InjectedRequest;
|
|
111
|
+
readonly providesTags: readonly [{
|
|
112
|
+
readonly type: "AdminUiAgentConnections";
|
|
113
|
+
readonly id: "LIST";
|
|
114
|
+
}];
|
|
115
|
+
};
|
|
116
|
+
readonly adminUiAgentConnection: {
|
|
117
|
+
readonly kind: "query";
|
|
118
|
+
readonly request: ({ connectionId }: AgentConnectionIdArg) => InjectedRequest;
|
|
119
|
+
readonly providesTags: readonly [{
|
|
120
|
+
readonly type: "AdminUiAgentConnections";
|
|
121
|
+
readonly id: "DETAIL";
|
|
122
|
+
}];
|
|
123
|
+
};
|
|
124
|
+
readonly adminUiAgentConnectionSetLevel: {
|
|
125
|
+
readonly kind: "mutation";
|
|
126
|
+
readonly request: ({ connectionId, ...body }: AgentConnectionLevelArg) => InjectedRequest;
|
|
127
|
+
readonly invalidatesTags: readonly [{
|
|
128
|
+
readonly type: "AdminUiAgentConnections";
|
|
129
|
+
readonly id: "LIST";
|
|
130
|
+
}, {
|
|
131
|
+
readonly type: "AdminUiAgentConnections";
|
|
132
|
+
readonly id: "DETAIL";
|
|
133
|
+
}];
|
|
134
|
+
};
|
|
135
|
+
readonly adminUiAgentConnectionUpdateSettings: {
|
|
136
|
+
readonly kind: "mutation";
|
|
137
|
+
readonly request: ({ connectionId, ...body }: AgentConnectionSettingsArg) => InjectedRequest;
|
|
138
|
+
readonly invalidatesTags: readonly [{
|
|
139
|
+
readonly type: "AdminUiAgentConnections";
|
|
140
|
+
readonly id: "LIST";
|
|
141
|
+
}, {
|
|
142
|
+
readonly type: "AdminUiAgentConnections";
|
|
143
|
+
readonly id: "DETAIL";
|
|
144
|
+
}];
|
|
145
|
+
};
|
|
146
|
+
readonly adminUiAgentConnectionRelease: {
|
|
147
|
+
readonly kind: "mutation";
|
|
148
|
+
readonly request: ({ connectionId, ...body }: AgentConnectionReleaseArg) => InjectedRequest;
|
|
149
|
+
readonly invalidatesTags: readonly [{
|
|
150
|
+
readonly type: "AdminUiAgentConnections";
|
|
151
|
+
readonly id: "LIST";
|
|
152
|
+
}, {
|
|
153
|
+
readonly type: "AdminUiAgentConnections";
|
|
154
|
+
readonly id: "DETAIL";
|
|
155
|
+
}];
|
|
156
|
+
};
|
|
157
|
+
readonly adminUiAgentConnectionDisconnect: {
|
|
158
|
+
readonly kind: "mutation";
|
|
159
|
+
readonly request: ({ connectionId }: AgentConnectionIdArg) => InjectedRequest;
|
|
160
|
+
readonly invalidatesTags: readonly [{
|
|
161
|
+
readonly type: "AdminUiAgentConnections";
|
|
162
|
+
readonly id: "LIST";
|
|
163
|
+
}, {
|
|
164
|
+
readonly type: "AdminUiAgentConnections";
|
|
165
|
+
readonly id: "DETAIL";
|
|
166
|
+
}, {
|
|
167
|
+
readonly type: "AdminUiAgentConnections";
|
|
168
|
+
readonly id: "DRIVES";
|
|
169
|
+
}];
|
|
170
|
+
};
|
|
171
|
+
readonly adminUiAgentConnectionStartOAuth: {
|
|
172
|
+
readonly kind: "mutation";
|
|
173
|
+
readonly request: ({ provider, ...body }: AgentConnectionOAuthStartArg) => InjectedRequest;
|
|
174
|
+
readonly invalidatesTags: readonly [{
|
|
175
|
+
readonly type: "AdminUiAgentConnections";
|
|
176
|
+
readonly id: "LIST";
|
|
177
|
+
}];
|
|
178
|
+
};
|
|
179
|
+
readonly adminUiAgentConnectionConnectImap: {
|
|
180
|
+
readonly kind: "mutation";
|
|
181
|
+
readonly request: (body: AgentConnectionImapArg) => InjectedRequest;
|
|
182
|
+
readonly invalidatesTags: readonly [{
|
|
183
|
+
readonly type: "AdminUiAgentConnections";
|
|
184
|
+
readonly id: "LIST";
|
|
185
|
+
}];
|
|
186
|
+
};
|
|
187
|
+
readonly adminUiAgentConnectionConnectSlack: {
|
|
188
|
+
readonly kind: "mutation";
|
|
189
|
+
readonly request: (body: AgentConnectionSlackArg) => InjectedRequest;
|
|
190
|
+
readonly invalidatesTags: readonly [{
|
|
191
|
+
readonly type: "AdminUiAgentConnections";
|
|
192
|
+
readonly id: "LIST";
|
|
193
|
+
}];
|
|
194
|
+
};
|
|
195
|
+
readonly adminUiAgentConnectionUpsertAddress: {
|
|
196
|
+
readonly kind: "mutation";
|
|
197
|
+
readonly request: ({ connectionId, ...body }: AgentConnectionAddressArg) => InjectedRequest;
|
|
198
|
+
readonly invalidatesTags: readonly [{
|
|
199
|
+
readonly type: "AdminUiAgentConnections";
|
|
200
|
+
readonly id: "DETAIL";
|
|
201
|
+
}];
|
|
202
|
+
};
|
|
203
|
+
readonly adminUiAgentConnectionLinkAccount: {
|
|
204
|
+
readonly kind: "mutation";
|
|
205
|
+
readonly request: ({ connectionId, ...body }: AgentConnectionAccountLinkArg) => InjectedRequest;
|
|
206
|
+
readonly invalidatesTags: readonly [{
|
|
207
|
+
readonly type: "AdminUiAgentConnections";
|
|
208
|
+
readonly id: "DETAIL";
|
|
209
|
+
}];
|
|
210
|
+
};
|
|
211
|
+
readonly adminUiAgentConnectionApprovals: {
|
|
212
|
+
readonly kind: "query";
|
|
213
|
+
readonly request: (arg: AgentConnectionApprovalsArg | void) => InjectedRequest;
|
|
214
|
+
readonly providesTags: readonly [{
|
|
215
|
+
readonly type: "AdminUiAgentConnections";
|
|
216
|
+
readonly id: "APPROVALS";
|
|
217
|
+
}];
|
|
218
|
+
};
|
|
219
|
+
readonly adminUiAgentConnectionAnswerApproval: {
|
|
220
|
+
readonly kind: "mutation";
|
|
221
|
+
readonly request: ({ approvalRequestId, option }: AgentConnectionApprovalAnswerArg) => InjectedRequest;
|
|
222
|
+
readonly invalidatesTags: readonly [{
|
|
223
|
+
readonly type: "AdminUiAgentConnections";
|
|
224
|
+
readonly id: "APPROVALS";
|
|
225
|
+
}, {
|
|
226
|
+
readonly type: "AdminUiAgentConnections";
|
|
227
|
+
readonly id: "DETAIL";
|
|
228
|
+
}];
|
|
229
|
+
};
|
|
230
|
+
readonly adminUiAgentConnectionDriveRoots: {
|
|
231
|
+
readonly kind: "query";
|
|
232
|
+
readonly request: ({ connectionId, includeRevoked }: AgentConnectionDriveRootsArg) => InjectedRequest;
|
|
233
|
+
readonly providesTags: readonly [{
|
|
234
|
+
readonly type: "AdminUiAgentConnections";
|
|
235
|
+
readonly id: "DRIVES";
|
|
236
|
+
}];
|
|
237
|
+
};
|
|
238
|
+
readonly adminUiAgentConnectionDriveItems: {
|
|
239
|
+
readonly kind: "query";
|
|
240
|
+
readonly request: ({ connectionId, section, folderId, pageToken }: AgentConnectionDriveItemsArg) => InjectedRequest;
|
|
241
|
+
readonly providesTags: readonly [{
|
|
242
|
+
readonly type: "AdminUiAgentConnections";
|
|
243
|
+
readonly id: "DRIVES";
|
|
244
|
+
}];
|
|
245
|
+
};
|
|
246
|
+
readonly adminUiAgentConnectionAddDriveRoot: {
|
|
247
|
+
readonly kind: "mutation";
|
|
248
|
+
readonly request: ({ connectionId, ...body }: AgentConnectionDriveRootAddArg) => InjectedRequest;
|
|
249
|
+
readonly invalidatesTags: readonly [{
|
|
250
|
+
readonly type: "AdminUiAgentConnections";
|
|
251
|
+
readonly id: "DRIVES";
|
|
252
|
+
}, {
|
|
253
|
+
readonly type: "AdminUiAgentConnections";
|
|
254
|
+
readonly id: "DETAIL";
|
|
255
|
+
}];
|
|
256
|
+
};
|
|
257
|
+
readonly adminUiAgentConnectionRemoveDriveRoot: {
|
|
258
|
+
readonly kind: "mutation";
|
|
259
|
+
readonly request: ({ connectionId, itemId, rootKind }: AgentConnectionDriveRootItemArg) => InjectedRequest;
|
|
260
|
+
readonly invalidatesTags: readonly [{
|
|
261
|
+
readonly type: "AdminUiAgentConnections";
|
|
262
|
+
readonly id: "DRIVES";
|
|
263
|
+
}, {
|
|
264
|
+
readonly type: "AdminUiAgentConnections";
|
|
265
|
+
readonly id: "DETAIL";
|
|
266
|
+
}];
|
|
267
|
+
};
|
|
268
|
+
readonly adminUiAgentConnectionAssignDriveRoot: {
|
|
269
|
+
readonly kind: "mutation";
|
|
270
|
+
readonly request: ({ connectionId, itemId }: AgentConnectionDriveRootItemArg) => InjectedRequest;
|
|
271
|
+
readonly invalidatesTags: readonly [{
|
|
272
|
+
readonly type: "AdminUiAgentConnections";
|
|
273
|
+
readonly id: "DRIVES";
|
|
274
|
+
}, {
|
|
275
|
+
readonly type: "AdminUiAgentConnections";
|
|
276
|
+
readonly id: "DETAIL";
|
|
277
|
+
}];
|
|
278
|
+
};
|
|
279
|
+
readonly adminUiAgentConnectionDiscoverDriveItems: {
|
|
280
|
+
readonly kind: "mutation";
|
|
281
|
+
readonly request: ({ connectionId }: AgentConnectionIdArg) => InjectedRequest;
|
|
282
|
+
readonly invalidatesTags: readonly [{
|
|
283
|
+
readonly type: "AdminUiAgentConnections";
|
|
284
|
+
readonly id: "DRIVES";
|
|
285
|
+
}];
|
|
286
|
+
};
|
|
287
|
+
readonly adminUiAgentConnectionReleaseDriveItemToAgent: {
|
|
288
|
+
readonly kind: "mutation";
|
|
289
|
+
readonly request: ({ connectionId, ...body }: AgentConnectionReleaseToAgentArg) => InjectedRequest;
|
|
290
|
+
readonly invalidatesTags: readonly [{
|
|
291
|
+
readonly type: "AdminUiAgentConnections";
|
|
292
|
+
readonly id: "DRIVES";
|
|
293
|
+
}, {
|
|
294
|
+
readonly type: "AdminUiAgentConnections";
|
|
295
|
+
readonly id: "DETAIL";
|
|
296
|
+
}];
|
|
297
|
+
};
|
|
298
|
+
readonly adminUiAgentConnectionRevokeDriveRelease: {
|
|
299
|
+
readonly kind: "mutation";
|
|
300
|
+
readonly request: ({ driveRootId }: AgentConnectionDriveRootRevokeArg) => InjectedRequest;
|
|
301
|
+
readonly invalidatesTags: readonly [{
|
|
302
|
+
readonly type: "AdminUiAgentConnections";
|
|
303
|
+
readonly id: "DRIVES";
|
|
304
|
+
}, {
|
|
305
|
+
readonly type: "AdminUiAgentConnections";
|
|
306
|
+
readonly id: "DETAIL";
|
|
307
|
+
}];
|
|
308
|
+
};
|
|
309
|
+
readonly adminUiAgentConnectionSearchDriveItems: {
|
|
310
|
+
readonly kind: "query";
|
|
311
|
+
readonly request: ({ connectionId, query, pageToken, modifiedFrom, modifiedTo, createdFrom, createdTo, types, minSizeBytes, maxSizeBytes, inFolderId }: AgentConnectionDriveItemsSearchArg) => InjectedRequest;
|
|
312
|
+
readonly providesTags: readonly [{
|
|
313
|
+
readonly type: "AdminUiAgentConnections";
|
|
314
|
+
readonly id: "DRIVES";
|
|
315
|
+
}];
|
|
316
|
+
};
|
|
317
|
+
readonly adminUiAgentConnectionCheckDriveRoots: {
|
|
318
|
+
readonly kind: "mutation";
|
|
319
|
+
readonly request: ({ connectionId }: AgentConnectionIdArg) => InjectedRequest;
|
|
320
|
+
readonly invalidatesTags: readonly [{
|
|
321
|
+
readonly type: "AdminUiAgentConnections";
|
|
322
|
+
readonly id: "DRIVES";
|
|
323
|
+
}, {
|
|
324
|
+
readonly type: "AdminUiAgentConnections";
|
|
325
|
+
readonly id: "DETAIL";
|
|
326
|
+
}];
|
|
327
|
+
};
|
|
328
|
+
readonly adminUiAgentConnectionDriveRootReleases: {
|
|
329
|
+
readonly kind: "query";
|
|
330
|
+
readonly request: ({ driveRootId, includeRevoked }: AgentConnectionDriveRootReleasesArg) => InjectedRequest;
|
|
331
|
+
readonly providesTags: readonly [{
|
|
332
|
+
readonly type: "AdminUiAgentConnections";
|
|
333
|
+
readonly id: "DRIVES";
|
|
334
|
+
}];
|
|
335
|
+
};
|
|
336
|
+
readonly adminUiAgentConnectionReleaseDriveRootToAgentSpace: {
|
|
337
|
+
readonly kind: "mutation";
|
|
338
|
+
readonly request: ({ driveRootId, agentSpaceId }: AgentConnectionDriveRootReleaseArg) => InjectedRequest;
|
|
339
|
+
readonly invalidatesTags: readonly [{
|
|
340
|
+
readonly type: "AdminUiAgentConnections";
|
|
341
|
+
readonly id: "DRIVES";
|
|
342
|
+
}, {
|
|
343
|
+
readonly type: "AdminUiAgentConnections";
|
|
344
|
+
readonly id: "DETAIL";
|
|
345
|
+
}];
|
|
346
|
+
};
|
|
347
|
+
readonly adminUiAgentConnectionRevokeDriveRootRelease: {
|
|
348
|
+
readonly kind: "mutation";
|
|
349
|
+
readonly request: ({ driveRootReleaseId }: AgentConnectionDriveRootReleaseRevokeArg) => InjectedRequest;
|
|
350
|
+
readonly invalidatesTags: readonly [{
|
|
351
|
+
readonly type: "AdminUiAgentConnections";
|
|
352
|
+
readonly id: "DRIVES";
|
|
353
|
+
}, {
|
|
354
|
+
readonly type: "AdminUiAgentConnections";
|
|
355
|
+
readonly id: "DETAIL";
|
|
356
|
+
}];
|
|
357
|
+
};
|
|
358
|
+
readonly adminUiAgentConnectionRestrictDriveRoot: {
|
|
359
|
+
readonly kind: "mutation";
|
|
360
|
+
readonly request: ({ driveRootId }: AgentConnectionDriveRootRevokeArg) => InjectedRequest;
|
|
361
|
+
readonly invalidatesTags: readonly [{
|
|
362
|
+
readonly type: "AdminUiAgentConnections";
|
|
363
|
+
readonly id: "DRIVES";
|
|
364
|
+
}, {
|
|
365
|
+
readonly type: "AdminUiAgentConnections";
|
|
366
|
+
readonly id: "DETAIL";
|
|
367
|
+
}];
|
|
368
|
+
};
|
|
369
|
+
readonly adminUiAgentConnectionFollowConnectionWithDriveRoot: {
|
|
370
|
+
readonly kind: "mutation";
|
|
371
|
+
readonly request: ({ driveRootId }: AgentConnectionDriveRootRevokeArg) => InjectedRequest;
|
|
372
|
+
readonly invalidatesTags: readonly [{
|
|
373
|
+
readonly type: "AdminUiAgentConnections";
|
|
374
|
+
readonly id: "DRIVES";
|
|
375
|
+
}, {
|
|
376
|
+
readonly type: "AdminUiAgentConnections";
|
|
377
|
+
readonly id: "DETAIL";
|
|
378
|
+
}];
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* Injects the connection operations into the host's RTK Query api and returns their hooks. Call it once at module
|
|
383
|
+
* scope: `export const agentConnectionsApi = createAgentConnectionsApi({ baseApi, apiPrefix: "/api/admin/agent-connections" });`
|
|
384
|
+
*/
|
|
385
|
+
export declare const createAgentConnectionsApi: ({ baseApi, apiPrefix }: CreateAgentConnectionsApiOptions) => AgentConnectionsApi;
|
|
386
|
+
type Answer<TResponse> = TResponse | Promise<TResponse>;
|
|
387
|
+
/** Fixed answers of a `createStaticAgentConnectionsApi`; a query without one stays loading, a write without one answers empty. */
|
|
388
|
+
export interface StaticAgentConnectionsData {
|
|
389
|
+
list?: () => AgentConnectionsResponse | StaticQueryFailure | undefined;
|
|
390
|
+
detail?: (arg: AgentConnectionIdArg) => AgentConnectionDetailResponse | StaticQueryFailure | undefined;
|
|
391
|
+
setLevel?: (arg: AgentConnectionLevelArg) => Answer<AgentConnectionDetailResponse>;
|
|
392
|
+
updateSettings?: (arg: AgentConnectionSettingsArg) => Answer<AgentConnectionDetailResponse>;
|
|
393
|
+
release?: (arg: AgentConnectionReleaseArg) => Answer<AgentConnectionDetailResponse>;
|
|
394
|
+
disconnect?: (arg: AgentConnectionIdArg) => Answer<AgentConnectionDetailResponse>;
|
|
395
|
+
startOAuth?: (arg: AgentConnectionOAuthStartArg) => Answer<AgentConnectionOAuthStartResponse>;
|
|
396
|
+
connectImap?: (arg: AgentConnectionImapArg) => Answer<AgentConnectionDetailResponse>;
|
|
397
|
+
connectSlack?: (arg: AgentConnectionSlackArg) => Answer<AgentConnectionDetailResponse>;
|
|
398
|
+
upsertAddress?: (arg: AgentConnectionAddressArg) => Answer<AgentConnectionDetailResponse>;
|
|
399
|
+
linkAccount?: (arg: AgentConnectionAccountLinkArg) => Answer<AgentConnectionDetailResponse>;
|
|
400
|
+
approvals?: (arg: AgentConnectionApprovalsArg) => AgentConnectionApprovalsResponse | StaticQueryFailure | undefined;
|
|
401
|
+
answerApproval?: (arg: AgentConnectionApprovalAnswerArg) => Answer<AgentConnectionApprovalsResponse>;
|
|
402
|
+
driveRoots?: (arg: AgentConnectionDriveRootsArg) => AgentConnectionDriveRootsResponse | StaticQueryFailure | undefined;
|
|
403
|
+
searchDriveItems?: (arg: AgentConnectionDriveItemsSearchArg) => AgentConnectionDriveRootsResponse | StaticQueryFailure | undefined;
|
|
404
|
+
driveRootReleases?: (arg: AgentConnectionDriveRootReleasesArg) => AgentConnectionDriveRootsResponse | StaticQueryFailure | undefined;
|
|
405
|
+
checkDriveRoots?: (arg: AgentConnectionIdArg) => Answer<AgentConnectionDriveRootsResponse>;
|
|
406
|
+
releaseDriveRootToAgentSpace?: (arg: AgentConnectionDriveRootReleaseArg) => Answer<AgentConnectionDriveRootsResponse>;
|
|
407
|
+
revokeDriveRootRelease?: (arg: AgentConnectionDriveRootReleaseRevokeArg) => Answer<AgentConnectionDriveRootsResponse>;
|
|
408
|
+
restrictDriveRoot?: (arg: AgentConnectionDriveRootRevokeArg) => Answer<AgentConnectionDriveRootsResponse>;
|
|
409
|
+
followConnectionWithDriveRoot?: (arg: AgentConnectionDriveRootRevokeArg) => Answer<AgentConnectionDriveRootsResponse>;
|
|
410
|
+
driveItems?: (arg: AgentConnectionDriveItemsArg) => AgentConnectionDriveRootsResponse | StaticQueryFailure | undefined;
|
|
411
|
+
addDriveRoot?: (arg: AgentConnectionDriveRootAddArg) => Answer<AgentConnectionDriveRootsResponse>;
|
|
412
|
+
removeDriveRoot?: (arg: AgentConnectionDriveRootItemArg) => Answer<AgentConnectionDriveRootsResponse>;
|
|
413
|
+
assignDriveRoot?: (arg: AgentConnectionDriveRootItemArg) => Answer<AgentConnectionDriveRootsResponse>;
|
|
414
|
+
discoverDriveItems?: (arg: AgentConnectionIdArg) => Answer<AgentConnectionDriveRootsResponse>;
|
|
415
|
+
releaseDriveItemToAgent?: (arg: AgentConnectionReleaseToAgentArg) => Answer<AgentConnectionDriveRootsResponse>;
|
|
416
|
+
revokeDriveRelease?: (arg: AgentConnectionDriveRootRevokeArg) => Answer<AgentConnectionDriveRootsResponse>;
|
|
417
|
+
}
|
|
418
|
+
/** An `AgentConnectionsApi` answering fixed payloads, without a store or a request (previews, tests, reviews). */
|
|
419
|
+
export declare const createStaticAgentConnectionsApi: (data: StaticAgentConnectionsData) => AgentConnectionsApi;
|
|
420
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type TranslateFn } from "@mgamadeus/ddd-admin-ui/i18n";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import type { AgentConnectionsApi } from "./agent-connections-api";
|
|
4
|
+
import { type AgentConnectionsViewer } from "./agent-connection-format";
|
|
5
|
+
import type { AgentConnectionsOAuthAdapter } from "./agent-connection-oauth";
|
|
6
|
+
import type { AgentConnectionLevel, AgentConnectionVisibility } from "./agent-connections-types";
|
|
7
|
+
import { type AgentConnectionLogos } from "./connection-logos";
|
|
8
|
+
/**
|
|
9
|
+
* The texts of the connection screens a host words itself, already translated: the agent's name in the sentences, and
|
|
10
|
+
* what "shared" means here (who works in the space a connection is shared with). Every entry has a generic default.
|
|
11
|
+
*/
|
|
12
|
+
export interface AgentConnectionsTexts {
|
|
13
|
+
/** The agent's name in sentences ("%agentName% reads, searches and lists."). Default "The agent". */
|
|
14
|
+
agentName?: string;
|
|
15
|
+
/** The name of the visibility `AGENT_SPACE` (badge, choice). Default "For the shared space". */
|
|
16
|
+
sharedVisibilityLabel?: string;
|
|
17
|
+
/** What sharing means, under the visibility choice. */
|
|
18
|
+
sharedVisibilityHelp?: string;
|
|
19
|
+
/** Under the visibility choice of a connect dialog when the account has no space to share with. */
|
|
20
|
+
noShareTargetHelp?: string;
|
|
21
|
+
/** The toast after a connection was shared. */
|
|
22
|
+
sharedToast?: string;
|
|
23
|
+
/** The description of the dialog that connects the agent's Slack bot. */
|
|
24
|
+
slackBotDescription?: string;
|
|
25
|
+
/** The placeholder of the Slack connection's name. */
|
|
26
|
+
slackNamePlaceholder?: string;
|
|
27
|
+
/** The placeholder of the mail address of an IMAP/SMTP mailbox. */
|
|
28
|
+
imapAddressPlaceholder?: string;
|
|
29
|
+
}
|
|
30
|
+
/** What every part of the connections panel reads: the api, the viewer, the rights, the host's texts, marks and adapters. */
|
|
31
|
+
export interface AgentConnectionsContextValue {
|
|
32
|
+
api: AgentConnectionsApi;
|
|
33
|
+
writesAllowed: boolean;
|
|
34
|
+
viewer: AgentConnectionsViewer;
|
|
35
|
+
/** The space a connection is shared with ("shared"), `null` when the account has none. */
|
|
36
|
+
sharedAgentSpaceId: number | null;
|
|
37
|
+
texts: Required<AgentConnectionsTexts>;
|
|
38
|
+
logos: Required<AgentConnectionLogos>;
|
|
39
|
+
oauth: AgentConnectionsOAuthAdapter | null;
|
|
40
|
+
/** The surface a connect started here is stored with (`PendingAgentConnect.surface`). */
|
|
41
|
+
surface: string;
|
|
42
|
+
}
|
|
43
|
+
/** The resolved texts: the host's, else the package's generic ones. */
|
|
44
|
+
export declare const resolveAgentConnectionsTexts: (texts: AgentConnectionsTexts | undefined, t: TranslateFn) => Required<AgentConnectionsTexts>;
|
|
45
|
+
export interface AgentConnectionsProviderProps extends Omit<AgentConnectionsContextValue, "texts" | "logos"> {
|
|
46
|
+
texts?: AgentConnectionsTexts;
|
|
47
|
+
logos?: AgentConnectionLogos;
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
}
|
|
50
|
+
/** Hands the panel's api, rights, texts, marks and adapters to its parts. */
|
|
51
|
+
export declare const AgentConnectionsProvider: ({ api, writesAllowed, viewer, sharedAgentSpaceId, texts, logos, oauth, surface, children }: AgentConnectionsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare const useAgentConnectionsContext: () => AgentConnectionsContextValue;
|
|
53
|
+
/** The visibility choices of the connect, levels and sharing dialogs: "Just for me" and the host's name of "shared". */
|
|
54
|
+
export declare const useAgentConnectionVisibilityOptions: () => readonly {
|
|
55
|
+
value: AgentConnectionVisibility;
|
|
56
|
+
label: string;
|
|
57
|
+
translate: false;
|
|
58
|
+
}[];
|
|
59
|
+
/** The explanation of a level with the agent's name in it. */
|
|
60
|
+
export declare const useAgentConnectionLevelHelp: () => ((level: AgentConnectionLevel) => string);
|