anear-js-api 0.4.12 → 0.4.13

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.
@@ -62,19 +62,19 @@ class AnearEvent extends JsonApiResource {
62
62
  return this.relationships.zone.data.id
63
63
  }
64
64
 
65
- getClonedEvent() {
65
+ getClonedFromEvent() {
66
66
  // if the current event was a clone of previous event, fetch if from
67
67
  // Peristence and return
68
- const clonedEventData = this.relationships["cloned-event"].data
69
- if (!clonedEventData) return null
68
+ const clonedFromEventData = this.relationships["cloned-from"].data
69
+ if (!clonedFromEventData) return null
70
70
 
71
71
  return this.constructor.getFromStorage(clonedEventData.id)
72
72
  }
73
73
 
74
- async clonedEventContext() {
75
- const clonedEvent = await this.getClonedEvent()
74
+ async clonedFromEventContext() {
75
+ const clonedFrom = await this.getClonedFromEvent()
76
76
 
77
- return clonedEvent ? clonedEvent.context : null
77
+ return clonedFrom ? clonedFrom.context : null
78
78
  }
79
79
 
80
80
  get stateMachineContext() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anear-js-api",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "description": "Javascript Developer API for Anear Apps",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -36,7 +36,7 @@ module.exports = {
36
36
  type: 'users'
37
37
  }
38
38
  },
39
- 'cloned-event': {
39
+ 'cloned-from': {
40
40
  data: null
41
41
  },
42
42
  },