mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
968 B
58 lines
968 B
# ===============================================
|
|
# ASSETS
|
|
# ===============================================
|
|
|
|
extend type Query {
|
|
assetById(
|
|
id: UUID!
|
|
): [AssetItem]
|
|
}
|
|
|
|
extend type Mutation {
|
|
renameAsset(
|
|
id: UUID!
|
|
filename: String!
|
|
): DefaultResponse
|
|
|
|
deleteAsset(
|
|
id: UUID!
|
|
): DefaultResponse
|
|
|
|
"""
|
|
Upload one or more assets.
|
|
Must provide either `folderId` or a combination of `folderPath`, `locale` and `siteId`.
|
|
"""
|
|
uploadAssets(
|
|
folderId: UUID
|
|
folderPath: String
|
|
locale: String
|
|
siteId: UUID
|
|
files: [Upload!]!
|
|
): DefaultResponse
|
|
|
|
flushTempUploads: DefaultResponse
|
|
}
|
|
|
|
# -----------------------------------------------
|
|
# TYPES
|
|
# -----------------------------------------------
|
|
|
|
type AssetItem {
|
|
id: UUID
|
|
filename: String
|
|
ext: String
|
|
kind: AssetKind
|
|
mime: String
|
|
fileSize: Int
|
|
metadata: JSON
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
author: User
|
|
}
|
|
|
|
enum AssetKind {
|
|
document
|
|
image
|
|
other
|
|
}
|