@vtj / Modules / core / Service
Class: Service
core.Service
Table of contents
Constructors
Methods
- clearStaticFiles
- createRawPage
- genVueContent
- getFile
- getHistory
- getHistoryItem
- getPluginMaterial
- getStaticFiles
- init
- publish
- publishFile
- removeFile
- removeHistory
- removeHistoryItem
- removeRawPage
- removeStaticFile
- saveFile
- saveHistory
- saveHistoryItem
- saveMaterials
- saveProject
- uploadStaticFile
Constructors
constructor
• new Service(): Service
Returns
Methods
clearStaticFiles
▸ clearStaticFiles(projectId
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
projectId | string |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:57
createRawPage
▸ createRawPage(file
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
file | PageFile |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:45
genVueContent
▸ genVueContent(project
, dsl
): Promise
<string
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
dsl | BlockSchema |
Returns
Promise
<string
>
Defined in
packages/core/src/protocols/service.ts:40
getFile
▸ getFile(id
): Promise
<BlockSchema
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<BlockSchema
>
Defined in
packages/core/src/protocols/service.ts:21
getHistory
▸ getHistory(id
): Promise
<HistorySchema
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<HistorySchema
>
Defined in
packages/core/src/protocols/service.ts:25
getHistoryItem
▸ getHistoryItem(fId
, id
): Promise
<HistoryItem
>
Parameters
Name | Type |
---|---|
fId | string |
id | string |
Returns
Promise
<HistoryItem
>
Defined in
packages/core/src/protocols/service.ts:26
getPluginMaterial
▸ getPluginMaterial(from
): Promise
<null
| MaterialDescription
>
Parameters
Name | Type |
---|---|
from | NodeFromPlugin |
Returns
Promise
<null
| MaterialDescription
>
Defined in
packages/core/src/protocols/service.ts:59
getStaticFiles
▸ getStaticFiles(projectId
): Promise
<StaticFileInfo
[]>
Parameters
Name | Type |
---|---|
projectId | string |
Returns
Promise
<StaticFileInfo
[]>
Defined in
packages/core/src/protocols/service.ts:52
init
▸ init(project
): Promise
<ProjectSchema
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
Returns
Promise
<ProjectSchema
>
Defined in
packages/core/src/protocols/service.ts:14
publish
▸ publish(project
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:35
publishFile
▸ publishFile(project
, file
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
file | BlockFile | PageFile |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:36
removeFile
▸ removeFile(id
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:22
removeHistory
▸ removeHistory(id
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:24
removeHistoryItem
▸ removeHistoryItem(fId
, ids
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
fId | string |
ids | string [] |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:31
removeRawPage
▸ removeRawPage(id
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:46
removeStaticFile
▸ removeStaticFile(name
, projectId
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
name | string |
projectId | string |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:53
saveFile
▸ saveFile(file
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
file | BlockSchema |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:20
saveHistory
▸ saveHistory(history
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
history | HistorySchema |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:23
saveHistoryItem
▸ saveHistoryItem(fId
, item
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
fId | string |
item | HistoryItem |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:27
saveMaterials
▸ saveMaterials(project
, materials
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
materials | Map <string , MaterialDescription > |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:16
saveProject
▸ saveProject(project
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
Returns
Promise
<boolean
>
Defined in
packages/core/src/protocols/service.ts:15
uploadStaticFile
▸ uploadStaticFile(file
, projectId
): Promise
<null
| StaticFileInfo
>
Parameters
Name | Type |
---|---|
file | File |
projectId | string |
Returns
Promise
<null
| StaticFileInfo
>
Defined in
packages/core/src/protocols/service.ts:48