Skip to content

align notification responses with get/advancedSearch results #146

@benoitvidis

Description

@benoitvidis

Current situation:

col.publishMessage({foo: 'bar'})

/*
{
  "error": null,
  "status": 200,
  "roomId": "91088e3125a9794073bdcf7b882bb39c",
  "requestId": "4ded9bc9-bf1f-4035-a316-52b4e9ea1fcf",
  "index": "index",
  "collection": "col",
  "controller": "write",
  "action": "publish",
  "protocol": "websocket",
  "timestamp": 1479831847385,
  "metadata": {},
  "scope": "in",
  "state": "done",
  "result": {
    "_source": {
      "foo": "bar"
    }
  },
  "room": "91088e3125a9794073bdcf7b882bb39c-1c7beed7521fd0b0a8177f219b786d2e"
}
*/
col.advancedSearch({query: {term: {foo: 'bar'}}}, (e, r) => console.log(e, r));

/*
{
  documents: [
    {
      collection: "col",
      content: {
        foo: "bar"
      },
      dataCollection: { .. },
      headers: { .. },
      id: "AViM3A6OEbZb7DBMbyBn",
      kuzzle: { .. },
      version: undefined
    },
    ..
  ],
  kuzzle: { .. },
  total: 23
}
*/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions