Skip to content

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

Trả về SpinSessionPage!

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

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

Trả về SpinRuleVersion

FieldKiểuMô tả
idID!
wheelIdID!
campaignIdID
versionNoInt!
statusSpinRuleStatus!
intervals[SpinInterval!]!
prizeTiers[SpinPrizeTier!]!
undecided[SpinUndecidedItem!]!
sessionDurationSecondsInt
publishedAtDateTime
publishedByID
supersededAtDateTime
createdByID!
createdAtDateTime!
updatedAtDateTime!
versionInt!

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

Trả về SpinRuleVersion

FieldKiểuMô tả
idID!
wheelIdID!
campaignIdID
versionNoInt!
statusSpinRuleStatus!
intervals[SpinInterval!]!
prizeTiers[SpinPrizeTier!]!
undecided[SpinUndecidedItem!]!
sessionDurationSecondsInt
publishedAtDateTime
publishedByID
supersededAtDateTime
createdByID!
createdAtDateTime!
updatedAtDateTime!
versionInt!

spinSession ​

Requires spin.read (SPN-01). A foreign or unknown id is not_found.

query · quyền: spin.read

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

Trả về SpinSession!

FieldKiểuMô tả
idID!
orderIdID!
campaignIdID!
ruleVersionIdID!Configuration snapshot the session uses; later versions never change it.
ruleVersionNoInt!
stateSpinSessionState!
spinsAllottedIntSpins of the round holding the confirmed deposit, set at creation (BR-VQ-06). Null only on a legacy session created before D6.
spinsUsedInt!
spinsRemainingIntNull while spinsAllotted is undecided.
windowStartsAtDateTime
windowEndsAtDateTime
bestPointsPointAmountHighest draw so far: the only retained result, never a sum. Null before the first draw.
draws[SpinDraw!]!Every draw in server order.
canSpinBoolean!True when drawSpin would be accepted now (server clock).
spinBlockSpinBlockWhy 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).
rewardSpinReward!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.
depositConfirmedAtDateTime!
endedAtDateTime
endReasonSpinEndReasonSet with the end state; null while NOT_ENTERED / ACTIVE and for sessions ended before SPEC-04.
sessionDurationSecondsInt
enteredAtDateTimeWhen the buyer entered the wheel screen (NOT_ENTERED -> ACTIVE); null while NOT_ENTERED.
roundNoIntĐợt of the confirmed deposit (BR-VQ-06): the round whose spins were granted; null on a legacy session (time-interval rule).
entryBlockSpinEntryBlockWhy the buyer cannot enter yet (NOT_ENTERED only); null otherwise.
wheelSpinWheelDisplayThe 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.
heartbeatIntervalSecondsIntSeconds between spinSessionHeartbeat calls while ACTIVE (DEC-VQM-07, value set by the server); null on a session that is not ACTIVE.
serverNowDateTime!Database time of this answer: the only clock the client may compare server instants with.
createdAtDateTime!
versionInt!
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ểuMặc địnhMô tả
searchString
wheelIdID
campaignTypeCampaignType
stateSpinSessionState
pointsStatusSpinPointsStatus
depositFromString
depositToString
pageInt
pageSizeInt

Trả về SpinSessionHistoryPage!

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

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

Trả về SpinSessionHistoryDetail!

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

Trả về SpinWheel!

FieldKiểuMô tả
idID!
codeString!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.
nameString!Tên vòng quay: internal only, never sent to the App (BR-VQ-02); 1..100 characters, unique ignoring case.
statusSpinWheelStatus!
roundCountIntNumber of rounds (Đợt) of the configuration in force; null without one.
maxPointsPerSpinPointAmountMứ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.
inUseLockedBoolean!Đ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).
versionInt!
toneSpinWheelToneTô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.
rulesTextStringThể lệ as Admin typed it (line breaks kept, BR-VQ-10); null for a legacy wheel.
campaignCountInt!Chiến dịch áp dụng: campaigns that chose the wheel, any status.
openCampaignCountInt!Of those, the ones OPEN or CLOSING (· {n} đang mở).
canDeleteBoolean!Xóa is offered: the wheel was never chosen by a campaign and is not legacy (BR-VQ-05, DEC-VQM-24).
legacyBoolean!Created before VQM (DEC-VQM-14): read only, not offered to new campaigns, edit refused (wheel_legacy).
createdAtDateTime!
createdBySpinWheelActor!
updatedAtDateTime!Cập nhật lần cuối: changes only on create, update and deactivate (not when a campaign chooses it).
updatedBySpinWheelActor!

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ểuMặc địnhMô tả
idID!
fromString
toString
actorIdID
pageInt
pageSizeInt

Trả về SpinWheelHistoryPage!

FieldKiểuMô tả
items[SpinWheelHistoryEntry!]!
pageInt!
pageSizeInt!
totalInt!
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ểuMặc địnhMô tả
nameString!
excludeIdID

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

Trả về [SpinWheel!]!

FieldKiểuMô tả
idID!
codeString!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.
nameString!Tên vòng quay: internal only, never sent to the App (BR-VQ-02); 1..100 characters, unique ignoring case.
statusSpinWheelStatus!
roundCountIntNumber of rounds (Đợt) of the configuration in force; null without one.
maxPointsPerSpinPointAmountMứ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.
inUseLockedBoolean!Đ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).
versionInt!
toneSpinWheelToneTô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.
rulesTextStringThể lệ as Admin typed it (line breaks kept, BR-VQ-10); null for a legacy wheel.
campaignCountInt!Chiến dịch áp dụng: campaigns that chose the wheel, any status.
openCampaignCountInt!Of those, the ones OPEN or CLOSING (· {n} đang mở).
canDeleteBoolean!Xóa is offered: the wheel was never chosen by a campaign and is not legacy (BR-VQ-05, DEC-VQM-24).
legacyBoolean!Created before VQM (DEC-VQM-14): read only, not offered to new campaigns, edit refused (wheel_legacy).
createdAtDateTime!
createdBySpinWheelActor!
updatedAtDateTime!Cập nhật lần cuối: changes only on create, update and deactivate (not when a campaign chooses it).
updatedBySpinWheelActor!

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

Trả về SpinWheelPage!

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

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

Trả về SpinWheelResult!

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

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

Trả về SpinWheelResult!

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

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

Trả về SpinWheelDeleteResult!

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

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

Trả về DrawSpinResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
sessionSpinSession!
drawSpinDrawNull only on a deprecated expired answer.
replayedBoolean!True when this draw already existed (repeat tap, other device, retry): no spin consumed.
expiredBoolean!

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

Trả về SpinSession!

FieldKiểuMô tả
idID!
orderIdID!
campaignIdID!
ruleVersionIdID!Configuration snapshot the session uses; later versions never change it.
ruleVersionNoInt!
stateSpinSessionState!
spinsAllottedIntSpins of the round holding the confirmed deposit, set at creation (BR-VQ-06). Null only on a legacy session created before D6.
spinsUsedInt!
spinsRemainingIntNull while spinsAllotted is undecided.
windowStartsAtDateTime
windowEndsAtDateTime
bestPointsPointAmountHighest draw so far: the only retained result, never a sum. Null before the first draw.
draws[SpinDraw!]!Every draw in server order.
canSpinBoolean!True when drawSpin would be accepted now (server clock).
spinBlockSpinBlockWhy 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).
rewardSpinReward!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.
depositConfirmedAtDateTime!
endedAtDateTime
endReasonSpinEndReasonSet with the end state; null while NOT_ENTERED / ACTIVE and for sessions ended before SPEC-04.
sessionDurationSecondsInt
enteredAtDateTimeWhen the buyer entered the wheel screen (NOT_ENTERED -> ACTIVE); null while NOT_ENTERED.
roundNoIntĐợt of the confirmed deposit (BR-VQ-06): the round whose spins were granted; null on a legacy session (time-interval rule).
entryBlockSpinEntryBlockWhy the buyer cannot enter yet (NOT_ENTERED only); null otherwise.
wheelSpinWheelDisplayThe 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.
heartbeatIntervalSecondsIntSeconds between spinSessionHeartbeat calls while ACTIVE (DEC-VQM-07, value set by the server); null on a session that is not ACTIVE.
serverNowDateTime!Database time of this answer: the only clock the client may compare server instants with.
createdAtDateTime!
versionInt!
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ểuMặc địnhMô tả
inputLeaveSpinSessionInput!

Trả về SpinSession!

FieldKiểuMô tả
idID!
orderIdID!
campaignIdID!
ruleVersionIdID!Configuration snapshot the session uses; later versions never change it.
ruleVersionNoInt!
stateSpinSessionState!
spinsAllottedIntSpins of the round holding the confirmed deposit, set at creation (BR-VQ-06). Null only on a legacy session created before D6.
spinsUsedInt!
spinsRemainingIntNull while spinsAllotted is undecided.
windowStartsAtDateTime
windowEndsAtDateTime
bestPointsPointAmountHighest draw so far: the only retained result, never a sum. Null before the first draw.
draws[SpinDraw!]!Every draw in server order.
canSpinBoolean!True when drawSpin would be accepted now (server clock).
spinBlockSpinBlockWhy 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).
rewardSpinReward!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.
depositConfirmedAtDateTime!
endedAtDateTime
endReasonSpinEndReasonSet with the end state; null while NOT_ENTERED / ACTIVE and for sessions ended before SPEC-04.
sessionDurationSecondsInt
enteredAtDateTimeWhen the buyer entered the wheel screen (NOT_ENTERED -> ACTIVE); null while NOT_ENTERED.
roundNoIntĐợt of the confirmed deposit (BR-VQ-06): the round whose spins were granted; null on a legacy session (time-interval rule).
entryBlockSpinEntryBlockWhy the buyer cannot enter yet (NOT_ENTERED only); null otherwise.
wheelSpinWheelDisplayThe 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.
heartbeatIntervalSecondsIntSeconds between spinSessionHeartbeat calls while ACTIVE (DEC-VQM-07, value set by the server); null on a session that is not ACTIVE.
serverNowDateTime!Database time of this answer: the only clock the client may compare server instants with.
createdAtDateTime!
versionInt!
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ểuMặc địnhMô tả
inputPublishSpinRuleInput!

Trả về SpinRuleResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextActionNull: since D6 a published rule gives each session its spins and window.
ruleSpinRuleVersion!
supersededRuleIdIDThe previously published version this publish superseded.

renameSpinWheel ​

Requires spin.write (SPN-03).

mutation · quyền: spin.write

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

Trả về SpinWheelResult!

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

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

Trả về SpinSession!

FieldKiểuMô tả
idID!
orderIdID!
campaignIdID!
ruleVersionIdID!Configuration snapshot the session uses; later versions never change it.
ruleVersionNoInt!
stateSpinSessionState!
spinsAllottedIntSpins of the round holding the confirmed deposit, set at creation (BR-VQ-06). Null only on a legacy session created before D6.
spinsUsedInt!
spinsRemainingIntNull while spinsAllotted is undecided.
windowStartsAtDateTime
windowEndsAtDateTime
bestPointsPointAmountHighest draw so far: the only retained result, never a sum. Null before the first draw.
draws[SpinDraw!]!Every draw in server order.
canSpinBoolean!True when drawSpin would be accepted now (server clock).
spinBlockSpinBlockWhy 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).
rewardSpinReward!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.
depositConfirmedAtDateTime!
endedAtDateTime
endReasonSpinEndReasonSet with the end state; null while NOT_ENTERED / ACTIVE and for sessions ended before SPEC-04.
sessionDurationSecondsInt
enteredAtDateTimeWhen the buyer entered the wheel screen (NOT_ENTERED -> ACTIVE); null while NOT_ENTERED.
roundNoIntĐợt of the confirmed deposit (BR-VQ-06): the round whose spins were granted; null on a legacy session (time-interval rule).
entryBlockSpinEntryBlockWhy the buyer cannot enter yet (NOT_ENTERED only); null otherwise.
wheelSpinWheelDisplayThe 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.
heartbeatIntervalSecondsIntSeconds between spinSessionHeartbeat calls while ACTIVE (DEC-VQM-07, value set by the server); null on a session that is not ACTIVE.
serverNowDateTime!Database time of this answer: the only clock the client may compare server instants with.
createdAtDateTime!
versionInt!
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ểuMặc địnhMô tả
inputSaveSpinRuleDraftInput!

Trả về SpinRuleResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextActionNull: since D6 a published rule gives each session its spins and window.
ruleSpinRuleVersion!
supersededRuleIdIDThe previously published version this publish superseded.

setSpinWheelStatus ​

Requires spin.write (SPN-03).

mutation · quyền: spin.write

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

Trả về SpinWheelResult!

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

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

Trả về SpinSession!

FieldKiểuMô tả
idID!
orderIdID!
campaignIdID!
ruleVersionIdID!Configuration snapshot the session uses; later versions never change it.
ruleVersionNoInt!
stateSpinSessionState!
spinsAllottedIntSpins of the round holding the confirmed deposit, set at creation (BR-VQ-06). Null only on a legacy session created before D6.
spinsUsedInt!
spinsRemainingIntNull while spinsAllotted is undecided.
windowStartsAtDateTime
windowEndsAtDateTime
bestPointsPointAmountHighest draw so far: the only retained result, never a sum. Null before the first draw.
draws[SpinDraw!]!Every draw in server order.
canSpinBoolean!True when drawSpin would be accepted now (server clock).
spinBlockSpinBlockWhy 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).
rewardSpinReward!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.
depositConfirmedAtDateTime!
endedAtDateTime
endReasonSpinEndReasonSet with the end state; null while NOT_ENTERED / ACTIVE and for sessions ended before SPEC-04.
sessionDurationSecondsInt
enteredAtDateTimeWhen the buyer entered the wheel screen (NOT_ENTERED -> ACTIVE); null while NOT_ENTERED.
roundNoIntĐợt of the confirmed deposit (BR-VQ-06): the round whose spins were granted; null on a legacy session (time-interval rule).
entryBlockSpinEntryBlockWhy the buyer cannot enter yet (NOT_ENTERED only); null otherwise.
wheelSpinWheelDisplayThe 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.
heartbeatIntervalSecondsIntSeconds between spinSessionHeartbeat calls while ACTIVE (DEC-VQM-07, value set by the server); null on a session that is not ACTIVE.
serverNowDateTime!Database time of this answer: the only clock the client may compare server instants with.
createdAtDateTime!
versionInt!
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ểuMặc địnhMô tả
inputUpdateSpinWheelInput!

Trả về SpinWheelResult!

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

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17