@localazy/strapi-plugin 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/.babelrc +7 -0
  2. package/.eslintrc +7 -0
  3. package/.github/workflows/.build.yml +39 -0
  4. package/.nvmrc +1 -0
  5. package/LICENSE +21 -0
  6. package/README.md +40 -0
  7. package/admin/src/.eslintrc +3 -0
  8. package/admin/src/components/Initializer/index.js +26 -0
  9. package/admin/src/components/PluginIcon/index.js +14 -0
  10. package/admin/src/i18n.js +37 -0
  11. package/admin/src/index.js +106 -0
  12. package/admin/src/modules/@common/components/Icons/Localazy/index.js +12 -0
  13. package/admin/src/modules/@common/components/SideNav/index.js +46 -0
  14. package/admin/src/modules/@common/components/TransferReport/index.js +54 -0
  15. package/admin/src/modules/@common/locale/en.js +13 -0
  16. package/admin/src/modules/@common/services/i18n-service.js +15 -0
  17. package/admin/src/modules/@common/services/project-service.js +15 -0
  18. package/admin/src/modules/@common/services/user-service.js +38 -0
  19. package/admin/src/modules/@common/utils/are-locales-compatible.js +42 -0
  20. package/admin/src/modules/@common/utils/functions/flatten-deep.js +23 -0
  21. package/admin/src/modules/@common/utils/get-default-locale.js +32 -0
  22. package/admin/src/modules/@common/utils/get-header-subtitle.js +21 -0
  23. package/admin/src/modules/@common/utils/get-header-title.js +24 -0
  24. package/admin/src/modules/@common/utils/get-nav.js +35 -0
  25. package/admin/src/modules/@common/utils/history.js +6 -0
  26. package/admin/src/modules/@common/utils/is-plugin-route.js +15 -0
  27. package/admin/src/modules/@common/utils/iso-locales-utils.js +15 -0
  28. package/admin/src/modules/@common/utils/redirect-to-plugin-route.js +22 -0
  29. package/admin/src/modules/@common/utils/sort-by-model-name.js +10 -0
  30. package/admin/src/modules/localazy-download/locale/en.js +20 -0
  31. package/admin/src/modules/localazy-download/services/localazy-download-service.js +16 -0
  32. package/admin/src/modules/localazy-upload/components/ReadDocsButton.js +21 -0
  33. package/admin/src/modules/localazy-upload/locale/en.js +18 -0
  34. package/admin/src/modules/localazy-upload/services/localazy-upload-service.js +16 -0
  35. package/admin/src/modules/login/components/LoginButton/index.js +56 -0
  36. package/admin/src/modules/login/components/LogoutButton/index.js +50 -0
  37. package/admin/src/modules/login/locale/en.js +7 -0
  38. package/admin/src/modules/login/services/localazy-login-service.js +29 -0
  39. package/admin/src/modules/plugin-settings/components/ContentTransferSetup/index.js +292 -0
  40. package/admin/src/modules/plugin-settings/components/Tree/index.js +120 -0
  41. package/admin/src/modules/plugin-settings/components/TreeItem/index.js +48 -0
  42. package/admin/src/modules/plugin-settings/functions/build-content-transfer-setup-schema.js +71 -0
  43. package/admin/src/modules/plugin-settings/functions/has-model-changed.js +85 -0
  44. package/admin/src/modules/plugin-settings/locale/en.js +19 -0
  45. package/admin/src/modules/plugin-settings/services/plugin-settings-service.js +32 -0
  46. package/admin/src/modules/plugin-settings/services/strapi-model-service.js +26 -0
  47. package/admin/src/modules/plugin-settings/utils/__tests__/get-models-tree.test.js +135 -0
  48. package/admin/src/modules/plugin-settings/utils/array-of-models-to-object.js +6 -0
  49. package/admin/src/modules/plugin-settings/utils/find-model-value-by-key.js +8 -0
  50. package/admin/src/modules/plugin-settings/utils/get-filtered-models-schemas.js +34 -0
  51. package/admin/src/modules/plugin-settings/utils/get-models-tree.js +73 -0
  52. package/admin/src/modules/settings/components/OverviewItem/index.js +44 -0
  53. package/admin/src/modules/settings/components/OverviewItemLink/index.js +34 -0
  54. package/admin/src/modules/settings/components/PrerequisitiesInfo/index.js +30 -0
  55. package/admin/src/modules/settings/locale/en.js +13 -0
  56. package/admin/src/modules/user/model/localazy-identity.js +14 -0
  57. package/admin/src/modules/user/services/localazy-user-service.js +38 -0
  58. package/admin/src/pages/App/index.js +152 -0
  59. package/admin/src/pages/Download/index.js +179 -0
  60. package/admin/src/pages/Index/index.js +8 -0
  61. package/admin/src/pages/Login/index.js +94 -0
  62. package/admin/src/pages/PluginSettings/index.js +42 -0
  63. package/admin/src/pages/Settings/index.js +120 -0
  64. package/admin/src/pages/Upload/index.js +187 -0
  65. package/admin/src/pluginId.js +5 -0
  66. package/admin/src/plugins/apolloClient.js +33 -0
  67. package/admin/src/state/localazy-identity.js +29 -0
  68. package/admin/src/tests/fixtures/all-models.js +877 -0
  69. package/admin/src/tests/fixtures/restaurant-model.js +230 -0
  70. package/admin/src/translations/en.json +4 -0
  71. package/admin/src/translations/fr.json +1 -0
  72. package/admin/src/utils/createAxiosInstance.js +52 -0
  73. package/admin/src/utils/getTrad.js +5 -0
  74. package/jest.config.js +0 -0
  75. package/package.json +60 -0
  76. package/server/bootstrap.js +5 -0
  77. package/server/config/development/index.js +15 -0
  78. package/server/config/example/index.js +15 -0
  79. package/server/config/index.js +15 -0
  80. package/server/config/production/index.js +16 -0
  81. package/server/config/schema.graphql.js +21 -0
  82. package/server/content-types/index.js +3 -0
  83. package/server/controllers/index.js +19 -0
  84. package/server/controllers/localazy-auth-controller.js +46 -0
  85. package/server/controllers/localazy-project-controller.js +21 -0
  86. package/server/controllers/localazy-transfer-controller.js +469 -0
  87. package/server/controllers/localazy-user-controller.js +24 -0
  88. package/server/controllers/my-controller.js +10 -0
  89. package/server/controllers/plugin-settings-controller.js +17 -0
  90. package/server/controllers/strapi-controller.js +16 -0
  91. package/server/db/model/content-transfer-setup.js +13 -0
  92. package/server/db/model/localazy-user.js +23 -0
  93. package/server/db/model/utils/get-strapi-store.js +9 -0
  94. package/server/destroy.js +5 -0
  95. package/server/index.js +25 -0
  96. package/server/middlewares/index.js +3 -0
  97. package/server/policies/index.js +3 -0
  98. package/server/register.js +5 -0
  99. package/server/routes/index.js +26 -0
  100. package/server/routes/localazy-auth.js +22 -0
  101. package/server/routes/localazy-project.js +14 -0
  102. package/server/routes/localazy-transfer.js +22 -0
  103. package/server/routes/localazy-user.js +30 -0
  104. package/server/routes/plugin-settings.js +22 -0
  105. package/server/routes/strapi.js +22 -0
  106. package/server/services/index.js +21 -0
  107. package/server/services/localazy-auth-service.js +38 -0
  108. package/server/services/localazy-download-service.js +54 -0
  109. package/server/services/localazy-pubapi-service.js +47 -0
  110. package/server/services/localazy-upload-service.js +95 -0
  111. package/server/services/localazy-user-service.js +29 -0
  112. package/server/services/plugin-settings-service.js +30 -0
  113. package/server/services/strapi-i18n-service.js +132 -0
  114. package/server/services/strapi-service.js +23 -0
  115. package/server/tests/fixtures/all-models-with-multimedia.js +1064 -0
  116. package/server/tests/fixtures/all-models.js +869 -0
  117. package/server/tests/fixtures/collection-flattened.js +76 -0
  118. package/server/tests/fixtures/restaurant-flattened.js +46 -0
  119. package/server/tests/fixtures/restaurant-model.js +230 -0
  120. package/server/tests/fixtures/restaurants-entries.js +152 -0
  121. package/server/tests/fixtures/restaurants-pick-paths.js +15 -0
  122. package/server/tests/fixtures/strapi-book-with-multimedia-components-cs.js +31 -0
  123. package/server/tests/fixtures/stringified-book-cs.js +3 -0
  124. package/server/tests/fixtures/stringified-book-with-multimedia-components-cs.js +3 -0
  125. package/server/tests/fixtures/stringified-restaurant-cs.js +3 -0
  126. package/server/tests/fixtures/stringified-restaurant-de.js +5 -0
  127. package/server/utils/__tests__/build-populate.test.js +85 -0
  128. package/server/utils/__tests__/flatten-object.test.js +171 -0
  129. package/server/utils/__tests__/get-models-tree.test.js +170 -0
  130. package/server/utils/__tests__/parsed-localazy-entry-to-create-entry.test.js +153 -0
  131. package/server/utils/__tests__/parsed-localazy-entry-to-update-entry.test.js +172 -0
  132. package/server/utils/__tests__/pick-entries.test.js +83 -0
  133. package/server/utils/build-populate.js +43 -0
  134. package/server/utils/delay.js +6 -0
  135. package/server/utils/flatten-object.js +52 -0
  136. package/server/utils/get-localazy-api.js +22 -0
  137. package/server/utils/get-main-keys-of-nested-array-objects.js +5 -0
  138. package/server/utils/get-models-tree.js +43 -0
  139. package/server/utils/intl-display-name.js +7 -0
  140. package/server/utils/is-generally-applicable-content-type.js +33 -0
  141. package/server/utils/is-localazy-applicable-content-type.js +36 -0
  142. package/server/utils/iso-locales-utils.js +22 -0
  143. package/server/utils/objectivise-entry.js +41 -0
  144. package/server/utils/omit-deep.js +17 -0
  145. package/server/utils/parsed-localazy-entry-to-create-entry.js +115 -0
  146. package/server/utils/parsed-localazy-entry-to-update-entry.js +31 -0
  147. package/server/utils/pick-entries.js +14 -0
  148. package/server/utils/transfer-setup-utils.js +39 -0
  149. package/strapi-admin.js +14 -0
  150. package/strapi-server.js +5 -0
@@ -0,0 +1,877 @@
1
+ module.exports = [
2
+ {
3
+ kind: "singleType",
4
+ collectionName: "tokens",
5
+ info: {
6
+ singularName: "token",
7
+ pluralName: "tokens",
8
+ displayName: "Token",
9
+ },
10
+ options: {
11
+ draftAndPublish: false,
12
+ },
13
+ pluginOptions: {},
14
+ attributes: {
15
+ access_token: {
16
+ type: "string",
17
+ },
18
+ createdAt: {
19
+ type: "datetime",
20
+ },
21
+ updatedAt: {
22
+ type: "datetime",
23
+ },
24
+ createdBy: {
25
+ type: "relation",
26
+ relation: "oneToOne",
27
+ target: "admin::user",
28
+ configurable: false,
29
+ writable: false,
30
+ visible: false,
31
+ useJoinTable: false,
32
+ private: true,
33
+ },
34
+ updatedBy: {
35
+ type: "relation",
36
+ relation: "oneToOne",
37
+ target: "admin::user",
38
+ configurable: false,
39
+ writable: false,
40
+ visible: false,
41
+ useJoinTable: false,
42
+ private: true,
43
+ },
44
+ },
45
+ __schema__: {
46
+ collectionName: "tokens",
47
+ info: {
48
+ singularName: "token",
49
+ pluralName: "tokens",
50
+ displayName: "Token",
51
+ },
52
+ options: {
53
+ draftAndPublish: false,
54
+ },
55
+ pluginOptions: {},
56
+ attributes: {
57
+ access_token: {
58
+ type: "string",
59
+ },
60
+ },
61
+ kind: "singleType",
62
+ },
63
+ modelType: "contentType",
64
+ modelName: "token",
65
+ connection: "default",
66
+ uid: "plugin::localazy.token",
67
+ plugin: "localazy",
68
+ globalId: "LocalazyToken",
69
+ actions: undefined,
70
+ lifecycles: undefined,
71
+ singularName: "token",
72
+ tableName: "tokens",
73
+ },
74
+ {
75
+ kind: "singleType",
76
+ collectionName: "testtokens",
77
+ info: {
78
+ singularName: "testtoken",
79
+ pluralName: "testtokens",
80
+ displayName: "testtoken",
81
+ },
82
+ options: {
83
+ draftAndPublish: true,
84
+ comment: "",
85
+ },
86
+ attributes: {
87
+ at: {
88
+ type: "string",
89
+ },
90
+ createdAt: {
91
+ type: "datetime",
92
+ },
93
+ updatedAt: {
94
+ type: "datetime",
95
+ },
96
+ publishedAt: {
97
+ type: "datetime",
98
+ configurable: false,
99
+ writable: true,
100
+ visible: false,
101
+ },
102
+ createdBy: {
103
+ type: "relation",
104
+ relation: "oneToOne",
105
+ target: "admin::user",
106
+ configurable: false,
107
+ writable: false,
108
+ visible: false,
109
+ useJoinTable: false,
110
+ private: true,
111
+ },
112
+ updatedBy: {
113
+ type: "relation",
114
+ relation: "oneToOne",
115
+ target: "admin::user",
116
+ configurable: false,
117
+ writable: false,
118
+ visible: false,
119
+ useJoinTable: false,
120
+ private: true,
121
+ },
122
+ },
123
+ __schema__: {
124
+ collectionName: "testtokens",
125
+ info: {
126
+ singularName: "testtoken",
127
+ pluralName: "testtokens",
128
+ displayName: "testtoken",
129
+ },
130
+ options: {
131
+ draftAndPublish: true,
132
+ comment: "",
133
+ },
134
+ attributes: {
135
+ at: {
136
+ type: "string",
137
+ },
138
+ },
139
+ kind: "singleType",
140
+ },
141
+ modelType: "contentType",
142
+ modelName: "testtoken",
143
+ connection: "default",
144
+ uid: "plugin::localazy.testtoken",
145
+ plugin: "localazy",
146
+ globalId: "LocalazyTesttoken",
147
+ actions: undefined,
148
+ lifecycles: undefined,
149
+ singularName: "testtoken",
150
+ tableName: "testtokens",
151
+ },
152
+ {
153
+ collectionName: "up_users",
154
+ info: {
155
+ name: "user",
156
+ description: "",
157
+ singularName: "user",
158
+ pluralName: "users",
159
+ displayName: "User",
160
+ },
161
+ options: {
162
+ draftAndPublish: false,
163
+ timestamps: true,
164
+ },
165
+ attributes: {
166
+ username: {
167
+ type: "string",
168
+ minLength: 3,
169
+ unique: true,
170
+ configurable: false,
171
+ required: true,
172
+ },
173
+ email: {
174
+ type: "email",
175
+ minLength: 6,
176
+ configurable: false,
177
+ required: true,
178
+ },
179
+ provider: {
180
+ type: "string",
181
+ configurable: false,
182
+ },
183
+ password: {
184
+ type: "password",
185
+ minLength: 6,
186
+ configurable: false,
187
+ private: true,
188
+ },
189
+ resetPasswordToken: {
190
+ type: "string",
191
+ configurable: false,
192
+ private: true,
193
+ },
194
+ confirmationToken: {
195
+ type: "string",
196
+ configurable: false,
197
+ private: true,
198
+ },
199
+ confirmed: {
200
+ type: "boolean",
201
+ default: false,
202
+ configurable: false,
203
+ },
204
+ blocked: {
205
+ type: "boolean",
206
+ default: false,
207
+ configurable: false,
208
+ },
209
+ role: {
210
+ type: "relation",
211
+ relation: "manyToOne",
212
+ target: "plugin::users-permissions.role",
213
+ inversedBy: "users",
214
+ configurable: false,
215
+ },
216
+ createdAt: {
217
+ type: "datetime",
218
+ },
219
+ updatedAt: {
220
+ type: "datetime",
221
+ },
222
+ createdBy: {
223
+ type: "relation",
224
+ relation: "oneToOne",
225
+ target: "admin::user",
226
+ configurable: false,
227
+ writable: false,
228
+ visible: false,
229
+ useJoinTable: false,
230
+ private: true,
231
+ },
232
+ updatedBy: {
233
+ type: "relation",
234
+ relation: "oneToOne",
235
+ target: "admin::user",
236
+ configurable: false,
237
+ writable: false,
238
+ visible: false,
239
+ useJoinTable: false,
240
+ private: true,
241
+ },
242
+ },
243
+ config: {
244
+ attributes: {
245
+ resetPasswordToken: {
246
+ hidden: true,
247
+ },
248
+ confirmationToken: {
249
+ hidden: true,
250
+ },
251
+ provider: {
252
+ hidden: true,
253
+ },
254
+ },
255
+ },
256
+ kind: "collectionType",
257
+ __schema__: {
258
+ collectionName: "up_users",
259
+ info: {
260
+ name: "user",
261
+ description: "",
262
+ singularName: "user",
263
+ pluralName: "users",
264
+ displayName: "User",
265
+ },
266
+ options: {
267
+ draftAndPublish: false,
268
+ timestamps: true,
269
+ },
270
+ attributes: {
271
+ username: {
272
+ type: "string",
273
+ minLength: 3,
274
+ unique: true,
275
+ configurable: false,
276
+ required: true,
277
+ },
278
+ email: {
279
+ type: "email",
280
+ minLength: 6,
281
+ configurable: false,
282
+ required: true,
283
+ },
284
+ provider: {
285
+ type: "string",
286
+ configurable: false,
287
+ },
288
+ password: {
289
+ type: "password",
290
+ minLength: 6,
291
+ configurable: false,
292
+ private: true,
293
+ },
294
+ resetPasswordToken: {
295
+ type: "string",
296
+ configurable: false,
297
+ private: true,
298
+ },
299
+ confirmationToken: {
300
+ type: "string",
301
+ configurable: false,
302
+ private: true,
303
+ },
304
+ confirmed: {
305
+ type: "boolean",
306
+ default: false,
307
+ configurable: false,
308
+ },
309
+ blocked: {
310
+ type: "boolean",
311
+ default: false,
312
+ configurable: false,
313
+ },
314
+ role: {
315
+ type: "relation",
316
+ relation: "manyToOne",
317
+ target: "plugin::users-permissions.role",
318
+ inversedBy: "users",
319
+ configurable: false,
320
+ },
321
+ },
322
+ kind: "collectionType",
323
+ },
324
+ modelType: "contentType",
325
+ modelName: "user",
326
+ connection: "default",
327
+ uid: "plugin::users-permissions.user",
328
+ plugin: "users-permissions",
329
+ globalId: "UsersPermissionsUser",
330
+ actions: undefined,
331
+ lifecycles: undefined,
332
+ singularName: "user",
333
+ tableName: "up_users",
334
+ },
335
+ {
336
+ kind: "collectionType",
337
+ collectionName: "books",
338
+ info: {
339
+ singularName: "book",
340
+ pluralName: "books",
341
+ displayName: "Book",
342
+ description: "",
343
+ },
344
+ options: {
345
+ draftAndPublish: true,
346
+ },
347
+ pluginOptions: {},
348
+ attributes: {
349
+ Title: {
350
+ type: "string",
351
+ },
352
+ Author: {
353
+ type: "string",
354
+ },
355
+ Pages: {
356
+ type: "integer",
357
+ },
358
+ additional_info: {
359
+ type: "component",
360
+ repeatable: false,
361
+ pluginOptions: {
362
+ i18n: {
363
+ localized: true,
364
+ },
365
+ },
366
+ component: "food.pub-component-1",
367
+ },
368
+ createdAt: {
369
+ type: "datetime",
370
+ },
371
+ updatedAt: {
372
+ type: "datetime",
373
+ },
374
+ publishedAt: {
375
+ type: "datetime",
376
+ configurable: false,
377
+ writable: true,
378
+ visible: false,
379
+ },
380
+ createdBy: {
381
+ type: "relation",
382
+ relation: "oneToOne",
383
+ target: "admin::user",
384
+ configurable: false,
385
+ writable: false,
386
+ visible: false,
387
+ useJoinTable: false,
388
+ private: true,
389
+ },
390
+ updatedBy: {
391
+ type: "relation",
392
+ relation: "oneToOne",
393
+ target: "admin::user",
394
+ configurable: false,
395
+ writable: false,
396
+ visible: false,
397
+ useJoinTable: false,
398
+ private: true,
399
+ },
400
+ },
401
+ __schema__: {
402
+ collectionName: "books",
403
+ info: {
404
+ singularName: "book",
405
+ pluralName: "books",
406
+ displayName: "Book",
407
+ description: "",
408
+ },
409
+ options: {
410
+ draftAndPublish: true,
411
+ },
412
+ pluginOptions: {},
413
+ attributes: {
414
+ Title: {
415
+ pluginOptions: {
416
+ i18n: {
417
+ localized: true,
418
+ },
419
+ },
420
+ type: "string",
421
+ },
422
+ Author: {
423
+ type: "string",
424
+ },
425
+ Pages: {
426
+ type: "integer",
427
+ },
428
+ additional_info: {
429
+ type: "component",
430
+ repeatable: false,
431
+ component: "food.pub-component-1",
432
+ },
433
+ },
434
+ kind: "collectionType",
435
+ },
436
+ modelType: "contentType",
437
+ modelName: "book",
438
+ connection: "default",
439
+ uid: "api::book.book",
440
+ apiName: "book",
441
+ globalId: "Book",
442
+ actions: {},
443
+ lifecycles: {},
444
+ singularName: "book",
445
+ tableName: "books",
446
+ },
447
+ {
448
+ kind: "collectionType",
449
+ collectionName: "restaurants",
450
+ info: {
451
+ singularName: "restaurant",
452
+ pluralName: "restaurants",
453
+ displayName: "Restaurant",
454
+ description: "",
455
+ },
456
+ options: {
457
+ draftAndPublish: true,
458
+ },
459
+ pluginOptions: {
460
+ i18n: {
461
+ localized: true,
462
+ },
463
+ },
464
+ attributes: {
465
+ title: {
466
+ pluginOptions: {
467
+ i18n: {
468
+ localized: true,
469
+ },
470
+ },
471
+ type: "string",
472
+ required: true,
473
+ },
474
+ description: {
475
+ pluginOptions: {
476
+ i18n: {
477
+ localized: true,
478
+ },
479
+ },
480
+ type: "text",
481
+ },
482
+ books: {
483
+ type: "relation",
484
+ relation: "oneToMany",
485
+ target: "api::book.book",
486
+ },
487
+ recipes: {
488
+ type: "component",
489
+ repeatable: true,
490
+ pluginOptions: {
491
+ i18n: {
492
+ localized: true,
493
+ },
494
+ },
495
+ component: "food.recipe",
496
+ },
497
+ descs: {
498
+ type: "component",
499
+ repeatable: false,
500
+ pluginOptions: {
501
+ i18n: {
502
+ localized: true,
503
+ },
504
+ },
505
+ component: "food.pub-component-1",
506
+ },
507
+ street: {
508
+ pluginOptions: {
509
+ i18n: {
510
+ localized: true,
511
+ },
512
+ },
513
+ type: "string",
514
+ },
515
+ city: {
516
+ pluginOptions: {
517
+ i18n: {
518
+ localized: true,
519
+ },
520
+ },
521
+ type: "string",
522
+ },
523
+ country: {
524
+ pluginOptions: {
525
+ i18n: {
526
+ localized: true,
527
+ },
528
+ },
529
+ type: "string",
530
+ },
531
+ createdAt: {
532
+ type: "datetime",
533
+ },
534
+ updatedAt: {
535
+ type: "datetime",
536
+ },
537
+ publishedAt: {
538
+ type: "datetime",
539
+ configurable: false,
540
+ writable: true,
541
+ visible: false,
542
+ },
543
+ createdBy: {
544
+ type: "relation",
545
+ relation: "oneToOne",
546
+ target: "admin::user",
547
+ configurable: false,
548
+ writable: false,
549
+ visible: false,
550
+ useJoinTable: false,
551
+ private: true,
552
+ },
553
+ updatedBy: {
554
+ type: "relation",
555
+ relation: "oneToOne",
556
+ target: "admin::user",
557
+ configurable: false,
558
+ writable: false,
559
+ visible: false,
560
+ useJoinTable: false,
561
+ private: true,
562
+ },
563
+ localizations: {
564
+ writable: true,
565
+ private: false,
566
+ configurable: false,
567
+ visible: false,
568
+ type: "relation",
569
+ relation: "oneToMany",
570
+ target: "api::restaurant.restaurant",
571
+ },
572
+ locale: {
573
+ writable: true,
574
+ private: false,
575
+ configurable: false,
576
+ visible: false,
577
+ type: "string",
578
+ },
579
+ },
580
+ __schema__: {
581
+ collectionName: "restaurants",
582
+ info: {
583
+ singularName: "restaurant",
584
+ pluralName: "restaurants",
585
+ displayName: "Restaurant",
586
+ description: "",
587
+ },
588
+ options: {
589
+ draftAndPublish: true,
590
+ },
591
+ pluginOptions: {
592
+ i18n: {
593
+ localized: true,
594
+ },
595
+ },
596
+ attributes: {
597
+ title: {
598
+ pluginOptions: {
599
+ i18n: {
600
+ localized: true,
601
+ },
602
+ },
603
+ type: "string",
604
+ required: true,
605
+ },
606
+ description: {
607
+ pluginOptions: {
608
+ i18n: {
609
+ localized: true,
610
+ },
611
+ },
612
+ type: "text",
613
+ },
614
+ books: {
615
+ type: "relation",
616
+ relation: "oneToMany",
617
+ target: "api::book.book",
618
+ },
619
+ recipes: {
620
+ type: "component",
621
+ repeatable: true,
622
+ pluginOptions: {
623
+ i18n: {
624
+ localized: true,
625
+ },
626
+ },
627
+ component: "food.recipe",
628
+ },
629
+ descs: {
630
+ type: "component",
631
+ repeatable: false,
632
+ pluginOptions: {
633
+ i18n: {
634
+ localized: true,
635
+ },
636
+ },
637
+ component: "food.pub-component-1",
638
+ },
639
+ street: {
640
+ pluginOptions: {
641
+ i18n: {
642
+ localized: true,
643
+ },
644
+ },
645
+ type: "string",
646
+ },
647
+ city: {
648
+ pluginOptions: {
649
+ i18n: {
650
+ localized: true,
651
+ },
652
+ },
653
+ type: "string",
654
+ },
655
+ country: {
656
+ pluginOptions: {
657
+ i18n: {
658
+ localized: true,
659
+ },
660
+ },
661
+ type: "string",
662
+ },
663
+ },
664
+ kind: "collectionType",
665
+ },
666
+ modelType: "contentType",
667
+ modelName: "restaurant",
668
+ connection: "default",
669
+ uid: "api::restaurant.restaurant",
670
+ apiName: "restaurant",
671
+ globalId: "Restaurant",
672
+ actions: {},
673
+ lifecycles: {},
674
+ singularName: "restaurant",
675
+ tableName: "restaurants",
676
+ },
677
+ {
678
+ collectionName: "components_food_ingredient_variants",
679
+ info: {
680
+ displayName: "ingredient_variants",
681
+ icon: "atlas",
682
+ },
683
+ options: {},
684
+ attributes: {
685
+ name: {
686
+ type: "string",
687
+ },
688
+ },
689
+ __filename__: "ingredient-variants.json",
690
+ __schema__: {
691
+ collectionName: "components_food_ingredient_variants",
692
+ info: {
693
+ displayName: "ingredient_variants",
694
+ icon: "atlas",
695
+ },
696
+ options: {},
697
+ attributes: {
698
+ name: {
699
+ type: "string",
700
+ },
701
+ },
702
+ __filename__: "ingredient-variants.json",
703
+ },
704
+ uid: "food.ingredient-variants",
705
+ category: "food",
706
+ modelType: "component",
707
+ modelName: "ingredient-variants",
708
+ globalId: "ComponentFoodIngredientVariants",
709
+ singularName: "ingredient-variants",
710
+ tableName: "components_food_ingredient_variants",
711
+ },
712
+ {
713
+ collectionName: "components_food_ingredients",
714
+ info: {
715
+ displayName: "ingredients",
716
+ icon: "atom",
717
+ description: "",
718
+ },
719
+ options: {},
720
+ attributes: {
721
+ name: {
722
+ type: "string",
723
+ },
724
+ pcs: {
725
+ type: "integer",
726
+ },
727
+ required: {
728
+ type: "boolean",
729
+ },
730
+ },
731
+ __filename__: "ingredients.json",
732
+ __schema__: {
733
+ collectionName: "components_food_ingredients",
734
+ info: {
735
+ displayName: "ingredients",
736
+ icon: "atom",
737
+ description: "",
738
+ },
739
+ options: {},
740
+ attributes: {
741
+ name: {
742
+ type: "string",
743
+ },
744
+ pcs: {
745
+ type: "integer",
746
+ },
747
+ required: {
748
+ type: "boolean",
749
+ },
750
+ },
751
+ __filename__: "ingredients.json",
752
+ },
753
+ uid: "food.ingredients",
754
+ category: "food",
755
+ modelType: "component",
756
+ modelName: "ingredients",
757
+ globalId: "ComponentFoodIngredients",
758
+ singularName: "ingredients",
759
+ tableName: "components_food_ingredients",
760
+ },
761
+ {
762
+ collectionName: "components_food_pub_component_1s",
763
+ info: {
764
+ displayName: "Pub Component 1",
765
+ icon: "american-sign-language-interpreting",
766
+ description: "",
767
+ },
768
+ options: {},
769
+ attributes: {
770
+ rich_description: {
771
+ type: "richtext",
772
+ },
773
+ history: {
774
+ type: "text",
775
+ },
776
+ excerpt: {
777
+ type: "string",
778
+ },
779
+ test_variants: {
780
+ type: "component",
781
+ repeatable: false,
782
+ component: "food.ingredient-variants",
783
+ },
784
+ },
785
+ __filename__: "pub-component-1.json",
786
+ __schema__: {
787
+ collectionName: "components_food_pub_component_1s",
788
+ info: {
789
+ displayName: "Pub Component 1",
790
+ icon: "american-sign-language-interpreting",
791
+ description: "",
792
+ },
793
+ options: {},
794
+ attributes: {
795
+ rich_description: {
796
+ type: "richtext",
797
+ },
798
+ history: {
799
+ type: "text",
800
+ },
801
+ excerpt: {
802
+ type: "string",
803
+ },
804
+ test_variants: {
805
+ type: "component",
806
+ repeatable: false,
807
+ component: "food.ingredient-variants",
808
+ },
809
+ },
810
+ __filename__: "pub-component-1.json",
811
+ },
812
+ uid: "food.pub-component-1",
813
+ category: "food",
814
+ modelType: "component",
815
+ modelName: "pub-component-1",
816
+ globalId: "ComponentFoodPubComponent1",
817
+ singularName: "pub-component-1",
818
+ tableName: "components_food_pub_component_1s",
819
+ },
820
+ {
821
+ collectionName: "components_food_recipes",
822
+ info: {
823
+ displayName: "recipe",
824
+ icon: "ad",
825
+ description: "",
826
+ },
827
+ options: {},
828
+ attributes: {
829
+ name: {
830
+ type: "string",
831
+ },
832
+ ingredients: {
833
+ type: "component",
834
+ repeatable: true,
835
+ component: "food.ingredients",
836
+ },
837
+ variants: {
838
+ type: "component",
839
+ repeatable: false,
840
+ component: "food.ingredient-variants",
841
+ },
842
+ },
843
+ __filename__: "recipe.json",
844
+ __schema__: {
845
+ collectionName: "components_food_recipes",
846
+ info: {
847
+ displayName: "recipe",
848
+ icon: "ad",
849
+ description: "",
850
+ },
851
+ options: {},
852
+ attributes: {
853
+ name: {
854
+ type: "string",
855
+ },
856
+ ingredients: {
857
+ type: "component",
858
+ repeatable: true,
859
+ component: "food.ingredients",
860
+ },
861
+ variants: {
862
+ type: "component",
863
+ repeatable: false,
864
+ component: "food.ingredient-variants",
865
+ },
866
+ },
867
+ __filename__: "recipe.json",
868
+ },
869
+ uid: "food.recipe",
870
+ category: "food",
871
+ modelType: "component",
872
+ modelName: "recipe",
873
+ globalId: "ComponentFoodRecipe",
874
+ singularName: "recipe",
875
+ tableName: "components_food_recipes",
876
+ },
877
+ ];