Skip to main content

SaveSlotService

Functions​

_promiseSelectDefaultSlot​

SaveSlotService._promiseSelectDefaultSlot(
maid: any,
hasSaveSlots: any
) → Promise.Promise<any>?

Selects the player's last active slot, or creates and selects the default slot. Does nothing when explicit selection is required.

Every hop is maid-owned and re-checks the binder for the same reason as the caller: any of these reads can settle after the player left, and continuing into the destroyed binder throws.

RequireExplicitSelection​

SaveSlotService.RequireExplicitSelection(self: SaveSlotService) → ()

Requires explicit slot selection

GetExplicitSelectionRequired​

SaveSlotService.GetExplicitSelectionRequired(self: SaveSlotService) → boolean

Returns whether explicit slot selection is required

PromiseIsInternalTeleport​

SaveSlotService.PromiseIsInternalTeleport(
player: Player
) → Promise<boolean>

Resolves whether the player teleported in carrying a save-slot id -- i.e. arrived via an internal slot teleport rather than a fresh join. Presence-only (it does not validate the slot still exists); use HasSaveSlots.PromiseHasSaveSlotFromTeleport when existence matters. It is a promise because a client-initiated teleport only reaches the server once the client replicates its arrived data.

SetMaxSlotCount​

SaveSlotService.SetMaxSlotCount(
maxSlotCount: number
) → ()

Sets the max slot count

SetUnlimitedSlots​

SaveSlotService.SetUnlimitedSlots(self: SaveSlotService) → ()

Removes the slot ceiling, so HasSaveSlots.PromiseSelectNewSaveSlot always allocates the next free index. A thin alias over SaveSlotService.SetMaxSlotCount with an unbounded count; same before-Start guard applies.

PromiseOfflineSaveSlots​

SaveSlotService.PromiseOfflineSaveSlots(
userId: number
) → Promise<OfflineSaveSlots>

Opens the save slots of a player who is not in this server, as an OfflineSaveSlots the caller must destroy. The game's slot count and code generator are applied, so an offline edit behaves like an online one.

WARNING

This steals the player's session lock, kicking them from wherever they are playing, and holds it until the returned object is destroyed. It backs admin tooling (SaveSlotCmdrService); it is not something to reach for on a normal code path.

Rejects for a player who is in this server: they already have a live HasSaveSlots holding their session, and a second copy of their data would be written from underneath it. Use the binder.

SetCodeGenerator​

SaveSlotService.SetCodeGenerator(
generator: SaveSlotCodeUtils.CodeGenerator
) → ()

Sets the share-code generator applied to every player's exports (see SaveSlotCodeUtils.CodeGenerator), so a game can choose a code format that suits its players. Defaults to SaveSlotCodeUtils.generateDefaultCode. Must be called before Start.

RegisterDefaultSummaryProvider​

SaveSlotService.RegisterDefaultSummaryProvider(
name: string,
provider: HasSaveSlots.SummaryProvider
) → () → ()

Registers a named default summary provider, applied to every player's save slots. Each provider's current value is aggregated into the active slot's Summary, keyed by name. Registering or unregistering reflects on all bound players. Returns a function that unregisters the provider (also give it to a [Maid]).

RegisterPreSelectCallback​

SaveSlotService.RegisterPreSelectCallback(
callback: PreSelectCallback
) → () → ()--

Removes the callback

Registers a callback to run for every player immediately before a slot becomes active, whatever selected it. It runs with the previous selection still in place, and what it returns decides what happens next:

  • nothing (or true) -- allow the selection
  • false -- refuse it; the selection rejects and the active slot is left alone
  • a promise -- hold the selection open until it settles, refusing if it resolves false

An error or a rejection is warned about and allows the selection: only a stated false refuses. There is no timeout, so keep the work bounded.

PromisePreSelect​

SaveSlotService.PromisePreSelect(
player: Player,
slotId: SlotId,
previousSlotId: SlotId?
) → Promise<boolean>--

False when any callback refused

Runs every registered pre-select callback for a slot about to become active, resolving with whether the selection may proceed once the ones that returned a promise have settled. Called by HasSaveSlots as each selection commits.

Every callback runs, even once one has refused: they are independent, and one that only wanted to settle state must not be skipped because an unrelated one said no.

ObserveActiveSlotStoreBrio​

SaveSlotService.ObserveActiveSlotStoreBrio(
player: Player
) → Observable.Observable<Brio.Brio<DataStoreStage.DataStoreStage>>

Observes the DataStoreStage for the player's active slot as a Brio

PromiseActiveSlotStore​

SaveSlotService.PromiseActiveSlotStore(
player: Player
) → Promise.Promise<DataStoreStage.DataStoreStage?>

Returns the DataStoreStage for the player's active slot

PromiseHasSlot​

SaveSlotService.PromiseHasSlot(
player: Player,
slotId: SaveSlotData.SlotId
) → Promise.Promise<boolean>

Returns whether the player has a slot with the given ID

PromiseSelectSlot​

SaveSlotService.PromiseSelectSlot(
player: Player,
slotId: SaveSlotData.SlotId
) → Promise.Promise<DataStoreStage.DataStoreStage>

Selects the slot with the given ID for the player

PromiseCreateSlot​

SaveSlotService.PromiseCreateSlot(
player: Player,
slotIndex: number,
metadata: SaveSlotData.SaveSlotMetadata?
) → Promise.Promise<any>

Creates a slot for the player at the given index

PromiseDeleteSlot​

SaveSlotService.PromiseDeleteSlot(
player: Player,
slotId: SaveSlotData.SlotId
) → Promise.Promise<any>

Deletes the slot with the given ID for the player

PromiseResetActiveSlot​

SaveSlotService.PromiseResetActiveSlot(
player: Player
) → Promise.Promise<any>

Resets the player's active slot to a fresh empty one

PromisePersistEphemeralSlot​

SaveSlotService.PromisePersistEphemeralSlot(
player: Player,
slotId: SaveSlotData.SlotId?
) → Promise.Promise<SaveSlotData.SlotId>

Turns the player's ephemeral session into a real save slot and continues play on it, resolving to the new slot id. See HasSaveSlots.PromisePersistEphemeralSlot.

PromiseExportSlot​

SaveSlotService.PromiseExportSlot(
player: Player,
slotId: SaveSlotData.SlotId
) → Promise.Promise<SaveSlotExportUtils.SaveSlotExport>

Exports the player's non-main slot into a serializable table. See HasSaveSlots.PromiseExportSlot.

PromiseImportSlot​

SaveSlotService.PromiseImportSlot(
player: Player,
export: SaveSlotExportUtils.SaveSlotExport
) → Promise.Promise<SaveSlotData.SlotId>

Imports an exported slot into a fresh non-main slot for the player, resolving to the new slot id. See HasSaveSlots.PromiseImportSlot.

PromiseSaveSlotToSharedDataStore​

SaveSlotService.PromiseSaveSlotToSharedDataStore(
player: Player,
slotId: SaveSlotData.SlotId,
key: string
) → Promise.Promise<boolean>

Saves the player's non-main slot to the shared store under the given key. See HasSaveSlots.PromiseSaveSlotToSharedDataStore.

PromiseImportSlotFromSharedDataStore​

SaveSlotService.PromiseImportSlotFromSharedDataStore(
player: Player,
key: string
) → Promise.Promise<SaveSlotData.SlotId>

Imports a shared-store export into a fresh non-main slot for the player. See HasSaveSlots.PromiseImportSlotFromSharedDataStore.

PromiseExportSaveSlotToCode​

SaveSlotService.PromiseExportSaveSlotToCode(
player: Player,
slotId: SaveSlotData.SlotId?
) → Promise.Promise<string>

Exports the player's slot to the shared store under a fresh code and resolves to it. See HasSaveSlots.PromiseExportSaveSlotToCode.

PromiseImportEphemeralSaveSlotFromCode​

SaveSlotService.PromiseImportEphemeralSaveSlotFromCode(
player: Player,
code: string
) → Promise.Promise<SaveSlotData.SlotId>

Loads the code into a fresh transferable ephemeral slot for the player. See HasSaveSlots.PromiseImportEphemeralSaveSlotFromCode.

PromiseExportSaveSlotToJson​

SaveSlotService.PromiseExportSaveSlotToJson(
player: Player,
slotId: SaveSlotData.SlotId?
) → Promise.Promise<string>

Exports the player's slot as a raw JSON string. See HasSaveSlots.PromiseExportSaveSlotToJson.

Destroy​

SaveSlotService.Destroy(self: SaveSlotService) → ()

Destroys the service

Show raw api
{
    "functions": [
        {
            "name": "_promiseSelectDefaultSlot",
            "desc": "Selects the player's last active slot, or creates and selects the default slot.\nDoes nothing when explicit selection is required.\n\nEvery hop is maid-owned and re-checks the binder for the same reason as the caller: any of\nthese reads can settle after the player left, and continuing into the destroyed binder throws.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "maid",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "hasSaveSlots",
                    "desc": "",
                    "lua_type": "any\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<any>?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 187,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "RequireExplicitSelection",
            "desc": "Requires explicit slot selection",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 235,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "GetExplicitSelectionRequired",
            "desc": "Returns whether explicit slot selection is required",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 243,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseIsInternalTeleport",
            "desc": "Resolves whether the player teleported in carrying a save-slot id -- i.e. arrived via an internal\nslot teleport rather than a fresh join. Presence-only (it does not validate the slot still exists);\nuse [HasSaveSlots.PromiseHasSaveSlotFromTeleport] when existence matters. It is a promise because a\nclient-initiated teleport only reaches the server once the client replicates its arrived data.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<boolean>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 256,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "SetMaxSlotCount",
            "desc": "Sets the max slot count",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "maxSlotCount",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 263,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "SetUnlimitedSlots",
            "desc": "Removes the slot ceiling, so [HasSaveSlots.PromiseSelectNewSaveSlot] always\nallocates the next free index. A thin alias over [SaveSlotService.SetMaxSlotCount]\nwith an unbounded count; same before-Start guard applies.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 274,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseOfflineSaveSlots",
            "desc": "Opens the save slots of a player who is **not in this server**, as an [OfflineSaveSlots] the caller\nmust destroy. The game's slot count and code generator are applied, so an offline edit behaves like\nan online one.\n\n:::warning\nThis steals the player's session lock, kicking them from wherever they are playing, and holds it\nuntil the returned object is destroyed. It backs admin tooling ([SaveSlotCmdrService]); it is not\nsomething to reach for on a normal code path.\n:::\n\nRejects for a player who *is* in this server: they already have a live [HasSaveSlots] holding their\nsession, and a second copy of their data would be written from underneath it. Use the binder.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "userId",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<OfflineSaveSlots>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 295,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "SetCodeGenerator",
            "desc": "Sets the share-code generator applied to every player's exports (see [SaveSlotCodeUtils.CodeGenerator]),\nso a game can choose a code format that suits its players. Defaults to\n[SaveSlotCodeUtils.generateDefaultCode]. Must be called before Start.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "generator",
                    "desc": "",
                    "lua_type": "SaveSlotCodeUtils.CodeGenerator"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 342,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "RegisterDefaultSummaryProvider",
            "desc": "Registers a named default summary provider, applied to every player's save slots. Each provider's\ncurrent value is aggregated into the active slot's Summary, keyed by `name`. Registering or\nunregistering reflects on all bound players. Returns a function that unregisters the provider (also\ngive it to a [Maid]).",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "provider",
                    "desc": "",
                    "lua_type": "HasSaveSlots.SummaryProvider"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "() -> ()"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 358,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "RegisterPreSelectCallback",
            "desc": "Registers a callback to run for every player immediately before a slot becomes active, whatever\nselected it. It runs with the previous selection still in place, and what it returns decides what\nhappens next:\n\n* nothing (or `true`) -- allow the selection\n* `false` -- refuse it; the selection rejects and the active slot is left alone\n* a promise -- hold the selection open until it settles, refusing if it resolves `false`\n\nAn error or a rejection is warned about and allows the selection: only a stated `false` refuses. There\nis no timeout, so keep the work bounded.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "callback",
                    "desc": "",
                    "lua_type": "PreSelectCallback"
                }
            ],
            "returns": [
                {
                    "desc": "Removes the callback",
                    "lua_type": "() -> ()"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 384,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromisePreSelect",
            "desc": "Runs every registered pre-select callback for a slot about to become active, resolving with whether the\nselection may proceed once the ones that returned a promise have settled. Called by [HasSaveSlots] as\neach selection commits.\n\nEvery callback runs, even once one has refused: they are independent, and one that only wanted to\nsettle state must not be skipped because an unrelated one said no.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "slotId",
                    "desc": "",
                    "lua_type": "SlotId"
                },
                {
                    "name": "previousSlotId",
                    "desc": "",
                    "lua_type": "SlotId?"
                }
            ],
            "returns": [
                {
                    "desc": "False when any callback refused",
                    "lua_type": "Promise<boolean>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 403,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "ObserveActiveSlotStoreBrio",
            "desc": "Observes the [DataStoreStage] for the player's active slot as a [Brio]",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<Brio.Brio<DataStoreStage.DataStoreStage>>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 440,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseActiveSlotStore",
            "desc": "Returns the [DataStoreStage] for the player's active slot",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<DataStoreStage.DataStoreStage?>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 454,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseHasSlot",
            "desc": "Returns whether the player has a slot with the given ID",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "slotId",
                    "desc": "",
                    "lua_type": "SaveSlotData.SlotId\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<boolean>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 466,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseSelectSlot",
            "desc": "Selects the slot with the given ID for the player",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "slotId",
                    "desc": "",
                    "lua_type": "SaveSlotData.SlotId\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<DataStoreStage.DataStoreStage>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 479,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseCreateSlot",
            "desc": "Creates a slot for the player at the given index",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "slotIndex",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "metadata",
                    "desc": "",
                    "lua_type": "SaveSlotData.SaveSlotMetadata?\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<any>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 492,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseDeleteSlot",
            "desc": "Deletes the slot with the given ID for the player",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "slotId",
                    "desc": "",
                    "lua_type": "SaveSlotData.SlotId\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<any>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 506,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseResetActiveSlot",
            "desc": "Resets the player's active slot to a fresh empty one",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<any>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 519,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromisePersistEphemeralSlot",
            "desc": "Turns the player's ephemeral session into a real save slot and continues play on it, resolving to the\nnew slot id. See [HasSaveSlots.PromisePersistEphemeralSlot].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "slotId",
                    "desc": "",
                    "lua_type": "SaveSlotData.SlotId?\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<SaveSlotData.SlotId>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 529,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseExportSlot",
            "desc": "Exports the player's non-main slot into a serializable table. See [HasSaveSlots.PromiseExportSlot].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "slotId",
                    "desc": "",
                    "lua_type": "SaveSlotData.SlotId\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<SaveSlotExportUtils.SaveSlotExport>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 542,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseImportSlot",
            "desc": "Imports an exported slot into a fresh non-main slot for the player, resolving to the new slot id.\nSee [HasSaveSlots.PromiseImportSlot].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "export",
                    "desc": "",
                    "lua_type": "SaveSlotExportUtils.SaveSlotExport\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<SaveSlotData.SlotId>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 556,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseSaveSlotToSharedDataStore",
            "desc": "Saves the player's non-main slot to the shared store under the given key. See\n[HasSaveSlots.PromiseSaveSlotToSharedDataStore].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "slotId",
                    "desc": "",
                    "lua_type": "SaveSlotData.SlotId"
                },
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "string\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<boolean>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 570,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseImportSlotFromSharedDataStore",
            "desc": "Imports a shared-store export into a fresh non-main slot for the player. See\n[HasSaveSlots.PromiseImportSlotFromSharedDataStore].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "string\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<SaveSlotData.SlotId>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 585,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseExportSaveSlotToCode",
            "desc": "Exports the player's slot to the shared store under a fresh code and resolves to it. See\n[HasSaveSlots.PromiseExportSaveSlotToCode].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "slotId",
                    "desc": "",
                    "lua_type": "SaveSlotData.SlotId?\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<string>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 599,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseImportEphemeralSaveSlotFromCode",
            "desc": "Loads the code into a fresh transferable ephemeral slot for the player. See\n[HasSaveSlots.PromiseImportEphemeralSaveSlotFromCode].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "code",
                    "desc": "",
                    "lua_type": "string\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<SaveSlotData.SlotId>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 613,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "PromiseExportSaveSlotToJson",
            "desc": "Exports the player's slot as a raw JSON string. See [HasSaveSlots.PromiseExportSaveSlotToJson].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "slotId",
                    "desc": "",
                    "lua_type": "SaveSlotData.SlotId?\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<string>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 626,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        },
        {
            "name": "Destroy",
            "desc": "Destroys the service",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotService"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 639,
                "path": "src/saveslot/src/Server/SaveSlotService.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "SaveSlotService",
    "desc": "",
    "source": {
        "line": 5,
        "path": "src/saveslot/src/Server/SaveSlotService.lua"
    }
}