@live-change/draft-service 0.8.108
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.
- package/config.js +13 -0
- package/definition.js +13 -0
- package/draft.js +22 -0
- package/index.js +8 -0
- package/package.json +31 -0
package/config.js
ADDED
package/definition.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import App from '@live-change/framework'
|
|
2
|
+
const app = App.app()
|
|
3
|
+
|
|
4
|
+
import userService from '@live-change/user-service'
|
|
5
|
+
import relationsPlugin from '@live-change/relations-plugin'
|
|
6
|
+
import accessControlService from '@live-change/access-control-service'
|
|
7
|
+
|
|
8
|
+
const definition = app.createServiceDefinition({
|
|
9
|
+
name: "draft",
|
|
10
|
+
use: [ userService, relationsPlugin, accessControlService ]
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
export default definition
|
package/draft.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import App from '@live-change/framework'
|
|
2
|
+
const app = App.app()
|
|
3
|
+
|
|
4
|
+
import definition from './definition.js'
|
|
5
|
+
import config from './config.js'
|
|
6
|
+
|
|
7
|
+
const Draft = definition.model({
|
|
8
|
+
name: "Draft",
|
|
9
|
+
sessionOrUserProperty: {
|
|
10
|
+
ownerReadAccess: () => true,
|
|
11
|
+
ownerWriteAccess: () => true,
|
|
12
|
+
extendedWith: ['action', 'target']
|
|
13
|
+
},
|
|
14
|
+
properties: {
|
|
15
|
+
data: {
|
|
16
|
+
type: Object,
|
|
17
|
+
validation: ['nonEmpty']
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
export { Draft }
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@live-change/draft-service",
|
|
3
|
+
"version": "0.8.108",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "NODE_ENV=test tape tests/*"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/live-change/live-change-stack.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/live-change/live-change-stack/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/live-change/live-change-stack",
|
|
18
|
+
"author": {
|
|
19
|
+
"email": "michal@laszczewski.pl",
|
|
20
|
+
"name": "Michał Łaszczewski",
|
|
21
|
+
"url": "https://www.viamage.com/"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@live-change/access-control-service": "^0.8.108",
|
|
25
|
+
"@live-change/framework": "^0.8.108",
|
|
26
|
+
"@live-change/relations-plugin": "^0.8.108",
|
|
27
|
+
"@live-change/user-service": "^0.8.108"
|
|
28
|
+
},
|
|
29
|
+
"gitHead": "b272a01967e326d10874fea13353ab8fa5c30fe8",
|
|
30
|
+
"type": "module"
|
|
31
|
+
}
|