@localazy/strapi-plugin 0.1.10 → 0.1.11-rc.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 (42) hide show
  1. package/.eslintrc +6 -2
  2. package/admin/src/modules/@common/models/supported-content-type-fields.js +8 -0
  3. package/admin/src/modules/plugin-settings/components/Tree/index.js +2 -0
  4. package/admin/src/modules/plugin-settings/utils/get-filtered-models-schemas.js +4 -4
  5. package/admin/src/modules/plugin-settings/utils/get-models-tree.js +3 -1
  6. package/package.json +1 -1
  7. package/server/bootstrap.js +15 -1
  8. package/server/controllers/localazy-transfer-controller.js +41 -46
  9. package/server/functions/should-set-downloaded-property.js +16 -0
  10. package/server/models/supported-content-type-fields.js +8 -0
  11. package/server/services/index.js +2 -0
  12. package/server/services/strapi-i18n-service.js +4 -3
  13. package/server/services/strapi-localazy-i18n-service.js +104 -0
  14. package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-cookbook.js +5761 -0
  15. package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-restaurant-simple-menu.js +536 -0
  16. package/server/tests/fixtures/parsed-localazy-entry-to-update-entry.js +35157 -0
  17. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-cookbook-empty-recipes.js +202 -0
  18. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-cookbook.js +2700 -0
  19. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-flat-simple.js +47 -0
  20. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-flat-with-media.js +169 -0
  21. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-menu-empty.js +3003 -0
  22. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-menu-with-media.js +2057 -0
  23. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-sample-json.js +46 -0
  24. package/server/tests/fixtures/{all-models-with-multimedia.js → strapi-plugin-all-models.js} +717 -540
  25. package/server/utils/__tests__/get-models-tree.test.js +1 -1
  26. package/server/utils/__tests__/parsed-localazy-entry-to-create-entry.test.js +90 -93
  27. package/server/utils/__tests__/parsed-localazy-entry-to-update-entry.test.js +417 -101
  28. package/server/utils/__tests__/populate-create-update-entry-with-base-entry.test.js +852 -0
  29. package/server/utils/get-full-populate-object.js +56 -0
  30. package/server/utils/get-models-tree.js +3 -1
  31. package/server/utils/model-utils.js +38 -0
  32. package/server/utils/parsed-localazy-entry-to-create-entry.js +1 -18
  33. package/server/utils/parsed-localazy-entry-to-update-entry.js +38 -3
  34. package/server/utils/populate-create-update-entry-with-base-entry.js +222 -0
  35. package/server/utils/transfer-setup-utils.js +14 -0
  36. package/server/tests/fixtures/restaurant-model.js +0 -230
  37. package/server/tests/fixtures/restaurants-entries.js +0 -152
  38. package/server/tests/fixtures/strapi-book-with-multimedia-components-cs.js +0 -31
  39. package/server/tests/fixtures/stringified-book-cs.js +0 -3
  40. package/server/tests/fixtures/stringified-book-with-multimedia-components-cs.js +0 -3
  41. package/server/tests/fixtures/stringified-restaurant-cs.js +0 -3
  42. package/server/tests/fixtures/stringified-restaurant-de.js +0 -5
@@ -1,117 +1,433 @@
1
1
  "use strict";
2
2
 
3
3
  const parsedLocalazyEntryToUpdateEntry = require("../parsed-localazy-entry-to-update-entry");
4
- const allModelsWithMultimedia = require("../../tests/fixtures/all-models-with-multimedia");
5
- const allModels = require("../../tests/fixtures/all-models");
6
- const stringifiedBookCs = require("../../tests/fixtures/stringified-book-with-multimedia-components-cs");
7
- const stringifiedRestaurantDe = require("../../tests/fixtures/stringified-restaurant-de");
8
- const currentBookEntry = require("../../tests/fixtures/strapi-book-with-multimedia-components-cs");
9
- const restaurantsEntries = require("../../tests/fixtures/restaurants-entries");
4
+ const allModels = require("../../tests/fixtures/strapi-plugin-all-models");
5
+ const {
6
+ localazyEntry,
7
+ fullyPopulatedLocalizedEntry,
8
+ currentEntry,
9
+ baseEntry,
10
+ uid,
11
+ locale,
12
+ } = require("../../tests/fixtures/parsed-localazy-entry-to-update-entry");
10
13
 
11
14
  describe("parsed-localazy-entry-to-update-entry.js", () => {
12
- it("should return transformed book entry to strapi update entry structure", () => {
13
- // SETUP
14
- const uid = "api::book.book";
15
- const entry = JSON.parse(stringifiedBookCs);
16
-
15
+ it("should return transformed 'cookbook' entry to strapi update entry structure", async () => {
17
16
  // EXECUTE
18
- const result = parsedLocalazyEntryToUpdateEntry(
19
- JSON.parse("[{\"kind\":\"singleType\",\"collectionName\":\"a_first_positioned_some_test_single_types\",\"info\":{\"singularName\":\"a-first-positioned-some-test-single-type\",\"pluralName\":\"a-first-positioned-some-test-single-types\",\"displayName\":\"a_first_positioned_some_test_single_type\"},\"options\":{\"draftAndPublish\":true},\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"attributes\":{\"label\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"},\"createdAt\":{\"type\":\"datetime\"},\"updatedAt\":{\"type\":\"datetime\"},\"publishedAt\":{\"type\":\"datetime\",\"configurable\":false,\"writable\":true,\"visible\":false},\"createdBy\":{\"type\":\"relation\",\"relation\":\"oneToOne\",\"target\":\"admin::user\",\"configurable\":false,\"writable\":false,\"visible\":false,\"useJoinTable\":false,\"private\":true},\"updatedBy\":{\"type\":\"relation\",\"relation\":\"oneToOne\",\"target\":\"admin::user\",\"configurable\":false,\"writable\":false,\"visible\":false,\"useJoinTable\":false,\"private\":true},\"localizations\":{\"writable\":true,\"private\":false,\"configurable\":false,\"visible\":false,\"type\":\"relation\",\"relation\":\"oneToMany\",\"target\":\"api::a-first-positioned-some-test-single-type.a-first-positioned-some-test-single-type\"},\"locale\":{\"writable\":true,\"private\":false,\"configurable\":false,\"visible\":false,\"type\":\"string\"}},\"__schema__\":{\"collectionName\":\"a_first_positioned_some_test_single_types\",\"info\":{\"singularName\":\"a-first-positioned-some-test-single-type\",\"pluralName\":\"a-first-positioned-some-test-single-types\",\"displayName\":\"a_first_positioned_some_test_single_type\"},\"options\":{\"draftAndPublish\":true},\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"attributes\":{\"label\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"}},\"kind\":\"singleType\"},\"modelType\":\"contentType\",\"modelName\":\"a-first-positioned-some-test-single-type\",\"connection\":\"default\",\"uid\":\"api::a-first-positioned-some-test-single-type.a-first-positioned-some-test-single-type\",\"apiName\":\"a-first-positioned-some-test-single-type\",\"globalId\":\"AFirstPositionedSomeTestSingleType\",\"actions\":{},\"lifecycles\":{},\"singularName\":\"a-first-positioned-some-test-single-type\",\"tableName\":\"a_first_positioned_some_test_single_types\"},{\"kind\":\"collectionType\",\"collectionName\":\"books\",\"info\":{\"singularName\":\"book\",\"pluralName\":\"books\",\"displayName\":\"Book\",\"description\":\"\"},\"options\":{\"draftAndPublish\":true},\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"attributes\":{\"Title\":{\"type\":\"string\",\"pluginOptions\":{\"i18n\":{\"localized\":true}}},\"Author\":{\"type\":\"string\",\"pluginOptions\":{\"i18n\":{\"localized\":true}}},\"Pages\":{\"type\":\"integer\",\"pluginOptions\":{\"i18n\":{\"localized\":true}}},\"additional_info\":{\"type\":\"component\",\"repeatable\":false,\"component\":\"food.pub-component-1\",\"pluginOptions\":{\"i18n\":{\"localized\":true}}},\"cover\":{\"type\":\"relation\",\"relation\":\"morphOne\",\"target\":\"plugin::upload.file\",\"morphBy\":\"related\"},\"presentations\":{\"type\":\"relation\",\"relation\":\"morphMany\",\"target\":\"plugin::upload.file\",\"morphBy\":\"related\"},\"seo_setup\":{\"type\":\"component\",\"repeatable\":true,\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"component\":\"seo.gallery\"},\"non_localizable_name\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"},\"createdAt\":{\"type\":\"datetime\"},\"updatedAt\":{\"type\":\"datetime\"},\"publishedAt\":{\"type\":\"datetime\",\"configurable\":false,\"writable\":true,\"visible\":false},\"createdBy\":{\"type\":\"relation\",\"relation\":\"oneToOne\",\"target\":\"admin::user\",\"configurable\":false,\"writable\":false,\"visible\":false,\"useJoinTable\":false,\"private\":true},\"updatedBy\":{\"type\":\"relation\",\"relation\":\"oneToOne\",\"target\":\"admin::user\",\"configurable\":false,\"writable\":false,\"visible\":false,\"useJoinTable\":false,\"private\":true},\"localizations\":{\"writable\":true,\"private\":false,\"configurable\":false,\"visible\":false,\"type\":\"relation\",\"relation\":\"oneToMany\",\"target\":\"api::book.book\"},\"locale\":{\"writable\":true,\"private\":false,\"configurable\":false,\"visible\":false,\"type\":\"string\"}},\"__schema__\":{\"collectionName\":\"books\",\"info\":{\"singularName\":\"book\",\"pluralName\":\"books\",\"displayName\":\"Book\",\"description\":\"\"},\"options\":{\"draftAndPublish\":true},\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"attributes\":{\"Title\":{\"type\":\"string\",\"pluginOptions\":{\"i18n\":{\"localized\":true}}},\"Author\":{\"type\":\"string\",\"pluginOptions\":{\"i18n\":{\"localized\":true}}},\"Pages\":{\"type\":\"integer\",\"pluginOptions\":{\"i18n\":{\"localized\":true}}},\"additional_info\":{\"type\":\"component\",\"repeatable\":false,\"component\":\"food.pub-component-1\",\"pluginOptions\":{\"i18n\":{\"localized\":true}}},\"cover\":{\"type\":\"media\",\"multiple\":false,\"required\":false,\"allowedTypes\":[\"images\",\"files\",\"videos\",\"audios\"],\"pluginOptions\":{\"i18n\":{\"localized\":true}}},\"presentations\":{\"type\":\"media\",\"multiple\":true,\"required\":false,\"allowedTypes\":[\"images\",\"files\",\"videos\",\"audios\"],\"pluginOptions\":{\"i18n\":{\"localized\":true}}},\"seo_setup\":{\"type\":\"component\",\"repeatable\":true,\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"component\":\"seo.gallery\"},\"non_localizable_name\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"}},\"kind\":\"collectionType\"},\"modelType\":\"contentType\",\"modelName\":\"book\",\"connection\":\"default\",\"uid\":\"api::book.book\",\"apiName\":\"book\",\"globalId\":\"Book\",\"actions\":{},\"lifecycles\":{},\"singularName\":\"book\",\"tableName\":\"books\"},{\"kind\":\"collectionType\",\"collectionName\":\"loc_5087s\",\"info\":{\"singularName\":\"loc-5087\",\"pluralName\":\"loc-5087s\",\"displayName\":\"LOC-5087\",\"description\":\"\"},\"options\":{\"draftAndPublish\":true},\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"attributes\":{\"ingredients\":{\"type\":\"component\",\"repeatable\":true,\"component\":\"food.ingredients\",\"pluginOptions\":{\"i18n\":{\"localized\":true}}},\"createdAt\":{\"type\":\"datetime\"},\"updatedAt\":{\"type\":\"datetime\"},\"publishedAt\":{\"type\":\"datetime\",\"configurable\":false,\"writable\":true,\"visible\":false},\"createdBy\":{\"type\":\"relation\",\"relation\":\"oneToOne\",\"target\":\"admin::user\",\"configurable\":false,\"writable\":false,\"visible\":false,\"useJoinTable\":false,\"private\":true},\"updatedBy\":{\"type\":\"relation\",\"relation\":\"oneToOne\",\"target\":\"admin::user\",\"configurable\":false,\"writable\":false,\"visible\":false,\"useJoinTable\":false,\"private\":true},\"localizations\":{\"writable\":true,\"private\":false,\"configurable\":false,\"visible\":false,\"type\":\"relation\",\"relation\":\"oneToMany\",\"target\":\"api::loc-5087.loc-5087\"},\"locale\":{\"writable\":true,\"private\":false,\"configurable\":false,\"visible\":false,\"type\":\"string\"}},\"__schema__\":{\"collectionName\":\"loc_5087s\",\"info\":{\"singularName\":\"loc-5087\",\"pluralName\":\"loc-5087s\",\"displayName\":\"LOC-5087\",\"description\":\"\"},\"options\":{\"draftAndPublish\":true},\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"attributes\":{\"ingredients\":{\"type\":\"component\",\"repeatable\":true,\"component\":\"food.ingredients\",\"pluginOptions\":{\"i18n\":{\"localized\":true}}}},\"kind\":\"collectionType\"},\"modelType\":\"contentType\",\"modelName\":\"loc-5087\",\"connection\":\"default\",\"uid\":\"api::loc-5087.loc-5087\",\"apiName\":\"loc-5087\",\"globalId\":\"Loc5087\",\"actions\":{},\"lifecycles\":{},\"singularName\":\"loc-5087\",\"tableName\":\"loc_5087s\"},{\"kind\":\"collectionType\",\"collectionName\":\"restaurants\",\"info\":{\"singularName\":\"restaurant\",\"pluralName\":\"restaurants\",\"displayName\":\"Restaurant\",\"description\":\"\"},\"options\":{\"draftAndPublish\":true},\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"attributes\":{\"title\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\",\"required\":true},\"description\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"text\"},\"books\":{\"type\":\"relation\",\"relation\":\"oneToMany\",\"target\":\"api::book.book\"},\"recipes\":{\"type\":\"component\",\"repeatable\":true,\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"component\":\"food.recipe\"},\"descs\":{\"type\":\"component\",\"repeatable\":false,\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"component\":\"food.pub-component-1\"},\"street\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"},\"city\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"},\"country\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"},\"Motto\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"},\"motto_2\":{\"pluginOptions\":{\"i18n\":{\"localized\":false}},\"type\":\"string\"},\"title_2\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"},\"createdAt\":{\"type\":\"datetime\"},\"updatedAt\":{\"type\":\"datetime\"},\"publishedAt\":{\"type\":\"datetime\",\"configurable\":false,\"writable\":true,\"visible\":false},\"createdBy\":{\"type\":\"relation\",\"relation\":\"oneToOne\",\"target\":\"admin::user\",\"configurable\":false,\"writable\":false,\"visible\":false,\"useJoinTable\":false,\"private\":true},\"updatedBy\":{\"type\":\"relation\",\"relation\":\"oneToOne\",\"target\":\"admin::user\",\"configurable\":false,\"writable\":false,\"visible\":false,\"useJoinTable\":false,\"private\":true},\"localizations\":{\"writable\":true,\"private\":false,\"configurable\":false,\"visible\":false,\"type\":\"relation\",\"relation\":\"oneToMany\",\"target\":\"api::restaurant.restaurant\"},\"locale\":{\"writable\":true,\"private\":false,\"configurable\":false,\"visible\":false,\"type\":\"string\"}},\"__schema__\":{\"collectionName\":\"restaurants\",\"info\":{\"singularName\":\"restaurant\",\"pluralName\":\"restaurants\",\"displayName\":\"Restaurant\",\"description\":\"\"},\"options\":{\"draftAndPublish\":true},\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"attributes\":{\"title\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\",\"required\":true},\"description\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"text\"},\"books\":{\"type\":\"relation\",\"relation\":\"oneToMany\",\"target\":\"api::book.book\"},\"recipes\":{\"type\":\"component\",\"repeatable\":true,\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"component\":\"food.recipe\"},\"descs\":{\"type\":\"component\",\"repeatable\":false,\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"component\":\"food.pub-component-1\"},\"street\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"},\"city\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"},\"country\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"},\"Motto\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"},\"motto_2\":{\"pluginOptions\":{\"i18n\":{\"localized\":false}},\"type\":\"string\"},\"title_2\":{\"pluginOptions\":{\"i18n\":{\"localized\":true}},\"type\":\"string\"}},\"kind\":\"collectionType\"},\"modelType\":\"contentType\",\"modelName\":\"restaurant\",\"connection\":\"default\",\"uid\":\"api::restaurant.restaurant\",\"apiName\":\"restaurant\",\"globalId\":\"Restaurant\",\"actions\":{},\"lifecycles\":{},\"singularName\":\"restaurant\",\"tableName\":\"restaurants\"},{\"collectionName\":\"components_food_ingredient_variants\",\"info\":{\"displayName\":\"ingredient_variants\",\"icon\":\"atlas\"},\"options\":{},\"attributes\":{\"name\":{\"type\":\"string\"}},\"__filename__\":\"ingredient-variants.json\",\"__schema__\":{\"collectionName\":\"components_food_ingredient_variants\",\"info\":{\"displayName\":\"ingredient_variants\",\"icon\":\"atlas\"},\"options\":{},\"attributes\":{\"name\":{\"type\":\"string\"}},\"__filename__\":\"ingredient-variants.json\"},\"uid\":\"food.ingredient-variants\",\"category\":\"food\",\"modelType\":\"component\",\"modelName\":\"ingredient-variants\",\"globalId\":\"ComponentFoodIngredientVariants\",\"singularName\":\"ingredient-variants\",\"tableName\":\"components_food_ingredient_variants\"},{\"collectionName\":\"components_food_ingredients\",\"info\":{\"displayName\":\"ingredients\",\"icon\":\"atom\",\"description\":\"\"},\"options\":{},\"attributes\":{\"name\":{\"type\":\"string\",\"required\":true},\"pcs\":{\"type\":\"integer\"},\"required\":{\"type\":\"boolean\"}},\"__filename__\":\"ingredients.json\",\"__schema__\":{\"collectionName\":\"components_food_ingredients\",\"info\":{\"displayName\":\"ingredients\",\"icon\":\"atom\",\"description\":\"\"},\"options\":{},\"attributes\":{\"name\":{\"type\":\"string\",\"required\":true},\"pcs\":{\"type\":\"integer\"},\"required\":{\"type\":\"boolean\"}},\"__filename__\":\"ingredients.json\"},\"uid\":\"food.ingredients\",\"category\":\"food\",\"modelType\":\"component\",\"modelName\":\"ingredients\",\"globalId\":\"ComponentFoodIngredients\",\"singularName\":\"ingredients\",\"tableName\":\"components_food_ingredients\"},{\"collectionName\":\"components_food_pub_component_1s\",\"info\":{\"displayName\":\"Pub Component 1\",\"icon\":\"american-sign-language-interpreting\",\"description\":\"\"},\"options\":{},\"attributes\":{\"rich_description\":{\"type\":\"richtext\"},\"history\":{\"type\":\"text\"},\"excerpt\":{\"type\":\"string\"},\"test_variants\":{\"type\":\"component\",\"repeatable\":false,\"component\":\"food.ingredient-variants\"}},\"__filename__\":\"pub-component-1.json\",\"__schema__\":{\"collectionName\":\"components_food_pub_component_1s\",\"info\":{\"displayName\":\"Pub Component 1\",\"icon\":\"american-sign-language-interpreting\",\"description\":\"\"},\"options\":{},\"attributes\":{\"rich_description\":{\"type\":\"richtext\"},\"history\":{\"type\":\"text\"},\"excerpt\":{\"type\":\"string\"},\"test_variants\":{\"type\":\"component\",\"repeatable\":false,\"component\":\"food.ingredient-variants\"}},\"__filename__\":\"pub-component-1.json\"},\"uid\":\"food.pub-component-1\",\"category\":\"food\",\"modelType\":\"component\",\"modelName\":\"pub-component-1\",\"globalId\":\"ComponentFoodPubComponent1\",\"singularName\":\"pub-component-1\",\"tableName\":\"components_food_pub_component_1s\"},{\"collectionName\":\"components_food_recipes\",\"info\":{\"displayName\":\"recipe\",\"icon\":\"ad\",\"description\":\"\"},\"options\":{},\"attributes\":{\"name\":{\"type\":\"string\",\"required\":true},\"ingredients\":{\"type\":\"component\",\"repeatable\":true,\"component\":\"food.ingredients\"},\"variants\":{\"type\":\"component\",\"repeatable\":false,\"component\":\"food.ingredient-variants\"}},\"__filename__\":\"recipe.json\",\"__schema__\":{\"collectionName\":\"components_food_recipes\",\"info\":{\"displayName\":\"recipe\",\"icon\":\"ad\",\"description\":\"\"},\"options\":{},\"attributes\":{\"name\":{\"type\":\"string\",\"required\":true},\"ingredients\":{\"type\":\"component\",\"repeatable\":true,\"component\":\"food.ingredients\"},\"variants\":{\"type\":\"component\",\"repeatable\":false,\"component\":\"food.ingredient-variants\"}},\"__filename__\":\"recipe.json\"},\"uid\":\"food.recipe\",\"category\":\"food\",\"modelType\":\"component\",\"modelName\":\"recipe\",\"globalId\":\"ComponentFoodRecipe\",\"singularName\":\"recipe\",\"tableName\":\"components_food_recipes\"},{\"collectionName\":\"components_seo_galleries\",\"info\":{\"displayName\":\"Gallery\",\"icon\":\"address-card\",\"description\":\"\"},\"options\":{},\"attributes\":{\"main_image\":{\"type\":\"relation\",\"relation\":\"morphOne\",\"target\":\"plugin::upload.file\",\"morphBy\":\"related\"},\"rest\":{\"type\":\"relation\",\"relation\":\"morphMany\",\"target\":\"plugin::upload.file\",\"morphBy\":\"related\"},\"seo_desc\":{\"type\":\"string\"}},\"__filename__\":\"gallery.json\",\"__schema__\":{\"collectionName\":\"components_seo_galleries\",\"info\":{\"displayName\":\"Gallery\",\"icon\":\"address-card\",\"description\":\"\"},\"options\":{},\"attributes\":{\"main_image\":{\"type\":\"media\",\"multiple\":false,\"required\":false,\"allowedTypes\":[\"images\",\"files\",\"videos\",\"audios\"]},\"rest\":{\"type\":\"media\",\"multiple\":true,\"required\":false,\"allowedTypes\":[\"images\",\"videos\",\"audios\",\"files\"]},\"seo_desc\":{\"type\":\"string\"}},\"__filename__\":\"gallery.json\"},\"uid\":\"seo.gallery\",\"category\":\"seo\",\"modelType\":\"component\",\"modelName\":\"gallery\",\"globalId\":\"ComponentSeoGallery\",\"singularName\":\"gallery\",\"tableName\":\"components_seo_galleries\"}]"),
20
- JSON.parse("{\"ingredients\":[null,{\"name\":\"první\"},{\"name\":\"druhý\"},{\"name\":\"třetí\"},{\"name\":\"čtvrtý\"},{\"name\":\"pátý\"},{\"name\":\"šestý\"},{\"name\":\"sedmý\"},{\"name\":\"osmý\"},{\"name\":\"devátý\"},{\"name\":\"desátý\"},null,null,null,null,null,null,null,null,null,null,{\"name\":\"jedenáctý\"},null,{\"name\":\"dvanáctý\"},{\"name\":\"třináctý\"},null,{\"name\":\"čtrnáctý\"},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,{\"Name\":\"první\"},{\"Name\":\"druhý\"},{\"Name\":\"třetina\"},{\"Name\":\"čtvrtý\"},{\"Name\":\"pátý\"},{\"Name\":\"šestý\"},{\"Name\":\"sedmý\"},{\"Name\":\"osmý\"},{\"Name\":\"devátý\"},{\"Name\":\"desátý\"}]}"),
21
- JSON.parse("{\"id\":3,\"ingredients\":[{\"id\":28,\"name\":\"dvanáctý\",\"pcs\":null,\"required\":null},{\"id\":29,\"name\":\"první\",\"pcs\":null,\"required\":null},{\"id\":30,\"name\":\"druhý\",\"pcs\":null,\"required\":null},{\"id\":31,\"name\":\"jedenáctý\",\"pcs\":null,\"required\":null},{\"id\":32,\"name\":\"třetí\",\"pcs\":null,\"required\":null},{\"id\":33,\"name\":\"čtvrtý\",\"pcs\":null,\"required\":null},{\"id\":34,\"name\":\"pátý\",\"pcs\":null,\"required\":null},{\"id\":35,\"name\":\"šestý\",\"pcs\":null,\"required\":null},{\"id\":36,\"name\":\"čtrnáctý\",\"pcs\":null,\"required\":null},{\"id\":37,\"name\":\"sedmý\",\"pcs\":null,\"required\":null},{\"id\":38,\"name\":\"osmý\",\"pcs\":null,\"required\":null},{\"id\":39,\"name\":\"devátý\",\"pcs\":null,\"required\":null},{\"id\":40,\"name\":\"desátý\",\"pcs\":null,\"required\":null},{\"id\":41,\"name\":\"třináctý\",\"pcs\":null,\"required\":null}]}"),
22
- JSON.parse("{\"id\":1,\"createdAt\":\"2022-08-30T09:21:23.903Z\",\"updatedAt\":\"2022-08-30T15:09:19.107Z\",\"publishedAt\":null,\"locale\":\"en\",\"ingredients\":[{\"id\":23,\"name\":\"twelveth\",\"pcs\":12,\"required\":null},{\"id\":1,\"name\":\"first\",\"pcs\":1,\"required\":null},{\"id\":2,\"name\":\"second\",\"pcs\":2,\"required\":null},{\"id\":21,\"name\":\"eleventh\",\"pcs\":11,\"required\":null},{\"id\":3,\"name\":\"third\",\"pcs\":3,\"required\":null},{\"id\":4,\"name\":\"fourth\",\"pcs\":4,\"required\":null},{\"id\":5,\"name\":\"fifth\",\"pcs\":5,\"required\":null},{\"id\":6,\"name\":\"sixth\",\"pcs\":6,\"required\":null},{\"id\":26,\"name\":\"fourteenth\",\"pcs\":14,\"required\":null},{\"id\":7,\"name\":\"seventh\",\"pcs\":7,\"required\":null},{\"id\":8,\"name\":\"eighth\",\"pcs\":8,\"required\":null},{\"id\":9,\"name\":\"nineth\",\"pcs\":9,\"required\":null},{\"id\":10,\"name\":\"tenth\",\"pcs\":10,\"required\":null},{\"id\":24,\"name\":\"thirteenth\",\"pcs\":13,\"required\":null}],\"createdBy\":{\"id\":1,\"firstname\":\"David\",\"lastname\":\"Vaclavek\",\"username\":null,\"email\":\"david@localazy.com\",\"password\":\"$2a$10$pRWPPnTWp8HFWPR7aD4Pju2nNBD9vyNPt.QaMpU9IA6pMoGFl7eVC\",\"resetPasswordToken\":null,\"registrationToken\":null,\"isActive\":true,\"blocked\":false,\"preferedLanguage\":null,\"createdAt\":\"2022-07-11T11:58:02.016Z\",\"updatedAt\":\"2022-07-11T12:56:16.558Z\"},\"updatedBy\":{\"id\":1,\"firstname\":\"David\",\"lastname\":\"Vaclavek\",\"username\":null,\"email\":\"david@localazy.com\",\"password\":\"$2a$10$pRWPPnTWp8HFWPR7aD4Pju2nNBD9vyNPt.QaMpU9IA6pMoGFl7eVC\",\"resetPasswordToken\":null,\"registrationToken\":null,\"isActive\":true,\"blocked\":false,\"preferedLanguage\":null,\"createdAt\":\"2022-07-11T11:58:02.016Z\",\"updatedAt\":\"2022-07-11T12:56:16.558Z\"},\"localizations\":[{\"id\":3,\"createdAt\":\"2022-08-30T15:08:02.889Z\",\"updatedAt\":\"2022-08-30T21:03:30.453Z\",\"publishedAt\":null,\"locale\":\"cs\"}]}"),
23
- "api::loc-5087.loc-5087"
17
+ const result = await parsedLocalazyEntryToUpdateEntry(
18
+ allModels,
19
+ localazyEntry,
20
+ fullyPopulatedLocalizedEntry,
21
+ currentEntry,
22
+ baseEntry,
23
+ uid,
24
+ locale
24
25
  );
25
26
 
26
27
  // VERIFY
27
28
  const expected = {
28
- id: 3,
29
- ingredients: [
30
- {
31
- id: 28,
32
- name: "dvanáctý",
33
- pcs: null,
34
- required: null,
35
- },
36
- {
37
- id: 29,
38
- name: "první",
39
- pcs: null,
40
- required: null,
41
- },
42
- {
43
- id: 30,
44
- name: "druhý",
45
- pcs: null,
46
- required: null,
47
- },
48
- {
49
- id: 31,
50
- name: "jedenáctý",
51
- pcs: null,
52
- required: null,
53
- },
54
- {
55
- id: 32,
56
- name: "třetí",
57
- pcs: null,
58
- required: null,
59
- },
60
- {
61
- id: 33,
62
- name: "čtvrtý",
63
- pcs: null,
64
- required: null,
65
- },
66
- {
67
- id: 34,
68
- name: "pátý",
69
- pcs: null,
70
- required: null,
71
- },
72
- {
73
- id: 35,
74
- name: "šestý",
75
- pcs: null,
76
- required: null,
77
- },
78
- {
79
- id: 36,
80
- name: "čtrnáctý",
81
- pcs: null,
82
- required: null,
83
- },
84
- {
85
- id: 37,
86
- name: "sedmý",
87
- pcs: null,
88
- required: null,
89
- },
29
+ id: 24,
30
+ title: "Pro každý den v roce",
31
+ author_name: "David V.",
32
+ pages: 365,
33
+ recipes: [
90
34
  {
91
- id: 38,
92
- name: "osmý",
93
- pcs: null,
94
- required: null,
95
- },
96
- {
97
- id: 39,
98
- name: "devátý",
99
- pcs: null,
100
- required: null,
101
- },
102
- {
103
- id: 40,
104
- name: "desátý",
105
- pcs: null,
106
- required: null,
107
- },
108
- {
109
- id: 41,
110
- name: "třináctý",
111
- pcs: null,
112
- required: null,
35
+ id: 20,
36
+ name: "Bramborový salát",
37
+ recipe: "Oloupejte brambory, smíchejte je se všemi ingrediencemi a máte hotovo. Bon apetit!",
38
+ estimated_cook_time: "00:30:00.000",
39
+ difficulty: "easy",
40
+ author_name: "Mr. Bramborová hlava",
41
+ gallery: [
42
+ {
43
+ id: 100,
44
+ image_title: "Syrové brambory",
45
+ image_description: "Čerstvý!",
46
+ image: {
47
+ id: 6,
48
+ name: "rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
49
+ alternativeText: "rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
50
+ caption: "rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
51
+ width: 2268,
52
+ height: 4032,
53
+ formats: {
54
+ thumbnail: {
55
+ name: "thumbnail_rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
56
+ hash: "thumbnail_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea",
57
+ ext: ".jpg",
58
+ mime: "image/jpeg",
59
+ path: null,
60
+ width: 88,
61
+ height: 156,
62
+ size: 5.35,
63
+ url: "/uploads/thumbnail_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea.jpg",
64
+ },
65
+ large: {
66
+ name: "large_rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
67
+ hash: "large_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea",
68
+ ext: ".jpg",
69
+ mime: "image/jpeg",
70
+ path: null,
71
+ width: 563,
72
+ height: 1000,
73
+ size: 108.15,
74
+ url: "/uploads/large_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea.jpg",
75
+ },
76
+ medium: {
77
+ name: "medium_rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
78
+ hash: "medium_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea",
79
+ ext: ".jpg",
80
+ mime: "image/jpeg",
81
+ path: null,
82
+ width: 422,
83
+ height: 750,
84
+ size: 65.52,
85
+ url: "/uploads/medium_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea.jpg",
86
+ },
87
+ small: {
88
+ name: "small_rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
89
+ hash: "small_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea",
90
+ ext: ".jpg",
91
+ mime: "image/jpeg",
92
+ path: null,
93
+ width: 281,
94
+ height: 500,
95
+ size: 34.23,
96
+ url: "/uploads/small_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea.jpg",
97
+ },
98
+ },
99
+ hash: "rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea",
100
+ ext: ".jpg",
101
+ mime: "image/jpeg",
102
+ size: 1081.59,
103
+ url: "/uploads/rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea.jpg",
104
+ previewUrl: null,
105
+ provider: "local",
106
+ provider_metadata: null,
107
+ },
108
+ },
109
+ {
110
+ id: 101,
111
+ image_title: "Salát",
112
+ image_description: "Mňam!",
113
+ image: {
114
+ id: 7,
115
+ name: "jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
116
+ alternativeText: "jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
117
+ caption: "jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
118
+ width: 4608,
119
+ height: 3456,
120
+ formats: {
121
+ thumbnail: {
122
+ name: "thumbnail_jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
123
+ hash: "thumbnail_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db",
124
+ ext: ".jpg",
125
+ mime: "image/jpeg",
126
+ path: null,
127
+ width: 208,
128
+ height: 156,
129
+ size: 9.03,
130
+ url: "/uploads/thumbnail_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db.jpg",
131
+ },
132
+ large: {
133
+ name: "large_jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
134
+ hash: "large_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db",
135
+ ext: ".jpg",
136
+ mime: "image/jpeg",
137
+ path: null,
138
+ width: 1000,
139
+ height: 750,
140
+ size: 102.77,
141
+ url: "/uploads/large_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db.jpg",
142
+ },
143
+ medium: {
144
+ name: "medium_jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
145
+ hash: "medium_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db",
146
+ ext: ".jpg",
147
+ mime: "image/jpeg",
148
+ path: null,
149
+ width: 750,
150
+ height: 563,
151
+ size: 66.26,
152
+ url: "/uploads/medium_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db.jpg",
153
+ },
154
+ small: {
155
+ name: "small_jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
156
+ hash: "small_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db",
157
+ ext: ".jpg",
158
+ mime: "image/jpeg",
159
+ path: null,
160
+ width: 500,
161
+ height: 375,
162
+ size: 35.17,
163
+ url: "/uploads/small_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db.jpg",
164
+ },
165
+ },
166
+ hash: "jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db",
167
+ ext: ".jpg",
168
+ mime: "image/jpeg",
169
+ size: 1664.79,
170
+ url: "/uploads/jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db.jpg",
171
+ previewUrl: null,
172
+ provider: "local",
173
+ provider_metadata: null,
174
+ },
175
+ },
176
+ ],
177
+ ingredients: [
178
+ {
179
+ id: 115,
180
+ name: "Brambory",
181
+ amount: 2,
182
+ unit: "kg",
183
+ is_required: true,
184
+ },
185
+ {
186
+ id: 116,
187
+ name: "Hrášek",
188
+ amount: 0.5,
189
+ unit: "plechovka",
190
+ is_required: true,
191
+ },
192
+ {
193
+ id: 117,
194
+ name: "Kukuřice",
195
+ amount: 0.5,
196
+ unit: "plechovka",
197
+ is_required: true,
198
+ },
199
+ {
200
+ id: 118,
201
+ name: "Majonéza",
202
+ amount: 4,
203
+ unit: "1",
204
+ is_required: true,
205
+ },
206
+ {
207
+ id: 119,
208
+ name: "Sýr",
209
+ amount: 1,
210
+ unit: "1",
211
+ is_required: true,
212
+ },
213
+ {
214
+ id: 120,
215
+ name: "Jablko",
216
+ amount: 1,
217
+ unit: "ks",
218
+ is_required: true,
219
+ },
220
+ ],
113
221
  },
114
222
  ],
223
+ gallery: {
224
+ id: 24,
225
+ optional_title: null,
226
+ annotation: "Podívejte se na naše chutné jídlo, pak čtěte dál a ponořte se do kulinářského nebe!",
227
+ main_image: {
228
+ id: 102,
229
+ image_title: "Kuchařka",
230
+ image_description: "Booklet",
231
+ image: {
232
+ id: 9,
233
+ name: "dan-gold-5O1ddenSM4g-unsplash.jpg",
234
+ alternativeText: "dan-gold-5O1ddenSM4g-unsplash.jpg",
235
+ caption: "dan-gold-5O1ddenSM4g-unsplash.jpg",
236
+ width: 6000,
237
+ height: 3376,
238
+ formats: {
239
+ thumbnail: {
240
+ name: "thumbnail_dan-gold-5O1ddenSM4g-unsplash.jpg",
241
+ hash: "thumbnail_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907",
242
+ ext: ".jpg",
243
+ mime: "image/jpeg",
244
+ path: null,
245
+ width: 245,
246
+ height: 138,
247
+ size: 7.44,
248
+ url: "/uploads/thumbnail_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907.jpg",
249
+ },
250
+ large: {
251
+ name: "large_dan-gold-5O1ddenSM4g-unsplash.jpg",
252
+ hash: "large_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907",
253
+ ext: ".jpg",
254
+ mime: "image/jpeg",
255
+ path: null,
256
+ width: 1000,
257
+ height: 563,
258
+ size: 52.67,
259
+ url: "/uploads/large_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907.jpg",
260
+ },
261
+ medium: {
262
+ name: "medium_dan-gold-5O1ddenSM4g-unsplash.jpg",
263
+ hash: "medium_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907",
264
+ ext: ".jpg",
265
+ mime: "image/jpeg",
266
+ path: null,
267
+ width: 750,
268
+ height: 422,
269
+ size: 35.15,
270
+ url: "/uploads/medium_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907.jpg",
271
+ },
272
+ small: {
273
+ name: "small_dan-gold-5O1ddenSM4g-unsplash.jpg",
274
+ hash: "small_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907",
275
+ ext: ".jpg",
276
+ mime: "image/jpeg",
277
+ path: null,
278
+ width: 500,
279
+ height: 281,
280
+ size: 19.95,
281
+ url: "/uploads/small_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907.jpg",
282
+ },
283
+ },
284
+ hash: "dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907",
285
+ ext: ".jpg",
286
+ mime: "image/jpeg",
287
+ size: 972.68,
288
+ url: "/uploads/dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907.jpg",
289
+ previewUrl: null,
290
+ provider: "local",
291
+ provider_metadata: null,
292
+ },
293
+ },
294
+ gallery: [
295
+ {
296
+ id: 103,
297
+ image_title: null,
298
+ image_description: "Brožura, listy a vidlička.",
299
+ image: {
300
+ id: 11,
301
+ name: "heather-ford-G4LFhuLXhLE-unsplash.jpg",
302
+ alternativeText: "heather-ford-G4LFhuLXhLE-unsplash.jpg",
303
+ caption: "heather-ford-G4LFhuLXhLE-unsplash.jpg",
304
+ width: 6127,
305
+ height: 3844,
306
+ formats: {
307
+ thumbnail: {
308
+ name: "thumbnail_heather-ford-G4LFhuLXhLE-unsplash.jpg",
309
+ hash: "thumbnail_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f",
310
+ ext: ".jpg",
311
+ mime: "image/jpeg",
312
+ path: null,
313
+ width: 245,
314
+ height: 154,
315
+ size: 9.54,
316
+ url: "/uploads/thumbnail_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f.jpg",
317
+ },
318
+ large: {
319
+ name: "large_heather-ford-G4LFhuLXhLE-unsplash.jpg",
320
+ hash: "large_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f",
321
+ ext: ".jpg",
322
+ mime: "image/jpeg",
323
+ path: null,
324
+ width: 1000,
325
+ height: 628,
326
+ size: 117.56,
327
+ url: "/uploads/large_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f.jpg",
328
+ },
329
+ medium: {
330
+ name: "medium_heather-ford-G4LFhuLXhLE-unsplash.jpg",
331
+ hash: "medium_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f",
332
+ ext: ".jpg",
333
+ mime: "image/jpeg",
334
+ path: null,
335
+ width: 750,
336
+ height: 471,
337
+ size: 66.32,
338
+ url: "/uploads/medium_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f.jpg",
339
+ },
340
+ small: {
341
+ name: "small_heather-ford-G4LFhuLXhLE-unsplash.jpg",
342
+ hash: "small_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f",
343
+ ext: ".jpg",
344
+ mime: "image/jpeg",
345
+ path: null,
346
+ width: 500,
347
+ height: 314,
348
+ size: 31.42,
349
+ url: "/uploads/small_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f.jpg",
350
+ },
351
+ },
352
+ hash: "heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f",
353
+ ext: ".jpg",
354
+ mime: "image/jpeg",
355
+ size: 6971.47,
356
+ url: "/uploads/heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f.jpg",
357
+ previewUrl: null,
358
+ provider: "local",
359
+ provider_metadata: null,
360
+ },
361
+ },
362
+ {
363
+ id: 104,
364
+ image_title: "Koření",
365
+ image_description: null,
366
+ image: {
367
+ id: 10,
368
+ name: "calum-lewis-vA1L1jRTM70-unsplash.jpg",
369
+ alternativeText: "calum-lewis-vA1L1jRTM70-unsplash.jpg",
370
+ caption: "calum-lewis-vA1L1jRTM70-unsplash.jpg",
371
+ width: 3569,
372
+ height: 5353,
373
+ formats: {
374
+ thumbnail: {
375
+ name: "thumbnail_calum-lewis-vA1L1jRTM70-unsplash.jpg",
376
+ hash: "thumbnail_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997",
377
+ ext: ".jpg",
378
+ mime: "image/jpeg",
379
+ path: null,
380
+ width: 104,
381
+ height: 156,
382
+ size: 5.55,
383
+ url: "/uploads/thumbnail_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997.jpg",
384
+ },
385
+ large: {
386
+ name: "large_calum-lewis-vA1L1jRTM70-unsplash.jpg",
387
+ hash: "large_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997",
388
+ ext: ".jpg",
389
+ mime: "image/jpeg",
390
+ path: null,
391
+ width: 667,
392
+ height: 1000,
393
+ size: 116.32,
394
+ url: "/uploads/large_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997.jpg",
395
+ },
396
+ medium: {
397
+ name: "medium_calum-lewis-vA1L1jRTM70-unsplash.jpg",
398
+ hash: "medium_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997",
399
+ ext: ".jpg",
400
+ mime: "image/jpeg",
401
+ path: null,
402
+ width: 500,
403
+ height: 750,
404
+ size: 72.75,
405
+ url: "/uploads/medium_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997.jpg",
406
+ },
407
+ small: {
408
+ name: "small_calum-lewis-vA1L1jRTM70-unsplash.jpg",
409
+ hash: "small_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997",
410
+ ext: ".jpg",
411
+ mime: "image/jpeg",
412
+ path: null,
413
+ width: 333,
414
+ height: 500,
415
+ size: 36.52,
416
+ url: "/uploads/small_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997.jpg",
417
+ },
418
+ },
419
+ hash: "calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997",
420
+ ext: ".jpg",
421
+ mime: "image/jpeg",
422
+ size: 2305.97,
423
+ url: "/uploads/calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997.jpg",
424
+ previewUrl: null,
425
+ provider: "local",
426
+ provider_metadata: null,
427
+ },
428
+ },
429
+ ],
430
+ },
115
431
  };
116
432
 
117
433
  expect(result).toEqual(expected);