@localazy/strapi-plugin 0.2.13 → 1.0.0-beta.1
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.
- package/README.md +3 -1
- package/dist/_chunks/App-BSFfgZKU.mjs +5278 -0
- package/dist/_chunks/App-D1QaIMHX.js +5278 -0
- package/dist/_chunks/ContentTransferSetup-DHXJIxAp.js +1552 -0
- package/dist/_chunks/ContentTransferSetup-DtjcF_jM.mjs +1550 -0
- package/dist/_chunks/GlobalSettings-BON3kjHK.js +228 -0
- package/dist/_chunks/GlobalSettings-BcdibqNS.mjs +228 -0
- package/dist/_chunks/LanguagesSelector-BeijBEjg.js +47 -0
- package/dist/_chunks/LanguagesSelector-fyAIUp7M.mjs +48 -0
- package/dist/_chunks/en-BTf8goGM.mjs +8 -0
- package/dist/_chunks/en-CRtsEFtl.js +8 -0
- package/dist/_chunks/fr-C8Qw4iPZ.js +4 -0
- package/dist/_chunks/fr-hkSxFuzl.mjs +4 -0
- package/dist/_chunks/has-model-changed-BMCQX2Dd.js +316 -0
- package/dist/_chunks/has-model-changed-Dvtzpc9v.mjs +317 -0
- package/dist/_chunks/index-BQw2qi2G.js +2679 -0
- package/dist/_chunks/index-CN3Gyh5F.mjs +2678 -0
- package/dist/_chunks/isEqual-B-YVnzrp.js +205 -0
- package/dist/_chunks/isEqual-CEyT97-3.mjs +206 -0
- package/dist/_chunks/set-DUdH3vE5.js +54557 -0
- package/dist/_chunks/set-DulHAQhq.mjs +54542 -0
- package/dist/admin/index.js +4 -0
- package/dist/admin/index.mjs +5 -0
- package/dist/admin/src/components/Initializer.d.ts +5 -0
- package/dist/admin/src/config/development/index.d.ts +15 -0
- package/dist/admin/src/config/example/index.example.d.ts +15 -0
- package/dist/admin/src/config/index.d.ts +15 -0
- package/dist/admin/src/config/local/index.d.ts +15 -0
- package/dist/admin/src/config/production/index.d.ts +15 -0
- package/dist/admin/src/i18n.d.ts +2 -0
- package/dist/admin/src/index.d.ts +10 -0
- package/dist/admin/src/modules/@common/api/strapi-api-base.d.ts +6 -0
- package/dist/admin/src/modules/@common/components/Icons/House.d.ts +2 -0
- package/dist/admin/src/modules/@common/components/Icons/Localazy.d.ts +2 -0
- package/dist/admin/src/modules/@common/components/LanguagesSelector.d.ts +11 -0
- package/dist/admin/src/modules/@common/components/PluginPageLoader.d.ts +2 -0
- package/dist/admin/src/modules/@common/components/SideNav.d.ts +2 -0
- package/dist/admin/src/modules/@common/components/TransferReport.d.ts +5 -0
- package/dist/admin/src/modules/@common/functions/flatten-deep.d.ts +2 -0
- package/dist/admin/src/modules/@common/locale/en.d.ts +14 -0
- package/dist/admin/src/modules/@common/models/supported-content-type-fields.d.ts +2 -0
- package/dist/admin/src/modules/@common/models/supported-custom-field-plugins.d.ts +2 -0
- package/dist/admin/src/modules/@common/services/i18n-service.d.ts +3 -0
- package/dist/admin/src/modules/@common/services/plugin.service.d.ts +3 -0
- package/dist/admin/src/modules/@common/services/product-analytics-service.d.ts +14 -0
- package/dist/admin/src/modules/@common/services/project-service.d.ts +4 -0
- package/dist/admin/src/modules/@common/services/user-service.d.ts +5 -0
- package/dist/admin/src/modules/@common/utils/are-locales-compatible.d.ts +2 -0
- package/dist/admin/src/modules/@common/utils/format-number.d.ts +2 -0
- package/dist/admin/src/modules/@common/utils/get-default-locale.d.ts +2 -0
- package/dist/admin/src/modules/@common/utils/history.d.ts +2 -0
- package/dist/admin/src/modules/@common/utils/is-plugin-route.d.ts +2 -0
- package/dist/admin/src/modules/@common/utils/iso-locales-utils.d.ts +3 -0
- package/dist/admin/src/modules/@common/utils/redirect-to-plugin-route.d.ts +13 -0
- package/dist/admin/src/modules/@common/utils/sort-by-model-name.d.ts +2 -0
- package/dist/admin/src/modules/@common/utils/use-header-subtitle.d.ts +2 -0
- package/dist/admin/src/modules/@common/utils/use-header-title.d.ts +2 -0
- package/dist/admin/src/modules/@common/utils/use-nav.d.ts +11 -0
- package/dist/admin/src/modules/alerts/constants/channels.d.ts +1 -0
- package/dist/admin/src/modules/alerts/constants/events.d.ts +4 -0
- package/dist/admin/src/modules/alerts/services/alerts-service.d.ts +8 -0
- package/dist/admin/src/modules/localazy-download/locale/en.d.ts +24 -0
- package/dist/admin/src/modules/localazy-download/services/download-alerts-service.d.ts +5 -0
- package/dist/admin/src/modules/localazy-download/services/localazy-download-service.d.ts +3 -0
- package/dist/admin/src/modules/localazy-upload/components/ReadDocsButton.d.ts +3 -0
- package/dist/admin/src/modules/localazy-upload/locale/en.d.ts +19 -0
- package/dist/admin/src/modules/localazy-upload/services/localazy-upload-service.d.ts +3 -0
- package/dist/admin/src/modules/localazy-upload/services/upload-alerts-service.d.ts +5 -0
- package/dist/admin/src/modules/login/components/FetchIdentity.d.ts +3 -0
- package/dist/admin/src/modules/login/components/LoginButton.d.ts +12 -0
- package/dist/admin/src/modules/login/components/LogoutButton.d.ts +6 -0
- package/dist/admin/src/modules/login/locale/en.d.ts +8 -0
- package/dist/admin/src/modules/login/services/localazy-login-service.d.ts +4 -0
- package/dist/admin/src/modules/overview/components/OverviewItem.d.ts +7 -0
- package/dist/admin/src/modules/overview/components/OverviewItemLink.d.ts +7 -0
- package/dist/admin/src/modules/overview/components/PrerequisitiesInfo.d.ts +3 -0
- package/dist/admin/src/modules/overview/locale/en.d.ts +14 -0
- package/dist/admin/src/modules/plugin-settings/components/ContentTransferSetupEmpty.d.ts +2 -0
- package/dist/admin/src/modules/plugin-settings/components/Tree.d.ts +8 -0
- package/dist/admin/src/modules/plugin-settings/components/TreeItem.d.ts +10 -0
- package/dist/admin/src/modules/plugin-settings/functions/build-content-transfer-setup-schema.d.ts +2 -0
- package/dist/admin/src/modules/plugin-settings/functions/get-content-transfer-setup-keys-sets.d.ts +8 -0
- package/dist/admin/src/modules/plugin-settings/functions/has-model-changed.d.ts +6 -0
- package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +49 -0
- package/dist/admin/src/modules/plugin-settings/services/plugin-settings-service.d.ts +6 -0
- package/dist/admin/src/modules/plugin-settings/services/strapi-model-service.d.ts +4 -0
- package/dist/admin/src/modules/plugin-settings/services/strapi-users-service.d.ts +3 -0
- package/dist/admin/src/modules/plugin-settings/utils/array-of-models-to-object.d.ts +2 -0
- package/dist/admin/src/modules/plugin-settings/utils/find-model-value-by-key.d.ts +2 -0
- package/dist/admin/src/modules/plugin-settings/utils/get-filtered-models-schemas.d.ts +7 -0
- package/dist/admin/src/modules/plugin-settings/utils/get-models-tree.d.ts +5 -0
- package/dist/admin/src/modules/strapi/utils/get-default-theme.d.ts +3 -0
- package/dist/admin/src/modules/user/model/localazy-identity.d.ts +15 -0
- package/dist/admin/src/modules/user/services/localazy-user-service.d.ts +6 -0
- package/dist/admin/src/pages/App.d.ts +3 -0
- package/dist/admin/src/pages/ContentTransferSetup.d.ts +4 -0
- package/dist/admin/src/pages/Download.d.ts +7 -0
- package/dist/admin/src/pages/GlobalSettings.d.ts +4 -0
- package/dist/admin/src/pages/HomePage.d.ts +2 -0
- package/dist/admin/src/pages/Login.d.ts +8 -0
- package/dist/admin/src/pages/Overview.d.ts +8 -0
- package/dist/admin/src/pages/Upload.d.ts +7 -0
- package/dist/admin/src/pluginId.d.ts +2 -0
- package/dist/admin/src/plugins/generic-connector-client.d.ts +3 -0
- package/dist/admin/src/state/localazy-identity.d.ts +13 -0
- package/dist/admin/src/utils/getTranslation.d.ts +2 -0
- package/dist/server/index.js +26000 -0
- package/dist/server/index.mjs +25989 -0
- package/dist/server/src/bootstrap.d.ts +5 -0
- package/dist/server/src/config/core/config.d.ts +1 -0
- package/dist/server/src/config/development/index.d.ts +15 -0
- package/dist/server/src/config/example/index.example.d.ts +15 -0
- package/dist/server/src/config/index.d.ts +18 -0
- package/dist/server/src/config/local/index.d.ts +15 -0
- package/dist/server/src/config/production/index.d.ts +15 -0
- package/dist/server/src/constants/channels.d.ts +3 -0
- package/dist/server/src/constants/events.d.ts +6 -0
- package/dist/server/src/content-types/index.d.ts +2 -0
- package/dist/server/src/controllers/index.d.ts +43 -0
- package/dist/server/src/controllers/localazy-auth-controller.d.ts +8 -0
- package/dist/server/src/controllers/localazy-project-controller.d.ts +7 -0
- package/dist/server/src/controllers/localazy-transfer-controller.d.ts +8 -0
- package/dist/server/src/controllers/localazy-user-controller.d.ts +9 -0
- package/dist/server/src/controllers/plugin-settings-controller.d.ts +10 -0
- package/dist/server/src/controllers/strapi-controller.d.ts +10 -0
- package/dist/server/src/core/index.d.ts +71 -0
- package/dist/server/src/db/model/content-transfer-setup.d.ts +4 -0
- package/dist/server/src/db/model/localazy-user.d.ts +17 -0
- package/dist/server/src/db/model/plugin-settings.d.ts +5 -0
- package/dist/server/src/db/model/utils/get-strapi-store.d.ts +26 -0
- package/dist/server/src/destroy.d.ts +5 -0
- package/dist/server/src/functions/should-set-downloaded-property.d.ts +12 -0
- package/dist/server/src/index.d.ts +189 -0
- package/dist/server/src/lifecycles/deep-populate-hook.d.ts +20 -0
- package/dist/server/src/lifecycles/deprecate-event-entry-in-localazy-hook.d.ts +4 -0
- package/dist/server/src/lifecycles/upload-event-entry-to-localazy-hook.d.ts +12 -0
- package/dist/server/src/middlewares/index.d.ts +2 -0
- package/dist/server/src/models/plugin/content-transfer-setup.d.ts +13 -0
- package/dist/server/src/models/strapi/locale.d.ts +8 -0
- package/dist/server/src/policies/index.d.ts +2 -0
- package/dist/server/src/register.d.ts +5 -0
- package/dist/server/src/routes/index.d.ts +25 -0
- package/dist/server/src/routes/localazy-auth-routes.d.ts +9 -0
- package/dist/server/src/routes/localazy-project-routes.d.ts +9 -0
- package/dist/server/src/routes/localazy-transfer-routes.d.ts +9 -0
- package/dist/server/src/routes/localazy-user-routes.d.ts +9 -0
- package/dist/server/src/routes/plugin-settings-routes.d.ts +9 -0
- package/dist/server/src/routes/strapi-routes.d.ts +9 -0
- package/dist/server/src/services/helpers/job-notification-service.d.ts +14 -0
- package/dist/server/src/services/helpers/plugin-settings-service-helper.d.ts +16 -0
- package/dist/server/src/services/index.d.ts +92 -0
- package/dist/server/src/services/localazy-pubapi-service.d.ts +12 -0
- package/dist/server/src/services/localazy-transfer-download-service.d.ts +11 -0
- package/dist/server/src/services/localazy-transfer-upload-service.d.ts +11 -0
- package/dist/server/src/services/localazy-upload-service.d.ts +28 -0
- package/dist/server/src/services/localazy-user-service.d.ts +11 -0
- package/dist/server/src/services/plugin-settings-service.d.ts +16 -0
- package/dist/server/src/services/strapi-i18n-service.d.ts +19 -0
- package/dist/server/src/services/strapi-localazy-i18n-service.d.ts +9 -0
- package/dist/server/src/services/strapi-service.d.ts +10 -0
- package/dist/server/src/utils/delay.d.ts +1 -0
- package/dist/server/src/utils/drop-property-deep.d.ts +1 -0
- package/dist/server/src/utils/flatten-object.d.ts +2 -0
- package/dist/server/src/utils/generate-random-id.d.ts +2 -0
- package/dist/server/src/utils/get-full-populate-localazy-download-object.d.ts +17 -0
- package/dist/server/src/utils/get-full-populate-localazy-upload-object.d.ts +9 -0
- package/dist/server/src/utils/get-full-populate-object.d.ts +17 -0
- package/dist/server/src/utils/get-main-keys-of-nested-array-objects.d.ts +2 -0
- package/dist/server/src/utils/get-picked-flatten-keys-for-hook-entry.d.ts +5 -0
- package/dist/server/src/utils/intl-display-name.d.ts +1 -0
- package/dist/server/src/utils/is-generally-applicable-content-type.d.ts +2 -0
- package/dist/server/src/utils/is-localazy-applicable-content-type.d.ts +2 -0
- package/dist/server/src/utils/iso-locales-utils.d.ts +3 -0
- package/dist/server/src/utils/localazy-api-client-factory.d.ts +3 -0
- package/dist/server/src/utils/localazy-generic-connector-client-factory.d.ts +3 -0
- package/dist/server/src/utils/model-utils.d.ts +7 -0
- package/dist/server/src/utils/omit-deep.d.ts +2 -0
- package/dist/server/src/utils/parsed-localazy-entry-to-create-entry.d.ts +7 -0
- package/dist/server/src/utils/parsed-localazy-entry-to-update-entry.d.ts +1 -0
- package/dist/server/src/utils/pick-entries.d.ts +2 -0
- package/dist/server/src/utils/populate-create-update-entry-with-base-entry.d.ts +1 -0
- package/dist/server/src/utils/request-initiator-helper.d.ts +9 -0
- package/dist/server/src/utils/reset-array-keys-deep.d.ts +1 -0
- package/dist/server/src/utils/transfer-setup-utils.d.ts +7 -0
- package/install/index.mjs +88 -34
- package/install/vite.config.example.js +40 -0
- package/install/vite.config.example.ts +41 -0
- package/install/{webpack.example.js → webpack.config.example.js} +2 -2
- package/install/webpack.config.example.ts +30 -0
- package/package.json +93 -55
- package/.babelrc +0 -7
- package/.eslintrc +0 -13
- package/.github/workflows/qa.yml +0 -25
- package/.github/workflows/release.yml +0 -46
- package/.nvmrc +0 -1
- package/.strapi-updater.json +0 -4
- package/CHANGELOG.md +0 -68
- package/LICENSE +0 -21
- package/admin/src/components/Initializer/index.js +0 -26
- package/admin/src/components/PluginIcon/index.js +0 -14
- package/admin/src/config/development/index.js +0 -14
- package/admin/src/config/example/index.js +0 -14
- package/admin/src/config/index.js +0 -19
- package/admin/src/config/local/index.js +0 -14
- package/admin/src/config/production/index.js +0 -15
- package/admin/src/i18n.js +0 -41
- package/admin/src/index.js +0 -138
- package/admin/src/modules/@common/components/Icons/Localazy/index.js +0 -12
- package/admin/src/modules/@common/components/LanguagesSelector/index.js +0 -67
- package/admin/src/modules/@common/components/PluginPageLoader/index.js +0 -20
- package/admin/src/modules/@common/components/SideNav/index.js +0 -46
- package/admin/src/modules/@common/components/TransferReport/index.js +0 -53
- package/admin/src/modules/@common/locale/en.js +0 -14
- package/admin/src/modules/@common/models/supported-content-type-fields.js +0 -9
- package/admin/src/modules/@common/models/supported-custom-field-plugins.js +0 -6
- package/admin/src/modules/@common/services/i18n-service.js +0 -15
- package/admin/src/modules/@common/services/plugin.service.js +0 -16
- package/admin/src/modules/@common/services/product-analytics-service.js +0 -86
- package/admin/src/modules/@common/services/project-service.js +0 -15
- package/admin/src/modules/@common/services/user-service.js +0 -38
- package/admin/src/modules/@common/utils/__tests__/iso-locales-utils.test.js +0 -102
- package/admin/src/modules/@common/utils/are-locales-compatible.js +0 -42
- package/admin/src/modules/@common/utils/format-number.js +0 -1
- package/admin/src/modules/@common/utils/functions/flatten-deep.js +0 -23
- package/admin/src/modules/@common/utils/get-default-locale.js +0 -32
- package/admin/src/modules/@common/utils/get-header-subtitle.js +0 -21
- package/admin/src/modules/@common/utils/get-header-title.js +0 -24
- package/admin/src/modules/@common/utils/get-nav.js +0 -35
- package/admin/src/modules/@common/utils/history.js +0 -6
- package/admin/src/modules/@common/utils/is-plugin-route.js +0 -15
- package/admin/src/modules/@common/utils/iso-locales-utils.js +0 -58
- package/admin/src/modules/@common/utils/redirect-to-plugin-route.js +0 -22
- package/admin/src/modules/@common/utils/sort-by-model-name.js +0 -10
- package/admin/src/modules/alerts/constants/channels.js +0 -1
- package/admin/src/modules/alerts/constants/events.js +0 -4
- package/admin/src/modules/alerts/services/alerts-service.js +0 -41
- package/admin/src/modules/localazy-download/locale/en.js +0 -25
- package/admin/src/modules/localazy-download/services/download-alerts-service.js +0 -12
- package/admin/src/modules/localazy-download/services/localazy-download-service.js +0 -16
- package/admin/src/modules/localazy-upload/components/ReadDocsButton.js +0 -20
- package/admin/src/modules/localazy-upload/locale/en.js +0 -20
- package/admin/src/modules/localazy-upload/services/localazy-upload-service.js +0 -16
- package/admin/src/modules/localazy-upload/services/upload-alerts-service.js +0 -12
- package/admin/src/modules/login/components/LoginButton/index.js +0 -55
- package/admin/src/modules/login/components/LogoutButton/index.js +0 -49
- package/admin/src/modules/login/locale/en.js +0 -7
- package/admin/src/modules/login/services/localazy-login-service.js +0 -29
- package/admin/src/modules/plugin-settings/components/ContentTransferSetup/index.js +0 -308
- package/admin/src/modules/plugin-settings/components/ContentTransferSetupEmpty/index.js +0 -86
- package/admin/src/modules/plugin-settings/components/GlobalSettings/index.js +0 -269
- package/admin/src/modules/plugin-settings/components/Tree/index.js +0 -145
- package/admin/src/modules/plugin-settings/components/TreeItem/index.js +0 -48
- package/admin/src/modules/plugin-settings/functions/build-content-transfer-setup-schema.js +0 -57
- package/admin/src/modules/plugin-settings/functions/get-content-transfer-setup-keys-sets.js +0 -85
- package/admin/src/modules/plugin-settings/functions/has-model-changed.js +0 -75
- package/admin/src/modules/plugin-settings/locale/en.js +0 -61
- package/admin/src/modules/plugin-settings/services/plugin-settings-service.js +0 -55
- package/admin/src/modules/plugin-settings/services/strapi-model-service.js +0 -26
- package/admin/src/modules/plugin-settings/services/strapi-users-service.js +0 -26
- package/admin/src/modules/plugin-settings/utils/__tests__/get-models-tree.test.js +0 -135
- package/admin/src/modules/plugin-settings/utils/array-of-models-to-object.js +0 -6
- package/admin/src/modules/plugin-settings/utils/find-model-value-by-key.js +0 -8
- package/admin/src/modules/plugin-settings/utils/get-filtered-models-schemas.js +0 -31
- package/admin/src/modules/plugin-settings/utils/get-models-tree.js +0 -94
- package/admin/src/modules/settings/components/OverviewItem/index.js +0 -44
- package/admin/src/modules/settings/components/OverviewItemLink/index.js +0 -34
- package/admin/src/modules/settings/components/PrerequisitiesInfo/index.js +0 -28
- package/admin/src/modules/settings/locale/en.js +0 -13
- package/admin/src/modules/user/model/localazy-identity.js +0 -14
- package/admin/src/modules/user/services/localazy-user-service.js +0 -38
- package/admin/src/pages/App/index.js +0 -154
- package/admin/src/pages/Download/index.js +0 -280
- package/admin/src/pages/Index/index.js +0 -8
- package/admin/src/pages/Login/index.js +0 -109
- package/admin/src/pages/PluginSettings/index.js +0 -56
- package/admin/src/pages/Settings/index.js +0 -132
- package/admin/src/pages/Upload/index.js +0 -241
- package/admin/src/pluginId.js +0 -5
- package/admin/src/plugins/generic-connector-client.js +0 -9
- package/admin/src/state/localazy-identity.js +0 -29
- package/admin/src/tests/fixtures/all-models.js +0 -877
- package/admin/src/tests/fixtures/restaurant-model.js +0 -230
- package/admin/src/translations/en.json +0 -4
- package/admin/src/translations/fr.json +0 -1
- package/admin/src/utils/createAxiosInstance.js +0 -54
- package/admin/src/utils/getTrad.js +0 -5
- package/jest.config.js +0 -0
- package/server/bootstrap.js +0 -63
- package/server/config/development/index.js +0 -16
- package/server/config/example/index.js +0 -16
- package/server/config/index.js +0 -20
- package/server/config/local/index.js +0 -16
- package/server/config/production/index.js +0 -17
- package/server/config/schema.graphql.js +0 -21
- package/server/constants/channels.js +0 -3
- package/server/constants/events.js +0 -6
- package/server/content-types/index.js +0 -3
- package/server/controllers/index.js +0 -17
- package/server/controllers/localazy-auth-controller.js +0 -22
- package/server/controllers/localazy-project-controller.js +0 -21
- package/server/controllers/localazy-transfer-controller.js +0 -62
- package/server/controllers/localazy-user-controller.js +0 -24
- package/server/controllers/plugin-settings-controller.js +0 -31
- package/server/controllers/strapi-controller.js +0 -27
- package/server/db/model/content-transfer-setup.js +0 -13
- package/server/db/model/localazy-user.js +0 -23
- package/server/db/model/plugin-settings.js +0 -13
- package/server/db/model/utils/get-strapi-store.js +0 -9
- package/server/destroy.js +0 -5
- package/server/functions/should-set-downloaded-property.js +0 -94
- package/server/index.js +0 -25
- package/server/lifecycles/deep-populate-hook.js +0 -12
- package/server/lifecycles/deprecate-event-entry-in-localazy-hook.js +0 -73
- package/server/lifecycles/upload-event-entry-to-localazy-hook.js +0 -36
- package/server/middlewares/index.js +0 -7
- package/server/middlewares/verify-webhook.js +0 -76
- package/server/models/supported-content-type-fields.js +0 -9
- package/server/models/supported-custom-field-plugins.js +0 -6
- package/server/policies/index.js +0 -3
- package/server/register.js +0 -5
- package/server/routes/index.js +0 -28
- package/server/routes/localazy-auth.js +0 -22
- package/server/routes/localazy-project.js +0 -14
- package/server/routes/localazy-public-transfer.js +0 -20
- package/server/routes/localazy-transfer.js +0 -22
- package/server/routes/localazy-user.js +0 -30
- package/server/routes/plugin-settings.js +0 -38
- package/server/routes/strapi.js +0 -38
- package/server/services/helpers/job-notification-service.js +0 -30
- package/server/services/helpers/plugin-settings-service-helper.js +0 -52
- package/server/services/index.js +0 -23
- package/server/services/localazy-pubapi-service.js +0 -53
- package/server/services/localazy-transfer-download-service.js +0 -445
- package/server/services/localazy-transfer-upload-service.js +0 -178
- package/server/services/localazy-upload-service.js +0 -52
- package/server/services/localazy-user-service.js +0 -29
- package/server/services/plugin-settings-service.js +0 -53
- package/server/services/strapi-i18n-service.js +0 -151
- package/server/services/strapi-localazy-i18n-service.js +0 -130
- package/server/services/strapi-service.js +0 -26
- package/server/tests/fixtures/all-models.js +0 -869
- package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-cookbook.js +0 -5761
- package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-lesson-dz.js +0 -402
- package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-page-dz.js +0 -658
- package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-restaurant-simple-menu.js +0 -536
- package/server/tests/fixtures/parsed-localazy-entry-to-update-entry.js +0 -35157
- package/server/tests/fixtures/populate-create-update-entry-with-base-entry-cookbook-empty-recipes.js +0 -202
- package/server/tests/fixtures/populate-create-update-entry-with-base-entry-cookbook.js +0 -2700
- package/server/tests/fixtures/populate-create-update-entry-with-base-entry-lesson-dz.js +0 -309
- package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-flat-simple.js +0 -47
- package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-flat-with-media.js +0 -169
- package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-menu-empty.js +0 -3003
- package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-menu-with-media.js +0 -2057
- package/server/tests/fixtures/populate-create-update-entry-with-base-entry-sample-json-dz.js +0 -884
- package/server/tests/fixtures/populate-create-update-entry-with-base-entry-sample-json.js +0 -46
- package/server/tests/fixtures/strapi-plugin-all-models.js +0 -7000
- package/server/utils/__tests__/build-populate.test.js +0 -85
- package/server/utils/__tests__/flatten-object.test.js +0 -171
- package/server/utils/__tests__/get-models-tree.test.js +0 -170
- package/server/utils/__tests__/iso-locales-utils.test.js +0 -104
- package/server/utils/__tests__/parsed-localazy-entry-to-create-entry.test.js +0 -258
- package/server/utils/__tests__/parsed-localazy-entry-to-update-entry.test.js +0 -456
- package/server/utils/__tests__/pick-entries.test.js +0 -963
- package/server/utils/__tests__/populate-create-update-entry-with-base-entry.test.js +0 -1176
- package/server/utils/build-populate.js +0 -48
- package/server/utils/delay.js +0 -6
- package/server/utils/flatten-object.js +0 -61
- package/server/utils/generate-random-id.js +0 -3
- package/server/utils/get-full-populate-object.js +0 -66
- package/server/utils/get-main-keys-of-nested-array-objects.js +0 -5
- package/server/utils/get-models-tree.js +0 -47
- package/server/utils/get-picked-flatten-keys-for-hook-entry.js +0 -270
- package/server/utils/intl-display-name.js +0 -4
- package/server/utils/is-generally-applicable-content-type.js +0 -33
- package/server/utils/is-localazy-applicable-content-type.js +0 -36
- package/server/utils/iso-locales-utils.js +0 -60
- package/server/utils/localazy-api-client-factory.js +0 -22
- package/server/utils/localazy-generic-connector-client-factory.js +0 -15
- package/server/utils/model-utils.js +0 -43
- package/server/utils/objectivise-entry.js +0 -41
- package/server/utils/omit-deep.js +0 -24
- package/server/utils/parsed-localazy-entry-to-create-entry.js +0 -194
- package/server/utils/parsed-localazy-entry-to-update-entry.js +0 -83
- package/server/utils/pick-deep.js +0 -22
- package/server/utils/pick-entries.js +0 -37
- package/server/utils/populate-create-update-entry-with-base-entry.js +0 -264
- package/server/utils/request-initiator-helper.js +0 -36
- package/server/utils/reset-array-keys-deep.js +0 -19
- package/server/utils/transfer-setup-utils.js +0 -93
- package/strapi-admin.js +0 -14
- package/strapi-server.js +0 -5
- package/test/helpers/mocks.js +0 -9
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'content-api': {
|
|
3
|
+
type: string;
|
|
4
|
+
routes: {
|
|
5
|
+
method: string;
|
|
6
|
+
path: string;
|
|
7
|
+
handler: string;
|
|
8
|
+
config: {
|
|
9
|
+
policies: any[];
|
|
10
|
+
};
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
admin: {
|
|
14
|
+
type: string;
|
|
15
|
+
routes: {
|
|
16
|
+
method: string;
|
|
17
|
+
path: string;
|
|
18
|
+
handler: string;
|
|
19
|
+
config: {
|
|
20
|
+
policies: any[];
|
|
21
|
+
};
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventType } from 'src/constants/events';
|
|
2
|
+
import { ChannelType } from '../../constants/channels';
|
|
3
|
+
import { Server as SocketIOServer } from 'socket.io';
|
|
4
|
+
export type JobNotificationServiceType = InstanceType<typeof JobNotificationService>;
|
|
5
|
+
declare class JobNotificationService {
|
|
6
|
+
private _strapio;
|
|
7
|
+
private _channel;
|
|
8
|
+
private _jobStreamIdentifier;
|
|
9
|
+
constructor(strapio: SocketIOServer);
|
|
10
|
+
setChannel(channel: ChannelType): void;
|
|
11
|
+
getStreamIdentifier(): string;
|
|
12
|
+
emit(event: EventType, data: unknown): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export default JobNotificationService;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare class PluginSettingsServiceHelper {
|
|
2
|
+
private PluginSettingsService;
|
|
3
|
+
private pluginSettings;
|
|
4
|
+
constructor();
|
|
5
|
+
setup(): Promise<void>;
|
|
6
|
+
shouldAllowAutomatedUpload(): boolean;
|
|
7
|
+
shouldAllowAutomatedCreatedTrigger(): boolean;
|
|
8
|
+
shouldAllowAutomatedUpdatedTrigger(): boolean;
|
|
9
|
+
getAutomatedUploadTriggers(): string[];
|
|
10
|
+
shouldAllowDeprecateOnDeletion(): boolean;
|
|
11
|
+
shouldAllowWebhookDownloadProcess(): boolean;
|
|
12
|
+
getWebhookAuthorId(): string | null;
|
|
13
|
+
getWebhookLanguagesCodes(): string[];
|
|
14
|
+
getUiLanguagesCodes(): string[];
|
|
15
|
+
}
|
|
16
|
+
export default PluginSettingsServiceHelper;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
LocalazyUserService: ({ strapi }: {
|
|
3
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
4
|
+
}) => {
|
|
5
|
+
getUser(): Promise<import("../db/model/localazy-user").Identity>;
|
|
6
|
+
updateUser(identity: import("../db/model/localazy-user").Identity): Promise<import("../db/model/localazy-user").Identity>;
|
|
7
|
+
deleteUser(): Promise<import("../db/model/localazy-user").Identity>;
|
|
8
|
+
};
|
|
9
|
+
StrapiService: ({ strapi }: {
|
|
10
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
11
|
+
}) => {
|
|
12
|
+
getModels(): Promise<any[]>;
|
|
13
|
+
getLocalizableModels(): Promise<any[]>;
|
|
14
|
+
getPluginVersion(): Promise<string>;
|
|
15
|
+
};
|
|
16
|
+
LocalazyPubAPIService: ({ strapi }: {
|
|
17
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
18
|
+
}) => {
|
|
19
|
+
listFiles(projectId: any): Promise<import("@localazy/api-client").File[]>;
|
|
20
|
+
getStrapiFile(projectId: any): Promise<import("@localazy/api-client").File>;
|
|
21
|
+
listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project[]>;
|
|
22
|
+
getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project>;
|
|
23
|
+
getWebhooksSecret(projectId: any): Promise<string>;
|
|
24
|
+
};
|
|
25
|
+
PluginSettingsService: ({ strapi }: {
|
|
26
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
27
|
+
}) => {
|
|
28
|
+
getContentTransferSetup(): Promise<import("../models/plugin/content-transfer-setup").ContentTransferSetup>;
|
|
29
|
+
updateContentTransferSetup(setup: any): Promise<{
|
|
30
|
+
has_setup: boolean;
|
|
31
|
+
setup: any;
|
|
32
|
+
}>;
|
|
33
|
+
getPluginSettings(): Promise<import("../db/model/plugin-settings").PluginSettings>;
|
|
34
|
+
updatePluginSettings(settings: any): Promise<any>;
|
|
35
|
+
};
|
|
36
|
+
LocalazyTransferUploadService: ({ strapi }: {
|
|
37
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
38
|
+
}) => {
|
|
39
|
+
upload({ notificationService }: {
|
|
40
|
+
notificationService: import("./helpers/job-notification-service").default;
|
|
41
|
+
}): Promise<void>;
|
|
42
|
+
};
|
|
43
|
+
LocalazyTransferDownloadService: ({ strapi }: {
|
|
44
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
45
|
+
}) => {
|
|
46
|
+
download({ notificationService }: {
|
|
47
|
+
notificationService: import("./helpers/job-notification-service").default;
|
|
48
|
+
}): Promise<void>;
|
|
49
|
+
};
|
|
50
|
+
StrapiI18nService: ({ strapi }: {
|
|
51
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
52
|
+
}) => {
|
|
53
|
+
getLocales(): Promise<import("../models/strapi/locale").Locale[]>;
|
|
54
|
+
getDefaultLocaleCode(): Promise<string>;
|
|
55
|
+
createStrapiLocale(isoLocalazy: string): Promise<import("../models/strapi/locale").Locale>;
|
|
56
|
+
parseLocalazyKey(key: string): {
|
|
57
|
+
uid: string;
|
|
58
|
+
id: string;
|
|
59
|
+
rest: string[];
|
|
60
|
+
};
|
|
61
|
+
getEntryInLocale(modelUid: import("@strapi/types/dist/uid").ContentType, documentId: string, isoStrapi: string): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
|
|
62
|
+
createLocalizationForAnExistingEntry(uid: import("@strapi/types/dist/uid").ContentType, baseEntry: any, newEntry: any): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
|
|
63
|
+
updateLocalizationForAnExistingEntry(uid: any, localizedDocumentId: any, data: any, locale: string): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
|
|
64
|
+
};
|
|
65
|
+
LocalazyUploadService: ({ strapi }: {
|
|
66
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
67
|
+
}) => {
|
|
68
|
+
upload(file: any, config?: {}): Promise<{
|
|
69
|
+
success: boolean;
|
|
70
|
+
result: import("@localazy/api-client").File & {
|
|
71
|
+
importBatch: string;
|
|
72
|
+
};
|
|
73
|
+
message?: undefined;
|
|
74
|
+
} | {
|
|
75
|
+
success: boolean;
|
|
76
|
+
message: any;
|
|
77
|
+
result?: undefined;
|
|
78
|
+
}>;
|
|
79
|
+
createImportFileRepresentation(sourceLang: string, strings: Record<string, any>): {
|
|
80
|
+
[x: string]: {
|
|
81
|
+
[x: string]: any;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
StrapiLocalazyI18nService: ({ strapi }: {
|
|
86
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
87
|
+
}) => {
|
|
88
|
+
createEntry(uid: import("@strapi/types/dist/uid").ContentType, strapiContentTypesModels: any, translatedModel: any, baseEntry: any, isoStrapi: any): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
|
|
89
|
+
updateEntry(uid: any, localizedDocumentId: string, strapiContentTypesModels: any, translatedModel: any, baseEntry: any, isoStrapi: any): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Core } from '@strapi/strapi';
|
|
2
|
+
declare const LocalazyPubAPIService: ({ strapi }: {
|
|
3
|
+
strapi: Core.Strapi;
|
|
4
|
+
}) => {
|
|
5
|
+
listFiles(projectId: any): Promise<import("@localazy/api-client").File[]>;
|
|
6
|
+
getStrapiFile(projectId: any): Promise<import("@localazy/api-client").File>;
|
|
7
|
+
listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project[]>;
|
|
8
|
+
getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project>;
|
|
9
|
+
getWebhooksSecret(projectId: any): Promise<string>;
|
|
10
|
+
};
|
|
11
|
+
export type LocalazyPubAPIServiceReturnType = ReturnType<typeof LocalazyPubAPIService>;
|
|
12
|
+
export default LocalazyPubAPIService;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Core } from '@strapi/strapi';
|
|
2
|
+
import { JobNotificationServiceType } from './helpers/job-notification-service';
|
|
3
|
+
declare const LocalazyTransferDownloadService: ({ strapi }: {
|
|
4
|
+
strapi: Core.Strapi;
|
|
5
|
+
}) => {
|
|
6
|
+
download({ notificationService }: {
|
|
7
|
+
notificationService: JobNotificationServiceType;
|
|
8
|
+
}): Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
export type LocalazyTransferDownloadServiceReturnType = ReturnType<typeof LocalazyTransferDownloadService>;
|
|
11
|
+
export default LocalazyTransferDownloadService;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Core } from '@strapi/strapi';
|
|
2
|
+
import { JobNotificationServiceType } from './helpers/job-notification-service';
|
|
3
|
+
declare const LocalazyTransferUploadService: ({ strapi }: {
|
|
4
|
+
strapi: Core.Strapi;
|
|
5
|
+
}) => {
|
|
6
|
+
upload({ notificationService }: {
|
|
7
|
+
notificationService: JobNotificationServiceType;
|
|
8
|
+
}): Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
export type LocalazyTransferUploadServiceReturnType = ReturnType<typeof LocalazyTransferUploadService>;
|
|
11
|
+
export default LocalazyTransferUploadService;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Core } from '@strapi/strapi';
|
|
2
|
+
declare const LocalazyUploadService: ({ strapi }: {
|
|
3
|
+
strapi: Core.Strapi;
|
|
4
|
+
}) => {
|
|
5
|
+
/**
|
|
6
|
+
* Upload data to Localazy.
|
|
7
|
+
* Use config to adjust the upload process.
|
|
8
|
+
* Returns status and id of a last chunk
|
|
9
|
+
*/
|
|
10
|
+
upload(file: any, config?: {}): Promise<{
|
|
11
|
+
success: boolean;
|
|
12
|
+
result: import("@localazy/api-client").File & {
|
|
13
|
+
importBatch: string;
|
|
14
|
+
};
|
|
15
|
+
message?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
success: boolean;
|
|
18
|
+
message: any;
|
|
19
|
+
result?: undefined;
|
|
20
|
+
}>;
|
|
21
|
+
createImportFileRepresentation(sourceLang: string, strings: Record<string, any>): {
|
|
22
|
+
[x: string]: {
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type LocalazyUploadServiceReturnType = ReturnType<typeof LocalazyUploadService>;
|
|
28
|
+
export default LocalazyUploadService;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Core } from '@strapi/strapi';
|
|
2
|
+
import { Identity } from '../db/model/localazy-user';
|
|
3
|
+
declare const LocalazyUserService: ({ strapi }: {
|
|
4
|
+
strapi: Core.Strapi;
|
|
5
|
+
}) => {
|
|
6
|
+
getUser(): Promise<Identity>;
|
|
7
|
+
updateUser(identity: Identity): Promise<Identity>;
|
|
8
|
+
deleteUser(): Promise<Identity>;
|
|
9
|
+
};
|
|
10
|
+
export type LocalazyUserServiceReturnType = ReturnType<typeof LocalazyUserService>;
|
|
11
|
+
export default LocalazyUserService;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Core } from '@strapi/strapi';
|
|
2
|
+
import { PluginSettings } from '../db/model/plugin-settings';
|
|
3
|
+
import { ContentTransferSetup } from '../models/plugin/content-transfer-setup';
|
|
4
|
+
declare const PluginSettingsService: ({ strapi }: {
|
|
5
|
+
strapi: Core.Strapi;
|
|
6
|
+
}) => {
|
|
7
|
+
getContentTransferSetup(): Promise<ContentTransferSetup>;
|
|
8
|
+
updateContentTransferSetup(setup: any): Promise<{
|
|
9
|
+
has_setup: boolean;
|
|
10
|
+
setup: any;
|
|
11
|
+
}>;
|
|
12
|
+
getPluginSettings(): Promise<PluginSettings>;
|
|
13
|
+
updatePluginSettings(settings: any): Promise<any>;
|
|
14
|
+
};
|
|
15
|
+
export type PluginSettingsServiceReturnType = ReturnType<typeof PluginSettingsService>;
|
|
16
|
+
export default PluginSettingsService;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Core, UID, Modules } from '@strapi/strapi';
|
|
2
|
+
import type { Locale } from '../models/strapi/locale';
|
|
3
|
+
declare const StrapiI18nService: ({ strapi }: {
|
|
4
|
+
strapi: Core.Strapi;
|
|
5
|
+
}) => {
|
|
6
|
+
getLocales(): Promise<Locale[]>;
|
|
7
|
+
getDefaultLocaleCode(): Promise<string>;
|
|
8
|
+
createStrapiLocale(isoLocalazy: string): Promise<Locale>;
|
|
9
|
+
parseLocalazyKey(key: string): {
|
|
10
|
+
uid: string;
|
|
11
|
+
id: string;
|
|
12
|
+
rest: string[];
|
|
13
|
+
};
|
|
14
|
+
getEntryInLocale(modelUid: UID.ContentType, documentId: Modules.Documents.AnyDocument['documentId'], isoStrapi: string): Promise<Modules.Documents.AnyDocument | null>;
|
|
15
|
+
createLocalizationForAnExistingEntry(uid: UID.ContentType, baseEntry: any, newEntry: any): Promise<Modules.Documents.AnyDocument>;
|
|
16
|
+
updateLocalizationForAnExistingEntry(uid: any, localizedDocumentId: any, data: any, locale: string): Promise<Modules.Documents.AnyDocument>;
|
|
17
|
+
};
|
|
18
|
+
export type StrapiI18nServiceReturnType = ReturnType<typeof StrapiI18nService>;
|
|
19
|
+
export default StrapiI18nService;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Core, UID } from '@strapi/strapi';
|
|
2
|
+
declare const StrapiLocalazyI18nService: ({ strapi }: {
|
|
3
|
+
strapi: Core.Strapi;
|
|
4
|
+
}) => {
|
|
5
|
+
createEntry(uid: UID.ContentType, strapiContentTypesModels: any, translatedModel: any, baseEntry: any, isoStrapi: any): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
|
|
6
|
+
updateEntry(uid: any, localizedDocumentId: string, strapiContentTypesModels: any, translatedModel: any, baseEntry: any, isoStrapi: any): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
|
|
7
|
+
};
|
|
8
|
+
export type StrapiLocalazyI18nServiceReturnType = ReturnType<typeof StrapiLocalazyI18nService>;
|
|
9
|
+
export default StrapiLocalazyI18nService;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Core } from '@strapi/strapi';
|
|
2
|
+
declare const StrapiService: ({ strapi }: {
|
|
3
|
+
strapi: Core.Strapi;
|
|
4
|
+
}) => {
|
|
5
|
+
getModels(): Promise<any[]>;
|
|
6
|
+
getLocalizableModels(): Promise<any[]>;
|
|
7
|
+
getPluginVersion(): Promise<string>;
|
|
8
|
+
};
|
|
9
|
+
export type StrapiServiceReturnType = ReturnType<typeof StrapiService>;
|
|
10
|
+
export default StrapiService;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const delay: (ms?: number) => Promise<unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dropPropertyDeep: (obj: any, propertyName: string, isRoot?: boolean) => any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* It is taken from the plugin
|
|
3
|
+
* https://github.com/Barelydead/strapi-plugin-populate-deep
|
|
4
|
+
* based on the issue
|
|
5
|
+
* https://github.com/strapi/strapi/issues/11836
|
|
6
|
+
*
|
|
7
|
+
* Edit: for Strapi v5, it is taken from the plugin
|
|
8
|
+
* https://github.com/NEDDL/strapi-v5-plugin-populate-deep/blob/main/server/helpers/index.js
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
declare const DEFAULT_MAX_POPULATE_DEPTH = 10;
|
|
12
|
+
declare const DEFAULT_POPULATE_DEPTH = 5;
|
|
13
|
+
export type FullPopulateObject = {
|
|
14
|
+
populate: any;
|
|
15
|
+
} | boolean | undefined;
|
|
16
|
+
declare const getFullPopulateLocalazyDownloadObject: (modelUid: string, maxDepth?: number, ignore?: string[]) => FullPopulateObject;
|
|
17
|
+
export { getFullPopulateLocalazyDownloadObject, DEFAULT_POPULATE_DEPTH, DEFAULT_MAX_POPULATE_DEPTH };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* See get-full-populate-object.ts for more details
|
|
3
|
+
*/
|
|
4
|
+
import type { UID } from '@strapi/strapi';
|
|
5
|
+
export type FullPopulateObject = {
|
|
6
|
+
populate: any;
|
|
7
|
+
} | boolean | undefined;
|
|
8
|
+
declare const getFullPopulateLocalazyUploadObject: (modelUid: UID.ContentType, maxDepth?: number, ignore?: string[]) => FullPopulateObject;
|
|
9
|
+
export { getFullPopulateLocalazyUploadObject };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* It is taken from the plugin
|
|
3
|
+
* https://github.com/Barelydead/strapi-plugin-populate-deep
|
|
4
|
+
* based on the issue
|
|
5
|
+
* https://github.com/strapi/strapi/issues/11836
|
|
6
|
+
*
|
|
7
|
+
* Edit: for Strapi v5, it is taken from the plugin
|
|
8
|
+
* https://github.com/NEDDL/strapi-v5-plugin-populate-deep/blob/main/server/helpers/index.js
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
declare const DEFAULT_MAX_POPULATE_DEPTH = 10;
|
|
12
|
+
declare const DEFAULT_POPULATE_DEPTH = 5;
|
|
13
|
+
export type FullPopulateObject = {
|
|
14
|
+
populate: any;
|
|
15
|
+
} | boolean | undefined;
|
|
16
|
+
declare const getFullPopulateObject: (modelUid: string, maxDepth?: number, ignore?: string[]) => FullPopulateObject;
|
|
17
|
+
export { getFullPopulateObject, DEFAULT_POPULATE_DEPTH, DEFAULT_MAX_POPULATE_DEPTH };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const intlDisplayName: (isoStrapi: string) => string | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const getAttribute: (model: any, attribute: any) => any;
|
|
2
|
+
declare const isComponent: (attributeObj: any) => boolean;
|
|
3
|
+
declare const isDynamicZone: (attributeObj: any) => boolean;
|
|
4
|
+
declare const isRepeatable: (attributeObj: any) => boolean;
|
|
5
|
+
declare const isRelation: (attributeObj: any) => boolean;
|
|
6
|
+
declare const findModel: (models: any, uid: any) => any;
|
|
7
|
+
export { getAttribute, isComponent, isDynamicZone, isRepeatable, isRelation, findModel };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Items positioning is done by the `toCreateEntry` function
|
|
3
|
+
*/
|
|
4
|
+
export declare const parsedLocalazyEntryToCreateEntry: (models: any, parsedLocalazyEntry: any, baseEntry: any, uid: string, locale?: string) => {
|
|
5
|
+
createEntry: Record<string, any>;
|
|
6
|
+
dynamicZoneComponentKeys: any[];
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const parsedLocalazyEntryToUpdateEntry: (allModels: any, localazyEntry: any, fullyPopulatedLocalizedEntry: any, currentEntry: any, baseEntry: any, uid: any, locale: any) => Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const populateCreateUpdateEntryWithBaseEntry: (models: any, createUpdateEntry: any, baseEntry: any, populatedLocalizedEntry: any, uid: any, locale: any) => Promise<any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Core } from '@strapi/strapi';
|
|
2
|
+
declare class RequestInitiatorHelper {
|
|
3
|
+
strapi: Core.Strapi;
|
|
4
|
+
ctx: any;
|
|
5
|
+
constructor(strapi: Core.Strapi);
|
|
6
|
+
isInitiatedByLocalazyWebhook(): boolean;
|
|
7
|
+
isInitiatedByLocalazyPluginUI(): boolean;
|
|
8
|
+
}
|
|
9
|
+
export default RequestInitiatorHelper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const resetArrayKeysDeep: (object: Record<string, any>, keysToFilter: string[]) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const findSetupModelByCollectionName: (models: any, collectionName: any) => any;
|
|
2
|
+
declare const findSetupModelByCollectionUid: (contentTransferSetup: any, strapiContentTypesModels: any, collectionUid: any) => any;
|
|
3
|
+
declare const getCollectionsNames: (setup: any) => any;
|
|
4
|
+
declare const isCollectionTransferEnabled: (models: any, collectionName: any) => boolean;
|
|
5
|
+
declare const getPickPaths: (transferSetupModelProps: any) => string[];
|
|
6
|
+
declare const getPickPathsWithComponents: (transferSetupModelProps: any) => any[];
|
|
7
|
+
export { findSetupModelByCollectionName, findSetupModelByCollectionUid, getCollectionsNames, isCollectionTransferEnabled, getPickPaths, getPickPathsWithComponents, };
|