Giao diện
API · spin
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.
11 query · 13 mutation.
Query
mySpinSessions
Requires spin.read (SPN-01, own sessions only).
query · quyền: spin.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
state | SpinSessionState | ||
page | Int | ||
pageSize | Int |
Trả về SpinSessionPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [SpinSession!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
spinRuleDraft
Staff (SPN-02 spin.read): the wheel's current DRAFT (at most one), to edit further; null when there is none. CV3 (S4): exactly one of wheelId / campaignId.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
wheelId | ID | ||
campaignId | ID |
Trả về SpinRuleVersion
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
wheelId | ID! | |
campaignId | ID | |
versionNo | Int! | |
status | SpinRuleStatus! | |
intervals | [SpinInterval!]! | |
prizeTiers | [SpinPrizeTier!]! | |
undecided | [SpinUndecidedItem!]! | |
sessionDurationSeconds | Int | |
publishedAt | DateTime | |
publishedBy | ID | |
supersededAt | DateTime | |
createdBy | ID! | |
createdAt | DateTime! | |
updatedAt | DateTime! | |
version | Int! |
spinRuleInForce
Staff (SPN-02 spin.read, operations / admin): the wheel's PUBLISHED rule in force; null when none is published (GAP-342, owner E11). CV3 (S4): exactly one of wheelId / campaignId.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
wheelId | ID | ||
campaignId | ID |
Trả về SpinRuleVersion
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
wheelId | ID! | |
campaignId | ID | |
versionNo | Int! | |
status | SpinRuleStatus! | |
intervals | [SpinInterval!]! | |
prizeTiers | [SpinPrizeTier!]! | |
undecided | [SpinUndecidedItem!]! | |
sessionDurationSeconds | Int | |
publishedAt | DateTime | |
publishedBy | ID | |
supersededAt | DateTime | |
createdBy | ID! | |
createdAt | DateTime! | |
updatedAt | DateTime! | |
version | Int! |
spinSession
Requires spin.read (SPN-01). A foreign or unknown id is not_found.
query · quyền: spin.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
id | ID! |
Trả về SpinSession!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
orderId | ID! | |
campaignId | ID! | |
ruleVersionId | ID! | Configuration snapshot the session uses; later versions never change it. |
ruleVersionNo | Int! | |
state | SpinSessionState! | |
spinsAllotted | Int | Spins of the round holding the confirmed deposit, set at creation (BR-VQ-06). Null only on a legacy session created before D6. |
spinsUsed | Int! | |
spinsRemaining | Int | Null while spinsAllotted is undecided. |
windowStartsAt | DateTime | |
windowEndsAt | DateTime | |
bestPoints | PointAmount | Highest draw so far: the only retained result, never a sum. Null before the first draw. |
draws | [SpinDraw!]! | Every draw in server order. |
canSpin | Boolean! | True when drawSpin would be accepted now (server clock). |
spinBlock | SpinBlock | Why an entered ACTIVE session cannot be spun now (null when it can). Not used for NOT_ENTERED (null; read entryBlock, canSpin stays false until enterSpinSession). SESSION_ENDED once the session ended, or when its last signal is older than the server threshold (the next command ends it DISCONNECTED). |
reward | SpinReward! | The one reward of the session: the highest draw only, never a sum. |
undecided | [SpinUndecidedItem!]! | Open policy items; empty since D6. A legacy session without spins or window is blocked by spinBlock POLICY_UNDECIDED. |
depositConfirmedAt | DateTime! | |
endedAt | DateTime | |
endReason | SpinEndReason | Set with the end state; null while NOT_ENTERED / ACTIVE and for sessions ended before SPEC-04. |
sessionDurationSeconds | Int | |
enteredAt | DateTime | When the buyer entered the wheel screen (NOT_ENTERED -> ACTIVE); null while NOT_ENTERED. |
roundNo | Int | Đợt of the confirmed deposit (BR-VQ-06): the round whose spins were granted; null on a legacy session (time-interval rule). |
entryBlock | SpinEntryBlock | Why the buyer cannot enter yet (NOT_ENTERED only); null otherwise. |
wheel | SpinWheelDisplay | The wheel of the session's configuration snapshot (BR-VQLS-05): later edits of the wheel never change it. Null on a legacy session without a snapshot. |
heartbeatIntervalSeconds | Int | Seconds between spinSessionHeartbeat calls while ACTIVE (DEC-VQM-07, value set by the server); null on a session that is not ACTIVE. |
serverNow | DateTime! | Database time of this answer: the only clock the client may compare server instants with. |
createdAt | DateTime! | |
version | Int! | |
prizePoints | [PointAmount!]! | Points of each slice of the wheel this session is bound to (its rule version snapshot), in tier order; empty on a legacy session without a snapshot. Never a probability. |
spinSessionHistory
Lịch sử quay (VQ-US-08, BR-VQLS-01..02): one row per session, newest confirmed deposit first. search = Mã đơn, Mã KH, Số điện thoại (0… or +84…) or Mã chiến dịch; every filter is combined with it. wheelId may name an INACTIVE or legacy wheel. depositFrom / depositTo are Vietnam days YYYY-MM-DD (inclusive, Asia/Ho_Chi_Minh; from > to is validation_failed). pageSize 1..500, default 50 (the screen offers 50 / 100 / 500). Requires spin.history.read (SPN-05); a caller without it is forbidden.
query · quyền: spin.history.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
search | String | ||
wheelId | ID | ||
campaignType | CampaignType | ||
state | SpinSessionState | ||
pointsStatus | SpinPointsStatus | ||
depositFrom | String | ||
depositTo | String | ||
page | Int | ||
pageSize | Int |
Trả về SpinSessionHistoryPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [SpinSessionHistoryItem!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
spinSessionHistoryDetail
Popup Chi tiết phiên quay: the session and its draws; an unknown id is not_found. Requires spin.history.read (SPN-05).
query · quyền: spin.history.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
id | ID! |
Trả về SpinSessionHistoryDetail!
| Field | Kiểu | Mô tả |
|---|---|---|
session | SpinSessionHistoryItem! | |
draws | [SpinHistoryDraw!]! |
spinWheel
One wheel (Chi tiết vòng quay); an unknown id is not_found. Requires spin.read (SPN-02).
query · quyền: spin.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
id | ID! |
Trả về SpinWheel!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
code | String! | Mã vòng quay: VQ + ddmmyyyy (creation day) + 2 digits, at most 99 a day (BR-VQ-02, DEC-VQM-11), e.g. VQ0110202601; a legacy wheel keeps its 4-digit code. |
name | String! | Tên vòng quay: internal only, never sent to the App (BR-VQ-02); 1..100 characters, unique ignoring case. |
status | SpinWheelStatus! | |
roundCount | Int | Number of rounds (Đợt) of the configuration in force; null without one. |
maxPointsPerSpin | PointAmount | Mức tối đa / lượt: the largest Pi-Point of the 8 slots, a 0 % slot included (DEC-VQM-02); null without a configuration. |
inUseLocked | Boolean! | Đang khóa sửa (BR-VQ-04, DEC-VQM-03): a campaign OPEN or CLOSING chose the wheel; edit is refused (wheel_locked), deactivate is not. |
campaigns | [SpinWheelCampaign!]! | CV3-P4-08: the campaigns whose spinWheelId is this wheel, newest first, any status (Chiến dịch áp dụng). Requires spin.read (SPN-02). |
version | Int! | |
tone | SpinWheelTone | Tông màu; null for a legacy wheel (DEC-VQM-14, shown as —). |
rounds | [SpinWheelRound!]! | Đợt lượt quay, Đợt 1 first; empty for a legacy wheel. |
slots | [SpinWheelSlot!]! | Ô thưởng, Ô 1..8; empty for a legacy wheel. |
rulesText | String | Thể lệ as Admin typed it (line breaks kept, BR-VQ-10); null for a legacy wheel. |
campaignCount | Int! | Chiến dịch áp dụng: campaigns that chose the wheel, any status. |
openCampaignCount | Int! | Of those, the ones OPEN or CLOSING (· {n} đang mở). |
canDelete | Boolean! | Xóa is offered: the wheel was never chosen by a campaign and is not legacy (BR-VQ-05, DEC-VQM-24). |
legacy | Boolean! | Created before VQM (DEC-VQM-14): read only, not offered to new campaigns, edit refused (wheel_legacy). |
createdAt | DateTime! | |
createdBy | SpinWheelActor! | |
updatedAt | DateTime! | Cập nhật lần cuối: changes only on create, update and deactivate (not when a campaign chooses it). |
updatedBy | SpinWheelActor! |
spinWheelHistory
S8 Lịch sử thay đổi of one wheel (BR-VQ-12), newest first. from / to are Vietnam days YYYY-MM-DD (inclusive, Asia/Ho_Chi_Minh; from > to is validation_failed); actorId = Người thực hiện. pageSize 1..500, default 50. An unknown wheel is not_found. Requires spin.read (SPN-02).
query · quyền: spin.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
id | ID! | ||
from | String | ||
to | String | ||
actorId | ID | ||
page | Int | ||
pageSize | Int |
Trả về SpinWheelHistoryPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [SpinWheelHistoryEntry!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! | |
actors | [SpinWheelActor!]! | Everyone who changed this wheel (the Người thực hiện dropdown), whatever the filter. |
spinWheelNameAvailable
S15 (VQ-US-02 AC07, on blur): true when no other wheel, legacy ones included, has this name (trimmed NFC, any case); excludeId = the wheel being edited. Requires spin.read (SPN-02).
query · quyền: spin.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
name | String! | ||
excludeId | ID |
Trả về: Boolean!
spinWheelOptions
Dropdown of the campaign form (BR-C-09): ACTIVE, non-legacy wheels only, search = approximate code / name, accents kept. Requires spin.read (SPN-02).
query · quyền: spin.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
search | String |
Trả về [SpinWheel!]!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
code | String! | Mã vòng quay: VQ + ddmmyyyy (creation day) + 2 digits, at most 99 a day (BR-VQ-02, DEC-VQM-11), e.g. VQ0110202601; a legacy wheel keeps its 4-digit code. |
name | String! | Tên vòng quay: internal only, never sent to the App (BR-VQ-02); 1..100 characters, unique ignoring case. |
status | SpinWheelStatus! | |
roundCount | Int | Number of rounds (Đợt) of the configuration in force; null without one. |
maxPointsPerSpin | PointAmount | Mức tối đa / lượt: the largest Pi-Point of the 8 slots, a 0 % slot included (DEC-VQM-02); null without a configuration. |
inUseLocked | Boolean! | Đang khóa sửa (BR-VQ-04, DEC-VQM-03): a campaign OPEN or CLOSING chose the wheel; edit is refused (wheel_locked), deactivate is not. |
campaigns | [SpinWheelCampaign!]! | CV3-P4-08: the campaigns whose spinWheelId is this wheel, newest first, any status (Chiến dịch áp dụng). Requires spin.read (SPN-02). |
version | Int! | |
tone | SpinWheelTone | Tông màu; null for a legacy wheel (DEC-VQM-14, shown as —). |
rounds | [SpinWheelRound!]! | Đợt lượt quay, Đợt 1 first; empty for a legacy wheel. |
slots | [SpinWheelSlot!]! | Ô thưởng, Ô 1..8; empty for a legacy wheel. |
rulesText | String | Thể lệ as Admin typed it (line breaks kept, BR-VQ-10); null for a legacy wheel. |
campaignCount | Int! | Chiến dịch áp dụng: campaigns that chose the wheel, any status. |
openCampaignCount | Int! | Of those, the ones OPEN or CLOSING (· {n} đang mở). |
canDelete | Boolean! | Xóa is offered: the wheel was never chosen by a campaign and is not legacy (BR-VQ-05, DEC-VQM-24). |
legacy | Boolean! | Created before VQM (DEC-VQM-14): read only, not offered to new campaigns, edit refused (wheel_legacy). |
createdAt | DateTime! | |
createdBy | SpinWheelActor! | |
updatedAt | DateTime! | Cập nhật lần cuối: changes only on create, update and deactivate (not when a campaign chooses it). |
updatedBy | SpinWheelActor! |
spinWheels
Danh sách vòng quay (BR-VQDS-01..02): both statuses unless filtered; search = code or name, contains, any case; newest updatedAt first; pageSize 1..500, default 50 (50 / 100 / 500). Requires spin.read (SPN-02).
query · quyền: spin.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
page | Int | ||
pageSize | Int | ||
status | SpinWheelStatus | ||
search | String |
Trả về SpinWheelPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [SpinWheel!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
Mutation
createSpinWheel
Tạo / Nhân bản (VQ-US-02, VQ-US-03): ACTIVE wheel with a new daily code and its configuration applied. conflict name_taken / wheel_code_exhausted, validation_failed with details.fields. Requires spin.write (SPN-03).
mutation · quyền: spin.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | CreateSpinWheelInput! |
Trả về SpinWheelResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
wheel | SpinWheel! |
deactivateSpinWheel
Ngừng hoạt động (VQ-US-06): one way, allowed while locked; an INACTIVE wheel is returned unchanged (DEC-VQM-23); not_found. Requires spin.write (SPN-03).
mutation · quyền: spin.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | DeactivateSpinWheelInput! |
Trả về SpinWheelResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
wheel | SpinWheel! |
deleteSpinWheel
Xóa (VQ-US-07, BR-VQ-05): only a wheel never chosen by a campaign; conflict wheel_ever_chosen / wheel_legacy, not_found. Requires spin.write (SPN-03).
mutation · quyền: spin.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | DeleteSpinWheelInput! |
Trả về SpinWheelDeleteResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction |
drawSpin
Requires spin.play (SPN-04, own session). An existing drawNo is returned first (replayed: true, same slot and points), whatever the session state and the requestId. Otherwise only on an entered ACTIVE session (enterSpinSession first): another state answers conflict session_ended (details.session); an ACTIVE session whose last signal is older than the server threshold ends DISCONNECTED (the end is kept, no draw recorded) and answers session_ended with it. The draw counts as a heartbeat. policy_undecided only on a legacy session without spins.
mutation · quyền: spin.play
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | DrawSpinInput! |
Trả về DrawSpinResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
session | SpinSession! | |
draw | SpinDraw | Null only on a deprecated expired answer. |
replayed | Boolean! | True when this draw already existed (repeat tap, other device, retry): no spin consumed. |
expired | Boolean! |
enterSpinSession
VQM S10 (BR-VQ-08, DEC-VQM-08 C): NOT_ENTERED -> ACTIVE (enteredAt), the start of the session. Needs a live Ví của tôi (conflict wallet_required, details.session, the session stays NOT_ENTERED). Only a repeat with the same requestId returns the stored answer; another requestId on an ACTIVE session (the App reopened, a second device) ends it DISCONNECTED (DEC-VQM-07). A session that is lost before entering (order cancelled, campaign outcome: FORFEITED), that ends on this call, or that had already ended answers conflict session_ended with details.session (state + endReason); an end made by the call is kept. Requires spin.play (SPN-04, own session); a foreign or unknown id is not_found.
mutation · quyền: spin.play
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | EnterSpinSessionInput! |
Trả về SpinSession!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
orderId | ID! | |
campaignId | ID! | |
ruleVersionId | ID! | Configuration snapshot the session uses; later versions never change it. |
ruleVersionNo | Int! | |
state | SpinSessionState! | |
spinsAllotted | Int | Spins of the round holding the confirmed deposit, set at creation (BR-VQ-06). Null only on a legacy session created before D6. |
spinsUsed | Int! | |
spinsRemaining | Int | Null while spinsAllotted is undecided. |
windowStartsAt | DateTime | |
windowEndsAt | DateTime | |
bestPoints | PointAmount | Highest draw so far: the only retained result, never a sum. Null before the first draw. |
draws | [SpinDraw!]! | Every draw in server order. |
canSpin | Boolean! | True when drawSpin would be accepted now (server clock). |
spinBlock | SpinBlock | Why an entered ACTIVE session cannot be spun now (null when it can). Not used for NOT_ENTERED (null; read entryBlock, canSpin stays false until enterSpinSession). SESSION_ENDED once the session ended, or when its last signal is older than the server threshold (the next command ends it DISCONNECTED). |
reward | SpinReward! | The one reward of the session: the highest draw only, never a sum. |
undecided | [SpinUndecidedItem!]! | Open policy items; empty since D6. A legacy session without spins or window is blocked by spinBlock POLICY_UNDECIDED. |
depositConfirmedAt | DateTime! | |
endedAt | DateTime | |
endReason | SpinEndReason | Set with the end state; null while NOT_ENTERED / ACTIVE and for sessions ended before SPEC-04. |
sessionDurationSeconds | Int | |
enteredAt | DateTime | When the buyer entered the wheel screen (NOT_ENTERED -> ACTIVE); null while NOT_ENTERED. |
roundNo | Int | Đợt of the confirmed deposit (BR-VQ-06): the round whose spins were granted; null on a legacy session (time-interval rule). |
entryBlock | SpinEntryBlock | Why the buyer cannot enter yet (NOT_ENTERED only); null otherwise. |
wheel | SpinWheelDisplay | The wheel of the session's configuration snapshot (BR-VQLS-05): later edits of the wheel never change it. Null on a legacy session without a snapshot. |
heartbeatIntervalSeconds | Int | Seconds between spinSessionHeartbeat calls while ACTIVE (DEC-VQM-07, value set by the server); null on a session that is not ACTIVE. |
serverNow | DateTime! | Database time of this answer: the only clock the client may compare server instants with. |
createdAt | DateTime! | |
version | Int! | |
prizePoints | [PointAmount!]! | Points of each slice of the wheel this session is bound to (its rule version snapshot), in tier order; empty on a legacy session without a snapshot. Never a probability. |
leaveSpinSession
U-42 Rời phiên (BR-VQ-08). ACTIVE with >= 1 draw -> COMPLETED (highest kept, untaken spins lost), ACTIVE with no draw -> FORFEITED (Mất lượt, never reopened); endReason LEFT, or DISCONNECTED when the last signal was already older than the server threshold (DEC-VQM-07). Any other state (NOT_ENTERED, already ended, a legacy KEPT row) is returned unchanged. Requires spin.play (SPN-04, own session); a foreign or unknown id is not_found.
mutation · quyền: spin.play
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | LeaveSpinSessionInput! |
Trả về SpinSession!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
orderId | ID! | |
campaignId | ID! | |
ruleVersionId | ID! | Configuration snapshot the session uses; later versions never change it. |
ruleVersionNo | Int! | |
state | SpinSessionState! | |
spinsAllotted | Int | Spins of the round holding the confirmed deposit, set at creation (BR-VQ-06). Null only on a legacy session created before D6. |
spinsUsed | Int! | |
spinsRemaining | Int | Null while spinsAllotted is undecided. |
windowStartsAt | DateTime | |
windowEndsAt | DateTime | |
bestPoints | PointAmount | Highest draw so far: the only retained result, never a sum. Null before the first draw. |
draws | [SpinDraw!]! | Every draw in server order. |
canSpin | Boolean! | True when drawSpin would be accepted now (server clock). |
spinBlock | SpinBlock | Why an entered ACTIVE session cannot be spun now (null when it can). Not used for NOT_ENTERED (null; read entryBlock, canSpin stays false until enterSpinSession). SESSION_ENDED once the session ended, or when its last signal is older than the server threshold (the next command ends it DISCONNECTED). |
reward | SpinReward! | The one reward of the session: the highest draw only, never a sum. |
undecided | [SpinUndecidedItem!]! | Open policy items; empty since D6. A legacy session without spins or window is blocked by spinBlock POLICY_UNDECIDED. |
depositConfirmedAt | DateTime! | |
endedAt | DateTime | |
endReason | SpinEndReason | Set with the end state; null while NOT_ENTERED / ACTIVE and for sessions ended before SPEC-04. |
sessionDurationSeconds | Int | |
enteredAt | DateTime | When the buyer entered the wheel screen (NOT_ENTERED -> ACTIVE); null while NOT_ENTERED. |
roundNo | Int | Đợt of the confirmed deposit (BR-VQ-06): the round whose spins were granted; null on a legacy session (time-interval rule). |
entryBlock | SpinEntryBlock | Why the buyer cannot enter yet (NOT_ENTERED only); null otherwise. |
wheel | SpinWheelDisplay | The wheel of the session's configuration snapshot (BR-VQLS-05): later edits of the wheel never change it. Null on a legacy session without a snapshot. |
heartbeatIntervalSeconds | Int | Seconds between spinSessionHeartbeat calls while ACTIVE (DEC-VQM-07, value set by the server); null on a session that is not ACTIVE. |
serverNow | DateTime! | Database time of this answer: the only clock the client may compare server instants with. |
createdAt | DateTime! | |
version | Int! | |
prizePoints | [PointAmount!]! | Points of each slice of the wheel this session is bound to (its rule version snapshot), in tier order; empty on a legacy session without a snapshot. Never a probability. |
publishSpinRule
Requires spin.write (SPN-03: operations, admin). DRAFT -> PUBLISHED; supersedes the current version.
mutation · quyền: spin.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | PublishSpinRuleInput! |
Trả về SpinRuleResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | Null: since D6 a published rule gives each session its spins and window. |
rule | SpinRuleVersion! | |
supersededRuleId | ID | The previously published version this publish superseded. |
renameSpinWheel
Requires spin.write (SPN-03).
mutation · quyền: spin.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | RenameSpinWheelInput! |
Trả về SpinWheelResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
wheel | SpinWheel! |
resumeSpinSession
KEPT -> ACTIVE with a new window (now + the snapshotted sessionDurationSeconds), only before the campaign close; any other state is conflict. Requires spin.play (SPN-04, own session).
mutation · quyền: spin.play
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | ResumeSpinSessionInput! |
Trả về SpinSession!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
orderId | ID! | |
campaignId | ID! | |
ruleVersionId | ID! | Configuration snapshot the session uses; later versions never change it. |
ruleVersionNo | Int! | |
state | SpinSessionState! | |
spinsAllotted | Int | Spins of the round holding the confirmed deposit, set at creation (BR-VQ-06). Null only on a legacy session created before D6. |
spinsUsed | Int! | |
spinsRemaining | Int | Null while spinsAllotted is undecided. |
windowStartsAt | DateTime | |
windowEndsAt | DateTime | |
bestPoints | PointAmount | Highest draw so far: the only retained result, never a sum. Null before the first draw. |
draws | [SpinDraw!]! | Every draw in server order. |
canSpin | Boolean! | True when drawSpin would be accepted now (server clock). |
spinBlock | SpinBlock | Why an entered ACTIVE session cannot be spun now (null when it can). Not used for NOT_ENTERED (null; read entryBlock, canSpin stays false until enterSpinSession). SESSION_ENDED once the session ended, or when its last signal is older than the server threshold (the next command ends it DISCONNECTED). |
reward | SpinReward! | The one reward of the session: the highest draw only, never a sum. |
undecided | [SpinUndecidedItem!]! | Open policy items; empty since D6. A legacy session without spins or window is blocked by spinBlock POLICY_UNDECIDED. |
depositConfirmedAt | DateTime! | |
endedAt | DateTime | |
endReason | SpinEndReason | Set with the end state; null while NOT_ENTERED / ACTIVE and for sessions ended before SPEC-04. |
sessionDurationSeconds | Int | |
enteredAt | DateTime | When the buyer entered the wheel screen (NOT_ENTERED -> ACTIVE); null while NOT_ENTERED. |
roundNo | Int | Đợt of the confirmed deposit (BR-VQ-06): the round whose spins were granted; null on a legacy session (time-interval rule). |
entryBlock | SpinEntryBlock | Why the buyer cannot enter yet (NOT_ENTERED only); null otherwise. |
wheel | SpinWheelDisplay | The wheel of the session's configuration snapshot (BR-VQLS-05): later edits of the wheel never change it. Null on a legacy session without a snapshot. |
heartbeatIntervalSeconds | Int | Seconds between spinSessionHeartbeat calls while ACTIVE (DEC-VQM-07, value set by the server); null on a session that is not ACTIVE. |
serverNow | DateTime! | Database time of this answer: the only clock the client may compare server instants with. |
createdAt | DateTime! | |
version | Int! | |
prizePoints | [PointAmount!]! | Points of each slice of the wheel this session is bound to (its rule version snapshot), in tier order; empty on a legacy session without a snapshot. Never a probability. |
saveSpinRuleDraft
Requires spin.write (SPN-03: operations, admin).
mutation · quyền: spin.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | SaveSpinRuleDraftInput! |
Trả về SpinRuleResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | Null: since D6 a published rule gives each session its spins and window. |
rule | SpinRuleVersion! | |
supersededRuleId | ID | The previously published version this publish superseded. |
setSpinWheelStatus
Requires spin.write (SPN-03).
mutation · quyền: spin.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | SetSpinWheelStatusInput! |
Trả về SpinWheelResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
wheel | SpinWheel! |
spinSessionHeartbeat
VQM S10 (BR-VQ-08 E, DEC-VQM-07): the App is still on the wheel screen; call it every heartbeatIntervalSeconds while ACTIVE. Returns the session; an ended one (e.g. DISCONNECTED) is returned as it is, never an error. Requires spin.play (SPN-04, own session); a foreign or unknown id is not_found.
mutation · quyền: spin.play
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | SpinSessionHeartbeatInput! |
Trả về SpinSession!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
orderId | ID! | |
campaignId | ID! | |
ruleVersionId | ID! | Configuration snapshot the session uses; later versions never change it. |
ruleVersionNo | Int! | |
state | SpinSessionState! | |
spinsAllotted | Int | Spins of the round holding the confirmed deposit, set at creation (BR-VQ-06). Null only on a legacy session created before D6. |
spinsUsed | Int! | |
spinsRemaining | Int | Null while spinsAllotted is undecided. |
windowStartsAt | DateTime | |
windowEndsAt | DateTime | |
bestPoints | PointAmount | Highest draw so far: the only retained result, never a sum. Null before the first draw. |
draws | [SpinDraw!]! | Every draw in server order. |
canSpin | Boolean! | True when drawSpin would be accepted now (server clock). |
spinBlock | SpinBlock | Why an entered ACTIVE session cannot be spun now (null when it can). Not used for NOT_ENTERED (null; read entryBlock, canSpin stays false until enterSpinSession). SESSION_ENDED once the session ended, or when its last signal is older than the server threshold (the next command ends it DISCONNECTED). |
reward | SpinReward! | The one reward of the session: the highest draw only, never a sum. |
undecided | [SpinUndecidedItem!]! | Open policy items; empty since D6. A legacy session without spins or window is blocked by spinBlock POLICY_UNDECIDED. |
depositConfirmedAt | DateTime! | |
endedAt | DateTime | |
endReason | SpinEndReason | Set with the end state; null while NOT_ENTERED / ACTIVE and for sessions ended before SPEC-04. |
sessionDurationSeconds | Int | |
enteredAt | DateTime | When the buyer entered the wheel screen (NOT_ENTERED -> ACTIVE); null while NOT_ENTERED. |
roundNo | Int | Đợt of the confirmed deposit (BR-VQ-06): the round whose spins were granted; null on a legacy session (time-interval rule). |
entryBlock | SpinEntryBlock | Why the buyer cannot enter yet (NOT_ENTERED only); null otherwise. |
wheel | SpinWheelDisplay | The wheel of the session's configuration snapshot (BR-VQLS-05): later edits of the wheel never change it. Null on a legacy session without a snapshot. |
heartbeatIntervalSeconds | Int | Seconds between spinSessionHeartbeat calls while ACTIVE (DEC-VQM-07, value set by the server); null on a session that is not ACTIVE. |
serverNow | DateTime! | Database time of this answer: the only clock the client may compare server instants with. |
createdAt | DateTime! | |
version | Int! | |
prizePoints | [PointAmount!]! | Points of each slice of the wheel this session is bound to (its rule version snapshot), in tier order; empty on a legacy session without a snapshot. Never a probability. |
updateSpinWheel
Sửa (VQ-US-05, BR-VQ-11): saves and applies the whole configuration. conflict stale_version / name_taken / wheel_locked (details.campaignCodes) / wheel_legacy, not_found, validation_failed. An unchanged configuration writes nothing and returns the wheel as it is (DEC-VQM-20). Requires spin.write (SPN-03).
mutation · quyền: spin.write
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | UpdateSpinWheelInput! |
Trả về SpinWheelResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
wheel | SpinWheel! |