imports/vx/both/code/vxapp.js
/**
     * Return a dual-mode object with search criteria.  The client criteria is used to
     * populate session variables to control Mini-MongoDB finds.  The server criteria is used to
     * control subscriptions on the server.
     *
     * @param {string} subscriptionName Subscription name (e.g., "current_cards").
     * @param {object} subscriptionParameters Subscription parameters object.
     * @param {object} criteria MongoDB criteria.
     * @param {object} options MongoDB options.
     * @return {object} Dual-mode publish request object.
     */
Return a dual-mode object with search criteria.  The client criteria is used to
populate session variables to control Mini-MongoDB finds.  The server criteria is used to
control subscriptions on the server.

@param {string} subscriptionName Subscription name .
@param {object} subscriptionParameters Subscription parameters object.
@param {object} criteria MongoDB criteria.
@param {object} options MongoDB options.
@return {object} Dual-mode publish request object.
Return a dual - mode object with search criteria . The client criteria is used to populate session variables to control Mini - MongoDB finds . The server criteria is used to control subscriptions on the server . @param { string } subscriptionName Subscription name . @param { object } subscriptionParameters Subscription parameters object . @param { object } criteria MongoDB criteria . @param { object } options MongoDB options . @return { object } Dual - mode publish request object .
makePublishingRequest(subscriptionName, subscriptionParameters, criteria, options) {
        const publishRequest = {}
        _.each(["client", "server"], side => {
            const mode = VXApp.getPublishingMode(side, subscriptionParameters)
            publishRequest[side] = {}
            publishRequest[side].criteria = $.extend(true, {}, criteria)
            publishRequest[side].options = options
            publishRequest[side].extra = {}
            publishRequest[side].extra.subscriptionName = subscriptionName
            publishRequest[side].extra.mode = mode
            VXApp.adjustPublishingRequest(publishRequest[side], subscriptionParameters.userId, subscriptionParameters)
        })
        return publishRequest
    }
makePublishingRequest ( subscriptionName , subscriptionParameters , criteria , options ) { const publishRequest = { } _ . each ( [ "client" , "server" ] , side => { const mode = VXApp . getPublishingMode ( side , subscriptionParameters ) publishRequest [ side ] = { } publishRequest [ side ] . criteria = $ . extend ( true , { } , criteria ) publishRequest [ side ] . options = options publishRequest [ side ] . extra = { } publishRequest [ side ] . extra . subscriptionName = subscriptionName publishRequest [ side ] . extra . mode = mode VXApp . adjustPublishingRequest ( publishRequest [ side ] , subscriptionParameters . userId , subscriptionParameters ) } ) return publishRequest }
Return a dual-mode object with search criteria.
Return a dual - mode object with search criteria .