Service Layer medium complexity backend
0
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Backend service that validates, previews, and executes bulk user mutations on behalf of Org Admins. Processes each user in the batch independently so a partial failure does not abort the rest, and returns a per-row result map to the caller.

Feature: Bulk Actions

bulk-action-service

Sources & reasoning

Source lists Bulk Actions as the third feature of admin-user-management. No explicit phase assignment in the source roadmap (Phase 1 admin MVP names only invitation, deactivation, role assignment), so per the resolution rule the second non-mobilization phase 'Core Product' is used.

Responsibilities

  • Validate caller permissions and target user IDs scope to the org
  • Compute affected-record preview counts for a proposed bulk action
  • Execute deactivate, reactivate, change-role, resend-invite, and export actions in batch
  • Isolate per-row failures and continue processing remaining users
  • Return structured per-row success/failure results to the caller

Interfaces

previewBulkAction(orgId: string, action: BulkActionType, userIds: string[]): BulkPreview
executeBulkAction(orgId: string, action: BulkActionType, userIds: string[], payload?: object): BulkActionResult[]
exportUsers(orgId: string, userIds: string[]): ExportFileRef

Related Data Entities (1)

Data entities managed by this component