diff --git a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/api/api.d.ts b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/api/api.d.ts index 02dc003..2421b4c 100644 --- a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/api/api.d.ts +++ b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/api/api.d.ts @@ -1,2034 +1,2034 @@ -import _m0 from "protobufjs/minimal"; -export declare const protobufPackage = "nakama.api"; -/** The Nakama server RPC protocol for games and apps. */ -/** Operator that can be used to override the one set in the leaderboard. */ -export declare enum Operator { - /** NO_OVERRIDE - Do not override the leaderboard operator. */ - NO_OVERRIDE = 0, - /** BEST - Override the leaderboard operator with BEST. */ - BEST = 1, - /** SET - Override the leaderboard operator with SET. */ - SET = 2, - /** INCREMENT - Override the leaderboard operator with INCREMENT. */ - INCREMENT = 3, - /** DECREMENT - Override the leaderboard operator with DECREMENT. */ - DECREMENT = 4, - UNRECOGNIZED = -1 -} -export declare function operatorFromJSON(object: any): Operator; -export declare function operatorToJSON(object: Operator): string; -/** A user with additional account details. Always the current user. */ -export interface Account { - /** The user object. */ - user: User | undefined; - /** The user's wallet data. */ - wallet: string; - /** The email address of the user. */ - email: string; - /** The devices which belong to the user's account. */ - devices: AccountDevice[]; - /** The custom id in the user's account. */ - custom_id: string; - /** The UNIX time when the user's email was verified. */ - verify_time: Date | undefined; - /** The UNIX time when the user's account was disabled/banned. */ - disable_time: Date | undefined; -} -/** Obtain a new authentication token using a refresh token. */ -export interface AccountRefresh { - /** Refresh token. */ - token: string; - /** Extra information that will be bundled in the session token. */ - vars: { - [key: string]: string; - }; -} -export interface AccountRefresh_VarsEntry { - key: string; - value: string; -} -/** Send a Apple Sign In token to the server. Used with authenticate/link/unlink. */ -export interface AccountApple { - /** The ID token received from Apple to validate. */ - token: string; - /** Extra information that will be bundled in the session token. */ - vars: { - [key: string]: string; - }; -} -export interface AccountApple_VarsEntry { - key: string; - value: string; -} -/** Send a custom ID to the server. Used with authenticate/link/unlink. */ -export interface AccountCustom { - /** A custom identifier. */ - id: string; - /** Extra information that will be bundled in the session token. */ - vars: { - [key: string]: string; - }; -} -export interface AccountCustom_VarsEntry { - key: string; - value: string; -} -/** Send a device to the server. Used with authenticate/link/unlink and user. */ -export interface AccountDevice { - /** A device identifier. Should be obtained by a platform-specific device API. */ - id: string; - /** Extra information that will be bundled in the session token. */ - vars: { - [key: string]: string; - }; -} -export interface AccountDevice_VarsEntry { - key: string; - value: string; -} -/** Send an email with password to the server. Used with authenticate/link/unlink. */ -export interface AccountEmail { - /** A valid RFC-5322 email address. */ - email: string; - /** A password for the user account. */ - password: string; - /** Extra information that will be bundled in the session token. */ - vars: { - [key: string]: string; - }; -} -export interface AccountEmail_VarsEntry { - key: string; - value: string; -} -/** Send a Facebook token to the server. Used with authenticate/link/unlink. */ -export interface AccountFacebook { - /** The OAuth token received from Facebook to access their profile API. */ - token: string; - /** Extra information that will be bundled in the session token. */ - vars: { - [key: string]: string; - }; -} -export interface AccountFacebook_VarsEntry { - key: string; - value: string; -} -/** Send a Facebook Instant Game token to the server. Used with authenticate/link/unlink. */ -export interface AccountFacebookInstantGame { - /** The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration) */ - signed_player_info: string; - /** Extra information that will be bundled in the session token. */ - vars: { - [key: string]: string; - }; -} -export interface AccountFacebookInstantGame_VarsEntry { - key: string; - value: string; -} -/** Send Apple's Game Center account credentials to the server. Used with authenticate/link/unlink. */ -export interface AccountGameCenter { - /** Player ID (generated by GameCenter). */ - player_id: string; - /** Bundle ID (generated by GameCenter). */ - bundle_id: string; - /** Time since UNIX epoch when the signature was created. */ - timestamp_seconds: number; - /** A random "NSString" used to compute the hash and keep it randomized. */ - salt: string; - /** The verification signature data generated. */ - signature: string; - /** The URL for the public encryption key. */ - public_key_url: string; - /** Extra information that will be bundled in the session token. */ - vars: { - [key: string]: string; - }; -} -export interface AccountGameCenter_VarsEntry { - key: string; - value: string; -} -/** Send a Google token to the server. Used with authenticate/link/unlink. */ -export interface AccountGoogle { - /** The OAuth token received from Google to access their profile API. */ - token: string; - /** Extra information that will be bundled in the session token. */ - vars: { - [key: string]: string; - }; -} -export interface AccountGoogle_VarsEntry { - key: string; - value: string; -} -/** Send a Steam token to the server. Used with authenticate/link/unlink. */ -export interface AccountSteam { - /** The account token received from Steam to access their profile API. */ - token: string; - /** Extra information that will be bundled in the session token. */ - vars: { - [key: string]: string; - }; -} -export interface AccountSteam_VarsEntry { - key: string; - value: string; -} -/** Add one or more friends to the current user. */ -export interface AddFriendsRequest { - /** The account id of a user. */ - ids: string[]; - /** The account username of a user. */ - usernames: string[]; -} -/** Add users to a group. */ -export interface AddGroupUsersRequest { - /** The group to add users to. */ - group_id: string; - /** The users to add. */ - user_ids: string[]; -} -/** Authenticate against the server with a refresh token. */ -export interface SessionRefreshRequest { - /** Refresh token. */ - token: string; - /** Extra information that will be bundled in the session token. */ - vars: { - [key: string]: string; - }; -} -export interface SessionRefreshRequest_VarsEntry { - key: string; - value: string; -} -/** Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user. */ -export interface SessionLogoutRequest { - /** Session token to log out. */ - token: string; - /** Refresh token to invalidate. */ - refresh_token: string; -} -/** Authenticate against the server with Apple Sign In. */ -export interface AuthenticateAppleRequest { - /** The Apple account details. */ - account: AccountApple | undefined; - /** Register the account if the user does not already exist. */ - create: boolean | undefined; - /** Set the username on the account at register. Must be unique. */ - username: string; -} -/** Authenticate against the server with a custom ID. */ -export interface AuthenticateCustomRequest { - /** The custom account details. */ - account: AccountCustom | undefined; - /** Register the account if the user does not already exist. */ - create: boolean | undefined; - /** Set the username on the account at register. Must be unique. */ - username: string; -} -/** Authenticate against the server with a device ID. */ -export interface AuthenticateDeviceRequest { - /** The device account details. */ - account: AccountDevice | undefined; - /** Register the account if the user does not already exist. */ - create: boolean | undefined; - /** Set the username on the account at register. Must be unique. */ - username: string; -} -/** Authenticate against the server with email+password. */ -export interface AuthenticateEmailRequest { - /** The email account details. */ - account: AccountEmail | undefined; - /** Register the account if the user does not already exist. */ - create: boolean | undefined; - /** Set the username on the account at register. Must be unique. */ - username: string; -} -/** Authenticate against the server with Facebook. */ -export interface AuthenticateFacebookRequest { - /** The Facebook account details. */ - account: AccountFacebook | undefined; - /** Register the account if the user does not already exist. */ - create: boolean | undefined; - /** Set the username on the account at register. Must be unique. */ - username: string; - /** Import Facebook friends for the user. */ - sync: boolean | undefined; -} -/** Authenticate against the server with Facebook Instant Game token. */ -export interface AuthenticateFacebookInstantGameRequest { - /** The Facebook Instant Game account details. */ - account: AccountFacebookInstantGame | undefined; - /** Register the account if the user does not already exist. */ - create: boolean | undefined; - /** Set the username on the account at register. Must be unique. */ - username: string; -} -/** Authenticate against the server with Apple's Game Center. */ -export interface AuthenticateGameCenterRequest { - /** The Game Center account details. */ - account: AccountGameCenter | undefined; - /** Register the account if the user does not already exist. */ - create: boolean | undefined; - /** Set the username on the account at register. Must be unique. */ - username: string; -} -/** Authenticate against the server with Google. */ -export interface AuthenticateGoogleRequest { - /** The Google account details. */ - account: AccountGoogle | undefined; - /** Register the account if the user does not already exist. */ - create: boolean | undefined; - /** Set the username on the account at register. Must be unique. */ - username: string; -} -/** Authenticate against the server with Steam. */ -export interface AuthenticateSteamRequest { - /** The Steam account details. */ - account: AccountSteam | undefined; - /** Register the account if the user does not already exist. */ - create: boolean | undefined; - /** Set the username on the account at register. Must be unique. */ - username: string; - /** Import Steam friends for the user. */ - sync: boolean | undefined; -} -/** Ban users from a group. */ -export interface BanGroupUsersRequest { - /** The group to ban users from. */ - group_id: string; - /** The users to ban. */ - user_ids: string[]; -} -/** Block one or more friends for the current user. */ -export interface BlockFriendsRequest { - /** The account id of a user. */ - ids: string[]; - /** The account username of a user. */ - usernames: string[]; -} -/** A message sent on a channel. */ -export interface ChannelMessage { - /** The channel this message belongs to. */ - channel_id: string; - /** The unique ID of this message. */ - message_id: string; - /** The code representing a message type or category. */ - code: number | undefined; - /** Message sender, usually a user ID. */ - sender_id: string; - /** The username of the message sender, if any. */ - username: string; - /** The content payload. */ - content: string; - /** The UNIX time when the message was created. */ - create_time: Date | undefined; - /** The UNIX time when the message was last updated. */ - update_time: Date | undefined; - /** True if the message was persisted to the channel's history, false otherwise. */ - persistent: boolean | undefined; - /** The name of the chat room, or an empty string if this message was not sent through a chat room. */ - room_name: string; - /** The ID of the group, or an empty string if this message was not sent through a group channel. */ - group_id: string; - /** The ID of the first DM user, or an empty string if this message was not sent through a DM chat. */ - user_id_one: string; - /** The ID of the second DM user, or an empty string if this message was not sent through a DM chat. */ - user_id_two: string; -} -/** A list of channel messages, usually a result of a list operation. */ -export interface ChannelMessageList { - /** A list of messages. */ - messages: ChannelMessage[]; - /** The cursor to send when retrieving the next page, if any. */ - next_cursor: string; - /** The cursor to send when retrieving the previous page, if any. */ - prev_cursor: string; - /** Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors. */ - cacheable_cursor: string; -} -/** Create a group with the current user as owner. */ -export interface CreateGroupRequest { - /** A unique name for the group. */ - name: string; - /** A description for the group. */ - description: string; - /** The language expected to be a tag which follows the BCP-47 spec. */ - lang_tag: string; - /** A URL for an avatar image. */ - avatar_url: string; - /** Mark a group as open or not where only admins can accept members. */ - open: boolean; - /** Maximum number of group members. */ - max_count: number; -} -/** Delete one or more friends for the current user. */ -export interface DeleteFriendsRequest { - /** The account id of a user. */ - ids: string[]; - /** The account username of a user. */ - usernames: string[]; -} -/** Delete a group the user has access to. */ -export interface DeleteGroupRequest { - /** The id of a group. */ - group_id: string; -} -/** Delete a leaderboard record. */ -export interface DeleteLeaderboardRecordRequest { - /** The leaderboard ID to delete from. */ - leaderboard_id: string; -} -/** Delete one or more notifications for the current user. */ -export interface DeleteNotificationsRequest { - /** The id of notifications. */ - ids: string[]; -} -/** Storage objects to delete. */ -export interface DeleteStorageObjectId { - /** The collection which stores the object. */ - collection: string; - /** The key of the object within the collection. */ - key: string; - /** The version hash of the object. */ - version: string; -} -/** Batch delete storage objects. */ -export interface DeleteStorageObjectsRequest { - /** Batch of storage objects. */ - object_ids: DeleteStorageObjectId[]; -} -/** Represents an event to be passed through the server to registered event handlers. */ -export interface Event { - /** An event name, type, category, or identifier. */ - name: string; - /** Arbitrary event property values. */ - properties: { - [key: string]: string; - }; - /** The time when the event was triggered. */ - timestamp: Date | undefined; - /** True if the event came directly from a client call, false otherwise. */ - external: boolean; -} -export interface Event_PropertiesEntry { - key: string; - value: string; -} -/** A friend of a user. */ -export interface Friend { - /** The user object. */ - user: User | undefined; - /** The friend status. */ - state: number | undefined; - /** Time of the latest relationship update. */ - update_time: Date | undefined; -} -/** The friendship status. */ -export declare enum Friend_State { - /** FRIEND - The user is a friend of the current user. */ - FRIEND = 0, - /** INVITE_SENT - The current user has sent an invite to the user. */ - INVITE_SENT = 1, - /** INVITE_RECEIVED - The current user has received an invite from this user. */ - INVITE_RECEIVED = 2, - /** BLOCKED - The current user has blocked this user. */ - BLOCKED = 3, - UNRECOGNIZED = -1 -} -export declare function friend_StateFromJSON(object: any): Friend_State; -export declare function friend_StateToJSON(object: Friend_State): string; -/** A collection of zero or more friends of the user. */ -export interface FriendList { - /** The Friend objects. */ - friends: Friend[]; - /** Cursor for the next page of results, if any. */ - cursor: string; -} -/** Fetch a batch of zero or more users from the server. */ -export interface GetUsersRequest { - /** The account id of a user. */ - ids: string[]; - /** The account username of a user. */ - usernames: string[]; - /** The Facebook ID of a user. */ - facebook_ids: string[]; -} -/** A group in the server. */ -export interface Group { - /** The id of a group. */ - id: string; - /** The id of the user who created the group. */ - creator_id: string; - /** The unique name of the group. */ - name: string; - /** A description for the group. */ - description: string; - /** The language expected to be a tag which follows the BCP-47 spec. */ - lang_tag: string; - /** Additional information stored as a JSON object. */ - metadata: string; - /** A URL for an avatar image. */ - avatar_url: string; - /** Anyone can join open groups, otherwise only admins can accept members. */ - open: boolean | undefined; - /** The current count of all members in the group. */ - edge_count: number; - /** The maximum number of members allowed. */ - max_count: number; - /** The UNIX time when the group was created. */ - create_time: Date | undefined; - /** The UNIX time when the group was last updated. */ - update_time: Date | undefined; -} -/** One or more groups returned from a listing operation. */ -export interface GroupList { - /** One or more groups. */ - groups: Group[]; - /** A cursor used to get the next page. */ - cursor: string; -} -/** A list of users belonging to a group, along with their role. */ -export interface GroupUserList { - /** User-role pairs for a group. */ - group_users: GroupUserList_GroupUser[]; - /** Cursor for the next page of results, if any. */ - cursor: string; -} -/** A single user-role pair. */ -export interface GroupUserList_GroupUser { - /** User. */ - user: User | undefined; - /** Their relationship to the group. */ - state: number | undefined; -} -/** The group role status. */ -export declare enum GroupUserList_GroupUser_State { - /** SUPERADMIN - The user is a superadmin with full control of the group. */ - SUPERADMIN = 0, - /** ADMIN - The user is an admin with additional privileges. */ - ADMIN = 1, - /** MEMBER - The user is a regular member. */ - MEMBER = 2, - /** JOIN_REQUEST - The user has requested to join the group */ - JOIN_REQUEST = 3, - UNRECOGNIZED = -1 -} -export declare function groupUserList_GroupUser_StateFromJSON(object: any): GroupUserList_GroupUser_State; -export declare function groupUserList_GroupUser_StateToJSON(object: GroupUserList_GroupUser_State): string; -/** Import Facebook friends into the current user's account. */ -export interface ImportFacebookFriendsRequest { - /** The Facebook account details. */ - account: AccountFacebook | undefined; - /** Reset the current user's friends list. */ - reset: boolean | undefined; -} -/** Import Facebook friends into the current user's account. */ -export interface ImportSteamFriendsRequest { - /** The Facebook account details. */ - account: AccountSteam | undefined; - /** Reset the current user's friends list. */ - reset: boolean | undefined; -} -/** Immediately join an open group, or request to join a closed one. */ -export interface JoinGroupRequest { - /** The group ID to join. The group must already exist. */ - group_id: string; -} -/** The request to join a tournament. */ -export interface JoinTournamentRequest { - /** The ID of the tournament to join. The tournament must already exist. */ - tournament_id: string; -} -/** Kick a set of users from a group. */ -export interface KickGroupUsersRequest { - /** The group ID to kick from. */ - group_id: string; - /** The users to kick. */ - user_ids: string[]; -} -/** A leaderboard on the server. */ -export interface Leaderboard { - /** The ID of the leaderboard. */ - id: string; - /** ASC(0) or DESC(1) sort mode of scores in the leaderboard. */ - sort_order: number; - /** BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard. */ - operator: Operator; - /** The UNIX time when the leaderboard was previously reset. A computed value. */ - prev_reset: number; - /** The UNIX time when the leaderboard is next playable. A computed value. */ - next_reset: number; - /** Additional information stored as a JSON object. */ - metadata: string; - /** The UNIX time when the leaderboard was created. */ - create_time: Date | undefined; - /** Wether the leaderboard was created authoritatively or not. */ - authoritative: boolean; -} -/** A list of leaderboards */ -export interface LeaderboardList { - /** The list of leaderboards returned. */ - leaderboards: Leaderboard[]; - /** A pagination cursor (optional). */ - cursor: string; -} -/** Represents a complete leaderboard record with all scores and associated metadata. */ -export interface LeaderboardRecord { - /** The ID of the leaderboard this score belongs to. */ - leaderboard_id: string; - /** The ID of the score owner, usually a user or group. */ - owner_id: string; - /** The username of the score owner, if the owner is a user. */ - username: string | undefined; - /** The score value. */ - score: number; - /** An optional subscore value. */ - subscore: number; - /** The number of submissions to this score record. */ - num_score: number; - /** Metadata. */ - metadata: string; - /** The UNIX time when the leaderboard record was created. */ - create_time: Date | undefined; - /** The UNIX time when the leaderboard record was updated. */ - update_time: Date | undefined; - /** The UNIX time when the leaderboard record expires. */ - expiry_time: Date | undefined; - /** The rank of this record. */ - rank: number; - /** The maximum number of score updates allowed by the owner. */ - max_num_score: number; -} -/** A set of leaderboard records, may be part of a leaderboard records page or a batch of individual records. */ -export interface LeaderboardRecordList { - /** A list of leaderboard records. */ - records: LeaderboardRecord[]; - /** A batched set of leaderboard records belonging to specified owners. */ - owner_records: LeaderboardRecord[]; - /** The cursor to send when retrieving the next page, if any. */ - next_cursor: string; - /** The cursor to send when retrieving the previous page, if any. */ - prev_cursor: string; -} -/** Leave a group. */ -export interface LeaveGroupRequest { - /** The group ID to leave. */ - group_id: string; -} -/** Link Facebook to the current user's account. */ -export interface LinkFacebookRequest { - /** The Facebook account details. */ - account: AccountFacebook | undefined; - /** Import Facebook friends for the user. */ - sync: boolean | undefined; -} -/** Link Steam to the current user's account. */ -export interface LinkSteamRequest { - /** The Facebook account details. */ - account: AccountSteam | undefined; - /** Import Steam friends for the user. */ - sync: boolean | undefined; -} -/** List a channel's message history. */ -export interface ListChannelMessagesRequest { - /** The channel ID to list from. */ - channel_id: string; - /** Max number of records to return. Between 1 and 100. */ - limit: number | undefined; - /** True if listing should be older messages to newer, false if reverse. */ - forward: boolean | undefined; - /** A pagination cursor, if any. */ - cursor: string; -} -/** List friends for a user. */ -export interface ListFriendsRequest { - /** Max number of records to return. Between 1 and 100. */ - limit: number | undefined; - /** The friend state to list. */ - state: number | undefined; - /** An optional next page cursor. */ - cursor: string; -} -/** List groups based on given filters. */ -export interface ListGroupsRequest { - /** List groups that contain this value in their names. */ - name: string; - /** Optional pagination cursor. */ - cursor: string; - /** Max number of groups to return. Between 1 and 100. */ - limit: number | undefined; - /** Language tag filter */ - lang_tag: string; - /** Number of group members */ - members: number | undefined; - /** Optional Open/Closed filter. */ - open: boolean | undefined; -} -/** List all users that are part of a group. */ -export interface ListGroupUsersRequest { - /** The group ID to list from. */ - group_id: string; - /** Max number of records to return. Between 1 and 100. */ - limit: number | undefined; - /** The group user state to list. */ - state: number | undefined; - /** An optional next page cursor. */ - cursor: string; -} -/** List leaerboard records from a given leaderboard around the owner. */ -export interface ListLeaderboardRecordsAroundOwnerRequest { - /** The ID of the tournament to list for. */ - leaderboard_id: string; - /** Max number of records to return. Between 1 and 100. */ - limit: number | undefined; - /** The owner to retrieve records around. */ - owner_id: string; - /** Expiry in seconds (since epoch) to begin fetching records from. */ - expiry: number | undefined; -} -/** List leaderboard records from a given leaderboard. */ -export interface ListLeaderboardRecordsRequest { - /** The ID of the leaderboard to list for. */ - leaderboard_id: string; - /** One or more owners to retrieve records for. */ - owner_ids: string[]; - /** Max number of records to return. Between 1 and 100. */ - limit: number | undefined; - /** A next or previous page cursor. */ - cursor: string; - /** Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time. */ - expiry: number | undefined; -} -/** List realtime matches. */ -export interface ListMatchesRequest { - /** Limit the number of returned matches. */ - limit: number | undefined; - /** Authoritative or relayed matches. */ - authoritative: boolean | undefined; - /** Label filter. */ - label: string | undefined; - /** Minimum user count. */ - min_size: number | undefined; - /** Maximum user count. */ - max_size: number | undefined; - /** Arbitrary label query. */ - query: string | undefined; -} -/** Get a list of unexpired notifications. */ -export interface ListNotificationsRequest { - /** The number of notifications to get. Between 1 and 100. */ - limit: number | undefined; - /** A cursor to page through notifications. May be cached by clients to get from point in time forwards. */ - cacheable_cursor: string; -} -/** List publicly readable storage objects in a given collection. */ -export interface ListStorageObjectsRequest { - /** ID of the user. */ - user_id: string; - /** The collection which stores the object. */ - collection: string; - /** The number of storage objects to list. Between 1 and 100. */ - limit: number | undefined; - /** The cursor to page through results from. */ - cursor: string; -} -/** List tournament records from a given tournament around the owner. */ -export interface ListTournamentRecordsAroundOwnerRequest { - /** The ID of the tournament to list for. */ - tournament_id: string; - /** Max number of records to return. Between 1 and 100. */ - limit: number | undefined; - /** The owner to retrieve records around. */ - owner_id: string; - /** Expiry in seconds (since epoch) to begin fetching records from. */ - expiry: number | undefined; -} -/** List tournament records from a given tournament. */ -export interface ListTournamentRecordsRequest { - /** The ID of the tournament to list for. */ - tournament_id: string; - /** One or more owners to retrieve records for. */ - owner_ids: string[]; - /** Max number of records to return. Between 1 and 100. */ - limit: number | undefined; - /** A next or previous page cursor. */ - cursor: string; - /** Expiry in seconds (since epoch) to begin fetching records from. */ - expiry: number | undefined; -} -/** List active/upcoming tournaments based on given filters. */ -export interface ListTournamentsRequest { - /** The start of the categories to include. Defaults to 0. */ - category_start: number | undefined; - /** The end of the categories to include. Defaults to 128. */ - category_end: number | undefined; - /** The start time for tournaments. Defaults to epoch. */ - start_time: number | undefined; - /** The end time for tournaments. Defaults to +1 year from current Unix time. */ - end_time: number | undefined; - /** Max number of records to return. Between 1 and 100. */ - limit: number | undefined; - /** A next page cursor for listings (optional). */ - cursor: string; -} -/** List the groups a user is part of, and their relationship to each. */ -export interface ListUserGroupsRequest { - /** ID of the user. */ - user_id: string; - /** Max number of records to return. Between 1 and 100. */ - limit: number | undefined; - /** The user group state to list. */ - state: number | undefined; - /** An optional next page cursor. */ - cursor: string; -} -/** Represents a realtime match. */ -export interface Match { - /** The ID of the match, can be used to join. */ - match_id: string; - /** True if it's an server-managed authoritative match, false otherwise. */ - authoritative: boolean; - /** Match label, if any. */ - label: string | undefined; - /** Current number of users in the match. */ - size: number; - /** Tick Rate */ - tick_rate: number; - /** Handler name */ - handler_name: string; -} -/** A list of realtime matches. */ -export interface MatchList { - /** A number of matches corresponding to a list operation. */ - matches: Match[]; -} -/** A notification in the server. */ -export interface Notification { - /** ID of the Notification. */ - id: string; - /** Subject of the notification. */ - subject: string; - /** Content of the notification in JSON. */ - content: string; - /** Category code for this notification. */ - code: number; - /** ID of the sender, if a user. Otherwise 'null'. */ - sender_id: string; - /** The UNIX time when the notification was created. */ - create_time: Date | undefined; - /** True if this notification was persisted to the database. */ - persistent: boolean; -} -/** A collection of zero or more notifications. */ -export interface NotificationList { - /** Collection of notifications. */ - notifications: Notification[]; - /** Use this cursor to paginate notifications. Cache this to catch up to new notifications. */ - cacheable_cursor: string; -} -/** Promote a set of users in a group to the next role up. */ -export interface PromoteGroupUsersRequest { - /** The group ID to promote in. */ - group_id: string; - /** The users to promote. */ - user_ids: string[]; -} -/** Demote a set of users in a group to the next role down. */ -export interface DemoteGroupUsersRequest { - /** The group ID to demote in. */ - group_id: string; - /** The users to demote. */ - user_ids: string[]; -} -/** Storage objects to get. */ -export interface ReadStorageObjectId { - /** The collection which stores the object. */ - collection: string; - /** The key of the object within the collection. */ - key: string; - /** The user owner of the object. */ - user_id: string; -} -/** Batch get storage objects. */ -export interface ReadStorageObjectsRequest { - /** Batch of storage objects. */ - object_ids: ReadStorageObjectId[]; -} -/** Execute an Lua function on the server. */ -export interface Rpc { - /** The identifier of the function. */ - id: string; - /** The payload of the function which must be a JSON object. */ - payload: string; - /** The authentication key used when executed as a non-client HTTP request. */ - http_key: string; -} -/** A user's session used to authenticate messages. */ -export interface Session { - /** True if the corresponding account was just created, false otherwise. */ - created: boolean; - /** Authentication credentials. */ - token: string; - /** Refresh token that can be used for session token renewal. */ - refresh_token: string; -} -/** An object within the storage engine. */ -export interface StorageObject { - /** The collection which stores the object. */ - collection: string; - /** The key of the object within the collection. */ - key: string; - /** The user owner of the object. */ - user_id: string; - /** The value of the object. */ - value: string; - /** The version hash of the object. */ - version: string; - /** The read access permissions for the object. */ - permission_read: number; - /** The write access permissions for the object. */ - permission_write: number; - /** The UNIX time when the object was created. */ - create_time: Date | undefined; - /** The UNIX time when the object was last updated. */ - update_time: Date | undefined; -} -/** A storage acknowledgement. */ -export interface StorageObjectAck { - /** The collection which stores the object. */ - collection: string; - /** The key of the object within the collection. */ - key: string; - /** The version hash of the object. */ - version: string; - /** The owner of the object. */ - user_id: string; -} -/** Batch of acknowledgements for the storage object write. */ -export interface StorageObjectAcks { - /** Batch of storage write acknowledgements. */ - acks: StorageObjectAck[]; -} -/** Batch of storage objects. */ -export interface StorageObjects { - /** The batch of storage objects. */ - objects: StorageObject[]; -} -/** List of storage objects. */ -export interface StorageObjectList { - /** The list of storage objects. */ - objects: StorageObject[]; - /** The cursor for the next page of results, if any. */ - cursor: string; -} -/** A tournament on the server. */ -export interface Tournament { - /** The ID of the tournament. */ - id: string; - /** The title for the tournament. */ - title: string; - /** The description of the tournament. May be blank. */ - description: string; - /** The category of the tournament. e.g. "vip" could be category 1. */ - category: number; - /** ASC (0) or DESC (1) sort mode of scores in the tournament. */ - sort_order: number; - /** The current number of players in the tournament. */ - size: number; - /** The maximum number of players for the tournament. */ - max_size: number; - /** The maximum score updates allowed per player for the current tournament. */ - max_num_score: number; - /** True if the tournament is active and can enter. A computed value. */ - can_enter: boolean; - /** The UNIX time when the tournament stops being active until next reset. A computed value. */ - end_active: number; - /** The UNIX time when the tournament is next playable. A computed value. */ - next_reset: number; - /** Additional information stored as a JSON object. */ - metadata: string; - /** The UNIX time when the tournament was created. */ - create_time: Date | undefined; - /** The UNIX time when the tournament will start. */ - start_time: Date | undefined; - /** The UNIX time when the tournament will be stopped. */ - end_time: Date | undefined; - /** Duration of the tournament in seconds. */ - duration: number; - /** The UNIX time when the tournament start being active. A computed value. */ - start_active: number; - /** The UNIX time when the tournament was last reset. A computed value. */ - prev_reset: number; - /** Operator. */ - operator: Operator; -} -/** A list of tournaments. */ -export interface TournamentList { - /** The list of tournaments returned. */ - tournaments: Tournament[]; - /** A pagination cursor (optional). */ - cursor: string; -} -/** A set of tournament records which may be part of a tournament records page or a batch of individual records. */ -export interface TournamentRecordList { - /** A list of tournament records. */ - records: LeaderboardRecord[]; - /** A batched set of tournament records belonging to specified owners. */ - owner_records: LeaderboardRecord[]; - /** The cursor to send when retireving the next page (optional). */ - next_cursor: string; - /** The cursor to send when retrieving the previous page (optional). */ - prev_cursor: string; -} -/** Update a user's account details. */ -export interface UpdateAccountRequest { - /** The username of the user's account. */ - username: string | undefined; - /** The display name of the user. */ - display_name: string | undefined; - /** A URL for an avatar image. */ - avatar_url: string | undefined; - /** The language expected to be a tag which follows the BCP-47 spec. */ - lang_tag: string | undefined; - /** The location set by the user. */ - location: string | undefined; - /** The timezone set by the user. */ - timezone: string | undefined; -} -/** Update fields in a given group. */ -export interface UpdateGroupRequest { - /** The ID of the group to update. */ - group_id: string; - /** Name. */ - name: string | undefined; - /** Description string. */ - description: string | undefined; - /** Lang tag. */ - lang_tag: string | undefined; - /** Avatar URL. */ - avatar_url: string | undefined; - /** Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin. */ - open: boolean | undefined; -} -/** A user in the server. */ -export interface User { - /** The id of the user's account. */ - id: string; - /** The username of the user's account. */ - username: string; - /** The display name of the user. */ - display_name: string; - /** A URL for an avatar image. */ - avatar_url: string; - /** The language expected to be a tag which follows the BCP-47 spec. */ - lang_tag: string; - /** The location set by the user. */ - location: string; - /** The timezone set by the user. */ - timezone: string; - /** Additional information stored as a JSON object. */ - metadata: string; - /** The Facebook id in the user's account. */ - facebook_id: string; - /** The Google id in the user's account. */ - google_id: string; - /** The Apple Game Center in of the user's account. */ - gamecenter_id: string; - /** The Steam id in the user's account. */ - steam_id: string; - /** Indicates whether the user is currently online. */ - online: boolean; - /** Number of related edges to this user. */ - edge_count: number; - /** The UNIX time when the user was created. */ - create_time: Date | undefined; - /** The UNIX time when the user was last updated. */ - update_time: Date | undefined; - /** The Facebook Instant Game ID in the user's account. */ - facebook_instant_game_id: string; - /** The Apple Sign In ID in the user's account. */ - apple_id: string; -} -/** A list of groups belonging to a user, along with the user's role in each group. */ -export interface UserGroupList { - /** Group-role pairs for a user. */ - user_groups: UserGroupList_UserGroup[]; - /** Cursor for the next page of results, if any. */ - cursor: string; -} -/** A single group-role pair. */ -export interface UserGroupList_UserGroup { - /** Group. */ - group: Group | undefined; - /** The user's relationship to the group. */ - state: number | undefined; -} -/** The group role status. */ -export declare enum UserGroupList_UserGroup_State { - /** SUPERADMIN - The user is a superadmin with full control of the group. */ - SUPERADMIN = 0, - /** ADMIN - The user is an admin with additional privileges. */ - ADMIN = 1, - /** MEMBER - The user is a regular member. */ - MEMBER = 2, - /** JOIN_REQUEST - The user has requested to join the group */ - JOIN_REQUEST = 3, - UNRECOGNIZED = -1 -} -export declare function userGroupList_UserGroup_StateFromJSON(object: any): UserGroupList_UserGroup_State; -export declare function userGroupList_UserGroup_StateToJSON(object: UserGroupList_UserGroup_State): string; -/** A collection of zero or more users. */ -export interface Users { - /** The User objects. */ - users: User[]; -} -/** Apple IAP Purchases validation request */ -export interface ValidatePurchaseAppleRequest { - /** Base64 encoded Apple receipt data payload. */ - receipt: string; -} -/** Google IAP Purchase validation request */ -export interface ValidatePurchaseGoogleRequest { - /** JSON encoded Google purchase payload. */ - purchase: string; -} -/** Huawei IAP Purchase validation request */ -export interface ValidatePurchaseHuaweiRequest { - /** JSON encoded Huawei InAppPurchaseData. */ - purchase: string; - /** InAppPurchaseData signature. */ - signature: string; -} -/** Validated Purchase stored by Nakama. */ -export interface ValidatedPurchase { - /** Purchase Product ID. */ - product_id: string; - /** Purchase Transaction ID. */ - transaction_id: string; - /** Store identifier */ - store: ValidatedPurchase_Store; - /** UNIX Timestamp when the purchase was done. */ - purchase_time: Date | undefined; - /** UNIX Timestamp when the receipt validation was stored in DB. */ - create_time: Date | undefined; - /** UNIX Timestamp when the receipt validation was updated in DB. */ - update_time: Date | undefined; - /** Raw provider validation response. */ - provider_response: string; - /** Whether the purchase was done in production or sandbox environment. */ - environment: ValidatedPurchase_Environment; - /** Whether the purchase had already been validated by Nakama before. */ - seen_before: boolean; -} -/** Validation Provider */ -export declare enum ValidatedPurchase_Store { - /** APPLE_APP_STORE - Apple App Store */ - APPLE_APP_STORE = 0, - /** GOOGLE_PLAY_STORE - Google Play Store */ - GOOGLE_PLAY_STORE = 1, - /** HUAWEI_APP_GALLERY - Huawei App Gallery */ - HUAWEI_APP_GALLERY = 2, - UNRECOGNIZED = -1 -} -export declare function validatedPurchase_StoreFromJSON(object: any): ValidatedPurchase_Store; -export declare function validatedPurchase_StoreToJSON(object: ValidatedPurchase_Store): string; -/** Environment where the purchase took place */ -export declare enum ValidatedPurchase_Environment { - /** UNKNOWN - Unknown environment. */ - UNKNOWN = 0, - /** SANDBOX - Sandbox/test environment. */ - SANDBOX = 1, - /** PRODUCTION - Production environment. */ - PRODUCTION = 2, - UNRECOGNIZED = -1 -} -export declare function validatedPurchase_EnvironmentFromJSON(object: any): ValidatedPurchase_Environment; -export declare function validatedPurchase_EnvironmentToJSON(object: ValidatedPurchase_Environment): string; -/** Validate IAP response */ -export interface ValidatePurchaseResponse { - /** Newly seen validated purchases. */ - validated_purchases: ValidatedPurchase[]; -} -/** A list of validated purchases stored by Nakama. */ -export interface PurchaseList { - /** Stored validated purchases. */ - validated_purchases: ValidatedPurchase[]; - /** The cursor to send when retrieving the next page, if any. */ - cursor: string; -} -/** A request to submit a score to a leaderboard. */ -export interface WriteLeaderboardRecordRequest { - /** The ID of the leaderboard to write to. */ - leaderboard_id: string; - /** Record input. */ - record: WriteLeaderboardRecordRequest_LeaderboardRecordWrite | undefined; -} -/** Record values to write. */ -export interface WriteLeaderboardRecordRequest_LeaderboardRecordWrite { - /** The score value to submit. */ - score: number; - /** An optional secondary value. */ - subscore: number; - /** Optional record metadata. */ - metadata: string; - /** Operator override. */ - operator: Operator; -} -/** The object to store. */ -export interface WriteStorageObject { - /** The collection to store the object. */ - collection: string; - /** The key for the object within the collection. */ - key: string; - /** The value of the object. */ - value: string; - /** The version hash of the object to check. Possible values are: ["", "*", "#hash#"]. */ - version: string; - /** The read access permissions for the object. */ - permission_read: number | undefined; - /** The write access permissions for the object. */ - permission_write: number | undefined; -} -/** Write objects to the storage engine. */ -export interface WriteStorageObjectsRequest { - /** The objects to store on the server. */ - objects: WriteStorageObject[]; -} -/** A request to submit a score to a tournament. */ -export interface WriteTournamentRecordRequest { - /** The tournament ID to write the record for. */ - tournament_id: string; - /** Record input. */ - record: WriteTournamentRecordRequest_TournamentRecordWrite | undefined; -} -/** Record values to write. */ -export interface WriteTournamentRecordRequest_TournamentRecordWrite { - /** The score value to submit. */ - score: number; - /** An optional secondary value. */ - subscore: number; - /** A JSON object of additional properties (optional). */ - metadata: string; - /** Operator override. */ - operator: Operator; -} -export declare const Account: { - encode(message: Account, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Account; - fromJSON(object: any): Account; - toJSON(message: Account): unknown; - fromPartial(object: DeepPartial): Account; -}; -export declare const AccountRefresh: { - encode(message: AccountRefresh, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountRefresh; - fromJSON(object: any): AccountRefresh; - toJSON(message: AccountRefresh): unknown; - fromPartial(object: DeepPartial): AccountRefresh; -}; -export declare const AccountRefresh_VarsEntry: { - encode(message: AccountRefresh_VarsEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountRefresh_VarsEntry; - fromJSON(object: any): AccountRefresh_VarsEntry; - toJSON(message: AccountRefresh_VarsEntry): unknown; - fromPartial(object: DeepPartial): AccountRefresh_VarsEntry; -}; -export declare const AccountApple: { - encode(message: AccountApple, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountApple; - fromJSON(object: any): AccountApple; - toJSON(message: AccountApple): unknown; - fromPartial(object: DeepPartial): AccountApple; -}; -export declare const AccountApple_VarsEntry: { - encode(message: AccountApple_VarsEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountApple_VarsEntry; - fromJSON(object: any): AccountApple_VarsEntry; - toJSON(message: AccountApple_VarsEntry): unknown; - fromPartial(object: DeepPartial): AccountApple_VarsEntry; -}; -export declare const AccountCustom: { - encode(message: AccountCustom, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountCustom; - fromJSON(object: any): AccountCustom; - toJSON(message: AccountCustom): unknown; - fromPartial(object: DeepPartial): AccountCustom; -}; -export declare const AccountCustom_VarsEntry: { - encode(message: AccountCustom_VarsEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountCustom_VarsEntry; - fromJSON(object: any): AccountCustom_VarsEntry; - toJSON(message: AccountCustom_VarsEntry): unknown; - fromPartial(object: DeepPartial): AccountCustom_VarsEntry; -}; -export declare const AccountDevice: { - encode(message: AccountDevice, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountDevice; - fromJSON(object: any): AccountDevice; - toJSON(message: AccountDevice): unknown; - fromPartial(object: DeepPartial): AccountDevice; -}; -export declare const AccountDevice_VarsEntry: { - encode(message: AccountDevice_VarsEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountDevice_VarsEntry; - fromJSON(object: any): AccountDevice_VarsEntry; - toJSON(message: AccountDevice_VarsEntry): unknown; - fromPartial(object: DeepPartial): AccountDevice_VarsEntry; -}; -export declare const AccountEmail: { - encode(message: AccountEmail, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountEmail; - fromJSON(object: any): AccountEmail; - toJSON(message: AccountEmail): unknown; - fromPartial(object: DeepPartial): AccountEmail; -}; -export declare const AccountEmail_VarsEntry: { - encode(message: AccountEmail_VarsEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountEmail_VarsEntry; - fromJSON(object: any): AccountEmail_VarsEntry; - toJSON(message: AccountEmail_VarsEntry): unknown; - fromPartial(object: DeepPartial): AccountEmail_VarsEntry; -}; -export declare const AccountFacebook: { - encode(message: AccountFacebook, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountFacebook; - fromJSON(object: any): AccountFacebook; - toJSON(message: AccountFacebook): unknown; - fromPartial(object: DeepPartial): AccountFacebook; -}; -export declare const AccountFacebook_VarsEntry: { - encode(message: AccountFacebook_VarsEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountFacebook_VarsEntry; - fromJSON(object: any): AccountFacebook_VarsEntry; - toJSON(message: AccountFacebook_VarsEntry): unknown; - fromPartial(object: DeepPartial): AccountFacebook_VarsEntry; -}; -export declare const AccountFacebookInstantGame: { - encode(message: AccountFacebookInstantGame, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountFacebookInstantGame; - fromJSON(object: any): AccountFacebookInstantGame; - toJSON(message: AccountFacebookInstantGame): unknown; - fromPartial(object: DeepPartial): AccountFacebookInstantGame; -}; -export declare const AccountFacebookInstantGame_VarsEntry: { - encode(message: AccountFacebookInstantGame_VarsEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountFacebookInstantGame_VarsEntry; - fromJSON(object: any): AccountFacebookInstantGame_VarsEntry; - toJSON(message: AccountFacebookInstantGame_VarsEntry): unknown; - fromPartial(object: DeepPartial): AccountFacebookInstantGame_VarsEntry; -}; -export declare const AccountGameCenter: { - encode(message: AccountGameCenter, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountGameCenter; - fromJSON(object: any): AccountGameCenter; - toJSON(message: AccountGameCenter): unknown; - fromPartial(object: DeepPartial): AccountGameCenter; -}; -export declare const AccountGameCenter_VarsEntry: { - encode(message: AccountGameCenter_VarsEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountGameCenter_VarsEntry; - fromJSON(object: any): AccountGameCenter_VarsEntry; - toJSON(message: AccountGameCenter_VarsEntry): unknown; - fromPartial(object: DeepPartial): AccountGameCenter_VarsEntry; -}; -export declare const AccountGoogle: { - encode(message: AccountGoogle, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountGoogle; - fromJSON(object: any): AccountGoogle; - toJSON(message: AccountGoogle): unknown; - fromPartial(object: DeepPartial): AccountGoogle; -}; -export declare const AccountGoogle_VarsEntry: { - encode(message: AccountGoogle_VarsEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountGoogle_VarsEntry; - fromJSON(object: any): AccountGoogle_VarsEntry; - toJSON(message: AccountGoogle_VarsEntry): unknown; - fromPartial(object: DeepPartial): AccountGoogle_VarsEntry; -}; -export declare const AccountSteam: { - encode(message: AccountSteam, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountSteam; - fromJSON(object: any): AccountSteam; - toJSON(message: AccountSteam): unknown; - fromPartial(object: DeepPartial): AccountSteam; -}; -export declare const AccountSteam_VarsEntry: { - encode(message: AccountSteam_VarsEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AccountSteam_VarsEntry; - fromJSON(object: any): AccountSteam_VarsEntry; - toJSON(message: AccountSteam_VarsEntry): unknown; - fromPartial(object: DeepPartial): AccountSteam_VarsEntry; -}; -export declare const AddFriendsRequest: { - encode(message: AddFriendsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AddFriendsRequest; - fromJSON(object: any): AddFriendsRequest; - toJSON(message: AddFriendsRequest): unknown; - fromPartial(object: DeepPartial): AddFriendsRequest; -}; -export declare const AddGroupUsersRequest: { - encode(message: AddGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AddGroupUsersRequest; - fromJSON(object: any): AddGroupUsersRequest; - toJSON(message: AddGroupUsersRequest): unknown; - fromPartial(object: DeepPartial): AddGroupUsersRequest; -}; -export declare const SessionRefreshRequest: { - encode(message: SessionRefreshRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): SessionRefreshRequest; - fromJSON(object: any): SessionRefreshRequest; - toJSON(message: SessionRefreshRequest): unknown; - fromPartial(object: DeepPartial): SessionRefreshRequest; -}; -export declare const SessionRefreshRequest_VarsEntry: { - encode(message: SessionRefreshRequest_VarsEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): SessionRefreshRequest_VarsEntry; - fromJSON(object: any): SessionRefreshRequest_VarsEntry; - toJSON(message: SessionRefreshRequest_VarsEntry): unknown; - fromPartial(object: DeepPartial): SessionRefreshRequest_VarsEntry; -}; -export declare const SessionLogoutRequest: { - encode(message: SessionLogoutRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): SessionLogoutRequest; - fromJSON(object: any): SessionLogoutRequest; - toJSON(message: SessionLogoutRequest): unknown; - fromPartial(object: DeepPartial): SessionLogoutRequest; -}; -export declare const AuthenticateAppleRequest: { - encode(message: AuthenticateAppleRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateAppleRequest; - fromJSON(object: any): AuthenticateAppleRequest; - toJSON(message: AuthenticateAppleRequest): unknown; - fromPartial(object: DeepPartial): AuthenticateAppleRequest; -}; -export declare const AuthenticateCustomRequest: { - encode(message: AuthenticateCustomRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateCustomRequest; - fromJSON(object: any): AuthenticateCustomRequest; - toJSON(message: AuthenticateCustomRequest): unknown; - fromPartial(object: DeepPartial): AuthenticateCustomRequest; -}; -export declare const AuthenticateDeviceRequest: { - encode(message: AuthenticateDeviceRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateDeviceRequest; - fromJSON(object: any): AuthenticateDeviceRequest; - toJSON(message: AuthenticateDeviceRequest): unknown; - fromPartial(object: DeepPartial): AuthenticateDeviceRequest; -}; -export declare const AuthenticateEmailRequest: { - encode(message: AuthenticateEmailRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateEmailRequest; - fromJSON(object: any): AuthenticateEmailRequest; - toJSON(message: AuthenticateEmailRequest): unknown; - fromPartial(object: DeepPartial): AuthenticateEmailRequest; -}; -export declare const AuthenticateFacebookRequest: { - encode(message: AuthenticateFacebookRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateFacebookRequest; - fromJSON(object: any): AuthenticateFacebookRequest; - toJSON(message: AuthenticateFacebookRequest): unknown; - fromPartial(object: DeepPartial): AuthenticateFacebookRequest; -}; -export declare const AuthenticateFacebookInstantGameRequest: { - encode(message: AuthenticateFacebookInstantGameRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateFacebookInstantGameRequest; - fromJSON(object: any): AuthenticateFacebookInstantGameRequest; - toJSON(message: AuthenticateFacebookInstantGameRequest): unknown; - fromPartial(object: DeepPartial): AuthenticateFacebookInstantGameRequest; -}; -export declare const AuthenticateGameCenterRequest: { - encode(message: AuthenticateGameCenterRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateGameCenterRequest; - fromJSON(object: any): AuthenticateGameCenterRequest; - toJSON(message: AuthenticateGameCenterRequest): unknown; - fromPartial(object: DeepPartial): AuthenticateGameCenterRequest; -}; -export declare const AuthenticateGoogleRequest: { - encode(message: AuthenticateGoogleRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateGoogleRequest; - fromJSON(object: any): AuthenticateGoogleRequest; - toJSON(message: AuthenticateGoogleRequest): unknown; - fromPartial(object: DeepPartial): AuthenticateGoogleRequest; -}; -export declare const AuthenticateSteamRequest: { - encode(message: AuthenticateSteamRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateSteamRequest; - fromJSON(object: any): AuthenticateSteamRequest; - toJSON(message: AuthenticateSteamRequest): unknown; - fromPartial(object: DeepPartial): AuthenticateSteamRequest; -}; -export declare const BanGroupUsersRequest: { - encode(message: BanGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): BanGroupUsersRequest; - fromJSON(object: any): BanGroupUsersRequest; - toJSON(message: BanGroupUsersRequest): unknown; - fromPartial(object: DeepPartial): BanGroupUsersRequest; -}; -export declare const BlockFriendsRequest: { - encode(message: BlockFriendsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): BlockFriendsRequest; - fromJSON(object: any): BlockFriendsRequest; - toJSON(message: BlockFriendsRequest): unknown; - fromPartial(object: DeepPartial): BlockFriendsRequest; -}; -export declare const ChannelMessage: { - encode(message: ChannelMessage, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessage; - fromJSON(object: any): ChannelMessage; - toJSON(message: ChannelMessage): unknown; - fromPartial(object: DeepPartial): ChannelMessage; -}; -export declare const ChannelMessageList: { - encode(message: ChannelMessageList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessageList; - fromJSON(object: any): ChannelMessageList; - toJSON(message: ChannelMessageList): unknown; - fromPartial(object: DeepPartial): ChannelMessageList; -}; -export declare const CreateGroupRequest: { - encode(message: CreateGroupRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupRequest; - fromJSON(object: any): CreateGroupRequest; - toJSON(message: CreateGroupRequest): unknown; - fromPartial(object: DeepPartial): CreateGroupRequest; -}; -export declare const DeleteFriendsRequest: { - encode(message: DeleteFriendsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteFriendsRequest; - fromJSON(object: any): DeleteFriendsRequest; - toJSON(message: DeleteFriendsRequest): unknown; - fromPartial(object: DeepPartial): DeleteFriendsRequest; -}; -export declare const DeleteGroupRequest: { - encode(message: DeleteGroupRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteGroupRequest; - fromJSON(object: any): DeleteGroupRequest; - toJSON(message: DeleteGroupRequest): unknown; - fromPartial(object: DeepPartial): DeleteGroupRequest; -}; -export declare const DeleteLeaderboardRecordRequest: { - encode(message: DeleteLeaderboardRecordRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteLeaderboardRecordRequest; - fromJSON(object: any): DeleteLeaderboardRecordRequest; - toJSON(message: DeleteLeaderboardRecordRequest): unknown; - fromPartial(object: DeepPartial): DeleteLeaderboardRecordRequest; -}; -export declare const DeleteNotificationsRequest: { - encode(message: DeleteNotificationsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteNotificationsRequest; - fromJSON(object: any): DeleteNotificationsRequest; - toJSON(message: DeleteNotificationsRequest): unknown; - fromPartial(object: DeepPartial): DeleteNotificationsRequest; -}; -export declare const DeleteStorageObjectId: { - encode(message: DeleteStorageObjectId, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteStorageObjectId; - fromJSON(object: any): DeleteStorageObjectId; - toJSON(message: DeleteStorageObjectId): unknown; - fromPartial(object: DeepPartial): DeleteStorageObjectId; -}; -export declare const DeleteStorageObjectsRequest: { - encode(message: DeleteStorageObjectsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteStorageObjectsRequest; - fromJSON(object: any): DeleteStorageObjectsRequest; - toJSON(message: DeleteStorageObjectsRequest): unknown; - fromPartial(object: DeepPartial): DeleteStorageObjectsRequest; -}; -export declare const Event: { - encode(message: Event, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Event; - fromJSON(object: any): Event; - toJSON(message: Event): unknown; - fromPartial(object: DeepPartial): Event; -}; -export declare const Event_PropertiesEntry: { - encode(message: Event_PropertiesEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Event_PropertiesEntry; - fromJSON(object: any): Event_PropertiesEntry; - toJSON(message: Event_PropertiesEntry): unknown; - fromPartial(object: DeepPartial): Event_PropertiesEntry; -}; -export declare const Friend: { - encode(message: Friend, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Friend; - fromJSON(object: any): Friend; - toJSON(message: Friend): unknown; - fromPartial(object: DeepPartial): Friend; -}; -export declare const FriendList: { - encode(message: FriendList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): FriendList; - fromJSON(object: any): FriendList; - toJSON(message: FriendList): unknown; - fromPartial(object: DeepPartial): FriendList; -}; -export declare const GetUsersRequest: { - encode(message: GetUsersRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): GetUsersRequest; - fromJSON(object: any): GetUsersRequest; - toJSON(message: GetUsersRequest): unknown; - fromPartial(object: DeepPartial): GetUsersRequest; -}; -export declare const Group: { - encode(message: Group, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Group; - fromJSON(object: any): Group; - toJSON(message: Group): unknown; - fromPartial(object: DeepPartial): Group; -}; -export declare const GroupList: { - encode(message: GroupList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): GroupList; - fromJSON(object: any): GroupList; - toJSON(message: GroupList): unknown; - fromPartial(object: DeepPartial): GroupList; -}; -export declare const GroupUserList: { - encode(message: GroupUserList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): GroupUserList; - fromJSON(object: any): GroupUserList; - toJSON(message: GroupUserList): unknown; - fromPartial(object: DeepPartial): GroupUserList; -}; -export declare const GroupUserList_GroupUser: { - encode(message: GroupUserList_GroupUser, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): GroupUserList_GroupUser; - fromJSON(object: any): GroupUserList_GroupUser; - toJSON(message: GroupUserList_GroupUser): unknown; - fromPartial(object: DeepPartial): GroupUserList_GroupUser; -}; -export declare const ImportFacebookFriendsRequest: { - encode(message: ImportFacebookFriendsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ImportFacebookFriendsRequest; - fromJSON(object: any): ImportFacebookFriendsRequest; - toJSON(message: ImportFacebookFriendsRequest): unknown; - fromPartial(object: DeepPartial): ImportFacebookFriendsRequest; -}; -export declare const ImportSteamFriendsRequest: { - encode(message: ImportSteamFriendsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ImportSteamFriendsRequest; - fromJSON(object: any): ImportSteamFriendsRequest; - toJSON(message: ImportSteamFriendsRequest): unknown; - fromPartial(object: DeepPartial): ImportSteamFriendsRequest; -}; -export declare const JoinGroupRequest: { - encode(message: JoinGroupRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): JoinGroupRequest; - fromJSON(object: any): JoinGroupRequest; - toJSON(message: JoinGroupRequest): unknown; - fromPartial(object: DeepPartial): JoinGroupRequest; -}; -export declare const JoinTournamentRequest: { - encode(message: JoinTournamentRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): JoinTournamentRequest; - fromJSON(object: any): JoinTournamentRequest; - toJSON(message: JoinTournamentRequest): unknown; - fromPartial(object: DeepPartial): JoinTournamentRequest; -}; -export declare const KickGroupUsersRequest: { - encode(message: KickGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): KickGroupUsersRequest; - fromJSON(object: any): KickGroupUsersRequest; - toJSON(message: KickGroupUsersRequest): unknown; - fromPartial(object: DeepPartial): KickGroupUsersRequest; -}; -export declare const Leaderboard: { - encode(message: Leaderboard, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Leaderboard; - fromJSON(object: any): Leaderboard; - toJSON(message: Leaderboard): unknown; - fromPartial(object: DeepPartial): Leaderboard; -}; -export declare const LeaderboardList: { - encode(message: LeaderboardList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): LeaderboardList; - fromJSON(object: any): LeaderboardList; - toJSON(message: LeaderboardList): unknown; - fromPartial(object: DeepPartial): LeaderboardList; -}; -export declare const LeaderboardRecord: { - encode(message: LeaderboardRecord, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): LeaderboardRecord; - fromJSON(object: any): LeaderboardRecord; - toJSON(message: LeaderboardRecord): unknown; - fromPartial(object: DeepPartial): LeaderboardRecord; -}; -export declare const LeaderboardRecordList: { - encode(message: LeaderboardRecordList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): LeaderboardRecordList; - fromJSON(object: any): LeaderboardRecordList; - toJSON(message: LeaderboardRecordList): unknown; - fromPartial(object: DeepPartial): LeaderboardRecordList; -}; -export declare const LeaveGroupRequest: { - encode(message: LeaveGroupRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): LeaveGroupRequest; - fromJSON(object: any): LeaveGroupRequest; - toJSON(message: LeaveGroupRequest): unknown; - fromPartial(object: DeepPartial): LeaveGroupRequest; -}; -export declare const LinkFacebookRequest: { - encode(message: LinkFacebookRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): LinkFacebookRequest; - fromJSON(object: any): LinkFacebookRequest; - toJSON(message: LinkFacebookRequest): unknown; - fromPartial(object: DeepPartial): LinkFacebookRequest; -}; -export declare const LinkSteamRequest: { - encode(message: LinkSteamRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): LinkSteamRequest; - fromJSON(object: any): LinkSteamRequest; - toJSON(message: LinkSteamRequest): unknown; - fromPartial(object: DeepPartial): LinkSteamRequest; -}; -export declare const ListChannelMessagesRequest: { - encode(message: ListChannelMessagesRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListChannelMessagesRequest; - fromJSON(object: any): ListChannelMessagesRequest; - toJSON(message: ListChannelMessagesRequest): unknown; - fromPartial(object: DeepPartial): ListChannelMessagesRequest; -}; -export declare const ListFriendsRequest: { - encode(message: ListFriendsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListFriendsRequest; - fromJSON(object: any): ListFriendsRequest; - toJSON(message: ListFriendsRequest): unknown; - fromPartial(object: DeepPartial): ListFriendsRequest; -}; -export declare const ListGroupsRequest: { - encode(message: ListGroupsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListGroupsRequest; - fromJSON(object: any): ListGroupsRequest; - toJSON(message: ListGroupsRequest): unknown; - fromPartial(object: DeepPartial): ListGroupsRequest; -}; -export declare const ListGroupUsersRequest: { - encode(message: ListGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListGroupUsersRequest; - fromJSON(object: any): ListGroupUsersRequest; - toJSON(message: ListGroupUsersRequest): unknown; - fromPartial(object: DeepPartial): ListGroupUsersRequest; -}; -export declare const ListLeaderboardRecordsAroundOwnerRequest: { - encode(message: ListLeaderboardRecordsAroundOwnerRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListLeaderboardRecordsAroundOwnerRequest; - fromJSON(object: any): ListLeaderboardRecordsAroundOwnerRequest; - toJSON(message: ListLeaderboardRecordsAroundOwnerRequest): unknown; - fromPartial(object: DeepPartial): ListLeaderboardRecordsAroundOwnerRequest; -}; -export declare const ListLeaderboardRecordsRequest: { - encode(message: ListLeaderboardRecordsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListLeaderboardRecordsRequest; - fromJSON(object: any): ListLeaderboardRecordsRequest; - toJSON(message: ListLeaderboardRecordsRequest): unknown; - fromPartial(object: DeepPartial): ListLeaderboardRecordsRequest; -}; -export declare const ListMatchesRequest: { - encode(message: ListMatchesRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListMatchesRequest; - fromJSON(object: any): ListMatchesRequest; - toJSON(message: ListMatchesRequest): unknown; - fromPartial(object: DeepPartial): ListMatchesRequest; -}; -export declare const ListNotificationsRequest: { - encode(message: ListNotificationsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListNotificationsRequest; - fromJSON(object: any): ListNotificationsRequest; - toJSON(message: ListNotificationsRequest): unknown; - fromPartial(object: DeepPartial): ListNotificationsRequest; -}; -export declare const ListStorageObjectsRequest: { - encode(message: ListStorageObjectsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListStorageObjectsRequest; - fromJSON(object: any): ListStorageObjectsRequest; - toJSON(message: ListStorageObjectsRequest): unknown; - fromPartial(object: DeepPartial): ListStorageObjectsRequest; -}; -export declare const ListTournamentRecordsAroundOwnerRequest: { - encode(message: ListTournamentRecordsAroundOwnerRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListTournamentRecordsAroundOwnerRequest; - fromJSON(object: any): ListTournamentRecordsAroundOwnerRequest; - toJSON(message: ListTournamentRecordsAroundOwnerRequest): unknown; - fromPartial(object: DeepPartial): ListTournamentRecordsAroundOwnerRequest; -}; -export declare const ListTournamentRecordsRequest: { - encode(message: ListTournamentRecordsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListTournamentRecordsRequest; - fromJSON(object: any): ListTournamentRecordsRequest; - toJSON(message: ListTournamentRecordsRequest): unknown; - fromPartial(object: DeepPartial): ListTournamentRecordsRequest; -}; -export declare const ListTournamentsRequest: { - encode(message: ListTournamentsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListTournamentsRequest; - fromJSON(object: any): ListTournamentsRequest; - toJSON(message: ListTournamentsRequest): unknown; - fromPartial(object: DeepPartial): ListTournamentsRequest; -}; -export declare const ListUserGroupsRequest: { - encode(message: ListUserGroupsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ListUserGroupsRequest; - fromJSON(object: any): ListUserGroupsRequest; - toJSON(message: ListUserGroupsRequest): unknown; - fromPartial(object: DeepPartial): ListUserGroupsRequest; -}; -export declare const Match: { - encode(message: Match, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Match; - fromJSON(object: any): Match; - toJSON(message: Match): unknown; - fromPartial(object: DeepPartial): Match; -}; -export declare const MatchList: { - encode(message: MatchList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchList; - fromJSON(object: any): MatchList; - toJSON(message: MatchList): unknown; - fromPartial(object: DeepPartial): MatchList; -}; -export declare const Notification: { - encode(message: Notification, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Notification; - fromJSON(object: any): Notification; - toJSON(message: Notification): unknown; - fromPartial(object: DeepPartial): Notification; -}; -export declare const NotificationList: { - encode(message: NotificationList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): NotificationList; - fromJSON(object: any): NotificationList; - toJSON(message: NotificationList): unknown; - fromPartial(object: DeepPartial): NotificationList; -}; -export declare const PromoteGroupUsersRequest: { - encode(message: PromoteGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PromoteGroupUsersRequest; - fromJSON(object: any): PromoteGroupUsersRequest; - toJSON(message: PromoteGroupUsersRequest): unknown; - fromPartial(object: DeepPartial): PromoteGroupUsersRequest; -}; -export declare const DemoteGroupUsersRequest: { - encode(message: DemoteGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): DemoteGroupUsersRequest; - fromJSON(object: any): DemoteGroupUsersRequest; - toJSON(message: DemoteGroupUsersRequest): unknown; - fromPartial(object: DeepPartial): DemoteGroupUsersRequest; -}; -export declare const ReadStorageObjectId: { - encode(message: ReadStorageObjectId, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ReadStorageObjectId; - fromJSON(object: any): ReadStorageObjectId; - toJSON(message: ReadStorageObjectId): unknown; - fromPartial(object: DeepPartial): ReadStorageObjectId; -}; -export declare const ReadStorageObjectsRequest: { - encode(message: ReadStorageObjectsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ReadStorageObjectsRequest; - fromJSON(object: any): ReadStorageObjectsRequest; - toJSON(message: ReadStorageObjectsRequest): unknown; - fromPartial(object: DeepPartial): ReadStorageObjectsRequest; -}; -export declare const Rpc: { - encode(message: Rpc, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Rpc; - fromJSON(object: any): Rpc; - toJSON(message: Rpc): unknown; - fromPartial(object: DeepPartial): Rpc; -}; -export declare const Session: { - encode(message: Session, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Session; - fromJSON(object: any): Session; - toJSON(message: Session): unknown; - fromPartial(object: DeepPartial): Session; -}; -export declare const StorageObject: { - encode(message: StorageObject, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): StorageObject; - fromJSON(object: any): StorageObject; - toJSON(message: StorageObject): unknown; - fromPartial(object: DeepPartial): StorageObject; -}; -export declare const StorageObjectAck: { - encode(message: StorageObjectAck, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjectAck; - fromJSON(object: any): StorageObjectAck; - toJSON(message: StorageObjectAck): unknown; - fromPartial(object: DeepPartial): StorageObjectAck; -}; -export declare const StorageObjectAcks: { - encode(message: StorageObjectAcks, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjectAcks; - fromJSON(object: any): StorageObjectAcks; - toJSON(message: StorageObjectAcks): unknown; - fromPartial(object: DeepPartial): StorageObjectAcks; -}; -export declare const StorageObjects: { - encode(message: StorageObjects, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjects; - fromJSON(object: any): StorageObjects; - toJSON(message: StorageObjects): unknown; - fromPartial(object: DeepPartial): StorageObjects; -}; -export declare const StorageObjectList: { - encode(message: StorageObjectList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjectList; - fromJSON(object: any): StorageObjectList; - toJSON(message: StorageObjectList): unknown; - fromPartial(object: DeepPartial): StorageObjectList; -}; -export declare const Tournament: { - encode(message: Tournament, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Tournament; - fromJSON(object: any): Tournament; - toJSON(message: Tournament): unknown; - fromPartial(object: DeepPartial): Tournament; -}; -export declare const TournamentList: { - encode(message: TournamentList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): TournamentList; - fromJSON(object: any): TournamentList; - toJSON(message: TournamentList): unknown; - fromPartial(object: DeepPartial): TournamentList; -}; -export declare const TournamentRecordList: { - encode(message: TournamentRecordList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): TournamentRecordList; - fromJSON(object: any): TournamentRecordList; - toJSON(message: TournamentRecordList): unknown; - fromPartial(object: DeepPartial): TournamentRecordList; -}; -export declare const UpdateAccountRequest: { - encode(message: UpdateAccountRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateAccountRequest; - fromJSON(object: any): UpdateAccountRequest; - toJSON(message: UpdateAccountRequest): unknown; - fromPartial(object: DeepPartial): UpdateAccountRequest; -}; -export declare const UpdateGroupRequest: { - encode(message: UpdateGroupRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupRequest; - fromJSON(object: any): UpdateGroupRequest; - toJSON(message: UpdateGroupRequest): unknown; - fromPartial(object: DeepPartial): UpdateGroupRequest; -}; -export declare const User: { - encode(message: User, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): User; - fromJSON(object: any): User; - toJSON(message: User): unknown; - fromPartial(object: DeepPartial): User; -}; -export declare const UserGroupList: { - encode(message: UserGroupList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): UserGroupList; - fromJSON(object: any): UserGroupList; - toJSON(message: UserGroupList): unknown; - fromPartial(object: DeepPartial): UserGroupList; -}; -export declare const UserGroupList_UserGroup: { - encode(message: UserGroupList_UserGroup, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): UserGroupList_UserGroup; - fromJSON(object: any): UserGroupList_UserGroup; - toJSON(message: UserGroupList_UserGroup): unknown; - fromPartial(object: DeepPartial): UserGroupList_UserGroup; -}; -export declare const Users: { - encode(message: Users, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Users; - fromJSON(object: any): Users; - toJSON(message: Users): unknown; - fromPartial(object: DeepPartial): Users; -}; -export declare const ValidatePurchaseAppleRequest: { - encode(message: ValidatePurchaseAppleRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ValidatePurchaseAppleRequest; - fromJSON(object: any): ValidatePurchaseAppleRequest; - toJSON(message: ValidatePurchaseAppleRequest): unknown; - fromPartial(object: DeepPartial): ValidatePurchaseAppleRequest; -}; -export declare const ValidatePurchaseGoogleRequest: { - encode(message: ValidatePurchaseGoogleRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ValidatePurchaseGoogleRequest; - fromJSON(object: any): ValidatePurchaseGoogleRequest; - toJSON(message: ValidatePurchaseGoogleRequest): unknown; - fromPartial(object: DeepPartial): ValidatePurchaseGoogleRequest; -}; -export declare const ValidatePurchaseHuaweiRequest: { - encode(message: ValidatePurchaseHuaweiRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ValidatePurchaseHuaweiRequest; - fromJSON(object: any): ValidatePurchaseHuaweiRequest; - toJSON(message: ValidatePurchaseHuaweiRequest): unknown; - fromPartial(object: DeepPartial): ValidatePurchaseHuaweiRequest; -}; -export declare const ValidatedPurchase: { - encode(message: ValidatedPurchase, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ValidatedPurchase; - fromJSON(object: any): ValidatedPurchase; - toJSON(message: ValidatedPurchase): unknown; - fromPartial(object: DeepPartial): ValidatedPurchase; -}; -export declare const ValidatePurchaseResponse: { - encode(message: ValidatePurchaseResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ValidatePurchaseResponse; - fromJSON(object: any): ValidatePurchaseResponse; - toJSON(message: ValidatePurchaseResponse): unknown; - fromPartial(object: DeepPartial): ValidatePurchaseResponse; -}; -export declare const PurchaseList: { - encode(message: PurchaseList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PurchaseList; - fromJSON(object: any): PurchaseList; - toJSON(message: PurchaseList): unknown; - fromPartial(object: DeepPartial): PurchaseList; -}; -export declare const WriteLeaderboardRecordRequest: { - encode(message: WriteLeaderboardRecordRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): WriteLeaderboardRecordRequest; - fromJSON(object: any): WriteLeaderboardRecordRequest; - toJSON(message: WriteLeaderboardRecordRequest): unknown; - fromPartial(object: DeepPartial): WriteLeaderboardRecordRequest; -}; -export declare const WriteLeaderboardRecordRequest_LeaderboardRecordWrite: { - encode(message: WriteLeaderboardRecordRequest_LeaderboardRecordWrite, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): WriteLeaderboardRecordRequest_LeaderboardRecordWrite; - fromJSON(object: any): WriteLeaderboardRecordRequest_LeaderboardRecordWrite; - toJSON(message: WriteLeaderboardRecordRequest_LeaderboardRecordWrite): unknown; - fromPartial(object: DeepPartial): WriteLeaderboardRecordRequest_LeaderboardRecordWrite; -}; -export declare const WriteStorageObject: { - encode(message: WriteStorageObject, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): WriteStorageObject; - fromJSON(object: any): WriteStorageObject; - toJSON(message: WriteStorageObject): unknown; - fromPartial(object: DeepPartial): WriteStorageObject; -}; -export declare const WriteStorageObjectsRequest: { - encode(message: WriteStorageObjectsRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): WriteStorageObjectsRequest; - fromJSON(object: any): WriteStorageObjectsRequest; - toJSON(message: WriteStorageObjectsRequest): unknown; - fromPartial(object: DeepPartial): WriteStorageObjectsRequest; -}; -export declare const WriteTournamentRecordRequest: { - encode(message: WriteTournamentRecordRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): WriteTournamentRecordRequest; - fromJSON(object: any): WriteTournamentRecordRequest; - toJSON(message: WriteTournamentRecordRequest): unknown; - fromPartial(object: DeepPartial): WriteTournamentRecordRequest; -}; -export declare const WriteTournamentRecordRequest_TournamentRecordWrite: { - encode(message: WriteTournamentRecordRequest_TournamentRecordWrite, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): WriteTournamentRecordRequest_TournamentRecordWrite; - fromJSON(object: any): WriteTournamentRecordRequest_TournamentRecordWrite; - toJSON(message: WriteTournamentRecordRequest_TournamentRecordWrite): unknown; - fromPartial(object: DeepPartial): WriteTournamentRecordRequest_TournamentRecordWrite; -}; -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; +import _m0 from "protobufjs/minimal"; +export declare const protobufPackage = "nakama.api"; +/** The Nakama server RPC protocol for games and apps. */ +/** Operator that can be used to override the one set in the leaderboard. */ +export declare enum Operator { + /** NO_OVERRIDE - Do not override the leaderboard operator. */ + NO_OVERRIDE = 0, + /** BEST - Override the leaderboard operator with BEST. */ + BEST = 1, + /** SET - Override the leaderboard operator with SET. */ + SET = 2, + /** INCREMENT - Override the leaderboard operator with INCREMENT. */ + INCREMENT = 3, + /** DECREMENT - Override the leaderboard operator with DECREMENT. */ + DECREMENT = 4, + UNRECOGNIZED = -1 +} +export declare function operatorFromJSON(object: any): Operator; +export declare function operatorToJSON(object: Operator): string; +/** A user with additional account details. Always the current user. */ +export interface Account { + /** The user object. */ + user: User | undefined; + /** The user's wallet data. */ + wallet: string; + /** The email address of the user. */ + email: string; + /** The devices which belong to the user's account. */ + devices: AccountDevice[]; + /** The custom id in the user's account. */ + custom_id: string; + /** The UNIX time when the user's email was verified. */ + verify_time: Date | undefined; + /** The UNIX time when the user's account was disabled/banned. */ + disable_time: Date | undefined; +} +/** Obtain a new authentication token using a refresh token. */ +export interface AccountRefresh { + /** Refresh token. */ + token: string; + /** Extra information that will be bundled in the session token. */ + vars: { + [key: string]: string; + }; +} +export interface AccountRefresh_VarsEntry { + key: string; + value: string; +} +/** Send a Apple Sign In token to the server. Used with authenticate/link/unlink. */ +export interface AccountApple { + /** The ID token received from Apple to validate. */ + token: string; + /** Extra information that will be bundled in the session token. */ + vars: { + [key: string]: string; + }; +} +export interface AccountApple_VarsEntry { + key: string; + value: string; +} +/** Send a custom ID to the server. Used with authenticate/link/unlink. */ +export interface AccountCustom { + /** A custom identifier. */ + id: string; + /** Extra information that will be bundled in the session token. */ + vars: { + [key: string]: string; + }; +} +export interface AccountCustom_VarsEntry { + key: string; + value: string; +} +/** Send a device to the server. Used with authenticate/link/unlink and user. */ +export interface AccountDevice { + /** A device identifier. Should be obtained by a platform-specific device API. */ + id: string; + /** Extra information that will be bundled in the session token. */ + vars: { + [key: string]: string; + }; +} +export interface AccountDevice_VarsEntry { + key: string; + value: string; +} +/** Send an email with password to the server. Used with authenticate/link/unlink. */ +export interface AccountEmail { + /** A valid RFC-5322 email address. */ + email: string; + /** A password for the user account. */ + password: string; + /** Extra information that will be bundled in the session token. */ + vars: { + [key: string]: string; + }; +} +export interface AccountEmail_VarsEntry { + key: string; + value: string; +} +/** Send a Facebook token to the server. Used with authenticate/link/unlink. */ +export interface AccountFacebook { + /** The OAuth token received from Facebook to access their profile API. */ + token: string; + /** Extra information that will be bundled in the session token. */ + vars: { + [key: string]: string; + }; +} +export interface AccountFacebook_VarsEntry { + key: string; + value: string; +} +/** Send a Facebook Instant Game token to the server. Used with authenticate/link/unlink. */ +export interface AccountFacebookInstantGame { + /** The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration) */ + signed_player_info: string; + /** Extra information that will be bundled in the session token. */ + vars: { + [key: string]: string; + }; +} +export interface AccountFacebookInstantGame_VarsEntry { + key: string; + value: string; +} +/** Send Apple's Game Center account credentials to the server. Used with authenticate/link/unlink. */ +export interface AccountGameCenter { + /** Player ID (generated by GameCenter). */ + player_id: string; + /** Bundle ID (generated by GameCenter). */ + bundle_id: string; + /** Time since UNIX epoch when the signature was created. */ + timestamp_seconds: number; + /** A random "NSString" used to compute the hash and keep it randomized. */ + salt: string; + /** The verification signature data generated. */ + signature: string; + /** The URL for the public encryption key. */ + public_key_url: string; + /** Extra information that will be bundled in the session token. */ + vars: { + [key: string]: string; + }; +} +export interface AccountGameCenter_VarsEntry { + key: string; + value: string; +} +/** Send a Google token to the server. Used with authenticate/link/unlink. */ +export interface AccountGoogle { + /** The OAuth token received from Google to access their profile API. */ + token: string; + /** Extra information that will be bundled in the session token. */ + vars: { + [key: string]: string; + }; +} +export interface AccountGoogle_VarsEntry { + key: string; + value: string; +} +/** Send a Steam token to the server. Used with authenticate/link/unlink. */ +export interface AccountSteam { + /** The account token received from Steam to access their profile API. */ + token: string; + /** Extra information that will be bundled in the session token. */ + vars: { + [key: string]: string; + }; +} +export interface AccountSteam_VarsEntry { + key: string; + value: string; +} +/** Add one or more friends to the current user. */ +export interface AddFriendsRequest { + /** The account id of a user. */ + ids: string[]; + /** The account username of a user. */ + usernames: string[]; +} +/** Add users to a group. */ +export interface AddGroupUsersRequest { + /** The group to add users to. */ + group_id: string; + /** The users to add. */ + user_ids: string[]; +} +/** Authenticate against the server with a refresh token. */ +export interface SessionRefreshRequest { + /** Refresh token. */ + token: string; + /** Extra information that will be bundled in the session token. */ + vars: { + [key: string]: string; + }; +} +export interface SessionRefreshRequest_VarsEntry { + key: string; + value: string; +} +/** Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user. */ +export interface SessionLogoutRequest { + /** Session token to log out. */ + token: string; + /** Refresh token to invalidate. */ + refresh_token: string; +} +/** Authenticate against the server with Apple Sign In. */ +export interface AuthenticateAppleRequest { + /** The Apple account details. */ + account: AccountApple | undefined; + /** Register the account if the user does not already exist. */ + create: boolean | undefined; + /** Set the username on the account at register. Must be unique. */ + username: string; +} +/** Authenticate against the server with a custom ID. */ +export interface AuthenticateCustomRequest { + /** The custom account details. */ + account: AccountCustom | undefined; + /** Register the account if the user does not already exist. */ + create: boolean | undefined; + /** Set the username on the account at register. Must be unique. */ + username: string; +} +/** Authenticate against the server with a device ID. */ +export interface AuthenticateDeviceRequest { + /** The device account details. */ + account: AccountDevice | undefined; + /** Register the account if the user does not already exist. */ + create: boolean | undefined; + /** Set the username on the account at register. Must be unique. */ + username: string; +} +/** Authenticate against the server with email+password. */ +export interface AuthenticateEmailRequest { + /** The email account details. */ + account: AccountEmail | undefined; + /** Register the account if the user does not already exist. */ + create: boolean | undefined; + /** Set the username on the account at register. Must be unique. */ + username: string; +} +/** Authenticate against the server with Facebook. */ +export interface AuthenticateFacebookRequest { + /** The Facebook account details. */ + account: AccountFacebook | undefined; + /** Register the account if the user does not already exist. */ + create: boolean | undefined; + /** Set the username on the account at register. Must be unique. */ + username: string; + /** Import Facebook friends for the user. */ + sync: boolean | undefined; +} +/** Authenticate against the server with Facebook Instant Game token. */ +export interface AuthenticateFacebookInstantGameRequest { + /** The Facebook Instant Game account details. */ + account: AccountFacebookInstantGame | undefined; + /** Register the account if the user does not already exist. */ + create: boolean | undefined; + /** Set the username on the account at register. Must be unique. */ + username: string; +} +/** Authenticate against the server with Apple's Game Center. */ +export interface AuthenticateGameCenterRequest { + /** The Game Center account details. */ + account: AccountGameCenter | undefined; + /** Register the account if the user does not already exist. */ + create: boolean | undefined; + /** Set the username on the account at register. Must be unique. */ + username: string; +} +/** Authenticate against the server with Google. */ +export interface AuthenticateGoogleRequest { + /** The Google account details. */ + account: AccountGoogle | undefined; + /** Register the account if the user does not already exist. */ + create: boolean | undefined; + /** Set the username on the account at register. Must be unique. */ + username: string; +} +/** Authenticate against the server with Steam. */ +export interface AuthenticateSteamRequest { + /** The Steam account details. */ + account: AccountSteam | undefined; + /** Register the account if the user does not already exist. */ + create: boolean | undefined; + /** Set the username on the account at register. Must be unique. */ + username: string; + /** Import Steam friends for the user. */ + sync: boolean | undefined; +} +/** Ban users from a group. */ +export interface BanGroupUsersRequest { + /** The group to ban users from. */ + group_id: string; + /** The users to ban. */ + user_ids: string[]; +} +/** Block one or more friends for the current user. */ +export interface BlockFriendsRequest { + /** The account id of a user. */ + ids: string[]; + /** The account username of a user. */ + usernames: string[]; +} +/** A message sent on a channel. */ +export interface ChannelMessage { + /** The channel this message belongs to. */ + channel_id: string; + /** The unique ID of this message. */ + message_id: string; + /** The code representing a message type or category. */ + code: number | undefined; + /** Message sender, usually a user ID. */ + sender_id: string; + /** The username of the message sender, if any. */ + username: string; + /** The content payload. */ + content: string; + /** The UNIX time when the message was created. */ + create_time: Date | undefined; + /** The UNIX time when the message was last updated. */ + update_time: Date | undefined; + /** True if the message was persisted to the channel's history, false otherwise. */ + persistent: boolean | undefined; + /** The name of the chat room, or an empty string if this message was not sent through a chat room. */ + room_name: string; + /** The ID of the group, or an empty string if this message was not sent through a group channel. */ + group_id: string; + /** The ID of the first DM user, or an empty string if this message was not sent through a DM chat. */ + user_id_one: string; + /** The ID of the second DM user, or an empty string if this message was not sent through a DM chat. */ + user_id_two: string; +} +/** A list of channel messages, usually a result of a list operation. */ +export interface ChannelMessageList { + /** A list of messages. */ + messages: ChannelMessage[]; + /** The cursor to send when retrieving the next page, if any. */ + next_cursor: string; + /** The cursor to send when retrieving the previous page, if any. */ + prev_cursor: string; + /** Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors. */ + cacheable_cursor: string; +} +/** Create a group with the current user as owner. */ +export interface CreateGroupRequest { + /** A unique name for the group. */ + name: string; + /** A description for the group. */ + description: string; + /** The language expected to be a tag which follows the BCP-47 spec. */ + lang_tag: string; + /** A URL for an avatar image. */ + avatar_url: string; + /** Mark a group as open or not where only admins can accept members. */ + open: boolean; + /** Maximum number of group members. */ + max_count: number; +} +/** Delete one or more friends for the current user. */ +export interface DeleteFriendsRequest { + /** The account id of a user. */ + ids: string[]; + /** The account username of a user. */ + usernames: string[]; +} +/** Delete a group the user has access to. */ +export interface DeleteGroupRequest { + /** The id of a group. */ + group_id: string; +} +/** Delete a leaderboard record. */ +export interface DeleteLeaderboardRecordRequest { + /** The leaderboard ID to delete from. */ + leaderboard_id: string; +} +/** Delete one or more notifications for the current user. */ +export interface DeleteNotificationsRequest { + /** The id of notifications. */ + ids: string[]; +} +/** Storage objects to delete. */ +export interface DeleteStorageObjectId { + /** The collection which stores the object. */ + collection: string; + /** The key of the object within the collection. */ + key: string; + /** The version hash of the object. */ + version: string; +} +/** Batch delete storage objects. */ +export interface DeleteStorageObjectsRequest { + /** Batch of storage objects. */ + object_ids: DeleteStorageObjectId[]; +} +/** Represents an event to be passed through the server to registered event handlers. */ +export interface Event { + /** An event name, type, category, or identifier. */ + name: string; + /** Arbitrary event property values. */ + properties: { + [key: string]: string; + }; + /** The time when the event was triggered. */ + timestamp: Date | undefined; + /** True if the event came directly from a client call, false otherwise. */ + external: boolean; +} +export interface Event_PropertiesEntry { + key: string; + value: string; +} +/** A friend of a user. */ +export interface Friend { + /** The user object. */ + user: User | undefined; + /** The friend status. */ + state: number | undefined; + /** Time of the latest relationship update. */ + update_time: Date | undefined; +} +/** The friendship status. */ +export declare enum Friend_State { + /** FRIEND - The user is a friend of the current user. */ + FRIEND = 0, + /** INVITE_SENT - The current user has sent an invite to the user. */ + INVITE_SENT = 1, + /** INVITE_RECEIVED - The current user has received an invite from this user. */ + INVITE_RECEIVED = 2, + /** BLOCKED - The current user has blocked this user. */ + BLOCKED = 3, + UNRECOGNIZED = -1 +} +export declare function friend_StateFromJSON(object: any): Friend_State; +export declare function friend_StateToJSON(object: Friend_State): string; +/** A collection of zero or more friends of the user. */ +export interface FriendList { + /** The Friend objects. */ + friends: Friend[]; + /** Cursor for the next page of results, if any. */ + cursor: string; +} +/** Fetch a batch of zero or more users from the server. */ +export interface GetUsersRequest { + /** The account id of a user. */ + ids: string[]; + /** The account username of a user. */ + usernames: string[]; + /** The Facebook ID of a user. */ + facebook_ids: string[]; +} +/** A group in the server. */ +export interface Group { + /** The id of a group. */ + id: string; + /** The id of the user who created the group. */ + creator_id: string; + /** The unique name of the group. */ + name: string; + /** A description for the group. */ + description: string; + /** The language expected to be a tag which follows the BCP-47 spec. */ + lang_tag: string; + /** Additional information stored as a JSON object. */ + metadata: string; + /** A URL for an avatar image. */ + avatar_url: string; + /** Anyone can join open groups, otherwise only admins can accept members. */ + open: boolean | undefined; + /** The current count of all members in the group. */ + edge_count: number; + /** The maximum number of members allowed. */ + max_count: number; + /** The UNIX time when the group was created. */ + create_time: Date | undefined; + /** The UNIX time when the group was last updated. */ + update_time: Date | undefined; +} +/** One or more groups returned from a listing operation. */ +export interface GroupList { + /** One or more groups. */ + groups: Group[]; + /** A cursor used to get the next page. */ + cursor: string; +} +/** A list of users belonging to a group, along with their role. */ +export interface GroupUserList { + /** User-role pairs for a group. */ + group_users: GroupUserList_GroupUser[]; + /** Cursor for the next page of results, if any. */ + cursor: string; +} +/** A single user-role pair. */ +export interface GroupUserList_GroupUser { + /** User. */ + user: User | undefined; + /** Their relationship to the group. */ + state: number | undefined; +} +/** The group role status. */ +export declare enum GroupUserList_GroupUser_State { + /** SUPERADMIN - The user is a superadmin with full control of the group. */ + SUPERADMIN = 0, + /** ADMIN - The user is an admin with additional privileges. */ + ADMIN = 1, + /** MEMBER - The user is a regular member. */ + MEMBER = 2, + /** JOIN_REQUEST - The user has requested to join the group */ + JOIN_REQUEST = 3, + UNRECOGNIZED = -1 +} +export declare function groupUserList_GroupUser_StateFromJSON(object: any): GroupUserList_GroupUser_State; +export declare function groupUserList_GroupUser_StateToJSON(object: GroupUserList_GroupUser_State): string; +/** Import Facebook friends into the current user's account. */ +export interface ImportFacebookFriendsRequest { + /** The Facebook account details. */ + account: AccountFacebook | undefined; + /** Reset the current user's friends list. */ + reset: boolean | undefined; +} +/** Import Facebook friends into the current user's account. */ +export interface ImportSteamFriendsRequest { + /** The Facebook account details. */ + account: AccountSteam | undefined; + /** Reset the current user's friends list. */ + reset: boolean | undefined; +} +/** Immediately join an open group, or request to join a closed one. */ +export interface JoinGroupRequest { + /** The group ID to join. The group must already exist. */ + group_id: string; +} +/** The request to join a tournament. */ +export interface JoinTournamentRequest { + /** The ID of the tournament to join. The tournament must already exist. */ + tournament_id: string; +} +/** Kick a set of users from a group. */ +export interface KickGroupUsersRequest { + /** The group ID to kick from. */ + group_id: string; + /** The users to kick. */ + user_ids: string[]; +} +/** A leaderboard on the server. */ +export interface Leaderboard { + /** The ID of the leaderboard. */ + id: string; + /** ASC(0) or DESC(1) sort mode of scores in the leaderboard. */ + sort_order: number; + /** BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard. */ + operator: Operator; + /** The UNIX time when the leaderboard was previously reset. A computed value. */ + prev_reset: number; + /** The UNIX time when the leaderboard is next playable. A computed value. */ + next_reset: number; + /** Additional information stored as a JSON object. */ + metadata: string; + /** The UNIX time when the leaderboard was created. */ + create_time: Date | undefined; + /** Wether the leaderboard was created authoritatively or not. */ + authoritative: boolean; +} +/** A list of leaderboards */ +export interface LeaderboardList { + /** The list of leaderboards returned. */ + leaderboards: Leaderboard[]; + /** A pagination cursor (optional). */ + cursor: string; +} +/** Represents a complete leaderboard record with all scores and associated metadata. */ +export interface LeaderboardRecord { + /** The ID of the leaderboard this score belongs to. */ + leaderboard_id: string; + /** The ID of the score owner, usually a user or group. */ + owner_id: string; + /** The username of the score owner, if the owner is a user. */ + username: string | undefined; + /** The score value. */ + score: number; + /** An optional subscore value. */ + subscore: number; + /** The number of submissions to this score record. */ + num_score: number; + /** Metadata. */ + metadata: string; + /** The UNIX time when the leaderboard record was created. */ + create_time: Date | undefined; + /** The UNIX time when the leaderboard record was updated. */ + update_time: Date | undefined; + /** The UNIX time when the leaderboard record expires. */ + expiry_time: Date | undefined; + /** The rank of this record. */ + rank: number; + /** The maximum number of score updates allowed by the owner. */ + max_num_score: number; +} +/** A set of leaderboard records, may be part of a leaderboard records page or a batch of individual records. */ +export interface LeaderboardRecordList { + /** A list of leaderboard records. */ + records: LeaderboardRecord[]; + /** A batched set of leaderboard records belonging to specified owners. */ + owner_records: LeaderboardRecord[]; + /** The cursor to send when retrieving the next page, if any. */ + next_cursor: string; + /** The cursor to send when retrieving the previous page, if any. */ + prev_cursor: string; +} +/** Leave a group. */ +export interface LeaveGroupRequest { + /** The group ID to leave. */ + group_id: string; +} +/** Link Facebook to the current user's account. */ +export interface LinkFacebookRequest { + /** The Facebook account details. */ + account: AccountFacebook | undefined; + /** Import Facebook friends for the user. */ + sync: boolean | undefined; +} +/** Link Steam to the current user's account. */ +export interface LinkSteamRequest { + /** The Facebook account details. */ + account: AccountSteam | undefined; + /** Import Steam friends for the user. */ + sync: boolean | undefined; +} +/** List a channel's message history. */ +export interface ListChannelMessagesRequest { + /** The channel ID to list from. */ + channel_id: string; + /** Max number of records to return. Between 1 and 100. */ + limit: number | undefined; + /** True if listing should be older messages to newer, false if reverse. */ + forward: boolean | undefined; + /** A pagination cursor, if any. */ + cursor: string; +} +/** List friends for a user. */ +export interface ListFriendsRequest { + /** Max number of records to return. Between 1 and 100. */ + limit: number | undefined; + /** The friend state to list. */ + state: number | undefined; + /** An optional next page cursor. */ + cursor: string; +} +/** List groups based on given filters. */ +export interface ListGroupsRequest { + /** List groups that contain this value in their names. */ + name: string; + /** Optional pagination cursor. */ + cursor: string; + /** Max number of groups to return. Between 1 and 100. */ + limit: number | undefined; + /** Language tag filter */ + lang_tag: string; + /** Number of group members */ + members: number | undefined; + /** Optional Open/Closed filter. */ + open: boolean | undefined; +} +/** List all users that are part of a group. */ +export interface ListGroupUsersRequest { + /** The group ID to list from. */ + group_id: string; + /** Max number of records to return. Between 1 and 100. */ + limit: number | undefined; + /** The group user state to list. */ + state: number | undefined; + /** An optional next page cursor. */ + cursor: string; +} +/** List leaerboard records from a given leaderboard around the owner. */ +export interface ListLeaderboardRecordsAroundOwnerRequest { + /** The ID of the tournament to list for. */ + leaderboard_id: string; + /** Max number of records to return. Between 1 and 100. */ + limit: number | undefined; + /** The owner to retrieve records around. */ + owner_id: string; + /** Expiry in seconds (since epoch) to begin fetching records from. */ + expiry: number | undefined; +} +/** List leaderboard records from a given leaderboard. */ +export interface ListLeaderboardRecordsRequest { + /** The ID of the leaderboard to list for. */ + leaderboard_id: string; + /** One or more owners to retrieve records for. */ + owner_ids: string[]; + /** Max number of records to return. Between 1 and 100. */ + limit: number | undefined; + /** A next or previous page cursor. */ + cursor: string; + /** Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time. */ + expiry: number | undefined; +} +/** List realtime matches. */ +export interface ListMatchesRequest { + /** Limit the number of returned matches. */ + limit: number | undefined; + /** Authoritative or relayed matches. */ + authoritative: boolean | undefined; + /** Label filter. */ + label: string | undefined; + /** Minimum user count. */ + min_size: number | undefined; + /** Maximum user count. */ + max_size: number | undefined; + /** Arbitrary label query. */ + query: string | undefined; +} +/** Get a list of unexpired notifications. */ +export interface ListNotificationsRequest { + /** The number of notifications to get. Between 1 and 100. */ + limit: number | undefined; + /** A cursor to page through notifications. May be cached by clients to get from point in time forwards. */ + cacheable_cursor: string; +} +/** List publicly readable storage objects in a given collection. */ +export interface ListStorageObjectsRequest { + /** ID of the user. */ + user_id: string; + /** The collection which stores the object. */ + collection: string; + /** The number of storage objects to list. Between 1 and 100. */ + limit: number | undefined; + /** The cursor to page through results from. */ + cursor: string; +} +/** List tournament records from a given tournament around the owner. */ +export interface ListTournamentRecordsAroundOwnerRequest { + /** The ID of the tournament to list for. */ + tournament_id: string; + /** Max number of records to return. Between 1 and 100. */ + limit: number | undefined; + /** The owner to retrieve records around. */ + owner_id: string; + /** Expiry in seconds (since epoch) to begin fetching records from. */ + expiry: number | undefined; +} +/** List tournament records from a given tournament. */ +export interface ListTournamentRecordsRequest { + /** The ID of the tournament to list for. */ + tournament_id: string; + /** One or more owners to retrieve records for. */ + owner_ids: string[]; + /** Max number of records to return. Between 1 and 100. */ + limit: number | undefined; + /** A next or previous page cursor. */ + cursor: string; + /** Expiry in seconds (since epoch) to begin fetching records from. */ + expiry: number | undefined; +} +/** List active/upcoming tournaments based on given filters. */ +export interface ListTournamentsRequest { + /** The start of the categories to include. Defaults to 0. */ + category_start: number | undefined; + /** The end of the categories to include. Defaults to 128. */ + category_end: number | undefined; + /** The start time for tournaments. Defaults to epoch. */ + start_time: number | undefined; + /** The end time for tournaments. Defaults to +1 year from current Unix time. */ + end_time: number | undefined; + /** Max number of records to return. Between 1 and 100. */ + limit: number | undefined; + /** A next page cursor for listings (optional). */ + cursor: string; +} +/** List the groups a user is part of, and their relationship to each. */ +export interface ListUserGroupsRequest { + /** ID of the user. */ + user_id: string; + /** Max number of records to return. Between 1 and 100. */ + limit: number | undefined; + /** The user group state to list. */ + state: number | undefined; + /** An optional next page cursor. */ + cursor: string; +} +/** Represents a realtime match. */ +export interface Match { + /** The ID of the match, can be used to join. */ + match_id: string; + /** True if it's an server-managed authoritative match, false otherwise. */ + authoritative: boolean; + /** Match label, if any. */ + label: string | undefined; + /** Current number of users in the match. */ + size: number; + /** Tick Rate */ + tick_rate: number; + /** Handler name */ + handler_name: string; +} +/** A list of realtime matches. */ +export interface MatchList { + /** A number of matches corresponding to a list operation. */ + matches: Match[]; +} +/** A notification in the server. */ +export interface Notification { + /** ID of the Notification. */ + id: string; + /** Subject of the notification. */ + subject: string; + /** Content of the notification in JSON. */ + content: string; + /** Category code for this notification. */ + code: number; + /** ID of the sender, if a user. Otherwise 'null'. */ + sender_id: string; + /** The UNIX time when the notification was created. */ + create_time: Date | undefined; + /** True if this notification was persisted to the database. */ + persistent: boolean; +} +/** A collection of zero or more notifications. */ +export interface NotificationList { + /** Collection of notifications. */ + notifications: Notification[]; + /** Use this cursor to paginate notifications. Cache this to catch up to new notifications. */ + cacheable_cursor: string; +} +/** Promote a set of users in a group to the next role up. */ +export interface PromoteGroupUsersRequest { + /** The group ID to promote in. */ + group_id: string; + /** The users to promote. */ + user_ids: string[]; +} +/** Demote a set of users in a group to the next role down. */ +export interface DemoteGroupUsersRequest { + /** The group ID to demote in. */ + group_id: string; + /** The users to demote. */ + user_ids: string[]; +} +/** Storage objects to get. */ +export interface ReadStorageObjectId { + /** The collection which stores the object. */ + collection: string; + /** The key of the object within the collection. */ + key: string; + /** The user owner of the object. */ + user_id: string; +} +/** Batch get storage objects. */ +export interface ReadStorageObjectsRequest { + /** Batch of storage objects. */ + object_ids: ReadStorageObjectId[]; +} +/** Execute an Lua function on the server. */ +export interface Rpc { + /** The identifier of the function. */ + id: string; + /** The payload of the function which must be a JSON object. */ + payload: string; + /** The authentication key used when executed as a non-client HTTP request. */ + http_key: string; +} +/** A user's session used to authenticate messages. */ +export interface Session { + /** True if the corresponding account was just created, false otherwise. */ + created: boolean; + /** Authentication credentials. */ + token: string; + /** Refresh token that can be used for session token renewal. */ + refresh_token: string; +} +/** An object within the storage engine. */ +export interface StorageObject { + /** The collection which stores the object. */ + collection: string; + /** The key of the object within the collection. */ + key: string; + /** The user owner of the object. */ + user_id: string; + /** The value of the object. */ + value: string; + /** The version hash of the object. */ + version: string; + /** The read access permissions for the object. */ + permission_read: number; + /** The write access permissions for the object. */ + permission_write: number; + /** The UNIX time when the object was created. */ + create_time: Date | undefined; + /** The UNIX time when the object was last updated. */ + update_time: Date | undefined; +} +/** A storage acknowledgement. */ +export interface StorageObjectAck { + /** The collection which stores the object. */ + collection: string; + /** The key of the object within the collection. */ + key: string; + /** The version hash of the object. */ + version: string; + /** The owner of the object. */ + user_id: string; +} +/** Batch of acknowledgements for the storage object write. */ +export interface StorageObjectAcks { + /** Batch of storage write acknowledgements. */ + acks: StorageObjectAck[]; +} +/** Batch of storage objects. */ +export interface StorageObjects { + /** The batch of storage objects. */ + objects: StorageObject[]; +} +/** List of storage objects. */ +export interface StorageObjectList { + /** The list of storage objects. */ + objects: StorageObject[]; + /** The cursor for the next page of results, if any. */ + cursor: string; +} +/** A tournament on the server. */ +export interface Tournament { + /** The ID of the tournament. */ + id: string; + /** The title for the tournament. */ + title: string; + /** The description of the tournament. May be blank. */ + description: string; + /** The category of the tournament. e.g. "vip" could be category 1. */ + category: number; + /** ASC (0) or DESC (1) sort mode of scores in the tournament. */ + sort_order: number; + /** The current number of players in the tournament. */ + size: number; + /** The maximum number of players for the tournament. */ + max_size: number; + /** The maximum score updates allowed per player for the current tournament. */ + max_num_score: number; + /** True if the tournament is active and can enter. A computed value. */ + can_enter: boolean; + /** The UNIX time when the tournament stops being active until next reset. A computed value. */ + end_active: number; + /** The UNIX time when the tournament is next playable. A computed value. */ + next_reset: number; + /** Additional information stored as a JSON object. */ + metadata: string; + /** The UNIX time when the tournament was created. */ + create_time: Date | undefined; + /** The UNIX time when the tournament will start. */ + start_time: Date | undefined; + /** The UNIX time when the tournament will be stopped. */ + end_time: Date | undefined; + /** Duration of the tournament in seconds. */ + duration: number; + /** The UNIX time when the tournament start being active. A computed value. */ + start_active: number; + /** The UNIX time when the tournament was last reset. A computed value. */ + prev_reset: number; + /** Operator. */ + operator: Operator; +} +/** A list of tournaments. */ +export interface TournamentList { + /** The list of tournaments returned. */ + tournaments: Tournament[]; + /** A pagination cursor (optional). */ + cursor: string; +} +/** A set of tournament records which may be part of a tournament records page or a batch of individual records. */ +export interface TournamentRecordList { + /** A list of tournament records. */ + records: LeaderboardRecord[]; + /** A batched set of tournament records belonging to specified owners. */ + owner_records: LeaderboardRecord[]; + /** The cursor to send when retireving the next page (optional). */ + next_cursor: string; + /** The cursor to send when retrieving the previous page (optional). */ + prev_cursor: string; +} +/** Update a user's account details. */ +export interface UpdateAccountRequest { + /** The username of the user's account. */ + username: string | undefined; + /** The display name of the user. */ + display_name: string | undefined; + /** A URL for an avatar image. */ + avatar_url: string | undefined; + /** The language expected to be a tag which follows the BCP-47 spec. */ + lang_tag: string | undefined; + /** The location set by the user. */ + location: string | undefined; + /** The timezone set by the user. */ + timezone: string | undefined; +} +/** Update fields in a given group. */ +export interface UpdateGroupRequest { + /** The ID of the group to update. */ + group_id: string; + /** Name. */ + name: string | undefined; + /** Description string. */ + description: string | undefined; + /** Lang tag. */ + lang_tag: string | undefined; + /** Avatar URL. */ + avatar_url: string | undefined; + /** Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin. */ + open: boolean | undefined; +} +/** A user in the server. */ +export interface User { + /** The id of the user's account. */ + id: string; + /** The username of the user's account. */ + username: string; + /** The display name of the user. */ + display_name: string; + /** A URL for an avatar image. */ + avatar_url: string; + /** The language expected to be a tag which follows the BCP-47 spec. */ + lang_tag: string; + /** The location set by the user. */ + location: string; + /** The timezone set by the user. */ + timezone: string; + /** Additional information stored as a JSON object. */ + metadata: string; + /** The Facebook id in the user's account. */ + facebook_id: string; + /** The Google id in the user's account. */ + google_id: string; + /** The Apple Game Center in of the user's account. */ + gamecenter_id: string; + /** The Steam id in the user's account. */ + steam_id: string; + /** Indicates whether the user is currently online. */ + online: boolean; + /** Number of related edges to this user. */ + edge_count: number; + /** The UNIX time when the user was created. */ + create_time: Date | undefined; + /** The UNIX time when the user was last updated. */ + update_time: Date | undefined; + /** The Facebook Instant Game ID in the user's account. */ + facebook_instant_game_id: string; + /** The Apple Sign In ID in the user's account. */ + apple_id: string; +} +/** A list of groups belonging to a user, along with the user's role in each group. */ +export interface UserGroupList { + /** Group-role pairs for a user. */ + user_groups: UserGroupList_UserGroup[]; + /** Cursor for the next page of results, if any. */ + cursor: string; +} +/** A single group-role pair. */ +export interface UserGroupList_UserGroup { + /** Group. */ + group: Group | undefined; + /** The user's relationship to the group. */ + state: number | undefined; +} +/** The group role status. */ +export declare enum UserGroupList_UserGroup_State { + /** SUPERADMIN - The user is a superadmin with full control of the group. */ + SUPERADMIN = 0, + /** ADMIN - The user is an admin with additional privileges. */ + ADMIN = 1, + /** MEMBER - The user is a regular member. */ + MEMBER = 2, + /** JOIN_REQUEST - The user has requested to join the group */ + JOIN_REQUEST = 3, + UNRECOGNIZED = -1 +} +export declare function userGroupList_UserGroup_StateFromJSON(object: any): UserGroupList_UserGroup_State; +export declare function userGroupList_UserGroup_StateToJSON(object: UserGroupList_UserGroup_State): string; +/** A collection of zero or more users. */ +export interface Users { + /** The User objects. */ + users: User[]; +} +/** Apple IAP Purchases validation request */ +export interface ValidatePurchaseAppleRequest { + /** Base64 encoded Apple receipt data payload. */ + receipt: string; +} +/** Google IAP Purchase validation request */ +export interface ValidatePurchaseGoogleRequest { + /** JSON encoded Google purchase payload. */ + purchase: string; +} +/** Huawei IAP Purchase validation request */ +export interface ValidatePurchaseHuaweiRequest { + /** JSON encoded Huawei InAppPurchaseData. */ + purchase: string; + /** InAppPurchaseData signature. */ + signature: string; +} +/** Validated Purchase stored by Nakama. */ +export interface ValidatedPurchase { + /** Purchase Product ID. */ + product_id: string; + /** Purchase Transaction ID. */ + transaction_id: string; + /** Store identifier */ + store: ValidatedPurchase_Store; + /** UNIX Timestamp when the purchase was done. */ + purchase_time: Date | undefined; + /** UNIX Timestamp when the receipt validation was stored in DB. */ + create_time: Date | undefined; + /** UNIX Timestamp when the receipt validation was updated in DB. */ + update_time: Date | undefined; + /** Raw provider validation response. */ + provider_response: string; + /** Whether the purchase was done in production or sandbox environment. */ + environment: ValidatedPurchase_Environment; + /** Whether the purchase had already been validated by Nakama before. */ + seen_before: boolean; +} +/** Validation Provider */ +export declare enum ValidatedPurchase_Store { + /** APPLE_APP_STORE - Apple App Store */ + APPLE_APP_STORE = 0, + /** GOOGLE_PLAY_STORE - Google Play Store */ + GOOGLE_PLAY_STORE = 1, + /** HUAWEI_APP_GALLERY - Huawei App Gallery */ + HUAWEI_APP_GALLERY = 2, + UNRECOGNIZED = -1 +} +export declare function validatedPurchase_StoreFromJSON(object: any): ValidatedPurchase_Store; +export declare function validatedPurchase_StoreToJSON(object: ValidatedPurchase_Store): string; +/** Environment where the purchase took place */ +export declare enum ValidatedPurchase_Environment { + /** UNKNOWN - Unknown environment. */ + UNKNOWN = 0, + /** SANDBOX - Sandbox/test environment. */ + SANDBOX = 1, + /** PRODUCTION - Production environment. */ + PRODUCTION = 2, + UNRECOGNIZED = -1 +} +export declare function validatedPurchase_EnvironmentFromJSON(object: any): ValidatedPurchase_Environment; +export declare function validatedPurchase_EnvironmentToJSON(object: ValidatedPurchase_Environment): string; +/** Validate IAP response */ +export interface ValidatePurchaseResponse { + /** Newly seen validated purchases. */ + validated_purchases: ValidatedPurchase[]; +} +/** A list of validated purchases stored by Nakama. */ +export interface PurchaseList { + /** Stored validated purchases. */ + validated_purchases: ValidatedPurchase[]; + /** The cursor to send when retrieving the next page, if any. */ + cursor: string; +} +/** A request to submit a score to a leaderboard. */ +export interface WriteLeaderboardRecordRequest { + /** The ID of the leaderboard to write to. */ + leaderboard_id: string; + /** Record input. */ + record: WriteLeaderboardRecordRequest_LeaderboardRecordWrite | undefined; +} +/** Record values to write. */ +export interface WriteLeaderboardRecordRequest_LeaderboardRecordWrite { + /** The score value to submit. */ + score: number; + /** An optional secondary value. */ + subscore: number; + /** Optional record metadata. */ + metadata: string; + /** Operator override. */ + operator: Operator; +} +/** The object to store. */ +export interface WriteStorageObject { + /** The collection to store the object. */ + collection: string; + /** The key for the object within the collection. */ + key: string; + /** The value of the object. */ + value: string; + /** The version hash of the object to check. Possible values are: ["", "*", "#hash#"]. */ + version: string; + /** The read access permissions for the object. */ + permission_read: number | undefined; + /** The write access permissions for the object. */ + permission_write: number | undefined; +} +/** Write objects to the storage engine. */ +export interface WriteStorageObjectsRequest { + /** The objects to store on the server. */ + objects: WriteStorageObject[]; +} +/** A request to submit a score to a tournament. */ +export interface WriteTournamentRecordRequest { + /** The tournament ID to write the record for. */ + tournament_id: string; + /** Record input. */ + record: WriteTournamentRecordRequest_TournamentRecordWrite | undefined; +} +/** Record values to write. */ +export interface WriteTournamentRecordRequest_TournamentRecordWrite { + /** The score value to submit. */ + score: number; + /** An optional secondary value. */ + subscore: number; + /** A JSON object of additional properties (optional). */ + metadata: string; + /** Operator override. */ + operator: Operator; +} +export declare const Account: { + encode(message: Account, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Account; + fromJSON(object: any): Account; + toJSON(message: Account): unknown; + fromPartial(object: DeepPartial): Account; +}; +export declare const AccountRefresh: { + encode(message: AccountRefresh, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountRefresh; + fromJSON(object: any): AccountRefresh; + toJSON(message: AccountRefresh): unknown; + fromPartial(object: DeepPartial): AccountRefresh; +}; +export declare const AccountRefresh_VarsEntry: { + encode(message: AccountRefresh_VarsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountRefresh_VarsEntry; + fromJSON(object: any): AccountRefresh_VarsEntry; + toJSON(message: AccountRefresh_VarsEntry): unknown; + fromPartial(object: DeepPartial): AccountRefresh_VarsEntry; +}; +export declare const AccountApple: { + encode(message: AccountApple, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountApple; + fromJSON(object: any): AccountApple; + toJSON(message: AccountApple): unknown; + fromPartial(object: DeepPartial): AccountApple; +}; +export declare const AccountApple_VarsEntry: { + encode(message: AccountApple_VarsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountApple_VarsEntry; + fromJSON(object: any): AccountApple_VarsEntry; + toJSON(message: AccountApple_VarsEntry): unknown; + fromPartial(object: DeepPartial): AccountApple_VarsEntry; +}; +export declare const AccountCustom: { + encode(message: AccountCustom, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountCustom; + fromJSON(object: any): AccountCustom; + toJSON(message: AccountCustom): unknown; + fromPartial(object: DeepPartial): AccountCustom; +}; +export declare const AccountCustom_VarsEntry: { + encode(message: AccountCustom_VarsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountCustom_VarsEntry; + fromJSON(object: any): AccountCustom_VarsEntry; + toJSON(message: AccountCustom_VarsEntry): unknown; + fromPartial(object: DeepPartial): AccountCustom_VarsEntry; +}; +export declare const AccountDevice: { + encode(message: AccountDevice, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountDevice; + fromJSON(object: any): AccountDevice; + toJSON(message: AccountDevice): unknown; + fromPartial(object: DeepPartial): AccountDevice; +}; +export declare const AccountDevice_VarsEntry: { + encode(message: AccountDevice_VarsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountDevice_VarsEntry; + fromJSON(object: any): AccountDevice_VarsEntry; + toJSON(message: AccountDevice_VarsEntry): unknown; + fromPartial(object: DeepPartial): AccountDevice_VarsEntry; +}; +export declare const AccountEmail: { + encode(message: AccountEmail, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountEmail; + fromJSON(object: any): AccountEmail; + toJSON(message: AccountEmail): unknown; + fromPartial(object: DeepPartial): AccountEmail; +}; +export declare const AccountEmail_VarsEntry: { + encode(message: AccountEmail_VarsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountEmail_VarsEntry; + fromJSON(object: any): AccountEmail_VarsEntry; + toJSON(message: AccountEmail_VarsEntry): unknown; + fromPartial(object: DeepPartial): AccountEmail_VarsEntry; +}; +export declare const AccountFacebook: { + encode(message: AccountFacebook, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountFacebook; + fromJSON(object: any): AccountFacebook; + toJSON(message: AccountFacebook): unknown; + fromPartial(object: DeepPartial): AccountFacebook; +}; +export declare const AccountFacebook_VarsEntry: { + encode(message: AccountFacebook_VarsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountFacebook_VarsEntry; + fromJSON(object: any): AccountFacebook_VarsEntry; + toJSON(message: AccountFacebook_VarsEntry): unknown; + fromPartial(object: DeepPartial): AccountFacebook_VarsEntry; +}; +export declare const AccountFacebookInstantGame: { + encode(message: AccountFacebookInstantGame, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountFacebookInstantGame; + fromJSON(object: any): AccountFacebookInstantGame; + toJSON(message: AccountFacebookInstantGame): unknown; + fromPartial(object: DeepPartial): AccountFacebookInstantGame; +}; +export declare const AccountFacebookInstantGame_VarsEntry: { + encode(message: AccountFacebookInstantGame_VarsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountFacebookInstantGame_VarsEntry; + fromJSON(object: any): AccountFacebookInstantGame_VarsEntry; + toJSON(message: AccountFacebookInstantGame_VarsEntry): unknown; + fromPartial(object: DeepPartial): AccountFacebookInstantGame_VarsEntry; +}; +export declare const AccountGameCenter: { + encode(message: AccountGameCenter, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountGameCenter; + fromJSON(object: any): AccountGameCenter; + toJSON(message: AccountGameCenter): unknown; + fromPartial(object: DeepPartial): AccountGameCenter; +}; +export declare const AccountGameCenter_VarsEntry: { + encode(message: AccountGameCenter_VarsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountGameCenter_VarsEntry; + fromJSON(object: any): AccountGameCenter_VarsEntry; + toJSON(message: AccountGameCenter_VarsEntry): unknown; + fromPartial(object: DeepPartial): AccountGameCenter_VarsEntry; +}; +export declare const AccountGoogle: { + encode(message: AccountGoogle, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountGoogle; + fromJSON(object: any): AccountGoogle; + toJSON(message: AccountGoogle): unknown; + fromPartial(object: DeepPartial): AccountGoogle; +}; +export declare const AccountGoogle_VarsEntry: { + encode(message: AccountGoogle_VarsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountGoogle_VarsEntry; + fromJSON(object: any): AccountGoogle_VarsEntry; + toJSON(message: AccountGoogle_VarsEntry): unknown; + fromPartial(object: DeepPartial): AccountGoogle_VarsEntry; +}; +export declare const AccountSteam: { + encode(message: AccountSteam, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountSteam; + fromJSON(object: any): AccountSteam; + toJSON(message: AccountSteam): unknown; + fromPartial(object: DeepPartial): AccountSteam; +}; +export declare const AccountSteam_VarsEntry: { + encode(message: AccountSteam_VarsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AccountSteam_VarsEntry; + fromJSON(object: any): AccountSteam_VarsEntry; + toJSON(message: AccountSteam_VarsEntry): unknown; + fromPartial(object: DeepPartial): AccountSteam_VarsEntry; +}; +export declare const AddFriendsRequest: { + encode(message: AddFriendsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AddFriendsRequest; + fromJSON(object: any): AddFriendsRequest; + toJSON(message: AddFriendsRequest): unknown; + fromPartial(object: DeepPartial): AddFriendsRequest; +}; +export declare const AddGroupUsersRequest: { + encode(message: AddGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AddGroupUsersRequest; + fromJSON(object: any): AddGroupUsersRequest; + toJSON(message: AddGroupUsersRequest): unknown; + fromPartial(object: DeepPartial): AddGroupUsersRequest; +}; +export declare const SessionRefreshRequest: { + encode(message: SessionRefreshRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SessionRefreshRequest; + fromJSON(object: any): SessionRefreshRequest; + toJSON(message: SessionRefreshRequest): unknown; + fromPartial(object: DeepPartial): SessionRefreshRequest; +}; +export declare const SessionRefreshRequest_VarsEntry: { + encode(message: SessionRefreshRequest_VarsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SessionRefreshRequest_VarsEntry; + fromJSON(object: any): SessionRefreshRequest_VarsEntry; + toJSON(message: SessionRefreshRequest_VarsEntry): unknown; + fromPartial(object: DeepPartial): SessionRefreshRequest_VarsEntry; +}; +export declare const SessionLogoutRequest: { + encode(message: SessionLogoutRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SessionLogoutRequest; + fromJSON(object: any): SessionLogoutRequest; + toJSON(message: SessionLogoutRequest): unknown; + fromPartial(object: DeepPartial): SessionLogoutRequest; +}; +export declare const AuthenticateAppleRequest: { + encode(message: AuthenticateAppleRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateAppleRequest; + fromJSON(object: any): AuthenticateAppleRequest; + toJSON(message: AuthenticateAppleRequest): unknown; + fromPartial(object: DeepPartial): AuthenticateAppleRequest; +}; +export declare const AuthenticateCustomRequest: { + encode(message: AuthenticateCustomRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateCustomRequest; + fromJSON(object: any): AuthenticateCustomRequest; + toJSON(message: AuthenticateCustomRequest): unknown; + fromPartial(object: DeepPartial): AuthenticateCustomRequest; +}; +export declare const AuthenticateDeviceRequest: { + encode(message: AuthenticateDeviceRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateDeviceRequest; + fromJSON(object: any): AuthenticateDeviceRequest; + toJSON(message: AuthenticateDeviceRequest): unknown; + fromPartial(object: DeepPartial): AuthenticateDeviceRequest; +}; +export declare const AuthenticateEmailRequest: { + encode(message: AuthenticateEmailRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateEmailRequest; + fromJSON(object: any): AuthenticateEmailRequest; + toJSON(message: AuthenticateEmailRequest): unknown; + fromPartial(object: DeepPartial): AuthenticateEmailRequest; +}; +export declare const AuthenticateFacebookRequest: { + encode(message: AuthenticateFacebookRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateFacebookRequest; + fromJSON(object: any): AuthenticateFacebookRequest; + toJSON(message: AuthenticateFacebookRequest): unknown; + fromPartial(object: DeepPartial): AuthenticateFacebookRequest; +}; +export declare const AuthenticateFacebookInstantGameRequest: { + encode(message: AuthenticateFacebookInstantGameRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateFacebookInstantGameRequest; + fromJSON(object: any): AuthenticateFacebookInstantGameRequest; + toJSON(message: AuthenticateFacebookInstantGameRequest): unknown; + fromPartial(object: DeepPartial): AuthenticateFacebookInstantGameRequest; +}; +export declare const AuthenticateGameCenterRequest: { + encode(message: AuthenticateGameCenterRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateGameCenterRequest; + fromJSON(object: any): AuthenticateGameCenterRequest; + toJSON(message: AuthenticateGameCenterRequest): unknown; + fromPartial(object: DeepPartial): AuthenticateGameCenterRequest; +}; +export declare const AuthenticateGoogleRequest: { + encode(message: AuthenticateGoogleRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateGoogleRequest; + fromJSON(object: any): AuthenticateGoogleRequest; + toJSON(message: AuthenticateGoogleRequest): unknown; + fromPartial(object: DeepPartial): AuthenticateGoogleRequest; +}; +export declare const AuthenticateSteamRequest: { + encode(message: AuthenticateSteamRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateSteamRequest; + fromJSON(object: any): AuthenticateSteamRequest; + toJSON(message: AuthenticateSteamRequest): unknown; + fromPartial(object: DeepPartial): AuthenticateSteamRequest; +}; +export declare const BanGroupUsersRequest: { + encode(message: BanGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): BanGroupUsersRequest; + fromJSON(object: any): BanGroupUsersRequest; + toJSON(message: BanGroupUsersRequest): unknown; + fromPartial(object: DeepPartial): BanGroupUsersRequest; +}; +export declare const BlockFriendsRequest: { + encode(message: BlockFriendsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): BlockFriendsRequest; + fromJSON(object: any): BlockFriendsRequest; + toJSON(message: BlockFriendsRequest): unknown; + fromPartial(object: DeepPartial): BlockFriendsRequest; +}; +export declare const ChannelMessage: { + encode(message: ChannelMessage, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessage; + fromJSON(object: any): ChannelMessage; + toJSON(message: ChannelMessage): unknown; + fromPartial(object: DeepPartial): ChannelMessage; +}; +export declare const ChannelMessageList: { + encode(message: ChannelMessageList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessageList; + fromJSON(object: any): ChannelMessageList; + toJSON(message: ChannelMessageList): unknown; + fromPartial(object: DeepPartial): ChannelMessageList; +}; +export declare const CreateGroupRequest: { + encode(message: CreateGroupRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupRequest; + fromJSON(object: any): CreateGroupRequest; + toJSON(message: CreateGroupRequest): unknown; + fromPartial(object: DeepPartial): CreateGroupRequest; +}; +export declare const DeleteFriendsRequest: { + encode(message: DeleteFriendsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteFriendsRequest; + fromJSON(object: any): DeleteFriendsRequest; + toJSON(message: DeleteFriendsRequest): unknown; + fromPartial(object: DeepPartial): DeleteFriendsRequest; +}; +export declare const DeleteGroupRequest: { + encode(message: DeleteGroupRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteGroupRequest; + fromJSON(object: any): DeleteGroupRequest; + toJSON(message: DeleteGroupRequest): unknown; + fromPartial(object: DeepPartial): DeleteGroupRequest; +}; +export declare const DeleteLeaderboardRecordRequest: { + encode(message: DeleteLeaderboardRecordRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteLeaderboardRecordRequest; + fromJSON(object: any): DeleteLeaderboardRecordRequest; + toJSON(message: DeleteLeaderboardRecordRequest): unknown; + fromPartial(object: DeepPartial): DeleteLeaderboardRecordRequest; +}; +export declare const DeleteNotificationsRequest: { + encode(message: DeleteNotificationsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteNotificationsRequest; + fromJSON(object: any): DeleteNotificationsRequest; + toJSON(message: DeleteNotificationsRequest): unknown; + fromPartial(object: DeepPartial): DeleteNotificationsRequest; +}; +export declare const DeleteStorageObjectId: { + encode(message: DeleteStorageObjectId, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteStorageObjectId; + fromJSON(object: any): DeleteStorageObjectId; + toJSON(message: DeleteStorageObjectId): unknown; + fromPartial(object: DeepPartial): DeleteStorageObjectId; +}; +export declare const DeleteStorageObjectsRequest: { + encode(message: DeleteStorageObjectsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteStorageObjectsRequest; + fromJSON(object: any): DeleteStorageObjectsRequest; + toJSON(message: DeleteStorageObjectsRequest): unknown; + fromPartial(object: DeepPartial): DeleteStorageObjectsRequest; +}; +export declare const Event: { + encode(message: Event, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Event; + fromJSON(object: any): Event; + toJSON(message: Event): unknown; + fromPartial(object: DeepPartial): Event; +}; +export declare const Event_PropertiesEntry: { + encode(message: Event_PropertiesEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Event_PropertiesEntry; + fromJSON(object: any): Event_PropertiesEntry; + toJSON(message: Event_PropertiesEntry): unknown; + fromPartial(object: DeepPartial): Event_PropertiesEntry; +}; +export declare const Friend: { + encode(message: Friend, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Friend; + fromJSON(object: any): Friend; + toJSON(message: Friend): unknown; + fromPartial(object: DeepPartial): Friend; +}; +export declare const FriendList: { + encode(message: FriendList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): FriendList; + fromJSON(object: any): FriendList; + toJSON(message: FriendList): unknown; + fromPartial(object: DeepPartial): FriendList; +}; +export declare const GetUsersRequest: { + encode(message: GetUsersRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): GetUsersRequest; + fromJSON(object: any): GetUsersRequest; + toJSON(message: GetUsersRequest): unknown; + fromPartial(object: DeepPartial): GetUsersRequest; +}; +export declare const Group: { + encode(message: Group, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Group; + fromJSON(object: any): Group; + toJSON(message: Group): unknown; + fromPartial(object: DeepPartial): Group; +}; +export declare const GroupList: { + encode(message: GroupList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): GroupList; + fromJSON(object: any): GroupList; + toJSON(message: GroupList): unknown; + fromPartial(object: DeepPartial): GroupList; +}; +export declare const GroupUserList: { + encode(message: GroupUserList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): GroupUserList; + fromJSON(object: any): GroupUserList; + toJSON(message: GroupUserList): unknown; + fromPartial(object: DeepPartial): GroupUserList; +}; +export declare const GroupUserList_GroupUser: { + encode(message: GroupUserList_GroupUser, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): GroupUserList_GroupUser; + fromJSON(object: any): GroupUserList_GroupUser; + toJSON(message: GroupUserList_GroupUser): unknown; + fromPartial(object: DeepPartial): GroupUserList_GroupUser; +}; +export declare const ImportFacebookFriendsRequest: { + encode(message: ImportFacebookFriendsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ImportFacebookFriendsRequest; + fromJSON(object: any): ImportFacebookFriendsRequest; + toJSON(message: ImportFacebookFriendsRequest): unknown; + fromPartial(object: DeepPartial): ImportFacebookFriendsRequest; +}; +export declare const ImportSteamFriendsRequest: { + encode(message: ImportSteamFriendsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ImportSteamFriendsRequest; + fromJSON(object: any): ImportSteamFriendsRequest; + toJSON(message: ImportSteamFriendsRequest): unknown; + fromPartial(object: DeepPartial): ImportSteamFriendsRequest; +}; +export declare const JoinGroupRequest: { + encode(message: JoinGroupRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): JoinGroupRequest; + fromJSON(object: any): JoinGroupRequest; + toJSON(message: JoinGroupRequest): unknown; + fromPartial(object: DeepPartial): JoinGroupRequest; +}; +export declare const JoinTournamentRequest: { + encode(message: JoinTournamentRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): JoinTournamentRequest; + fromJSON(object: any): JoinTournamentRequest; + toJSON(message: JoinTournamentRequest): unknown; + fromPartial(object: DeepPartial): JoinTournamentRequest; +}; +export declare const KickGroupUsersRequest: { + encode(message: KickGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): KickGroupUsersRequest; + fromJSON(object: any): KickGroupUsersRequest; + toJSON(message: KickGroupUsersRequest): unknown; + fromPartial(object: DeepPartial): KickGroupUsersRequest; +}; +export declare const Leaderboard: { + encode(message: Leaderboard, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Leaderboard; + fromJSON(object: any): Leaderboard; + toJSON(message: Leaderboard): unknown; + fromPartial(object: DeepPartial): Leaderboard; +}; +export declare const LeaderboardList: { + encode(message: LeaderboardList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): LeaderboardList; + fromJSON(object: any): LeaderboardList; + toJSON(message: LeaderboardList): unknown; + fromPartial(object: DeepPartial): LeaderboardList; +}; +export declare const LeaderboardRecord: { + encode(message: LeaderboardRecord, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): LeaderboardRecord; + fromJSON(object: any): LeaderboardRecord; + toJSON(message: LeaderboardRecord): unknown; + fromPartial(object: DeepPartial): LeaderboardRecord; +}; +export declare const LeaderboardRecordList: { + encode(message: LeaderboardRecordList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): LeaderboardRecordList; + fromJSON(object: any): LeaderboardRecordList; + toJSON(message: LeaderboardRecordList): unknown; + fromPartial(object: DeepPartial): LeaderboardRecordList; +}; +export declare const LeaveGroupRequest: { + encode(message: LeaveGroupRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): LeaveGroupRequest; + fromJSON(object: any): LeaveGroupRequest; + toJSON(message: LeaveGroupRequest): unknown; + fromPartial(object: DeepPartial): LeaveGroupRequest; +}; +export declare const LinkFacebookRequest: { + encode(message: LinkFacebookRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): LinkFacebookRequest; + fromJSON(object: any): LinkFacebookRequest; + toJSON(message: LinkFacebookRequest): unknown; + fromPartial(object: DeepPartial): LinkFacebookRequest; +}; +export declare const LinkSteamRequest: { + encode(message: LinkSteamRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): LinkSteamRequest; + fromJSON(object: any): LinkSteamRequest; + toJSON(message: LinkSteamRequest): unknown; + fromPartial(object: DeepPartial): LinkSteamRequest; +}; +export declare const ListChannelMessagesRequest: { + encode(message: ListChannelMessagesRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListChannelMessagesRequest; + fromJSON(object: any): ListChannelMessagesRequest; + toJSON(message: ListChannelMessagesRequest): unknown; + fromPartial(object: DeepPartial): ListChannelMessagesRequest; +}; +export declare const ListFriendsRequest: { + encode(message: ListFriendsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListFriendsRequest; + fromJSON(object: any): ListFriendsRequest; + toJSON(message: ListFriendsRequest): unknown; + fromPartial(object: DeepPartial): ListFriendsRequest; +}; +export declare const ListGroupsRequest: { + encode(message: ListGroupsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListGroupsRequest; + fromJSON(object: any): ListGroupsRequest; + toJSON(message: ListGroupsRequest): unknown; + fromPartial(object: DeepPartial): ListGroupsRequest; +}; +export declare const ListGroupUsersRequest: { + encode(message: ListGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListGroupUsersRequest; + fromJSON(object: any): ListGroupUsersRequest; + toJSON(message: ListGroupUsersRequest): unknown; + fromPartial(object: DeepPartial): ListGroupUsersRequest; +}; +export declare const ListLeaderboardRecordsAroundOwnerRequest: { + encode(message: ListLeaderboardRecordsAroundOwnerRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListLeaderboardRecordsAroundOwnerRequest; + fromJSON(object: any): ListLeaderboardRecordsAroundOwnerRequest; + toJSON(message: ListLeaderboardRecordsAroundOwnerRequest): unknown; + fromPartial(object: DeepPartial): ListLeaderboardRecordsAroundOwnerRequest; +}; +export declare const ListLeaderboardRecordsRequest: { + encode(message: ListLeaderboardRecordsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListLeaderboardRecordsRequest; + fromJSON(object: any): ListLeaderboardRecordsRequest; + toJSON(message: ListLeaderboardRecordsRequest): unknown; + fromPartial(object: DeepPartial): ListLeaderboardRecordsRequest; +}; +export declare const ListMatchesRequest: { + encode(message: ListMatchesRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListMatchesRequest; + fromJSON(object: any): ListMatchesRequest; + toJSON(message: ListMatchesRequest): unknown; + fromPartial(object: DeepPartial): ListMatchesRequest; +}; +export declare const ListNotificationsRequest: { + encode(message: ListNotificationsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListNotificationsRequest; + fromJSON(object: any): ListNotificationsRequest; + toJSON(message: ListNotificationsRequest): unknown; + fromPartial(object: DeepPartial): ListNotificationsRequest; +}; +export declare const ListStorageObjectsRequest: { + encode(message: ListStorageObjectsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListStorageObjectsRequest; + fromJSON(object: any): ListStorageObjectsRequest; + toJSON(message: ListStorageObjectsRequest): unknown; + fromPartial(object: DeepPartial): ListStorageObjectsRequest; +}; +export declare const ListTournamentRecordsAroundOwnerRequest: { + encode(message: ListTournamentRecordsAroundOwnerRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListTournamentRecordsAroundOwnerRequest; + fromJSON(object: any): ListTournamentRecordsAroundOwnerRequest; + toJSON(message: ListTournamentRecordsAroundOwnerRequest): unknown; + fromPartial(object: DeepPartial): ListTournamentRecordsAroundOwnerRequest; +}; +export declare const ListTournamentRecordsRequest: { + encode(message: ListTournamentRecordsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListTournamentRecordsRequest; + fromJSON(object: any): ListTournamentRecordsRequest; + toJSON(message: ListTournamentRecordsRequest): unknown; + fromPartial(object: DeepPartial): ListTournamentRecordsRequest; +}; +export declare const ListTournamentsRequest: { + encode(message: ListTournamentsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListTournamentsRequest; + fromJSON(object: any): ListTournamentsRequest; + toJSON(message: ListTournamentsRequest): unknown; + fromPartial(object: DeepPartial): ListTournamentsRequest; +}; +export declare const ListUserGroupsRequest: { + encode(message: ListUserGroupsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListUserGroupsRequest; + fromJSON(object: any): ListUserGroupsRequest; + toJSON(message: ListUserGroupsRequest): unknown; + fromPartial(object: DeepPartial): ListUserGroupsRequest; +}; +export declare const Match: { + encode(message: Match, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Match; + fromJSON(object: any): Match; + toJSON(message: Match): unknown; + fromPartial(object: DeepPartial): Match; +}; +export declare const MatchList: { + encode(message: MatchList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchList; + fromJSON(object: any): MatchList; + toJSON(message: MatchList): unknown; + fromPartial(object: DeepPartial): MatchList; +}; +export declare const Notification: { + encode(message: Notification, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Notification; + fromJSON(object: any): Notification; + toJSON(message: Notification): unknown; + fromPartial(object: DeepPartial): Notification; +}; +export declare const NotificationList: { + encode(message: NotificationList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): NotificationList; + fromJSON(object: any): NotificationList; + toJSON(message: NotificationList): unknown; + fromPartial(object: DeepPartial): NotificationList; +}; +export declare const PromoteGroupUsersRequest: { + encode(message: PromoteGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PromoteGroupUsersRequest; + fromJSON(object: any): PromoteGroupUsersRequest; + toJSON(message: PromoteGroupUsersRequest): unknown; + fromPartial(object: DeepPartial): PromoteGroupUsersRequest; +}; +export declare const DemoteGroupUsersRequest: { + encode(message: DemoteGroupUsersRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): DemoteGroupUsersRequest; + fromJSON(object: any): DemoteGroupUsersRequest; + toJSON(message: DemoteGroupUsersRequest): unknown; + fromPartial(object: DeepPartial): DemoteGroupUsersRequest; +}; +export declare const ReadStorageObjectId: { + encode(message: ReadStorageObjectId, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ReadStorageObjectId; + fromJSON(object: any): ReadStorageObjectId; + toJSON(message: ReadStorageObjectId): unknown; + fromPartial(object: DeepPartial): ReadStorageObjectId; +}; +export declare const ReadStorageObjectsRequest: { + encode(message: ReadStorageObjectsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ReadStorageObjectsRequest; + fromJSON(object: any): ReadStorageObjectsRequest; + toJSON(message: ReadStorageObjectsRequest): unknown; + fromPartial(object: DeepPartial): ReadStorageObjectsRequest; +}; +export declare const Rpc: { + encode(message: Rpc, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Rpc; + fromJSON(object: any): Rpc; + toJSON(message: Rpc): unknown; + fromPartial(object: DeepPartial): Rpc; +}; +export declare const Session: { + encode(message: Session, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Session; + fromJSON(object: any): Session; + toJSON(message: Session): unknown; + fromPartial(object: DeepPartial): Session; +}; +export declare const StorageObject: { + encode(message: StorageObject, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): StorageObject; + fromJSON(object: any): StorageObject; + toJSON(message: StorageObject): unknown; + fromPartial(object: DeepPartial): StorageObject; +}; +export declare const StorageObjectAck: { + encode(message: StorageObjectAck, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjectAck; + fromJSON(object: any): StorageObjectAck; + toJSON(message: StorageObjectAck): unknown; + fromPartial(object: DeepPartial): StorageObjectAck; +}; +export declare const StorageObjectAcks: { + encode(message: StorageObjectAcks, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjectAcks; + fromJSON(object: any): StorageObjectAcks; + toJSON(message: StorageObjectAcks): unknown; + fromPartial(object: DeepPartial): StorageObjectAcks; +}; +export declare const StorageObjects: { + encode(message: StorageObjects, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjects; + fromJSON(object: any): StorageObjects; + toJSON(message: StorageObjects): unknown; + fromPartial(object: DeepPartial): StorageObjects; +}; +export declare const StorageObjectList: { + encode(message: StorageObjectList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjectList; + fromJSON(object: any): StorageObjectList; + toJSON(message: StorageObjectList): unknown; + fromPartial(object: DeepPartial): StorageObjectList; +}; +export declare const Tournament: { + encode(message: Tournament, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Tournament; + fromJSON(object: any): Tournament; + toJSON(message: Tournament): unknown; + fromPartial(object: DeepPartial): Tournament; +}; +export declare const TournamentList: { + encode(message: TournamentList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): TournamentList; + fromJSON(object: any): TournamentList; + toJSON(message: TournamentList): unknown; + fromPartial(object: DeepPartial): TournamentList; +}; +export declare const TournamentRecordList: { + encode(message: TournamentRecordList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): TournamentRecordList; + fromJSON(object: any): TournamentRecordList; + toJSON(message: TournamentRecordList): unknown; + fromPartial(object: DeepPartial): TournamentRecordList; +}; +export declare const UpdateAccountRequest: { + encode(message: UpdateAccountRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateAccountRequest; + fromJSON(object: any): UpdateAccountRequest; + toJSON(message: UpdateAccountRequest): unknown; + fromPartial(object: DeepPartial): UpdateAccountRequest; +}; +export declare const UpdateGroupRequest: { + encode(message: UpdateGroupRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupRequest; + fromJSON(object: any): UpdateGroupRequest; + toJSON(message: UpdateGroupRequest): unknown; + fromPartial(object: DeepPartial): UpdateGroupRequest; +}; +export declare const User: { + encode(message: User, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): User; + fromJSON(object: any): User; + toJSON(message: User): unknown; + fromPartial(object: DeepPartial): User; +}; +export declare const UserGroupList: { + encode(message: UserGroupList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): UserGroupList; + fromJSON(object: any): UserGroupList; + toJSON(message: UserGroupList): unknown; + fromPartial(object: DeepPartial): UserGroupList; +}; +export declare const UserGroupList_UserGroup: { + encode(message: UserGroupList_UserGroup, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): UserGroupList_UserGroup; + fromJSON(object: any): UserGroupList_UserGroup; + toJSON(message: UserGroupList_UserGroup): unknown; + fromPartial(object: DeepPartial): UserGroupList_UserGroup; +}; +export declare const Users: { + encode(message: Users, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Users; + fromJSON(object: any): Users; + toJSON(message: Users): unknown; + fromPartial(object: DeepPartial): Users; +}; +export declare const ValidatePurchaseAppleRequest: { + encode(message: ValidatePurchaseAppleRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ValidatePurchaseAppleRequest; + fromJSON(object: any): ValidatePurchaseAppleRequest; + toJSON(message: ValidatePurchaseAppleRequest): unknown; + fromPartial(object: DeepPartial): ValidatePurchaseAppleRequest; +}; +export declare const ValidatePurchaseGoogleRequest: { + encode(message: ValidatePurchaseGoogleRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ValidatePurchaseGoogleRequest; + fromJSON(object: any): ValidatePurchaseGoogleRequest; + toJSON(message: ValidatePurchaseGoogleRequest): unknown; + fromPartial(object: DeepPartial): ValidatePurchaseGoogleRequest; +}; +export declare const ValidatePurchaseHuaweiRequest: { + encode(message: ValidatePurchaseHuaweiRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ValidatePurchaseHuaweiRequest; + fromJSON(object: any): ValidatePurchaseHuaweiRequest; + toJSON(message: ValidatePurchaseHuaweiRequest): unknown; + fromPartial(object: DeepPartial): ValidatePurchaseHuaweiRequest; +}; +export declare const ValidatedPurchase: { + encode(message: ValidatedPurchase, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ValidatedPurchase; + fromJSON(object: any): ValidatedPurchase; + toJSON(message: ValidatedPurchase): unknown; + fromPartial(object: DeepPartial): ValidatedPurchase; +}; +export declare const ValidatePurchaseResponse: { + encode(message: ValidatePurchaseResponse, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ValidatePurchaseResponse; + fromJSON(object: any): ValidatePurchaseResponse; + toJSON(message: ValidatePurchaseResponse): unknown; + fromPartial(object: DeepPartial): ValidatePurchaseResponse; +}; +export declare const PurchaseList: { + encode(message: PurchaseList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PurchaseList; + fromJSON(object: any): PurchaseList; + toJSON(message: PurchaseList): unknown; + fromPartial(object: DeepPartial): PurchaseList; +}; +export declare const WriteLeaderboardRecordRequest: { + encode(message: WriteLeaderboardRecordRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): WriteLeaderboardRecordRequest; + fromJSON(object: any): WriteLeaderboardRecordRequest; + toJSON(message: WriteLeaderboardRecordRequest): unknown; + fromPartial(object: DeepPartial): WriteLeaderboardRecordRequest; +}; +export declare const WriteLeaderboardRecordRequest_LeaderboardRecordWrite: { + encode(message: WriteLeaderboardRecordRequest_LeaderboardRecordWrite, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): WriteLeaderboardRecordRequest_LeaderboardRecordWrite; + fromJSON(object: any): WriteLeaderboardRecordRequest_LeaderboardRecordWrite; + toJSON(message: WriteLeaderboardRecordRequest_LeaderboardRecordWrite): unknown; + fromPartial(object: DeepPartial): WriteLeaderboardRecordRequest_LeaderboardRecordWrite; +}; +export declare const WriteStorageObject: { + encode(message: WriteStorageObject, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): WriteStorageObject; + fromJSON(object: any): WriteStorageObject; + toJSON(message: WriteStorageObject): unknown; + fromPartial(object: DeepPartial): WriteStorageObject; +}; +export declare const WriteStorageObjectsRequest: { + encode(message: WriteStorageObjectsRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): WriteStorageObjectsRequest; + fromJSON(object: any): WriteStorageObjectsRequest; + toJSON(message: WriteStorageObjectsRequest): unknown; + fromPartial(object: DeepPartial): WriteStorageObjectsRequest; +}; +export declare const WriteTournamentRecordRequest: { + encode(message: WriteTournamentRecordRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): WriteTournamentRecordRequest; + fromJSON(object: any): WriteTournamentRecordRequest; + toJSON(message: WriteTournamentRecordRequest): unknown; + fromPartial(object: DeepPartial): WriteTournamentRecordRequest; +}; +export declare const WriteTournamentRecordRequest_TournamentRecordWrite: { + encode(message: WriteTournamentRecordRequest_TournamentRecordWrite, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): WriteTournamentRecordRequest_TournamentRecordWrite; + fromJSON(object: any): WriteTournamentRecordRequest_TournamentRecordWrite; + toJSON(message: WriteTournamentRecordRequest_TournamentRecordWrite): unknown; + fromPartial(object: DeepPartial): WriteTournamentRecordRequest_TournamentRecordWrite; +}; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; +export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { + [K in keyof T]?: DeepPartial; +} : Partial; +export {}; diff --git a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/google/protobuf/timestamp.d.ts b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/google/protobuf/timestamp.d.ts index 89a67c1..f8b70f4 100644 --- a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/google/protobuf/timestamp.d.ts +++ b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/google/protobuf/timestamp.d.ts @@ -1,121 +1,121 @@ -import { Writer, Reader } from 'protobufjs/minimal'; -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - * - * - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: number; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export declare const protobufPackage = "google.protobuf"; -export declare const Timestamp: { - encode(message: Timestamp, writer?: Writer): Writer; - decode(input: Uint8Array | Reader, length?: number): Timestamp; - fromJSON(object: any): Timestamp; - fromPartial(object: DeepPartial): Timestamp; - toJSON(message: Timestamp): unknown; -}; -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { - $case: string; -} ? { - [K in keyof Omit]?: DeepPartial; -} & { - $case: T['$case']; -} : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; +import { Writer, Reader } from 'protobufjs/minimal'; +/** + * A Timestamp represents a point in time independent of any time zone or local + * calendar, encoded as a count of seconds and fractions of seconds at + * nanosecond resolution. The count is relative to an epoch at UTC midnight on + * January 1, 1970, in the proleptic Gregorian calendar which extends the + * Gregorian calendar backwards to year one. + * + * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + * second table is needed for interpretation, using a [24-hour linear + * smear](https://developers.google.com/time/smear). + * + * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + * restricting to that range, we ensure that we can convert to and from [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + * + * # Examples + * + * Example 1: Compute Timestamp from POSIX `time()`. + * + * Timestamp timestamp; + * timestamp.set_seconds(time(NULL)); + * timestamp.set_nanos(0); + * + * Example 2: Compute Timestamp from POSIX `gettimeofday()`. + * + * struct timeval tv; + * gettimeofday(&tv, NULL); + * + * Timestamp timestamp; + * timestamp.set_seconds(tv.tv_sec); + * timestamp.set_nanos(tv.tv_usec * 1000); + * + * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + * + * FILETIME ft; + * GetSystemTimeAsFileTime(&ft); + * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + * + * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + * Timestamp timestamp; + * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + * + * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + * + * long millis = System.currentTimeMillis(); + * + * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + * .setNanos((int) ((millis % 1000) * 1000000)).build(); + * + * + * Example 5: Compute Timestamp from current time in Python. + * + * timestamp = Timestamp() + * timestamp.GetCurrentTime() + * + * # JSON Mapping + * + * In JSON format, the Timestamp type is encoded as a string in the + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + * where {year} is always expressed using four digits while {month}, {day}, + * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + * is required. A proto3 JSON serializer should always use UTC (as indicated by + * "Z") when printing the Timestamp type and a proto3 JSON parser should be + * able to accept both UTC and other timezones (as indicated by an offset). + * + * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + * 01:30 UTC on January 15, 2017. + * + * In JavaScript, one can convert a Date object to this format using the + * standard + * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + * method. In Python, a standard `datetime.datetime` object can be converted + * to this format using + * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + * the Joda Time's [`ISODateTimeFormat.dateTime()`]( + * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D + * ) to obtain a formatter capable of generating timestamps in this format. + * + * + */ +export interface Timestamp { + /** + * Represents seconds of UTC time since Unix epoch + * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + * 9999-12-31T23:59:59Z inclusive. + */ + seconds: number; + /** + * Non-negative fractions of a second at nanosecond resolution. Negative + * second values with fractions must still have non-negative nanos values + * that count forward in time. Must be from 0 to 999,999,999 + * inclusive. + */ + nanos: number; +} +export declare const protobufPackage = "google.protobuf"; +export declare const Timestamp: { + encode(message: Timestamp, writer?: Writer): Writer; + decode(input: Uint8Array | Reader, length?: number): Timestamp; + fromJSON(object: any): Timestamp; + fromPartial(object: DeepPartial): Timestamp; + toJSON(message: Timestamp): unknown; +}; +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { + $case: string; +} ? { + [K in keyof Omit]?: DeepPartial; +} & { + $case: T['$case']; +} : T extends {} ? { + [K in keyof T]?: DeepPartial; +} : Partial; +export {}; diff --git a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/google/protobuf/wrappers.d.ts b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/google/protobuf/wrappers.d.ts index 13dd897..6b9b7e0 100644 --- a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/google/protobuf/wrappers.d.ts +++ b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/google/protobuf/wrappers.d.ts @@ -1,175 +1,175 @@ -import { Writer, Reader } from 'protobufjs/minimal'; -/** - * Wrapper message for `double`. - * - * The JSON representation for `DoubleValue` is JSON number. - */ -export interface DoubleValue { - /** - * The double value. - */ - value: number; -} -/** - * Wrapper message for `float`. - * - * The JSON representation for `FloatValue` is JSON number. - */ -export interface FloatValue { - /** - * The float value. - */ - value: number; -} -/** - * Wrapper message for `int64`. - * - * The JSON representation for `Int64Value` is JSON string. - */ -export interface Int64Value { - /** - * The int64 value. - */ - value: number; -} -/** - * Wrapper message for `uint64`. - * - * The JSON representation for `UInt64Value` is JSON string. - */ -export interface UInt64Value { - /** - * The uint64 value. - */ - value: number; -} -/** - * Wrapper message for `int32`. - * - * The JSON representation for `Int32Value` is JSON number. - */ -export interface Int32Value { - /** - * The int32 value. - */ - value: number; -} -/** - * Wrapper message for `uint32`. - * - * The JSON representation for `UInt32Value` is JSON number. - */ -export interface UInt32Value { - /** - * The uint32 value. - */ - value: number; -} -/** - * Wrapper message for `bool`. - * - * The JSON representation for `BoolValue` is JSON `true` and `false`. - */ -export interface BoolValue { - /** - * The bool value. - */ - value: boolean; -} -/** - * Wrapper message for `string`. - * - * The JSON representation for `StringValue` is JSON string. - */ -export interface StringValue { - /** - * The string value. - */ - value: string; -} -/** - * Wrapper message for `bytes`. - * - * The JSON representation for `BytesValue` is JSON string. - */ -export interface BytesValue { - /** - * The bytes value. - */ - value: Uint8Array; -} -export declare const protobufPackage = "google.protobuf"; -export declare const DoubleValue: { - encode(message: DoubleValue, writer?: Writer): Writer; - decode(input: Uint8Array | Reader, length?: number): DoubleValue; - fromJSON(object: any): DoubleValue; - fromPartial(object: DeepPartial): DoubleValue; - toJSON(message: DoubleValue): unknown; -}; -export declare const FloatValue: { - encode(message: FloatValue, writer?: Writer): Writer; - decode(input: Uint8Array | Reader, length?: number): FloatValue; - fromJSON(object: any): FloatValue; - fromPartial(object: DeepPartial): FloatValue; - toJSON(message: FloatValue): unknown; -}; -export declare const Int64Value: { - encode(message: Int64Value, writer?: Writer): Writer; - decode(input: Uint8Array | Reader, length?: number): Int64Value; - fromJSON(object: any): Int64Value; - fromPartial(object: DeepPartial): Int64Value; - toJSON(message: Int64Value): unknown; -}; -export declare const UInt64Value: { - encode(message: UInt64Value, writer?: Writer): Writer; - decode(input: Uint8Array | Reader, length?: number): UInt64Value; - fromJSON(object: any): UInt64Value; - fromPartial(object: DeepPartial): UInt64Value; - toJSON(message: UInt64Value): unknown; -}; -export declare const Int32Value: { - encode(message: Int32Value, writer?: Writer): Writer; - decode(input: Uint8Array | Reader, length?: number): Int32Value; - fromJSON(object: any): Int32Value; - fromPartial(object: DeepPartial): Int32Value; - toJSON(message: Int32Value): unknown; -}; -export declare const UInt32Value: { - encode(message: UInt32Value, writer?: Writer): Writer; - decode(input: Uint8Array | Reader, length?: number): UInt32Value; - fromJSON(object: any): UInt32Value; - fromPartial(object: DeepPartial): UInt32Value; - toJSON(message: UInt32Value): unknown; -}; -export declare const BoolValue: { - encode(message: BoolValue, writer?: Writer): Writer; - decode(input: Uint8Array | Reader, length?: number): BoolValue; - fromJSON(object: any): BoolValue; - fromPartial(object: DeepPartial): BoolValue; - toJSON(message: BoolValue): unknown; -}; -export declare const StringValue: { - encode(message: StringValue, writer?: Writer): Writer; - decode(input: Uint8Array | Reader, length?: number): StringValue; - fromJSON(object: any): StringValue; - fromPartial(object: DeepPartial): StringValue; - toJSON(message: StringValue): unknown; -}; -export declare const BytesValue: { - encode(message: BytesValue, writer?: Writer): Writer; - decode(input: Uint8Array | Reader, length?: number): BytesValue; - fromJSON(object: any): BytesValue; - fromPartial(object: DeepPartial): BytesValue; - toJSON(message: BytesValue): unknown; -}; -type Builtin = Date | Function | Uint8Array | string | number | undefined; -export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { - $case: string; -} ? { - [K in keyof Omit]?: DeepPartial; -} & { - $case: T['$case']; -} : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; +import { Writer, Reader } from 'protobufjs/minimal'; +/** + * Wrapper message for `double`. + * + * The JSON representation for `DoubleValue` is JSON number. + */ +export interface DoubleValue { + /** + * The double value. + */ + value: number; +} +/** + * Wrapper message for `float`. + * + * The JSON representation for `FloatValue` is JSON number. + */ +export interface FloatValue { + /** + * The float value. + */ + value: number; +} +/** + * Wrapper message for `int64`. + * + * The JSON representation for `Int64Value` is JSON string. + */ +export interface Int64Value { + /** + * The int64 value. + */ + value: number; +} +/** + * Wrapper message for `uint64`. + * + * The JSON representation for `UInt64Value` is JSON string. + */ +export interface UInt64Value { + /** + * The uint64 value. + */ + value: number; +} +/** + * Wrapper message for `int32`. + * + * The JSON representation for `Int32Value` is JSON number. + */ +export interface Int32Value { + /** + * The int32 value. + */ + value: number; +} +/** + * Wrapper message for `uint32`. + * + * The JSON representation for `UInt32Value` is JSON number. + */ +export interface UInt32Value { + /** + * The uint32 value. + */ + value: number; +} +/** + * Wrapper message for `bool`. + * + * The JSON representation for `BoolValue` is JSON `true` and `false`. + */ +export interface BoolValue { + /** + * The bool value. + */ + value: boolean; +} +/** + * Wrapper message for `string`. + * + * The JSON representation for `StringValue` is JSON string. + */ +export interface StringValue { + /** + * The string value. + */ + value: string; +} +/** + * Wrapper message for `bytes`. + * + * The JSON representation for `BytesValue` is JSON string. + */ +export interface BytesValue { + /** + * The bytes value. + */ + value: Uint8Array; +} +export declare const protobufPackage = "google.protobuf"; +export declare const DoubleValue: { + encode(message: DoubleValue, writer?: Writer): Writer; + decode(input: Uint8Array | Reader, length?: number): DoubleValue; + fromJSON(object: any): DoubleValue; + fromPartial(object: DeepPartial): DoubleValue; + toJSON(message: DoubleValue): unknown; +}; +export declare const FloatValue: { + encode(message: FloatValue, writer?: Writer): Writer; + decode(input: Uint8Array | Reader, length?: number): FloatValue; + fromJSON(object: any): FloatValue; + fromPartial(object: DeepPartial): FloatValue; + toJSON(message: FloatValue): unknown; +}; +export declare const Int64Value: { + encode(message: Int64Value, writer?: Writer): Writer; + decode(input: Uint8Array | Reader, length?: number): Int64Value; + fromJSON(object: any): Int64Value; + fromPartial(object: DeepPartial): Int64Value; + toJSON(message: Int64Value): unknown; +}; +export declare const UInt64Value: { + encode(message: UInt64Value, writer?: Writer): Writer; + decode(input: Uint8Array | Reader, length?: number): UInt64Value; + fromJSON(object: any): UInt64Value; + fromPartial(object: DeepPartial): UInt64Value; + toJSON(message: UInt64Value): unknown; +}; +export declare const Int32Value: { + encode(message: Int32Value, writer?: Writer): Writer; + decode(input: Uint8Array | Reader, length?: number): Int32Value; + fromJSON(object: any): Int32Value; + fromPartial(object: DeepPartial): Int32Value; + toJSON(message: Int32Value): unknown; +}; +export declare const UInt32Value: { + encode(message: UInt32Value, writer?: Writer): Writer; + decode(input: Uint8Array | Reader, length?: number): UInt32Value; + fromJSON(object: any): UInt32Value; + fromPartial(object: DeepPartial): UInt32Value; + toJSON(message: UInt32Value): unknown; +}; +export declare const BoolValue: { + encode(message: BoolValue, writer?: Writer): Writer; + decode(input: Uint8Array | Reader, length?: number): BoolValue; + fromJSON(object: any): BoolValue; + fromPartial(object: DeepPartial): BoolValue; + toJSON(message: BoolValue): unknown; +}; +export declare const StringValue: { + encode(message: StringValue, writer?: Writer): Writer; + decode(input: Uint8Array | Reader, length?: number): StringValue; + fromJSON(object: any): StringValue; + fromPartial(object: DeepPartial): StringValue; + toJSON(message: StringValue): unknown; +}; +export declare const BytesValue: { + encode(message: BytesValue, writer?: Writer): Writer; + decode(input: Uint8Array | Reader, length?: number): BytesValue; + fromJSON(object: any): BytesValue; + fromPartial(object: DeepPartial): BytesValue; + toJSON(message: BytesValue): unknown; +}; +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { + $case: string; +} ? { + [K in keyof Omit]?: DeepPartial; +} & { + $case: T['$case']; +} : T extends {} ? { + [K in keyof T]?: DeepPartial; +} : Partial; +export {}; diff --git a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/index.d.ts b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/index.d.ts index 1194d39..7ef2f79 100644 --- a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/index.d.ts +++ b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/index.d.ts @@ -1 +1 @@ -export * from "./web_socket_adapter_pb"; +export * from "./web_socket_adapter_pb"; diff --git a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/rtapi/realtime.d.ts b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/rtapi/realtime.d.ts index 782e929..491d353 100644 --- a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/rtapi/realtime.d.ts +++ b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/rtapi/realtime.d.ts @@ -1,1048 +1,1048 @@ -import _m0 from "protobufjs/minimal"; -import { ChannelMessage, Rpc, Notification } from "../api/api"; -export declare const protobufPackage = "nakama.realtime"; -/** The realtime protocol for Nakama server. */ -/** An envelope for a realtime message. */ -export interface Envelope { - cid: string; - /** A response from a channel join operation. */ - channel: Channel | undefined; - /** Join a realtime chat channel. */ - channel_join: ChannelJoin | undefined; - /** Leave a realtime chat channel. */ - channel_leave: ChannelLeave | undefined; - /** An incoming message on a realtime chat channel. */ - channel_message: ChannelMessage | undefined; - /** An acknowledgement received in response to sending a message on a chat channel. */ - channel_message_ack: ChannelMessageAck | undefined; - /** Send a message to a realtime chat channel. */ - channel_message_send: ChannelMessageSend | undefined; - /** Update a message previously sent to a realtime chat channel. */ - channel_message_update: ChannelMessageUpdate | undefined; - /** Remove a message previously sent to a realtime chat channel. */ - channel_message_remove: ChannelMessageRemove | undefined; - /** Presence update for a particular realtime chat channel. */ - channel_presence_event: ChannelPresenceEvent | undefined; - /** Describes an error which occurred on the server. */ - error: Error | undefined; - /** Incoming information about a realtime match. */ - match: Match | undefined; - /** A client to server request to create a realtime match. */ - match_create: MatchCreate | undefined; - /** Incoming realtime match data delivered from the server. */ - match_data: MatchData | undefined; - /** A client to server request to send data to a realtime match. */ - match_data_send: MatchDataSend | undefined; - /** A client to server request to join a realtime match. */ - match_join: MatchJoin | undefined; - /** A client to server request to leave a realtime match. */ - match_leave: MatchLeave | undefined; - /** Presence update for a particular realtime match. */ - match_presence_event: MatchPresenceEvent | undefined; - /** Submit a new matchmaking process request. */ - matchmaker_add: MatchmakerAdd | undefined; - /** A successful matchmaking result. */ - matchmaker_matched: MatchmakerMatched | undefined; - /** Cancel a matchmaking process using a ticket. */ - matchmaker_remove: MatchmakerRemove | undefined; - /** A response from starting a new matchmaking process. */ - matchmaker_ticket: MatchmakerTicket | undefined; - /** Notifications send by the server. */ - notifications: Notifications | undefined; - /** RPC call or response. */ - rpc: Rpc | undefined; - /** An incoming status snapshot for some set of users. */ - status: Status | undefined; - /** Start following some set of users to receive their status updates. */ - status_follow: StatusFollow | undefined; - /** An incoming status update. */ - status_presence_event: StatusPresenceEvent | undefined; - /** Stop following some set of users to no longer receive their status updates. */ - status_unfollow: StatusUnfollow | undefined; - /** Set the user's own status. */ - status_update: StatusUpdate | undefined; - /** A data message delivered over a stream. */ - stream_data: StreamData | undefined; - /** Presence update for a particular stream. */ - stream_presence_event: StreamPresenceEvent | undefined; - /** Application-level heartbeat and connection check. */ - ping: Ping | undefined; - /** Application-level heartbeat and connection check response. */ - pong: Pong | undefined; - /** Incoming information about a party. */ - party: Party | undefined; - /** Create a party. */ - party_create: PartyCreate | undefined; - /** Join a party, or request to join if the party is not open. */ - party_join: PartyJoin | undefined; - /** Leave a party. */ - party_leave: PartyLeave | undefined; - /** Promote a new party leader. */ - party_promote: PartyPromote | undefined; - /** Announcement of a new party leader. */ - party_leader: PartyLeader | undefined; - /** Accept a request to join. */ - party_accept: PartyAccept | undefined; - /** Kick a party member, or decline a request to join. */ - party_remove: PartyRemove | undefined; - /** End a party, kicking all party members and closing it. */ - party_close: PartyClose | undefined; - /** Request a list of pending join requests for a party. */ - party_join_request_list: PartyJoinRequestList | undefined; - /** Incoming notification for one or more new presences attempting to join the party. */ - party_join_request: PartyJoinRequest | undefined; - /** Begin matchmaking as a party. */ - party_matchmaker_add: PartyMatchmakerAdd | undefined; - /** Cancel a party matchmaking process using a ticket. */ - party_matchmaker_remove: PartyMatchmakerRemove | undefined; - /** A response from starting a new party matchmaking process. */ - party_matchmaker_ticket: PartyMatchmakerTicket | undefined; - /** Incoming party data delivered from the server. */ - party_data: PartyData | undefined; - /** A client to server request to send data to a party. */ - party_data_send: PartyDataSend | undefined; - /** Presence update for a particular party. */ - party_presence_event: PartyPresenceEvent | undefined; -} -/** A realtime chat channel. */ -export interface Channel { - /** The ID of the channel. */ - id: string; - /** The users currently in the channel. */ - presences: UserPresence[]; - /** A reference to the current user's presence in the channel. */ - self: UserPresence | undefined; - /** The name of the chat room, or an empty string if this message was not sent through a chat room. */ - room_name: string; - /** The ID of the group, or an empty string if this message was not sent through a group channel. */ - group_id: string; - /** The ID of the first DM user, or an empty string if this message was not sent through a DM chat. */ - user_id_one: string; - /** The ID of the second DM user, or an empty string if this message was not sent through a DM chat. */ - user_id_two: string; -} -/** Join operation for a realtime chat channel. */ -export interface ChannelJoin { - /** The user ID to DM with, group ID to chat with, or room channel name to join. */ - target: string; - /** The type of the chat channel. */ - type: number; - /** Whether messages sent on this channel should be persistent. */ - persistence: boolean | undefined; - /** Whether the user should appear in the channel's presence list and events. */ - hidden: boolean | undefined; -} -/** The type of chat channel. */ -export declare enum ChannelJoin_Type { - /** TYPE_UNSPECIFIED - Default case. Assumed as ROOM type. */ - TYPE_UNSPECIFIED = 0, - /** ROOM - A room which anyone can join to chat. */ - ROOM = 1, - /** DIRECT_MESSAGE - A private channel for 1-on-1 chat. */ - DIRECT_MESSAGE = 2, - /** GROUP - A channel for group chat. */ - GROUP = 3, - UNRECOGNIZED = -1 -} -export declare function channelJoin_TypeFromJSON(object: any): ChannelJoin_Type; -export declare function channelJoin_TypeToJSON(object: ChannelJoin_Type): string; -/** Leave a realtime channel. */ -export interface ChannelLeave { - /** The ID of the channel to leave. */ - channel_id: string; -} -/** A receipt reply from a channel message send operation. */ -export interface ChannelMessageAck { - /** The channel the message was sent to. */ - channel_id: string; - /** The unique ID assigned to the message. */ - message_id: string; - /** The code representing a message type or category. */ - code: number | undefined; - /** Username of the message sender. */ - username: string; - /** The UNIX time when the message was created. */ - create_time: Date | undefined; - /** The UNIX time when the message was last updated. */ - update_time: Date | undefined; - /** True if the message was persisted to the channel's history, false otherwise. */ - persistent: boolean | undefined; - /** The name of the chat room, or an empty string if this message was not sent through a chat room. */ - room_name: string; - /** The ID of the group, or an empty string if this message was not sent through a group channel. */ - group_id: string; - /** The ID of the first DM user, or an empty string if this message was not sent through a DM chat. */ - user_id_one: string; - /** The ID of the second DM user, or an empty string if this message was not sent through a DM chat. */ - user_id_two: string; -} -/** Send a message to a realtime channel. */ -export interface ChannelMessageSend { - /** The channel to sent to. */ - channel_id: string; - /** Message content. */ - content: string; -} -/** Update a message previously sent to a realtime channel. */ -export interface ChannelMessageUpdate { - /** The channel the message was sent to. */ - channel_id: string; - /** The ID assigned to the message to update. */ - message_id: string; - /** New message content. */ - content: string; -} -/** Remove a message previously sent to a realtime channel. */ -export interface ChannelMessageRemove { - /** The channel the message was sent to. */ - channel_id: string; - /** The ID assigned to the message to update. */ - message_id: string; -} -/** A set of joins and leaves on a particular channel. */ -export interface ChannelPresenceEvent { - /** The channel identifier this event is for. */ - channel_id: string; - /** Presences joining the channel as part of this event, if any. */ - joins: UserPresence[]; - /** Presences leaving the channel as part of this event, if any. */ - leaves: UserPresence[]; - /** The name of the chat room, or an empty string if this message was not sent through a chat room. */ - room_name: string; - /** The ID of the group, or an empty string if this message was not sent through a group channel. */ - group_id: string; - /** The ID of the first DM user, or an empty string if this message was not sent through a DM chat. */ - user_id_one: string; - /** The ID of the second DM user, or an empty string if this message was not sent through a DM chat. */ - user_id_two: string; -} -/** A logical error which may occur on the server. */ -export interface Error { - /** The error code which should be one of "Error.Code" enums. */ - code: number; - /** A message in English to help developers debug the response. */ - message: string; - /** Additional error details which may be different for each response. */ - context: { - [key: string]: string; - }; -} -/** The selection of possible error codes. */ -export declare enum Error_Code { - /** RUNTIME_EXCEPTION - An unexpected result from the server. */ - RUNTIME_EXCEPTION = 0, - /** UNRECOGNIZED_PAYLOAD - The server received a message which is not recognised. */ - UNRECOGNIZED_PAYLOAD = 1, - /** MISSING_PAYLOAD - A message was expected but contains no content. */ - MISSING_PAYLOAD = 2, - /** BAD_INPUT - Fields in the message have an invalid format. */ - BAD_INPUT = 3, - /** MATCH_NOT_FOUND - The match id was not found. */ - MATCH_NOT_FOUND = 4, - /** MATCH_JOIN_REJECTED - The match join was rejected. */ - MATCH_JOIN_REJECTED = 5, - /** RUNTIME_FUNCTION_NOT_FOUND - The runtime function does not exist on the server. */ - RUNTIME_FUNCTION_NOT_FOUND = 6, - /** RUNTIME_FUNCTION_EXCEPTION - The runtime function executed with an error. */ - RUNTIME_FUNCTION_EXCEPTION = 7, - UNRECOGNIZED = -1 -} -export declare function error_CodeFromJSON(object: any): Error_Code; -export declare function error_CodeToJSON(object: Error_Code): string; -export interface Error_ContextEntry { - key: string; - value: string; -} -/** A realtime match. */ -export interface Match { - /** The match unique ID. */ - match_id: string; - /** True if it's an server-managed authoritative match, false otherwise. */ - authoritative: boolean; - /** Match label, if any. */ - label: string | undefined; - /** The number of users currently in the match. */ - size: number; - /** The users currently in the match. */ - presences: UserPresence[]; - /** A reference to the current user's presence in the match. */ - self: UserPresence | undefined; -} -/** Create a new realtime match. */ -export interface MatchCreate { - name?: string; -} -/** Realtime match data received from the server. */ -export interface MatchData { - /** The match unique ID. */ - match_id: string; - /** A reference to the user presence that sent this data, if any. */ - presence: UserPresence | undefined; - /** Op code value. */ - op_code: number; - /** Data payload, if any. */ - data: Uint8Array; - /** True if this data was delivered reliably, false otherwise. */ - reliable: boolean; -} -/** Send realtime match data to the server. */ -export interface MatchDataSend { - /** The match unique ID. */ - match_id: string; - /** Op code value. */ - op_code: number; - /** Data payload, if any. */ - data: Uint8Array; - /** List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match. */ - presences: UserPresence[]; - /** True if the data should be sent reliably, false otherwise. */ - reliable: boolean; -} -/** Join an existing realtime match. */ -export interface MatchJoin { - /** The match unique ID. */ - match_id: string | undefined; - /** A matchmaking result token. */ - token: string | undefined; - /** An optional set of key-value metadata pairs to be passed to the match handler, if any. */ - metadata: { - [key: string]: string; - }; -} -export interface MatchJoin_MetadataEntry { - key: string; - value: string; -} -/** Leave a realtime match. */ -export interface MatchLeave { - /** The match unique ID. */ - match_id: string; -} -/** A set of joins and leaves on a particular realtime match. */ -export interface MatchPresenceEvent { - /** The match unique ID. */ - match_id: string; - /** User presences that have just joined the match. */ - joins: UserPresence[]; - /** User presences that have just left the match. */ - leaves: UserPresence[]; -} -/** Start a new matchmaking process. */ -export interface MatchmakerAdd { - /** Minimum total user count to match together. */ - min_count: number; - /** Maximum total user count to match together. */ - max_count: number; - /** Filter query used to identify suitable users. */ - query: string; - /** String properties. */ - string_properties: { - [key: string]: string; - }; - /** Numeric properties. */ - numeric_properties: { - [key: string]: number; - }; -} -export interface MatchmakerAdd_StringPropertiesEntry { - key: string; - value: string; -} -export interface MatchmakerAdd_NumericPropertiesEntry { - key: string; - value: number; -} -/** A successful matchmaking result. */ -export interface MatchmakerMatched { - /** The matchmaking ticket that has completed. */ - ticket: string; - /** Match ID. */ - match_id: string | undefined; - /** Match join token. */ - token: string | undefined; - /** The users that have been matched together, and information about their matchmaking data. */ - users: MatchmakerMatched_MatchmakerUser[]; - /** A reference to the current user and their properties. */ - self: MatchmakerMatched_MatchmakerUser | undefined; -} -export interface MatchmakerMatched_MatchmakerUser { - /** User info. */ - presence: UserPresence | undefined; - /** Party identifier, if this user was matched as a party member. */ - party_id: string; - /** String properties. */ - string_properties: { - [key: string]: string; - }; - /** Numeric properties. */ - numeric_properties: { - [key: string]: number; - }; -} -export interface MatchmakerMatched_MatchmakerUser_StringPropertiesEntry { - key: string; - value: string; -} -export interface MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry { - key: string; - value: number; -} -/** Cancel an existing ongoing matchmaking process. */ -export interface MatchmakerRemove { - /** The ticket to cancel. */ - ticket: string; -} -/** A ticket representing a new matchmaking process. */ -export interface MatchmakerTicket { - /** The ticket that can be used to cancel matchmaking. */ - ticket: string; -} -/** A collection of zero or more notifications. */ -export interface Notifications { - /** Collection of notifications. */ - notifications: Notification[]; -} -/** Incoming information about a party. */ -export interface Party { - /** Unique party identifier. */ - party_id: string; - /** Open flag. */ - open: boolean; - /** Maximum number of party members. */ - max_size: number; - /** Self. */ - self: UserPresence | undefined; - /** Leader. */ - leader: UserPresence | undefined; - /** All current party members. */ - presences: UserPresence[]; -} -/** Create a party. */ -export interface PartyCreate { - /** Whether or not the party will require join requests to be approved by the party leader. */ - open: boolean; - /** Maximum number of party members. */ - max_size: number; -} -/** Join a party, or request to join if the party is not open. */ -export interface PartyJoin { - /** Party ID to join. */ - party_id: string; -} -/** Leave a party. */ -export interface PartyLeave { - /** Party ID to leave. */ - party_id: string; -} -/** Promote a new party leader. */ -export interface PartyPromote { - /** Party ID to promote a new leader for. */ - party_id: string; - /** The presence of an existing party member to promote as the new leader. */ - presence: UserPresence | undefined; -} -/** Announcement of a new party leader. */ -export interface PartyLeader { - /** Party ID to announce the new leader for. */ - party_id: string; - /** The presence of the new party leader. */ - presence: UserPresence | undefined; -} -/** Accept a request to join. */ -export interface PartyAccept { - /** Party ID to accept a join request for. */ - party_id: string; - /** The presence to accept as a party member. */ - presence: UserPresence | undefined; -} -/** Kick a party member, or decline a request to join. */ -export interface PartyRemove { - /** Party ID to remove/reject from. */ - party_id: string; - /** The presence to remove or reject. */ - presence: UserPresence | undefined; -} -/** End a party, kicking all party members and closing it. */ -export interface PartyClose { - /** Party ID to close. */ - party_id: string; -} -/** Request a list of pending join requests for a party. */ -export interface PartyJoinRequestList { - /** Party ID to get a list of join requests for. */ - party_id: string; -} -/** Incoming notification for one or more new presences attempting to join the party. */ -export interface PartyJoinRequest { - /** Party ID these presences are attempting to join. */ - party_id: string; - /** Presences attempting to join. */ - presences: UserPresence[]; -} -/** Begin matchmaking as a party. */ -export interface PartyMatchmakerAdd { - /** Party ID. */ - party_id: string; - /** Minimum total user count to match together. */ - min_count: number; - /** Maximum total user count to match together. */ - max_count: number; - /** Filter query used to identify suitable users. */ - query: string; - /** String properties. */ - string_properties: { - [key: string]: string; - }; - /** Numeric properties. */ - numeric_properties: { - [key: string]: number; - }; -} -export interface PartyMatchmakerAdd_StringPropertiesEntry { - key: string; - value: string; -} -export interface PartyMatchmakerAdd_NumericPropertiesEntry { - key: string; - value: number; -} -/** Cancel a party matchmaking process using a ticket. */ -export interface PartyMatchmakerRemove { - /** Party ID. */ - party_id: string; - /** The ticket to cancel. */ - ticket: string; -} -/** A response from starting a new party matchmaking process. */ -export interface PartyMatchmakerTicket { - /** Party ID. */ - party_id: string; - /** The ticket that can be used to cancel matchmaking. */ - ticket: string; -} -/** Incoming party data delivered from the server. */ -export interface PartyData { - /** The party ID. */ - party_id: string; - /** A reference to the user presence that sent this data, if any. */ - presence: UserPresence | undefined; - /** Op code value. */ - op_code: number; - /** Data payload, if any. */ - data: Uint8Array; -} -/** Send data to a party. */ -export interface PartyDataSend { - /** Party ID to send to. */ - party_id: string; - /** Op code value. */ - op_code: number; - /** Data payload, if any. */ - data: Uint8Array; -} -/** Presence update for a particular party. */ -export interface PartyPresenceEvent { - /** The party ID. */ - party_id: string; - /** User presences that have just joined the party. */ - joins: UserPresence[]; - /** User presences that have just left the party. */ - leaves: UserPresence[]; -} -/** Application-level heartbeat and connection check. */ -export interface Ping { -} -/** Application-level heartbeat and connection check response. */ -export interface Pong { -} -/** A snapshot of statuses for some set of users. */ -export interface Status { - /** User statuses. */ - presences: UserPresence[]; -} -/** Start receiving status updates for some set of users. */ -export interface StatusFollow { - /** User IDs to follow. */ - user_ids: string[]; - /** Usernames to follow. */ - usernames: string[]; -} -/** A batch of status updates for a given user. */ -export interface StatusPresenceEvent { - /** New statuses for the user. */ - joins: UserPresence[]; - /** Previous statuses for the user. */ - leaves: UserPresence[]; -} -/** Stop receiving status updates for some set of users. */ -export interface StatusUnfollow { - /** Users to unfollow. */ - user_ids: string[]; -} -/** Set the user's own status. */ -export interface StatusUpdate { - /** Status string to set, if not present the user will appear offline. */ - status: string | undefined; -} -/** Represents identifying information for a stream. */ -export interface Stream { - /** Mode identifies the type of stream. */ - mode: number; - /** Subject is the primary identifier, if any. */ - subject: string; - /** Subcontext is a secondary identifier, if any. */ - subcontext: string; - /** The label is an arbitrary identifying string, if the stream has one. */ - label: string; -} -/** A data message delivered over a stream. */ -export interface StreamData { - /** The stream this data message relates to. */ - stream: Stream | undefined; - /** The sender, if any. */ - sender: UserPresence | undefined; - /** Arbitrary contents of the data message. */ - data: string; - /** True if this data was delivered reliably, false otherwise. */ - reliable: boolean; -} -/** A set of joins and leaves on a particular stream. */ -export interface StreamPresenceEvent { - /** The stream this event relates to. */ - stream: Stream | undefined; - /** Presences joining the stream as part of this event, if any. */ - joins: UserPresence[]; - /** Presences leaving the stream as part of this event, if any. */ - leaves: UserPresence[]; -} -/** A user session associated to a stream, usually through a list operation or a join/leave event. */ -export interface UserPresence { - /** The user this presence belongs to. */ - user_id: string; - /** A unique session ID identifying the particular connection, because the user may have many. */ - session_id: string; - /** The username for display purposes. */ - username: string; - /** Whether this presence generates persistent data/messages, if applicable for the stream type. */ - persistence: boolean; - /** A user-set status message for this stream, if applicable. */ - status: string | undefined; -} -export declare const Envelope: { - encode(message: Envelope, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Envelope; - fromJSON(object: any): Envelope; - toJSON(message: Envelope): unknown; - fromPartial(object: DeepPartial): Envelope; -}; -export declare const Channel: { - encode(message: Channel, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Channel; - fromJSON(object: any): Channel; - toJSON(message: Channel): unknown; - fromPartial(object: DeepPartial): Channel; -}; -export declare const ChannelJoin: { - encode(message: ChannelJoin, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ChannelJoin; - fromJSON(object: any): ChannelJoin; - toJSON(message: ChannelJoin): unknown; - fromPartial(object: DeepPartial): ChannelJoin; -}; -export declare const ChannelLeave: { - encode(message: ChannelLeave, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ChannelLeave; - fromJSON(object: any): ChannelLeave; - toJSON(message: ChannelLeave): unknown; - fromPartial(object: DeepPartial): ChannelLeave; -}; -export declare const ChannelMessageAck: { - encode(message: ChannelMessageAck, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessageAck; - fromJSON(object: any): ChannelMessageAck; - toJSON(message: ChannelMessageAck): unknown; - fromPartial(object: DeepPartial): ChannelMessageAck; -}; -export declare const ChannelMessageSend: { - encode(message: ChannelMessageSend, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessageSend; - fromJSON(object: any): ChannelMessageSend; - toJSON(message: ChannelMessageSend): unknown; - fromPartial(object: DeepPartial): ChannelMessageSend; -}; -export declare const ChannelMessageUpdate: { - encode(message: ChannelMessageUpdate, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessageUpdate; - fromJSON(object: any): ChannelMessageUpdate; - toJSON(message: ChannelMessageUpdate): unknown; - fromPartial(object: DeepPartial): ChannelMessageUpdate; -}; -export declare const ChannelMessageRemove: { - encode(message: ChannelMessageRemove, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessageRemove; - fromJSON(object: any): ChannelMessageRemove; - toJSON(message: ChannelMessageRemove): unknown; - fromPartial(object: DeepPartial): ChannelMessageRemove; -}; -export declare const ChannelPresenceEvent: { - encode(message: ChannelPresenceEvent, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): ChannelPresenceEvent; - fromJSON(object: any): ChannelPresenceEvent; - toJSON(message: ChannelPresenceEvent): unknown; - fromPartial(object: DeepPartial): ChannelPresenceEvent; -}; -export declare const Error: { - encode(message: Error, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Error; - fromJSON(object: any): Error; - toJSON(message: Error): unknown; - fromPartial(object: DeepPartial): Error; -}; -export declare const Error_ContextEntry: { - encode(message: Error_ContextEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Error_ContextEntry; - fromJSON(object: any): Error_ContextEntry; - toJSON(message: Error_ContextEntry): unknown; - fromPartial(object: DeepPartial): Error_ContextEntry; -}; -export declare const Match: { - encode(message: Match, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Match; - fromJSON(object: any): Match; - toJSON(message: Match): unknown; - fromPartial(object: DeepPartial): Match; -}; -export declare const MatchCreate: { - encode(_: MatchCreate, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchCreate; - fromJSON(_: any): MatchCreate; - toJSON(_: MatchCreate): unknown; - fromPartial(_: DeepPartial): MatchCreate; -}; -export declare const MatchData: { - encode(message: MatchData, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchData; - fromJSON(object: any): MatchData; - toJSON(message: MatchData): unknown; - fromPartial(object: DeepPartial): MatchData; -}; -export declare const MatchDataSend: { - encode(message: MatchDataSend, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchDataSend; - fromJSON(object: any): MatchDataSend; - toJSON(message: MatchDataSend): unknown; - fromPartial(object: DeepPartial): MatchDataSend; -}; -export declare const MatchJoin: { - encode(message: MatchJoin, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchJoin; - fromJSON(object: any): MatchJoin; - toJSON(message: MatchJoin): unknown; - fromPartial(object: DeepPartial): MatchJoin; -}; -export declare const MatchJoin_MetadataEntry: { - encode(message: MatchJoin_MetadataEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchJoin_MetadataEntry; - fromJSON(object: any): MatchJoin_MetadataEntry; - toJSON(message: MatchJoin_MetadataEntry): unknown; - fromPartial(object: DeepPartial): MatchJoin_MetadataEntry; -}; -export declare const MatchLeave: { - encode(message: MatchLeave, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchLeave; - fromJSON(object: any): MatchLeave; - toJSON(message: MatchLeave): unknown; - fromPartial(object: DeepPartial): MatchLeave; -}; -export declare const MatchPresenceEvent: { - encode(message: MatchPresenceEvent, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchPresenceEvent; - fromJSON(object: any): MatchPresenceEvent; - toJSON(message: MatchPresenceEvent): unknown; - fromPartial(object: DeepPartial): MatchPresenceEvent; -}; -export declare const MatchmakerAdd: { - encode(message: MatchmakerAdd, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerAdd; - fromJSON(object: any): MatchmakerAdd; - toJSON(message: MatchmakerAdd): unknown; - fromPartial(object: DeepPartial): MatchmakerAdd; -}; -export declare const MatchmakerAdd_StringPropertiesEntry: { - encode(message: MatchmakerAdd_StringPropertiesEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerAdd_StringPropertiesEntry; - fromJSON(object: any): MatchmakerAdd_StringPropertiesEntry; - toJSON(message: MatchmakerAdd_StringPropertiesEntry): unknown; - fromPartial(object: DeepPartial): MatchmakerAdd_StringPropertiesEntry; -}; -export declare const MatchmakerAdd_NumericPropertiesEntry: { - encode(message: MatchmakerAdd_NumericPropertiesEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerAdd_NumericPropertiesEntry; - fromJSON(object: any): MatchmakerAdd_NumericPropertiesEntry; - toJSON(message: MatchmakerAdd_NumericPropertiesEntry): unknown; - fromPartial(object: DeepPartial): MatchmakerAdd_NumericPropertiesEntry; -}; -export declare const MatchmakerMatched: { - encode(message: MatchmakerMatched, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerMatched; - fromJSON(object: any): MatchmakerMatched; - toJSON(message: MatchmakerMatched): unknown; - fromPartial(object: DeepPartial): MatchmakerMatched; -}; -export declare const MatchmakerMatched_MatchmakerUser: { - encode(message: MatchmakerMatched_MatchmakerUser, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerMatched_MatchmakerUser; - fromJSON(object: any): MatchmakerMatched_MatchmakerUser; - toJSON(message: MatchmakerMatched_MatchmakerUser): unknown; - fromPartial(object: DeepPartial): MatchmakerMatched_MatchmakerUser; -}; -export declare const MatchmakerMatched_MatchmakerUser_StringPropertiesEntry: { - encode(message: MatchmakerMatched_MatchmakerUser_StringPropertiesEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerMatched_MatchmakerUser_StringPropertiesEntry; - fromJSON(object: any): MatchmakerMatched_MatchmakerUser_StringPropertiesEntry; - toJSON(message: MatchmakerMatched_MatchmakerUser_StringPropertiesEntry): unknown; - fromPartial(object: DeepPartial): MatchmakerMatched_MatchmakerUser_StringPropertiesEntry; -}; -export declare const MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry: { - encode(message: MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry; - fromJSON(object: any): MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry; - toJSON(message: MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry): unknown; - fromPartial(object: DeepPartial): MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry; -}; -export declare const MatchmakerRemove: { - encode(message: MatchmakerRemove, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerRemove; - fromJSON(object: any): MatchmakerRemove; - toJSON(message: MatchmakerRemove): unknown; - fromPartial(object: DeepPartial): MatchmakerRemove; -}; -export declare const MatchmakerTicket: { - encode(message: MatchmakerTicket, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerTicket; - fromJSON(object: any): MatchmakerTicket; - toJSON(message: MatchmakerTicket): unknown; - fromPartial(object: DeepPartial): MatchmakerTicket; -}; -export declare const Notifications: { - encode(message: Notifications, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Notifications; - fromJSON(object: any): Notifications; - toJSON(message: Notifications): unknown; - fromPartial(object: DeepPartial): Notifications; -}; -export declare const Party: { - encode(message: Party, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Party; - fromJSON(object: any): Party; - toJSON(message: Party): unknown; - fromPartial(object: DeepPartial): Party; -}; -export declare const PartyCreate: { - encode(message: PartyCreate, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyCreate; - fromJSON(object: any): PartyCreate; - toJSON(message: PartyCreate): unknown; - fromPartial(object: DeepPartial): PartyCreate; -}; -export declare const PartyJoin: { - encode(message: PartyJoin, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyJoin; - fromJSON(object: any): PartyJoin; - toJSON(message: PartyJoin): unknown; - fromPartial(object: DeepPartial): PartyJoin; -}; -export declare const PartyLeave: { - encode(message: PartyLeave, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyLeave; - fromJSON(object: any): PartyLeave; - toJSON(message: PartyLeave): unknown; - fromPartial(object: DeepPartial): PartyLeave; -}; -export declare const PartyPromote: { - encode(message: PartyPromote, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyPromote; - fromJSON(object: any): PartyPromote; - toJSON(message: PartyPromote): unknown; - fromPartial(object: DeepPartial): PartyPromote; -}; -export declare const PartyLeader: { - encode(message: PartyLeader, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyLeader; - fromJSON(object: any): PartyLeader; - toJSON(message: PartyLeader): unknown; - fromPartial(object: DeepPartial): PartyLeader; -}; -export declare const PartyAccept: { - encode(message: PartyAccept, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyAccept; - fromJSON(object: any): PartyAccept; - toJSON(message: PartyAccept): unknown; - fromPartial(object: DeepPartial): PartyAccept; -}; -export declare const PartyRemove: { - encode(message: PartyRemove, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyRemove; - fromJSON(object: any): PartyRemove; - toJSON(message: PartyRemove): unknown; - fromPartial(object: DeepPartial): PartyRemove; -}; -export declare const PartyClose: { - encode(message: PartyClose, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyClose; - fromJSON(object: any): PartyClose; - toJSON(message: PartyClose): unknown; - fromPartial(object: DeepPartial): PartyClose; -}; -export declare const PartyJoinRequestList: { - encode(message: PartyJoinRequestList, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyJoinRequestList; - fromJSON(object: any): PartyJoinRequestList; - toJSON(message: PartyJoinRequestList): unknown; - fromPartial(object: DeepPartial): PartyJoinRequestList; -}; -export declare const PartyJoinRequest: { - encode(message: PartyJoinRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyJoinRequest; - fromJSON(object: any): PartyJoinRequest; - toJSON(message: PartyJoinRequest): unknown; - fromPartial(object: DeepPartial): PartyJoinRequest; -}; -export declare const PartyMatchmakerAdd: { - encode(message: PartyMatchmakerAdd, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyMatchmakerAdd; - fromJSON(object: any): PartyMatchmakerAdd; - toJSON(message: PartyMatchmakerAdd): unknown; - fromPartial(object: DeepPartial): PartyMatchmakerAdd; -}; -export declare const PartyMatchmakerAdd_StringPropertiesEntry: { - encode(message: PartyMatchmakerAdd_StringPropertiesEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyMatchmakerAdd_StringPropertiesEntry; - fromJSON(object: any): PartyMatchmakerAdd_StringPropertiesEntry; - toJSON(message: PartyMatchmakerAdd_StringPropertiesEntry): unknown; - fromPartial(object: DeepPartial): PartyMatchmakerAdd_StringPropertiesEntry; -}; -export declare const PartyMatchmakerAdd_NumericPropertiesEntry: { - encode(message: PartyMatchmakerAdd_NumericPropertiesEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyMatchmakerAdd_NumericPropertiesEntry; - fromJSON(object: any): PartyMatchmakerAdd_NumericPropertiesEntry; - toJSON(message: PartyMatchmakerAdd_NumericPropertiesEntry): unknown; - fromPartial(object: DeepPartial): PartyMatchmakerAdd_NumericPropertiesEntry; -}; -export declare const PartyMatchmakerRemove: { - encode(message: PartyMatchmakerRemove, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyMatchmakerRemove; - fromJSON(object: any): PartyMatchmakerRemove; - toJSON(message: PartyMatchmakerRemove): unknown; - fromPartial(object: DeepPartial): PartyMatchmakerRemove; -}; -export declare const PartyMatchmakerTicket: { - encode(message: PartyMatchmakerTicket, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyMatchmakerTicket; - fromJSON(object: any): PartyMatchmakerTicket; - toJSON(message: PartyMatchmakerTicket): unknown; - fromPartial(object: DeepPartial): PartyMatchmakerTicket; -}; -export declare const PartyData: { - encode(message: PartyData, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyData; - fromJSON(object: any): PartyData; - toJSON(message: PartyData): unknown; - fromPartial(object: DeepPartial): PartyData; -}; -export declare const PartyDataSend: { - encode(message: PartyDataSend, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyDataSend; - fromJSON(object: any): PartyDataSend; - toJSON(message: PartyDataSend): unknown; - fromPartial(object: DeepPartial): PartyDataSend; -}; -export declare const PartyPresenceEvent: { - encode(message: PartyPresenceEvent, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): PartyPresenceEvent; - fromJSON(object: any): PartyPresenceEvent; - toJSON(message: PartyPresenceEvent): unknown; - fromPartial(object: DeepPartial): PartyPresenceEvent; -}; -export declare const Ping: { - encode(_: Ping, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Ping; - fromJSON(_: any): Ping; - toJSON(_: Ping): unknown; - fromPartial(_: DeepPartial): Ping; -}; -export declare const Pong: { - encode(_: Pong, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Pong; - fromJSON(_: any): Pong; - toJSON(_: Pong): unknown; - fromPartial(_: DeepPartial): Pong; -}; -export declare const Status: { - encode(message: Status, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Status; - fromJSON(object: any): Status; - toJSON(message: Status): unknown; - fromPartial(object: DeepPartial): Status; -}; -export declare const StatusFollow: { - encode(message: StatusFollow, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): StatusFollow; - fromJSON(object: any): StatusFollow; - toJSON(message: StatusFollow): unknown; - fromPartial(object: DeepPartial): StatusFollow; -}; -export declare const StatusPresenceEvent: { - encode(message: StatusPresenceEvent, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): StatusPresenceEvent; - fromJSON(object: any): StatusPresenceEvent; - toJSON(message: StatusPresenceEvent): unknown; - fromPartial(object: DeepPartial): StatusPresenceEvent; -}; -export declare const StatusUnfollow: { - encode(message: StatusUnfollow, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): StatusUnfollow; - fromJSON(object: any): StatusUnfollow; - toJSON(message: StatusUnfollow): unknown; - fromPartial(object: DeepPartial): StatusUnfollow; -}; -export declare const StatusUpdate: { - encode(message: StatusUpdate, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): StatusUpdate; - fromJSON(object: any): StatusUpdate; - toJSON(message: StatusUpdate): unknown; - fromPartial(object: DeepPartial): StatusUpdate; -}; -export declare const Stream: { - encode(message: Stream, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): Stream; - fromJSON(object: any): Stream; - toJSON(message: Stream): unknown; - fromPartial(object: DeepPartial): Stream; -}; -export declare const StreamData: { - encode(message: StreamData, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): StreamData; - fromJSON(object: any): StreamData; - toJSON(message: StreamData): unknown; - fromPartial(object: DeepPartial): StreamData; -}; -export declare const StreamPresenceEvent: { - encode(message: StreamPresenceEvent, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): StreamPresenceEvent; - fromJSON(object: any): StreamPresenceEvent; - toJSON(message: StreamPresenceEvent): unknown; - fromPartial(object: DeepPartial): StreamPresenceEvent; -}; -export declare const UserPresence: { - encode(message: UserPresence, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number): UserPresence; - fromJSON(object: any): UserPresence; - toJSON(message: UserPresence): unknown; - fromPartial(object: DeepPartial): UserPresence; -}; -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; +import _m0 from "protobufjs/minimal"; +import { ChannelMessage, Rpc, Notification } from "../api/api"; +export declare const protobufPackage = "nakama.realtime"; +/** The realtime protocol for Nakama server. */ +/** An envelope for a realtime message. */ +export interface Envelope { + cid: string; + /** A response from a channel join operation. */ + channel: Channel | undefined; + /** Join a realtime chat channel. */ + channel_join: ChannelJoin | undefined; + /** Leave a realtime chat channel. */ + channel_leave: ChannelLeave | undefined; + /** An incoming message on a realtime chat channel. */ + channel_message: ChannelMessage | undefined; + /** An acknowledgement received in response to sending a message on a chat channel. */ + channel_message_ack: ChannelMessageAck | undefined; + /** Send a message to a realtime chat channel. */ + channel_message_send: ChannelMessageSend | undefined; + /** Update a message previously sent to a realtime chat channel. */ + channel_message_update: ChannelMessageUpdate | undefined; + /** Remove a message previously sent to a realtime chat channel. */ + channel_message_remove: ChannelMessageRemove | undefined; + /** Presence update for a particular realtime chat channel. */ + channel_presence_event: ChannelPresenceEvent | undefined; + /** Describes an error which occurred on the server. */ + error: Error | undefined; + /** Incoming information about a realtime match. */ + match: Match | undefined; + /** A client to server request to create a realtime match. */ + match_create: MatchCreate | undefined; + /** Incoming realtime match data delivered from the server. */ + match_data: MatchData | undefined; + /** A client to server request to send data to a realtime match. */ + match_data_send: MatchDataSend | undefined; + /** A client to server request to join a realtime match. */ + match_join: MatchJoin | undefined; + /** A client to server request to leave a realtime match. */ + match_leave: MatchLeave | undefined; + /** Presence update for a particular realtime match. */ + match_presence_event: MatchPresenceEvent | undefined; + /** Submit a new matchmaking process request. */ + matchmaker_add: MatchmakerAdd | undefined; + /** A successful matchmaking result. */ + matchmaker_matched: MatchmakerMatched | undefined; + /** Cancel a matchmaking process using a ticket. */ + matchmaker_remove: MatchmakerRemove | undefined; + /** A response from starting a new matchmaking process. */ + matchmaker_ticket: MatchmakerTicket | undefined; + /** Notifications send by the server. */ + notifications: Notifications | undefined; + /** RPC call or response. */ + rpc: Rpc | undefined; + /** An incoming status snapshot for some set of users. */ + status: Status | undefined; + /** Start following some set of users to receive their status updates. */ + status_follow: StatusFollow | undefined; + /** An incoming status update. */ + status_presence_event: StatusPresenceEvent | undefined; + /** Stop following some set of users to no longer receive their status updates. */ + status_unfollow: StatusUnfollow | undefined; + /** Set the user's own status. */ + status_update: StatusUpdate | undefined; + /** A data message delivered over a stream. */ + stream_data: StreamData | undefined; + /** Presence update for a particular stream. */ + stream_presence_event: StreamPresenceEvent | undefined; + /** Application-level heartbeat and connection check. */ + ping: Ping | undefined; + /** Application-level heartbeat and connection check response. */ + pong: Pong | undefined; + /** Incoming information about a party. */ + party: Party | undefined; + /** Create a party. */ + party_create: PartyCreate | undefined; + /** Join a party, or request to join if the party is not open. */ + party_join: PartyJoin | undefined; + /** Leave a party. */ + party_leave: PartyLeave | undefined; + /** Promote a new party leader. */ + party_promote: PartyPromote | undefined; + /** Announcement of a new party leader. */ + party_leader: PartyLeader | undefined; + /** Accept a request to join. */ + party_accept: PartyAccept | undefined; + /** Kick a party member, or decline a request to join. */ + party_remove: PartyRemove | undefined; + /** End a party, kicking all party members and closing it. */ + party_close: PartyClose | undefined; + /** Request a list of pending join requests for a party. */ + party_join_request_list: PartyJoinRequestList | undefined; + /** Incoming notification for one or more new presences attempting to join the party. */ + party_join_request: PartyJoinRequest | undefined; + /** Begin matchmaking as a party. */ + party_matchmaker_add: PartyMatchmakerAdd | undefined; + /** Cancel a party matchmaking process using a ticket. */ + party_matchmaker_remove: PartyMatchmakerRemove | undefined; + /** A response from starting a new party matchmaking process. */ + party_matchmaker_ticket: PartyMatchmakerTicket | undefined; + /** Incoming party data delivered from the server. */ + party_data: PartyData | undefined; + /** A client to server request to send data to a party. */ + party_data_send: PartyDataSend | undefined; + /** Presence update for a particular party. */ + party_presence_event: PartyPresenceEvent | undefined; +} +/** A realtime chat channel. */ +export interface Channel { + /** The ID of the channel. */ + id: string; + /** The users currently in the channel. */ + presences: UserPresence[]; + /** A reference to the current user's presence in the channel. */ + self: UserPresence | undefined; + /** The name of the chat room, or an empty string if this message was not sent through a chat room. */ + room_name: string; + /** The ID of the group, or an empty string if this message was not sent through a group channel. */ + group_id: string; + /** The ID of the first DM user, or an empty string if this message was not sent through a DM chat. */ + user_id_one: string; + /** The ID of the second DM user, or an empty string if this message was not sent through a DM chat. */ + user_id_two: string; +} +/** Join operation for a realtime chat channel. */ +export interface ChannelJoin { + /** The user ID to DM with, group ID to chat with, or room channel name to join. */ + target: string; + /** The type of the chat channel. */ + type: number; + /** Whether messages sent on this channel should be persistent. */ + persistence: boolean | undefined; + /** Whether the user should appear in the channel's presence list and events. */ + hidden: boolean | undefined; +} +/** The type of chat channel. */ +export declare enum ChannelJoin_Type { + /** TYPE_UNSPECIFIED - Default case. Assumed as ROOM type. */ + TYPE_UNSPECIFIED = 0, + /** ROOM - A room which anyone can join to chat. */ + ROOM = 1, + /** DIRECT_MESSAGE - A private channel for 1-on-1 chat. */ + DIRECT_MESSAGE = 2, + /** GROUP - A channel for group chat. */ + GROUP = 3, + UNRECOGNIZED = -1 +} +export declare function channelJoin_TypeFromJSON(object: any): ChannelJoin_Type; +export declare function channelJoin_TypeToJSON(object: ChannelJoin_Type): string; +/** Leave a realtime channel. */ +export interface ChannelLeave { + /** The ID of the channel to leave. */ + channel_id: string; +} +/** A receipt reply from a channel message send operation. */ +export interface ChannelMessageAck { + /** The channel the message was sent to. */ + channel_id: string; + /** The unique ID assigned to the message. */ + message_id: string; + /** The code representing a message type or category. */ + code: number | undefined; + /** Username of the message sender. */ + username: string; + /** The UNIX time when the message was created. */ + create_time: Date | undefined; + /** The UNIX time when the message was last updated. */ + update_time: Date | undefined; + /** True if the message was persisted to the channel's history, false otherwise. */ + persistent: boolean | undefined; + /** The name of the chat room, or an empty string if this message was not sent through a chat room. */ + room_name: string; + /** The ID of the group, or an empty string if this message was not sent through a group channel. */ + group_id: string; + /** The ID of the first DM user, or an empty string if this message was not sent through a DM chat. */ + user_id_one: string; + /** The ID of the second DM user, or an empty string if this message was not sent through a DM chat. */ + user_id_two: string; +} +/** Send a message to a realtime channel. */ +export interface ChannelMessageSend { + /** The channel to sent to. */ + channel_id: string; + /** Message content. */ + content: string; +} +/** Update a message previously sent to a realtime channel. */ +export interface ChannelMessageUpdate { + /** The channel the message was sent to. */ + channel_id: string; + /** The ID assigned to the message to update. */ + message_id: string; + /** New message content. */ + content: string; +} +/** Remove a message previously sent to a realtime channel. */ +export interface ChannelMessageRemove { + /** The channel the message was sent to. */ + channel_id: string; + /** The ID assigned to the message to update. */ + message_id: string; +} +/** A set of joins and leaves on a particular channel. */ +export interface ChannelPresenceEvent { + /** The channel identifier this event is for. */ + channel_id: string; + /** Presences joining the channel as part of this event, if any. */ + joins: UserPresence[]; + /** Presences leaving the channel as part of this event, if any. */ + leaves: UserPresence[]; + /** The name of the chat room, or an empty string if this message was not sent through a chat room. */ + room_name: string; + /** The ID of the group, or an empty string if this message was not sent through a group channel. */ + group_id: string; + /** The ID of the first DM user, or an empty string if this message was not sent through a DM chat. */ + user_id_one: string; + /** The ID of the second DM user, or an empty string if this message was not sent through a DM chat. */ + user_id_two: string; +} +/** A logical error which may occur on the server. */ +export interface Error { + /** The error code which should be one of "Error.Code" enums. */ + code: number; + /** A message in English to help developers debug the response. */ + message: string; + /** Additional error details which may be different for each response. */ + context: { + [key: string]: string; + }; +} +/** The selection of possible error codes. */ +export declare enum Error_Code { + /** RUNTIME_EXCEPTION - An unexpected result from the server. */ + RUNTIME_EXCEPTION = 0, + /** UNRECOGNIZED_PAYLOAD - The server received a message which is not recognised. */ + UNRECOGNIZED_PAYLOAD = 1, + /** MISSING_PAYLOAD - A message was expected but contains no content. */ + MISSING_PAYLOAD = 2, + /** BAD_INPUT - Fields in the message have an invalid format. */ + BAD_INPUT = 3, + /** MATCH_NOT_FOUND - The match id was not found. */ + MATCH_NOT_FOUND = 4, + /** MATCH_JOIN_REJECTED - The match join was rejected. */ + MATCH_JOIN_REJECTED = 5, + /** RUNTIME_FUNCTION_NOT_FOUND - The runtime function does not exist on the server. */ + RUNTIME_FUNCTION_NOT_FOUND = 6, + /** RUNTIME_FUNCTION_EXCEPTION - The runtime function executed with an error. */ + RUNTIME_FUNCTION_EXCEPTION = 7, + UNRECOGNIZED = -1 +} +export declare function error_CodeFromJSON(object: any): Error_Code; +export declare function error_CodeToJSON(object: Error_Code): string; +export interface Error_ContextEntry { + key: string; + value: string; +} +/** A realtime match. */ +export interface Match { + /** The match unique ID. */ + match_id: string; + /** True if it's an server-managed authoritative match, false otherwise. */ + authoritative: boolean; + /** Match label, if any. */ + label: string | undefined; + /** The number of users currently in the match. */ + size: number; + /** The users currently in the match. */ + presences: UserPresence[]; + /** A reference to the current user's presence in the match. */ + self: UserPresence | undefined; +} +/** Create a new realtime match. */ +export interface MatchCreate { + name?: string; +} +/** Realtime match data received from the server. */ +export interface MatchData { + /** The match unique ID. */ + match_id: string; + /** A reference to the user presence that sent this data, if any. */ + presence: UserPresence | undefined; + /** Op code value. */ + op_code: number; + /** Data payload, if any. */ + data: Uint8Array; + /** True if this data was delivered reliably, false otherwise. */ + reliable: boolean; +} +/** Send realtime match data to the server. */ +export interface MatchDataSend { + /** The match unique ID. */ + match_id: string; + /** Op code value. */ + op_code: number; + /** Data payload, if any. */ + data: Uint8Array; + /** List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match. */ + presences: UserPresence[]; + /** True if the data should be sent reliably, false otherwise. */ + reliable: boolean; +} +/** Join an existing realtime match. */ +export interface MatchJoin { + /** The match unique ID. */ + match_id: string | undefined; + /** A matchmaking result token. */ + token: string | undefined; + /** An optional set of key-value metadata pairs to be passed to the match handler, if any. */ + metadata: { + [key: string]: string; + }; +} +export interface MatchJoin_MetadataEntry { + key: string; + value: string; +} +/** Leave a realtime match. */ +export interface MatchLeave { + /** The match unique ID. */ + match_id: string; +} +/** A set of joins and leaves on a particular realtime match. */ +export interface MatchPresenceEvent { + /** The match unique ID. */ + match_id: string; + /** User presences that have just joined the match. */ + joins: UserPresence[]; + /** User presences that have just left the match. */ + leaves: UserPresence[]; +} +/** Start a new matchmaking process. */ +export interface MatchmakerAdd { + /** Minimum total user count to match together. */ + min_count: number; + /** Maximum total user count to match together. */ + max_count: number; + /** Filter query used to identify suitable users. */ + query: string; + /** String properties. */ + string_properties: { + [key: string]: string; + }; + /** Numeric properties. */ + numeric_properties: { + [key: string]: number; + }; +} +export interface MatchmakerAdd_StringPropertiesEntry { + key: string; + value: string; +} +export interface MatchmakerAdd_NumericPropertiesEntry { + key: string; + value: number; +} +/** A successful matchmaking result. */ +export interface MatchmakerMatched { + /** The matchmaking ticket that has completed. */ + ticket: string; + /** Match ID. */ + match_id: string | undefined; + /** Match join token. */ + token: string | undefined; + /** The users that have been matched together, and information about their matchmaking data. */ + users: MatchmakerMatched_MatchmakerUser[]; + /** A reference to the current user and their properties. */ + self: MatchmakerMatched_MatchmakerUser | undefined; +} +export interface MatchmakerMatched_MatchmakerUser { + /** User info. */ + presence: UserPresence | undefined; + /** Party identifier, if this user was matched as a party member. */ + party_id: string; + /** String properties. */ + string_properties: { + [key: string]: string; + }; + /** Numeric properties. */ + numeric_properties: { + [key: string]: number; + }; +} +export interface MatchmakerMatched_MatchmakerUser_StringPropertiesEntry { + key: string; + value: string; +} +export interface MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry { + key: string; + value: number; +} +/** Cancel an existing ongoing matchmaking process. */ +export interface MatchmakerRemove { + /** The ticket to cancel. */ + ticket: string; +} +/** A ticket representing a new matchmaking process. */ +export interface MatchmakerTicket { + /** The ticket that can be used to cancel matchmaking. */ + ticket: string; +} +/** A collection of zero or more notifications. */ +export interface Notifications { + /** Collection of notifications. */ + notifications: Notification[]; +} +/** Incoming information about a party. */ +export interface Party { + /** Unique party identifier. */ + party_id: string; + /** Open flag. */ + open: boolean; + /** Maximum number of party members. */ + max_size: number; + /** Self. */ + self: UserPresence | undefined; + /** Leader. */ + leader: UserPresence | undefined; + /** All current party members. */ + presences: UserPresence[]; +} +/** Create a party. */ +export interface PartyCreate { + /** Whether or not the party will require join requests to be approved by the party leader. */ + open: boolean; + /** Maximum number of party members. */ + max_size: number; +} +/** Join a party, or request to join if the party is not open. */ +export interface PartyJoin { + /** Party ID to join. */ + party_id: string; +} +/** Leave a party. */ +export interface PartyLeave { + /** Party ID to leave. */ + party_id: string; +} +/** Promote a new party leader. */ +export interface PartyPromote { + /** Party ID to promote a new leader for. */ + party_id: string; + /** The presence of an existing party member to promote as the new leader. */ + presence: UserPresence | undefined; +} +/** Announcement of a new party leader. */ +export interface PartyLeader { + /** Party ID to announce the new leader for. */ + party_id: string; + /** The presence of the new party leader. */ + presence: UserPresence | undefined; +} +/** Accept a request to join. */ +export interface PartyAccept { + /** Party ID to accept a join request for. */ + party_id: string; + /** The presence to accept as a party member. */ + presence: UserPresence | undefined; +} +/** Kick a party member, or decline a request to join. */ +export interface PartyRemove { + /** Party ID to remove/reject from. */ + party_id: string; + /** The presence to remove or reject. */ + presence: UserPresence | undefined; +} +/** End a party, kicking all party members and closing it. */ +export interface PartyClose { + /** Party ID to close. */ + party_id: string; +} +/** Request a list of pending join requests for a party. */ +export interface PartyJoinRequestList { + /** Party ID to get a list of join requests for. */ + party_id: string; +} +/** Incoming notification for one or more new presences attempting to join the party. */ +export interface PartyJoinRequest { + /** Party ID these presences are attempting to join. */ + party_id: string; + /** Presences attempting to join. */ + presences: UserPresence[]; +} +/** Begin matchmaking as a party. */ +export interface PartyMatchmakerAdd { + /** Party ID. */ + party_id: string; + /** Minimum total user count to match together. */ + min_count: number; + /** Maximum total user count to match together. */ + max_count: number; + /** Filter query used to identify suitable users. */ + query: string; + /** String properties. */ + string_properties: { + [key: string]: string; + }; + /** Numeric properties. */ + numeric_properties: { + [key: string]: number; + }; +} +export interface PartyMatchmakerAdd_StringPropertiesEntry { + key: string; + value: string; +} +export interface PartyMatchmakerAdd_NumericPropertiesEntry { + key: string; + value: number; +} +/** Cancel a party matchmaking process using a ticket. */ +export interface PartyMatchmakerRemove { + /** Party ID. */ + party_id: string; + /** The ticket to cancel. */ + ticket: string; +} +/** A response from starting a new party matchmaking process. */ +export interface PartyMatchmakerTicket { + /** Party ID. */ + party_id: string; + /** The ticket that can be used to cancel matchmaking. */ + ticket: string; +} +/** Incoming party data delivered from the server. */ +export interface PartyData { + /** The party ID. */ + party_id: string; + /** A reference to the user presence that sent this data, if any. */ + presence: UserPresence | undefined; + /** Op code value. */ + op_code: number; + /** Data payload, if any. */ + data: Uint8Array; +} +/** Send data to a party. */ +export interface PartyDataSend { + /** Party ID to send to. */ + party_id: string; + /** Op code value. */ + op_code: number; + /** Data payload, if any. */ + data: Uint8Array; +} +/** Presence update for a particular party. */ +export interface PartyPresenceEvent { + /** The party ID. */ + party_id: string; + /** User presences that have just joined the party. */ + joins: UserPresence[]; + /** User presences that have just left the party. */ + leaves: UserPresence[]; +} +/** Application-level heartbeat and connection check. */ +export interface Ping { +} +/** Application-level heartbeat and connection check response. */ +export interface Pong { +} +/** A snapshot of statuses for some set of users. */ +export interface Status { + /** User statuses. */ + presences: UserPresence[]; +} +/** Start receiving status updates for some set of users. */ +export interface StatusFollow { + /** User IDs to follow. */ + user_ids: string[]; + /** Usernames to follow. */ + usernames: string[]; +} +/** A batch of status updates for a given user. */ +export interface StatusPresenceEvent { + /** New statuses for the user. */ + joins: UserPresence[]; + /** Previous statuses for the user. */ + leaves: UserPresence[]; +} +/** Stop receiving status updates for some set of users. */ +export interface StatusUnfollow { + /** Users to unfollow. */ + user_ids: string[]; +} +/** Set the user's own status. */ +export interface StatusUpdate { + /** Status string to set, if not present the user will appear offline. */ + status: string | undefined; +} +/** Represents identifying information for a stream. */ +export interface Stream { + /** Mode identifies the type of stream. */ + mode: number; + /** Subject is the primary identifier, if any. */ + subject: string; + /** Subcontext is a secondary identifier, if any. */ + subcontext: string; + /** The label is an arbitrary identifying string, if the stream has one. */ + label: string; +} +/** A data message delivered over a stream. */ +export interface StreamData { + /** The stream this data message relates to. */ + stream: Stream | undefined; + /** The sender, if any. */ + sender: UserPresence | undefined; + /** Arbitrary contents of the data message. */ + data: string; + /** True if this data was delivered reliably, false otherwise. */ + reliable: boolean; +} +/** A set of joins and leaves on a particular stream. */ +export interface StreamPresenceEvent { + /** The stream this event relates to. */ + stream: Stream | undefined; + /** Presences joining the stream as part of this event, if any. */ + joins: UserPresence[]; + /** Presences leaving the stream as part of this event, if any. */ + leaves: UserPresence[]; +} +/** A user session associated to a stream, usually through a list operation or a join/leave event. */ +export interface UserPresence { + /** The user this presence belongs to. */ + user_id: string; + /** A unique session ID identifying the particular connection, because the user may have many. */ + session_id: string; + /** The username for display purposes. */ + username: string; + /** Whether this presence generates persistent data/messages, if applicable for the stream type. */ + persistence: boolean; + /** A user-set status message for this stream, if applicable. */ + status: string | undefined; +} +export declare const Envelope: { + encode(message: Envelope, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Envelope; + fromJSON(object: any): Envelope; + toJSON(message: Envelope): unknown; + fromPartial(object: DeepPartial): Envelope; +}; +export declare const Channel: { + encode(message: Channel, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Channel; + fromJSON(object: any): Channel; + toJSON(message: Channel): unknown; + fromPartial(object: DeepPartial): Channel; +}; +export declare const ChannelJoin: { + encode(message: ChannelJoin, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ChannelJoin; + fromJSON(object: any): ChannelJoin; + toJSON(message: ChannelJoin): unknown; + fromPartial(object: DeepPartial): ChannelJoin; +}; +export declare const ChannelLeave: { + encode(message: ChannelLeave, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ChannelLeave; + fromJSON(object: any): ChannelLeave; + toJSON(message: ChannelLeave): unknown; + fromPartial(object: DeepPartial): ChannelLeave; +}; +export declare const ChannelMessageAck: { + encode(message: ChannelMessageAck, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessageAck; + fromJSON(object: any): ChannelMessageAck; + toJSON(message: ChannelMessageAck): unknown; + fromPartial(object: DeepPartial): ChannelMessageAck; +}; +export declare const ChannelMessageSend: { + encode(message: ChannelMessageSend, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessageSend; + fromJSON(object: any): ChannelMessageSend; + toJSON(message: ChannelMessageSend): unknown; + fromPartial(object: DeepPartial): ChannelMessageSend; +}; +export declare const ChannelMessageUpdate: { + encode(message: ChannelMessageUpdate, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessageUpdate; + fromJSON(object: any): ChannelMessageUpdate; + toJSON(message: ChannelMessageUpdate): unknown; + fromPartial(object: DeepPartial): ChannelMessageUpdate; +}; +export declare const ChannelMessageRemove: { + encode(message: ChannelMessageRemove, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMessageRemove; + fromJSON(object: any): ChannelMessageRemove; + toJSON(message: ChannelMessageRemove): unknown; + fromPartial(object: DeepPartial): ChannelMessageRemove; +}; +export declare const ChannelPresenceEvent: { + encode(message: ChannelPresenceEvent, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ChannelPresenceEvent; + fromJSON(object: any): ChannelPresenceEvent; + toJSON(message: ChannelPresenceEvent): unknown; + fromPartial(object: DeepPartial): ChannelPresenceEvent; +}; +export declare const Error: { + encode(message: Error, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Error; + fromJSON(object: any): Error; + toJSON(message: Error): unknown; + fromPartial(object: DeepPartial): Error; +}; +export declare const Error_ContextEntry: { + encode(message: Error_ContextEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Error_ContextEntry; + fromJSON(object: any): Error_ContextEntry; + toJSON(message: Error_ContextEntry): unknown; + fromPartial(object: DeepPartial): Error_ContextEntry; +}; +export declare const Match: { + encode(message: Match, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Match; + fromJSON(object: any): Match; + toJSON(message: Match): unknown; + fromPartial(object: DeepPartial): Match; +}; +export declare const MatchCreate: { + encode(_: MatchCreate, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchCreate; + fromJSON(_: any): MatchCreate; + toJSON(_: MatchCreate): unknown; + fromPartial(_: DeepPartial): MatchCreate; +}; +export declare const MatchData: { + encode(message: MatchData, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchData; + fromJSON(object: any): MatchData; + toJSON(message: MatchData): unknown; + fromPartial(object: DeepPartial): MatchData; +}; +export declare const MatchDataSend: { + encode(message: MatchDataSend, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchDataSend; + fromJSON(object: any): MatchDataSend; + toJSON(message: MatchDataSend): unknown; + fromPartial(object: DeepPartial): MatchDataSend; +}; +export declare const MatchJoin: { + encode(message: MatchJoin, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchJoin; + fromJSON(object: any): MatchJoin; + toJSON(message: MatchJoin): unknown; + fromPartial(object: DeepPartial): MatchJoin; +}; +export declare const MatchJoin_MetadataEntry: { + encode(message: MatchJoin_MetadataEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchJoin_MetadataEntry; + fromJSON(object: any): MatchJoin_MetadataEntry; + toJSON(message: MatchJoin_MetadataEntry): unknown; + fromPartial(object: DeepPartial): MatchJoin_MetadataEntry; +}; +export declare const MatchLeave: { + encode(message: MatchLeave, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchLeave; + fromJSON(object: any): MatchLeave; + toJSON(message: MatchLeave): unknown; + fromPartial(object: DeepPartial): MatchLeave; +}; +export declare const MatchPresenceEvent: { + encode(message: MatchPresenceEvent, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchPresenceEvent; + fromJSON(object: any): MatchPresenceEvent; + toJSON(message: MatchPresenceEvent): unknown; + fromPartial(object: DeepPartial): MatchPresenceEvent; +}; +export declare const MatchmakerAdd: { + encode(message: MatchmakerAdd, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerAdd; + fromJSON(object: any): MatchmakerAdd; + toJSON(message: MatchmakerAdd): unknown; + fromPartial(object: DeepPartial): MatchmakerAdd; +}; +export declare const MatchmakerAdd_StringPropertiesEntry: { + encode(message: MatchmakerAdd_StringPropertiesEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerAdd_StringPropertiesEntry; + fromJSON(object: any): MatchmakerAdd_StringPropertiesEntry; + toJSON(message: MatchmakerAdd_StringPropertiesEntry): unknown; + fromPartial(object: DeepPartial): MatchmakerAdd_StringPropertiesEntry; +}; +export declare const MatchmakerAdd_NumericPropertiesEntry: { + encode(message: MatchmakerAdd_NumericPropertiesEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerAdd_NumericPropertiesEntry; + fromJSON(object: any): MatchmakerAdd_NumericPropertiesEntry; + toJSON(message: MatchmakerAdd_NumericPropertiesEntry): unknown; + fromPartial(object: DeepPartial): MatchmakerAdd_NumericPropertiesEntry; +}; +export declare const MatchmakerMatched: { + encode(message: MatchmakerMatched, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerMatched; + fromJSON(object: any): MatchmakerMatched; + toJSON(message: MatchmakerMatched): unknown; + fromPartial(object: DeepPartial): MatchmakerMatched; +}; +export declare const MatchmakerMatched_MatchmakerUser: { + encode(message: MatchmakerMatched_MatchmakerUser, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerMatched_MatchmakerUser; + fromJSON(object: any): MatchmakerMatched_MatchmakerUser; + toJSON(message: MatchmakerMatched_MatchmakerUser): unknown; + fromPartial(object: DeepPartial): MatchmakerMatched_MatchmakerUser; +}; +export declare const MatchmakerMatched_MatchmakerUser_StringPropertiesEntry: { + encode(message: MatchmakerMatched_MatchmakerUser_StringPropertiesEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerMatched_MatchmakerUser_StringPropertiesEntry; + fromJSON(object: any): MatchmakerMatched_MatchmakerUser_StringPropertiesEntry; + toJSON(message: MatchmakerMatched_MatchmakerUser_StringPropertiesEntry): unknown; + fromPartial(object: DeepPartial): MatchmakerMatched_MatchmakerUser_StringPropertiesEntry; +}; +export declare const MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry: { + encode(message: MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry; + fromJSON(object: any): MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry; + toJSON(message: MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry): unknown; + fromPartial(object: DeepPartial): MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry; +}; +export declare const MatchmakerRemove: { + encode(message: MatchmakerRemove, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerRemove; + fromJSON(object: any): MatchmakerRemove; + toJSON(message: MatchmakerRemove): unknown; + fromPartial(object: DeepPartial): MatchmakerRemove; +}; +export declare const MatchmakerTicket: { + encode(message: MatchmakerTicket, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MatchmakerTicket; + fromJSON(object: any): MatchmakerTicket; + toJSON(message: MatchmakerTicket): unknown; + fromPartial(object: DeepPartial): MatchmakerTicket; +}; +export declare const Notifications: { + encode(message: Notifications, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Notifications; + fromJSON(object: any): Notifications; + toJSON(message: Notifications): unknown; + fromPartial(object: DeepPartial): Notifications; +}; +export declare const Party: { + encode(message: Party, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Party; + fromJSON(object: any): Party; + toJSON(message: Party): unknown; + fromPartial(object: DeepPartial): Party; +}; +export declare const PartyCreate: { + encode(message: PartyCreate, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyCreate; + fromJSON(object: any): PartyCreate; + toJSON(message: PartyCreate): unknown; + fromPartial(object: DeepPartial): PartyCreate; +}; +export declare const PartyJoin: { + encode(message: PartyJoin, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyJoin; + fromJSON(object: any): PartyJoin; + toJSON(message: PartyJoin): unknown; + fromPartial(object: DeepPartial): PartyJoin; +}; +export declare const PartyLeave: { + encode(message: PartyLeave, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyLeave; + fromJSON(object: any): PartyLeave; + toJSON(message: PartyLeave): unknown; + fromPartial(object: DeepPartial): PartyLeave; +}; +export declare const PartyPromote: { + encode(message: PartyPromote, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyPromote; + fromJSON(object: any): PartyPromote; + toJSON(message: PartyPromote): unknown; + fromPartial(object: DeepPartial): PartyPromote; +}; +export declare const PartyLeader: { + encode(message: PartyLeader, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyLeader; + fromJSON(object: any): PartyLeader; + toJSON(message: PartyLeader): unknown; + fromPartial(object: DeepPartial): PartyLeader; +}; +export declare const PartyAccept: { + encode(message: PartyAccept, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyAccept; + fromJSON(object: any): PartyAccept; + toJSON(message: PartyAccept): unknown; + fromPartial(object: DeepPartial): PartyAccept; +}; +export declare const PartyRemove: { + encode(message: PartyRemove, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyRemove; + fromJSON(object: any): PartyRemove; + toJSON(message: PartyRemove): unknown; + fromPartial(object: DeepPartial): PartyRemove; +}; +export declare const PartyClose: { + encode(message: PartyClose, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyClose; + fromJSON(object: any): PartyClose; + toJSON(message: PartyClose): unknown; + fromPartial(object: DeepPartial): PartyClose; +}; +export declare const PartyJoinRequestList: { + encode(message: PartyJoinRequestList, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyJoinRequestList; + fromJSON(object: any): PartyJoinRequestList; + toJSON(message: PartyJoinRequestList): unknown; + fromPartial(object: DeepPartial): PartyJoinRequestList; +}; +export declare const PartyJoinRequest: { + encode(message: PartyJoinRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyJoinRequest; + fromJSON(object: any): PartyJoinRequest; + toJSON(message: PartyJoinRequest): unknown; + fromPartial(object: DeepPartial): PartyJoinRequest; +}; +export declare const PartyMatchmakerAdd: { + encode(message: PartyMatchmakerAdd, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyMatchmakerAdd; + fromJSON(object: any): PartyMatchmakerAdd; + toJSON(message: PartyMatchmakerAdd): unknown; + fromPartial(object: DeepPartial): PartyMatchmakerAdd; +}; +export declare const PartyMatchmakerAdd_StringPropertiesEntry: { + encode(message: PartyMatchmakerAdd_StringPropertiesEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyMatchmakerAdd_StringPropertiesEntry; + fromJSON(object: any): PartyMatchmakerAdd_StringPropertiesEntry; + toJSON(message: PartyMatchmakerAdd_StringPropertiesEntry): unknown; + fromPartial(object: DeepPartial): PartyMatchmakerAdd_StringPropertiesEntry; +}; +export declare const PartyMatchmakerAdd_NumericPropertiesEntry: { + encode(message: PartyMatchmakerAdd_NumericPropertiesEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyMatchmakerAdd_NumericPropertiesEntry; + fromJSON(object: any): PartyMatchmakerAdd_NumericPropertiesEntry; + toJSON(message: PartyMatchmakerAdd_NumericPropertiesEntry): unknown; + fromPartial(object: DeepPartial): PartyMatchmakerAdd_NumericPropertiesEntry; +}; +export declare const PartyMatchmakerRemove: { + encode(message: PartyMatchmakerRemove, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyMatchmakerRemove; + fromJSON(object: any): PartyMatchmakerRemove; + toJSON(message: PartyMatchmakerRemove): unknown; + fromPartial(object: DeepPartial): PartyMatchmakerRemove; +}; +export declare const PartyMatchmakerTicket: { + encode(message: PartyMatchmakerTicket, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyMatchmakerTicket; + fromJSON(object: any): PartyMatchmakerTicket; + toJSON(message: PartyMatchmakerTicket): unknown; + fromPartial(object: DeepPartial): PartyMatchmakerTicket; +}; +export declare const PartyData: { + encode(message: PartyData, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyData; + fromJSON(object: any): PartyData; + toJSON(message: PartyData): unknown; + fromPartial(object: DeepPartial): PartyData; +}; +export declare const PartyDataSend: { + encode(message: PartyDataSend, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyDataSend; + fromJSON(object: any): PartyDataSend; + toJSON(message: PartyDataSend): unknown; + fromPartial(object: DeepPartial): PartyDataSend; +}; +export declare const PartyPresenceEvent: { + encode(message: PartyPresenceEvent, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): PartyPresenceEvent; + fromJSON(object: any): PartyPresenceEvent; + toJSON(message: PartyPresenceEvent): unknown; + fromPartial(object: DeepPartial): PartyPresenceEvent; +}; +export declare const Ping: { + encode(_: Ping, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Ping; + fromJSON(_: any): Ping; + toJSON(_: Ping): unknown; + fromPartial(_: DeepPartial): Ping; +}; +export declare const Pong: { + encode(_: Pong, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Pong; + fromJSON(_: any): Pong; + toJSON(_: Pong): unknown; + fromPartial(_: DeepPartial): Pong; +}; +export declare const Status: { + encode(message: Status, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Status; + fromJSON(object: any): Status; + toJSON(message: Status): unknown; + fromPartial(object: DeepPartial): Status; +}; +export declare const StatusFollow: { + encode(message: StatusFollow, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): StatusFollow; + fromJSON(object: any): StatusFollow; + toJSON(message: StatusFollow): unknown; + fromPartial(object: DeepPartial): StatusFollow; +}; +export declare const StatusPresenceEvent: { + encode(message: StatusPresenceEvent, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): StatusPresenceEvent; + fromJSON(object: any): StatusPresenceEvent; + toJSON(message: StatusPresenceEvent): unknown; + fromPartial(object: DeepPartial): StatusPresenceEvent; +}; +export declare const StatusUnfollow: { + encode(message: StatusUnfollow, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): StatusUnfollow; + fromJSON(object: any): StatusUnfollow; + toJSON(message: StatusUnfollow): unknown; + fromPartial(object: DeepPartial): StatusUnfollow; +}; +export declare const StatusUpdate: { + encode(message: StatusUpdate, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): StatusUpdate; + fromJSON(object: any): StatusUpdate; + toJSON(message: StatusUpdate): unknown; + fromPartial(object: DeepPartial): StatusUpdate; +}; +export declare const Stream: { + encode(message: Stream, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Stream; + fromJSON(object: any): Stream; + toJSON(message: Stream): unknown; + fromPartial(object: DeepPartial): Stream; +}; +export declare const StreamData: { + encode(message: StreamData, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): StreamData; + fromJSON(object: any): StreamData; + toJSON(message: StreamData): unknown; + fromPartial(object: DeepPartial): StreamData; +}; +export declare const StreamPresenceEvent: { + encode(message: StreamPresenceEvent, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): StreamPresenceEvent; + fromJSON(object: any): StreamPresenceEvent; + toJSON(message: StreamPresenceEvent): unknown; + fromPartial(object: DeepPartial): StreamPresenceEvent; +}; +export declare const UserPresence: { + encode(message: UserPresence, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): UserPresence; + fromJSON(object: any): UserPresence; + toJSON(message: UserPresence): unknown; + fromPartial(object: DeepPartial): UserPresence; +}; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; +export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { + [K in keyof T]?: DeepPartial; +} : Partial; +export {}; diff --git a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/web_socket_adapter_pb.d.ts b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/web_socket_adapter_pb.d.ts index e6de4d9..0400bd6 100644 --- a/packages/nakama-js-protobuf/dist/nakama-js-protobuf/web_socket_adapter_pb.d.ts +++ b/packages/nakama-js-protobuf/dist/nakama-js-protobuf/web_socket_adapter_pb.d.ts @@ -1,35 +1,35 @@ -/** - * Copyright 2020 The Nakama Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { WebSocketAdapter, SocketCloseHandler, SocketErrorHandler, SocketMessageHandler, SocketOpenHandler } from "../nakama-js/web_socket_adapter"; -/** - * A protocol buffer socket adapter that accepts and transmits payloads using the protobuf binary wire format. - */ -export declare class WebSocketAdapterPb implements WebSocketAdapter { - private _socket?; - constructor(); - get onClose(): SocketCloseHandler | null; - set onClose(value: SocketCloseHandler | null); - get onError(): SocketErrorHandler | null; - set onError(value: SocketErrorHandler | null); - get onMessage(): SocketMessageHandler | null; - set onMessage(value: SocketMessageHandler | null); - get onOpen(): SocketOpenHandler | null; - set onOpen(value: SocketOpenHandler | null); - isOpen(): boolean; - close(): void; - connect(scheme: string, host: string, port: string, createStatus: boolean, token: string): void; - send(msg: any): void; -} +/** + * Copyright 2020 The Nakama Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WebSocketAdapter, SocketCloseHandler, SocketErrorHandler, SocketMessageHandler, SocketOpenHandler } from "../nakama-js/web_socket_adapter"; +/** + * A protocol buffer socket adapter that accepts and transmits payloads using the protobuf binary wire format. + */ +export declare class WebSocketAdapterPb implements WebSocketAdapter { + private _socket?; + constructor(); + get onClose(): SocketCloseHandler | null; + set onClose(value: SocketCloseHandler | null); + get onError(): SocketErrorHandler | null; + set onError(value: SocketErrorHandler | null); + get onMessage(): SocketMessageHandler | null; + set onMessage(value: SocketMessageHandler | null); + get onOpen(): SocketOpenHandler | null; + set onOpen(value: SocketOpenHandler | null); + isOpen(): boolean; + close(): void; + connect(scheme: string, host: string, port: string, createStatus: boolean, token: string): void; + send(msg: any): void; +} diff --git a/packages/nakama-js-protobuf/dist/nakama-js/web_socket_adapter.d.ts b/packages/nakama-js-protobuf/dist/nakama-js/web_socket_adapter.d.ts index 0077106..7a457f5 100644 --- a/packages/nakama-js-protobuf/dist/nakama-js/web_socket_adapter.d.ts +++ b/packages/nakama-js-protobuf/dist/nakama-js/web_socket_adapter.d.ts @@ -1,83 +1,83 @@ -/** - * Copyright 2020 The Nakama Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * An interface used by Nakama's web socket to determine the payload protocol. - */ -export interface WebSocketAdapter { - /** - * Dispatched when the web socket closes. - */ - onClose: SocketCloseHandler | null; - /** - * Dispatched when the web socket receives an error. - */ - onError: SocketErrorHandler | null; - /** - * Dispatched when the web socket receives a normal message. - */ - onMessage: SocketMessageHandler | null; - /** - * Dispatched when the web socket opens. - */ - onOpen: SocketOpenHandler | null; - isOpen(): boolean; - close(): void; - connect(scheme: string, host: string, port: string, createStatus: boolean, token: string): void; - send(message: any): void; -} -/** - * SocketCloseHandler defines a lambda that handles WebSocket close events. - */ -export interface SocketCloseHandler { - (this: WebSocket, evt: CloseEvent): void; -} -/** - * SocketErrorHandler defines a lambda that handles responses from the server via WebSocket - * that indicate an error. - */ -export interface SocketErrorHandler { - (this: WebSocket, evt: Event): void; -} -/** - * SocketMessageHandler defines a lambda that handles valid WebSocket messages. - */ -export interface SocketMessageHandler { - (message: any): void; -} -/** - * SocketOpenHandler defines a lambda that handles WebSocket open events. - */ -export interface SocketOpenHandler { - (this: WebSocket, evt: Event): void; -} -/** - * A text-based socket adapter that accepts and transmits payloads over UTF-8. - */ -export declare class WebSocketAdapterText implements WebSocketAdapter { - private _socket?; - get onClose(): SocketCloseHandler | null; - set onClose(value: SocketCloseHandler | null); - get onError(): SocketErrorHandler | null; - set onError(value: SocketErrorHandler | null); - get onMessage(): SocketMessageHandler | null; - set onMessage(value: SocketMessageHandler | null); - get onOpen(): SocketOpenHandler | null; - set onOpen(value: SocketOpenHandler | null); - isOpen(): boolean; - connect(scheme: string, host: string, port: string, createStatus: boolean, token: string): void; - close(): void; - send(msg: any): void; -} +/** + * Copyright 2020 The Nakama Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * An interface used by Nakama's web socket to determine the payload protocol. + */ +export interface WebSocketAdapter { + /** + * Dispatched when the web socket closes. + */ + onClose: SocketCloseHandler | null; + /** + * Dispatched when the web socket receives an error. + */ + onError: SocketErrorHandler | null; + /** + * Dispatched when the web socket receives a normal message. + */ + onMessage: SocketMessageHandler | null; + /** + * Dispatched when the web socket opens. + */ + onOpen: SocketOpenHandler | null; + isOpen(): boolean; + close(): void; + connect(scheme: string, host: string, port: string, createStatus: boolean, token: string): void; + send(message: any): void; +} +/** + * SocketCloseHandler defines a lambda that handles WebSocket close events. + */ +export interface SocketCloseHandler { + (this: WebSocket, evt: CloseEvent): void; +} +/** + * SocketErrorHandler defines a lambda that handles responses from the server via WebSocket + * that indicate an error. + */ +export interface SocketErrorHandler { + (this: WebSocket, evt: Event): void; +} +/** + * SocketMessageHandler defines a lambda that handles valid WebSocket messages. + */ +export interface SocketMessageHandler { + (message: any): void; +} +/** + * SocketOpenHandler defines a lambda that handles WebSocket open events. + */ +export interface SocketOpenHandler { + (this: WebSocket, evt: Event): void; +} +/** + * A text-based socket adapter that accepts and transmits payloads over UTF-8. + */ +export declare class WebSocketAdapterText implements WebSocketAdapter { + private _socket?; + get onClose(): SocketCloseHandler | null; + set onClose(value: SocketCloseHandler | null); + get onError(): SocketErrorHandler | null; + set onError(value: SocketErrorHandler | null); + get onMessage(): SocketMessageHandler | null; + set onMessage(value: SocketMessageHandler | null); + get onOpen(): SocketOpenHandler | null; + set onOpen(value: SocketOpenHandler | null); + isOpen(): boolean; + connect(scheme: string, host: string, port: string, createStatus: boolean, token: string): void; + close(): void; + send(msg: any): void; +} diff --git a/packages/nakama-js-protobuf/package.json b/packages/nakama-js-protobuf/package.json index 9513c1d..790f6fb 100644 --- a/packages/nakama-js-protobuf/package.json +++ b/packages/nakama-js-protobuf/package.json @@ -1,6 +1,6 @@ { "name": "@heroiclabs/nakama-js-protobuf", - "version": "1.3.0", + "version": "1.4.0", "description": "Websocket adapter adding protocol buffer support to the Nakama Javascript client.", "main": "dist/nakama-js-protobuf.cjs.js", "module": "dist/nakama-js-protobuf.esm.mjs", diff --git a/packages/nakama-js/dist/client.d.ts b/packages/nakama-js/dist/client.d.ts index 97357ce..1731b2d 100644 --- a/packages/nakama-js/dist/client.d.ts +++ b/packages/nakama-js/dist/client.d.ts @@ -399,7 +399,7 @@ export declare class Client { /** Authenticate a user with Google against the server. */ authenticateGoogle(token: string, create?: boolean, username?: string, vars?: Record, options?: any): Promise; /** Authenticate a user with GameCenter against the server. */ - authenticateGameCenter(token: string, create?: boolean, username?: string, vars?: Record): Promise; + authenticateGameCenter(bundleId: string, playerId: string, publicKeyUrl: string, salt: string, signature: string, timestamp: string, username?: string, create?: boolean, vars?: Record, options?: any): Promise; /** Authenticate a user with Steam against the server. */ authenticateSteam(token: string, create?: boolean, username?: string, sync?: boolean, vars?: Record): Promise; /** Ban users from a group. */ diff --git a/packages/nakama-js/dist/nakama-js.cjs.js b/packages/nakama-js/dist/nakama-js.cjs.js index 4675fbd..c993507 100644 --- a/packages/nakama-js/dist/nakama-js.cjs.js +++ b/packages/nakama-js/dist/nakama-js.cjs.js @@ -379,10 +379,10 @@ function Request(input, options) { if (options.cache === "no-store" || options.cache === "no-cache") { var reParamSearch = /([?&])_=[^&]*/; if (reParamSearch.test(this.url)) { - this.url = this.url.replace(reParamSearch, "$1_=" + new Date().getTime()); + this.url = this.url.replace(reParamSearch, "$1_=" + (/* @__PURE__ */ new Date()).getTime()); } else { var reQueryString = /\?/; - this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + new Date().getTime(); + this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime(); } } } @@ -567,7 +567,7 @@ var b64tab = ((a) => { })(b64chs); var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/; var _fromCC = String.fromCharCode.bind(String); -var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn)); +var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0)); var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_"); var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, ""); var btoaPolyfill = (bin) => { @@ -603,6 +603,19 @@ var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; var utob = (u) => u.replace(re_utob, cb_utob); var _encode = _hasBuffer ? (s) => Buffer.from(s, "utf8").toString("base64") : _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s)); var encode = (src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode(src)) : _encode(src); +var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g; +var cb_btou = (cccc) => { + switch (cccc.length) { + case 4: + var cp = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset = cp - 65536; + return _fromCC((offset >>> 10) + 55296) + _fromCC((offset & 1023) + 56320); + case 3: + return _fromCC((15 & cccc.charCodeAt(0)) << 12 | (63 & cccc.charCodeAt(1)) << 6 | 63 & cccc.charCodeAt(2)); + default: + return _fromCC((31 & cccc.charCodeAt(0)) << 6 | 63 & cccc.charCodeAt(1)); + } +}; +var btou = (b) => b.replace(re_btou, cb_btou); var atobPolyfill = (asc) => { asc = asc.replace(/\s+/g, ""); if (!b64re.test(asc)) @@ -616,6 +629,10 @@ var atobPolyfill = (asc) => { return bin; }; var _atob = _hasatob ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill; +var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0))); +var _decode = _hasBuffer ? (a) => Buffer.from(a, "base64").toString("utf8") : _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a)); +var _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/")); +var decode2 = (src) => _decode(_unURI(src)); // utils.ts function buildFetchOptions(method, options, bodyJson) { @@ -2936,7 +2953,7 @@ var Session = class { this.created = created; this.token = token; this.refresh_token = refresh_token; - this.created_at = Math.floor(new Date().getTime() / 1e3); + this.created_at = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); this.update(token, refresh_token); } isexpired(currenttime) { @@ -2995,7 +3012,7 @@ var encode2 = function(arraybuffer) { } return base64; }; -var decode2 = function(base64) { +var decode3 = function(base64) { var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4; if (base64[base64.length - 1] === "=") { bufferLength--; @@ -3038,9 +3055,9 @@ var WebSocketAdapterText = class { this._socket.onmessage = (evt) => { const message = JSON.parse(evt.data); if (message.match_data && message.match_data.data) { - message.match_data.data = new Uint8Array(decode2(message.match_data.data)); + message.match_data.data = new Uint8Array(decode3(message.match_data.data)); } else if (message.party_data && message.party_data.data) { - message.party_data.data = new Uint8Array(decode2(message.party_data.data)); + message.party_data.data = new Uint8Array(decode3(message.party_data.data)); } value(message); }; @@ -3343,7 +3360,13 @@ var _DefaultSocket = class { } } if (this.verbose && window && window.console) { - console.log("Sent message: %o", JSON.stringify(untypedMessage)); + const loggedMessage = __spreadValues({}, untypedMessage); + if (loggedMessage.match_data_send && loggedMessage.match_data_send.data) { + loggedMessage.match_data_send.data = decode2(loggedMessage.match_data_send.data); + } else if (loggedMessage.party_data_send && loggedMessage.party_data_send.data) { + loggedMessage.party_data_send.data = decode2(loggedMessage.party_data_send.data); + } + console.log("Sent message: %o", JSON.stringify(loggedMessage)); } }); } @@ -3384,9 +3407,9 @@ var _DefaultSocket = class { return yield this.send({ party_close: { party_id } }); }); } - createMatch() { + createMatch(name) { return __async(this, null, function* () { - const response = yield this.send({ match_create: {} }); + const response = yield this.send({ match_create: { name } }); return response.match; }); } @@ -3678,23 +3701,52 @@ var Client = class { }); } /** Authenticate a user with Google against the server. */ - authenticateGoogle(token, create, username, vars, options = {}) { - const request = { - "token": token, - "vars": vars - }; - return this.apiClient.authenticateGoogle(this.serverkey, "", request, create, username, options).then((apiSession) => { - return new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false); + authenticateGoogle(_0, _1, _2, _3) { + return __async(this, arguments, function* (token, create, username, vars, options = {}) { + const request = { + token, + vars + }; + const apiSession = yield this.apiClient.authenticateGoogle( + this.serverkey, + "", + request, + create, + username, + options + ); + return new Session( + apiSession.token || "", + apiSession.refresh_token || "", + apiSession.created || false + ); }); } /** Authenticate a user with GameCenter against the server. */ - authenticateGameCenter(token, create, username, vars) { - const request = { - "token": token, - "vars": vars - }; - return this.apiClient.authenticateGameCenter(this.serverkey, "", request, create, username).then((apiSession) => { - return new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false); + authenticateGameCenter(_0, _1, _2, _3, _4, _5, _6, _7, _8) { + return __async(this, arguments, function* (bundleId, playerId, publicKeyUrl, salt, signature, timestamp, username, create, vars, options = {}) { + const request = { + bundle_id: bundleId, + player_id: playerId, + public_key_url: publicKeyUrl, + salt, + signature, + timestamp_seconds: timestamp, + vars + }; + const apiSession = yield this.apiClient.authenticateGameCenter( + this.serverkey, + "", + request, + create, + username, + options + ); + return new Session( + apiSession.token || "", + apiSession.refresh_token || "", + apiSession.created || false + ); }); } /** Authenticate a user with Steam against the server. */ diff --git a/packages/nakama-js/dist/nakama-js.esm.mjs b/packages/nakama-js/dist/nakama-js.esm.mjs index d59355e..fa94313 100644 --- a/packages/nakama-js/dist/nakama-js.esm.mjs +++ b/packages/nakama-js/dist/nakama-js.esm.mjs @@ -353,10 +353,10 @@ function Request(input, options) { if (options.cache === "no-store" || options.cache === "no-cache") { var reParamSearch = /([?&])_=[^&]*/; if (reParamSearch.test(this.url)) { - this.url = this.url.replace(reParamSearch, "$1_=" + new Date().getTime()); + this.url = this.url.replace(reParamSearch, "$1_=" + (/* @__PURE__ */ new Date()).getTime()); } else { var reQueryString = /\?/; - this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + new Date().getTime(); + this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime(); } } } @@ -541,7 +541,7 @@ var b64tab = ((a) => { })(b64chs); var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/; var _fromCC = String.fromCharCode.bind(String); -var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn)); +var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0)); var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_"); var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, ""); var btoaPolyfill = (bin) => { @@ -577,6 +577,19 @@ var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; var utob = (u) => u.replace(re_utob, cb_utob); var _encode = _hasBuffer ? (s) => Buffer.from(s, "utf8").toString("base64") : _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s)); var encode = (src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode(src)) : _encode(src); +var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g; +var cb_btou = (cccc) => { + switch (cccc.length) { + case 4: + var cp = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset = cp - 65536; + return _fromCC((offset >>> 10) + 55296) + _fromCC((offset & 1023) + 56320); + case 3: + return _fromCC((15 & cccc.charCodeAt(0)) << 12 | (63 & cccc.charCodeAt(1)) << 6 | 63 & cccc.charCodeAt(2)); + default: + return _fromCC((31 & cccc.charCodeAt(0)) << 6 | 63 & cccc.charCodeAt(1)); + } +}; +var btou = (b) => b.replace(re_btou, cb_btou); var atobPolyfill = (asc) => { asc = asc.replace(/\s+/g, ""); if (!b64re.test(asc)) @@ -590,6 +603,10 @@ var atobPolyfill = (asc) => { return bin; }; var _atob = _hasatob ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill; +var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0))); +var _decode = _hasBuffer ? (a) => Buffer.from(a, "base64").toString("utf8") : _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a)); +var _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/")); +var decode2 = (src) => _decode(_unURI(src)); // utils.ts function buildFetchOptions(method, options, bodyJson) { @@ -2910,7 +2927,7 @@ var Session = class { this.created = created; this.token = token; this.refresh_token = refresh_token; - this.created_at = Math.floor(new Date().getTime() / 1e3); + this.created_at = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); this.update(token, refresh_token); } isexpired(currenttime) { @@ -2969,7 +2986,7 @@ var encode2 = function(arraybuffer) { } return base64; }; -var decode2 = function(base64) { +var decode3 = function(base64) { var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4; if (base64[base64.length - 1] === "=") { bufferLength--; @@ -3012,9 +3029,9 @@ var WebSocketAdapterText = class { this._socket.onmessage = (evt) => { const message = JSON.parse(evt.data); if (message.match_data && message.match_data.data) { - message.match_data.data = new Uint8Array(decode2(message.match_data.data)); + message.match_data.data = new Uint8Array(decode3(message.match_data.data)); } else if (message.party_data && message.party_data.data) { - message.party_data.data = new Uint8Array(decode2(message.party_data.data)); + message.party_data.data = new Uint8Array(decode3(message.party_data.data)); } value(message); }; @@ -3317,7 +3334,13 @@ var _DefaultSocket = class { } } if (this.verbose && window && window.console) { - console.log("Sent message: %o", JSON.stringify(untypedMessage)); + const loggedMessage = __spreadValues({}, untypedMessage); + if (loggedMessage.match_data_send && loggedMessage.match_data_send.data) { + loggedMessage.match_data_send.data = decode2(loggedMessage.match_data_send.data); + } else if (loggedMessage.party_data_send && loggedMessage.party_data_send.data) { + loggedMessage.party_data_send.data = decode2(loggedMessage.party_data_send.data); + } + console.log("Sent message: %o", JSON.stringify(loggedMessage)); } }); } @@ -3358,9 +3381,9 @@ var _DefaultSocket = class { return yield this.send({ party_close: { party_id } }); }); } - createMatch() { + createMatch(name) { return __async(this, null, function* () { - const response = yield this.send({ match_create: {} }); + const response = yield this.send({ match_create: { name } }); return response.match; }); } @@ -3652,23 +3675,52 @@ var Client = class { }); } /** Authenticate a user with Google against the server. */ - authenticateGoogle(token, create, username, vars, options = {}) { - const request = { - "token": token, - "vars": vars - }; - return this.apiClient.authenticateGoogle(this.serverkey, "", request, create, username, options).then((apiSession) => { - return new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false); + authenticateGoogle(_0, _1, _2, _3) { + return __async(this, arguments, function* (token, create, username, vars, options = {}) { + const request = { + token, + vars + }; + const apiSession = yield this.apiClient.authenticateGoogle( + this.serverkey, + "", + request, + create, + username, + options + ); + return new Session( + apiSession.token || "", + apiSession.refresh_token || "", + apiSession.created || false + ); }); } /** Authenticate a user with GameCenter against the server. */ - authenticateGameCenter(token, create, username, vars) { - const request = { - "token": token, - "vars": vars - }; - return this.apiClient.authenticateGameCenter(this.serverkey, "", request, create, username).then((apiSession) => { - return new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false); + authenticateGameCenter(_0, _1, _2, _3, _4, _5, _6, _7, _8) { + return __async(this, arguments, function* (bundleId, playerId, publicKeyUrl, salt, signature, timestamp, username, create, vars, options = {}) { + const request = { + bundle_id: bundleId, + player_id: playerId, + public_key_url: publicKeyUrl, + salt, + signature, + timestamp_seconds: timestamp, + vars + }; + const apiSession = yield this.apiClient.authenticateGameCenter( + this.serverkey, + "", + request, + create, + username, + options + ); + return new Session( + apiSession.token || "", + apiSession.refresh_token || "", + apiSession.created || false + ); }); } /** Authenticate a user with Steam against the server. */ diff --git a/packages/nakama-js/dist/nakama-js.iife.js b/packages/nakama-js/dist/nakama-js.iife.js index 51475ec..73bdd70 100644 --- a/packages/nakama-js/dist/nakama-js.iife.js +++ b/packages/nakama-js/dist/nakama-js.iife.js @@ -379,10 +379,10 @@ var nakamajs = (() => { if (options.cache === "no-store" || options.cache === "no-cache") { var reParamSearch = /([?&])_=[^&]*/; if (reParamSearch.test(this.url)) { - this.url = this.url.replace(reParamSearch, "$1_=" + new Date().getTime()); + this.url = this.url.replace(reParamSearch, "$1_=" + (/* @__PURE__ */ new Date()).getTime()); } else { var reQueryString = /\?/; - this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + new Date().getTime(); + this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime(); } } } @@ -567,7 +567,7 @@ var nakamajs = (() => { })(b64chs); var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/; var _fromCC = String.fromCharCode.bind(String); - var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn)); + var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0)); var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_"); var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, ""); var btoaPolyfill = (bin) => { @@ -603,6 +603,19 @@ var nakamajs = (() => { var utob = (u) => u.replace(re_utob, cb_utob); var _encode = _hasBuffer ? (s) => Buffer.from(s, "utf8").toString("base64") : _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s)); var encode = (src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode(src)) : _encode(src); + var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g; + var cb_btou = (cccc) => { + switch (cccc.length) { + case 4: + var cp = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset = cp - 65536; + return _fromCC((offset >>> 10) + 55296) + _fromCC((offset & 1023) + 56320); + case 3: + return _fromCC((15 & cccc.charCodeAt(0)) << 12 | (63 & cccc.charCodeAt(1)) << 6 | 63 & cccc.charCodeAt(2)); + default: + return _fromCC((31 & cccc.charCodeAt(0)) << 6 | 63 & cccc.charCodeAt(1)); + } + }; + var btou = (b) => b.replace(re_btou, cb_btou); var atobPolyfill = (asc) => { asc = asc.replace(/\s+/g, ""); if (!b64re.test(asc)) @@ -616,6 +629,10 @@ var nakamajs = (() => { return bin; }; var _atob = _hasatob ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill; + var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0))); + var _decode = _hasBuffer ? (a) => Buffer.from(a, "base64").toString("utf8") : _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a)); + var _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/")); + var decode2 = (src) => _decode(_unURI(src)); // utils.ts function buildFetchOptions(method, options, bodyJson) { @@ -2936,7 +2953,7 @@ var nakamajs = (() => { this.created = created; this.token = token; this.refresh_token = refresh_token; - this.created_at = Math.floor(new Date().getTime() / 1e3); + this.created_at = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); this.update(token, refresh_token); } isexpired(currenttime) { @@ -2995,7 +3012,7 @@ var nakamajs = (() => { } return base64; }; - var decode2 = function(base64) { + var decode3 = function(base64) { var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4; if (base64[base64.length - 1] === "=") { bufferLength--; @@ -3038,9 +3055,9 @@ var nakamajs = (() => { this._socket.onmessage = (evt) => { const message = JSON.parse(evt.data); if (message.match_data && message.match_data.data) { - message.match_data.data = new Uint8Array(decode2(message.match_data.data)); + message.match_data.data = new Uint8Array(decode3(message.match_data.data)); } else if (message.party_data && message.party_data.data) { - message.party_data.data = new Uint8Array(decode2(message.party_data.data)); + message.party_data.data = new Uint8Array(decode3(message.party_data.data)); } value(message); }; @@ -3343,7 +3360,13 @@ var nakamajs = (() => { } } if (this.verbose && window && window.console) { - console.log("Sent message: %o", JSON.stringify(untypedMessage)); + const loggedMessage = __spreadValues({}, untypedMessage); + if (loggedMessage.match_data_send && loggedMessage.match_data_send.data) { + loggedMessage.match_data_send.data = decode2(loggedMessage.match_data_send.data); + } else if (loggedMessage.party_data_send && loggedMessage.party_data_send.data) { + loggedMessage.party_data_send.data = decode2(loggedMessage.party_data_send.data); + } + console.log("Sent message: %o", JSON.stringify(loggedMessage)); } }); } @@ -3384,9 +3407,9 @@ var nakamajs = (() => { return yield this.send({ party_close: { party_id } }); }); } - createMatch() { + createMatch(name) { return __async(this, null, function* () { - const response = yield this.send({ match_create: {} }); + const response = yield this.send({ match_create: { name } }); return response.match; }); } @@ -3678,23 +3701,52 @@ var nakamajs = (() => { }); } /** Authenticate a user with Google against the server. */ - authenticateGoogle(token, create, username, vars, options = {}) { - const request = { - "token": token, - "vars": vars - }; - return this.apiClient.authenticateGoogle(this.serverkey, "", request, create, username, options).then((apiSession) => { - return new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false); + authenticateGoogle(_0, _1, _2, _3) { + return __async(this, arguments, function* (token, create, username, vars, options = {}) { + const request = { + token, + vars + }; + const apiSession = yield this.apiClient.authenticateGoogle( + this.serverkey, + "", + request, + create, + username, + options + ); + return new Session( + apiSession.token || "", + apiSession.refresh_token || "", + apiSession.created || false + ); }); } /** Authenticate a user with GameCenter against the server. */ - authenticateGameCenter(token, create, username, vars) { - const request = { - "token": token, - "vars": vars - }; - return this.apiClient.authenticateGameCenter(this.serverkey, "", request, create, username).then((apiSession) => { - return new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false); + authenticateGameCenter(_0, _1, _2, _3, _4, _5, _6, _7, _8) { + return __async(this, arguments, function* (bundleId, playerId, publicKeyUrl, salt, signature, timestamp, username, create, vars, options = {}) { + const request = { + bundle_id: bundleId, + player_id: playerId, + public_key_url: publicKeyUrl, + salt, + signature, + timestamp_seconds: timestamp, + vars + }; + const apiSession = yield this.apiClient.authenticateGameCenter( + this.serverkey, + "", + request, + create, + username, + options + ); + return new Session( + apiSession.token || "", + apiSession.refresh_token || "", + apiSession.created || false + ); }); } /** Authenticate a user with Steam against the server. */ diff --git a/packages/nakama-js/dist/nakama-js.umd.js b/packages/nakama-js/dist/nakama-js.umd.js index 86d3fab..47ba85b 100644 --- a/packages/nakama-js/dist/nakama-js.umd.js +++ b/packages/nakama-js/dist/nakama-js.umd.js @@ -322,7 +322,7 @@ if (support.formData) { this.formData = function() { - return this.text().then(decode$1) + return this.text().then(decode$2) }; } @@ -403,7 +403,7 @@ return new Request(this, {body: this._bodyInit}) }; - function decode$1(body) { + function decode$2(body) { var form = new FormData(); body .trim() @@ -624,6 +624,8 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ + /* global Reflect, Promise */ + var __assign = function() { __assign = Object.assign || function __assign(t) { @@ -717,7 +719,7 @@ const _hasatob = typeof atob === 'function'; const _hasbtoa = typeof btoa === 'function'; const _hasBuffer = typeof Buffer === 'function'; - typeof TextDecoder === 'function' ? new TextDecoder() : undefined; + const _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined; const _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined; const b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; const b64chs = Array.prototype.slice.call(b64ch); @@ -728,9 +730,9 @@ })(b64chs); const b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/; const _fromCC = String.fromCharCode.bind(String); - typeof Uint8Array.from === 'function' + const _U8Afrom = typeof Uint8Array.from === 'function' ? Uint8Array.from.bind(Uint8Array) - : (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn)); + : (it) => new Uint8Array(Array.prototype.slice.call(it, 0)); const _mkUriSafe = (src) => src .replace(/=/g, '').replace(/[+\/]/g, (m0) => m0 == '+' ? '-' : '_'); const _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, ''); @@ -817,6 +819,34 @@ const encode$1 = (src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode(src)) : _encode(src); + // This trick is found broken https://github.com/dankogai/js-base64/issues/130 + // const btou = (src: string) => decodeURIComponent(escape(src)); + // reverting good old fationed regexp + const re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g; + const cb_btou = (cccc) => { + switch (cccc.length) { + case 4: + var cp = ((0x07 & cccc.charCodeAt(0)) << 18) + | ((0x3f & cccc.charCodeAt(1)) << 12) + | ((0x3f & cccc.charCodeAt(2)) << 6) + | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000; + return (_fromCC((offset >>> 10) + 0xD800) + + _fromCC((offset & 0x3FF) + 0xDC00)); + case 3: + return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12) + | ((0x3f & cccc.charCodeAt(1)) << 6) + | (0x3f & cccc.charCodeAt(2))); + default: + return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6) + | (0x3f & cccc.charCodeAt(1))); + } + }; + /** + * @deprecated should have been internal use only. + * @param {string} src UTF-16 string + * @returns {string} UTF-8 string + */ + const btou = (b) => b.replace(re_btou, cb_btou); /** * polyfill version of `atob` */ @@ -846,6 +876,23 @@ const _atob = _hasatob ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary') : atobPolyfill; + // + const _toUint8Array = _hasBuffer + ? (a) => _U8Afrom(Buffer.from(a, 'base64')) + : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0))); + // + const _decode = _hasBuffer + ? (a) => Buffer.from(a, 'base64').toString('utf8') + : _TD + ? (a) => _TD.decode(_toUint8Array(a)) + : (a) => btou(_atob(a)); + const _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/')); + /** + * converts a Base64 string to a UTF-8 string. + * @param {String} src Base64 string. Both normal and URL-safe are supported + * @returns {string} UTF-8 string + */ + const decode$1 = (src) => _decode(_unURI(src)); function buildFetchOptions(method, options, bodyJson) { var fetchOptions = __assign({ method: method }, options); @@ -876,6 +923,7 @@ } // tslint:disable + /* Code generated by openapi-gen/main.go. DO NOT EDIT. */ /** * Environment where the purchase took place */ @@ -4082,7 +4130,14 @@ } } if (_this.verbose && window && window.console) { - console.log("Sent message: %o", JSON.stringify(untypedMessage)); + var loggedMessage = __assign({}, untypedMessage); + if (loggedMessage.match_data_send && loggedMessage.match_data_send.data) { + loggedMessage.match_data_send.data = decode$1(loggedMessage.match_data_send.data); + } + else if (loggedMessage.party_data_send && loggedMessage.party_data_send.data) { + loggedMessage.party_data_send.data = decode$1(loggedMessage.party_data_send.data); + } + console.log("Sent message: %o", JSON.stringify(loggedMessage)); } }); }; @@ -4142,12 +4197,12 @@ }); }); }; - DefaultSocket.prototype.createMatch = function () { + DefaultSocket.prototype.createMatch = function (name) { return __awaiter(this, void 0, void 0, function () { var response; return __generator(this, function (_a) { switch (_a.label) { - case 0: return [4 /*yield*/, this.send({ match_create: {} })]; + case 0: return [4 /*yield*/, this.send({ match_create: { name: name } })]; case 1: response = _a.sent(); return [2 /*return*/, response.match]; @@ -4570,22 +4625,46 @@ /** Authenticate a user with Google against the server. */ Client.prototype.authenticateGoogle = function (token, create, username, vars, options) { if (options === void 0) { options = {}; } - var request = { - "token": token, - "vars": vars - }; - return this.apiClient.authenticateGoogle(this.serverkey, "", request, create, username, options).then(function (apiSession) { - return new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false); + return __awaiter(this, void 0, void 0, function () { + var request, apiSession; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + request = { + token: token, + vars: vars, + }; + return [4 /*yield*/, this.apiClient.authenticateGoogle(this.serverkey, "", request, create, username, options)]; + case 1: + apiSession = _a.sent(); + return [2 /*return*/, new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false)]; + } + }); }); }; /** Authenticate a user with GameCenter against the server. */ - Client.prototype.authenticateGameCenter = function (token, create, username, vars) { - var request = { - "token": token, - "vars": vars - }; - return this.apiClient.authenticateGameCenter(this.serverkey, "", request, create, username).then(function (apiSession) { - return new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false); + Client.prototype.authenticateGameCenter = function (bundleId, playerId, publicKeyUrl, salt, signature, timestamp, username, create, vars, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var request, apiSession; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + request = { + bundle_id: bundleId, + player_id: playerId, + public_key_url: publicKeyUrl, + salt: salt, + signature: signature, + timestamp_seconds: timestamp, + vars: vars, + }; + return [4 /*yield*/, this.apiClient.authenticateGameCenter(this.serverkey, "", request, create, username, options)]; + case 1: + apiSession = _a.sent(); + return [2 /*return*/, new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false)]; + } + }); }); }; /** Authenticate a user with Steam against the server. */ diff --git a/packages/nakama-js/dist/socket.d.ts b/packages/nakama-js/dist/socket.d.ts index e8a9df8..319a8be 100644 --- a/packages/nakama-js/dist/socket.d.ts +++ b/packages/nakama-js/dist/socket.d.ts @@ -249,7 +249,9 @@ export interface Match { } /** Create a multiplayer match. */ interface CreateMatch { - match_create: {}; + match_create: { + name?: string; + }; } /** Join a multiplayer match. */ interface JoinMatch { @@ -509,7 +511,7 @@ export interface Socket { /** End a party, kicking all party members and closing it. */ closeParty(party_id: string): Promise; /** Create a multiplayer match on the server. */ - createMatch(): Promise; + createMatch(name?: string): Promise; /** Create a party. */ createParty(open: boolean, max_size: number): Promise; /** Subscribe to one or more users for their status updates. */ @@ -653,7 +655,7 @@ export declare class DefaultSocket implements Socket { addMatchmaker(query: string, min_count: number, max_count: number, string_properties?: Record, numeric_properties?: Record): Promise; addMatchmakerParty(party_id: string, query: string, min_count: number, max_count: number, string_properties?: Record, numeric_properties?: Record): Promise; closeParty(party_id: string): Promise; - createMatch(): Promise; + createMatch(name?: string): Promise; createParty(open: boolean, max_size: number): Promise; followUsers(userIds: string[]): Promise; joinChat(target: string, type: number, persistence: boolean, hidden: boolean): Promise; diff --git a/packages/nakama-js/package.json b/packages/nakama-js/package.json index 2fe55f8..d3f2bae 100644 --- a/packages/nakama-js/package.json +++ b/packages/nakama-js/package.json @@ -1,6 +1,6 @@ { "name": "@heroiclabs/nakama-js", - "version": "2.7.0", + "version": "2.7.1", "scripts": { "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs" }, diff --git a/packages/satori-js/package.json b/packages/satori-js/package.json index aaa8ef6..9c952ad 100644 --- a/packages/satori-js/package.json +++ b/packages/satori-js/package.json @@ -1,6 +1,6 @@ { "name": "@heroiclabs/satori-js", - "version": "2.7.0", + "version": "2.7.1", "scripts": { "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs", "docs": "typedoc index.ts --gaID UA-89839802-1 --out ../../docs"