docs: generate docs for the latest release (#3279)
* docs: generate docs for the latest release * docs: mark version v1.26.0 * docs: mark WWeb version v2.3000.1016590837
This commit is contained in:
parent
d2597bba72
commit
01c45047d2
74 changed files with 3898 additions and 891 deletions
221
docs/util_Injected_Store.js.html
Normal file
221
docs/util_Injected_Store.js.html
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.11">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.26.0 » Source: util/Injected/Store.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>25.<wbr>0</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: util/Injected/Store.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
exports.ExposeStore = () => {
|
||||
/**
|
||||
* Helper function that compares between two WWeb versions. Its purpose is to help the developer to choose the correct code implementation depending on the comparison value and the WWeb version.
|
||||
* @param {string} lOperand The left operand for the WWeb version string to compare with
|
||||
* @param {string} operator The comparison operator
|
||||
* @param {string} rOperand The right operand for the WWeb version string to compare with
|
||||
* @returns {boolean} Boolean value that indicates the result of the comparison
|
||||
*/
|
||||
window.compareWwebVersions = (lOperand, operator, rOperand) => {
|
||||
if (!['>', '>=', '&lt;', '&lt;=', '='].includes(operator)) {
|
||||
throw new class _ extends Error {
|
||||
constructor(m) { super(m); this.name = 'CompareWwebVersionsError'; }
|
||||
}('Invalid comparison operator is provided');
|
||||
|
||||
}
|
||||
if (typeof lOperand !== 'string' || typeof rOperand !== 'string') {
|
||||
throw new class _ extends Error {
|
||||
constructor(m) { super(m); this.name = 'CompareWwebVersionsError'; }
|
||||
}('A non-string WWeb version type is provided');
|
||||
}
|
||||
|
||||
lOperand = lOperand.replace(/-beta$/, '');
|
||||
rOperand = rOperand.replace(/-beta$/, '');
|
||||
|
||||
while (lOperand.length !== rOperand.length) {
|
||||
lOperand.length > rOperand.length
|
||||
? rOperand = rOperand.concat('0')
|
||||
: lOperand = lOperand.concat('0');
|
||||
}
|
||||
|
||||
lOperand = Number(lOperand.replace(/\./g, ''));
|
||||
rOperand = Number(rOperand.replace(/\./g, ''));
|
||||
|
||||
return (
|
||||
operator === '>' ? lOperand > rOperand :
|
||||
operator === '>=' ? lOperand >= rOperand :
|
||||
operator === '&lt;' ? lOperand &lt; rOperand :
|
||||
operator === '&lt;=' ? lOperand &lt;= rOperand :
|
||||
operator === '=' ? lOperand === rOperand :
|
||||
false
|
||||
);
|
||||
};
|
||||
|
||||
window.Store = Object.assign({}, window.require('WAWebCollections'));
|
||||
window.Store.AppState = window.require('WAWebSocketModel').Socket;
|
||||
window.Store.BlockContact = window.require('WAWebBlockContactAction');
|
||||
window.Store.Conn = window.require('WAWebConnModel').Conn;
|
||||
window.Store.Cmd = window.require('WAWebCmd').Cmd;
|
||||
window.Store.DownloadManager = window.require('WAWebDownloadManager').downloadManager;
|
||||
window.Store.GroupQueryAndUpdate = window.require('WAWebGroupQueryJob').queryAndUpdateGroupMetadataById;
|
||||
window.Store.MediaPrep = window.require('WAWebPrepRawMedia');
|
||||
window.Store.MediaObject = window.require('WAWebMediaStorage');
|
||||
window.Store.MediaTypes = window.require('WAWebMmsMediaTypes');
|
||||
window.Store.MediaUpload = window.require('WAWebMediaMmsV4Upload');
|
||||
window.Store.MsgKey = window.require('WAWebMsgKey');
|
||||
window.Store.NumberInfo = window.require('WAPhoneUtils');
|
||||
window.Store.OpaqueData = window.require('WAWebMediaOpaqueData');
|
||||
window.Store.QueryProduct = window.require('WAWebBizProductCatalogBridge');
|
||||
window.Store.QueryOrder = window.require('WAWebBizOrderBridge');
|
||||
window.Store.SendClear = window.require('WAWebChatClearBridge');
|
||||
window.Store.SendDelete = window.require('WAWebDeleteChatAction');
|
||||
window.Store.SendMessage = window.require('WAWebSendMsgChatAction');
|
||||
window.Store.EditMessage = window.require('WAWebSendMessageEditAction');
|
||||
window.Store.SendSeen = window.require('WAWebUpdateUnreadChatAction');
|
||||
window.Store.User = window.require('WAWebUserPrefsMeUser');
|
||||
window.Store.ContactMethods = window.require('WAWebContactGetters');
|
||||
window.Store.UploadUtils = window.require('WAWebUploadManager');
|
||||
window.Store.UserConstructor = window.require('WAWebWid');
|
||||
window.Store.Validators = window.require('WALinkify');
|
||||
window.Store.VCard = window.require('WAWebFrontendVcardUtils');
|
||||
window.Store.WidFactory = window.require('WAWebWidFactory');
|
||||
window.Store.ProfilePic = window.require('WAWebContactProfilePicThumbBridge');
|
||||
window.Store.PresenceUtils = window.require('WAWebPresenceChatAction');
|
||||
window.Store.ChatState = window.require('WAWebChatStateBridge');
|
||||
window.Store.findCommonGroups = window.require('WAWebFindCommonGroupsContactAction').findCommonGroups;
|
||||
window.Store.StatusUtils = window.require('WAWebContactStatusBridge');
|
||||
window.Store.ConversationMsgs = window.require('WAWebChatLoadMessages');
|
||||
window.Store.sendReactionToMsg = window.require('WAWebSendReactionMsgAction').sendReactionToMsg;
|
||||
window.Store.createOrUpdateReactionsModule = window.require('WAWebDBCreateOrUpdateReactions');
|
||||
window.Store.EphemeralFields = window.require('WAWebGetEphemeralFieldsMsgActionsUtils');
|
||||
window.Store.MsgActionChecks = window.require('WAWebMsgActionCapability');
|
||||
window.Store.QuotedMsg = window.require('WAWebQuotedMsgModelUtils');
|
||||
window.Store.LinkPreview = window.require('WAWebLinkPreviewChatAction');
|
||||
window.Store.Socket = window.require('WADeprecatedSendIq');
|
||||
window.Store.SocketWap = window.require('WAWap');
|
||||
window.Store.SearchContext = window.require('WAWebChatMessageSearch').getSearchContext;
|
||||
window.Store.DrawerManager = window.require('WAWebDrawerManager').DrawerManager;
|
||||
window.Store.LidUtils = window.require('WAWebApiContact');
|
||||
window.Store.WidToJid = window.require('WAWebWidToJid');
|
||||
window.Store.JidToWid = window.require('WAWebJidToWid');
|
||||
window.Store.getMsgInfo = window.require('WAWebApiMessageInfoStore').queryMsgInfo;
|
||||
window.Store.pinUnpinMsg = window.require('WAWebSendPinMessageAction').sendPinInChatMsg;
|
||||
window.Store.QueryExist = window.require('WAWebQueryExistsJob').queryWidExists;
|
||||
window.Store.ReplyUtils = window.require('WAWebMsgReply');
|
||||
window.Store.Settings = window.require('WAWebUserPrefsGeneral');
|
||||
window.Store.BotSecret = window.require('WAWebBotMessageSecret');
|
||||
window.Store.BotProfiles = window.require('WAWebBotProfileCollection');
|
||||
window.Store.DeviceList = window.require('WAWebApiDeviceList');
|
||||
if (window.compareWwebVersions(window.Debug.VERSION, '>=', '2.3000.1014111620'))
|
||||
window.Store.AddonReactionTable = window.require('WAWebAddonReactionTableMode').reactionTableMode;
|
||||
|
||||
window.Store.ForwardUtils = {
|
||||
...window.require('WAWebForwardMessagesToChat')
|
||||
};
|
||||
|
||||
window.Store.StickerTools = {
|
||||
...window.require('WAWebImageUtils'),
|
||||
...window.require('WAWebAddWebpMetadata')
|
||||
};
|
||||
window.Store.GroupUtils = {
|
||||
...window.require('WAWebGroupCreateJob'),
|
||||
...window.require('WAWebGroupModifyInfoJob'),
|
||||
...window.require('WAWebExitGroupAction'),
|
||||
...window.require('WAWebContactProfilePicThumbBridge')
|
||||
};
|
||||
window.Store.GroupParticipants = {
|
||||
...window.require('WAWebModifyParticipantsGroupAction'),
|
||||
...window.require('WASmaxGroupsAddParticipantsRPC')
|
||||
};
|
||||
window.Store.GroupInvite = {
|
||||
...window.require('WAWebGroupInviteJob'),
|
||||
...window.require('WAWebGroupQueryJob')
|
||||
};
|
||||
window.Store.GroupInviteV4 = {
|
||||
...window.require('WAWebGroupInviteV4Job'),
|
||||
...window.require('WAWebChatSendMessages')
|
||||
};
|
||||
window.Store.MembershipRequestUtils = {
|
||||
...window.require('WAWebApiMembershipApprovalRequestStore'),
|
||||
...window.require('WASmaxGroupsMembershipRequestsActionRPC')
|
||||
};
|
||||
|
||||
if (!window.Store.Chat._find || !window.Store.Chat.findImpl) {
|
||||
window.Store.Chat._find = e => {
|
||||
const target = window.Store.Chat.get(e);
|
||||
return target ? Promise.resolve(target) : Promise.resolve({
|
||||
id: e
|
||||
});
|
||||
};
|
||||
window.Store.Chat.findImpl = window.Store.Chat._find;
|
||||
}
|
||||
|
||||
/**
|
||||
* Target options object description
|
||||
* @typedef {Object} TargetOptions
|
||||
* @property {string|number} module The target module
|
||||
* @property {string} function The function name to get from a module
|
||||
*/
|
||||
/**
|
||||
* Function to modify functions
|
||||
* @param {TargetOptions} target Options specifying the target function to search for modifying
|
||||
* @param {Function} callback Modified function
|
||||
*/
|
||||
window.injectToFunction = (target, callback) => {
|
||||
const module = window.require(target.module);
|
||||
const originalFunction = module[target.function];
|
||||
const modifiedFunction = (...args) => callback(originalFunction, ...args);
|
||||
module[target.function] = modifiedFunction;
|
||||
};
|
||||
|
||||
window.injectToFunction({ module: 'WAWebBackendJobsCommon', function: 'mediaTypeFromProtobuf' }, (func, ...args) => { const [proto] = args; return proto.locationMessage ? null : func(...args); });
|
||||
|
||||
window.injectToFunction({ module: 'WAWebE2EProtoUtils', function: 'typeAttributeFromProtobuf' }, (func, ...args) => { const [proto] = args; return proto.locationMessage || proto.groupInviteMessage ? 'text' : func(...args); });
|
||||
|
||||
};
|
||||
</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on September 18, 2024.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Reference in a new issue