diff --git a/infra/strapi/.gitignore b/infra/strapi/.gitignore index 902275379..e785503c6 100644 --- a/infra/strapi/.gitignore +++ b/infra/strapi/.gitignore @@ -112,3 +112,4 @@ exports dist build .strapi-updater.json +.strapi diff --git a/infra/strapi/config/middlewares.ts b/infra/strapi/config/middlewares.ts index 3ab20d955..829f5c04d 100644 --- a/infra/strapi/config/middlewares.ts +++ b/infra/strapi/config/middlewares.ts @@ -1,9 +1,9 @@ export default [ + 'strapi::logger', 'strapi::errors', 'strapi::security', 'strapi::cors', 'strapi::poweredBy', - 'strapi::logger', 'strapi::query', 'strapi::body', 'strapi::session', diff --git a/infra/strapi/package.json b/infra/strapi/package.json index 89f27dbdd..fe9145a46 100644 --- a/infra/strapi/package.json +++ b/infra/strapi/package.json @@ -11,13 +11,17 @@ }, "devDependencies": {}, "dependencies": { - "@ckeditor/strapi-plugin-ckeditor": "^0.0.9", - "@strapi/plugin-graphql": "4.14.4", - "@strapi/plugin-i18n": "4.14.4", - "@strapi/plugin-users-permissions": "4.14.4", - "@strapi/strapi": "4.14.4", + "@ckeditor/strapi-plugin-ckeditor": "^0.0.13", + "@strapi/plugin-graphql": "4.25.10", + "@strapi/plugin-i18n": "4.25.10", + "@strapi/plugin-users-permissions": "4.25.10", + "@strapi/strapi": "4.25.10", "better-sqlite3": "8.6.0", - "strapi-plugin-preview-button": "^2.2.2" + "react": "^18.0.0", + "react-dom": "^18.0.0", + "react-router-dom": "^5.2.0", + "strapi-plugin-preview-button": "^2.2.2", + "styled-components": "^5.2.1" }, "author": { "name": "A Strapi developer" diff --git a/infra/strapi/types/generated/contentTypes.d.ts b/infra/strapi/types/generated/contentTypes.d.ts index 33dd0c546..91099325a 100644 --- a/infra/strapi/types/generated/contentTypes.d.ts +++ b/infra/strapi/types/generated/contentTypes.d.ts @@ -403,9 +403,12 @@ export interface PluginUploadFile extends Schema.CollectionType { folderPath: Attribute.String & Attribute.Required & Attribute.Private & - Attribute.SetMinMax<{ - min: 1; - }>; + Attribute.SetMinMax< + { + min: 1; + }, + number + >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< @@ -441,9 +444,12 @@ export interface PluginUploadFolder extends Schema.CollectionType { attributes: { name: Attribute.String & Attribute.Required & - Attribute.SetMinMax<{ - min: 1; - }>; + Attribute.SetMinMax< + { + min: 1; + }, + number + >; pathId: Attribute.Integer & Attribute.Required & Attribute.Unique; parent: Attribute.Relation< "plugin::upload.folder", @@ -462,9 +468,12 @@ export interface PluginUploadFolder extends Schema.CollectionType { >; path: Attribute.String & Attribute.Required & - Attribute.SetMinMax<{ - min: 1; - }>; + Attribute.SetMinMax< + { + min: 1; + }, + number + >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< @@ -482,6 +491,105 @@ export interface PluginUploadFolder extends Schema.CollectionType { }; } +export interface PluginContentReleasesRelease extends Schema.CollectionType { + collectionName: "strapi_releases"; + info: { + singularName: "release"; + pluralName: "releases"; + displayName: "Release"; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + "content-manager": { + visible: false; + }; + "content-type-builder": { + visible: false; + }; + }; + attributes: { + name: Attribute.String & Attribute.Required; + releasedAt: Attribute.DateTime; + scheduledAt: Attribute.DateTime; + timezone: Attribute.String; + status: Attribute.Enumeration< + ["ready", "blocked", "failed", "done", "empty"] + > & + Attribute.Required; + actions: Attribute.Relation< + "plugin::content-releases.release", + "oneToMany", + "plugin::content-releases.release-action" + >; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + "plugin::content-releases.release", + "oneToOne", + "admin::user" + > & + Attribute.Private; + updatedBy: Attribute.Relation< + "plugin::content-releases.release", + "oneToOne", + "admin::user" + > & + Attribute.Private; + }; +} + +export interface PluginContentReleasesReleaseAction + extends Schema.CollectionType { + collectionName: "strapi_release_actions"; + info: { + singularName: "release-action"; + pluralName: "release-actions"; + displayName: "Release Action"; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + "content-manager": { + visible: false; + }; + "content-type-builder": { + visible: false; + }; + }; + attributes: { + type: Attribute.Enumeration<["publish", "unpublish"]> & Attribute.Required; + entry: Attribute.Relation< + "plugin::content-releases.release-action", + "morphToOne" + >; + contentType: Attribute.String & Attribute.Required; + locale: Attribute.String; + release: Attribute.Relation< + "plugin::content-releases.release-action", + "manyToOne", + "plugin::content-releases.release" + >; + isEntryValid: Attribute.Boolean; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + "plugin::content-releases.release-action", + "oneToOne", + "admin::user" + > & + Attribute.Private; + updatedBy: Attribute.Relation< + "plugin::content-releases.release-action", + "oneToOne", + "admin::user" + > & + Attribute.Private; + }; +} + export interface PluginI18NLocale extends Schema.CollectionType { collectionName: "i18n_locale"; info: { @@ -504,10 +612,13 @@ export interface PluginI18NLocale extends Schema.CollectionType { }; attributes: { name: Attribute.String & - Attribute.SetMinMax<{ - min: 1; - max: 50; - }>; + Attribute.SetMinMax< + { + min: 1; + max: 50; + }, + number + >; code: Attribute.String & Attribute.Unique; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; @@ -683,6 +794,7 @@ export interface ApiArticleAapArticleAap extends Schema.CollectionType { singularName: "article-aap"; pluralName: "article-aaps"; displayName: "Article AAP"; + description: ""; }; options: { draftAndPublish: true; @@ -690,15 +802,8 @@ export interface ApiArticleAapArticleAap extends Schema.CollectionType { attributes: { titre: Attribute.String; slug: Attribute.String; - contenu: Attribute.Blocks; - richcontent: Attribute.RichText & - Attribute.CustomField< - "plugin::ckeditor.CKEditor", - { - output: "HTML"; - preset: "rich"; - } - >; + contenu: Attribute.Blocks & Attribute.Required; + pj: Attribute.Media<"images" | "files" | "videos" | "audios", true>; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; publishedAt: Attribute.DateTime; @@ -730,7 +835,7 @@ export interface ApiArticleDAideArticleDAide extends Schema.CollectionType { }; attributes: { titre: Attribute.String & Attribute.Required; - vignette: Attribute.Media & Attribute.Required; + vignette: Attribute.Media<"images"> & Attribute.Required; section_d_aides: Attribute.Relation< "api::article-d-aide.article-d-aide", "manyToMany", @@ -833,7 +938,7 @@ export interface ApiArticleRegionArticleRegion extends Schema.CollectionType { preset: "rich"; } >; - vignette: Attribute.Media & Attribute.Required; + vignette: Attribute.Media<"images"> & Attribute.Required; ordre: Attribute.Integer; regions: Attribute.Relation< "api::article-region.article-region", @@ -947,7 +1052,7 @@ export interface ApiRegionRegion extends Schema.CollectionType { attributes: { nom: Attribute.String & Attribute.Required; slug: Attribute.String & Attribute.Required; - vignette: Attribute.Media & Attribute.Required; + vignette: Attribute.Media<"images"> & Attribute.Required; urlExternePRCs: Attribute.String; prcs: Attribute.JSON; ordre: Attribute.Integer; @@ -1169,6 +1274,8 @@ declare module "@strapi/types" { "admin::transfer-token-permission": AdminTransferTokenPermission; "plugin::upload.file": PluginUploadFile; "plugin::upload.folder": PluginUploadFolder; + "plugin::content-releases.release": PluginContentReleasesRelease; + "plugin::content-releases.release-action": PluginContentReleasesReleaseAction; "plugin::i18n.locale": PluginI18NLocale; "plugin::users-permissions.permission": PluginUsersPermissionsPermission; "plugin::users-permissions.role": PluginUsersPermissionsRole;