Skip to Content
defold-typescript libraries
heroiclabsnakama-defold

heroiclabs/nakama-defold/nakama

Nakama Defold Client SDK

  • GitHub: heroiclabs/nakama-defold — pinned to v3.4.0
    1. Pick a release from heroiclabs/nakama-defold releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as nakama from "nakama.nakama"

Functions

cancel(token: CancellationToken)

Cancel a token, stopping the API calls it was passed to.

Parameters

  • token: CancellationToken

cancellation_token(): CancellationToken

Create a cancellation token. Pass it to {@link sync} or to any API call to be able to cancel an ongoing call, or a whole sequence of them, later.

Returns

  • CancellationToken

sync(fn: () => void, cancellation_token?: CancellationToken)

Run fn inside a coroutine, so the API calls it makes can yield.

Parameters

  • fn: () => void — The code to run.
  • cancellation_token?: CancellationToken — Optional token that cancels the running code.

create_group_user_list_group_user(state_int: number, user_api_user: unknown)U

A single user-role pair.

Parameters

  • state_int: number — Their relationship to the group.
  • user_api_user: unknown — User.

create_user_group_list_user_group(group_api_group: unknown, state_int: number)U

A single group-role pair.

Parameters

  • group_api_group: unknown — Group.
  • state_int: number — The user's relationship to the group.

create_write_leaderboard_record_request_leaderboard_record_write(metadata_str: string, operator_api_operator: unknown, score_str: string, subscore_str: string)U

Record values to write.

Parameters

  • metadata_str: string — Optional record metadata.
  • operator_api_operator: unknown — Operator override.
  • score_str: string — The score value to submit.
  • subscore_str: string — An optional secondary value.

create_write_tournament_record_request_tournament_record_write(metadata_str: string, operator_api_operator: unknown, score_str: string, subscore_str: string)U

Record values to write.

Parameters

  • metadata_str: string — A JSON object of additional properties (optional).
  • operator_api_operator: unknown — Operator override.
  • score_str: string — The score value to submit.
  • subscore_str: string — An optional secondary value.

create_api_account(custom_id_str: string, devices_arr: unknown[], disable_time_str: string, email_str: string, user_api_user: unknown, verify_time_str: string, wallet_str: string)U

A user with additional account details. Always the current user.

Parameters

  • custom_id_str: string — The custom id in the user's account.
  • devices_arr: unknown[] — The devices which belong to the user's account.
  • disable_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
  • email_str: string — The email address of the user.
  • user_api_user: unknown — The user object.
  • verify_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
  • wallet_str: string — The user's wallet data.

create_api_account_apple(token_str: string, vars_obj: unknown)U

Send a Apple Sign In token to the server. Used with authenticate/link/unlink.

Parameters

  • token_str: string — The ID token received from Apple to validate.
  • vars_obj: unknown — Extra information that will be bundled in the session token.

create_api_account_custom(id_str: string, vars_obj: unknown): { id: string; vars: unknown; }U

Send a custom ID to the server. Used with authenticate/link/unlink.

Parameters

  • id_str: string — A custom identifier.
  • vars_obj: unknown — Extra information that will be bundled in the session token.

Returns

  • { id: string; vars: unknown; }
    • id: string
    • vars: unknown

create_api_account_device(id_str: string, vars_obj: unknown)U

Send a device to the server. Used with authenticate/link/unlink and user.

Parameters

  • id_str: string — A device identifier. Should be obtained by a platform-specific device API.
  • vars_obj: unknown — Extra information that will be bundled in the session token.

create_api_account_email(email_str: string, password_str: string, vars_obj: unknown)U

Send an email with password to the server. Used with authenticate/link/unlink.

Parameters

  • email_str: string — A valid RFC-5322 email address.
  • password_str: string — A password for the user account.
  • vars_obj: unknown — Extra information that will be bundled in the session token.

create_api_account_facebook(token_str: string, vars_obj: unknown)U

Send a Facebook token to the server. Used with authenticate/link/unlink.

Parameters

  • token_str: string — The OAuth token received from Facebook to access their profile API.
  • vars_obj: unknown — Extra information that will be bundled in the session token.

create_api_account_facebook_instant_game(signed_player_info_str: string, vars_obj: unknown)U

Send a Facebook Instant Game token to the server. Used with authenticate/link/unlink.

Parameters

  • signed_player_info_str: string
  • vars_obj: unknown — Extra information that will be bundled in the session token.

create_api_account_game_center(bundle_id_str: string, player_id_str: string, public_key_url_str: string, salt_str: string, signature_str: string, timestamp_seconds_str: string, vars_obj: unknown)U

Send Apple's Game Center account credentials to the server. Used with authenticate/link/unlink.

https://developer.apple.com/documentation/gamekit/gklocalplayer/1515407-generateidentityverificationsign

Parameters

  • bundle_id_str: string — Bundle ID (generated by GameCenter).
  • player_id_str: string — Player ID (generated by GameCenter).
  • public_key_url_str: string — The URL for the public encryption key.
  • salt_str: string — A random "NSString" used to compute the hash and keep it randomized.
  • signature_str: string — The verification signature data generated.
  • timestamp_seconds_str: string — Time since UNIX epoch when the signature was created.
  • vars_obj: unknown — Extra information that will be bundled in the session token.

create_api_account_google(token_str: string, vars_obj: unknown)U

Send a Google token to the server. Used with authenticate/link/unlink.

Parameters

  • token_str: string — The OAuth token received from Google to access their profile API.
  • vars_obj: unknown — Extra information that will be bundled in the session token.

create_api_account_steam(token_str: string, vars_obj: unknown)U

Send a Steam token to the server. Used with authenticate/link/unlink.

Parameters

  • token_str: string — The account token received from Steam to access their profile API.
  • vars_obj: unknown — Extra information that will be bundled in the session token.

create_api_channel_message(channel_id_str: string, code_int: number, content_str: string, create_time_str: string, group_id_str: string, message_id_str: string, persistent_bool: boolean, room_name_str: string, sender_id_str: string, update_time_str: string, user_id_one_str: string, user_id_two_str: string, username_str: string)U

A message sent on a channel.

Parameters

  • channel_id_str: string — The channel this message belongs to.
  • code_int: number — The code representing a message type or category.
  • content_str: string — The content payload.
  • create_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
  • group_id_str: string — The ID of the group, or an empty string if this message was not sent through a group channel.
  • message_id_str: string — The unique ID of this message.
  • persistent_bool: boolean — True if the message was persisted to the channel's history, false otherwise.
  • room_name_str: string — The name of the chat room, or an empty string if this message was not sent through a chat room.
  • sender_id_str: string — Message sender, usually a user ID.
  • update_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
  • user_id_one_str: string — The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
  • user_id_two_str: string — The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
  • username_str: string — The username of the message sender, if any.

create_api_channel_message_list(cacheable_cursor_str: string, messages_arr: unknown[], next_cursor_str: string, prev_cursor_str: string)U

A list of channel messages, usually a result of a list operation.

Parameters

  • cacheable_cursor_str: string — Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
  • messages_arr: unknown[] — A list of messages.
  • next_cursor_str: string — The cursor to send when retrieving the next page, if any.
  • prev_cursor_str: string — The cursor to send when retrieving the previous page, if any.

create_api_create_group_request(avatar_url_str: string, description_str: string, lang_tag_str: string, max_count_int: number, name_str: string, open_bool: boolean)U

Create a group with the current user as owner.

Parameters

  • avatar_url_str: string — A URL for an avatar image.
  • description_str: string — A description for the group.
  • lang_tag_str: string — The language expected to be a tag which follows the BCP-47 spec.
  • max_count_int: number — Maximum number of group members.
  • name_str: string — A unique name for the group.
  • open_bool: boolean — Mark a group as open or not where only admins can accept members.

create_api_delete_storage_object_id(collection_str: string, key_str: string, version_str: string)U

Storage objects to delete.

Parameters

  • collection_str: string — The collection which stores the object.
  • key_str: string — The key of the object within the collection.
  • version_str: string — The version hash of the object.

create_api_delete_storage_objects_request(object_ids_arr: unknown[])U

Batch delete storage objects.

Parameters

  • object_ids_arr: unknown[] — Batch of storage objects.

create_api_event(external_bool: boolean, name_str: string, properties_obj: unknown, timestamp_str: string)U

Represents an event to be passed through the server to registered event handlers.

Parameters

  • external_bool: boolean — True if the event came directly from a client call, false otherwise.
  • name_str: string — An event name, type, category, or identifier.
  • properties_obj: unknown — Arbitrary event property values.
  • timestamp_str: string — The time when the event was triggered.

create_api_friend(state_int: number, update_time_str: string, user_api_user: unknown)U

A friend of a user.

Parameters

  • state_int: number — The friend status.
  • update_time_str: string — Time of the latest relationship update.
  • user_api_user: unknown — The user object.

create_api_friend_list(cursor_str: string, friends_arr: unknown[])U

A collection of zero or more friends of the user.

Parameters

  • cursor_str: string — Cursor for the next page of results, if any.
  • friends_arr: unknown[] — The Friend objects.

create_api_group(avatar_url_str: string, create_time_str: string, creator_id_str: string, description_str: string, edge_count_int: number, id_str: string, lang_tag_str: string, max_count_int: number, metadata_str: string, name_str: string, open_bool: boolean, update_time_str: string)U

A group in the server.

Parameters

  • avatar_url_str: string — A URL for an avatar image.
  • create_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
  • creator_id_str: string — The id of the user who created the group.
  • description_str: string — A description for the group.
  • edge_count_int: number — The current count of all members in the group.
  • id_str: string — The id of a group.
  • lang_tag_str: string — The language expected to be a tag which follows the BCP-47 spec.
  • max_count_int: number — The maximum number of members allowed.
  • metadata_str: string — Additional information stored as a JSON object.
  • name_str: string — The unique name of the group.
  • open_bool: boolean — Anyone can join open groups, otherwise only admins can accept members.
  • update_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.

create_api_group_list(cursor_str: string, groups_arr: unknown[])U

One or more groups returned from a listing operation.

Parameters

  • cursor_str: string — A cursor used to get the next page.
  • groups_arr: unknown[] — One or more groups.

create_api_group_user_list(cursor_str: string, group_users_arr: unknown[])U

A list of users belonging to a group, along with their role.

Parameters

  • cursor_str: string — Cursor for the next page of results, if any.
  • group_users_arr: unknown[] — User-role pairs for a group.

create_api_leaderboard_record(create_time_str: string, expiry_time_str: string, leaderboard_id_str: string, max_num_score_int: number, metadata_str: string, num_score_int: number, owner_id_str: string, rank_str: string, score_str: string, subscore_str: string, update_time_str: string, username_str: string)U

Represents a complete leaderboard record with all scores and associated metadata.

Parameters

  • create_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
  • expiry_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
  • leaderboard_id_str: string — The ID of the leaderboard this score belongs to.
  • max_num_score_int: number — The maximum number of score updates allowed by the owner.
  • metadata_str: string — Metadata.
  • num_score_int: number — The number of submissions to this score record.
  • owner_id_str: string — The ID of the score owner, usually a user or group.
  • rank_str: string — The rank of this record.
  • score_str: string — The score value.
  • subscore_str: string — An optional subscore value.
  • update_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
  • username_str: string — The username of the score owner, if the owner is a user.

create_api_leaderboard_record_list(next_cursor_str: string, owner_records_arr: unknown[], prev_cursor_str: string, rank_count_str: string, records_arr: unknown[])U

A set of leaderboard records, may be part of a leaderboard records page or a batch of individual records.

Parameters

  • next_cursor_str: string — The cursor to send when retrieving the next page, if any.
  • owner_records_arr: unknown[] — A batched set of leaderboard records belonging to specified owners.
  • prev_cursor_str: string — The cursor to send when retrieving the previous page, if any.
  • rank_count_str: string — The total number of ranks available.
  • records_arr: unknown[] — A list of leaderboard records.

Link Steam to the current user's account.

Parameters

  • account_api_account_steam: unknown — The Facebook account details.
  • sync_bool: boolean — Import Steam friends for the user.

create_api_list_subscriptions_request(cursor_str: string, limit_int: number)U

List user subscriptions.

Parameters

  • cursor_str: string
  • limit_int: number

create_api_match(authoritative_bool: boolean, handler_name_str: string, label_str: string, match_id_str: string, size_int: number, tick_rate_int: number)U

Represents a realtime match.

Parameters

  • authoritative_bool: boolean — True if it's an server-managed authoritative match, false otherwise.
  • handler_name_str: string
  • label_str: string — Match label, if any.
  • match_id_str: string — The ID of the match, can be used to join.
  • size_int: number — Current number of users in the match.
  • tick_rate_int: number

create_api_match_list(matches_arr: unknown[])U

A list of realtime matches.

Parameters

  • matches_arr: unknown[] — A number of matches corresponding to a list operation.

create_api_notification(code_int: number, content_str: string, create_time_str: string, id_str: string, persistent_bool: boolean, sender_id_str: string, subject_str: string)U

A notification in the server.

Parameters

  • code_int: number — Category code for this notification.
  • content_str: string — Content of the notification in JSON.
  • create_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
  • id_str: string — ID of the Notification.
  • persistent_bool: boolean — True if this notification was persisted to the database.
  • sender_id_str: string — ID of the sender, if a user. Otherwise 'null'.
  • subject_str: string — Subject of the notification.

create_api_notification_list(cacheable_cursor_str: string, notifications_arr: unknown[])U

A collection of zero or more notifications.

Parameters

  • cacheable_cursor_str: string — Use this cursor to paginate notifications. Cache this to catch up to new notifications.
  • notifications_arr: unknown[] — Collection of notifications.

create_api_read_storage_object_id(collection_str: string, key_str: string, user_id_str: string)U

Storage objects to get.

Parameters

  • collection_str: string — The collection which stores the object.
  • key_str: string — The key of the object within the collection.
  • user_id_str: string — The user owner of the object.

create_api_read_storage_objects_request(object_ids_arr: unknown[])U

Batch get storage objects.

Parameters

  • object_ids_arr: unknown[] — Batch of storage objects.

create_api_rpc(http_key_str: string, id_str: string, payload_str: string)U

Execute an Lua function on the server.

Parameters

  • http_key_str: string — The authentication key used when executed as a non-client HTTP request.
  • id_str: string — The identifier of the function.
  • payload_str: string — The payload of the function which must be a JSON object.

create_api_session(created_bool: boolean, refresh_token_str: string, token_str: string)U

A user's session used to authenticate messages.

Parameters

  • created_bool: boolean — True if the corresponding account was just created, false otherwise.
  • refresh_token_str: string — Refresh token that can be used for session token renewal.
  • token_str: string — Authentication credentials.

create_api_session_logout_request(refresh_token_str: string, token_str: string)U

Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.

Parameters

  • refresh_token_str: string — Refresh token to invalidate.
  • token_str: string — Session token to log out.

create_api_session_refresh_request(token_str: string, vars_obj: unknown)U

Authenticate against the server with a refresh token.

Parameters

  • token_str: string — Refresh token.
  • vars_obj: unknown — Extra information that will be bundled in the session token.

create_api_storage_object(collection_str: string, create_time_str: string, key_str: string, permission_read_int: number, permission_write_int: number, update_time_str: string, user_id_str: string, value_str: string, version_str: string)U

An object within the storage engine.

Parameters

  • collection_str: string — The collection which stores the object.
  • create_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
  • key_str: string — The key of the object within the collection.
  • permission_read_int: number — The read access permissions for the object.
  • permission_write_int: number — The write access permissions for the object.
  • update_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
  • user_id_str: string — The user owner of the object.
  • value_str: string — The value of the object.
  • version_str: string — The version hash of the object.

create_api_storage_object_ack(collection_str: string, create_time_str: string, key_str: string, update_time_str: string, user_id_str: string, version_str: string)U

A storage acknowledgement.

Parameters

  • collection_str: string — The collection which stores the object.
  • create_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
  • key_str: string — The key of the object within the collection.
  • update_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
  • user_id_str: string — The owner of the object.
  • version_str: string — The version hash of the object.

create_api_storage_object_acks(acks_arr: unknown[])U

Batch of acknowledgements for the storage object write.

Parameters

  • acks_arr: unknown[] — Batch of storage write acknowledgements.

create_api_storage_object_list(cursor_str: string, objects_arr: unknown[])U

List of storage objects.

Parameters

  • cursor_str: string — The cursor for the next page of results, if any.
  • objects_arr: unknown[] — The list of storage objects.

create_api_storage_objects(objects_arr: unknown[])U

Batch of storage objects.

Parameters

  • objects_arr: unknown[] — The batch of storage objects.

create_api_subscription_list(cursor_str: string, prev_cursor_str: string, validated_subscriptions_arr: unknown[])U

A list of validated subscriptions stored by Nakama.

Parameters

  • cursor_str: string — The cursor to send when retrieving the next page, if any.
  • prev_cursor_str: string — The cursor to send when retrieving the previous page, if any.
  • validated_subscriptions_arr: unknown[] — Stored validated subscriptions.

create_api_tournament(authoritative_bool: boolean, can_enter_bool: boolean, category_int: number, create_time_str: string, description_str: string, duration_int: number, end_active_int: number, end_time_str: string, id_str: string, max_num_score_int: number, max_size_int: number, metadata_str: string, next_reset_int: number, operator_api_operator: unknown, prev_reset_int: number, size_int: number, sort_order_int: number, start_active_int: number, start_time_str: string, title_str: string)U

A tournament on the server.

Parameters

  • authoritative_bool: boolean — Whether the leaderboard was created authoritatively or not.
  • can_enter_bool: boolean — True if the tournament is active and can enter. A computed value.
  • category_int: number — The category of the tournament. e.g. "vip" could be category 1.
  • create_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
  • description_str: string — The description of the tournament. May be blank.
  • duration_int: number — Duration of the tournament in seconds.
  • end_active_int: number — The UNIX time when the tournament stops being active until next reset. A computed value.
  • end_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
  • id_str: string — The ID of the tournament.
  • max_num_score_int: number — The maximum score updates allowed per player for the current tournament.
  • max_size_int: number — The maximum number of players for the tournament.
  • metadata_str: string — Additional information stored as a JSON object.
  • next_reset_int: number — The UNIX time when the tournament is next playable. A computed value.
  • operator_api_operator: unknown — Operator.
  • prev_reset_int: number — The UNIX time when the tournament was last reset. A computed value.
  • size_int: number — The current number of players in the tournament.
  • sort_order_int: number — ASC (0) or DESC (1) sort mode of scores in the tournament.
  • start_active_int: number — The UNIX time when the tournament start being active. A computed value.
  • start_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
  • title_str: string — The title for the tournament.

create_api_tournament_list(cursor_str: string, tournaments_arr: unknown[])U

A list of tournaments.

Parameters

  • cursor_str: string — A pagination cursor (optional).
  • tournaments_arr: unknown[] — The list of tournaments returned.

create_api_tournament_record_list(next_cursor_str: string, owner_records_arr: unknown[], prev_cursor_str: string, rank_count_str: string, records_arr: unknown[])U

A set of tournament records which may be part of a tournament records page or a batch of individual records.

Parameters

  • next_cursor_str: string — The cursor to send when retireving the next page (optional).
  • owner_records_arr: unknown[] — A batched set of tournament records belonging to specified owners.
  • prev_cursor_str: string — The cursor to send when retrieving the previous page (optional).
  • rank_count_str: string — The total number of ranks available.
  • records_arr: unknown[] — A list of tournament records.

create_api_update_account_request(avatar_url_str: string, display_name_str: string, lang_tag_str: string, location_str: string, timezone_str: string, username_str: string)U

Update a user's account details.

Parameters

  • avatar_url_str: string — A URL for an avatar image.
  • display_name_str: string — The display name of the user.
  • lang_tag_str: string — The language expected to be a tag which follows the BCP-47 spec.
  • location_str: string — The location set by the user.
  • timezone_str: string — The timezone set by the user.
  • username_str: string — The username of the user's account.

create_api_user(apple_id_str: string, avatar_url_str: string, create_time_str: string, display_name_str: string, edge_count_int: number, facebook_id_str: string, facebook_instant_game_id_str: string, gamecenter_id_str: string, google_id_str: string, id_str: string, lang_tag_str: string, location_str: string, metadata_str: string, online_bool: boolean, steam_id_str: string, timezone_str: string, update_time_str: string, username_str: string)U

A user in the server.

Parameters

  • apple_id_str: string — The Apple Sign In ID in the user's account.
  • avatar_url_str: string — A URL for an avatar image.
  • create_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
  • display_name_str: string — The display name of the user.
  • edge_count_int: number — Number of related edges to this user.
  • facebook_id_str: string — The Facebook id in the user's account.
  • facebook_instant_game_id_str: string — The Facebook Instant Game ID in the user's account.
  • gamecenter_id_str: string — The Apple Game Center in of the user's account.
  • google_id_str: string — The Google id in the user's account.
  • id_str: string — The id of the user's account.
  • lang_tag_str: string — The language expected to be a tag which follows the BCP-47 spec.
  • location_str: string — The location set by the user.
  • metadata_str: string — Additional information stored as a JSON object.
  • online_bool: boolean — Indicates whether the user is currently online.
  • steam_id_str: string — The Steam id in the user's account.
  • timezone_str: string — The timezone set by the user.
  • update_time_str: string — The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
  • username_str: string — The username of the user's account.

create_api_user_group_list(cursor_str: string, user_groups_arr: unknown[])U

A list of groups belonging to a user, along with the user's role in each group.

Parameters

  • cursor_str: string — Cursor for the next page of results, if any.
  • user_groups_arr: unknown[] — Group-role pairs for a user.

create_api_users(users_arr: unknown[])U

A collection of zero or more users.

Parameters

  • users_arr: unknown[] — The User objects.

create_api_validate_purchase_apple_request(persist_bool: boolean, receipt_str: string)U

Parameters

  • persist_bool: boolean
  • receipt_str: string — Base64 encoded Apple receipt data payload.

create_api_validate_purchase_facebook_instant_request(persist_bool: boolean, signed_request_str: string)U

Parameters

  • persist_bool: boolean
  • signed_request_str: string — Base64 encoded Facebook Instant signedRequest receipt data payload.

create_api_validate_purchase_google_request(persist_bool: boolean, purchase_str: string)U

Parameters

  • persist_bool: boolean
  • purchase_str: string — JSON encoded Google purchase payload.

create_api_validate_purchase_huawei_request(persist_bool: boolean, purchase_str: string, signature_str: string)U

Parameters

  • persist_bool: boolean
  • purchase_str: string — JSON encoded Huawei InAppPurchaseData.
  • signature_str: string — InAppPurchaseData signature.

create_api_validate_purchase_response(validated_purchases_arr: unknown[])U

Validate IAP response.

Parameters

  • validated_purchases_arr: unknown[] — Newly seen validated purchases.

create_api_validate_subscription_apple_request(persist_bool: boolean, receipt_str: string)U

Parameters

  • persist_bool: boolean — Persist the subscription.
  • receipt_str: string — Base64 encoded Apple receipt data payload.

create_api_validate_subscription_google_request(persist_bool: boolean, receipt_str: string)U

Parameters

  • persist_bool: boolean — Persist the subscription.
  • receipt_str: string — JSON encoded Google purchase payload.

create_api_validate_subscription_response(validated_subscription_api_validated_subscription: unknown)U

Validate Subscription response.

Parameters

  • validated_subscription_api_validated_subscription: unknown

create_api_validated_purchase(create_time_str: string, environment_api_store_environment: unknown, product_id_str: string, provider_response_str: string, purchase_time_str: string, refund_time_str: string, seen_before_bool: boolean, store_api_store_provider: unknown, transaction_id_str: string, update_time_str: string, user_id_str: string)U

Validated Purchase stored by Nakama.

Parameters

  • create_time_str: string — Timestamp when the receipt validation was stored in DB.
  • environment_api_store_environment: unknown — Whether the purchase was done in production or sandbox environment.
  • product_id_str: string — Purchase Product ID.
  • provider_response_str: string — Raw provider validation response.
  • purchase_time_str: string — Timestamp when the purchase was done.
  • refund_time_str: string
  • seen_before_bool: boolean — Whether the purchase had already been validated by Nakama before.
  • store_api_store_provider: unknown
  • transaction_id_str: string — Purchase Transaction ID.
  • update_time_str: string — Timestamp when the receipt validation was updated in DB.
  • user_id_str: string — Purchase User ID.

create_api_validated_subscription(active_bool: boolean, create_time_str: string, environment_api_store_environment: unknown, expiry_time_str: string, original_transaction_id_str: string, product_id_str: string, provider_notification_str: string, provider_response_str: string, purchase_time_str: string, refund_time_str: string, store_api_store_provider: unknown, update_time_str: string, user_id_str: string)U

Parameters

  • active_bool: boolean — Whether the subscription is currently active or not.
  • create_time_str: string — UNIX Timestamp when the receipt validation was stored in DB.
  • environment_api_store_environment: unknown — Whether the purchase was done in production or sandbox environment.
  • expiry_time_str: string — Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
  • original_transaction_id_str: string — Purchase Original transaction ID (we only keep track of the original subscription, not subsequent renewals).
  • product_id_str: string — Purchase Product ID.
  • provider_notification_str: string — Raw provider notification body.
  • provider_response_str: string — Raw provider validation response body.
  • purchase_time_str: string — UNIX Timestamp when the purchase was done.
  • refund_time_str: string — Subscription refund time. If this time is set, the subscription was refunded.
  • store_api_store_provider: unknown
  • update_time_str: string — UNIX Timestamp when the receipt validation was updated in DB.
  • user_id_str: string — Subscription User ID.

create_api_write_storage_object(collection_str: string, key_str: string, permission_read_int: number, permission_write_int: number, value_str: string, version_str: string)U

The object to store.

Parameters

  • collection_str: string — The collection to store the object.
  • key_str: string — The key for the object within the collection.
  • permission_read_int: number — The read access permissions for the object.
  • permission_write_int: number — The write access permissions for the object.
  • value_str: string — The value of the object.
  • version_str: string — The version hash of the object to check. Possible values are: ["", "*", "#hash#"].

create_api_write_storage_objects_request(objects_arr: unknown[])U

Write objects to the storage engine.

Parameters

  • objects_arr: unknown[] — The objects to store on the server.

create_protobuf_any(type_str: string)

Parameters

  • type_str: string

create_rpc_status(code_int: number, details_arr: unknown[], message_str: string)

Parameters

  • code_int: number
  • details_arr: unknown[]
  • message_str: string

healthcheck(client: Client, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

A healthcheck which load balancers can use to check the service.

Parameters

  • client: Client — Client.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

delete_account(client: Client, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Delete the current user's account.

Parameters

  • client: Client — Client.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

get_account(client: Client, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Fetch the current user's account.

Parameters

  • client: Client — Client.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

update_account(client: Client, avatarUrl: string, displayName: string, langTag: string, location: string, timezone: string, username: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Update fields in the current user's account.

Parameters

  • client: Client — Client.
  • avatarUrl: string — A URL for an avatar image.
  • displayName: string — The display name of the user.
  • langTag: string — The language expected to be a tag which follows the BCP-47 spec.
  • location: string — The location set by the user.
  • timezone: string — The timezone set by the user.
  • username: string — The username of the user's account.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

authenticate_apple(client: Client, token: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Authenticate a user with an Apple ID against the server.

Parameters

  • client: Client — Client.
  • token: string — The ID token received from Apple to validate.
  • vars: unknown — Extra information that will be bundled in the session token.
  • create_bool: boolean — Register the account if the user does not already exist.
  • username_str: string — Set the username on the account at register. Must be unique.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

authenticate_custom(client: Client, id: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken): SessionU

Authenticate a user with a custom id against the server.

Parameters

  • client: Client — Client.
  • id: string — A custom identifier.
  • vars: unknown — Extra information that will be bundled in the session token.
  • create_bool: boolean — Register the account if the user does not already exist.
  • username_str: string — Set the username on the account at register. Must be unique.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Returns

  • Session — The result.

authenticate_device(client: Client, id: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Authenticate a user with a device id against the server.

Parameters

  • client: Client — Client.
  • id: string — A device identifier. Should be obtained by a platform-specific device API.
  • vars: unknown — Extra information that will be bundled in the session token.
  • create_bool: boolean — Register the account if the user does not already exist.
  • username_str: string — Set the username on the account at register. Must be unique.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

authenticate_email(client: Client, email: string, password: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Authenticate a user with an email+password against the server.

Parameters

  • client: Client — Client.
  • email: string — A valid RFC-5322 email address.
  • password: string — A password for the user account.
  • vars: unknown — Extra information that will be bundled in the session token.
  • create_bool: boolean — Register the account if the user does not already exist.
  • username_str: string — Set the username on the account at register. Must be unique.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

authenticate_facebook(client: Client, token: string, vars: unknown, create_bool: boolean, username_str: string, sync_bool: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Authenticate a user with a Facebook OAuth token against the server.

Parameters

  • client: Client — Client.
  • token: string — The OAuth token received from Facebook to access their profile API.
  • vars: unknown — Extra information that will be bundled in the session token.
  • create_bool: boolean — Register the account if the user does not already exist.
  • username_str: string — Set the username on the account at register. Must be unique.
  • sync_bool: boolean — Import Facebook friends for the user.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

authenticate_facebook_instant_game(client: Client, signedPlayerInfo: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Authenticate a user with a Facebook Instant Game token against the server.

Parameters

  • client: Client — Client.
  • signedPlayerInfo: string
  • vars: unknown — Extra information that will be bundled in the session token.
  • create_bool: boolean — Register the account if the user does not already exist.
  • username_str: string — Set the username on the account at register. Must be unique.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

authenticate_game_center(client: Client, bundleId: string, playerId: string, publicKeyUrl: string, salt: string, signature: string, timestampSeconds: number, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Authenticate a user with Apple's GameCenter against the server.

Parameters

  • client: Client — Client.
  • bundleId: string — Bundle ID (generated by GameCenter).
  • playerId: string — Player ID (generated by GameCenter).
  • publicKeyUrl: string — The URL for the public encryption key.
  • salt: string — A random "NSString" used to compute the hash and keep it randomized.
  • signature: string — The verification signature data generated.
  • timestampSeconds: number — Time since UNIX epoch when the signature was created.
  • vars: unknown — Extra information that will be bundled in the session token.
  • create_bool: boolean — Register the account if the user does not already exist.
  • username_str: string — Set the username on the account at register. Must be unique.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

authenticate_google(client: Client, token: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Authenticate a user with Google against the server.

Parameters

  • client: Client — Client.
  • token: string — The OAuth token received from Google to access their profile API.
  • vars: unknown — Extra information that will be bundled in the session token.
  • create_bool: boolean — Register the account if the user does not already exist.
  • username_str: string — Set the username on the account at register. Must be unique.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

authenticate_steam(client: Client, token: string, vars: unknown, create_bool: boolean, username_str: string, sync_bool: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Authenticate a user with Steam against the server.

Parameters

  • client: Client — Client.
  • token: string — The account token received from Steam to access their profile API.
  • vars: unknown — Extra information that will be bundled in the session token.
  • create_bool: boolean — Register the account if the user does not already exist.
  • username_str: string — Set the username on the account at register. Must be unique.
  • sync_bool: boolean — Import Steam friends for the user.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Add an Apple ID to the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • token: string — The ID token received from Apple to validate.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Add a custom ID to the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • id: string — A custom identifier.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Add a device ID to the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • id: string — A device identifier. Should be obtained by a platform-specific device API.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Add an email+password to the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • email: string — A valid RFC-5322 email address.
  • password: string — A password for the user account.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Add Facebook to the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • token: string — The OAuth token received from Facebook to access their profile API.
  • vars: unknown — Extra information that will be bundled in the session token.
  • sync_bool: boolean — Import Facebook friends for the user.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Add Facebook Instant Game to the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • signedPlayerInfo: string
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Add Apple's GameCenter to the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • bundleId: string — Bundle ID (generated by GameCenter).
  • playerId: string — Player ID (generated by GameCenter).
  • publicKeyUrl: string — The URL for the public encryption key.
  • salt: string — A random "NSString" used to compute the hash and keep it randomized.
  • signature: string — The verification signature data generated.
  • timestampSeconds: number — Time since UNIX epoch when the signature was created.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Add Google to the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • token: string — The OAuth token received from Google to access their profile API.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Add Steam to the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • account: unknown — The Facebook account details.
  • sync: boolean — Import Steam friends for the user.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

session_refresh(client: Client, token: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Refresh a user's session using a refresh token retrieved from a previous authentication request.

Parameters

  • client: Client — Client.
  • token: string — Refresh token.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Remove the Apple ID from the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • token: string — The ID token received from Apple to validate.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Remove the custom ID from the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • id: string — A custom identifier.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Remove the device ID from the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • id: string — A device identifier. Should be obtained by a platform-specific device API.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Remove the email+password from the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • email: string — A valid RFC-5322 email address.
  • password: string — A password for the user account.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Remove Facebook from the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • token: string — The OAuth token received from Facebook to access their profile API.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Remove Facebook Instant Game profile from the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • signedPlayerInfo: string
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Remove Apple's GameCenter from the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • bundleId: string — Bundle ID (generated by GameCenter).
  • playerId: string — Player ID (generated by GameCenter).
  • publicKeyUrl: string — The URL for the public encryption key.
  • salt: string — A random "NSString" used to compute the hash and keep it randomized.
  • signature: string — The verification signature data generated.
  • timestampSeconds: number — Time since UNIX epoch when the signature was created.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Remove Google from the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • token: string — The OAuth token received from Google to access their profile API.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

Remove Steam from the social profiles on the current user's account.

Parameters

  • client: Client — Client.
  • token: string — The account token received from Steam to access their profile API.
  • vars?: unknown — Extra information that will be bundled in the session token.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_channel_messages(client: Client, channel_id_str: string, limit_int: number, forward_bool: boolean, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List a channel's message history.

Parameters

  • client: Client — Client.
  • channel_id_str: string — The channel ID to list from.
  • limit_int: number — Max number of records to return. Between 1 and 100.
  • forward_bool: boolean — True if listing should be older messages to newer, false if reverse.
  • cursor_str: string — A pagination cursor, if any.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

event(client: Client, external: boolean, name: string, properties: unknown, timestamp: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Submit an event for processing in the server's registered runtime custom events handler.

Parameters

  • client: Client — Client.
  • external: boolean — True if the event came directly from a client call, false otherwise.
  • name: string — An event name, type, category, or identifier.
  • properties: unknown — Arbitrary event property values.
  • timestamp: string — The time when the event was triggered.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

delete_friends(client: Client, ids_arr: unknown[], usernames_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Delete one or more users by ID or username.

Parameters

  • client: Client — Client.
  • ids_arr: unknown[] — The account id of a user.
  • usernames_arr: unknown[] — The account username of a user.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_friends(client: Client, limit_int: number, state_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List all friends for the current user.

Parameters

  • client: Client — Client.
  • limit_int: number — Max number of records to return. Between 1 and 100.
  • state_int: number — The friend state to list.
  • cursor_str: string — An optional next page cursor.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

add_friends(client: Client, ids_arr: unknown[], usernames_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Add friends by ID or username to a user's account.

Parameters

  • client: Client — Client.
  • ids_arr: unknown[] — The account id of a user.
  • usernames_arr: unknown[] — The account username of a user.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

block_friends(client: Client, ids_arr: unknown[], usernames_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Block one or more users by ID or username.

Parameters

  • client: Client — Client.
  • ids_arr: unknown[] — The account id of a user.
  • usernames_arr: unknown[] — The account username of a user.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

import_facebook_friends(client: Client, token: string, vars: unknown, reset_bool: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Import Facebook friends and add them to a user's account.

Parameters

  • client: Client — Client.
  • token: string — The OAuth token received from Facebook to access their profile API.
  • vars: unknown — Extra information that will be bundled in the session token.
  • reset_bool: boolean — Reset the current user's friends list.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

import_steam_friends(client: Client, token: string, vars: unknown, reset_bool: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Import Steam friends and add them to a user's account.

Parameters

  • client: Client — Client.
  • token: string — The account token received from Steam to access their profile API.
  • vars: unknown — Extra information that will be bundled in the session token.
  • reset_bool: boolean — Reset the current user's friends list.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_groups(client: Client, name_str: string, cursor_str: string, limit_int: number, lang_tag_str: string, members_int: number, open_bool: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List groups based on given filters.

Parameters

  • client: Client — Client.
  • name_str: string — List groups that contain this value in their names.
  • cursor_str: string — Optional pagination cursor.
  • limit_int: number — Max number of groups to return. Between 1 and 100.
  • lang_tag_str: string — Language tag filter
  • members_int: number — Number of group members
  • open_bool: boolean — Optional Open/Closed filter.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

create_group(client: Client, avatarUrl: string, description: string, langTag: string, maxCount: number, name: string, open: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Create a new group with the current user as the owner.

Parameters

  • client: Client — Client.
  • avatarUrl: string — A URL for an avatar image.
  • description: string — A description for the group.
  • langTag: string — The language expected to be a tag which follows the BCP-47 spec.
  • maxCount: number — Maximum number of group members.
  • name: string — A unique name for the group.
  • open: boolean — Mark a group as open or not where only admins can accept members.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

delete_group(client: Client, group_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Delete a group by ID.

Parameters

  • client: Client — Client.
  • group_id_str: string — The id of a group.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

update_group(client: Client, group_id_str: string, body: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Update fields in a given group.

Parameters

  • client: Client — Client.
  • group_id_str: string — The ID of the group to update.
  • body: unknown
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

add_group_users(client: Client, group_id_str: string, user_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Add users to a group.

Parameters

  • client: Client — Client.
  • group_id_str: string — The group to add users to.
  • user_ids_arr: unknown[] — The users to add.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

ban_group_users(client: Client, group_id_str: string, user_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Ban a set of users from a group.

Parameters

  • client: Client — Client.
  • group_id_str: string — The group to ban users from.
  • user_ids_arr: unknown[] — The users to ban.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

demote_group_users(client: Client, group_id_str: string, user_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Demote a set of users in a group to the next role down.

Parameters

  • client: Client — Client.
  • group_id_str: string — The group ID to demote in.
  • user_ids_arr: unknown[] — The users to demote.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

join_group(client: Client, group_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Immediately join an open group, or request to join a closed one.

Parameters

  • client: Client — Client.
  • group_id_str: string — The group ID to join. The group must already exist.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

kick_group_users(client: Client, group_id_str: string, user_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Kick a set of users from a group.

Parameters

  • client: Client — Client.
  • group_id_str: string — The group ID to kick from.
  • user_ids_arr: unknown[] — The users to kick.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

leave_group(client: Client, group_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Leave a group the user is a member of.

Parameters

  • client: Client — Client.
  • group_id_str: string — The group ID to leave.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

promote_group_users(client: Client, group_id_str: string, user_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Promote a set of users in a group to the next role up.

Parameters

  • client: Client — Client.
  • group_id_str: string — The group ID to promote in.
  • user_ids_arr: unknown[] — The users to promote.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_group_users(client: Client, group_id_str: string, limit_int: number, state_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List all users that are part of a group.

Parameters

  • client: Client — Client.
  • group_id_str: string — The group ID to list from.
  • limit_int: number — Max number of records to return. Between 1 and 100.
  • state_int: number — The group user state to list.
  • cursor_str: string — An optional next page cursor.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

validate_purchase_apple(client: Client, persist: boolean, receipt: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Validate Apple IAP Receipt

Parameters

  • client: Client — Client.
  • persist: boolean
  • receipt: string — Base64 encoded Apple receipt data payload.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

validate_purchase_facebook_instant(client: Client, persist: boolean, signedRequest: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Validate FB Instant IAP Receipt

Parameters

  • client: Client — Client.
  • persist: boolean
  • signedRequest: string — Base64 encoded Facebook Instant signedRequest receipt data payload.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

validate_purchase_google(client: Client, persist: boolean, purchase: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Validate Google IAP Receipt

Parameters

  • client: Client — Client.
  • persist: boolean
  • purchase: string — JSON encoded Google purchase payload.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

validate_purchase_huawei(client: Client, persist: boolean, purchase: string, signature: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Validate Huawei IAP Receipt

Parameters

  • client: Client — Client.
  • persist: boolean
  • purchase: string — JSON encoded Huawei InAppPurchaseData.
  • signature: string — InAppPurchaseData signature.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_subscriptions(client: Client, cursor: string, limit: number, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List user's subscriptions.

Parameters

  • client: Client — Client.
  • cursor: string
  • limit: number
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

validate_subscription_apple(client: Client, persist: boolean, receipt: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Validate Apple Subscription Receipt

Parameters

  • client: Client — Client.
  • persist: boolean — Persist the subscription.
  • receipt: string — Base64 encoded Apple receipt data payload.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

validate_subscription_google(client: Client, persist: boolean, receipt: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Validate Google Subscription Receipt

Parameters

  • client: Client — Client.
  • persist: boolean — Persist the subscription.
  • receipt: string — JSON encoded Google purchase payload.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

get_subscription(client: Client, product_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Get subscription by product id.

Parameters

  • client: Client — Client.
  • product_id_str: string — Product id of the subscription
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

delete_leaderboard_record(client: Client, leaderboard_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Delete a leaderboard record.

Parameters

  • client: Client — Client.
  • leaderboard_id_str: string — The leaderboard ID to delete from.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_leaderboard_records(client: Client, leaderboard_id_str: string, owner_ids_arr: unknown[], limit_int: number, cursor_str: string, expiry_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List leaderboard records.

Parameters

  • client: Client — Client.
  • leaderboard_id_str: string — The ID of the leaderboard to list for.
  • owner_ids_arr: unknown[] — One or more owners to retrieve records for.
  • limit_int: number — Max number of records to return. Between 1 and 100.
  • cursor_str: string — A next or previous page cursor.
  • expiry_str: string — Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

write_leaderboard_record(client: Client, leaderboard_id_str: string, metadata: string, operator: unknown, score: string, subscore: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Write a record to a leaderboard.

Parameters

  • client: Client — Client.
  • leaderboard_id_str: string — The ID of the leaderboard to write to.
  • metadata: string — Optional record metadata.
  • operator: unknown — Operator override.
  • score: string — The score value to submit.
  • subscore: string — An optional secondary value.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_leaderboard_records_around_owner(client: Client, leaderboard_id_str: string, owner_id_str: string, limit_int: number, expiry_str: string, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List leaderboard records that belong to a user.

Parameters

  • client: Client — Client.
  • leaderboard_id_str: string — The ID of the tournament to list for.
  • owner_id_str: string — The owner to retrieve records around.
  • limit_int: number — Max number of records to return. Between 1 and 100.
  • expiry_str: string — Expiry in seconds (since epoch) to begin fetching records from.
  • cursor_str: string — A next or previous page cursor.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_matches(client: Client, limit_int: number, authoritative_bool: boolean, label_str: string, min_size_int: number, max_size_int: number, query_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Fetch list of running matches.

Parameters

  • client: Client — Client.
  • limit_int: number — Limit the number of returned matches.
  • authoritative_bool: boolean — Authoritative or relayed matches.
  • label_str: string — Label filter.
  • min_size_int: number — Minimum user count.
  • max_size_int: number — Maximum user count.
  • query_str: string — Arbitrary label query.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

delete_notifications(client: Client, ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Delete one or more notifications for the current user.

Parameters

  • client: Client — Client.
  • ids_arr: unknown[] — The id of notifications.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_notifications(client: Client, limit_int: number, cacheable_cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Fetch list of notifications.

Parameters

  • client: Client — Client.
  • limit_int: number — The number of notifications to get. Between 1 and 100.
  • cacheable_cursor_str: string — A cursor to page through notifications. May be cached by clients to get from point in time forwards.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

rpc_func2(client: Client, id_str: string, payload_str: string, http_key_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Execute a Lua function on the server.

Parameters

  • client: Client — Client.
  • id_str: string — The identifier of the function.
  • payload_str: string — The payload of the function which must be a JSON object.
  • http_key_str: string — The authentication key used when executed as a non-client HTTP request.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

rpc_func(client: Client, id_str: string, payload: string, http_key_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Execute a Lua function on the server.

Parameters

  • client: Client — Client.
  • id_str: string — The identifier of the function.
  • payload: string — The payload of the function which must be a JSON object.
  • http_key_str: string — The authentication key used when executed as a non-client HTTP request.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

session_logout(client: Client, refreshToken: string, token: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.

Parameters

  • client: Client — Client.
  • refreshToken: string — Refresh token to invalidate.
  • token: string — Session token to log out.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

read_storage_objects(client: Client, objectIds: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Get storage objects.

Parameters

  • client: Client — Client.
  • objectIds: unknown[] — Batch of storage objects.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

write_storage_objects(client: Client, objects: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Write objects into the storage engine.

Parameters

  • client: Client — Client.
  • objects: unknown[] — The objects to store on the server.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

delete_storage_objects(client: Client, objectIds: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Delete one or more objects by ID or username.

Parameters

  • client: Client — Client.
  • objectIds: unknown[] — Batch of storage objects.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_storage_objects(client: Client, collection_str: string, user_id_str: string, limit_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List publicly readable storage objects in a given collection.

Parameters

  • client: Client — Client.
  • collection_str: string — The collection which stores the object.
  • user_id_str: string — ID of the user.
  • limit_int: number — The number of storage objects to list. Between 1 and 100.
  • cursor_str: string — The cursor to page through results from.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_storage_objects2(client: Client, collection_str: string, user_id_str: string, limit_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List publicly readable storage objects in a given collection.

Parameters

  • client: Client — Client.
  • collection_str: string — The collection which stores the object.
  • user_id_str: string — ID of the user.
  • limit_int: number — The number of storage objects to list. Between 1 and 100.
  • cursor_str: string — The cursor to page through results from.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_tournaments(client: Client, category_start_int: number, category_end_int: number, start_time_int: number, end_time_int: number, limit_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List current or upcoming tournaments.

Parameters

  • client: Client — Client.
  • category_start_int: number — The start of the categories to include. Defaults to 0.
  • category_end_int: number — The end of the categories to include. Defaults to 128.
  • start_time_int: number — The start time for tournaments. Defaults to epoch.
  • end_time_int: number — The end time for tournaments. Defaults to +1 year from current Unix time.
  • limit_int: number — Max number of records to return. Between 1 and 100.
  • cursor_str: string — A next page cursor for listings (optional).
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

delete_tournament_record(client: Client, tournament_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Delete a tournament record.

Parameters

  • client: Client — Client.
  • tournament_id_str: string — The tournament ID to delete from.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_tournament_records(client: Client, tournament_id_str: string, owner_ids_arr: unknown[], limit_int: number, cursor_str: string, expiry_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List tournament records.

Parameters

  • client: Client — Client.
  • tournament_id_str: string — The ID of the tournament to list for.
  • owner_ids_arr: unknown[] — One or more owners to retrieve records for.
  • limit_int: number — Max number of records to return. Between 1 and 100.
  • cursor_str: string — A next or previous page cursor.
  • expiry_str: string — Expiry in seconds (since epoch) to begin fetching records from.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

write_tournament_record2(client: Client, tournament_id_str: string, metadata: string, operator: unknown, score: string, subscore: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Write a record to a tournament.

Parameters

  • client: Client — Client.
  • tournament_id_str: string — The tournament ID to write the record for.
  • metadata: string — A JSON object of additional properties (optional).
  • operator: unknown — Operator override.
  • score: string — The score value to submit.
  • subscore: string — An optional secondary value.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

write_tournament_record(client: Client, tournament_id_str: string, metadata: string, operator: unknown, score: string, subscore: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Write a record to a tournament.

Parameters

  • client: Client — Client.
  • tournament_id_str: string — The tournament ID to write the record for.
  • metadata: string — A JSON object of additional properties (optional).
  • operator: unknown — Operator override.
  • score: string — The score value to submit.
  • subscore: string — An optional secondary value.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

join_tournament(client: Client, tournament_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Attempt to join an open and running tournament.

Parameters

  • client: Client — Client.
  • tournament_id_str: string — The ID of the tournament to join. The tournament must already exist.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_tournament_records_around_owner(client: Client, tournament_id_str: string, owner_id_str: string, limit_int: number, expiry_str: string, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List tournament records for a given owner.

Parameters

  • client: Client — Client.
  • tournament_id_str: string — The ID of the tournament to list for.
  • owner_id_str: string — The owner to retrieve records around.
  • limit_int: number — Max number of records to return. Between 1 and 100.
  • expiry_str: string — Expiry in seconds (since epoch) to begin fetching records from.
  • cursor_str: string — A next or previous page cursor.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

get_users(client: Client, ids_arr: unknown[], usernames_arr: unknown[], facebook_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

Fetch zero or more users by ID and/or username.

Parameters

  • client: Client — Client.
  • ids_arr: unknown[] — The account id of a user.
  • usernames_arr: unknown[] — The account username of a user.
  • facebook_ids_arr: unknown[] — The Facebook ID of a user.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

list_user_groups(client: Client, user_id_str: string, limit_int: number, state_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)U

List groups the current user belongs to.

Parameters

  • client: Client — Client.
  • user_id_str: string — ID of the user.
  • limit_int: number — Max number of records to return. Between 1 and 100.
  • state_int: number — The user group state to list.
  • cursor_str: string — An optional next page cursor.
  • callback?: (result: unknown) => void — Optional callback function A coroutine is used and the result is returned if no callback function is provided.
  • retry_policy?: RetryPolicy — Optional retry policy used specifically for this call or nil
  • cancellation_token?: CancellationToken — Optional cancellation token for this call

create_client(config: ClientConfig): ClientU

Create a Nakama client instance.

Parameters

  • config: ClientConfig — A table of configuration options. config.engine - Engine specific implementations. config.host config.port config.timeout config.use_ssl - Use secure or non-secure sockets. config.bearer_token config.username config.password

Returns

  • Client — Nakama Client instance.

create_socket(client: Client): unknownU

Create a Nakama socket.

Parameters

  • client: Client — The client to create the socket for.

Returns

  • unknown — Socket instance.

set_bearer_token(client: Client, token: SessionToken)U

Set Nakama client bearer token.

Parameters

  • client: Client — Nakama client.
  • token: SessionToken

Variables

APIOPERATOR_NO_OVERRIDE: "NO_OVERRIDE"

Operator that can be used to override the one set in the leaderboard.

  • NO_OVERRIDE: Do not override the leaderboard operator.
  • BEST: Override the leaderboard operator with BEST.
  • SET: Override the leaderboard operator with SET.
  • INCREMENT: Override the leaderboard operator with INCREMENT.
  • DECREMENT: Override the leaderboard operator with DECREMENT.

APIOPERATOR_BEST: "BEST"

APIOPERATOR_SET: "SET"

APIOPERATOR_INCREMENT: "INCREMENT"

APIOPERATOR_DECREMENT: "DECREMENT"

APISTOREENVIRONMENT_UNKNOWN: "UNKNOWN"

  • UNKNOWN: Unknown environment.
  • SANDBOX: Sandbox/test environment.
  • PRODUCTION: Production environment.

APISTOREENVIRONMENT_SANDBOX: "SANDBOX"

APISTOREENVIRONMENT_PRODUCTION: "PRODUCTION"

APISTOREPROVIDER_APPLE_APP_STORE: "APPLE_APP_STORE"

  • APPLE_APP_STORE: Apple App Store
  • GOOGLE_PLAY_STORE: Google Play Store
  • HUAWEI_APP_GALLERY: Huawei App Gallery
  • FACEBOOK_INSTANT_STORE: Facebook Instant Store

APISTOREPROVIDER_GOOGLE_PLAY_STORE: "GOOGLE_PLAY_STORE"

APISTOREPROVIDER_FACEBOOK_INSTANT_STORE: "FACEBOOK_INSTANT_STORE"

Types

type Client = symbol

type SessionToken = symbol

type RetryPolicy = symbol

CancellationToken

CancellationToken.cancel(this: void)

Parameters

  • this: void

CancellationToken.cancelled: boolean

Session

Session.token: SessionToken

Session.refresh_token: SessionToken

Session.created: boolean

ClientConfig

ClientConfig.host: string

ClientConfig.port: number

ClientConfig.use_ssl?: boolean

ClientConfig.username: string

ClientConfig.password: string

ClientConfig.engine: unknown

On this page

Functionscancel(token: CancellationToken)cancellation_token(): CancellationTokensync(fn: () => void, cancellation_token?: CancellationToken)create_group_user_list_group_user(state_int: number, user_api_user: unknown)create_user_group_list_user_group(group_api_group: unknown, state_int: number)create_write_leaderboard_record_request_leaderboard_record_write(metadata_str: string, operator_api_operator: unknown, score_str: string, subscore_str: string)create_write_tournament_record_request_tournament_record_write(metadata_str: string, operator_api_operator: unknown, score_str: string, subscore_str: string)create_api_account(custom_id_str: string, devices_arr: unknown[], disable_time_str: string, email_str: string, user_api_user: unknown, verify_time_str: string, wallet_str: string)create_api_account_apple(token_str: string, vars_obj: unknown)create_api_account_custom(id_str: string, vars_obj: unknown): { id: string; vars: unknown; }create_api_account_device(id_str: string, vars_obj: unknown)create_api_account_email(email_str: string, password_str: string, vars_obj: unknown)create_api_account_facebook(token_str: string, vars_obj: unknown)create_api_account_facebook_instant_game(signed_player_info_str: string, vars_obj: unknown)create_api_account_game_center(bundle_id_str: string, player_id_str: string, public_key_url_str: string, salt_str: string, signature_str: string, timestamp_seconds_str: string, vars_obj: unknown)create_api_account_google(token_str: string, vars_obj: unknown)create_api_account_steam(token_str: string, vars_obj: unknown)create_api_channel_message(channel_id_str: string, code_int: number, content_str: string, create_time_str: string, group_id_str: string, message_id_str: string, persistent_bool: boolean, room_name_str: string, sender_id_str: string, update_time_str: string, user_id_one_str: string, user_id_two_str: string, username_str: string)create_api_channel_message_list(cacheable_cursor_str: string, messages_arr: unknown[], next_cursor_str: string, prev_cursor_str: string)create_api_create_group_request(avatar_url_str: string, description_str: string, lang_tag_str: string, max_count_int: number, name_str: string, open_bool: boolean)create_api_delete_storage_object_id(collection_str: string, key_str: string, version_str: string)create_api_delete_storage_objects_request(object_ids_arr: unknown[])create_api_event(external_bool: boolean, name_str: string, properties_obj: unknown, timestamp_str: string)create_api_friend(state_int: number, update_time_str: string, user_api_user: unknown)create_api_friend_list(cursor_str: string, friends_arr: unknown[])create_api_group(avatar_url_str: string, create_time_str: string, creator_id_str: string, description_str: string, edge_count_int: number, id_str: string, lang_tag_str: string, max_count_int: number, metadata_str: string, name_str: string, open_bool: boolean, update_time_str: string)create_api_group_list(cursor_str: string, groups_arr: unknown[])create_api_group_user_list(cursor_str: string, group_users_arr: unknown[])create_api_leaderboard_record(create_time_str: string, expiry_time_str: string, leaderboard_id_str: string, max_num_score_int: number, metadata_str: string, num_score_int: number, owner_id_str: string, rank_str: string, score_str: string, subscore_str: string, update_time_str: string, username_str: string)create_api_leaderboard_record_list(next_cursor_str: string, owner_records_arr: unknown[], prev_cursor_str: string, rank_count_str: string, records_arr: unknown[])create_api_link_steam_request(account_api_account_steam: unknown, sync_bool: boolean)create_api_list_subscriptions_request(cursor_str: string, limit_int: number)create_api_match(authoritative_bool: boolean, handler_name_str: string, label_str: string, match_id_str: string, size_int: number, tick_rate_int: number)create_api_match_list(matches_arr: unknown[])create_api_notification(code_int: number, content_str: string, create_time_str: string, id_str: string, persistent_bool: boolean, sender_id_str: string, subject_str: string)create_api_notification_list(cacheable_cursor_str: string, notifications_arr: unknown[])create_api_read_storage_object_id(collection_str: string, key_str: string, user_id_str: string)create_api_read_storage_objects_request(object_ids_arr: unknown[])create_api_rpc(http_key_str: string, id_str: string, payload_str: string)create_api_session(created_bool: boolean, refresh_token_str: string, token_str: string)create_api_session_logout_request(refresh_token_str: string, token_str: string)create_api_session_refresh_request(token_str: string, vars_obj: unknown)create_api_storage_object(collection_str: string, create_time_str: string, key_str: string, permission_read_int: number, permission_write_int: number, update_time_str: string, user_id_str: string, value_str: string, version_str: string)create_api_storage_object_ack(collection_str: string, create_time_str: string, key_str: string, update_time_str: string, user_id_str: string, version_str: string)create_api_storage_object_acks(acks_arr: unknown[])create_api_storage_object_list(cursor_str: string, objects_arr: unknown[])create_api_storage_objects(objects_arr: unknown[])create_api_subscription_list(cursor_str: string, prev_cursor_str: string, validated_subscriptions_arr: unknown[])create_api_tournament(authoritative_bool: boolean, can_enter_bool: boolean, category_int: number, create_time_str: string, description_str: string, duration_int: number, end_active_int: number, end_time_str: string, id_str: string, max_num_score_int: number, max_size_int: number, metadata_str: string, next_reset_int: number, operator_api_operator: unknown, prev_reset_int: number, size_int: number, sort_order_int: number, start_active_int: number, start_time_str: string, title_str: string)create_api_tournament_list(cursor_str: string, tournaments_arr: unknown[])create_api_tournament_record_list(next_cursor_str: string, owner_records_arr: unknown[], prev_cursor_str: string, rank_count_str: string, records_arr: unknown[])create_api_update_account_request(avatar_url_str: string, display_name_str: string, lang_tag_str: string, location_str: string, timezone_str: string, username_str: string)create_api_user(apple_id_str: string, avatar_url_str: string, create_time_str: string, display_name_str: string, edge_count_int: number, facebook_id_str: string, facebook_instant_game_id_str: string, gamecenter_id_str: string, google_id_str: string, id_str: string, lang_tag_str: string, location_str: string, metadata_str: string, online_bool: boolean, steam_id_str: string, timezone_str: string, update_time_str: string, username_str: string)create_api_user_group_list(cursor_str: string, user_groups_arr: unknown[])create_api_users(users_arr: unknown[])create_api_validate_purchase_apple_request(persist_bool: boolean, receipt_str: string)create_api_validate_purchase_facebook_instant_request(persist_bool: boolean, signed_request_str: string)create_api_validate_purchase_google_request(persist_bool: boolean, purchase_str: string)create_api_validate_purchase_huawei_request(persist_bool: boolean, purchase_str: string, signature_str: string)create_api_validate_purchase_response(validated_purchases_arr: unknown[])create_api_validate_subscription_apple_request(persist_bool: boolean, receipt_str: string)create_api_validate_subscription_google_request(persist_bool: boolean, receipt_str: string)create_api_validate_subscription_response(validated_subscription_api_validated_subscription: unknown)create_api_validated_purchase(create_time_str: string, environment_api_store_environment: unknown, product_id_str: string, provider_response_str: string, purchase_time_str: string, refund_time_str: string, seen_before_bool: boolean, store_api_store_provider: unknown, transaction_id_str: string, update_time_str: string, user_id_str: string)create_api_validated_subscription(active_bool: boolean, create_time_str: string, environment_api_store_environment: unknown, expiry_time_str: string, original_transaction_id_str: string, product_id_str: string, provider_notification_str: string, provider_response_str: string, purchase_time_str: string, refund_time_str: string, store_api_store_provider: unknown, update_time_str: string, user_id_str: string)create_api_write_storage_object(collection_str: string, key_str: string, permission_read_int: number, permission_write_int: number, value_str: string, version_str: string)create_api_write_storage_objects_request(objects_arr: unknown[])create_protobuf_any(type_str: string)create_rpc_status(code_int: number, details_arr: unknown[], message_str: string)healthcheck(client: Client, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)delete_account(client: Client, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)get_account(client: Client, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)update_account(client: Client, avatarUrl: string, displayName: string, langTag: string, location: string, timezone: string, username: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)authenticate_apple(client: Client, token: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)authenticate_custom(client: Client, id: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken): Sessionauthenticate_device(client: Client, id: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)authenticate_email(client: Client, email: string, password: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)authenticate_facebook(client: Client, token: string, vars: unknown, create_bool: boolean, username_str: string, sync_bool: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)authenticate_facebook_instant_game(client: Client, signedPlayerInfo: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)authenticate_game_center(client: Client, bundleId: string, playerId: string, publicKeyUrl: string, salt: string, signature: string, timestampSeconds: number, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)authenticate_google(client: Client, token: string, vars: unknown, create_bool: boolean, username_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)authenticate_steam(client: Client, token: string, vars: unknown, create_bool: boolean, username_str: string, sync_bool: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)link_apple(client: Client, token: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)link_custom(client: Client, id: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)link_device(client: Client, id: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)link_email(client: Client, email: string, password: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)link_facebook(client: Client, token: string, vars: unknown, sync_bool: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)link_facebook_instant_game(client: Client, signedPlayerInfo: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)link_game_center(client: Client, bundleId: string, playerId: string, publicKeyUrl: string, salt: string, signature: string, timestampSeconds: number, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)link_google(client: Client, token: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)link_steam(client: Client, account: unknown, sync: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)session_refresh(client: Client, token: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)unlink_apple(client: Client, token: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)unlink_custom(client: Client, id: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)unlink_device(client: Client, id: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)unlink_email(client: Client, email: string, password: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)unlink_facebook(client: Client, token: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)unlink_facebook_instant_game(client: Client, signedPlayerInfo: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)unlink_game_center(client: Client, bundleId: string, playerId: string, publicKeyUrl: string, salt: string, signature: string, timestampSeconds: number, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)unlink_google(client: Client, token: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)unlink_steam(client: Client, token: string, vars?: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_channel_messages(client: Client, channel_id_str: string, limit_int: number, forward_bool: boolean, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)event(client: Client, external: boolean, name: string, properties: unknown, timestamp: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)delete_friends(client: Client, ids_arr: unknown[], usernames_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_friends(client: Client, limit_int: number, state_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)add_friends(client: Client, ids_arr: unknown[], usernames_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)block_friends(client: Client, ids_arr: unknown[], usernames_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)import_facebook_friends(client: Client, token: string, vars: unknown, reset_bool: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)import_steam_friends(client: Client, token: string, vars: unknown, reset_bool: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_groups(client: Client, name_str: string, cursor_str: string, limit_int: number, lang_tag_str: string, members_int: number, open_bool: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)create_group(client: Client, avatarUrl: string, description: string, langTag: string, maxCount: number, name: string, open: boolean, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)delete_group(client: Client, group_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)update_group(client: Client, group_id_str: string, body: unknown, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)add_group_users(client: Client, group_id_str: string, user_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)ban_group_users(client: Client, group_id_str: string, user_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)demote_group_users(client: Client, group_id_str: string, user_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)join_group(client: Client, group_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)kick_group_users(client: Client, group_id_str: string, user_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)leave_group(client: Client, group_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)promote_group_users(client: Client, group_id_str: string, user_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_group_users(client: Client, group_id_str: string, limit_int: number, state_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)validate_purchase_apple(client: Client, persist: boolean, receipt: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)validate_purchase_facebook_instant(client: Client, persist: boolean, signedRequest: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)validate_purchase_google(client: Client, persist: boolean, purchase: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)validate_purchase_huawei(client: Client, persist: boolean, purchase: string, signature: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_subscriptions(client: Client, cursor: string, limit: number, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)validate_subscription_apple(client: Client, persist: boolean, receipt: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)validate_subscription_google(client: Client, persist: boolean, receipt: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)get_subscription(client: Client, product_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)delete_leaderboard_record(client: Client, leaderboard_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_leaderboard_records(client: Client, leaderboard_id_str: string, owner_ids_arr: unknown[], limit_int: number, cursor_str: string, expiry_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)write_leaderboard_record(client: Client, leaderboard_id_str: string, metadata: string, operator: unknown, score: string, subscore: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_leaderboard_records_around_owner(client: Client, leaderboard_id_str: string, owner_id_str: string, limit_int: number, expiry_str: string, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_matches(client: Client, limit_int: number, authoritative_bool: boolean, label_str: string, min_size_int: number, max_size_int: number, query_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)delete_notifications(client: Client, ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_notifications(client: Client, limit_int: number, cacheable_cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)rpc_func2(client: Client, id_str: string, payload_str: string, http_key_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)rpc_func(client: Client, id_str: string, payload: string, http_key_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)session_logout(client: Client, refreshToken: string, token: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)read_storage_objects(client: Client, objectIds: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)write_storage_objects(client: Client, objects: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)delete_storage_objects(client: Client, objectIds: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_storage_objects(client: Client, collection_str: string, user_id_str: string, limit_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_storage_objects2(client: Client, collection_str: string, user_id_str: string, limit_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_tournaments(client: Client, category_start_int: number, category_end_int: number, start_time_int: number, end_time_int: number, limit_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)delete_tournament_record(client: Client, tournament_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_tournament_records(client: Client, tournament_id_str: string, owner_ids_arr: unknown[], limit_int: number, cursor_str: string, expiry_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)write_tournament_record2(client: Client, tournament_id_str: string, metadata: string, operator: unknown, score: string, subscore: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)write_tournament_record(client: Client, tournament_id_str: string, metadata: string, operator: unknown, score: string, subscore: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)join_tournament(client: Client, tournament_id_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_tournament_records_around_owner(client: Client, tournament_id_str: string, owner_id_str: string, limit_int: number, expiry_str: string, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)get_users(client: Client, ids_arr: unknown[], usernames_arr: unknown[], facebook_ids_arr: unknown[], callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)list_user_groups(client: Client, user_id_str: string, limit_int: number, state_int: number, cursor_str: string, callback?: (result: unknown) => void, retry_policy?: RetryPolicy, cancellation_token?: CancellationToken)create_client(config: ClientConfig): Clientcreate_socket(client: Client): unknownset_bearer_token(client: Client, token: SessionToken)VariablesAPIOPERATOR_NO_OVERRIDE: "NO_OVERRIDE"APIOPERATOR_BEST: "BEST"APIOPERATOR_SET: "SET"APIOPERATOR_INCREMENT: "INCREMENT"APIOPERATOR_DECREMENT: "DECREMENT"APISTOREENVIRONMENT_UNKNOWN: "UNKNOWN"APISTOREENVIRONMENT_SANDBOX: "SANDBOX"APISTOREENVIRONMENT_PRODUCTION: "PRODUCTION"APISTOREPROVIDER_APPLE_APP_STORE: "APPLE_APP_STORE"APISTOREPROVIDER_GOOGLE_PLAY_STORE: "GOOGLE_PLAY_STORE"APISTOREPROVIDER_HUAWEI_APP_GALLERY: "HUAWEI_APP_GALLERY"APISTOREPROVIDER_FACEBOOK_INSTANT_STORE: "FACEBOOK_INSTANT_STORE"Typestype Client = symboltype SessionToken = symboltype RetryPolicy = symbolCancellationTokenCancellationToken.cancel(this: void)CancellationToken.cancelled: booleanSessionSession.token: SessionTokenSession.refresh_token: SessionTokenSession.created: booleanClientConfigClientConfig.host: stringClientConfig.port: numberClientConfig.use_ssl?: booleanClientConfig.username: stringClientConfig.password: stringClientConfig.engine: unknown