Giao diện
API · tier-admin
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.
14 query · 8 mutation.
Query
membershipCustomer
One customer's Tier and rank (detail). Requires tier.read (TIR-02).
query · quyền: tier.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
accountId | ID! |
Trả về MembershipCustomer!
| Field | Kiểu | Mô tả |
|---|---|---|
accountId | ID! | |
customerCode | String! | |
name | String! | |
phone | String | Full display phone for a caller holding customer.pii.read, else the database mask; null for an email-only customer (PPI-P3-01). |
piiMasked | Boolean! | |
tier | MembershipTierSnapshot | Null only while no Standard Tier exists. |
effectiveRankPoints | PointAmount! | Sum of unexpired rank entries, clamped at 0. |
rankLedgerSum | PointAmount | U28-FU-API-A. The signed sum of the unexpired rank entries before the clamp (tier.rank_ledger_sum, may be negative): effectiveRankPoints = max(0, rankLedgerSum) (BR-HT-11 "Tổng khoản còn hạn −200, tính là 0"). |
nextTier | MembershipTierSnapshot | Null at the highest Tier. |
remainingToNext | PointAmount | nextTier threshold minus effectiveRankPoints, never negative; null at the highest Tier. |
isHighestTier | Boolean! | |
reachedAt | DateTime | When the customer was placed in the current Tier (unchanged by a review that keeps the Tier). |
expiringRankPoints | PointAmount | Points of the soonest-expiring active credit(s); null when nothing is active. |
expiringAt | DateTime |
membershipCustomers
Customers with their Tier and rank. Requires tier.read (TIR-02).
query · quyền: tier.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
filter | MembershipCustomerFilterInput | ||
page | Int | ||
pageSize | Int |
Trả về MembershipCustomerPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [MembershipCustomer!]! | effectiveRankPoints descending. |
page | Int! | |
pageSize | Int! | 10 (default), 20, 50 or 100. |
total | Int! |
membershipTier
One Tier of the set (detail). Requires tier.read (TIR-02).
query · quyền: tier.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
id | ID! |
Trả về MembershipTier!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
isStandard | Boolean! | Default Tier: new customers start here; threshold 0, never deleted. Not derived from the name. |
name | String! | |
rankThreshold | PointAmount! | Active rank points needed (Standard 0). Unique in the set. |
coefficient | Float | Common Pi-Point coefficient (> 0, one decimal). Null = not configured yet (legacy data, DEC-U28-06). |
benefitDescription | String | Mô tả quyền lợi (<= 500 characters), shown to the App. Null when empty. |
position | Int! | 1-based place by threshold ascending (Standard = 1). |
tierCount | Int! | Tiers in the set (the detail page shows position / tierCount). |
customerCount | Int! | Customers whose current Tier is this one (the link to the customer tab filter). |
createdAt | DateTime! | |
updatedAt | DateTime! |
membershipTierChangePreview
Impact of a create / update / delete before the confirmation. Requires tier.read (TIR-02).
query · quyền: tier.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | MembershipTierChangePreviewInput! |
Trả về MembershipTierChangePreview!
| Field | Kiểu | Mô tả |
|---|---|---|
kind | MembershipTierChangeKind! | |
tierId | ID | |
tierName | String | The current name (UPDATE / DELETE); null for CREATE. |
customerCount | Int! | Customers now in the Tier (UPDATE / DELETE); 0 for CREATE. |
requiresReevaluation | Boolean! | True for CREATE, a threshold change and DELETE: saving re-evaluates every customer. |
setVersion | Int! | The set version this preview was computed on. |
membershipTierHistory
Tier change history of one customer. Requires tier.read (TIR-02).
query · quyền: tier.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
accountId | ID! | ||
page | Int | ||
pageSize | Int |
Trả về MembershipTierHistoryPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [MembershipTierHistoryEntry!]! | Newest first. |
page | Int! | |
pageSize | Int! | |
total | Int! |
membershipTierSet
The customer Tier set with N and the latest re-evaluation. Requires tier.read (TIR-02).
query · quyền: tier.read
Không có tham số.
Trả về MembershipTierSet!
| Field | Kiểu | Mô tả |
|---|---|---|
tiers | [MembershipTier!]! | Ordered by rankThreshold ascending; Standard first. Not paged (at most 5). |
count | Int! | |
maxCount | Int! | 5: Standard included (BR-HT-02). Creating beyond it is conflict reason tier_limit_reached. |
version | Int! | CAS token of the whole set: every create / update / delete sends it as expectedVersion. |
updatedAt | DateTime | |
rankPointPolicy | RankPointPolicy | Null only when no policy version exists. |
reevaluation | TierReevaluation | The latest full re-evaluation; null when none ever ran. |
pointConfigVersions
Global cap / rate versions, newest first. Requires point_config.read (ADT-02: finance, business_owner).
query · quyền: point_config.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
key | PointConfigKey | ||
page | Int | ||
pageSize | Int |
Trả về PointConfigVersionPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [PointConfigVersion!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
rankPointHistory
Rank point entries of one customer. Requires tier.read (TIR-02).
query · quyền: tier.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
accountId | ID! | ||
page | Int | ||
pageSize | Int |
Trả về RankPointHistoryPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [RankPointHistoryEntry!]! | Newest first. |
page | Int! | |
pageSize | Int! | |
total | Int! |
rankPointPolicy
N in force; null when none. Requires tier.read (TIR-02).
query · quyền: tier.read
Không có tham số.
Trả về RankPointPolicy
| Field | Kiểu | Mô tả |
|---|---|---|
expiryMonths | Int! | |
effectiveFrom | DateTime! | When this N took effect (the save instant). |
versionNo | Int! | Policy version number; the expectedVersion of updateRankPointPolicy. |
timeZone | String! | The calendar zone months are added in. |
tier
One Tier. Requires tier.read (TIR-02).
query · quyền: tier.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
id | ID! |
Trả về TierConfig!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
audience | TierAudience! | |
code | String! | |
isStandard | Boolean! | Standard exists by default for both systems and cannot be deleted. |
name | String! | |
current | TierConfigVersion | Published version in force now, else null. |
draft | TierConfigVersion | Open DRAFT version, if any (one at a time). |
latest | TierConfigVersion | Highest version number. |
versions | [TierConfigVersion!]! | All versions, newest first; history is never deleted. |
memberCount | Int! | Active members whose current Tier is this one (impact of an edit, A-TIER-01 AC05). |
createdAt | DateTime! | |
version | Int! |
tierMembers
Members of a Tier system, optionally of one Tier, newest assignment first. Requires tier.read (TIR-02).
query · quyền: tier.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
audience | TierAudience! | ||
tierId | ID | ||
keyword | String | ||
page | Int | ||
pageSize | Int |
Trả về TierMemberPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [TierMember!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! | |
sourceStatus | SourceStatus! |
tierMultiplierChanges
Multiplier change proposals, open ones first. Requires tier_multiplier.read (ADT-05: sale_manager, business_owner).
query · quyền: tier_multiplier.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
tierVersionId | ID | ||
status | PointConfigStatus | ||
page | Int | ||
pageSize | Int |
Trả về TierMultiplierChangePage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [TierMultiplierChange!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
tierReevaluation
Poll one re-evaluation job. Requires tier.read (TIR-02).
query · quyền: tier.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
id | ID! |
Trả về TierReevaluation!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
status | TierReevaluationStatus! | |
reason | TierReevaluationReason! | |
setVersion | Int! | The set version the job evaluates against. |
startedAt | DateTime! | |
finishedAt | DateTime | Null while RUNNING. |
processedCount | Int! | |
totalCount | Int | Null until the job counted its population. |
failureCode | String | FAILED only: a stable reason code (never a stack or SQL text). |
tiers
A Tier system's Tiers with versions and member counts. Requires tier.read (TIR-02).
query · quyền: tier.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
audience | TierAudience! | ||
page | Int | ||
pageSize | Int |
Trả về TierConfigPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [TierConfig!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
Mutation
createMembershipTier
Add a Tier (direct save, DEC-U28-05). Requires tier.write (ADT-01, MFA step-up).
mutation · quyền: tier.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | CreateMembershipTierInput! |
Trả về MembershipTierSaveResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The Tier id. |
version | Int! | The new set version. |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
tier | MembershipTier | The saved Tier; null after a delete. |
reevaluation | TierReevaluation | The job this save started (RUNNING); null when the save does not re-evaluate (name / coefficient / description). |
decidePointConfigVersion
A different checker approves or rejects the unchanged payload. Requires point_config.decide (ADT-04: business_owner, never the maker, MFA step-up).
mutation · quyền: point_config.decide
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | DecidePointConfigVersionInput! |
Trả về PointConfigVersionResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
configVersion | PointConfigVersion! |
deleteMembershipTier
Delete a non-Standard Tier; history keeps its name. Requires tier.write (ADT-01, MFA step-up).
mutation · quyền: tier.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | DeleteMembershipTierInput! |
Trả về MembershipTierSaveResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The Tier id. |
version | Int! | The new set version. |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
tier | MembershipTier | The saved Tier; null after a delete. |
reevaluation | TierReevaluation | The job this save started (RUNNING); null when the save does not re-evaluate (name / coefficient / description). |
publishTierVersion
Requires tier.write (ADT-01). DRAFT -> PUBLISHED (frozen); closes the predecessor window.
mutation · quyền: tier.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | PublishTierVersionInput! |
Trả về TierVersionResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
tierId | ID! | |
tierVersion | TierConfigVersion! | |
closedVersionIds | [ID!]! | Predecessor versions whose open window this publish closed. |
savePointConfigVersion
Maker proposes / edits an open global cap or rate version. Requires point_config.propose (ADT-03: finance, MFA step-up).
mutation · quyền: point_config.propose
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | SavePointConfigVersionInput! |
Trả về PointConfigVersionResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
configVersion | PointConfigVersion! |
saveTierVersion
Create / edit a DRAFT Tier version. Requires tier.write (ADT-01). Multipliers need an approved policy (SPEC-01).
mutation · quyền: tier.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | SaveTierVersionInput! |
Trả về TierVersionResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
tierId | ID! | |
tierVersion | TierConfigVersion! | |
closedVersionIds | [ID!]! | Predecessor versions whose open window this publish closed. |
updateMembershipTier
Edit a Tier (Standard: name / coefficient / description only). Requires tier.write (ADT-01, MFA step-up).
mutation · quyền: tier.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | UpdateMembershipTierInput! |
Trả về MembershipTierSaveResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The Tier id. |
version | Int! | The new set version. |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
tier | MembershipTier | The saved Tier; null after a delete. |
reevaluation | TierReevaluation | The job this save started (RUNNING); null when the save does not re-evaluate (name / coefficient / description). |
updateRankPointPolicy
Change N for credits posted from now on. Requires tier.write (ADT-01, MFA step-up).
mutation · quyền: tier.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | UpdateRankPointPolicyInput! |
Trả về RankPointPolicyResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
policy | RankPointPolicy! |