| 
									
										
										
										
											2022-03-22 18:19:46 +01:00
										 |  |  | 'use strict'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const ACTIONS = { | 
					
						
							|  |  |  |   read: 'plugin::upload.read', | 
					
						
							|  |  |  |   readSettings: 'plugin::upload.settings.read', | 
					
						
							|  |  |  |   create: 'plugin::upload.assets.create', | 
					
						
							|  |  |  |   update: 'plugin::upload.assets.update', | 
					
						
							|  |  |  |   download: 'plugin::upload.assets.download', | 
					
						
							|  |  |  |   copyLink: 'plugin::upload.assets.copy-link', | 
					
						
							| 
									
										
										
										
											2022-10-21 15:28:37 +01:00
										 |  |  |   configureView: 'plugin::upload.configure-view', | 
					
						
							| 
									
										
										
										
											2022-03-22 18:19:46 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-21 15:28:37 +01:00
										 |  |  | const ALLOWED_SORT_STRINGS = [ | 
					
						
							|  |  |  |   'createdAt:DESC', | 
					
						
							|  |  |  |   'createdAt:ASC', | 
					
						
							|  |  |  |   'name:ASC', | 
					
						
							|  |  |  |   'name:DESC', | 
					
						
							|  |  |  |   'updatedAt:DESC', | 
					
						
							|  |  |  |   'updatedAt:ASC', | 
					
						
							|  |  |  | ]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-30 16:13:10 +01:00
										 |  |  | const ALLOWED_WEBHOOK_EVENTS = { | 
					
						
							|  |  |  |   MEDIA_CREATE: 'media.create', | 
					
						
							|  |  |  |   MEDIA_UPDATE: 'media.update', | 
					
						
							|  |  |  |   MEDIA_DELETE: 'media.delete', | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-22 18:19:46 +01:00
										 |  |  | module.exports = { | 
					
						
							|  |  |  |   ACTIONS, | 
					
						
							| 
									
										
										
										
											2022-05-13 16:10:18 +02:00
										 |  |  |   FOLDER_MODEL_UID: 'plugin::upload.folder', | 
					
						
							|  |  |  |   FILE_MODEL_UID: 'plugin::upload.file', | 
					
						
							| 
									
										
										
										
											2022-05-17 15:39:17 +02:00
										 |  |  |   API_UPLOAD_FOLDER_BASE_NAME: 'API Uploads', | 
					
						
							| 
									
										
										
										
											2022-10-21 15:28:37 +01:00
										 |  |  |   ALLOWED_SORT_STRINGS, | 
					
						
							| 
									
										
										
										
											2023-05-30 16:13:10 +01:00
										 |  |  |   ALLOWED_WEBHOOK_EVENTS, | 
					
						
							| 
									
										
										
										
											2022-03-22 18:19:46 +01:00
										 |  |  | }; |