@abpjs/ui 0.2.0-next.39 → 0.2.0-next.40

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0-next.40
4
+
5
+ A prerelease under npm's `next` tag.
6
+
7
+ - Agent area, deleting all of someone's chats at once (AbpAgent.HttpApi 0.9.0): "Delete all chats" in the chat panel's
8
+ list; `MyAgentChatsPanel` for a person's privacy page ("Your chats with agents", delete all); `PersonAgentChatsAction`
9
+ (`accountId`, `name`) for a site admin on someone's account page; `ForgetChatsOption` (`accountId`, `register`) for
10
+ the slots `guard.account.deactivate.options` and `guard.account.delete.options`, "Also delete their chats with
11
+ agents", which joins the dialog's save only when ticked; `useDeleteAllChats`. A toast says how many went, and how many
12
+ wait for their run's step. New `chats.*` texts in English and Arabic; the types are 0.9.0's (`AgentChatsDeleted`).
13
+
3
14
  ## 0.2.0-next.39
4
15
 
5
16
  A prerelease under npm's `next` tag.
package/dist/agent.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { SettingsPage, AbpHost, StatusTone } from '@abpjs/ui';
3
+ import { SettingsPage, AbpHost, StatusTone, RegisterSlotSave } from '@abpjs/ui';
4
4
 
5
5
  /** The site's agents page, with its header: what a host's catch-all route draws for `agent.admin`. */
6
6
  declare function AgentsAdminPage(): react.JSX.Element;
@@ -144,6 +144,12 @@ interface components {
144
144
  scope: components["schemas"]["AgentScopeRef"];
145
145
  agents: components["schemas"]["AskableAgent"][];
146
146
  };
147
+ AgentChatsDeleted: {
148
+ /** Format: int32 */
149
+ deleted: number | string;
150
+ /** Format: int32 */
151
+ stillGoing: number | string;
152
+ };
147
153
  AgentChatStartInput: {
148
154
  /** Format: uuid */
149
155
  agentId: string;
@@ -709,6 +715,32 @@ declare function AgentChatPanel({ itemHref }: {
709
715
  itemHref?: ItemHref;
710
716
  }): react.JSX.Element | null;
711
717
 
718
+ /**
719
+ * Asks, then deletes every chat of the person's own (AbpAgent's `DELETE chats`): their messages and replies go for good;
720
+ * their runs keep who, when and what changed. Resolves true when it deleted.
721
+ */
722
+ declare function useDeleteAllChats(): () => Promise<boolean>;
723
+ /** A person's chats with agents on their own account's privacy page: deleting them all at once, as they may at any time. */
724
+ declare function MyAgentChatsPanel(): react.JSX.Element;
725
+ /**
726
+ * On someone's account, for a site admin (an account they're deactivating or deleting without erasing it): deletes
727
+ * every chat of theirs with agents, after asking (AbpAgent's `DELETE people/{id}/chats`, audited). Erasing a person
728
+ * takes their chats anyway.
729
+ */
730
+ declare function PersonAgentChatsAction({ accountId, name }: {
731
+ accountId: string;
732
+ name?: string;
733
+ }): react.JSX.Element;
734
+ /**
735
+ * In a dialog that deactivates or deletes an account (the slots `guard.account.deactivate.options` and
736
+ * `guard.account.delete.options`): "Also delete their chats with agents". Ticked, it joins the dialog's save, which runs
737
+ * it only after the account was deactivated or deleted; a failure shows in the dialog.
738
+ */
739
+ declare function ForgetChatsOption({ accountId, register }: {
740
+ accountId: string;
741
+ register: RegisterSlotSave;
742
+ }): react.JSX.Element;
743
+
712
744
  /**
713
745
  * Picks an agent by its key, for a workflow step or a rule that asks one: the agents a scope has taken on. A key kept
714
746
  * from before that isn't there any more stays shown, so nothing changes until someone picks again. Where the list can't
@@ -765,4 +797,4 @@ declare function NamesField(props: {
765
797
  /** The area's words, in English and Arabic; a host overrides any key through `AbpHost.texts.agent`. */
766
798
  declare const useAgentTexts: () => (key: string, values?: Record<string, string | number>) => string;
767
799
 
768
- export { AgentBadge, type AgentChange, AgentChatButton, type AgentChatInfo, type AgentChatOpen, AgentChatPanel, type AgentChatPlace, AgentChatProvider, type AgentChatSummary, AgentEditor, AgentForm, AgentGraph, type AgentGraphLink, type AgentGraphNote, type AgentGraphPage, type AgentGraphThing, type AgentInfo, AgentLimitsPanel, AgentMemoriesPanel, type AgentMemoryInfo, AgentPause, type AgentPermissionInfo, AgentPermissionsPanel, type AgentPerson, AgentQuestionCard, type AgentQuestionInfo, AgentQuestionsPanel, type AgentRunInfo, type AgentRunLimits, type AgentRunStepInfo, AgentSelect, AgentState, type AgentSwitch, type AgentTarget, AgentText, type AgentTool, AgentToolsPanel, type AgentTypes, type AgentUsage, type AgentUsagePeriod, AgentsAdmin, AgentsAdminPage, AgentsTable, AskAgentButton, type AskableAgent, GOING, ItemAgentRuns, type ItemHref, ItemHrefProvider, ItemLink, type Names, NamesField, RUN_TONES, type ScopeAgentInfo, ScopeAgentsScreen, type ToolGroupOf, ToolGroupsProvider, agentPages, filledIn, num, useAgentChat, useAgentTexts, useNameOf };
800
+ export { AgentBadge, type AgentChange, AgentChatButton, type AgentChatInfo, type AgentChatOpen, AgentChatPanel, type AgentChatPlace, AgentChatProvider, type AgentChatSummary, AgentEditor, AgentForm, AgentGraph, type AgentGraphLink, type AgentGraphNote, type AgentGraphPage, type AgentGraphThing, type AgentInfo, AgentLimitsPanel, AgentMemoriesPanel, type AgentMemoryInfo, AgentPause, type AgentPermissionInfo, AgentPermissionsPanel, type AgentPerson, AgentQuestionCard, type AgentQuestionInfo, AgentQuestionsPanel, type AgentRunInfo, type AgentRunLimits, type AgentRunStepInfo, AgentSelect, AgentState, type AgentSwitch, type AgentTarget, AgentText, type AgentTool, AgentToolsPanel, type AgentTypes, type AgentUsage, type AgentUsagePeriod, AgentsAdmin, AgentsAdminPage, AgentsTable, AskAgentButton, type AskableAgent, ForgetChatsOption, GOING, ItemAgentRuns, type ItemHref, ItemHrefProvider, ItemLink, MyAgentChatsPanel, type Names, NamesField, PersonAgentChatsAction, RUN_TONES, type ScopeAgentInfo, ScopeAgentsScreen, type ToolGroupOf, ToolGroupsProvider, agentPages, filledIn, num, useAgentChat, useAgentTexts, useDeleteAllChats, useNameOf };