@live-change/task-service 0.9.163 → 0.9.164

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/model.js +29 -0
  2. package/package.json +4 -4
package/model.js CHANGED
@@ -102,6 +102,9 @@ const Task = definition.model({
102
102
  byCauseAndStart: {
103
103
  property: ['causeType', 'cause', 'startedAt']
104
104
  },
105
+ byCauseAndCreatedAt: {
106
+ property: ['causeType', 'cause', 'createdAt']
107
+ },
105
108
  byState: {
106
109
  property: ['state']
107
110
  },
@@ -290,6 +293,32 @@ definition.view({
290
293
  }
291
294
  })
292
295
 
296
+
297
+ definition.view({
298
+ name: 'tasksByCauseAndCreatedAt',
299
+ properties: {
300
+ causeType: {
301
+ type: String
302
+ },
303
+ cause: {
304
+ type: String
305
+ },
306
+ ...App.rangeProperties
307
+ },
308
+ returns: {
309
+ type: Array,
310
+ of: {
311
+ type: Task
312
+ }
313
+ },
314
+ async daoPath(props) {
315
+ const { causeType, cause } = props
316
+ const range = App.extractRange(props)
317
+ return Task.sortedIndexRangePath('byCauseAndCreatedAt', [causeType, cause], range)
318
+ }
319
+ })
320
+
321
+
293
322
  definition.view({
294
323
  name: 'tasksByRoot',
295
324
  properties: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/task-service",
3
- "version": "0.9.163",
3
+ "version": "0.9.164",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "type": "module",
24
24
  "dependencies": {
25
- "@live-change/framework": "^0.9.163",
26
- "@live-change/relations-plugin": "^0.9.163"
25
+ "@live-change/framework": "^0.9.164",
26
+ "@live-change/relations-plugin": "^0.9.164"
27
27
  },
28
- "gitHead": "c410e1dacd07daed9a5c55367abd7f19d9a575cc"
28
+ "gitHead": "38f9fb8b01a9527d8f6036e174edd1fa41443301"
29
29
  }