(params)
| 156 | return Promise.all(tasks); |
| 157 | } |
| 158 | getBatchDataWithIds(params) { |
| 159 | let { key, ids, syncInBackground, syncParams } = params; |
| 160 | |
| 161 | return Promise.all( |
| 162 | ids.map((id) => this.load({ key, id, syncInBackground, autoSync: false, batched: true, syncParams })) |
| 163 | ).then((results) => { |
| 164 | return new Promise((resolve, reject) => { |
| 165 | const ids = results.filter((value) => value.syncId !== undefined); |
| 166 | if(!ids.length){ |
| 167 | return resolve(); |
| 168 | } |
| 169 | return this.sync[key]({ |
| 170 | id: ids.map((value) => value.syncId), |
| 171 | resolve, |
| 172 | reject, |
| 173 | syncParams |
| 174 | }); |
| 175 | }).then((data) => { |
| 176 | return results.map(value => { |
| 177 | return value.syncId ? data.shift() : value |
| 178 | }); |
| 179 | }); |
| 180 | }) |
| 181 | } |
| 182 | _lookupGlobalItem(params) { |
| 183 | let ret; |
| 184 | let { key } = params; |
no test coverage detected