diff --git a/playground/.env b/playground/.env index 57cb1e7..3dff915 100644 --- a/playground/.env +++ b/playground/.env @@ -1,7 +1,10 @@ HOST=0.0.0.0 PORT=1337 -APP_KEYS=SIwLyqu+IpSHIuUBDQfPZg==,Nzqbq2C3ATsR19u5XEAJQA==,/Agk5Sn8M4EzfoSiIHcDlQ==,gSxT2T0k2zbQatKXUV0zCA== -API_TOKEN_SALT=reQcUBbGXD2KWG2QpRn7DA== -ADMIN_JWT_SECRET= 69mzgwRGfEBUhPEaas8EBA== -TRANSFER_TOKEN_SALT=/LTsSGpC5afHICjZu0oEuQ== -JWT_SECRET=E0TTVdsr+M/FXAjfrNIgXA== +APP_KEYS=ujfpKPEst1tv0WDxJEhjJw==,MOnFjWYKbWYmtrBZ3cQTFQ==,zQpX70tJw/Mw+Y656kXfVA==,xJT1vbsiz3cgabfgpLu72w== +API_TOKEN_SALT=5FoJkYoZV8IA6+NnZJDzng== +ADMIN_JWT_SECRET=tkeg3+HqE+QmTd2ITEivtA== +TRANSFER_TOKEN_SALT=UUMCRQ2cx9qvKw/RkB815Q== +# Database +DATABASE_CLIENT=sqlite +DATABASE_FILENAME=.tmp/data.db +JWT_SECRET=Dn/nUGQsREUw4/lfQYOScw== diff --git a/playground/.env.example b/playground/.env.example index b667b6c..ebfc96a 100644 --- a/playground/.env.example +++ b/playground/.env.example @@ -1,2 +1,7 @@ HOST=0.0.0.0 PORT=1337 +APP_KEYS="toBeModified1,toBeModified2" +API_TOKEN_SALT=tobemodified +ADMIN_JWT_SECRET=tobemodified +TRANSFER_TOKEN_SALT=tobemodified +JWT_SECRET=tobemodified diff --git a/playground/.strapi/client/app.js b/playground/.strapi/client/app.js new file mode 100644 index 0000000..32daad9 --- /dev/null +++ b/playground/.strapi/client/app.js @@ -0,0 +1,14 @@ +/** + * This file was automatically generated by Strapi. + * Any modifications made will be discarded. + */ +import usersPermissions from "@strapi/plugin-users-permissions/strapi-admin"; +import strapiCloud from "@strapi/plugin-cloud/strapi-admin"; +import { renderAdmin } from "@strapi/strapi/admin"; + +renderAdmin(document.getElementById("strapi"), { + plugins: { + "users-permissions": usersPermissions, + "strapi-cloud": strapiCloud, + }, +}); diff --git a/playground/.strapi/client/index.html b/playground/.strapi/client/index.html new file mode 100644 index 0000000..4e9d27c --- /dev/null +++ b/playground/.strapi/client/index.html @@ -0,0 +1,63 @@ + + + + + + + + + Strapi Admin + + + +
+ + + + diff --git a/playground/README.md b/playground/README.md index 4d901a0..879d89b 100644 --- a/playground/README.md +++ b/playground/README.md @@ -1,3 +1,57 @@ -# Strapi application +# 🚀 Getting started with Strapi -A quick description of your strapi application +Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/dev-docs/cli) (CLI) which lets you scaffold and manage your project in seconds. + +### `develop` + +Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-develop) + +``` +npm run develop +# or +yarn develop +``` + +### `start` + +Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-start) + +``` +npm run start +# or +yarn start +``` + +### `build` + +Build your admin panel. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-build) + +``` +npm run build +# or +yarn build +``` + +## ⚙️ Deployment + +Strapi gives you many possible deployment options for your project including [Strapi Cloud](https://cloud.strapi.io). Browse the [deployment section of the documentation](https://docs.strapi.io/dev-docs/deployment) to find the best solution for your use case. + +## 📚 Learn more + +- [Resource center](https://strapi.io/resource-center) - Strapi resource center. +- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation. +- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community. +- [Strapi blog](https://strapi.io/blog) - Official Strapi blog containing articles made by the Strapi team and the community. +- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements. + +Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome! + +## ✨ Community + +- [Discord](https://discord.strapi.io) - Come chat with the Strapi community including the core team. +- [Forum](https://forum.strapi.io/) - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members. +- [Awesome Strapi](https://github.com/strapi/awesome-strapi) - A curated list of awesome things related to Strapi. + +--- + +🤫 Psst! [Strapi is hiring](https://strapi.io/careers). diff --git a/playground/config/admin.js b/playground/config/admin.js index 15a268c..fa18851 100644 --- a/playground/config/admin.js +++ b/playground/config/admin.js @@ -1,10 +1,7 @@ module.exports = ({ env }) => ({ auth: { - secret: env('ADMIN_JWT_SECRET', 'c27c3833823a12b0761e32b22dc0113a'), + secret: env('ADMIN_JWT_SECRET'), }, - watchIgnoreFiles: [ - '**/config/sync/**', - ], apiToken: { salt: env('API_TOKEN_SALT'), }, @@ -13,4 +10,8 @@ module.exports = ({ env }) => ({ salt: env('TRANSFER_TOKEN_SALT'), }, }, + flags: { + nps: env.bool('FLAG_NPS', true), + promoteEE: env.bool('FLAG_PROMOTE_EE', true), + }, }); diff --git a/playground/config/middlewares.js b/playground/config/middlewares.js index f6e65b6..6eaf586 100644 --- a/playground/config/middlewares.js +++ b/playground/config/middlewares.js @@ -1,11 +1,12 @@ module.exports = [ + 'strapi::logger', 'strapi::errors', 'strapi::security', 'strapi::cors', 'strapi::poweredBy', - 'strapi::logger', 'strapi::query', 'strapi::body', + 'strapi::session', 'strapi::favicon', 'strapi::public', ]; diff --git a/playground/config/server.js b/playground/config/server.js index d3f42a3..039daec 100644 --- a/playground/config/server.js +++ b/playground/config/server.js @@ -1,4 +1,10 @@ module.exports = ({ env }) => ({ host: env('HOST', '0.0.0.0'), port: env.int('PORT', 1337), + app: { + keys: env.array('APP_KEYS'), + }, + webhooks: { + populateRelations: env.bool('WEBHOOKS_POPULATE_RELATIONS', false), + }, }); diff --git a/playground/database/migrations/.gitkeep b/playground/database/migrations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/playground/favicon.ico b/playground/favicon.ico deleted file mode 100644 index 03eec51..0000000 Binary files a/playground/favicon.ico and /dev/null differ diff --git a/playground/favicon.png b/playground/favicon.png new file mode 100644 index 0000000..df668a8 Binary files /dev/null and b/playground/favicon.png differ diff --git a/playground/jest.config.js b/playground/jest.config.js deleted file mode 100644 index 7891cc8..0000000 --- a/playground/jest.config.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - name: 'Integration test', - testMatch: ['**/__tests__/?(*.)+(spec|test).js'], - transform: {}, - coverageDirectory: '../coverage/', - collectCoverage: true, -}; diff --git a/playground/jsconfig.json b/playground/jsconfig.json new file mode 100644 index 0000000..4ebd927 --- /dev/null +++ b/playground/jsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "moduleResolution": "nodenext", + "target": "ES2021", + "checkJs": true, + "allowJs": true + } +} diff --git a/playground/package.json b/playground/package.json index 4e17df6..47976b0 100644 --- a/playground/package.json +++ b/playground/package.json @@ -1,5 +1,5 @@ { - "name": "playground", + "name": "strapi-5-beta", "private": true, "version": "0.1.0", "description": "A Strapi application", @@ -10,30 +10,26 @@ "strapi": "strapi", "cs": "config-sync" }, - "devDependencies": { - "jest": "^29.7.0", - "jest-cli": "^29.7.0", - "supertest": "^6.3.3" - }, + "devDependencies": {}, "dependencies": { - "@strapi/plugin-i18n": "^5.0.0-beta.5", - "@strapi/plugin-users-permissions": "^5.0.0-beta.5", - "@strapi/strapi": "^5.0.0-beta.5", - "better-sqlite3": "^8.6.0", + "@strapi/strapi": "5.0.0-beta.2", + "@strapi/plugin-users-permissions": "5.0.0-beta.2", + "@strapi/plugin-cloud": "5.0.0-beta.2", + "better-sqlite3": "9.4.3", "react": "^18.0.0", "react-dom": "^18.0.0", - "react-router-dom": "^5.2.0", + "react-router-dom": "^6.0.0", "strapi-plugin-config-sync": "./..", - "styled-components": "^5.2.1" + "styled-components": "5.3.3" }, "author": { "name": "A Strapi developer" }, "strapi": { - "uuid": "2e84e366-1e09-43c2-a99f-a0d0acbc2ca5" + "uuid": "edadddbd-0f25-4da7-833b-d4cd7dcae2fc" }, "engines": { - "node": ">=18.x.x <=20.x.x", + "node": ">=18.0.0 <=20.x.x", "npm": ">=6.0.0" }, "license": "MIT" diff --git a/playground/types/generated/components.d.ts b/playground/types/generated/components.d.ts new file mode 100644 index 0000000..29587e8 --- /dev/null +++ b/playground/types/generated/components.d.ts @@ -0,0 +1,5 @@ +import type { Struct, Schema } from '@strapi/strapi'; + +declare module '@strapi/strapi' { + export module Public {} +} diff --git a/playground/types/generated/contentTypes.d.ts b/playground/types/generated/contentTypes.d.ts new file mode 100644 index 0000000..8c88413 --- /dev/null +++ b/playground/types/generated/contentTypes.d.ts @@ -0,0 +1,730 @@ +import type { Struct, Schema } from '@strapi/strapi'; + +export interface AdminPermission extends Struct.CollectionTypeSchema { + collectionName: 'admin_permissions'; + info: { + name: 'Permission'; + description: ''; + singularName: 'permission'; + pluralName: 'permissions'; + displayName: 'Permission'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + action: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + actionParameters: Schema.Attribute.JSON & Schema.Attribute.DefaultTo<{}>; + subject: Schema.Attribute.String & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + properties: Schema.Attribute.JSON & Schema.Attribute.DefaultTo<{}>; + conditions: Schema.Attribute.JSON & Schema.Attribute.DefaultTo<[]>; + role: Schema.Attribute.Relation<'manyToOne', 'admin::role'>; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface AdminUser extends Struct.CollectionTypeSchema { + collectionName: 'admin_users'; + info: { + name: 'User'; + description: ''; + singularName: 'user'; + pluralName: 'users'; + displayName: 'User'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + firstname: Schema.Attribute.String & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + lastname: Schema.Attribute.String & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + username: Schema.Attribute.String; + email: Schema.Attribute.Email & + Schema.Attribute.Required & + Schema.Attribute.Private & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 6; + }>; + password: Schema.Attribute.Password & + Schema.Attribute.Private & + Schema.Attribute.SetMinMaxLength<{ + minLength: 6; + }>; + resetPasswordToken: Schema.Attribute.String & Schema.Attribute.Private; + registrationToken: Schema.Attribute.String & Schema.Attribute.Private; + isActive: Schema.Attribute.Boolean & + Schema.Attribute.Private & + Schema.Attribute.DefaultTo; + roles: Schema.Attribute.Relation<'manyToMany', 'admin::role'> & + Schema.Attribute.Private; + blocked: Schema.Attribute.Boolean & + Schema.Attribute.Private & + Schema.Attribute.DefaultTo; + preferedLanguage: Schema.Attribute.String; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface AdminRole extends Struct.CollectionTypeSchema { + collectionName: 'admin_roles'; + info: { + name: 'Role'; + description: ''; + singularName: 'role'; + pluralName: 'roles'; + displayName: 'Role'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + name: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + code: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + description: Schema.Attribute.String; + users: Schema.Attribute.Relation<'manyToMany', 'admin::user'>; + permissions: Schema.Attribute.Relation<'oneToMany', 'admin::permission'>; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface AdminApiToken extends Struct.CollectionTypeSchema { + collectionName: 'strapi_api_tokens'; + info: { + name: 'Api Token'; + singularName: 'api-token'; + pluralName: 'api-tokens'; + displayName: 'Api Token'; + description: ''; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + name: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + description: Schema.Attribute.String & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }> & + Schema.Attribute.DefaultTo<''>; + type: Schema.Attribute.Enumeration<['read-only', 'full-access', 'custom']> & + Schema.Attribute.Required & + Schema.Attribute.DefaultTo<'read-only'>; + accessKey: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + lastUsedAt: Schema.Attribute.DateTime; + permissions: Schema.Attribute.Relation< + 'oneToMany', + 'admin::api-token-permission' + >; + expiresAt: Schema.Attribute.DateTime; + lifespan: Schema.Attribute.BigInteger; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface AdminApiTokenPermission extends Struct.CollectionTypeSchema { + collectionName: 'strapi_api_token_permissions'; + info: { + name: 'API Token Permission'; + description: ''; + singularName: 'api-token-permission'; + pluralName: 'api-token-permissions'; + displayName: 'API Token Permission'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + action: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + token: Schema.Attribute.Relation<'manyToOne', 'admin::api-token'>; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface AdminTransferToken extends Struct.CollectionTypeSchema { + collectionName: 'strapi_transfer_tokens'; + info: { + name: 'Transfer Token'; + singularName: 'transfer-token'; + pluralName: 'transfer-tokens'; + displayName: 'Transfer Token'; + description: ''; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + name: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + description: Schema.Attribute.String & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }> & + Schema.Attribute.DefaultTo<''>; + accessKey: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + lastUsedAt: Schema.Attribute.DateTime; + permissions: Schema.Attribute.Relation< + 'oneToMany', + 'admin::transfer-token-permission' + >; + expiresAt: Schema.Attribute.DateTime; + lifespan: Schema.Attribute.BigInteger; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface AdminTransferTokenPermission + extends Struct.CollectionTypeSchema { + collectionName: 'strapi_transfer_token_permissions'; + info: { + name: 'Transfer Token Permission'; + description: ''; + singularName: 'transfer-token-permission'; + pluralName: 'transfer-token-permissions'; + displayName: 'Transfer Token Permission'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + action: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + token: Schema.Attribute.Relation<'manyToOne', 'admin::transfer-token'>; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface PluginUploadFile extends Struct.CollectionTypeSchema { + collectionName: 'files'; + info: { + singularName: 'file'; + pluralName: 'files'; + displayName: 'File'; + description: ''; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + name: Schema.Attribute.String & Schema.Attribute.Required; + alternativeText: Schema.Attribute.String; + caption: Schema.Attribute.String; + width: Schema.Attribute.Integer; + height: Schema.Attribute.Integer; + formats: Schema.Attribute.JSON; + hash: Schema.Attribute.String & Schema.Attribute.Required; + ext: Schema.Attribute.String; + mime: Schema.Attribute.String & Schema.Attribute.Required; + size: Schema.Attribute.Decimal & Schema.Attribute.Required; + url: Schema.Attribute.String & Schema.Attribute.Required; + previewUrl: Schema.Attribute.String; + provider: Schema.Attribute.String & Schema.Attribute.Required; + provider_metadata: Schema.Attribute.JSON; + related: Schema.Attribute.Relation<'morphToMany'>; + folder: Schema.Attribute.Relation<'manyToOne', 'plugin::upload.folder'> & + Schema.Attribute.Private; + folderPath: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Private & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface PluginUploadFolder extends Struct.CollectionTypeSchema { + collectionName: 'upload_folders'; + info: { + singularName: 'folder'; + pluralName: 'folders'; + displayName: 'Folder'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + name: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + pathId: Schema.Attribute.Integer & + Schema.Attribute.Required & + Schema.Attribute.Unique; + parent: Schema.Attribute.Relation<'manyToOne', 'plugin::upload.folder'>; + children: Schema.Attribute.Relation<'oneToMany', 'plugin::upload.folder'>; + files: Schema.Attribute.Relation<'oneToMany', 'plugin::upload.file'>; + path: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface PluginI18NLocale extends Struct.CollectionTypeSchema { + collectionName: 'i18n_locale'; + info: { + singularName: 'locale'; + pluralName: 'locales'; + collectionName: 'locales'; + displayName: 'Locale'; + description: ''; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + name: Schema.Attribute.String & + Schema.Attribute.SetMinMax< + { + min: 1; + max: 50; + }, + number + >; + code: Schema.Attribute.String & Schema.Attribute.Unique; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface PluginContentReleasesRelease + extends Struct.CollectionTypeSchema { + 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: Schema.Attribute.String & Schema.Attribute.Required; + releasedAt: Schema.Attribute.DateTime; + scheduledAt: Schema.Attribute.DateTime; + timezone: Schema.Attribute.String; + status: Schema.Attribute.Enumeration< + ['ready', 'blocked', 'failed', 'done', 'empty'] + > & + Schema.Attribute.Required; + actions: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::content-releases.release-action' + >; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface PluginContentReleasesReleaseAction + extends Struct.CollectionTypeSchema { + 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: Schema.Attribute.Enumeration<['publish', 'unpublish']> & + Schema.Attribute.Required; + entry: Schema.Attribute.Relation<'morphToOne'>; + contentType: Schema.Attribute.String & Schema.Attribute.Required; + locale: Schema.Attribute.String; + release: Schema.Attribute.Relation< + 'manyToOne', + 'plugin::content-releases.release' + >; + isEntryValid: Schema.Attribute.Boolean; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface PluginUsersPermissionsPermission + extends Struct.CollectionTypeSchema { + collectionName: 'up_permissions'; + info: { + name: 'permission'; + description: ''; + singularName: 'permission'; + pluralName: 'permissions'; + displayName: 'Permission'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + action: Schema.Attribute.String & Schema.Attribute.Required; + role: Schema.Attribute.Relation< + 'manyToOne', + 'plugin::users-permissions.role' + >; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface PluginUsersPermissionsRole + extends Struct.CollectionTypeSchema { + collectionName: 'up_roles'; + info: { + name: 'role'; + description: ''; + singularName: 'role'; + pluralName: 'roles'; + displayName: 'Role'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + name: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 3; + }>; + description: Schema.Attribute.String; + type: Schema.Attribute.String & Schema.Attribute.Unique; + permissions: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::users-permissions.permission' + >; + users: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::users-permissions.user' + >; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +export interface PluginUsersPermissionsUser + extends Struct.CollectionTypeSchema { + collectionName: 'up_users'; + info: { + name: 'user'; + description: ''; + singularName: 'user'; + pluralName: 'users'; + displayName: 'User'; + }; + options: { + timestamps: true; + draftAndPublish: false; + }; + attributes: { + username: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 3; + }>; + email: Schema.Attribute.Email & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 6; + }>; + provider: Schema.Attribute.String; + password: Schema.Attribute.Password & + Schema.Attribute.Private & + Schema.Attribute.SetMinMaxLength<{ + minLength: 6; + }>; + resetPasswordToken: Schema.Attribute.String & Schema.Attribute.Private; + confirmationToken: Schema.Attribute.String & Schema.Attribute.Private; + confirmed: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo; + blocked: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo; + role: Schema.Attribute.Relation< + 'manyToOne', + 'plugin::users-permissions.role' + >; + createdAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + publishedAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + locale: Schema.Attribute.String; + }; +} + +declare module '@strapi/strapi' { + export module Public { + export interface ContentTypeSchemas { + 'admin::permission': AdminPermission; + 'admin::user': AdminUser; + 'admin::role': AdminRole; + 'admin::api-token': AdminApiToken; + 'admin::api-token-permission': AdminApiTokenPermission; + 'admin::transfer-token': AdminTransferToken; + 'admin::transfer-token-permission': AdminTransferTokenPermission; + 'plugin::upload.file': PluginUploadFile; + 'plugin::upload.folder': PluginUploadFolder; + 'plugin::i18n.locale': PluginI18NLocale; + 'plugin::content-releases.release': PluginContentReleasesRelease; + 'plugin::content-releases.release-action': PluginContentReleasesReleaseAction; + 'plugin::users-permissions.permission': PluginUsersPermissionsPermission; + 'plugin::users-permissions.role': PluginUsersPermissionsRole; + 'plugin::users-permissions.user': PluginUsersPermissionsUser; + } + } +}