UNPKG

node-cs2

Version:

Modern CS2/CS:GO Game Coordinator integration with latest GameTracking-CS2 protobuf definitions. Includes support for highlight_reel, wrapped_sticker, variations, Promise-based API, crate opening, sticker/patch/keychain operations, and all modern CS2 fiel

943 lines (873 loc) 823 kB
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) module.exports = factory(require("protobufjs/minimal")); })(this, function($protobuf) { "use strict"; // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); /** * ENotificationSetting enum. * @exports ENotificationSetting * @enum {number} * @property {number} k_ENotificationSettingNotifyUseDefault=0 k_ENotificationSettingNotifyUseDefault value * @property {number} k_ENotificationSettingAlways=1 k_ENotificationSettingAlways value * @property {number} k_ENotificationSettingNever=2 k_ENotificationSettingNever value */ $root.ENotificationSetting = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "k_ENotificationSettingNotifyUseDefault"] = 0; values[valuesById[1] = "k_ENotificationSettingAlways"] = 1; values[valuesById[2] = "k_ENotificationSettingNever"] = 2; return values; })(); $root.CPlayer_GetMutualFriendsForIncomingInvites_Request = (function() { /** * Properties of a CPlayer_GetMutualFriendsForIncomingInvites_Request. * @exports ICPlayer_GetMutualFriendsForIncomingInvites_Request * @interface ICPlayer_GetMutualFriendsForIncomingInvites_Request */ /** * Constructs a new CPlayer_GetMutualFriendsForIncomingInvites_Request. * @exports CPlayer_GetMutualFriendsForIncomingInvites_Request * @classdesc Represents a CPlayer_GetMutualFriendsForIncomingInvites_Request. * @implements ICPlayer_GetMutualFriendsForIncomingInvites_Request * @constructor * @param {ICPlayer_GetMutualFriendsForIncomingInvites_Request=} [properties] Properties to set */ function CPlayer_GetMutualFriendsForIncomingInvites_Request(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CPlayer_GetMutualFriendsForIncomingInvites_Request instance using the specified properties. * @function create * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Request * @static * @param {ICPlayer_GetMutualFriendsForIncomingInvites_Request=} [properties] Properties to set * @returns {CPlayer_GetMutualFriendsForIncomingInvites_Request} CPlayer_GetMutualFriendsForIncomingInvites_Request instance */ CPlayer_GetMutualFriendsForIncomingInvites_Request.create = function create(properties) { return new CPlayer_GetMutualFriendsForIncomingInvites_Request(properties); }; /** * Encodes the specified CPlayer_GetMutualFriendsForIncomingInvites_Request message. Does not implicitly {@link CPlayer_GetMutualFriendsForIncomingInvites_Request.verify|verify} messages. * @function encode * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Request * @static * @param {ICPlayer_GetMutualFriendsForIncomingInvites_Request} message CPlayer_GetMutualFriendsForIncomingInvites_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CPlayer_GetMutualFriendsForIncomingInvites_Request.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CPlayer_GetMutualFriendsForIncomingInvites_Request message, length delimited. Does not implicitly {@link CPlayer_GetMutualFriendsForIncomingInvites_Request.verify|verify} messages. * @function encodeDelimited * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Request * @static * @param {ICPlayer_GetMutualFriendsForIncomingInvites_Request} message CPlayer_GetMutualFriendsForIncomingInvites_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CPlayer_GetMutualFriendsForIncomingInvites_Request.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CPlayer_GetMutualFriendsForIncomingInvites_Request message from the specified reader or buffer. * @function decode * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {CPlayer_GetMutualFriendsForIncomingInvites_Request} CPlayer_GetMutualFriendsForIncomingInvites_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CPlayer_GetMutualFriendsForIncomingInvites_Request.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CPlayer_GetMutualFriendsForIncomingInvites_Request(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CPlayer_GetMutualFriendsForIncomingInvites_Request message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {CPlayer_GetMutualFriendsForIncomingInvites_Request} CPlayer_GetMutualFriendsForIncomingInvites_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CPlayer_GetMutualFriendsForIncomingInvites_Request.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CPlayer_GetMutualFriendsForIncomingInvites_Request message. * @function verify * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Request * @static * @param {Object.<string,*>} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CPlayer_GetMutualFriendsForIncomingInvites_Request.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CPlayer_GetMutualFriendsForIncomingInvites_Request message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Request * @static * @param {Object.<string,*>} object Plain object * @returns {CPlayer_GetMutualFriendsForIncomingInvites_Request} CPlayer_GetMutualFriendsForIncomingInvites_Request */ CPlayer_GetMutualFriendsForIncomingInvites_Request.fromObject = function fromObject(object) { if (object instanceof $root.CPlayer_GetMutualFriendsForIncomingInvites_Request) return object; return new $root.CPlayer_GetMutualFriendsForIncomingInvites_Request(); }; /** * Creates a plain object from a CPlayer_GetMutualFriendsForIncomingInvites_Request message. Also converts values to other types if specified. * @function toObject * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Request * @static * @param {CPlayer_GetMutualFriendsForIncomingInvites_Request} message CPlayer_GetMutualFriendsForIncomingInvites_Request * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.<string,*>} Plain object */ CPlayer_GetMutualFriendsForIncomingInvites_Request.toObject = function toObject() { return {}; }; /** * Converts this CPlayer_GetMutualFriendsForIncomingInvites_Request to JSON. * @function toJSON * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Request * @instance * @returns {Object.<string,*>} JSON object */ CPlayer_GetMutualFriendsForIncomingInvites_Request.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CPlayer_GetMutualFriendsForIncomingInvites_Request * @function getTypeUrl * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Request * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CPlayer_GetMutualFriendsForIncomingInvites_Request.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/CPlayer_GetMutualFriendsForIncomingInvites_Request"; }; return CPlayer_GetMutualFriendsForIncomingInvites_Request; })(); $root.CPlayer_IncomingInviteMutualFriendList = (function() { /** * Properties of a CPlayer_IncomingInviteMutualFriendList. * @exports ICPlayer_IncomingInviteMutualFriendList * @interface ICPlayer_IncomingInviteMutualFriendList * @property {number|Long|null} [steamid] CPlayer_IncomingInviteMutualFriendList steamid * @property {Array.<number>|null} [mutual_friend_account_ids] CPlayer_IncomingInviteMutualFriendList mutual_friend_account_ids */ /** * Constructs a new CPlayer_IncomingInviteMutualFriendList. * @exports CPlayer_IncomingInviteMutualFriendList * @classdesc Represents a CPlayer_IncomingInviteMutualFriendList. * @implements ICPlayer_IncomingInviteMutualFriendList * @constructor * @param {ICPlayer_IncomingInviteMutualFriendList=} [properties] Properties to set */ function CPlayer_IncomingInviteMutualFriendList(properties) { this.mutual_friend_account_ids = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CPlayer_IncomingInviteMutualFriendList steamid. * @member {number|Long} steamid * @memberof CPlayer_IncomingInviteMutualFriendList * @instance */ CPlayer_IncomingInviteMutualFriendList.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CPlayer_IncomingInviteMutualFriendList mutual_friend_account_ids. * @member {Array.<number>} mutual_friend_account_ids * @memberof CPlayer_IncomingInviteMutualFriendList * @instance */ CPlayer_IncomingInviteMutualFriendList.prototype.mutual_friend_account_ids = $util.emptyArray; /** * Creates a new CPlayer_IncomingInviteMutualFriendList instance using the specified properties. * @function create * @memberof CPlayer_IncomingInviteMutualFriendList * @static * @param {ICPlayer_IncomingInviteMutualFriendList=} [properties] Properties to set * @returns {CPlayer_IncomingInviteMutualFriendList} CPlayer_IncomingInviteMutualFriendList instance */ CPlayer_IncomingInviteMutualFriendList.create = function create(properties) { return new CPlayer_IncomingInviteMutualFriendList(properties); }; /** * Encodes the specified CPlayer_IncomingInviteMutualFriendList message. Does not implicitly {@link CPlayer_IncomingInviteMutualFriendList.verify|verify} messages. * @function encode * @memberof CPlayer_IncomingInviteMutualFriendList * @static * @param {ICPlayer_IncomingInviteMutualFriendList} message CPlayer_IncomingInviteMutualFriendList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CPlayer_IncomingInviteMutualFriendList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); if (message.mutual_friend_account_ids != null && message.mutual_friend_account_ids.length) for (var i = 0; i < message.mutual_friend_account_ids.length; ++i) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.mutual_friend_account_ids[i]); return writer; }; /** * Encodes the specified CPlayer_IncomingInviteMutualFriendList message, length delimited. Does not implicitly {@link CPlayer_IncomingInviteMutualFriendList.verify|verify} messages. * @function encodeDelimited * @memberof CPlayer_IncomingInviteMutualFriendList * @static * @param {ICPlayer_IncomingInviteMutualFriendList} message CPlayer_IncomingInviteMutualFriendList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CPlayer_IncomingInviteMutualFriendList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CPlayer_IncomingInviteMutualFriendList message from the specified reader or buffer. * @function decode * @memberof CPlayer_IncomingInviteMutualFriendList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {CPlayer_IncomingInviteMutualFriendList} CPlayer_IncomingInviteMutualFriendList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CPlayer_IncomingInviteMutualFriendList.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CPlayer_IncomingInviteMutualFriendList(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.steamid = reader.fixed64(); break; } case 2: { if (!(message.mutual_friend_account_ids && message.mutual_friend_account_ids.length)) message.mutual_friend_account_ids = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.mutual_friend_account_ids.push(reader.uint32()); } else message.mutual_friend_account_ids.push(reader.uint32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CPlayer_IncomingInviteMutualFriendList message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof CPlayer_IncomingInviteMutualFriendList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {CPlayer_IncomingInviteMutualFriendList} CPlayer_IncomingInviteMutualFriendList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CPlayer_IncomingInviteMutualFriendList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CPlayer_IncomingInviteMutualFriendList message. * @function verify * @memberof CPlayer_IncomingInviteMutualFriendList * @static * @param {Object.<string,*>} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CPlayer_IncomingInviteMutualFriendList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.steamid != null && message.hasOwnProperty("steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; if (message.mutual_friend_account_ids != null && message.hasOwnProperty("mutual_friend_account_ids")) { if (!Array.isArray(message.mutual_friend_account_ids)) return "mutual_friend_account_ids: array expected"; for (var i = 0; i < message.mutual_friend_account_ids.length; ++i) if (!$util.isInteger(message.mutual_friend_account_ids[i])) return "mutual_friend_account_ids: integer[] expected"; } return null; }; /** * Creates a CPlayer_IncomingInviteMutualFriendList message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof CPlayer_IncomingInviteMutualFriendList * @static * @param {Object.<string,*>} object Plain object * @returns {CPlayer_IncomingInviteMutualFriendList} CPlayer_IncomingInviteMutualFriendList */ CPlayer_IncomingInviteMutualFriendList.fromObject = function fromObject(object) { if (object instanceof $root.CPlayer_IncomingInviteMutualFriendList) return object; var message = new $root.CPlayer_IncomingInviteMutualFriendList(); if (object.steamid != null) if ($util.Long) (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; else if (typeof object.steamid === "string") message.steamid = parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); if (object.mutual_friend_account_ids) { if (!Array.isArray(object.mutual_friend_account_ids)) throw TypeError(".CPlayer_IncomingInviteMutualFriendList.mutual_friend_account_ids: array expected"); message.mutual_friend_account_ids = []; for (var i = 0; i < object.mutual_friend_account_ids.length; ++i) message.mutual_friend_account_ids[i] = object.mutual_friend_account_ids[i] >>> 0; } return message; }; /** * Creates a plain object from a CPlayer_IncomingInviteMutualFriendList message. Also converts values to other types if specified. * @function toObject * @memberof CPlayer_IncomingInviteMutualFriendList * @static * @param {CPlayer_IncomingInviteMutualFriendList} message CPlayer_IncomingInviteMutualFriendList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.<string,*>} Plain object */ CPlayer_IncomingInviteMutualFriendList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.mutual_friend_account_ids = []; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.steamid = options.longs === String ? "0" : 0; if (message.steamid != null && message.hasOwnProperty("steamid")) if (typeof message.steamid === "number") object.steamid = options.longs === String ? String(message.steamid) : message.steamid; else object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; if (message.mutual_friend_account_ids && message.mutual_friend_account_ids.length) { object.mutual_friend_account_ids = []; for (var j = 0; j < message.mutual_friend_account_ids.length; ++j) object.mutual_friend_account_ids[j] = message.mutual_friend_account_ids[j]; } return object; }; /** * Converts this CPlayer_IncomingInviteMutualFriendList to JSON. * @function toJSON * @memberof CPlayer_IncomingInviteMutualFriendList * @instance * @returns {Object.<string,*>} JSON object */ CPlayer_IncomingInviteMutualFriendList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CPlayer_IncomingInviteMutualFriendList * @function getTypeUrl * @memberof CPlayer_IncomingInviteMutualFriendList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CPlayer_IncomingInviteMutualFriendList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/CPlayer_IncomingInviteMutualFriendList"; }; return CPlayer_IncomingInviteMutualFriendList; })(); $root.CPlayer_GetMutualFriendsForIncomingInvites_Response = (function() { /** * Properties of a CPlayer_GetMutualFriendsForIncomingInvites_Response. * @exports ICPlayer_GetMutualFriendsForIncomingInvites_Response * @interface ICPlayer_GetMutualFriendsForIncomingInvites_Response * @property {Array.<ICPlayer_IncomingInviteMutualFriendList>|null} [incoming_invite_mutual_friends_lists] CPlayer_GetMutualFriendsForIncomingInvites_Response incoming_invite_mutual_friends_lists */ /** * Constructs a new CPlayer_GetMutualFriendsForIncomingInvites_Response. * @exports CPlayer_GetMutualFriendsForIncomingInvites_Response * @classdesc Represents a CPlayer_GetMutualFriendsForIncomingInvites_Response. * @implements ICPlayer_GetMutualFriendsForIncomingInvites_Response * @constructor * @param {ICPlayer_GetMutualFriendsForIncomingInvites_Response=} [properties] Properties to set */ function CPlayer_GetMutualFriendsForIncomingInvites_Response(properties) { this.incoming_invite_mutual_friends_lists = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CPlayer_GetMutualFriendsForIncomingInvites_Response incoming_invite_mutual_friends_lists. * @member {Array.<ICPlayer_IncomingInviteMutualFriendList>} incoming_invite_mutual_friends_lists * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Response * @instance */ CPlayer_GetMutualFriendsForIncomingInvites_Response.prototype.incoming_invite_mutual_friends_lists = $util.emptyArray; /** * Creates a new CPlayer_GetMutualFriendsForIncomingInvites_Response instance using the specified properties. * @function create * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Response * @static * @param {ICPlayer_GetMutualFriendsForIncomingInvites_Response=} [properties] Properties to set * @returns {CPlayer_GetMutualFriendsForIncomingInvites_Response} CPlayer_GetMutualFriendsForIncomingInvites_Response instance */ CPlayer_GetMutualFriendsForIncomingInvites_Response.create = function create(properties) { return new CPlayer_GetMutualFriendsForIncomingInvites_Response(properties); }; /** * Encodes the specified CPlayer_GetMutualFriendsForIncomingInvites_Response message. Does not implicitly {@link CPlayer_GetMutualFriendsForIncomingInvites_Response.verify|verify} messages. * @function encode * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Response * @static * @param {ICPlayer_GetMutualFriendsForIncomingInvites_Response} message CPlayer_GetMutualFriendsForIncomingInvites_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CPlayer_GetMutualFriendsForIncomingInvites_Response.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.incoming_invite_mutual_friends_lists != null && message.incoming_invite_mutual_friends_lists.length) for (var i = 0; i < message.incoming_invite_mutual_friends_lists.length; ++i) $root.CPlayer_IncomingInviteMutualFriendList.encode(message.incoming_invite_mutual_friends_lists[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified CPlayer_GetMutualFriendsForIncomingInvites_Response message, length delimited. Does not implicitly {@link CPlayer_GetMutualFriendsForIncomingInvites_Response.verify|verify} messages. * @function encodeDelimited * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Response * @static * @param {ICPlayer_GetMutualFriendsForIncomingInvites_Response} message CPlayer_GetMutualFriendsForIncomingInvites_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CPlayer_GetMutualFriendsForIncomingInvites_Response.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CPlayer_GetMutualFriendsForIncomingInvites_Response message from the specified reader or buffer. * @function decode * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {CPlayer_GetMutualFriendsForIncomingInvites_Response} CPlayer_GetMutualFriendsForIncomingInvites_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CPlayer_GetMutualFriendsForIncomingInvites_Response.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CPlayer_GetMutualFriendsForIncomingInvites_Response(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.incoming_invite_mutual_friends_lists && message.incoming_invite_mutual_friends_lists.length)) message.incoming_invite_mutual_friends_lists = []; message.incoming_invite_mutual_friends_lists.push($root.CPlayer_IncomingInviteMutualFriendList.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CPlayer_GetMutualFriendsForIncomingInvites_Response message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {CPlayer_GetMutualFriendsForIncomingInvites_Response} CPlayer_GetMutualFriendsForIncomingInvites_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CPlayer_GetMutualFriendsForIncomingInvites_Response.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CPlayer_GetMutualFriendsForIncomingInvites_Response message. * @function verify * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Response * @static * @param {Object.<string,*>} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CPlayer_GetMutualFriendsForIncomingInvites_Response.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.incoming_invite_mutual_friends_lists != null && message.hasOwnProperty("incoming_invite_mutual_friends_lists")) { if (!Array.isArray(message.incoming_invite_mutual_friends_lists)) return "incoming_invite_mutual_friends_lists: array expected"; for (var i = 0; i < message.incoming_invite_mutual_friends_lists.length; ++i) { var error = $root.CPlayer_IncomingInviteMutualFriendList.verify(message.incoming_invite_mutual_friends_lists[i]); if (error) return "incoming_invite_mutual_friends_lists." + error; } } return null; }; /** * Creates a CPlayer_GetMutualFriendsForIncomingInvites_Response message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Response * @static * @param {Object.<string,*>} object Plain object * @returns {CPlayer_GetMutualFriendsForIncomingInvites_Response} CPlayer_GetMutualFriendsForIncomingInvites_Response */ CPlayer_GetMutualFriendsForIncomingInvites_Response.fromObject = function fromObject(object) { if (object instanceof $root.CPlayer_GetMutualFriendsForIncomingInvites_Response) return object; var message = new $root.CPlayer_GetMutualFriendsForIncomingInvites_Response(); if (object.incoming_invite_mutual_friends_lists) { if (!Array.isArray(object.incoming_invite_mutual_friends_lists)) throw TypeError(".CPlayer_GetMutualFriendsForIncomingInvites_Response.incoming_invite_mutual_friends_lists: array expected"); message.incoming_invite_mutual_friends_lists = []; for (var i = 0; i < object.incoming_invite_mutual_friends_lists.length; ++i) { if (typeof object.incoming_invite_mutual_friends_lists[i] !== "object") throw TypeError(".CPlayer_GetMutualFriendsForIncomingInvites_Response.incoming_invite_mutual_friends_lists: object expected"); message.incoming_invite_mutual_friends_lists[i] = $root.CPlayer_IncomingInviteMutualFriendList.fromObject(object.incoming_invite_mutual_friends_lists[i]); } } return message; }; /** * Creates a plain object from a CPlayer_GetMutualFriendsForIncomingInvites_Response message. Also converts values to other types if specified. * @function toObject * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Response * @static * @param {CPlayer_GetMutualFriendsForIncomingInvites_Response} message CPlayer_GetMutualFriendsForIncomingInvites_Response * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.<string,*>} Plain object */ CPlayer_GetMutualFriendsForIncomingInvites_Response.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.incoming_invite_mutual_friends_lists = []; if (message.incoming_invite_mutual_friends_lists && message.incoming_invite_mutual_friends_lists.length) { object.incoming_invite_mutual_friends_lists = []; for (var j = 0; j < message.incoming_invite_mutual_friends_lists.length; ++j) object.incoming_invite_mutual_friends_lists[j] = $root.CPlayer_IncomingInviteMutualFriendList.toObject(message.incoming_invite_mutual_friends_lists[j], options); } return object; }; /** * Converts this CPlayer_GetMutualFriendsForIncomingInvites_Response to JSON. * @function toJSON * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Response * @instance * @returns {Object.<string,*>} JSON object */ CPlayer_GetMutualFriendsForIncomingInvites_Response.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CPlayer_GetMutualFriendsForIncomingInvites_Response * @function getTypeUrl * @memberof CPlayer_GetMutualFriendsForIncomingInvites_Response * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CPlayer_GetMutualFriendsForIncomingInvites_Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/CPlayer_GetMutualFriendsForIncomingInvites_Response"; }; return CPlayer_GetMutualFriendsForIncomingInvites_Response; })(); $root.CPlayer_GetFriendsGameplayInfo_Request = (function() { /** * Properties of a CPlayer_GetFriendsGameplayInfo_Request. * @exports ICPlayer_GetFriendsGameplayInfo_Request * @interface ICPlayer_GetFriendsGameplayInfo_Request * @property {number|null} [appid] CPlayer_GetFriendsGameplayInfo_Request appid */ /** * Constructs a new CPlayer_GetFriendsGameplayInfo_Request. * @exports CPlayer_GetFriendsGameplayInfo_Request * @classdesc Represents a CPlayer_GetFriendsGameplayInfo_Request. * @implements ICPlayer_GetFriendsGameplayInfo_Request * @constructor * @param {ICPlayer_GetFriendsGameplayInfo_Request=} [properties] Properties to set */ function CPlayer_GetFriendsGameplayInfo_Request(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CPlayer_GetFriendsGameplayInfo_Request appid. * @member {number} appid * @memberof CPlayer_GetFriendsGameplayInfo_Request * @instance */ CPlayer_GetFriendsGameplayInfo_Request.prototype.appid = 0; /** * Creates a new CPlayer_GetFriendsGameplayInfo_Request instance using the specified properties. * @function create * @memberof CPlayer_GetFriendsGameplayInfo_Request * @static * @param {ICPlayer_GetFriendsGameplayInfo_Request=} [properties] Properties to set * @returns {CPlayer_GetFriendsGameplayInfo_Request} CPlayer_GetFriendsGameplayInfo_Request instance */ CPlayer_GetFriendsGameplayInfo_Request.create = function create(properties) { return new CPlayer_GetFriendsGameplayInfo_Request(properties); }; /** * Encodes the specified CPlayer_GetFriendsGameplayInfo_Request message. Does not implicitly {@link CPlayer_GetFriendsGameplayInfo_Request.verify|verify} messages. * @function encode * @memberof CPlayer_GetFriendsGameplayInfo_Request * @static * @param {ICPlayer_GetFriendsGameplayInfo_Request} message CPlayer_GetFriendsGameplayInfo_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CPlayer_GetFriendsGameplayInfo_Request.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.appid); return writer; }; /** * Encodes the specified CPlayer_GetFriendsGameplayInfo_Request message, length delimited. Does not implicitly {@link CPlayer_GetFriendsGameplayInfo_Request.verify|verify} messages. * @function encodeDelimited * @memberof CPlayer_GetFriendsGameplayInfo_Request * @static * @param {ICPlayer_GetFriendsGameplayInfo_Request} message CPlayer_GetFriendsGameplayInfo_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CPlayer_GetFriendsGameplayInfo_Request.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CPlayer_GetFriendsGameplayInfo_Request message from the specified reader or buffer. * @function decode * @memberof CPlayer_GetFriendsGameplayInfo_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {CPlayer_GetFriendsGameplayInfo_Request} CPlayer_GetFriendsGameplayInfo_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CPlayer_GetFriendsGameplayInfo_Request.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CPlayer_GetFriendsGameplayInfo_Request(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.appid = reader.uint32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CPlayer_GetFriendsGameplayInfo_Request message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof CPlayer_GetFriendsGameplayInfo_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {CPlayer_GetFriendsGameplayInfo_Request} CPlayer_GetFriendsGameplayInfo_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CPlayer_GetFriendsGameplayInfo_Request.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CPlayer_GetFriendsGameplayInfo_Request message. * @function verify * @memberof CPlayer_GetFriendsGameplayInfo_Request * @static * @param {Object.<string,*>} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CPlayer_GetFriendsGameplayInfo_Request.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.appid != null && message.hasOwnProperty("appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; return null; }; /** * Creates a CPlayer_GetFriendsGameplayInfo_Request message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof CPlayer_GetFriendsGameplayInfo_Request * @static * @param {Object.<string,*>} object Plain object * @returns {CPlayer_GetFriendsGameplayInfo_Request} CPlayer_GetFriendsGameplayInfo_Request */ CPlayer_GetFriendsGameplayInfo_Request.fromObject = function fromObject(object) { if (object instanceof $root.CPlayer_GetFriendsGameplayInfo_Request) return object; var message = new $root.CPlayer_GetFriendsGameplayInfo_Request(); if (object.appid != null) message.appid = object.appid >>> 0; return message; }; /** * Creates a plain object from a CPlayer_GetFriendsGameplayInfo_Request message. Also converts values to other types if specified. * @function toObject * @memberof CPlayer_GetFriendsGameplayInfo_Request * @static * @param {CPlayer_GetFriendsGameplayInfo_Request} message CPlayer_GetFriendsGameplayInfo_Request * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.<string,*>} Plain object */ CPlayer_GetFriendsGameplayInfo_Request.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.appid = 0; if (message.appid != null && message.hasOwnProperty("appid")) object.appid = message.appid; return object; }; /** * Converts this CPlayer_GetFriendsGameplayInfo_Request to JSON. * @function toJSON * @memberof CPlayer_GetFriendsGameplayInfo_Request * @instance * @returns {Object.<string,*>} JSON object */ CPlayer_GetFriendsGameplayInfo_Request.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CPlayer_GetFriendsGameplayInfo_Request * @function getTypeUrl * @memberof CPlayer_GetFriendsGameplayInfo_Request * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CPlayer_GetFriendsGameplayInfo_Request.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/CPlayer_GetFriendsGameplayInfo_Request"; }; return CPlayer_GetFriendsGameplayInfo_Request; })(); $root.CPlayer_GetFriendsGameplayInfo_Response = (function() { /** * Properties of a CPlayer_GetFriendsGameplayInfo_Response. * @exports ICPlayer_GetFriendsGameplayInfo_Response * @interface ICPlayer_GetFriendsGameplayInfo_Response * @property {CPlayer_GetFriendsGameplayInfo_Response.IOwnGameplayInfo|null} [your_info] CPlayer_GetFriendsGameplayInfo_Response your_info * @property {Array.<CPlayer_GetFriendsGameplayInfo_Response.IFriendsGameplayInfo>|null} [in_game] CPlayer_GetFriendsGameplayInfo_Response in_game * @property {Array.<CPlayer_GetFriendsGameplayInfo_Response.IFriendsGameplayInfo>|null} [played_recently] CPlayer_GetFriendsGameplayInfo_Response played_recently * @property {Array.<CPlayer_GetFriendsGameplayInfo_Response.IFriendsGameplayInfo>|null} [played_ever] CPlayer_GetFriendsGameplayInfo_Response played_ever * @property {Array.<CPlayer_GetFriendsGameplayInfo_Response.IFriendsGameplayInfo>|null} [owns] CPlayer_GetFriendsGameplayInfo_Response owns * @property {Array.<CPlayer_GetFriendsGameplayInfo_Response.IFriendsGameplayInfo>|null} [in_wishlist] CPlayer_GetFriendsGameplayInfo_Response in_wishlist */ /** * Constructs a new CPlayer_GetFriendsGameplayInfo_Response. * @exports CPlayer_GetFriendsGameplayInfo_Response * @classdesc Represents a CPlayer_GetFriendsGameplayInfo_Response. * @implements ICPlayer_GetFriendsGameplayInfo_Response * @constructor * @param {ICPlayer_GetFriendsGameplayInfo_Response=} [properties] Properties to set */ function CPlayer_GetFriendsGameplayInfo_Response(properties) { this.in_game = []; this.played_recently = []; this.played_ever = []; this.owns = []; this.in_wishlist = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CPlayer_GetFriendsGameplayInfo_Response your_info. * @member {CPlayer_GetFriendsGameplayInfo_Respo