1
0
Fork 0

chore(types): regenerate payload types and database schema

This commit is contained in:
Jason Fraley 2026-08-02 02:04:48 -04:00
parent 6cce6116b8
commit 2e65ab08d8
2 changed files with 1261 additions and 94 deletions

File diff suppressed because it is too large Load diff

View file

@ -70,6 +70,7 @@ export interface Config {
media: Media;
'game-hard-resources': GameHardResource;
'game-structures': GameStructure;
'game-vehicles': GameVehicle;
'game-event-logs': GameEventLog;
users: User;
ranks: Rank;
@ -86,6 +87,7 @@ export interface Config {
resources: Resource;
vehicles: Vehicle;
structures: Structure;
shipments: Shipment;
maps: Map;
'narrative-events': NarrativeEvent;
'mission-files': MissionFile;
@ -107,6 +109,7 @@ export interface Config {
media: MediaSelect<false> | MediaSelect<true>;
'game-hard-resources': GameHardResourcesSelect<false> | GameHardResourcesSelect<true>;
'game-structures': GameStructuresSelect<false> | GameStructuresSelect<true>;
'game-vehicles': GameVehiclesSelect<false> | GameVehiclesSelect<true>;
'game-event-logs': GameEventLogsSelect<false> | GameEventLogsSelect<true>;
users: UsersSelect<false> | UsersSelect<true>;
ranks: RanksSelect<false> | RanksSelect<true>;
@ -123,6 +126,7 @@ export interface Config {
resources: ResourcesSelect<false> | ResourcesSelect<true>;
vehicles: VehiclesSelect<false> | VehiclesSelect<true>;
structures: StructuresSelect<false> | StructuresSelect<true>;
shipments: ShipmentsSelect<false> | ShipmentsSelect<true>;
maps: MapsSelect<false> | MapsSelect<true>;
'narrative-events': NarrativeEventsSelect<false> | NarrativeEventsSelect<true>;
'mission-files': MissionFilesSelect<false> | MissionFilesSelect<true>;
@ -143,9 +147,10 @@ export interface Config {
'game-rules': GameRulesSelect<false> | GameRulesSelect<true>;
};
locale: null;
user: User & {
collection: 'users';
widgets: {
collections: CollectionsWidget;
};
user: User;
jobs: {
tasks: unknown;
workflows: unknown;
@ -423,6 +428,10 @@ export interface Structure {
* The maximum storage capacity of this structure as mass (retrieved from the mass defined for every asset stored here.)
*/
maxCapacityMass?: number | null;
/**
* When enabled, ONLY the items listed in Allowed Storage can be stored here — everything else is rejected. When disabled, the Allowed Storage list still enforces per-item quantity caps, but other items are permitted up to the mass capacity.
*/
restrictToAllowed?: boolean | null;
xSize?: number | null;
ySize?: number | null;
allowedStorage?:
@ -810,6 +819,23 @@ export interface Vehicle {
} | null;
image?: (number | null) | Media;
category?: ('civilian' | 'utility' | 'transport' | 'weaponized' | 'military')[] | null;
/**
* Fuel configuration for this vehicle. Defines what fuel type it uses, how much it can hold, and how fast it consumes fuel.
*/
fuel: {
/**
* The type of fuel this vehicle consumes (e.g., gasoline, diesel, jet fuel).
*/
fuelType: number | Resource;
/**
* Maximum fuel units this vehicle's tank can hold.
*/
fuelCapacity: number;
/**
* Fuel consumed per unit of distance traveled.
*/
fuelConsumptionRate: number;
};
materials?:
| {
resource: number | Resource;
@ -965,6 +991,63 @@ export interface Campaign {
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "game-vehicles".
*/
export interface GameVehicle {
id: number;
/**
* Display name or callsign for this vehicle instance.
*/
name: string;
/**
* The vehicle type/template this instance is based on.
*/
type: number | Vehicle;
/**
* The structure where this vehicle is currently stationed. Null if in transit.
*/
deployedAt?: (number | null) | GameStructure;
/**
* The faction that owns this vehicle.
*/
faction?: (number | null) | Faction;
status: 'idle' | 'assigned' | 'in_transit' | 'damaged' | 'destroyed';
/**
* Current fuel level. Must be between 0 and the vehicle type's fuel capacity.
*/
currentFuel: number;
/**
* Current health. Must be between 0 and the vehicle type's max health.
*/
currentHealth: number;
storedResources?:
| {
resource: number | Resource;
amount: number;
gridX: number;
gridY: number;
rotated?: boolean | null;
id?: string | null;
}[]
| null;
/**
* Items displaced by grid resizing.
*/
voidStorage?:
| {
resource: number | Resource;
amount: number;
gridX: number;
gridY: number;
rotated?: boolean | null;
id?: string | null;
}[]
| null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "game-event-logs".
@ -986,6 +1069,7 @@ export interface GameEventLog {
targetCollection?:
| (
| 'game-structures'
| 'game-vehicles'
| 'structures'
| 'resources'
| 'assets'
@ -996,6 +1080,7 @@ export interface GameEventLog {
| 'users'
| 'technologies'
| 'maps'
| 'shipments'
)
| null;
targetId?: number | null;
@ -1040,6 +1125,7 @@ export interface User {
}[]
| null;
password?: string | null;
collection: 'users';
}
/**
* This interface was referenced by `Config`'s JSON-Schema
@ -1462,6 +1548,67 @@ export interface ModList {
focalX?: number | null;
focalY?: number | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "shipments".
*/
export interface Shipment {
id: number;
/**
* Shipment label. Auto-generated if left empty.
*/
name?: string | null;
origin: number | GameStructure;
destination: number | GameStructure;
/**
* The vehicle instance transporting this shipment.
*/
transportVehicle: number | GameVehicle;
/**
* Euclidean distance between origin and destination.
*/
distance: number;
cargo: {
item:
| {
relationTo: 'resources';
value: number | Resource;
}
| {
relationTo: 'assets';
value: number | Asset;
}
| {
relationTo: 'vehicles';
value: number | Vehicle;
};
amount: number;
id?: string | null;
}[];
/**
* Total fuel required for the entire trip.
*/
fuelCost: number;
/**
* Fuel consumed so far during transit.
*/
fuelConsumed?: number | null;
status: 'pending' | 'dispatched' | 'in_transit' | 'arrived' | 'completed' | 'cancelled' | 'failed' | 'stranded';
dispatchedAt?: string | null;
estimatedArrival?: string | null;
completedAt?: string | null;
/**
* If true, the vehicle will automatically return to its origin after completing this shipment.
*/
autoReturn?: boolean | null;
createdBy?: (number | null) | User;
/**
* Reason for failure or stranding.
*/
failureReason?: string | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "narrative-events".
@ -1539,6 +1686,10 @@ export interface PayloadLockedDocument {
relationTo: 'game-structures';
value: number | GameStructure;
} | null)
| ({
relationTo: 'game-vehicles';
value: number | GameVehicle;
} | null)
| ({
relationTo: 'game-event-logs';
value: number | GameEventLog;
@ -1603,6 +1754,10 @@ export interface PayloadLockedDocument {
relationTo: 'structures';
value: number | Structure;
} | null)
| ({
relationTo: 'shipments';
value: number | Shipment;
} | null)
| ({
relationTo: 'maps';
value: number | Map;
@ -1722,6 +1877,41 @@ export interface GameStructuresSelect<T extends boolean = true> {
updatedAt?: T;
createdAt?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "game-vehicles_select".
*/
export interface GameVehiclesSelect<T extends boolean = true> {
name?: T;
type?: T;
deployedAt?: T;
faction?: T;
status?: T;
currentFuel?: T;
currentHealth?: T;
storedResources?:
| T
| {
resource?: T;
amount?: T;
gridX?: T;
gridY?: T;
rotated?: T;
id?: T;
};
voidStorage?:
| T
| {
resource?: T;
amount?: T;
gridX?: T;
gridY?: T;
rotated?: T;
id?: T;
};
updatedAt?: T;
createdAt?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "game-event-logs_select".
@ -2180,6 +2370,13 @@ export interface VehiclesSelect<T extends boolean = true> {
description?: T;
image?: T;
category?: T;
fuel?:
| T
| {
fuelType?: T;
fuelCapacity?: T;
fuelConsumptionRate?: T;
};
materials?:
| T
| {
@ -2294,6 +2491,7 @@ export interface StructuresSelect<T extends boolean = true> {
id?: T;
};
maxCapacityMass?: T;
restrictToAllowed?: T;
xSize?: T;
ySize?: T;
allowedStorage?:
@ -2314,6 +2512,35 @@ export interface StructuresSelect<T extends boolean = true> {
updatedAt?: T;
createdAt?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "shipments_select".
*/
export interface ShipmentsSelect<T extends boolean = true> {
name?: T;
origin?: T;
destination?: T;
transportVehicle?: T;
distance?: T;
cargo?:
| T
| {
item?: T;
amount?: T;
id?: T;
};
fuelCost?: T;
fuelConsumed?: T;
status?: T;
dispatchedAt?: T;
estimatedArrival?: T;
completedAt?: T;
autoReturn?: T;
createdBy?: T;
failureReason?: T;
updatedAt?: T;
createdAt?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "maps_select".
@ -2437,6 +2664,14 @@ export interface GameRule {
* Assignment(s) considered the intelligence division. Members and leaders of these assignments get elevated access to draft missions and intelligence content.
*/
intelAssignments?: (number | Assignment)[] | null;
/**
* Distance threshold for instant transfers. Structures within this distance can transfer resources instantly. Beyond this, shipments are required.
*/
proximityThreshold?: number | null;
/**
* How often the game tick runs, in minutes. This processes shipment movement, fuel consumption, and arrivals.
*/
gameTickIntervalMinutes?: number | null;
updatedAt?: string | null;
createdAt?: string | null;
}
@ -2448,10 +2683,22 @@ export interface GameRulesSelect<T extends boolean = true> {
mainCurrency?: T;
commandAssignments?: T;
intelAssignments?: T;
proximityThreshold?: T;
gameTickIntervalMinutes?: T;
updatedAt?: T;
createdAt?: T;
globalType?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "collections_widget".
*/
export interface CollectionsWidget {
data?: {
[k: string]: unknown;
};
width: 'full';
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "auth".