-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathschema.root.graphql
More file actions
386 lines (335 loc) · 12 KB
/
schema.root.graphql
File metadata and controls
386 lines (335 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
"""
Custom constraint directive (see https://www.npmjs.com/package/graphql-constraint-directive)
"""
directive @constraint(minLength: Int maxLength: Int pattern: String format: String min: Int max: Int minItems: Int maxItems: Int) on FIELD_DEFINITION | SCALAR | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
type Query {
assetCount(assetSourceId: AssetSourceId! assetCollectionId: AssetCollectionId mediaType: MediaType assetType: AssetType tagId: TagId searchTerm: String): Int!
""" Provides a filterable list of asset proxies. These are the main entities for media management. """
assets(assetSourceId: AssetSourceId! assetCollectionId: AssetCollectionId mediaType: MediaType assetType: AssetType tagId: TagId sortBy: SortBy sortDirection: SortDirection searchTerm: String limit: Int = 20 offset: Int = 0): [Asset!]
""" All asset collections """
assetCollections(assetSourceId: AssetSourceId!): [AssetCollection!]!
""" All configured asset sources (by default only the "neos" source) """
assetSources: [AssetSource!]!
""" Provides number of unused assets in local asset source """
unusedAssetCount(assetSourceId: AssetSourceId!): Int!
""" Provides a list of all tags """
tags(assetSourceId: AssetSourceId!): [Tag!]!
""" Get tag by id """
tag(id: TagId! assetSourceId: AssetSourceId!): Tag
""" Returns an asset collection by id """
assetCollection(id: AssetCollectionId! assetSourceId: AssetSourceId!): AssetCollection
""" Returns an asset by id """
asset(id: AssetId! assetSourceId: AssetSourceId!): Asset
""" Provides configuration values for interacting with the media API """
config: Config!
""" Returns a list of accessible and inaccessible relations for the given asset """
assetUsageDetails(id: AssetId! assetSourceId: AssetSourceId!): [UsageDetailsGroup!]!
""" Returns the total usage count for the given asset """
assetUsageCount(id: AssetId! assetSourceId: AssetSourceId!): Int!
""" Provides a list of all unused assets in local asset source """
unusedAssets(assetSourceId: AssetSourceId! limit: Int = 20 offset: Int = 0): [Asset!]!
""" Provides a list of changes to assets since a given timestamp """
changedAssets(since: DateTime @constraint(format: "date_time")): ChangedAssetsResult!
""" Returns a list of variants for the given asset """
assetVariants(id: AssetId! assetSourceId: AssetSourceId!): [AssetVariant!]!
similarAssets(id: AssetId! assetSourceId: AssetSourceId!): [Asset!]!
}
type Mutation {
updateAsset(id: AssetId! assetSourceId: AssetSourceId! label: String caption: String copyrightNotice: String): Asset
tagAsset(id: AssetId! assetSourceId: AssetSourceId! tagId: TagId!): Asset
untagAsset(id: AssetId! assetSourceId: AssetSourceId! tagId: TagId!): Asset
deleteAsset(id: AssetId! assetSourceId: AssetSourceId!): MutationResult!
setAssetTags(id: AssetId! assetSourceId: AssetSourceId! tagIds: [TagId!]!): Asset
setAssetCollections(id: AssetId! assetSourceId: AssetSourceId! assetCollectionIds: [AssetCollectionId!]!): MutationResult!
createAssetCollection(title: AssetCollectionTitle! assetSourceId: AssetSourceId! parent: AssetCollectionId): AssetCollection
deleteAssetCollection(id: AssetCollectionId! assetSourceId: AssetSourceId!): MutationResult!
updateAssetCollection(id: AssetCollectionId! assetSourceId: AssetSourceId! title: AssetCollectionTitle tagIds: [TagId!]): MutationResult!
setAssetCollectionParent(id: AssetCollectionId! assetSourceId: AssetSourceId! parent: AssetCollectionId): MutationResult!
replaceAsset(id: AssetId! assetSourceId: AssetSourceId! file: UploadedFileInput! options: AssetReplacementOptionsInput!): FileUploadResult!
editAsset(id: AssetId! assetSourceId: AssetSourceId! filename: Filename! options: AssetEditOptionsInput!): MutationResult!
importAsset(id: AssetId! assetSourceId: AssetSourceId!): Asset
uploadFile(file: UploadedFileInput! assetSourceId: AssetSourceId! tagId: TagId assetCollectionId: AssetCollectionId): FileUploadResult!
uploadFiles(files: [UploadedFileInput!]! assetSourceId: AssetSourceId! tagId: TagId assetCollectionId: AssetCollectionId): [FileUploadResult!]!
createTag(label: TagLabel! assetSourceId: AssetSourceId! assetCollectionId: AssetCollectionId): Tag!
updateTag(id: TagId! assetSourceId: AssetSourceId! label: TagLabel): Tag!
deleteTag(id: TagId! assetSourceId: AssetSourceId!): MutationResult!
}
"""
Unique identifier of an Asset source (e.g. "neos")
"""
scalar AssetSourceId
"""
Unique identifier of an Asset collection (e.g. "neos")
"""
scalar AssetCollectionId
"""
IANA media type of an Asset (e.g. "image/jpeg")
"""
scalar MediaType
"""
Neos type of an Asset, can be "All", "Image", "Document", "Video" or "Audio" (see `Neos\Media\Domain\Model\AssetSource\AssetTypeFilter`)
"""
scalar AssetType
"""
The id of a tag
"""
scalar TagId
"""
Fields to sort assets by
"""
scalar SortBy
"""
Direction to sort fields in
"""
scalar SortDirection
"""
Unique identifier (UUID) of an Asset
"""
scalar AssetId
"""
Base file name including extension (e.g. "some-file.pdf")
"""
scalar Filename
"""
An absolute or relative URL
"""
scalar Url
type AssetSource {
""" Unique identifier of an Asset source (e.g. "neos") """
id: AssetSourceId!
label: String!
description: String!
readOnly: Boolean!
supportsTagging: Boolean!
supportsCollections: Boolean!
""" An absolute or relative URL """
iconUri: Url
}
"""
Unique identifier (UUID) of an imported Asset
"""
scalar LocalAssetId
"""
A File extension (e.g. "pdf")
"""
scalar FileExtension
type Image {
width: Int!
height: Int!
""" An absolute or relative URL """
url: Url!
alt: String!
}
"""
Size of a file in bytes
*Constraints:*
* Minimum value: `0`
"""
scalar FileSize @constraint(min: 0)
type File {
""" A File extension (e.g. "pdf") """
extension: FileExtension!
""" IANA media type of an Asset (e.g. "image/jpeg") """
mediaType: MediaType!
""" Representation of an image that can be rendered to the browser """
typeIcon: Image!
""" Size of a file in bytes """
size: FileSize!
""" An absolute or relative URL """
url: Url!
}
"""
Name of an IPTC metadata property (e.g. "Creator", see https://www.iptc.org/)
"""
scalar IptcPropertyName
type IptcProperty {
""" Name of an IPTC metadata property (e.g. "Creator", see https://www.iptc.org/) """
propertyName: IptcPropertyName!
value: String!
}
"""
The label of a Tag (e.g. "important")
"""
scalar TagLabel
type Tag {
""" The id of a tag """
id: TagId!
""" Unique identifier of an Asset source (e.g. "neos") """
assetSourceId: AssetSourceId!
""" The label of a Tag (e.g. "important") """
label: TagLabel!
}
"""
The title of an Asset collection (e.g. "slideshows")
"""
scalar AssetCollectionTitle
type AssetCollectionParent {
""" Unique identifier of an Asset collection (e.g. "neos") """
id: AssetCollectionId!
""" Unique identifier of an Asset source (e.g. "neos") """
assetSourceId: AssetSourceId!
""" The title of an Asset collection (e.g. "slideshows") """
title: AssetCollectionTitle!
}
type AssetCollection {
""" Unique identifier of an Asset collection (e.g. "neos") """
id: AssetCollectionId!
""" Unique identifier of an Asset source (e.g. "neos") """
assetSourceId: AssetSourceId!
""" The title of an Asset collection (e.g. "slideshows") """
title: AssetCollectionTitle!
assetCount: Int!
canDelete: Boolean!
tags: [Tag!]!
parent: AssetCollectionParent
}
type Asset {
""" Unique identifier (UUID) of an Asset """
id: AssetId!
""" Base file name including extension (e.g. "some-file.pdf") """
filename: Filename!
""" Asset sources allow to integrate assets from external DAM systems """
assetSource: AssetSource!
""" The width in pixels (only for Images and Videos) """
width: Int
""" The height in pixels (only for Images and Videos) """
height: Int
""" Unique identifier (UUID) of an imported Asset """
localId: LocalAssetId
file: File
imported: Boolean!
iptcProperties: [IptcProperty!]!
label: String
caption: String
copyrightNotice: String
lastModified: String
tags: [Tag!]!
collections: [AssetCollection!]!
thumbnailUrl: Url
previewUrl: Url
""" Check if the asset is used as reported by registered AssetUsageStrategies """
isInUse: Boolean!
}
"""
A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the date-time format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar
*Constraints:*
* Format: `date_time`
"""
scalar DateTime @constraint(format: "date_time")
type Config {
""" The lowest configured maximum upload file size """
uploadMaxFileSize: FileSize!
""" The maximum number of files that can be uploaded """
uploadMaxFileUploadLimit: Int!
""" A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the date-time format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar """
currentServerTime: DateTime!
canManageTags: Boolean!
canManageAssetCollections: Boolean!
canManageAssets: Boolean!
""" Unique identifier of an Asset collection (e.g. "neos") """
defaultAssetCollectionId: AssetCollectionId
}
scalar ServiceId
scalar MetadataName
"""
Data types for usage details metadata
"""
scalar UsageDetailsMetadataType
type UsageDetailsMetadataSchema {
name: MetadataName!
label: String!
""" Data types for usage details metadata """
type: UsageDetailsMetadataType!
}
type UsageDetailsMetadata {
name: MetadataName!
value: String
}
type UsageDetails {
label: String!
""" An absolute or relative URL """
url: Url!
""" A collection of assets. One asset can belong to multiple collections """
metadata: [UsageDetailsMetadata!]!
}
type UsageDetailsGroup {
serviceId: ServiceId!
label: String!
""" A collection of assets. One asset can belong to multiple collections """
metadataSchema: [UsageDetailsMetadataSchema!]!
""" A collection of assets. One asset can belong to multiple collections """
usages: [UsageDetails!]!
}
"""
The type of a change to an asset
"""
scalar AssetChangeType
type AssetChange {
""" A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the date-time format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar """
lastModified: DateTime!
""" Unique identifier (UUID) of an Asset """
assetId: AssetId!
""" The type of a change to an asset """
type: AssetChangeType!
}
type ChangedAssetsResult {
changes: [AssetChange!]!
""" A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the date-time format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar """
lastModified: DateTime
}
"""
Variant Name
"""
scalar VariantName
"""
Variant Preset Identifier
"""
scalar VariantPresetIdentifier
type CropInformation {
""" The width in pixels (only for Images and Videos) """
width: Int
""" The height in pixels (only for Images and Videos) """
height: Int
x: Int
y: Int
}
type AssetVariant {
""" Unique identifier (UUID) of an Asset """
id: AssetId!
""" The width in pixels (only for Images and Videos) """
width: Int
""" The height in pixels (only for Images and Videos) """
height: Int
""" Variant Name """
variantName: VariantName
""" Variant Preset Identifier """
presetIdentifier: VariantPresetIdentifier
previewUrl: Url
hasCrop: Boolean!
cropInformation: CropInformation!
}
scalar MutationResponseMessage
type MutationResult {
success: Boolean!
messages: [MutationResponseMessage!]
}
input UploadedFileInput {
size: Int!
errorStatus: Int!
streamOrFile: String
clientFilename: String
clientMediaType: String
}
input AssetReplacementOptionsInput {
generateRedirects: Boolean!
keepOriginalFilename: Boolean!
}
type FileUploadResult {
success: Boolean!
result: String!
""" Base file name including extension (e.g. "some-file.pdf") """
filename: Filename
}
input AssetEditOptionsInput {
generateRedirects: Boolean!
}