@vtj / Modules / renderer / StorageService
Class: StorageService
renderer.StorageService
Hierarchy
↳
StorageService
Table of contents
Constructors
Properties
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 StorageService(): StorageService
Returns
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:7
Properties
api
• Protected
api: (type
: string
, data
: any
) => Promise
<any
>
Type declaration
▸ (type
, data
): Promise
<any
>
Parameters
Name | Type |
---|---|
type | string |
data | any |
Returns
Promise
<any
>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:4
uploader
• Protected
uploader: (file
: File
, projectId
: string
) => Promise
<StaticFileInfo
>
Type declaration
▸ (file
, projectId
): Promise
<StaticFileInfo
>
Parameters
Name | Type |
---|---|
file | File |
projectId | string |
Returns
Promise
<StaticFileInfo
>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:6
Methods
clearStaticFiles
▸ clearStaticFiles(projectId
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
projectId | string |
Returns
Promise
<boolean
>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:28
createRawPage
▸ createRawPage(file
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
file | PageFile |
Returns
Promise
<boolean
>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:23
genVueContent
▸ genVueContent(project
, dsl
): Promise
<string
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
dsl | BlockSchema |
Returns
Promise
<string
>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:22
getFile
▸ getFile(id
): Promise
<BlockSchema
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<BlockSchema
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:9
getHistory
▸ getHistory(id
): Promise
<HistorySchema
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<HistorySchema
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:13
getHistoryItem
▸ getHistoryItem(fId
, id
): Promise
<HistoryItem
>
Parameters
Name | Type |
---|---|
fId | string |
id | string |
Returns
Promise
<HistoryItem
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:14
getPluginMaterial
▸ getPluginMaterial(from
): Promise
<null
| MaterialDescription
>
Parameters
Name | Type |
---|---|
from | NodeFromPlugin |
Returns
Promise
<null
| MaterialDescription
>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:29
getStaticFiles
▸ getStaticFiles(projectId
): Promise
<StaticFileInfo
[]>
Parameters
Name | Type |
---|---|
projectId | string |
Returns
Promise
<StaticFileInfo
[]>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:26
init
▸ init(project
): Promise
<ProjectSchema
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
Returns
Promise
<ProjectSchema
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:5
publish
▸ publish(project
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
Returns
Promise
<boolean
>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:20
publishFile
▸ publishFile(project
, file
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
file | PageFile | BlockFile |
Returns
Promise
<boolean
>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:21
removeFile
▸ removeFile(id
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<boolean
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:10
removeHistory
▸ removeHistory(id
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<boolean
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:12
removeHistoryItem
▸ removeHistoryItem(fId
, ids
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
fId | string |
ids | string [] |
Returns
Promise
<boolean
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:16
removeRawPage
▸ removeRawPage(id
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<boolean
>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:24
removeStaticFile
▸ removeStaticFile(name
, projectId
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
name | string |
projectId | string |
Returns
Promise
<boolean
>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:27
saveFile
▸ saveFile(file
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
file | BlockSchema |
Returns
Promise
<boolean
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:8
saveHistory
▸ saveHistory(history
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
history | HistorySchema |
Returns
Promise
<boolean
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:11
saveHistoryItem
▸ saveHistoryItem(fId
, item
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
fId | string |
item | HistoryItem |
Returns
Promise
<boolean
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:15
saveMaterials
▸ saveMaterials(project
, materials
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
materials | Map <string , MaterialDescription > |
Returns
Promise
<boolean
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:7
saveProject
▸ saveProject(project
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
project | ProjectSchema |
Returns
Promise
<boolean
>
Overrides
Defined in
packages/renderer/types/services/storage.d.ts:6
uploadStaticFile
▸ uploadStaticFile(file
, projectId
): Promise
<null
| StaticFileInfo
>
Parameters
Name | Type |
---|---|
file | File |
projectId | string |
Returns
Promise
<null
| StaticFileInfo
>
Inherited from
Defined in
packages/renderer/types/services/base.d.ts:25