Skip to content

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

Trả về MembershipCustomer!

FieldKiểuMô tả
accountIdID!
customerCodeString!
nameString!
phoneStringFull display phone for a caller holding customer.pii.read, else the database mask; null for an email-only customer (PPI-P3-01).
piiMaskedBoolean!
tierMembershipTierSnapshotNull only while no Standard Tier exists.
effectiveRankPointsPointAmount!Sum of unexpired rank entries, clamped at 0.
rankLedgerSumPointAmountU28-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").
nextTierMembershipTierSnapshotNull at the highest Tier.
remainingToNextPointAmountnextTier threshold minus effectiveRankPoints, never negative; null at the highest Tier.
isHighestTierBoolean!
reachedAtDateTimeWhen the customer was placed in the current Tier (unchanged by a review that keeps the Tier).
expiringRankPointsPointAmountPoints of the soonest-expiring active credit(s); null when nothing is active.
expiringAtDateTime

membershipCustomers ​

Customers with their Tier and rank. Requires tier.read (TIR-02).

query · quyền: tier.read

Tham sốKiểuMặc địnhMô tả
filterMembershipCustomerFilterInput
pageInt
pageSizeInt

Trả về MembershipCustomerPage!

FieldKiểuMô tả
items[MembershipCustomer!]!effectiveRankPoints descending.
pageInt!
pageSizeInt!10 (default), 20, 50 or 100.
totalInt!

membershipTier ​

One Tier of the set (detail). Requires tier.read (TIR-02).

query · quyền: tier.read

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

Trả về MembershipTier!

FieldKiểuMô tả
idID!
isStandardBoolean!Default Tier: new customers start here; threshold 0, never deleted. Not derived from the name.
nameString!
rankThresholdPointAmount!Active rank points needed (Standard 0). Unique in the set.
coefficientFloatCommon Pi-Point coefficient (> 0, one decimal). Null = not configured yet (legacy data, DEC-U28-06).
benefitDescriptionStringMô tả quyền lợi (<= 500 characters), shown to the App. Null when empty.
positionInt!1-based place by threshold ascending (Standard = 1).
tierCountInt!Tiers in the set (the detail page shows position / tierCount).
customerCountInt!Customers whose current Tier is this one (the link to the customer tab filter).
createdAtDateTime!
updatedAtDateTime!

membershipTierChangePreview ​

Impact of a create / update / delete before the confirmation. Requires tier.read (TIR-02).

query · quyền: tier.read

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

Trả về MembershipTierChangePreview!

FieldKiểuMô tả
kindMembershipTierChangeKind!
tierIdID
tierNameStringThe current name (UPDATE / DELETE); null for CREATE.
customerCountInt!Customers now in the Tier (UPDATE / DELETE); 0 for CREATE.
requiresReevaluationBoolean!True for CREATE, a threshold change and DELETE: saving re-evaluates every customer.
setVersionInt!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ểuMặc địnhMô tả
accountIdID!
pageInt
pageSizeInt

Trả về MembershipTierHistoryPage!

FieldKiểuMô tả
items[MembershipTierHistoryEntry!]!Newest first.
pageInt!
pageSizeInt!
totalInt!

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!

FieldKiểuMô tả
tiers[MembershipTier!]!Ordered by rankThreshold ascending; Standard first. Not paged (at most 5).
countInt!
maxCountInt!5: Standard included (BR-HT-02). Creating beyond it is conflict reason tier_limit_reached.
versionInt!CAS token of the whole set: every create / update / delete sends it as expectedVersion.
updatedAtDateTime
rankPointPolicyRankPointPolicyNull only when no policy version exists.
reevaluationTierReevaluationThe 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ểuMặc địnhMô tả
keyPointConfigKey
pageInt
pageSizeInt

Trả về PointConfigVersionPage!

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

rankPointHistory ​

Rank point entries of one customer. Requires tier.read (TIR-02).

query · quyền: tier.read

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

Trả về RankPointHistoryPage!

FieldKiểuMô tả
items[RankPointHistoryEntry!]!Newest first.
pageInt!
pageSizeInt!
totalInt!

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

FieldKiểuMô tả
expiryMonthsInt!
effectiveFromDateTime!When this N took effect (the save instant).
versionNoInt!Policy version number; the expectedVersion of updateRankPointPolicy.
timeZoneString!The calendar zone months are added in.

tier ​

One Tier. Requires tier.read (TIR-02).

query · quyền: tier.read

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

Trả về TierConfig!

FieldKiểuMô tả
idID!
audienceTierAudience!
codeString!
isStandardBoolean!Standard exists by default for both systems and cannot be deleted.
nameString!
currentTierConfigVersionPublished version in force now, else null.
draftTierConfigVersionOpen DRAFT version, if any (one at a time).
latestTierConfigVersionHighest version number.
versions[TierConfigVersion!]!All versions, newest first; history is never deleted.
memberCountInt!Active members whose current Tier is this one (impact of an edit, A-TIER-01 AC05).
createdAtDateTime!
versionInt!

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ểuMặc địnhMô tả
audienceTierAudience!
tierIdID
keywordString
pageInt
pageSizeInt

Trả về TierMemberPage!

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

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ểuMặc địnhMô tả
tierVersionIdID
statusPointConfigStatus
pageInt
pageSizeInt

Trả về TierMultiplierChangePage!

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

tierReevaluation ​

Poll one re-evaluation job. Requires tier.read (TIR-02).

query · quyền: tier.read

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

Trả về TierReevaluation!

FieldKiểuMô tả
idID!
statusTierReevaluationStatus!
reasonTierReevaluationReason!
setVersionInt!The set version the job evaluates against.
startedAtDateTime!
finishedAtDateTimeNull while RUNNING.
processedCountInt!
totalCountIntNull until the job counted its population.
failureCodeStringFAILED 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ểuMặc địnhMô tả
audienceTierAudience!
pageInt
pageSizeInt

Trả về TierConfigPage!

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

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

Trả về MembershipTierSaveResult!

FieldKiểuMô tả
aggregateIdID!The Tier id.
versionInt!The new set version.
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
tierMembershipTierThe saved Tier; null after a delete.
reevaluationTierReevaluationThe 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ểuMặc địnhMô tả
inputDecidePointConfigVersionInput!

Trả về PointConfigVersionResult!

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

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

Trả về MembershipTierSaveResult!

FieldKiểuMô tả
aggregateIdID!The Tier id.
versionInt!The new set version.
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
tierMembershipTierThe saved Tier; null after a delete.
reevaluationTierReevaluationThe 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ểuMặc địnhMô tả
inputPublishTierVersionInput!

Trả về TierVersionResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
tierIdID!
tierVersionTierConfigVersion!
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ểuMặc địnhMô tả
inputSavePointConfigVersionInput!

Trả về PointConfigVersionResult!

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

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

Trả về TierVersionResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
tierIdID!
tierVersionTierConfigVersion!
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ểuMặc địnhMô tả
inputUpdateMembershipTierInput!

Trả về MembershipTierSaveResult!

FieldKiểuMô tả
aggregateIdID!The Tier id.
versionInt!The new set version.
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
tierMembershipTierThe saved Tier; null after a delete.
reevaluationTierReevaluationThe 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ểuMặc địnhMô tả
inputUpdateRankPointPolicyInput!

Trả về RankPointPolicyResult!

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

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17