Giao diện
API · identity
Trang sinh tự động
Parse từ schema.graphql (SDL backend export) bằng parser graphql. Mô tả và quyền lấy nguyên văn từ description trong SDL.
10 query · 11 mutation.
Query
me
The caller. Works while PENDING (that is what the waiting screen reads).
query · SDL không ghi quyền
Không có tham số.
Trả về Viewer!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
app | AppCode! | |
maskedPhone | String | Own phone, masked like every other surface (e.g. +8490****567); null for an email-only account. |
email | String | Own login email (PPI-P3-01, E-01), as session.user.email returns it; null when the account has none. |
accountStatus | AccountStatus! | |
membershipStatus | MembershipStatus! | |
roles | [String!]! | Effective roles in THIS app; empty unless account and membership are ACTIVE. |
permissions | [String!]! | Permission codes the matrix grants those roles in this app (empty without a role). |
nextStep | NextStep! | Same rule as the sign-in answer. |
profile | Profile | Requires profile.manage (own profile, APP_USER/APP_SALE). Null until the first updateMe. Denied for WEB_ADMIN, PENDING and no-role callers. |
pendingAccounts
Approval queue: PENDING WEB_ADMIN registrations, oldest first. Requires staff.read (AD-05).
query · quyền: staff.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
page | Int | 1 | |
pageSize | Int | 20 |
Trả về StaffMemberPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [StaffMember!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
permissions
Permission catalog grouped by resource. RB-01/RB-02.
query · SDL không ghi quyền
Không có tham số.
Trả về [PermissionGroup!]!
| Field | Kiểu | Mô tả |
|---|---|---|
resource | String! | |
permissions | [Permission!]! |
role
One role by app (default WEB_ADMIN) and code. RB-01/RB-02.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
code | String! | ||
app | AppCode |
Trả về Role!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
code | String! | |
app | AppCode! | |
name | String! | |
description | String | |
isSystem | Boolean! | PD-08 s14 baseline role (equals the permission matrix): read-only here. |
version | Int! | expectedVersion for updateRole / setRolePermissions. |
userCount | Int! | Unrevoked assignments of this role. |
permissions | [String!]! | Permission codes of the live grants. |
grants | [PermissionGrant!]! | |
updatedAt | DateTime! |
roleChangeRequests
Maker/checker queue, oldest first. RB-01/RB-02.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
status | RoleChangeStatus |
Trả về [RoleChangeRequest!]!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
kind | RoleChangeKind! | |
app | AppCode! | |
roleId | ID! | |
roleCode | String | |
roleVersion | Int! | Role version the maker saw; the change is stale once the role moves. |
accountId | ID | |
assignmentId | ID | |
grants | [PermissionGrant!] | SET_ROLE_PERMISSIONS: the complete new grant set. |
payloadHash | String! | |
reason | String! | |
status | RoleChangeStatus! | |
requestedBy | ID! | |
requestedAt | DateTime! | |
approvedBy | ID | |
approvedAt | DateTime | |
appliedVersion | Int | |
version | Int! | expectedVersion for approveRoleChange. |
roleHistory
Every recorded version of a role, oldest first. RB-01/RB-02.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
roleId | ID! |
Trả về [RoleVersion!]!
| Field | Kiểu | Mô tả |
|---|---|---|
version | Int! | |
name | String! | |
description | String | |
changedBy | ID | |
changeRequestId | ID | |
recordedAt | DateTime! | |
grants | [PermissionGrant!]! |
roles
Role catalog with live grants. Requires role_permission.manage/approve (RB-01/RB-02).
query · quyền: role_permission.manage
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
app | AppCode |
Trả về [Role!]!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
code | String! | |
app | AppCode! | |
name | String! | |
description | String | |
isSystem | Boolean! | PD-08 s14 baseline role (equals the permission matrix): read-only here. |
version | Int! | expectedVersion for updateRole / setRolePermissions. |
userCount | Int! | Unrevoked assignments of this role. |
permissions | [String!]! | Permission codes of the live grants. |
grants | [PermissionGrant!]! | |
updatedAt | DateTime! |
staff
WEB_ADMIN staff, masked. Requires staff.read (AD-05).
query · quyền: staff.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
membershipStatus | MembershipStatus | ||
accountStatus | AccountStatus | ||
role | String | Only staff holding this WEB_ADMIN role. | |
page | Int | 1 | |
pageSize | Int | 20 |
Trả về StaffMemberPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [StaffMember!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
staffAccounts
STAFF accounts with their credential and pending role request, masked, oldest first; awaitingRole true is the approval queue (a PENDING role request, no role yet, access not closed). Requires staff.read (AD-05).
query · quyền: staff.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
membershipStatus | MembershipStatus | ||
awaitingRole | Boolean | Only people waiting for their first role (the approval queue). | |
page | Int | 1 | |
pageSize | Int | 20 |
Trả về StaffAccountPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [StaffAccount!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
staffDetail
One staff member, masked. Requires staff.read (AD-05).
query · quyền: staff.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
accountId | ID! |
Trả về StaffMember!
| Field | Kiểu | Mô tả |
|---|---|---|
accountId | ID! | |
maskedPhone | String! | |
accountStatus | AccountStatus! | |
accountVersion | Int! | expectedVersion for setAccountStatus. |
membershipStatus | MembershipStatus! | |
membershipVersion | Int! | expectedVersion for approve/reject/setMembershipStatus. |
statusReason | String | Reason recorded with the last membership decision (internal note). |
roles | [String!]! | Unrevoked WEB_ADMIN roles. |
registeredAt | DateTime! | |
approvedAt | DateTime | |
updatedAt | DateTime! |
Mutation
approveMembership
PENDING -> ACTIVE for a WEB_ADMIN membership; grants no role (the person then waits in AWAITING_ROLE). Requires membership.approve (AD-06) with MFA step-up; never on yourself. Without step-up: forbidden, reason step_up_required. Not a step of the staff flow any more (PPI-P7-01): createStaffAccount opens the membership; only a legacy PENDING membership is left for it.
mutation · quyền: membership.approve
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | ApproveMembershipInput! |
Trả về StaffCommandResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
staff | StaffMember! |
approveRoleChange
Checker approves and applies someone else's change (AD-02, MFA); never its maker (same person), super_admin only by a super_admin.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | ApproveRoleChangeInput! |
Trả về RoleChangeResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
change | RoleChangeRequest! |
assignRole
Files a WEB_ADMIN role grant for another staff member (AD-01 maker, MFA).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | RoleAssignmentInput! |
Trả về RoleChangeResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
change | RoleChangeRequest! |
createRole
New custom WEB_ADMIN role with no grant (RB-03, MFA step-up).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | CreateRoleInput! |
Trả về RoleCommandResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
role | Role! |
createStaffAccount
Creates a STAFF account, its WEB_ADMIN membership ACTIVE (it can sign in; no permission until the role is approved) and a role change request for roleCode (maker = caller). The caller then reads the temporary password once (POST auth/staff/temporary-password, covered by this step-up for 15 minutes). Requires staff.create (AD-09, admin or super_admin) with MFA step-up; without it: forbidden, reason step_up_required. Errors: validation_failed, conflict staff_phone_taken, forbidden.
mutation · quyền: staff.create
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | CreateStaffAccountInput! |
Trả về CreateStaffAccountResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The new STAFF account (= accountId). |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
accountId | ID! | |
membershipStatus | MembershipStatus! | Always ACTIVE: the person signs in at once and waits for the role (me.nextStep AWAITING_ROLE). |
roleChangeRequestId | ID! | The role change request filed with roleCode (maker = caller), for approveRoleChange by someone else. |
rejectMembership
Rejects a new staff member (PPI-P7-01): every PENDING role request of the person REJECTED, the WEB_ADMIN membership (PENDING or ACTIVE, no role yet) REJECTED with the reason and its sessions revoked, in one command. Matrix AD-11 membership.reject (admin or super_admin, MFA step-up, never on yourself, never the maker of the request: forbidden self_approval). Conflicts: invalid_transition, has_role. Without step-up: forbidden, reason step_up_required.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | RejectMembershipInput! |
Trả về StaffCommandResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
staff | StaffMember! |
revokeRole
Files a role revocation for another staff member (AD-01 maker, MFA).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | RoleAssignmentInput! |
Trả về RoleChangeResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
change | RoleChangeRequest! |
setAccountStatus
Account-wide status with a reason. No matrix rule yet: denied.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | SetAccountStatusInput! |
Trả về StaffCommandResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
staff | StaffMember! |
setMembershipStatus
Lock/unlock WEB_ADMIN access with a reason. No matrix rule yet: denied.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | SetMembershipStatusInput! |
Trả về StaffCommandResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
staff | StaffMember! |
setRolePermissions
Files a grant-set change of a custom role (AD-01 maker, MFA); applied on approval.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | SetRolePermissionsInput! |
Trả về RoleChangeResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
change | RoleChangeRequest! |
updateRole
Rename/describe a custom role; new version (RB-03, MFA step-up).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | UpdateRoleInput! |
Trả về RoleCommandResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
role | Role! |