Skip to content

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!

FieldKiểuMô tả
idID!
appAppCode!
maskedPhoneStringOwn phone, masked like every other surface (e.g. +8490****567); null for an email-only account.
emailStringOwn login email (PPI-P3-01, E-01), as session.user.email returns it; null when the account has none.
accountStatusAccountStatus!
membershipStatusMembershipStatus!
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).
nextStepNextStep!Same rule as the sign-in answer.
profileProfileRequires 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ểuMặc địnhMô tả
pageInt1
pageSizeInt20

Trả về StaffMemberPage!

FieldKiểuMô tả
items[StaffMember!]!
pageInt!
pageSizeInt!
totalInt!

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!]!

FieldKiểuMô tả
resourceString!
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ểuMặc địnhMô tả
codeString!
appAppCode

Trả về Role!

FieldKiểuMô tả
idID!
codeString!
appAppCode!
nameString!
descriptionString
isSystemBoolean!PD-08 s14 baseline role (equals the permission matrix): read-only here.
versionInt!expectedVersion for updateRole / setRolePermissions.
userCountInt!Unrevoked assignments of this role.
permissions[String!]!Permission codes of the live grants.
grants[PermissionGrant!]!
updatedAtDateTime!

roleChangeRequests ​

Maker/checker queue, oldest first. RB-01/RB-02.

query · SDL không ghi quyền

Tham sốKiểuMặc địnhMô tả
statusRoleChangeStatus

Trả về [RoleChangeRequest!]!

FieldKiểuMô tả
idID!
kindRoleChangeKind!
appAppCode!
roleIdID!
roleCodeString
roleVersionInt!Role version the maker saw; the change is stale once the role moves.
accountIdID
assignmentIdID
grants[PermissionGrant!]SET_ROLE_PERMISSIONS: the complete new grant set.
payloadHashString!
reasonString!
statusRoleChangeStatus!
requestedByID!
requestedAtDateTime!
approvedByID
approvedAtDateTime
appliedVersionInt
versionInt!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ểuMặc địnhMô tả
roleIdID!

Trả về [RoleVersion!]!

FieldKiểuMô tả
versionInt!
nameString!
descriptionString
changedByID
changeRequestIdID
recordedAtDateTime!
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ểuMặc địnhMô tả
appAppCode

Trả về [Role!]!

FieldKiểuMô tả
idID!
codeString!
appAppCode!
nameString!
descriptionString
isSystemBoolean!PD-08 s14 baseline role (equals the permission matrix): read-only here.
versionInt!expectedVersion for updateRole / setRolePermissions.
userCountInt!Unrevoked assignments of this role.
permissions[String!]!Permission codes of the live grants.
grants[PermissionGrant!]!
updatedAtDateTime!

staff ​

WEB_ADMIN staff, masked. Requires staff.read (AD-05).

query · quyền: staff.read

Tham sốKiểuMặc địnhMô tả
membershipStatusMembershipStatus
accountStatusAccountStatus
roleStringOnly staff holding this WEB_ADMIN role.
pageInt1
pageSizeInt20

Trả về StaffMemberPage!

FieldKiểuMô tả
items[StaffMember!]!
pageInt!
pageSizeInt!
totalInt!

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ểuMặc địnhMô tả
membershipStatusMembershipStatus
awaitingRoleBooleanOnly people waiting for their first role (the approval queue).
pageInt1
pageSizeInt20

Trả về StaffAccountPage!

FieldKiểuMô tả
items[StaffAccount!]!
pageInt!
pageSizeInt!
totalInt!

staffDetail ​

One staff member, masked. Requires staff.read (AD-05).

query · quyền: staff.read

Tham sốKiểuMặc địnhMô tả
accountIdID!

Trả về StaffMember!

FieldKiểuMô tả
accountIdID!
maskedPhoneString!
accountStatusAccountStatus!
accountVersionInt!expectedVersion for setAccountStatus.
membershipStatusMembershipStatus!
membershipVersionInt!expectedVersion for approve/reject/setMembershipStatus.
statusReasonStringReason recorded with the last membership decision (internal note).
roles[String!]!Unrevoked WEB_ADMIN roles.
registeredAtDateTime!
approvedAtDateTime
updatedAtDateTime!

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ểuMặc địnhMô tả
inputApproveMembershipInput!

Trả về StaffCommandResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
staffStaffMember!

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ểuMặc địnhMô tả
inputApproveRoleChangeInput!

Trả về RoleChangeResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
changeRoleChangeRequest!

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ểuMặc địnhMô tả
inputRoleAssignmentInput!

Trả về RoleChangeResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
changeRoleChangeRequest!

createRole ​

New custom WEB_ADMIN role with no grant (RB-03, MFA step-up).

mutation · SDL không ghi quyền

Tham sốKiểuMặc địnhMô tả
inputCreateRoleInput!

Trả về RoleCommandResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
roleRole!

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ểuMặc địnhMô tả
inputCreateStaffAccountInput!

Trả về CreateStaffAccountResult!

FieldKiểuMô tả
aggregateIdID!The new STAFF account (= accountId).
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
accountIdID!
membershipStatusMembershipStatus!Always ACTIVE: the person signs in at once and waits for the role (me.nextStep AWAITING_ROLE).
roleChangeRequestIdID!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ểuMặc địnhMô tả
inputRejectMembershipInput!

Trả về StaffCommandResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
staffStaffMember!

revokeRole ​

Files a role revocation for another staff member (AD-01 maker, MFA).

mutation · SDL không ghi quyền

Tham sốKiểuMặc địnhMô tả
inputRoleAssignmentInput!

Trả về RoleChangeResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
changeRoleChangeRequest!

setAccountStatus ​

Account-wide status with a reason. No matrix rule yet: denied.

mutation · SDL không ghi quyền

Tham sốKiểuMặc địnhMô tả
inputSetAccountStatusInput!

Trả về StaffCommandResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
staffStaffMember!

setMembershipStatus ​

Lock/unlock WEB_ADMIN access with a reason. No matrix rule yet: denied.

mutation · SDL không ghi quyền

Tham sốKiểuMặc địnhMô tả
inputSetMembershipStatusInput!

Trả về StaffCommandResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
staffStaffMember!

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ểuMặc địnhMô tả
inputSetRolePermissionsInput!

Trả về RoleChangeResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
changeRoleChangeRequest!

updateRole ​

Rename/describe a custom role; new version (RB-03, MFA step-up).

mutation · SDL không ghi quyền

Tham sốKiểuMặc địnhMô tả
inputUpdateRoleInput!

Trả về RoleCommandResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
roleRole!

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17