|
| 1 | +import type { AppDefinition } from '@codegenie/cli' |
| 2 | + |
| 3 | +const appDefinition: AppDefinition = { |
| 4 | + permissionModel: 'Global', |
| 5 | + defaultAuthRouteEntityName: 'Recipe', |
| 6 | + region: 'us-west-2', |
| 7 | + appId: '01J7GPC8YEMXFBJVH7GSYJ7H2R', |
| 8 | + description: 'Recipes App', |
| 9 | + name: 'Recipes', |
| 10 | + entities: { |
| 11 | + Ingredient: { |
| 12 | + properties: { |
| 13 | + ingredientId: { |
| 14 | + isIdProperty: true, |
| 15 | + type: 'string', |
| 16 | + }, |
| 17 | + name: { |
| 18 | + isRequired: true, |
| 19 | + isNameProperty: true, |
| 20 | + type: 'string', |
| 21 | + }, |
| 22 | + }, |
| 23 | + ui: { |
| 24 | + showEditInCardList: true, |
| 25 | + showEditInTable: true, |
| 26 | + listView: 'Table', |
| 27 | + listPagePermission: 'All', |
| 28 | + remainOnCurrentPageOnCreate: true, |
| 29 | + showInParentDetailsPage: true, |
| 30 | + generateDetailsPage: false, |
| 31 | + }, |
| 32 | + permissions: { |
| 33 | + create: 'Inherit', |
| 34 | + get: 'Inherit', |
| 35 | + delete: 'Inherit', |
| 36 | + list: 'Inherit', |
| 37 | + update: 'Inherit', |
| 38 | + }, |
| 39 | + }, |
| 40 | + Recipe: { |
| 41 | + properties: { |
| 42 | + createdDate: { |
| 43 | + isRequired: true, |
| 44 | + type: 'date', |
| 45 | + }, |
| 46 | + description: { |
| 47 | + isRequired: true, |
| 48 | + format: 'multiline', |
| 49 | + type: 'string', |
| 50 | + }, |
| 51 | + image: { |
| 52 | + isMainImageProperty: true, |
| 53 | + type: 'image', |
| 54 | + }, |
| 55 | + recipeId: { |
| 56 | + isIdProperty: true, |
| 57 | + type: 'string', |
| 58 | + }, |
| 59 | + tags: { |
| 60 | + relatedEntityName: 'Tag', |
| 61 | + type: 'array', |
| 62 | + ui: { |
| 63 | + showInDetails: true, |
| 64 | + showInCardList: true, |
| 65 | + showInReadView: true, |
| 66 | + showInTable: true, |
| 67 | + }, |
| 68 | + }, |
| 69 | + title: { |
| 70 | + isRequired: true, |
| 71 | + isNameProperty: true, |
| 72 | + type: 'string', |
| 73 | + }, |
| 74 | + }, |
| 75 | + ui: {}, |
| 76 | + }, |
| 77 | + RecipeIngredient: { |
| 78 | + parentEntityName: 'Recipe', |
| 79 | + properties: { |
| 80 | + ingredientId: { |
| 81 | + isRequired: true, |
| 82 | + isIdProperty: true, |
| 83 | + relatedEntityName: 'Ingredient', |
| 84 | + isNameProperty: true, |
| 85 | + type: 'string', |
| 86 | + ui: { |
| 87 | + showInTable: true, |
| 88 | + showInDetails: true, |
| 89 | + showInCardList: true, |
| 90 | + showInReadView: true, |
| 91 | + }, |
| 92 | + }, |
| 93 | + qty: { |
| 94 | + type: 'number', |
| 95 | + }, |
| 96 | + recipeId: { |
| 97 | + type: 'string', |
| 98 | + }, |
| 99 | + unit: { |
| 100 | + enumOptions: ['g', 'tbsp', 'tsp', 'cup'], |
| 101 | + type: 'enum', |
| 102 | + ui: { |
| 103 | + showInDetails: true, |
| 104 | + showInCardList: true, |
| 105 | + showInReadView: true, |
| 106 | + showInTable: true, |
| 107 | + }, |
| 108 | + }, |
| 109 | + }, |
| 110 | + ui: { |
| 111 | + showEditInCardList: true, |
| 112 | + showEditInTable: true, |
| 113 | + listView: 'Table', |
| 114 | + listPagePermission: 'All', |
| 115 | + showInParentDetailsPage: true, |
| 116 | + generateDetailsPage: true, |
| 117 | + }, |
| 118 | + permissions: { |
| 119 | + create: 'Inherit', |
| 120 | + get: 'Inherit', |
| 121 | + delete: 'Inherit', |
| 122 | + list: 'Inherit', |
| 123 | + update: 'Inherit', |
| 124 | + }, |
| 125 | + }, |
| 126 | + RecipeRating: { |
| 127 | + parentEntityName: 'Recipe', |
| 128 | + properties: { |
| 129 | + comment: { |
| 130 | + format: 'multiline', |
| 131 | + type: 'string', |
| 132 | + ui: { |
| 133 | + showInDetails: true, |
| 134 | + showInCardList: true, |
| 135 | + showInReadView: true, |
| 136 | + showInTable: true, |
| 137 | + }, |
| 138 | + }, |
| 139 | + createdByUserId: { |
| 140 | + type: 'string', |
| 141 | + }, |
| 142 | + recipeId: { |
| 143 | + type: 'string', |
| 144 | + }, |
| 145 | + recipeRatingId: { |
| 146 | + isIdProperty: true, |
| 147 | + type: 'string', |
| 148 | + }, |
| 149 | + value: { |
| 150 | + max: 5, |
| 151 | + min: 1, |
| 152 | + type: 'number', |
| 153 | + ui: { |
| 154 | + showInDetails: true, |
| 155 | + showInCardList: true, |
| 156 | + showInReadView: true, |
| 157 | + showInTable: true, |
| 158 | + }, |
| 159 | + }, |
| 160 | + }, |
| 161 | + ui: { |
| 162 | + showEditInCardList: true, |
| 163 | + showEditInTable: true, |
| 164 | + listView: 'Table', |
| 165 | + listPagePermission: 'All', |
| 166 | + showInParentDetailsPage: true, |
| 167 | + generateDetailsPage: true, |
| 168 | + }, |
| 169 | + permissions: { |
| 170 | + create: 'Inherit', |
| 171 | + get: 'Inherit', |
| 172 | + delete: 'Inherit', |
| 173 | + list: 'Inherit', |
| 174 | + update: 'Inherit', |
| 175 | + }, |
| 176 | + }, |
| 177 | + ShoppingList: { |
| 178 | + properties: { |
| 179 | + name: { |
| 180 | + isNameProperty: true, |
| 181 | + type: 'string', |
| 182 | + ui: { |
| 183 | + showInDetails: true, |
| 184 | + showInCardList: true, |
| 185 | + showInReadView: true, |
| 186 | + showInTable: true, |
| 187 | + }, |
| 188 | + }, |
| 189 | + shoppingListId: { |
| 190 | + isIdProperty: true, |
| 191 | + type: 'string', |
| 192 | + }, |
| 193 | + }, |
| 194 | + ui: { |
| 195 | + showEditInCardList: true, |
| 196 | + showEditInTable: true, |
| 197 | + listView: 'Table', |
| 198 | + listPagePermission: 'All', |
| 199 | + showInParentDetailsPage: true, |
| 200 | + generateDetailsPage: true, |
| 201 | + }, |
| 202 | + permissions: { |
| 203 | + create: 'All', |
| 204 | + get: 'CreatedByUser', |
| 205 | + delete: 'CreatedByUser', |
| 206 | + list: 'CreatedByUser', |
| 207 | + update: 'CreatedByUser', |
| 208 | + }, |
| 209 | + }, |
| 210 | + ShoppingListItem: { |
| 211 | + parentEntityName: 'ShoppingList', |
| 212 | + properties: { |
| 213 | + ingredientId: { |
| 214 | + isIdProperty: true, |
| 215 | + relatedEntityName: 'Ingredient', |
| 216 | + isNameProperty: true, |
| 217 | + type: 'string', |
| 218 | + ui: { |
| 219 | + showInTable: true, |
| 220 | + showInDetails: true, |
| 221 | + showInCardList: true, |
| 222 | + showInReadView: true, |
| 223 | + }, |
| 224 | + }, |
| 225 | + qty: { |
| 226 | + type: 'number', |
| 227 | + }, |
| 228 | + shoppingListId: { |
| 229 | + type: 'string', |
| 230 | + }, |
| 231 | + }, |
| 232 | + ui: { |
| 233 | + showEditInCardList: true, |
| 234 | + showEditInTable: true, |
| 235 | + listView: 'Table', |
| 236 | + listPagePermission: 'All', |
| 237 | + showInParentDetailsPage: true, |
| 238 | + generateDetailsPage: true, |
| 239 | + }, |
| 240 | + permissions: { |
| 241 | + create: 'All', |
| 242 | + get: 'CreatedByUser', |
| 243 | + delete: 'CreatedByUser', |
| 244 | + list: 'CreatedByUser', |
| 245 | + update: 'CreatedByUser', |
| 246 | + }, |
| 247 | + }, |
| 248 | + Step: { |
| 249 | + parentEntityName: 'Recipe', |
| 250 | + properties: { |
| 251 | + instructions: { |
| 252 | + format: 'multiline', |
| 253 | + type: 'string', |
| 254 | + ui: { |
| 255 | + showInDetails: true, |
| 256 | + showInCardList: true, |
| 257 | + showInReadView: true, |
| 258 | + showInTable: true, |
| 259 | + }, |
| 260 | + }, |
| 261 | + stepId: { |
| 262 | + isIdProperty: true, |
| 263 | + type: 'string', |
| 264 | + }, |
| 265 | + stepNumber: { |
| 266 | + type: 'string', |
| 267 | + }, |
| 268 | + }, |
| 269 | + ui: { |
| 270 | + remainOnCurrentPageOnCreate: true, |
| 271 | + generateDetailsPage: false, |
| 272 | + }, |
| 273 | + }, |
| 274 | + Tag: { |
| 275 | + properties: { |
| 276 | + name: { |
| 277 | + isNameProperty: true, |
| 278 | + type: 'string', |
| 279 | + ui: { |
| 280 | + showInDetails: true, |
| 281 | + showInCardList: true, |
| 282 | + showInReadView: true, |
| 283 | + showInTable: true, |
| 284 | + }, |
| 285 | + }, |
| 286 | + tagId: { |
| 287 | + isIdProperty: true, |
| 288 | + type: 'string', |
| 289 | + }, |
| 290 | + }, |
| 291 | + ui: { |
| 292 | + showEditInCardList: true, |
| 293 | + showEditInTable: true, |
| 294 | + listView: 'Table', |
| 295 | + listPagePermission: 'All', |
| 296 | + showInParentDetailsPage: true, |
| 297 | + generateDetailsPage: true, |
| 298 | + }, |
| 299 | + permissions: { |
| 300 | + create: 'Admin', |
| 301 | + get: 'All', |
| 302 | + delete: 'Admin', |
| 303 | + list: 'All', |
| 304 | + update: 'Admin', |
| 305 | + }, |
| 306 | + }, |
| 307 | + }, |
| 308 | + theme: { |
| 309 | + primaryColor: '#579ddd', |
| 310 | + }, |
| 311 | +} |
| 312 | + |
| 313 | +export default appDefinition |
0 commit comments