From bb1a253473bf97e3c9460b1ed9308b5cabc74162 Mon Sep 17 00:00:00 2001 From: Gabriel <83644514+gpene@users.noreply.github.com> Date: Fri, 14 Jul 2023 10:37:09 +0200 Subject: [PATCH] More annotations fixes (#1054) * first pass * 1 * first pass * 1 * Go annotations * Update server/runtime_go_nakama.go Co-authored-by: Simon Esposito * Update runtime_lua_nakama.go Update runtime_javascript_nakama.go --------- Co-authored-by: Simon Esposito --- internal/satori/satori.go | 8 +- server/runtime_go_nakama.go | 250 ++++++++++++++-------------- server/runtime_javascript_nakama.go | 58 +++---- server/runtime_lua_nakama.go | 2 +- 4 files changed, 159 insertions(+), 159 deletions(-) diff --git a/internal/satori/satori.go b/internal/satori/satori.go index b42db8165..b6514dd42 100644 --- a/internal/satori/satori.go +++ b/internal/satori/satori.go @@ -173,7 +173,7 @@ func (s *SatoriClient) Authenticate(ctx context.Context, id string) error { // @summary Get identity properties. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param id(type=string) The identifier of the identity. -// @return properties(type=*runtime.Properties) The identity properties. +// @return properties(*runtime.Properties) The identity properties. // @return error(error) An optional error value if an error occurred. func (s *SatoriClient) PropertiesGet(ctx context.Context, id string) (*runtime.Properties, error) { if s.invalidConfig { @@ -328,7 +328,7 @@ func (s *SatoriClient) EventsPublish(ctx context.Context, id string, events []*r // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param id(type=string) The identifier of the identity. // @param names(type=[]string, optional=true, default=[]) Optional list of experiment names to filter. -// @return experiments(type=*runtime.ExperimentList) The experiment list. +// @return experiments(*runtime.ExperimentList) The experiment list. // @return error(error) An optional error value if an error occurred. func (s *SatoriClient) ExperimentsList(ctx context.Context, id string, names ...string) (*runtime.ExperimentList, error) { if s.invalidConfig { @@ -384,7 +384,7 @@ func (s *SatoriClient) ExperimentsList(ctx context.Context, id string, names ... // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param id(type=string) The identifier of the identity. // @param names(type=[]string, optional=true, default=[]) Optional list of flag names to filter. -// @return flags(type=*runtime.FlagList) The flag list. +// @return flags(*runtime.FlagList) The flag list. // @return error(error) An optional error value if an error occurred. func (s *SatoriClient) FlagsList(ctx context.Context, id string, names ...string) (*runtime.FlagList, error) { if s.invalidConfig { @@ -440,7 +440,7 @@ func (s *SatoriClient) FlagsList(ctx context.Context, id string, names ...string // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param id(type=string) The identifier of the identity. // @param names(type=[]string, optional=true, default=[]) Optional list of live event names to filter. -// @return liveEvents(type=*runtime.LiveEventsList) The live event list. +// @return liveEvents(*runtime.LiveEventsList) The live event list. // @return error(error) An optional error value if an error occurred. func (s *SatoriClient) LiveEventsList(ctx context.Context, id string, names ...string) (*runtime.LiveEventList, error) { if s.invalidConfig { diff --git a/server/runtime_go_nakama.go b/server/runtime_go_nakama.go index b98f985bb..8b69415cc 100644 --- a/server/runtime_go_nakama.go +++ b/server/runtime_go_nakama.go @@ -125,7 +125,7 @@ func (n *RuntimeGoNakamaModule) AuthenticateApple(ctx context.Context, token, us // @summary Authenticate user and create a session token using a custom authentication managed by an external service or source not already supported by Nakama. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param id(type=string) Custom ID to use to authenticate the user. Must be between 6-128 characters. -// @param username(type=string) The user's username. If left empty, one is generated. +// @param username(type=string, optional=true) The user's username. If left empty, one is generated. // @param create(type=bool) Create user if one didn't exist previously. // @return userID(string) The user ID of the authenticated user. // @return username(string) The username of the authenticated user. @@ -155,8 +155,8 @@ func (n *RuntimeGoNakamaModule) AuthenticateCustom(ctx context.Context, id, user // @summary Authenticate user and create a session token using a device identifier. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param id(type=string) Device ID to use to authenticate the user. Must be between 1-128 characters. -// @param username(type=string) The user's username. If left empty, one is generated. -// @param create(type=bool) Create user if one didn't exist previously. By default this is set to true. +// @param username(type=string, optional=true) The user's username. If left empty, one is generated. +// @param create(type=bool, optional=true, default=true) Create user if one didn't exist previously. // @return userID(string) The user ID of the authenticated user. // @return username(string) The username of the authenticated user. // @return create(bool) Value indicating if this account was just created or already existed. @@ -186,8 +186,8 @@ func (n *RuntimeGoNakamaModule) AuthenticateDevice(ctx context.Context, id, user // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param email(type=string) Email address to use to authenticate the user. Must be between 10-255 characters. // @param password(type=string) Password to set. Must be longer than 8 characters. -// @param username(type=string) The user's username. If left empty, one is generated. -// @param create(type=bool) Create user if one didn't exist previously. By default this is set to true. +// @param username(type=string, optional=true) The user's username. If left empty, one is generated. +// @param create(type=bool, optional=true, default=true) Create user if one didn't exist previously. // @return userID(string) The user ID of the authenticated user. // @return username(string) The username of the authenticated user. // @return create(bool) Value indicating if this account was just created or already existed. @@ -237,7 +237,7 @@ func (n *RuntimeGoNakamaModule) AuthenticateEmail(ctx context.Context, email, pa // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param token(type=string) Facebook OAuth or Limited Login (JWT) access token. // @param import(type=bool) Whether to automatically import Facebook friends after authentication. -// @param username(type=string) The user's username. If left empty, one is generated. +// @param username(type=string, optional=true) The user's username. If left empty, one is generated. // @param create(type=bool) Create user if one didn't exist previously. // @return userID(string) The user ID of the authenticated user. // @return username(string) The username of the authenticated user. @@ -269,7 +269,7 @@ func (n *RuntimeGoNakamaModule) AuthenticateFacebook(ctx context.Context, token // @summary Authenticate user and create a session token using a Facebook Instant Game. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param playerInfo(type=string) Facebook Player info. -// @param username(type=string) The user's username. If left empty, one is generated. +// @param username(type=string, optional=true) The user's username. If left empty, one is generated. // @param create(type=bool) Create user if one didn't exist previously. // @return userID(string) The user ID of the authenticated user. // @return username(string) The username of the authenticated user. @@ -300,7 +300,7 @@ func (n *RuntimeGoNakamaModule) AuthenticateFacebookInstantGame(ctx context.Cont // @param salt(type=string) A random string returned by Game Center authentication on client. // @param signature(type=string) A signature returned by Game Center authentication on client. // @param publicKeyUrl(type=string) A URL to the public key returned by Game Center authentication on client. -// @param username(type=string) The user's username. If left empty, one is generated. +// @param username(type=string, optional=true) The user's username. If left empty, one is generated. // @param create(type=bool) Create user if one didn't exist previously. // @return userID(string) The user ID of the authenticated user. // @return username(string) The username of the authenticated user. @@ -367,8 +367,8 @@ func (n *RuntimeGoNakamaModule) AuthenticateGoogle(ctx context.Context, token, u // @summary Authenticate user and create a session token using a Steam account token. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param token(type=string) Steam token. -// @param username(type=string) The user's username. If left empty, one is generated. -// @param create(type=bool) Create user if one didn't exist previously. By default this is set to true. +// @param username(type=string, optional=true) The user's username. If left empty, one is generated. +// @param create(type=bool, optional=true, default=true) Create user if one didn't exist previously. // @return userID(string) The user ID of the authenticated user. // @return username(string) The username of the authenticated user. // @return create(bool) Value indicating if this account was just created or already existed. @@ -398,9 +398,9 @@ func (n *RuntimeGoNakamaModule) AuthenticateSteam(ctx context.Context, token, us // @group authenticate // @summary Generate a Nakama session token from a user ID. // @param userId(type=string) User ID to use to generate the token. -// @param username(type=string) The user's username. If left empty, one is generated. -// @param expiresAt(type=int64) UTC time in seconds when the token must expire. Defaults to server configured expiry time. -// @param vars(type=map[string]string) Extra information that will be bundled in the session token. +// @param username(type=string, optional=true) The user's username. If left empty, one is generated. +// @param expiresAt(type=int64, optional=true) UTC time in seconds when the token must expire. Defaults to server configured expiry time. +// @param vars(type=map[string]string, optional=true) Extra information that will be bundled in the session token. // @return token(string) The Nakama session token. // @return validity(int64) The period for which the token remains valid. // @return create(bool) Value indicating if this account was just created or already existed. @@ -452,7 +452,7 @@ func (n *RuntimeGoNakamaModule) AccountGetId(ctx context.Context, userID string) // @summary Fetch information for multiple accounts by user IDs. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userIds(type=[]string) Array of user IDs to fetch information for. Must be valid UUID. -// @return account(*api.Account) An array of accounts. +// @return account([]*api.Account) An array of accounts. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) AccountsGetId(ctx context.Context, userIDs []string) ([]*api.Account, error) { if len(userIDs) == 0 { @@ -532,7 +532,7 @@ func (n *RuntimeGoNakamaModule) AccountUpdateId(ctx context.Context, userID, use // @summary Delete an account by user ID. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) User ID for the account to be deleted. Must be valid UUID. -// @param recorded(type=boolfalse) Whether to record this deletion in the database. +// @param recorded(type=bool, default=false) Whether to record this deletion in the database. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) AccountDeleteId(ctx context.Context, userID string, recorded bool) error { u, err := uuid.FromString(userID) @@ -572,7 +572,7 @@ func (n *RuntimeGoNakamaModule) AccountExportId(ctx context.Context, userID stri // @summary Fetch one or more users by ID. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userIds(type=[]string) An array of user IDs to fetch. -// @return users([]*api.Users) A list of user record objects. +// @return users([]*api.User) A list of user record objects. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) UsersGetId(ctx context.Context, userIDs []string, facebookIDs []string) ([]*api.User, error) { if len(userIDs) == 0 && len(facebookIDs) == 0 { @@ -597,7 +597,7 @@ func (n *RuntimeGoNakamaModule) UsersGetId(ctx context.Context, userIDs []string // @summary Fetch one or more users by username. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param usernames(type=[]string) An array of usernames to fetch. -// @return users([]*api.Users) A list of user record objects. +// @return users([]*api.User) A list of user record objects. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) UsersGetUsername(ctx context.Context, usernames []string) ([]*api.User, error) { if len(usernames) == 0 { @@ -622,7 +622,7 @@ func (n *RuntimeGoNakamaModule) UsersGetUsername(ctx context.Context, usernames // @summary Fetch one or more users randomly. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param count(type=int) The number of users to fetch. -// @return users([]*api.Users) A list of user record objects. +// @return users([]*api.User) A list of user record objects. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) UsersGetRandom(ctx context.Context, count int) ([]*api.User, error) { if count == 0 { @@ -745,7 +745,7 @@ func (n *RuntimeGoNakamaModule) LinkEmail(ctx context.Context, userID, email, pa // @summary Link Facebook authentication to a user ID. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) The user ID to be linked. -// @param username(type=string) If left empty, one is generated. +// @param username(type=string, optional=true) If left empty, one is generated. // @param token(type=string) Facebook OAuth or Limited Login (JWT) access token. // @param importFriends(type=bool) Whether to automatically import Facebook friends after authentication. // @return error(error) An optional error value if an error occurred. @@ -762,7 +762,7 @@ func (n *RuntimeGoNakamaModule) LinkFacebook(ctx context.Context, userID, userna // @summary Link Facebook Instant Game authentication to a user ID. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) The user ID to be linked. -// @param playerInfo(type=string) Facebook player info. +// @param signedPlayerInfo(type=string) Facebook player info. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) LinkFacebookInstantGame(ctx context.Context, userID, signedPlayerInfo string) error { id, err := uuid.FromString(userID) @@ -812,7 +812,7 @@ func (n *RuntimeGoNakamaModule) LinkGoogle(ctx context.Context, userID, token st // @summary Link Steam authentication to a user ID. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) The user ID to be linked. -// @param username(type=string) If left empty, one is generated. +// @param username(type=string, optional=true) If left empty, one is generated. // @param token(type=string) Steam access token. // @param importFriends(type=bool) Whether to automatically import Steam friends after authentication. // @return error(error) An optional error value if an error occurred. @@ -868,7 +868,7 @@ func (n *RuntimeGoNakamaModule) UnlinkCustom(ctx context.Context, userID, custom // @summary Unlink device authentication from a user ID. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) The user ID to be unlinked. -// @param deviceId(type=string) Device ID to be unlinked to the user. +// @param deviceId(type=string) Device ID to be unlinked from the user. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) UnlinkDevice(ctx context.Context, userID, deviceID string) error { id, err := uuid.FromString(userID) @@ -976,13 +976,13 @@ func (n *RuntimeGoNakamaModule) UnlinkSteam(ctx context.Context, userID, token s // @group streams // @summary List all users currently online and connected to a stream. -// @param mode(type=uint8) The type of stream, 'chat' for example. +// @param mode(type=uint8) The type of stream, '2' for a chat channel for example. // @param subject(type=string) The primary stream subject, typically a user ID. // @param subcontext(type=string) A secondary subject, for example for direct chat between two users. // @param label(type=string) Meta-information about the stream, for example a chat room name. -// @param includeHidden(type=bool) Include stream presences marked as hidden in the results. -// @param includeNotHidden(type=bool) Include stream presences not marked as hidden in the results. -// @return presences([]runtime.Presences) Array of stream presences and their information. +// @param includeHidden(type=bool, optional=true) Include stream presences marked as hidden in the results. +// @param includeNotHidden(type=bool, optional=true) Include stream presences not marked as hidden in the results. +// @return presences([]runtime.Presence) Array of stream presences and their information. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) StreamUserList(mode uint8, subject, subcontext, label string, includeHidden, includeNotHidden bool) ([]runtime.Presence, error) { stream := PresenceStream{ @@ -1012,8 +1012,8 @@ func (n *RuntimeGoNakamaModule) StreamUserList(mode uint8, subject, subcontext, } // @group streams -// @summary Retreive a stream presence and metadata by user ID. -// @param mode(type=uint8) The type of stream, 'chat' for example. +// @summary Retrieve a stream presence and metadata by user ID. +// @param mode(type=uint8) The type of stream, '2' for a chat channel for example. // @param subject(type=string) The primary stream subject, typically a user ID. // @param subcontext(type=string) A secondary subject, for example for direct chat between two users. // @param label(type=string) Meta-information about the stream, for example a chat room name. @@ -1057,7 +1057,7 @@ func (n *RuntimeGoNakamaModule) StreamUserGet(mode uint8, subject, subcontext, l // @group streams // @summary Add a user to a stream. -// @param mode(type=uint8) The type of stream, 'chat' for example. +// @param mode(type=uint8) The type of stream, '2' for a chat channel for example. // @param subject(type=string) The primary stream subject, typically a user ID. // @param subcontext(type=string) A secondary subject, for example for direct chat between two users. // @param label(type=string) Meta-information about the stream, for example a chat room name. @@ -1109,7 +1109,7 @@ func (n *RuntimeGoNakamaModule) StreamUserJoin(mode uint8, subject, subcontext, // @group streams // @summary Update a stream user by ID. -// @param mode(type=uint8) The type of stream, 'chat' for example. +// @param mode(type=uint8) The type of stream, '2' for a chat channel for example. // @param subject(type=string) The primary stream subject, typically a user ID. // @param subcontext(type=string) A secondary subject, for example for direct chat between two users. // @param label(type=string) Meta-information about the stream, for example a chat room name. @@ -1160,7 +1160,7 @@ func (n *RuntimeGoNakamaModule) StreamUserUpdate(mode uint8, subject, subcontext // @group streams // @summary Remove a user from a stream. -// @param mode(type=uint8) The type of stream, 'chat' for example. +// @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. // @param subject(type=string) The primary stream subject, typically a user ID. // @param subcontext(type=string) A secondary subject, for example for direct chat between two users. // @param label(type=string) Meta-information about the stream, for example a chat room name. @@ -1200,7 +1200,7 @@ func (n *RuntimeGoNakamaModule) StreamUserLeave(mode uint8, subject, subcontext, // @group streams // @summary Kick a user from a stream. -// @param mode(type=uint8) The type of stream, 'chat' for example. +// @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. // @param subject(type=string) The primary stream subject, typically a user ID. // @param subcontext(type=string) A secondary subject, for example for direct chat between two users. // @param label(type=string) Meta-information about the stream, for example a chat room name. @@ -1239,7 +1239,7 @@ func (n *RuntimeGoNakamaModule) StreamUserKick(mode uint8, subject, subcontext, // @group streams // @summary Get a count of stream presences. -// @param mode(type=uint8) The type of stream, 'chat' for example. +// @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. // @param subject(type=string) The primary stream subject, typically a user ID. // @param subcontext(type=string) A secondary subject, for example for direct chat between two users. // @param label(type=string) Meta-information about the stream, for example a chat room name. @@ -1269,7 +1269,7 @@ func (n *RuntimeGoNakamaModule) StreamCount(mode uint8, subject, subcontext, lab // @group streams // @summary Close a stream and remove all presences on it. -// @param mode(type=uint8) The type of stream, 'chat' for example. +// @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. // @param subject(type=string) The primary stream subject, typically a user ID. // @param subcontext(type=string) A secondary subject, for example for direct chat between two users. // @param label(type=string) Meta-information about the stream, for example a chat room name. @@ -1300,12 +1300,12 @@ func (n *RuntimeGoNakamaModule) StreamClose(mode uint8, subject, subcontext, lab // @group streams // @summary Send data to presences on a stream. -// @param mode(type=uint8) The type of stream, 'chat' for example. +// @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. // @param subject(type=string) The primary stream subject, typically a user ID. // @param subcontext(type=string) A secondary subject, for example for direct chat between two users. // @param label(type=string) Meta-information about the stream, for example a chat room name. // @param data(type=string) The data to send. -// @param presences(type=[]runtime.Presence) Array of presences to receive the sent data. If not set, will be sent to all presences. +// @param presences(type=[]runtime.Presence, optional=true, default=all) Array of presences to receive the sent data. // @param reliable(type=bool) Whether the sender has been validated prior. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) StreamSend(mode uint8, subject, subcontext, label, data string, presences []runtime.Presence, reliable bool) error { @@ -1377,12 +1377,12 @@ func (n *RuntimeGoNakamaModule) StreamSend(mode uint8, subject, subcontext, labe // @group streams // @summary Send a message to presences on a stream. -// @param mode(type=uint8) The type of stream, 'chat' for example. +// @param mode(type=uint8) The Type of stream, '2' for a chat channel for example. // @param subject(type=string) The primary stream subject, typically a user ID. // @param subcontext(type=string) A secondary subject, for example for direct chat between two users. // @param label(type=string) Meta-information about the stream, for example a chat room name. // @param msg(type=*rtapi.Envelope) The message to send. -// @param presences(type=[]runtime.Presence) Array of presences to receive the sent data. If not set, will be sent to all presences. +// @param presences(type=[]runtime.Presence, optional=true, default=all) Array of presences to receive the sent data. // @param reliable(type=bool) Whether the sender has been validated prior. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) StreamSendRaw(mode uint8, subject, subcontext, label string, msg *rtapi.Envelope, presences []runtime.Presence, reliable bool) error { @@ -1456,8 +1456,8 @@ func (n *RuntimeGoNakamaModule) SessionDisconnect(ctx context.Context, sessionID // @group sessions // @summary Log out a user from their current session. // @param userId(type=string) The ID of the user to be logged out. -// @param token(type=string) The current session authentication token. If the current auth and refresh tokens are not provided, all user sessions will be logged out. -// @param refreshToken(type=string) The current session refresh token. If the current auth and refresh tokens are not provided, all user sessions will be logged out. +// @param token(type=string, optional=true) The current session authentication token. If the current auth and refresh tokens are not provided, all user sessions will be logged out. +// @param refreshToken(type=string, optional=true) The current session refresh token. If the current auth and refresh tokens are not provided, all user sessions will be logged out. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) SessionLogout(userID, token, refreshToken string) error { uid, err := uuid.FromString(userID) @@ -1501,13 +1501,13 @@ func (n *RuntimeGoNakamaModule) MatchGet(ctx context.Context, id string) (*api.M // @group matches // @summary List currently running realtime multiplayer matches and optionally filter them by authoritative mode, label, and current participant count. // @param ctx(type=context.Context) The context object represents information about the server and requester. -// @param limit(type=int1) The maximum number of matches to list. -// @param authoritative(type=boolfalse) Set true to only return authoritative matches, false to only return relayed matches. -// @param label(type=string"") A label to filter authoritative matches by. Default "" means any label matches. +// @param limit(type=int, optional=true, default=100) The maximum number of matches to list. +// @param authoritative(type=bool, optional=true, default=false) Set true to only return authoritative matches, false to only return relayed matches. +// @param label(type=string, default="") A label to filter authoritative matches by. Default "" means any label matches. // @param minSize(type=int) Inclusive lower limit of current match participants. // @param maxSize(type=int) Inclusive upper limit of current match participants. // @param query(type=string) Additional query parameters to shortlist matches. -// @return match(*api.Match) A list of matches matching the parameters criteria. +// @return match([]*api.Match) A list of matches matching the parameters criteria. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) MatchList(ctx context.Context, limit int, authoritative bool, label string, minSize, maxSize *int, query string) ([]*api.Match, error) { authoritativeWrapper := &wrapperspb.BoolValue{Value: authoritative} @@ -1550,8 +1550,8 @@ func (n *RuntimeGoNakamaModule) MatchSignal(ctx context.Context, id string, data // @param subject(type=string) Notification subject. // @param content(type=map[string]interface{}) Notification content. Must be set but can be an struct. // @param code(type=int) Notification code to use. Must be equal or greater than 0. -// @param sender(type=string) The sender of this notification. If left empty, it will be assumed that it is a system notification. -// @param persistent(type=boolfalse) Whether to record this in the database for later listing. +// @param sender(type=string, optional=true) The sender of this notification. If left empty, it will be assumed that it is a system notification. +// @param persistent(type=bool, default=false) Whether to record this in the database for later listing. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) NotificationSend(ctx context.Context, userID, subject string, content map[string]interface{}, code int, sender string, persistent bool) error { uid, err := uuid.FromString(userID) @@ -1601,7 +1601,7 @@ func (n *RuntimeGoNakamaModule) NotificationSend(ctx context.Context, userID, su // @group notifications // @summary Send one or more in-app notifications to a user. // @param ctx(type=context.Context) The context object represents information about the server and requester. -// @param notifications(type=[]*runtime.NotificationsSend) A list of notifications to be sent together. +// @param notifications(type=[]*runtime.NotificationSend) A list of notifications to be sent together. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) NotificationsSend(ctx context.Context, notifications []*runtime.NotificationSend) error { ns := make(map[uuid.UUID][]*api.Notification) @@ -1696,7 +1696,7 @@ func (n *RuntimeGoNakamaModule) NotificationSendAll(ctx context.Context, subject // @group notifications // @summary Delete one or more in-app notifications. // @param ctx(type=context.Context) The context object represents information about the server and requester. -// @param notifications(type=[]*runtime.NotificationsDelete) A list of notifications to be deleted. +// @param notifications(type=[]*runtime.NotificationDelete) A list of notifications to be deleted. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) NotificationsDelete(ctx context.Context, notifications []*runtime.NotificationDelete) error { ns := make(map[uuid.UUID][]string) @@ -1735,9 +1735,9 @@ func (n *RuntimeGoNakamaModule) NotificationsDelete(ctx context.Context, notific // @param userId(type=string) The ID of the user whose wallet to update. // @param changeset(type=map[string]int64) The set of wallet operations to apply. // @param metadata(type=map[string]interface{}) Additional metadata to tag the wallet update with. -// @param updateLedger(type=boolfalse) Whether to record this update in the ledger. -// @return updatedValue(type=map) The updated wallet value. -// @return previousValue(type=map) The previous wallet value. +// @param updateLedger(type=bool, default=false) Whether to record this update in the ledger. +// @return updatedValue(map) The updated wallet value. +// @return previousValue(map) The previous wallet value. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) WalletUpdate(ctx context.Context, userID string, changeset map[string]int64, metadata map[string]interface{}, updateLedger bool) (map[string]int64, map[string]int64, error) { uid, err := uuid.FromString(userID) @@ -1777,8 +1777,8 @@ func (n *RuntimeGoNakamaModule) WalletUpdate(ctx context.Context, userID string, // @summary Update one or more user wallets with individual changesets. This function will also insert a new wallet ledger item into each user's wallet history that tracks their update. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param updates(type=[]*runtime.WalletUpdate) The set of user wallet update operations to apply. -// @param updateLedger(type=boolfalse) Whether to record this update in the ledger. -// @return updateWallets(runtime.WallateUpdateResult) A list of wallet update results. +// @param updateLedger(type=bool, default=false) Whether to record this update in the ledger. +// @return updateWallets([]runtime.WalletUpdateResult) A list of wallet update results. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) WalletsUpdate(ctx context.Context, updates []*runtime.WalletUpdate, updateLedger bool) ([]*runtime.WalletUpdateResult, error) { size := len(updates) @@ -1837,8 +1837,8 @@ func (n *RuntimeGoNakamaModule) WalletLedgerUpdate(ctx context.Context, itemID s // @summary List all wallet updates for a particular user from oldest to newest. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) The ID of the user to list wallet updates for. -// @param limit(type=int100) Limit number of results. -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param limit(type=int, optional=true, default=100) Limit number of results. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @return runtimeItems([]runtime.WalletLedgerItem) A Go slice containing wallet entries with Id, UserId, CreateTime, UpdateTime, Changeset, Metadata parameters. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) WalletLedgerList(ctx context.Context, userID string, limit int, cursor string) ([]runtime.WalletLedgerItem, string, error) { @@ -1868,8 +1868,8 @@ func (n *RuntimeGoNakamaModule) WalletLedgerList(ctx context.Context, userID str // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) User ID to list records for or "" (empty string) for public records. // @param collection(type=string) Collection to list data from. -// @param limit(type=int100) Limit number of records retrieved. -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param limit(type=int, optional=true, default=100) Limit number of records retrieved. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @return objects([]*api.StorageObject) A list of storage objects. // @return cursor(string) Pagination cursor. Will be set to "" or nil when fetching last available page. // @return error(error) An optional error value if an error occurred. @@ -1898,8 +1898,8 @@ func (n *RuntimeGoNakamaModule) StorageList(ctx context.Context, userID, collect // @group storage // @summary Fetch one or more records by their bucket/collection/keyname and optional user. // @param ctx(type=context.Context) The context object represents information about the server and requester. -// @param objectIds(type=[]*runtime.StorageReads) An array of object identifiers to be fetched. -// @return objects([]*api.StorageObject) A list of matches matching the parameters criteria. +// @param objectIds(type=[]*runtime.StorageRead) An array of object identifiers to be fetched. +// @return objects([]*api.StorageObject) A list of storage objects matching the parameters criteria. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) StorageRead(ctx context.Context, reads []*runtime.StorageRead) ([]*api.StorageObject, error) { size := len(reads) @@ -1943,7 +1943,7 @@ func (n *RuntimeGoNakamaModule) StorageRead(ctx context.Context, reads []*runtim // @summary Write one or more objects by their collection/keyname and optional user. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param objectIds(type=[]*runtime.StorageWrite) An array of object identifiers to be written. -// @return acks([]*api.StorageObjectAcks) A list of acks with the version of the written objects. +// @return acks([]*api.StorageObjectAck) A list of acks with the version of the written objects. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) StorageWrite(ctx context.Context, writes []*runtime.StorageWrite) ([]*api.StorageObjectAck, error) { size := len(writes) @@ -2049,9 +2049,9 @@ func (n *RuntimeGoNakamaModule) StorageDelete(ctx context.Context, deletes []*ru // @param accountUpdates(type=[]*runtime.AccountUpdate) Array of account information to be updated. // @param storageWrites(type=[]*runtime.StorageWrite) Array of storage objects to be updated. // @param walletUpdates(type=[]*runtime.WalletUpdate) Array of wallet updates to be made. -// @param updateLedger(type=boolfalse) Whether to record this wallet update in the ledger. +// @param updateLedger(type=bool, optional=true, default=false) Whether to record this wallet update in the ledger. // @return storageWriteOps([]*api.StorageObjectAck) A list of acks with the version of the written objects. -// @return walletUpdateOps(*runtime.WalletUpdateResult) A list of wallet updates results. +// @return walletUpdateOps([]*runtime.WalletUpdateResult) A list of wallet updates results. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) MultiUpdate(ctx context.Context, accountUpdates []*runtime.AccountUpdate, storageWrites []*runtime.StorageWrite, walletUpdates []*runtime.WalletUpdate, updateLedger bool) ([]*api.StorageObjectAck, []*runtime.WalletUpdateResult, error) { // Process account update inputs. @@ -2171,9 +2171,9 @@ func (n *RuntimeGoNakamaModule) MultiUpdate(ctx context.Context, accountUpdates // @summary Setup a new dynamic leaderboard with the specified ID and various configuration settings. The leaderboard will be created if it doesn't already exist, otherwise its configuration will not be updated. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param leaderboardID(type=string) The unique identifier for the new leaderboard. This is used by clients to submit scores. -// @param authoritative(type=boolfalse) Mark the leaderboard as authoritative which ensures updates can only be made via the Go runtime. No client can submit a score directly. -// @param sortOrder(type=string"desc") The sort order for records in the leaderboard. Possible values are "asc" or "desc". -// @param operator(type=string"best") The operator that determines how scores behave when submitted. Possible values are "best", "set", or "incr". +// @param authoritative(type=bool, default=false) Mark the leaderboard as authoritative which ensures updates can only be made via the Go runtime. No client can submit a score directly. +// @param sortOrder(type=string, default="desc") The sort order for records in the leaderboard. Possible values are "asc" or "desc". +// @param operator(type=string, default="best") The operator that determines how scores behave when submitted. Possible values are "best", "set", or "incr". // @param resetSchedule(type=string) The cron format used to define the reset schedule for the leaderboard. This controls when a leaderboard is reset and can be used to power daily/weekly/monthly leaderboards. // @param metadata(type=map[string]interface{}) The metadata you want associated to the leaderboard. Some good examples are weather conditions for a racing game. // @return error(error) An optional error value if an error occurred. @@ -2247,7 +2247,7 @@ func (n *RuntimeGoNakamaModule) LeaderboardDelete(ctx context.Context, id string // @group leaderboards // @summary Find leaderboards which have been created on the server. Leaderboards can be filtered with categories. // @param limit(type=int) Return only the required number of leaderboards denoted by this limit value. -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @return leaderboardList(*api.LeaderboardList) A list of leaderboard results and possibly a cursor. If cursor is empty/nil there are no further results. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) LeaderboardList(limit int, cursor string) (*api.LeaderboardList, error) { @@ -2276,10 +2276,10 @@ func (n *RuntimeGoNakamaModule) LeaderboardList(limit int, cursor string) (*api. // @param id(type=string) The unique identifier for the leaderboard to list. // @param owners(type=[]string) Array of owners to filter to. // @param limit(type=int) The maximum number of records to return (Max 10,000). -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @param overrideExpiry(type=int) Records with expiry in the past are not returned unless within this defined limit. Must be equal or greater than 0. -// @return records(*api.LeaderboardRecord) A page of leaderboard records. -// @return ownerRecords(*api.LeaderboardRecord) A list of owner leaderboard records (empty if the owners input parameter is not set). +// @return records([]*api.LeaderboardRecord) A page of leaderboard records. +// @return ownerRecords([]*api.LeaderboardRecord) A list of owner leaderboard records (empty if the owners input parameter is not set). // @return nextCursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). // @return prevCursor(string) An optional previous page cursor that can be used to retrieve the previous page of records (if any). // @return error(error) An optional error value if an error occurred. @@ -2319,9 +2319,9 @@ func (n *RuntimeGoNakamaModule) LeaderboardRecordsList(ctx context.Context, id s // @param id(type=string) The unique identifier for the leaderboard to submit to. // @param owner(type=string) The owner of this score submission. // @param username(type=string) The owner username of this score submission, if it's a user. -// @param score(type=int640) The score to submit. -// @param subscore(type=int640) A secondary subscore parameter for the submission. -// @param metadata(type=map[string]interface{}) The metadata you want associated to this submission. Some good examples are weather conditions for a racing game. +// @param score(type=int64) The score to submit. +// @param subscore(type=int64, optional=true) A secondary subscore parameter for the submission. +// @param metadata(type=map[string]interface{}, optional=true) The metadata you want associated to this submission. Some good examples are weather conditions for a racing game. // @param overrideOperator(type=*int) An override operator for the new record. The accepted values include: 0 (no override), 1 (best), 2 (set), 3 (incr), 4 (decr). Passing nil is the same as passing a pointer to 0 (no override), which uses the default leaderboard operator. // @return record(*api.LeaderboardRecord) The newly created leaderboard record. // @return error(error) An optional error value if an error occurred. @@ -2387,7 +2387,7 @@ func (n *RuntimeGoNakamaModule) LeaderboardRecordDelete(ctx context.Context, id, // @param id(type=string) The ID of the leaderboard to list records for. // @param ownerId(type=string) The owner ID around which to show records. // @param limit(type=int) Return only the required number of leaderboard records denoted by this limit value. Between 1-100. -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @param expiry(type=int64) Time since epoch in seconds. Must be greater than 0. // @return leaderboardRecordsHaystack(*api.LeaderboardRecordList) A list of leaderboard records and possibly a cursor. If cursor is empty/nil there are no further results. // @return error(error) An optional error value if an error occurred. @@ -2415,7 +2415,7 @@ func (n *RuntimeGoNakamaModule) LeaderboardRecordsHaystack(ctx context.Context, // @group leaderboards // @summary Fetch one or more leaderboards by ID. // @param ids(type=[]string) The table array of leaderboard ids. -// @return leaderboardsGet(*api.Leaderboard) The leaderboard records according to ID. +// @return leaderboardsGet([]*api.Leaderboard) The leaderboard records according to ID. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) LeaderboardsGetId(ctx context.Context, IDs []string) ([]*api.Leaderboard, error) { return LeaderboardsGet(n.leaderboardCache, IDs), nil @@ -2426,19 +2426,19 @@ func (n *RuntimeGoNakamaModule) LeaderboardsGetId(ctx context.Context, IDs []str // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param id(type=string) The unique identifier for the new tournament. This is used by clients to submit scores. // @param authoritative(type=bool) Whether the tournament created is server authoritative. -// @param sortOrder(type=string"desc") The sort order for records in the tournament. Possible values are "asc" or "desc". -// @param operator(type=string"best") The operator that determines how scores behave when submitted. The possible values are "best", "set", or "incr". +// @param sortOrder(type=string, default="desc") The sort order for records in the tournament. Possible values are "asc" or "desc". +// @param operator(type=string, default="best") The operator that determines how scores behave when submitted. The possible values are "best", "set", or "incr". // @param resetSchedule(type=string) The cron format used to define the reset schedule for the tournament. This controls when the underlying leaderboard resets and the tournament is considered active again. // @param metadata(type=map[string]interface{}) The metadata you want associated to the tournament. Some good examples are weather conditions for a racing game. // @param title(type=string) The title of the tournament. // @param description(type=string) The description of the tournament. // @param category(type=int) A category associated with the tournament. This can be used to filter different types of tournaments. Between 0 and 127. -// @param startTime(type=int) The start time of the tournament. Leave empty for immediately or a future time. -// @param endTime(type=intnever) The end time of the tournament. When the end time is elapsed, the tournament will not reset and will cease to exist. Must be greater than startTime if set. +// @param startTime(type=int, optional=true) The start time of the tournament. Leave empty for immediately or a future time. +// @param endTime(type=int, optional=true, default=never) The end time of the tournament. When the end time is elapsed, the tournament will not reset and will cease to exist. Must be greater than startTime if set. // @param duration(type=int) The active duration for a tournament. This is the duration when clients are able to submit new records. The duration starts from either the reset period or tournament start time, whichever is sooner. A game client can query the tournament for results between end of duration and next reset period. // @param maxSize(type=int) Maximum size of participants in a tournament. -// @param maxNumScore(type=int1000000) Maximum submission attempts for a tournament record. -// @param joinRequired(type=boolfalse) Whether the tournament needs to be joined before a record write is allowed. +// @param maxNumScore(type=int, default=1000000) Maximum submission attempts for a tournament record. +// @param joinRequired(type=bool, default=false) Whether the tournament needs to be joined before a record write is allowed. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) TournamentCreate(ctx context.Context, id string, authoritative bool, sortOrder, operator, resetSchedule string, metadata map[string]interface{}, title, description string, category, startTime, endTime, duration, maxSize, maxNumScore int, joinRequired bool) error { if id == "" { @@ -2591,12 +2591,12 @@ func (n *RuntimeGoNakamaModule) TournamentsGetId(ctx context.Context, tournament // @group tournaments // @summary Find tournaments which have been created on the server. Tournaments can be filtered with categories and via start and end times. // @param ctx(type=context.Context) The context object represents information about the server and requester. -// @param categoryStart(type=int) Filter tournament with categories greater or equal than this value. -// @param categoryEnd(type=int) Filter tournament with categories equal or less than this value. -// @param startTime(type=int) Filter tournament with that start after this time. -// @param endTime(type=int) Filter tournament with that end before this time. -// @param limit(type=int10) Return only the required number of tournament denoted by this limit value. -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param categoryStart(type=int) Filter tournaments with categories greater or equal than this value. +// @param categoryEnd(type=int) Filter tournaments with categories equal or less than this value. +// @param startTime(type=int) Filter tournaments that start after this time. +// @param endTime(type=int) Filter tournaments that end before this time. +// @param limit(type=int, default=10) Return only the required number of tournament denoted by this limit value. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @return tournamentList([]*api.TournamentList) A list of tournament results and possibly a cursor. If cursor is empty/nil there are no further results. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) TournamentList(ctx context.Context, categoryStart, categoryEnd, startTime, endTime, limit int, cursor string) (*api.TournamentList, error) { @@ -2641,10 +2641,10 @@ func (n *RuntimeGoNakamaModule) TournamentList(ctx context.Context, categoryStar // @param tournamentId(type=string) The ID of the tournament to list records for. // @param ownerIds(type=[]string) Array of owner IDs to filter results by. // @param limit(type=int) Return only the required number of tournament records denoted by this limit value. Max is 10000. -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @param overrideExpiry(type=int64) Records with expiry in the past are not returned unless within this defined limit. Must be equal or greater than 0. -// @return records(*api.LeaderboardRecord) A page of tournament records. -// @return ownerRecords(*api.LeaderboardRecord) A list of owner tournament records (empty if the owners input parameter is not set). +// @return records([]*api.LeaderboardRecord) A page of tournament records. +// @return ownerRecords([]*api.LeaderboardRecord) A list of owner tournament records (empty if the owners input parameter is not set). // @return prevCursor(string) An optional previous page cursor that can be used to retrieve the previous page of records (if any). // @return nextCursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). // @return error(error) An optional error value if an error occurred. @@ -2682,9 +2682,9 @@ func (n *RuntimeGoNakamaModule) TournamentRecordsList(ctx context.Context, tourn // @param id(type=string) The unique identifier for the tournament leaderboard to submit to. // @param owner(type=string) The owner of this score submission. // @param username(type=string) The owner username of this score submission, if it's a user. -// @param score(type=int640) The score to submit. -// @param subscore(type=int640) A secondary subscore parameter for the submission. -// @param metadata(type=map[string]interface{}) The metadata you want associated to this submission. Some good examples are weather conditions for a racing game. +// @param score(type=int64) The score to submit. +// @param subscore(type=int64, optional=true) A secondary subscore parameter for the submission. +// @param metadata(type=map[string]interface{}, optional=true) The metadata you want associated to this submission. Some good examples are weather conditions for a racing game. // @return result(*api.LeaderboardRecord) The newly created leaderboard record. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) TournamentRecordWrite(ctx context.Context, id, ownerID, username string, score, subscore int64, metadata map[string]interface{}, overrideOperator *int) (*api.LeaderboardRecord, error) { @@ -2743,9 +2743,9 @@ func (n *RuntimeGoNakamaModule) TournamentRecordDelete(ctx context.Context, id, // @param id(type=string) The ID of the tournament to list records for. // @param ownerId(type=string) The owner ID around which to show records. // @param limit(type=int) Return only the required number of tournament records denoted by this limit value. Between 1-100. -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @param expiry(type=int64) Time since epoch in seconds. Must be greater than 0. -// @return tournamentRecordsHaystack(*api.LeaderboardRecordList) A list of tournament records and possibly a cursor. If cursor is empty/nil there are no further results. +// @return tournamentRecordsHaystack(*api.TournamentRecordList) A list of tournament records and possibly a cursor. If cursor is empty/nil there are no further results. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) TournamentRecordsHaystack(ctx context.Context, id, ownerID string, limit int, cursor string, expiry int64) (*api.TournamentRecordList, error) { if id == "" { @@ -2899,8 +2899,8 @@ func (n *RuntimeGoNakamaModule) PurchaseValidateHuawei(ctx context.Context, user // @summary List stored validated purchase receipts. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) Filter by user ID. Can be an empty string to list purchases for all users. -// @param limit(type=int) Limit number of records retrieved. Defaults to 100. -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param limit(type=int, optional=true, default=100) Limit number of records retrieved. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @return listPurchases(*api.PurchaseList) A page of stored validated purchases and possibly a cursor. If cursor is empty/nil there are no further results. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) PurchasesList(ctx context.Context, userID string, limit int, cursor string) (*api.PurchaseList, error) { @@ -2975,7 +2975,7 @@ func (n *RuntimeGoNakamaModule) SubscriptionValidateApple(ctx context.Context, u // @param receipt(type=string) JSON encoded Google receipt. // @param persist(type=bool) Persist the subscription. // @param overrides(type=string, optional=true) Override the iap.google.client_email and iap.google.private_key provided in your configuration. -// @return validation(*api.ValidatePurchaseResponse) The resulting successfully validated subscription. +// @return validation(*api.ValidateSubscriptionResponse) The resulting successfully validated subscription. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) SubscriptionValidateGoogle(ctx context.Context, userID, receipt string, persist bool, overrides ...struct { ClientEmail string @@ -3025,8 +3025,8 @@ func (n *RuntimeGoNakamaModule) SubscriptionValidateGoogle(ctx context.Context, // @summary List stored validated subscriptions. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) Filter by user ID. Can be an empty string to list purchases for all users. -// @param limit(type=int) Limit number of records retrieved. Defaults to 100. -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param limit(type=int, optional=true, default=100) Limit number of records retrieved. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @return listSubscriptions(*api.SubscriptionList) A page of stored validated subscriptions and possibly a cursor. If cursor is empty/nil there are no further results. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) SubscriptionsList(ctx context.Context, userID string, limit int, cursor string) (*api.SubscriptionList, error) { @@ -3087,13 +3087,13 @@ func (n *RuntimeGoNakamaModule) GroupsGetId(ctx context.Context, groupIDs []stri // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) The user ID to be associated as the group superadmin. // @param name(type=string) Group name, must be unique. -// @param creatorId(type=string) The user ID to be associated as creator. If not set or nil/null, system user will be set. -// @param langTag(type=string"en") Group language. -// @param description(type=string) Group description, can be left empty as nil/null. -// @param avatarUrl(type=string) URL to the group avatar, can be left empty as nil/null. -// @param open(type=boolfalse) Whether the group is for anyone to join, or members will need to send invitations to join. -// @param metadata(type=map[string]interface{}) Custom information to store for this group. Can be left empty as nil/null. -// @param maxCount(type=int100) Maximum number of members to have in the group. +// @param creatorId(type=string, optional=true) The user ID to be associated as creator. If not set or nil/null, system user will be set. +// @param langTag(type=string, optional=true, default="en") Group language. +// @param description(type=string, optional=true) Group description, can be left empty as nil/null. +// @param avatarUrl(type=string, optional=true) URL to the group avatar, can be left empty as nil/null. +// @param open(type=bool, optional=true, default=false) Whether the group is for anyone to join, or members will need to send invitations to join. +// @param metadata(type=map[string]interface{}, optional=true) Custom information to store for this group. Can be left empty as nil/null. +// @param maxCount(type=int, default=100) Maximum number of members to have in the group. // @return createGroup(*api.Group) The groupId of the newly created group. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) GroupCreate(ctx context.Context, userID, name, creatorID, langTag, description, avatarUrl string, open bool, metadata map[string]interface{}, maxCount int) (*api.Group, error) { @@ -3463,11 +3463,11 @@ func (n *RuntimeGoNakamaModule) GroupUsersDemote(ctx context.Context, callerID, } // @group groups -// @summary List all members, admins and superadmins which belong to a group. This also list incoming join requests. +// @summary List all members, admins and superadmins which belong to a group. This also lists incoming join requests. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param groupId(type=string) The ID of the group to list members for. // @param limit(type=int) Return only the required number of users denoted by this limit value. -// @param state(type=int) Return only the required number of users denoted by this limit value. +// @param state(type=int) Return only the users matching this state value, '0' for superadmins for example. // @param cursor(type=string) Pagination cursor from previous result. Don't set to start fetching from the beginning. // @return groupUsers([]*api.GroupUserList_GroupUser) The user information for members, admins and superadmins for the group. Also users who sent a join request. // @return error(error) An optional error value if an error occurred. @@ -3501,12 +3501,12 @@ func (n *RuntimeGoNakamaModule) GroupUsersList(ctx context.Context, id string, l // @group groups // @summary Find groups based on the entered criteria. // @param ctx(type=context.Context) The context object represents information about the server and requester. -// @param name(type=string) Search for groups that contain this value in their name. -// @param langTag(type=string) Filter based upon the entered language tag. -// @param members(type=int) Search by number of group members. -// @param open(type=bool) Filter based on whether groups are Open or Closed. -// @param limit(type=int) Return only the required number of groups denoted by this limit value. -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param name(type=string, optional=true) Search for groups that contain this value in their name. Cannot be combined with any other filter. +// @param langTag(type=string, optional=true) Filter based upon the entered language tag. +// @param members(type=int, optional=true) Search by number of group members. +// @param open(type=bool, optional=true) Filter based on whether groups are Open or Closed. +// @param limit(type=int, optional=true) Return only the required number of groups denoted by this limit value. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @return groups([]*api.Group) A list of groups. // @return cursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). Will be set to "" or nil when fetching last available page. // @return error(error) An optional error value if an error occurred. @@ -3536,7 +3536,7 @@ func (n *RuntimeGoNakamaModule) GroupsList(ctx context.Context, name, langTag st // @summary Fetch one or more groups randomly. // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param count(type=int) The number of groups to fetch. -// @return users([]*api.Groups) A list of group record objects. +// @return users([]*api.Group) A list of group record objects. // @return error(error) An optional error value if an error occurred. func (n *RuntimeGoNakamaModule) GroupsGetRandom(ctx context.Context, count int) ([]*api.Group, error) { if count == 0 { @@ -3555,7 +3555,7 @@ func (n *RuntimeGoNakamaModule) GroupsGetRandom(ctx context.Context, count int) // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) The ID of the user to list groups for. // @param limit(type=int) The maximum number of entries in the listing. -// @param state(type=int) The state of the user within the group. If unspecified this returns users in all states. +// @param state(type=int, optional=true) The state of the user within the group. If unspecified this returns users in all states. // @param cursor(type=string) Pagination cursor from previous result. Don't set to start fetching from the beginning. // @return userGroups([]*api.UserGroupList_UserGroup) A table of groups with their fields. // @return cursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). Will be set to "" or nil when fetching last available page. @@ -3642,8 +3642,8 @@ func (n *RuntimeGoNakamaModule) MetricsTimerRecord(name string, tags map[string] // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param userId(type=string) The ID of the user whose friends, invites, invited, and blocked you want to list. // @param limit(type=int) The number of friends to retrieve in this page of results. No more than 100 limit allowed per result. -// @param state(type=int) The state of the friendship with the user. If unspecified this returns friends in all states for the user. -// @param cursor(type=string) Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param state(type=int, optional=true) The state of the friendship with the user. If unspecified this returns friends in all states for the user. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @return friends([]*api.Friend) The user information for users that are friends of the current user. // @return cursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). Will be set to "" or nil when fetching last available page. // @return error(error) An optional error value if an error occurred. @@ -3859,8 +3859,8 @@ func (n *RuntimeGoNakamaModule) SetEventFn(fn RuntimeEventCustomFunction) { // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param channelId(type=string) The ID of the channel to send the message on. // @param content(type=map[string]interface{}) Message content. -// @param senderId(type=string) The UUID for the sender of this message. If left empty, it will be assumed that it is a system message. -// @param senderUsername(type=string) The username of the user to send this message as. If left empty, it will be assumed that it is a system message. +// @param senderId(type=string, optional=true) The UUID for the sender of this message. If left empty, it will be assumed that it is a system message. +// @param senderUsername(type=string, optional=true) The username of the user to send this message as. If left empty, it will be assumed that it is a system message. // @param persist(type=bool) Whether to record this message in the channel history. // @return channelMessageSend(*rtapi.ChannelMessageAck) Message sent ack containing the following variables: 'channelId', 'contentStr', 'senderId', 'senderUsername', and 'persist'. // @return error(error) An optional error value if an error occurred. @@ -3888,8 +3888,8 @@ func (n *RuntimeGoNakamaModule) ChannelMessageSend(ctx context.Context, channelI // @param channelId(type=string) The ID of the channel to send the message on. // @param messageId(type=string) The ID of the message to update. // @param content(type=map[string]interface{}) Message content. -// @param senderId(type=string) The UUID for the sender of this message. If left empty, it will be assumed that it is a system message. -// @param senderUsername(type=string) The username of the user to send this message as. If left empty, it will be assumed that it is a system message. +// @param senderId(type=string, optional=true) The UUID for the sender of this message. If left empty, it will be assumed that it is a system message. +// @param senderUsername(type=string, optional=true) The username of the user to send this message as. If left empty, it will be assumed that it is a system message. // @param persist(type=bool) Whether to record this message in the channel history. // @return channelMessageUpdate(*rtapi.ChannelMessageAck) Message updated ack containing the following variables: 'channelId', 'contentStr', 'senderId', 'senderUsername', and 'persist'. // @return error(error) An optional error value if an error occurred. @@ -3920,8 +3920,8 @@ func (n *RuntimeGoNakamaModule) ChannelMessageUpdate(ctx context.Context, channe // @param ctx(type=context.Context) The context object represents information about the server and requester. // @param channelId(type=string) The ID of the channel to remove the message on. // @param messageId(type=string) The ID of the message to remove. -// @param senderId(type=string) The UUID for the sender of this message. If left empty, it will be assumed that it is a system message. -// @param senderUsername(type=string) The username of the user who sent this message. If left empty, it will be assumed that it is a system message. +// @param senderId(type=string, optional=true) The UUID for the sender of this message. If left empty, it will be assumed that it is a system message. +// @param senderUsername(type=string, optional=true) The username of the user who sent this message. If left empty, it will be assumed that it is a system message. // @param persist(type=bool) Whether to record this in the channel history. // @return channelMessageRemove(*rtapi.ChannelMessageAck) Message removed ack containing the following variables: 'channelId', 'contentStr', 'senderId', 'senderUsername', and 'persist'. // @return error(error) An optional error value if an error occurred. @@ -3944,7 +3944,7 @@ func (n *RuntimeGoNakamaModule) ChannelMessageRemove(ctx context.Context, channe // @param channelId(type=string) The ID of the channel to list messages from. // @param limit(type=int) The number of messages to return per page. // @param forward(type=bool) Whether to list messages from oldest to newest, or newest to oldest. -// @param cursor(type=string"") Pagination cursor from previous result. Don't set to start fetching from the beginning. +// @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @return channelMessageList([]*rtapi.ChannelMessage) Messages from the specified channel. // @return nextCursor(string) Cursor for the next page of messages, if any. // @return prevCursor(string) Cursor for the previous page of messages, if any. diff --git a/server/runtime_javascript_nakama.go b/server/runtime_javascript_nakama.go index 8baaf5768..0d4bc95e2 100644 --- a/server/runtime_javascript_nakama.go +++ b/server/runtime_javascript_nakama.go @@ -296,7 +296,7 @@ func (n *runtimeJavascriptNakamaModule) mappings(r *goja.Runtime) map[string]fun // @group utils // @summary Convert binary data to string. // @param data(type=ArrayBuffer) The binary data to be converted. -// @return result(type=string) The resulting string. +// @return result(string) The resulting string. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) binaryToString(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -320,7 +320,7 @@ func (n *runtimeJavascriptNakamaModule) binaryToString(r *goja.Runtime) func(goj // @group utils // @summary Convert string data to binary. // @param str(type=string) The string to be converted. -// @return result(type=ArrayBuffer) The resulting binary data. +// @return result(ArrayBuffer) The resulting binary data. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) stringToBinary(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -1783,7 +1783,7 @@ func (n *runtimeJavascriptNakamaModule) accountGetId(r *goja.Runtime) func(goja. // @group accounts // @summary Fetch information for multiple accounts by user IDs. // @param userIds(type=[]string) Array of user IDs to fetch information for. Must be valid UUID. -// @return account(nkruntime.Accounts) Array of accounts. +// @return account(nkruntime.Account[]) Array of accounts. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) accountsGetId(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -2768,7 +2768,7 @@ func (n *runtimeJavascriptNakamaModule) streamUserList(r *goja.Runtime) func(goj } // @group streams -// @summary Retreive a stream presence and metadata by user ID. +// @summary Retrieve a stream presence and metadata by user ID. // @param userId(type=string) The user ID to fetch information for. // @param sessionId(type=string) The current session ID for the user. // @param stream(type=nkruntime.Stream) A stream object. @@ -3136,7 +3136,7 @@ func (n *runtimeJavascriptNakamaModule) streamClose(r *goja.Runtime) func(goja.F // @summary Send data to presences on a stream. // @param stream(type=nkruntime.Stream) A stream object. // @param data(type=string) The data to send. -// @param presences(type=nkruntime.Presence, optional=true) Array of presences to receive the sent data. If not set, will be sent to all presences. +// @param presences(type=nkruntime.Presence[], optional=true, default=all) Array of presences to receive the sent data. // @param reliable(type=bool, optional=true, default=true) Whether the sender has been validated prior. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) streamSend(r *goja.Runtime) func(goja.FunctionCall) goja.Value { @@ -3236,7 +3236,7 @@ func (n *runtimeJavascriptNakamaModule) streamSend(r *goja.Runtime) func(goja.Fu // @summary Send a message to presences on a stream. // @param stream(type=nkruntime.Stream) A stream object. // @param msg(type=&rtapi.Envelope{}) The message to send. -// @param presences(type=nkruntime.Presence[]) Array of presences to receive the sent data. If not set, will be sent to all presences. +// @param presences(type=nkruntime.Presence[], optional=true, default=all) Array of presences to receive the sent data. // @param reliable(type=bool, optional=true, default=true) Whether the sender has been validated prior. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) streamSendRaw(r *goja.Runtime) func(goja.FunctionCall) goja.Value { @@ -3363,8 +3363,8 @@ func (n *runtimeJavascriptNakamaModule) sessionDisconnect(r *goja.Runtime) func( // @group sessions // @summary Log out a user from their current session. // @param userId(type=string) The ID of the user to be logged out. -// @param token(type=string) The current session authentication token. -// @param refreshToken(type=string) The current session refresh token. +// @param token(type=string, optional=true) The current session authentication token. If the current auth and refresh tokens are not provided, all user sessions will be logged out. +// @param refreshToken(type=string, optional=true) The current session refresh token. If the current auth and refresh tokens are not provided, all user sessions will be logged out. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) sessionLogout(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -3476,7 +3476,7 @@ func (n *runtimeJavascriptNakamaModule) matchGet(r *goja.Runtime) func(goja.Func // @summary List currently running realtime multiplayer matches and optionally filter them by authoritative mode, label, and current participant count. // @param limit(type=number, optional=true, default=1) The maximum number of matches to list. // @param authoritative(type=bool, optional=true, default=false) Set true to only return authoritative matches, false to only return relayed matches. -// @param label(type=string, optional=true) A label to filter authoritative matches by. Default "" meaning any label matches. +// @param label(type=string, optional=true, default="") A label to filter authoritative matches by. Default "" meaning any label matches. // @param minSize(type=number, optional=true) Inclusive lower limit of current match participants. // @param maxSize(type=number, optional=true) Inclusive upper limit of current match participants. // @param query(type=string, optional=true) Additional query parameters to shortlist matches. @@ -3959,7 +3959,7 @@ func (n *runtimeJavascriptNakamaModule) walletUpdate(r *goja.Runtime) func(goja. // @summary Update one or more user wallets with individual changesets. This function will also insert a new wallet ledger item into each user's wallet history that tracks their update. // @param updates(type=nkruntime.WalletUpdate[]) The set of user wallet update operations to apply. // @param updateLedger(type=bool, optional=true, default=false) Whether to record this update in the ledger. -// @return updateWallets(nkruntime.WallateUpdateResult) A list of wallet update results. +// @return updateWallets(nkruntime.WalletUpdateResult[]) A list of wallet update results. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) walletsUpdate(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -4239,7 +4239,7 @@ func (n *runtimeJavascriptNakamaModule) storageList(r *goja.Runtime) func(goja.F // @group storage // @summary Fetch one or more records by their bucket/collection/keyname and optional user. // @param objectIds(type=nkruntime.StorageReadRequest[]) An array of object identifiers to be fetched. -// @return objects(nkruntime.StorageObject[]) A list of matches matching the parameters criteria. +// @return objects(nkruntime.StorageObject[]) A list of storage records matching the parameters criteria. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) storageRead(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -4345,7 +4345,7 @@ func (n *runtimeJavascriptNakamaModule) storageRead(r *goja.Runtime) func(goja.F // @group storage // @summary Write one or more objects by their collection/keyname and optional user. // @param objectIds(type=nkruntime.StorageWriteRequest[]) An array of object identifiers to be written. -// @return acks(nkruntime.StorageWriteAcks) A list of acks with the version of the written objects. +// @return acks(nkruntime.StorageWriteAck[]) A list of acks with the version of the written objects. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) storageWrite(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -4572,12 +4572,12 @@ func (n *runtimeJavascriptNakamaModule) storageDelete(r *goja.Runtime) func(goja // @group users // @summary Update account, storage, and wallet information simultaneously. -// @param accountUpdates(type=nkruntime.AccountUpdate) Array of account information to be updated. +// @param accountUpdates(type=nkruntime.AccountUpdate[]) Array of account information to be updated. // @param storageWrites(type=nkruntime.StorageWriteRequest[]) Array of storage objects to be updated. // @param walletUpdates(type=nkruntime.WalletUpdate[]) Array of wallet updates to be made. // @param updateLedger(type=bool, optional=true, default=false) Whether to record this wallet update in the ledger. -// @return storageWriteAcks(nkruntime.StorageWriteAck) A list of acks with the version of the written objects. -// @return walletUpdateAcks(nkruntime.WalletUpdateResult) A list of wallet updates results. +// @return storageWriteAcks(nkruntime.StorageWriteAck[]) A list of acks with the version of the written objects. +// @return walletUpdateAcks(nkruntime.WalletUpdateResult[]) A list of wallet updates results. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) multiUpdate(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -4899,7 +4899,7 @@ func (n *runtimeJavascriptNakamaModule) multiUpdate(r *goja.Runtime) func(goja.F // @group leaderboards // @summary Setup a new dynamic leaderboard with the specified ID and various configuration settings. The leaderboard will be created if it doesn't already exist, otherwise its configuration will not be updated. // @param leaderboardID(type=string) The unique identifier for the new leaderboard. This is used by clients to submit scores. -// @param authoritative(type=bool, default=false) Mark the leaderboard as authoritative which ensures updates can only be made via the Go runtime. No client can submit a score directly. +// @param authoritative(type=bool, optional=true, default=false) Mark the leaderboard as authoritative which ensures updates can only be made via the Go runtime. No client can submit a score directly. // @param sortOrder(type=string, optional=true, default="desc") The sort order for records in the leaderboard. Possible values are "asc" or "desc". // @param operator(type=string, optional=true, default="best") The operator that determines how scores behave when submitted. Possible values are "best", "set", or "incr". // @param resetSchedule(type=string, optional=true) The cron format used to define the reset schedule for the leaderboard. This controls when a leaderboard is reset and can be used to power daily/weekly/monthly leaderboards. @@ -5006,7 +5006,7 @@ func (n *runtimeJavascriptNakamaModule) leaderboardDelete(r *goja.Runtime) func( // @summary Find leaderboards which have been created on the server. Leaderboards can be filtered with categories. // @param limit(type=number, optional=true, default=10) Return only the required number of leaderboards denoted by this limit value. // @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. -// @return leaderboardList(nkruntime.LeaderboardList) A list of leaderboard results and possibly a cursor. If cursor is empty/null there are no further results. +// @return leaderboardList(nkruntime.LeaderboardList[]) A list of leaderboard results and possibly a cursor. If cursor is empty/null there are no further results. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) leaderboardList(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -5067,8 +5067,8 @@ func (n *runtimeJavascriptNakamaModule) leaderboardList(r *goja.Runtime) func(go // @param limit(type=number) The maximum number of records to return (Max 10,000). // @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. // @param overrideExpiry(type=int, optional=true) Records with expiry in the past are not returned unless within this defined limit. Must be equal or greater than 0. -// @return records(nkruntime.LeaderboardRecord) A page of leaderboard records. -// @return ownerRecords(nkruntime.LeaderboardRecord) A list of owner leaderboard records (empty if the owners input parameter is not set). +// @return records(nkruntime.LeaderboardRecord[]) A page of leaderboard records. +// @return ownerRecords(nkruntime.LeaderboardRecord[]) A list of owner leaderboard records (empty if the owners input parameter is not set). // @return nextCursor(string) An optional next page cursor that can be used to retrieve the next page of records (if any). Will be set to "" or null when fetching last available page. // @return prevCursor(string) An optional previous page cursor that can be used to retrieve the previous page of records (if any). // @return error(error) An optional error value if an error occurred. @@ -5232,7 +5232,7 @@ func (n *runtimeJavascriptNakamaModule) leaderboardRecordDelete(r *goja.Runtime) // @group leaderboards // @summary Fetch one or more leaderboards by ID. // @param ids(type=string[]) The table array of leaderboard ids. -// @return leaderboards(nkruntime.Leaderboard) The leaderboard records according to ID. +// @return leaderboards(nkruntime.Leaderboard[]) The leaderboard records according to ID. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) leaderboardsGetId(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -5601,7 +5601,7 @@ func (n *runtimeJavascriptNakamaModule) subscriptionValidateApple(r *goja.Runtim // @param userId(type=string) The user ID of the owner of the receipt. // @param receipt(type=string) JSON encoded Google receipt. // @param persist(type=bool, optional=true, default=true) Persist the subscription. -// @return validation(nkruntime.ValidatePurchaseResponse) The resulting successfully validated subscriptions. +// @return validation(nkruntime.ValidateSubscriptionResponse) The resulting successfully validated subscriptions. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) subscriptionValidateGoogle(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -5690,7 +5690,7 @@ func (n *runtimeJavascriptNakamaModule) subscriptionGetByProductId(r *goja.Runti // @param userId(type=string, optional=true) Filter by user ID. Can be an empty string to list subscriptions for all users. // @param limit(type=number, optional=true, default=100) Limit number of records retrieved. // @param cursor(type=string, optional=true, default="") Pagination cursor from previous result. Don't set to start fetching from the beginning. -// @return listPurchases(nkruntime.ValidatedPurchaseList) A page of stored validated subscriptions and possibly a cursor. If cursor is empty/null there are no further results. +// @return listSubscriptions(nkruntime.SubscriptionList) A page of stored validated subscriptions and possibly a cursor. If cursor is empty/null there are no further results. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) subscriptionsList(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -6270,8 +6270,8 @@ func (n *runtimeJavascriptNakamaModule) tournamentList(r *goja.Runtime) func(goj // @param owner(type=string) The owner of this score submission. Mandatory field. // @param username(type=string, optional=true) The owner username of this score submission, if it's a user. // @param score(type=number, optional=true, default=0) The score to submit. -// @return subscore(type=number, optional=true, default=0) A secondary subscore parameter for the submission. -// @return metadata(object) The metadata you want associated to this submission. Some good examples are weather conditions for a racing game. +// @param subscore(type=number, optional=true, default=0) A secondary subscore parameter for the submission. +// @param metadata(type=object) The metadata you want associated to this submission. Some good examples are weather conditions for a racing game. // @return result(nkruntime.LeaderboardRecord) The newly created leaderboard record. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) tournamentRecordWrite(r *goja.Runtime) func(goja.FunctionCall) goja.Value { @@ -8147,7 +8147,7 @@ func (n *runtimeJavascriptNakamaModule) satoriConstructor(r *goja.Runtime) (*goj // @group satori // @summary Get the Satori client. -// @return satori(type=nkruntime.Satori) The satori client. +// @return satori(*nkruntime.Satori) The satori client. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) getSatori(r *goja.Object) func(goja.FunctionCall) goja.Value { return func(goja.FunctionCall) goja.Value { @@ -8174,7 +8174,7 @@ func (n *runtimeJavascriptNakamaModule) satoriAuthenticate(r *goja.Runtime) func // @group satori // @summary Get identity properties. // @param id(type=string) The identifier of the identity. -// @return properties(type=nkruntime.Properties) The identity properties. +// @return properties(*nkruntime.Properties) The identity properties. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) satoriPropertiesGet(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -8311,7 +8311,7 @@ func (n *runtimeJavascriptNakamaModule) satoriPublishEvents(r *goja.Runtime) fun // @summary List experiments. // @param id(type=string) The identifier of the identity. // @param names(type=string[], optional=true, default=[]) Optional list of experiment names to filter. -// @return experiments(type=nkruntime.Experiment[]) The experiment list. +// @return experiments(*nkruntime.Experiment[]) The experiment list. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) satoriExperimentsList(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -8358,7 +8358,7 @@ func (n *runtimeJavascriptNakamaModule) satoriExperimentsList(r *goja.Runtime) f // @summary List flags. // @param id(type=string) The identifier of the identity. // @param names(type=string[], optional=true, default=[]) Optional list of flag names to filter. -// @return flags(type=nkruntime.Flag[]) The flag list. +// @return flags(*nkruntime.Flag[]) The flag list. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) satoriFlagsList(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { @@ -8406,7 +8406,7 @@ func (n *runtimeJavascriptNakamaModule) satoriFlagsList(r *goja.Runtime) func(go // @summary List live events. // @param id(type=string) The identifier of the identity. // @param names(type=string[], optional=true, default=[]) Optional list of live event names to filter. -// @return liveEvents(type=nkruntime.LiveEvent[]) The live event list. +// @return liveEvents(*nkruntime.LiveEvent[]) The live event list. // @return error(error) An optional error value if an error occurred. func (n *runtimeJavascriptNakamaModule) satoriLiveEventsList(r *goja.Runtime) func(goja.FunctionCall) goja.Value { return func(f goja.FunctionCall) goja.Value { diff --git a/server/runtime_lua_nakama.go b/server/runtime_lua_nakama.go index 8dfee8ab6..be7dc9f76 100644 --- a/server/runtime_lua_nakama.go +++ b/server/runtime_lua_nakama.go @@ -5562,7 +5562,7 @@ func (n *RuntimeLuaNakamaModule) storageList(l *lua.LState) int { // @group storage // @summary Fetch one or more records by their bucket/collection/keyname and optional user. // @param objectIds(type=table) A table of object identifiers to be fetched. -// @return objects(table) A list of matches matching the parameters criteria. +// @return objects(table) A list of storage objects matching the parameters criteria. // @return error(error) An optional error value if an error occurred. func (n *RuntimeLuaNakamaModule) storageRead(l *lua.LState) int { keysTable := l.CheckTable(1) -- GitLab