Comparing version 1.0.4 to 1.0.5
12
index.js
@@ -212,15 +212,7 @@ /* | ||
function actorSubmapSetMultiple (actor, key, state = {}) { | ||
const payload = {} | ||
payload[key] = state | ||
return post(`actor/${actor.kar.type}/${actor.kar.id}/state`, { submapupdates: payload }).then(res => res.added) | ||
} | ||
const actorSubmapSetMultiple = (actor, key, state = {}) => post(`actor/${actor.kar.type}/${actor.kar.id}/state`, { submapupdates: { [key]: state } }).then(res => res.added) | ||
const actorSubmapRemove = (actor, key, subkey) => del(`actor/${actor.kar.type}/${actor.kar.id}/state/${key}/${subkey}`) | ||
function actorSubmapRemoveSome (actor, key, keys = []) { | ||
const payload = {} | ||
payload[key] = keys | ||
return post(`actor/${actor.kar.type}/${actor.kar.id}/state`, { submapremovals: payload }).then(res => res.removed) | ||
} | ||
const actorSubmapRemoveSome = (actor, key, keys = []) => post(`actor/${actor.kar.type}/${actor.kar.id}/state`, { submapremovals: { [key]: keys } }).then(res => res.removed) | ||
@@ -227,0 +219,0 @@ const actorSubmapRemoveAll = (actor, key) => post(`actor/${actor.kar.type}/${actor.kar.id}/state/${key}`, { op: 'clear' }) |
@@ -5,3 +5,3 @@ { | ||
"types": "index.d.ts", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "KAR SDK for JavaScript and TypeScript", | ||
@@ -8,0 +8,0 @@ "homepage": "https://github.com/IBM/kar", |
45473
727