diff --git a/src/app/(payload)/admin/importMap.js b/src/app/(payload)/admin/importMap.js index 9ab3317..7ea28c7 100644 --- a/src/app/(payload)/admin/importMap.js +++ b/src/app/(payload)/admin/importMap.js @@ -3,16 +3,6 @@ import { RscEntryLexicalCell as RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7 import { RscEntryLexicalField as RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc' import { LexicalDiffComponent as LexicalDiffComponent_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc' import { LexicalEditorFeatureClient as LexicalEditorFeatureClient_4490b89d4413c1ffaecdacfe72efaf73 } from '@ai-stack/payloadcms/client' -import { HeadingFeatureClient as HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { default as default_513af5ed43d616d133e530d8c94232f8 } from '@/components/admin/groups/CollapsibleGroupField' -import { default as default_d9c22b951ac6762f436db59b889da382 } from '@/components/admin/awards/CommendationColorField' -import { default as default_c3ea68702b5e5f8f2f98055e01c43c8d } from '@/components/admin/awards/RibbonDesigner' -import { default as default_2f2033acccb3be245f1a85f7b4271dac } from '@/components/admin/awards/MedalDesigner' -import { default as default_4b88a624e9f0b376cffcc6814d459adb } from '@/components/admin/assignments/AssignmentMembersField' -import { default as default_0edde40a6ccd30c893b1227360f69360 } from '@/components/static/TickDurationDescription' -import { default as default_2d468cc5cf0b647ffca3201592c20825 } from '@/components/static/WarningMessage' -import { AudioPreviewField as AudioPreviewField_6bccef9bf4ea41ed573ab9f36fa579b2 } from '@/components/admin/voiceover/AudioPreviewField' -import { default as default_7fa52484aec46e988e9cfb5e86c0c759 } from '@/components/admin/narrative-flow/NarrativeFlowEditor' import { FixedToolbarFeatureClient as FixedToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' import { InlineToolbarFeatureClient as InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' import { HorizontalRuleFeatureClient as HorizontalRuleFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' @@ -25,6 +15,7 @@ import { OrderedListFeatureClient as OrderedListFeatureClient_e70f5e05f09f93e00b import { UnorderedListFeatureClient as UnorderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' import { IndentFeatureClient as IndentFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' import { AlignFeatureClient as AlignFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' +import { HeadingFeatureClient as HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' import { ParagraphFeatureClient as ParagraphFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' import { InlineCodeFeatureClient as InlineCodeFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' import { SuperscriptFeatureClient as SuperscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' @@ -33,6 +24,15 @@ import { StrikethroughFeatureClient as StrikethroughFeatureClient_e70f5e05f09f93 import { UnderlineFeatureClient as UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' import { BoldFeatureClient as BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' +import { default as default_513af5ed43d616d133e530d8c94232f8 } from '@/components/admin/groups/CollapsibleGroupField' +import { default as default_d9c22b951ac6762f436db59b889da382 } from '@/components/admin/awards/CommendationColorField' +import { default as default_c3ea68702b5e5f8f2f98055e01c43c8d } from '@/components/admin/awards/RibbonDesigner' +import { default as default_2f2033acccb3be245f1a85f7b4271dac } from '@/components/admin/awards/MedalDesigner' +import { default as default_4b88a624e9f0b376cffcc6814d459adb } from '@/components/admin/assignments/AssignmentMembersField' +import { default as default_0edde40a6ccd30c893b1227360f69360 } from '@/components/static/TickDurationDescription' +import { default as default_2d468cc5cf0b647ffca3201592c20825 } from '@/components/static/WarningMessage' +import { AudioPreviewField as AudioPreviewField_6bccef9bf4ea41ed573ab9f36fa579b2 } from '@/components/admin/voiceover/AudioPreviewField' +import { default as default_7fa52484aec46e988e9cfb5e86c0c759 } from '@/components/admin/narrative-flow/NarrativeFlowEditor' import { SelectField as SelectField_4490b89d4413c1ffaecdacfe72efaf73 } from '@ai-stack/payloadcms/client' import { PromptEditorField as PromptEditorField_4490b89d4413c1ffaecdacfe72efaf73 } from '@ai-stack/payloadcms/client' import { default as default_b16af798585cda7cfed92f7b1dd0c707 } from '@/components/admin/shims/ShimContentField' @@ -51,16 +51,6 @@ export const importMap = { "@payloadcms/richtext-lexical/rsc#RscEntryLexicalField": RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e, "@payloadcms/richtext-lexical/rsc#LexicalDiffComponent": LexicalDiffComponent_44fe37237e0ebf4470c9990d8cb7b07e, "@ai-stack/payloadcms/client#LexicalEditorFeatureClient": LexicalEditorFeatureClient_4490b89d4413c1ffaecdacfe72efaf73, - "@payloadcms/richtext-lexical/client#HeadingFeatureClient": HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@/components/admin/groups/CollapsibleGroupField#default": default_513af5ed43d616d133e530d8c94232f8, - "@/components/admin/awards/CommendationColorField#default": default_d9c22b951ac6762f436db59b889da382, - "@/components/admin/awards/RibbonDesigner#default": default_c3ea68702b5e5f8f2f98055e01c43c8d, - "@/components/admin/awards/MedalDesigner#default": default_2f2033acccb3be245f1a85f7b4271dac, - "@/components/admin/assignments/AssignmentMembersField#default": default_4b88a624e9f0b376cffcc6814d459adb, - "@/components/static/TickDurationDescription#default": default_0edde40a6ccd30c893b1227360f69360, - "@/components/static/WarningMessage#default": default_2d468cc5cf0b647ffca3201592c20825, - "@/components/admin/voiceover/AudioPreviewField#AudioPreviewField": AudioPreviewField_6bccef9bf4ea41ed573ab9f36fa579b2, - "@/components/admin/narrative-flow/NarrativeFlowEditor#default": default_7fa52484aec46e988e9cfb5e86c0c759, "@payloadcms/richtext-lexical/client#FixedToolbarFeatureClient": FixedToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, "@payloadcms/richtext-lexical/client#InlineToolbarFeatureClient": InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, "@payloadcms/richtext-lexical/client#HorizontalRuleFeatureClient": HorizontalRuleFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, @@ -73,6 +63,7 @@ export const importMap = { "@payloadcms/richtext-lexical/client#UnorderedListFeatureClient": UnorderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, "@payloadcms/richtext-lexical/client#IndentFeatureClient": IndentFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, "@payloadcms/richtext-lexical/client#AlignFeatureClient": AlignFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, + "@payloadcms/richtext-lexical/client#HeadingFeatureClient": HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, "@payloadcms/richtext-lexical/client#ParagraphFeatureClient": ParagraphFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, "@payloadcms/richtext-lexical/client#InlineCodeFeatureClient": InlineCodeFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, "@payloadcms/richtext-lexical/client#SuperscriptFeatureClient": SuperscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, @@ -81,6 +72,15 @@ export const importMap = { "@payloadcms/richtext-lexical/client#UnderlineFeatureClient": UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, "@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, "@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, + "@/components/admin/groups/CollapsibleGroupField#default": default_513af5ed43d616d133e530d8c94232f8, + "@/components/admin/awards/CommendationColorField#default": default_d9c22b951ac6762f436db59b889da382, + "@/components/admin/awards/RibbonDesigner#default": default_c3ea68702b5e5f8f2f98055e01c43c8d, + "@/components/admin/awards/MedalDesigner#default": default_2f2033acccb3be245f1a85f7b4271dac, + "@/components/admin/assignments/AssignmentMembersField#default": default_4b88a624e9f0b376cffcc6814d459adb, + "@/components/static/TickDurationDescription#default": default_0edde40a6ccd30c893b1227360f69360, + "@/components/static/WarningMessage#default": default_2d468cc5cf0b647ffca3201592c20825, + "@/components/admin/voiceover/AudioPreviewField#AudioPreviewField": AudioPreviewField_6bccef9bf4ea41ed573ab9f36fa579b2, + "@/components/admin/narrative-flow/NarrativeFlowEditor#default": default_7fa52484aec46e988e9cfb5e86c0c759, "@ai-stack/payloadcms/client#SelectField": SelectField_4490b89d4413c1ffaecdacfe72efaf73, "@ai-stack/payloadcms/client#PromptEditorField": PromptEditorField_4490b89d4413c1ffaecdacfe72efaf73, "@/components/admin/shims/ShimContentField#default": default_b16af798585cda7cfed92f7b1dd0c707, diff --git a/src/migrations/index.ts b/src/migrations/index.ts index c462a2f..118303e 100644 --- a/src/migrations/index.ts +++ b/src/migrations/index.ts @@ -55,7 +55,11 @@ import * as migration_20260910_222518_add_dashboard_layout_preference from './20 import * as migration_20260911_044754_add_poker_minigame_stats from './20260911_044754_add_poker_minigame_stats'; import * as migration_20260911_052147_add_ribbon_submissions from './20260911_052147_add_ribbon_submissions'; import * as migration_20260911_201559_add_award_advancement_series from './20260911_201559_add_award_advancement_series'; +import * as migration_20260912_051752_add_rank_promotion_ceiling from './20260912_051752_add_rank_promotion_ceiling'; +import * as migration_20260912_071740_add_blackjack_minigame_stats from './20260912_071740_add_blackjack_minigame_stats'; import * as migration_20260912_231219_add_discord_cancelled_at from './20260912_231219_add_discord_cancelled_at'; +import * as migration_20260914_153046_add_chip_bank from './20260914_153046_add_chip_bank'; +import * as migration_20260914_171412_add_respawn_tickets from './20260914_171412_add_respawn_tickets'; export const migrations = [ { @@ -343,9 +347,29 @@ export const migrations = [ down: migration_20260911_201559_add_award_advancement_series.down, name: '20260911_201559_add_award_advancement_series', }, + { + up: migration_20260912_051752_add_rank_promotion_ceiling.up, + down: migration_20260912_051752_add_rank_promotion_ceiling.down, + name: '20260912_051752_add_rank_promotion_ceiling', + }, + { + up: migration_20260912_071740_add_blackjack_minigame_stats.up, + down: migration_20260912_071740_add_blackjack_minigame_stats.down, + name: '20260912_071740_add_blackjack_minigame_stats', + }, { up: migration_20260912_231219_add_discord_cancelled_at.up, down: migration_20260912_231219_add_discord_cancelled_at.down, - name: '20260912_231219_add_discord_cancelled_at' + name: '20260912_231219_add_discord_cancelled_at', + }, + { + up: migration_20260914_153046_add_chip_bank.up, + down: migration_20260914_153046_add_chip_bank.down, + name: '20260914_153046_add_chip_bank', + }, + { + up: migration_20260914_171412_add_respawn_tickets.up, + down: migration_20260914_171412_add_respawn_tickets.down, + name: '20260914_171412_add_respawn_tickets' }, ]; diff --git a/src/payload-types.ts b/src/payload-types.ts index 15b912e..e27ec3a 100644 --- a/src/payload-types.ts +++ b/src/payload-types.ts @@ -126,6 +126,7 @@ export interface Config { 'game-servers': GameServer; 'arma-sync-events': ArmaSyncEvent; 'arma-commands': ArmaCommand; + 'respawn-tickets': RespawnTicket; 'custom-minefields': CustomMinefield; 'custom-minefield-scores': CustomMinefieldScore; 'custom-radio-tests': CustomRadioTest; @@ -204,6 +205,7 @@ export interface Config { 'game-servers': GameServersSelect | GameServersSelect; 'arma-sync-events': ArmaSyncEventsSelect | ArmaSyncEventsSelect; 'arma-commands': ArmaCommandsSelect | ArmaCommandsSelect; + 'respawn-tickets': RespawnTicketsSelect | RespawnTicketsSelect; 'custom-minefields': CustomMinefieldsSelect | CustomMinefieldsSelect; 'custom-minefield-scores': CustomMinefieldScoresSelect | CustomMinefieldScoresSelect; 'custom-radio-tests': CustomRadioTestsSelect | CustomRadioTestsSelect; @@ -1361,6 +1363,8 @@ export interface User { | 'ticket:status' | 'poker:force-ended' | 'poker:everyone-left' + | 'blackjack:force-ended' + | 'blackjack:everyone-left' )[] | null; }; @@ -1395,6 +1399,8 @@ export interface User { | 'ticket:status' | 'poker:force-ended' | 'poker:everyone-left' + | 'blackjack:force-ended' + | 'blackjack:everyone-left' )[] | null; }; @@ -1950,6 +1956,10 @@ export interface Rank { abbreviation: string; description: string; insignia?: (number | null) | Media; + /** + * Holders of this rank may promote members up to and including this rank. Leave empty for no promotion authority. + */ + promotionCeiling?: (number | null) | Rank; updatedAt: string; createdAt: string; } @@ -2103,7 +2113,22 @@ export interface Profile { bestScore?: number | null; xpEarned?: number | null; }; + blackjack?: { + gamesPlayed?: number | null; + roundsWon?: number | null; + blackjacksHit?: number | null; + bestScore?: number | null; + xpEarned?: number | null; + }; }; + /** + * Persistent play-chip pool for the card minigames (poker, blackjack). Earned from the other minigames; never creates chips itself. + */ + chipBank?: number | null; + /** + * Last daily chip top-up claim; one claim per 24 hours. + */ + chipBankRefilledAt?: string | null; voiceover?: { xpEarned?: number | null; }; @@ -2477,6 +2502,10 @@ export interface Mission { * Server-local day the last 'not Ready' reminder DM was sent to the op creator (managed by the Discord bot, once per day). */ readyReminderDmSentAt?: string | null; + /** + * When respawn tickets for this mission were settled into player balances (managed by the arma-bridge tickets route; one-shot per mission). + */ + ticketsSettledAt?: string | null; /** * Player who scheduled this mission via the Friday Ops calendar (ownership + scheduling-cap tracking). Set automatically; leave empty for staff-created missions. */ @@ -3820,6 +3849,20 @@ export interface ArmaCommand { updatedAt: string; createdAt: string; } +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "respawn-tickets". + */ +export interface RespawnTicket { + id: number; + user: number | User; + /** + * Accumulated respawn tickets (1 per yes-attended op, 0.5 tentative, 0.25 no). Maintained by settlement; read-only. + */ + balance?: number | null; + updatedAt: string; + createdAt: string; +} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "custom-minefields". @@ -5028,6 +5071,24 @@ export interface PayloadMcpApiKey { */ delete?: boolean | null; }; + respawnTickets?: { + /** + * Allow clients to find respawn-tickets. + */ + find?: boolean | null; + /** + * Allow clients to create respawn-tickets. + */ + create?: boolean | null; + /** + * Allow clients to update respawn-tickets. + */ + update?: boolean | null; + /** + * Allow clients to delete respawn-tickets. + */ + delete?: boolean | null; + }; customMinefields?: { /** * Allow clients to find custom-minefields. @@ -5363,6 +5424,10 @@ export interface PayloadLockedDocument { relationTo: 'arma-commands'; value: number | ArmaCommand; } | null) + | ({ + relationTo: 'respawn-tickets'; + value: number | RespawnTicket; + } | null) | ({ relationTo: 'custom-minefields'; value: number | CustomMinefield; @@ -5709,6 +5774,7 @@ export interface RanksSelect { abbreviation?: T; description?: T; insignia?: T; + promotionCeiling?: T; updatedAt?: T; createdAt?: T; } @@ -5838,7 +5904,18 @@ export interface ProfilesSelect { bestScore?: T; xpEarned?: T; }; + blackjack?: + | T + | { + gamesPlayed?: T; + roundsWon?: T; + blackjacksHit?: T; + bestScore?: T; + xpEarned?: T; + }; }; + chipBank?: T; + chipBankRefilledAt?: T; voiceover?: | T | { @@ -6014,6 +6091,7 @@ export interface MissionsSelect { evaluationRemindersSentAt?: T; readyReminderWebSentAt?: T; readyReminderDmSentAt?: T; + ticketsSettledAt?: T; createdBy?: T; coverImage?: T; classification?: @@ -7068,6 +7146,16 @@ export interface ArmaCommandsSelect { updatedAt?: T; createdAt?: T; } +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "respawn-tickets_select". + */ +export interface RespawnTicketsSelect { + user?: T; + balance?: T; + updatedAt?: T; + createdAt?: T; +} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "custom-minefields_select". @@ -7629,6 +7717,14 @@ export interface PayloadMcpApiKeysSelect { update?: T; delete?: T; }; + respawnTickets?: + | T + | { + find?: T; + create?: T; + update?: T; + delete?: T; + }; customMinefields?: | T | {