Repository navigation
Add personal agent self-service to the client SDKs - #183
sajitha-tj wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
🔀 Cross-SDK feature parityDoes this change need to ship in the other ThunderID SDKs too? This check stays red until one of these labels answers that:
Ports (DO NOT EDIT)
No sibling SDKs accounted for on this thread yet. Important Reply to this comment with this block, filled in. The boxes above tick A link can be a pull request or a tracked issue, written in full or as The contract is in the SDK development specification. |
Let a signed-in user list, view, edit, delete and suspend their own personal agents through /users/me/agents in the React and Vue SDKs, and show the personal kind and who applied a suspension in the admin agent views. Refs thunder-id/thunderid#4468 Signed-off-by: sajitha-tj <sajitha.jayawickrama@gmail.com>
ecb1248 to
47d00ab
Compare
Purpose
Lets a signed-in user manage the personal assistant agents they own from a React or Vue app, through the owner self-service APIs under
/users/me/agents. A user can list their agents, open one, edit it, delete it, suspend it or all of them at once, and lift their own suspension. An agent the organization suspended shows as such, and the user cannot lift that suspension.The admin agent views also show personal agents: a "Personal" chip in
AgentList, and "Kind" and "Suspended by" rows inAgentDetails. The admin actions on a suspended agent now depend on who placed the suspension. The organization can lift only its own suspension, so for an agent that only its owner suspended, the admin view offers Suspend instead of Unsuspend.Approach
The issue proposed one
<PersonalAgents/>component. This PR ships two,PersonalAgentListandPersonalAgentDetails, so an app can lay out the list and the selected agent the way its account portal needs. Each comes with an unstyledBasevariant that takes achildrenrender function.@thunderid/javascriptgetMeAgents,getMeAgent,updateMeAgent,deleteMeAgent,suspendMeAgent,unsuspendMeAgentandsuspendAllMeAgents, and theusersMeAgentsendpoint key.PERSONAL_AGENT_KIND,PERSONAL_AGENT_GRANT_TYPESandPERSONAL_AGENT_GRANT_TYPE_LABEL_KEYS, plus thekindandstatus.details.appliedBymodels.getMeAgentSuspensionAction, the shared form helpers (toPersonalAgentFormValues,toUpdateMeAgentRequest,isPersonalAgentFormValid), and the translations in every locale.getAccountLifecycleActionstakes who holds a suspension into account. If no party is reported, the suspension is treated as the organization's, so servers that don't report one behave as before.@thunderid/reactand@thunderid/vuePersonalAgentList,PersonalAgentDetailsand theirBasevariants. They call/users/me/agentswith the SDK's own authenticated transport, not the managementhttp.fetcher.useResourceQueryanduseResourceMutationare now exported, so SDKs built on React and Vue can load data the same way.Playgrounds
Screenshots
PersonalAgentListandPersonalAgentDetailswith sample agents in the React playground:Related Issues
Related PRs
Checklist
breaking changelabel added.parity/prs-raisedorparity/prs-not-neededadded.parity/prs-raised, the port links are posted as a reply on the parity check's comment.Security checks