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