diff --git a/package.json b/package.json index 6bb85c2..f56fc09 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ohp/web-server", - "version": "0.8.0", + "version": "0.9.0", "private": true, "engines": { "node": ">=18.0.0 <=20.x.x", diff --git a/src/api/activity/content-types/activity/schema.json b/src/api/activity/content-types/activity/schema.json index ac91f57..7573746 100644 --- a/src/api/activity/content-types/activity/schema.json +++ b/src/api/activity/content-types/activity/schema.json @@ -198,6 +198,12 @@ }, "component": "business.cooperation", "required": true + }, + "messages": { + "type": "relation", + "relation": "oneToMany", + "target": "api::message.message", + "mappedBy": "activity" } } } diff --git a/src/api/message/content-types/message/schema.json b/src/api/message/content-types/message/schema.json new file mode 100644 index 0000000..efa20d0 --- /dev/null +++ b/src/api/message/content-types/message/schema.json @@ -0,0 +1,44 @@ +{ + "kind": "collectionType", + "collectionName": "messages", + "info": { + "singularName": "message", + "pluralName": "messages", + "displayName": "Message", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "title": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "string", + "required": true + }, + "content": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "text", + "required": true + }, + "activity": { + "type": "relation", + "relation": "manyToOne", + "target": "api::activity.activity", + "inversedBy": "messages" + } + } +} diff --git a/src/api/message/controllers/message.ts b/src/api/message/controllers/message.ts new file mode 100644 index 0000000..e521cf1 --- /dev/null +++ b/src/api/message/controllers/message.ts @@ -0,0 +1,7 @@ +/** + * message controller + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreController('api::message.message'); diff --git a/src/api/message/routes/message.ts b/src/api/message/routes/message.ts new file mode 100644 index 0000000..745ba48 --- /dev/null +++ b/src/api/message/routes/message.ts @@ -0,0 +1,7 @@ +/** + * message router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::message.message'); diff --git a/src/api/message/services/message.ts b/src/api/message/services/message.ts new file mode 100644 index 0000000..133c2eb --- /dev/null +++ b/src/api/message/services/message.ts @@ -0,0 +1,7 @@ +/** + * message service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::message.message'); diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index c338ca3..b223b91 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -362,228 +362,119 @@ export interface AdminTransferTokenPermission extends Schema.CollectionType { }; } -export interface ApiActivityActivity extends Schema.CollectionType { - collectionName: 'activities'; +export interface PluginUploadFile extends Schema.CollectionType { + collectionName: 'files'; info: { - singularName: 'activity'; - pluralName: 'activities'; - displayName: 'Activity'; + singularName: 'file'; + pluralName: 'files'; + displayName: 'File'; description: ''; }; - options: { - draftAndPublish: true; - }; pluginOptions: { - i18n: { - localized: true; + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; }; }; attributes: { - name: Attribute.String & - Attribute.Required & - Attribute.Unique & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - displayName: Attribute.String & - Attribute.Required & - Attribute.Unique & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - ribbon: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - summary: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - detail: Attribute.RichText & - Attribute.Required & - Attribute.CustomField< - 'plugin::ckeditor.CKEditor', - { - output: 'HTML'; - preset: 'rich'; - } - > & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - banners: Attribute.Media & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - status: Attribute.Enumeration< - ['planning', 'pendingApproval', 'online', 'offline'] + name: Attribute.String & Attribute.Required; + alternativeText: Attribute.String; + caption: Attribute.String; + width: Attribute.Integer; + height: Attribute.Integer; + formats: Attribute.JSON; + hash: Attribute.String & Attribute.Required; + ext: Attribute.String; + mime: Attribute.String & Attribute.Required; + size: Attribute.Decimal & Attribute.Required; + url: Attribute.String & Attribute.Required; + previewUrl: Attribute.String; + provider: Attribute.String & Attribute.Required; + provider_metadata: Attribute.JSON; + related: Attribute.Relation<'plugin::upload.file', 'morphToMany'>; + folder: Attribute.Relation< + 'plugin::upload.file', + 'manyToOne', + 'plugin::upload.folder' > & + Attribute.Private; + folderPath: Attribute.String & Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }> & - Attribute.DefaultTo<'planning'>; - creator: Attribute.Relation< - 'api::activity.activity', - 'oneToOne', - 'plugin::users-permissions.user' - >; - maxEnrollment: Attribute.Integer & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }> & + Attribute.Private & Attribute.SetMinMax<{ - min: 0; - }>; - tags: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - eventStartedAt: Attribute.DateTime & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - eventEndedAt: Attribute.DateTime & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - enrollmentStartedAt: Attribute.DateTime & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - enrollmentEndedAt: Attribute.DateTime & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - judgeStartedAt: Attribute.DateTime & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - judgeEndedAt: Attribute.DateTime & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - gitTemplates: Attribute.Component<'common.multiple-text', true> & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - enrollments: Attribute.Relation< - 'api::activity.activity', - 'oneToMany', - 'api::enrollment.enrollment' - >; - questionnaire: Attribute.Relation< - 'api::activity.activity', - 'oneToOne', - 'api::questionnaire.questionnaire' - >; - cooperations: Attribute.Component<'business.cooperation', true> & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; + min: 1; }>; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; - publishedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'api::activity.activity', + 'plugin::upload.file', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'api::activity.activity', + 'plugin::upload.file', 'oneToOne', 'admin::user' > & Attribute.Private; - localizations: Attribute.Relation< - 'api::activity.activity', - 'oneToMany', - 'api::activity.activity' - >; - locale: Attribute.String; }; } -export interface ApiEnrollmentEnrollment extends Schema.CollectionType { - collectionName: 'enrollments'; +export interface PluginUploadFolder extends Schema.CollectionType { + collectionName: 'upload_folders'; info: { - singularName: 'enrollment'; - pluralName: 'enrollments'; - displayName: 'Enrollment'; + singularName: 'folder'; + pluralName: 'folders'; + displayName: 'Folder'; }; - options: { - draftAndPublish: false; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; }; attributes: { - activity: Attribute.Relation< - 'api::enrollment.enrollment', + name: Attribute.String & + Attribute.Required & + Attribute.SetMinMax<{ + min: 1; + }>; + pathId: Attribute.Integer & Attribute.Required & Attribute.Unique; + parent: Attribute.Relation< + 'plugin::upload.folder', 'manyToOne', - 'api::activity.activity' + 'plugin::upload.folder' >; - user: Attribute.Relation< - 'api::enrollment.enrollment', - 'manyToOne', - 'plugin::users-permissions.user' + children: Attribute.Relation< + 'plugin::upload.folder', + 'oneToMany', + 'plugin::upload.folder' >; - status: Attribute.Enumeration< - ['none', 'pendingApproval', 'approved', 'rejected'] - > & + files: Attribute.Relation< + 'plugin::upload.folder', + 'oneToMany', + 'plugin::upload.file' + >; + path: Attribute.String & Attribute.Required & - Attribute.DefaultTo<'none'>; - extensions: Attribute.JSON; + Attribute.SetMinMax<{ + min: 1; + }>; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'api::enrollment.enrollment', + 'plugin::upload.folder', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'api::enrollment.enrollment', + 'plugin::upload.folder', 'oneToOne', 'admin::user' > & @@ -591,132 +482,104 @@ export interface ApiEnrollmentEnrollment extends Schema.CollectionType { }; } -export interface ApiOrganizationOrganization extends Schema.CollectionType { - collectionName: 'organizations'; +export interface PluginReactIconsIconlibrary extends Schema.CollectionType { + collectionName: 'iconlibrary'; info: { - singularName: 'organization'; - pluralName: 'organizations'; - displayName: 'Organization'; - description: ''; + singularName: 'iconlibrary'; + pluralName: 'iconlibraries'; + displayName: 'IconLibrary'; }; options: { draftAndPublish: false; + comment: ''; }; pluginOptions: { - i18n: { - localized: true; + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; }; }; attributes: { - name: Attribute.String & + name: Attribute.String & Attribute.Required; + abbreviation: Attribute.String & Attribute.Required & Attribute.Unique & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - description: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - logo: Attribute.Media & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - url: Attribute.String & - Attribute.Unique & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; + Attribute.SetMinMaxLength<{ + maxLength: 3; }>; + isEnabled: Attribute.Boolean & Attribute.DefaultTo; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'api::organization.organization', + 'plugin::react-icons.iconlibrary', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'api::organization.organization', + 'plugin::react-icons.iconlibrary', 'oneToOne', 'admin::user' > & Attribute.Private; - localizations: Attribute.Relation< - 'api::organization.organization', - 'oneToMany', - 'api::organization.organization' - >; - locale: Attribute.String; }; } -export interface ApiQuestionnaireQuestionnaire extends Schema.CollectionType { - collectionName: 'questionnaires'; +export interface PluginI18NLocale extends Schema.CollectionType { + collectionName: 'i18n_locale'; info: { - singularName: 'questionnaire'; - pluralName: 'questionnaires'; - displayName: 'Questionnaire'; + singularName: 'locale'; + pluralName: 'locales'; + collectionName: 'locales'; + displayName: 'Locale'; + description: ''; }; options: { - draftAndPublish: true; + draftAndPublish: false; }; pluginOptions: { - i18n: { - localized: true; + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; }; }; attributes: { - activity: Attribute.Relation< - 'api::questionnaire.questionnaire', - 'oneToOne', - 'api::activity.activity' - >; - extensions: Attribute.Component<'form.field', true> & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; + name: Attribute.String & + Attribute.SetMinMax<{ + min: 1; + max: 50; }>; + code: Attribute.String & Attribute.Unique; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; - publishedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'api::questionnaire.questionnaire', + 'plugin::i18n.locale', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'api::questionnaire.questionnaire', + 'plugin::i18n.locale', 'oneToOne', 'admin::user' > & Attribute.Private; - localizations: Attribute.Relation< - 'api::questionnaire.questionnaire', - 'oneToMany', - 'api::questionnaire.questionnaire' - >; - locale: Attribute.String; }; } -export interface PluginUploadFile extends Schema.CollectionType { - collectionName: 'files'; +export interface PluginUsersPermissionsPermission + extends Schema.CollectionType { + collectionName: 'up_permissions'; info: { - singularName: 'file'; - pluralName: 'files'; - displayName: 'File'; + name: 'permission'; description: ''; + singularName: 'permission'; + pluralName: 'permissions'; + displayName: 'Permission'; }; pluginOptions: { 'content-manager': { @@ -727,43 +590,74 @@ export interface PluginUploadFile extends Schema.CollectionType { }; }; attributes: { - name: Attribute.String & Attribute.Required; - alternativeText: Attribute.String; - caption: Attribute.String; - width: Attribute.Integer; - height: Attribute.Integer; - formats: Attribute.JSON; - hash: Attribute.String & Attribute.Required; - ext: Attribute.String; - mime: Attribute.String & Attribute.Required; - size: Attribute.Decimal & Attribute.Required; - url: Attribute.String & Attribute.Required; - previewUrl: Attribute.String; - provider: Attribute.String & Attribute.Required; - provider_metadata: Attribute.JSON; - related: Attribute.Relation<'plugin::upload.file', 'morphToMany'>; - folder: Attribute.Relation< - 'plugin::upload.file', + action: Attribute.String & Attribute.Required; + role: Attribute.Relation< + 'plugin::users-permissions.permission', 'manyToOne', - 'plugin::upload.folder' + 'plugin::users-permissions.role' + >; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + 'plugin::users-permissions.permission', + 'oneToOne', + 'admin::user' > & Attribute.Private; - folderPath: Attribute.String & + updatedBy: Attribute.Relation< + 'plugin::users-permissions.permission', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + }; +} + +export interface PluginUsersPermissionsRole extends Schema.CollectionType { + collectionName: 'up_roles'; + info: { + name: 'role'; + description: ''; + singularName: 'role'; + pluralName: 'roles'; + displayName: 'Role'; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + name: Attribute.String & Attribute.Required & - Attribute.Private & - Attribute.SetMinMax<{ - min: 1; + Attribute.SetMinMaxLength<{ + minLength: 3; }>; + description: Attribute.String; + type: Attribute.String & Attribute.Unique; + permissions: Attribute.Relation< + 'plugin::users-permissions.role', + 'oneToMany', + 'plugin::users-permissions.permission' + >; + users: Attribute.Relation< + 'plugin::users-permissions.role', + 'oneToMany', + 'plugin::users-permissions.user' + >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'plugin::upload.file', + 'plugin::users-permissions.role', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'plugin::upload.file', + 'plugin::users-permissions.role', 'oneToOne', 'admin::user' > & @@ -771,58 +665,61 @@ export interface PluginUploadFile extends Schema.CollectionType { }; } -export interface PluginUploadFolder extends Schema.CollectionType { - collectionName: 'upload_folders'; +export interface PluginUsersPermissionsUser extends Schema.CollectionType { + collectionName: 'up_users'; info: { - singularName: 'folder'; - pluralName: 'folders'; - displayName: 'Folder'; + name: 'user'; + description: ''; + singularName: 'user'; + pluralName: 'users'; + displayName: 'User'; }; - pluginOptions: { - 'content-manager': { - visible: false; - }; - 'content-type-builder': { - visible: false; - }; + options: { + draftAndPublish: false; }; attributes: { - name: Attribute.String & + username: Attribute.String & Attribute.Required & - Attribute.SetMinMax<{ - min: 1; + Attribute.Unique & + Attribute.SetMinMaxLength<{ + minLength: 3; }>; - pathId: Attribute.Integer & Attribute.Required & Attribute.Unique; - parent: Attribute.Relation< - 'plugin::upload.folder', + email: Attribute.Email & + Attribute.Required & + Attribute.SetMinMaxLength<{ + minLength: 6; + }>; + provider: Attribute.String; + password: Attribute.Password & + Attribute.Private & + Attribute.SetMinMaxLength<{ + minLength: 6; + }>; + resetPasswordToken: Attribute.String & Attribute.Private; + confirmationToken: Attribute.String & Attribute.Private; + confirmed: Attribute.Boolean & Attribute.DefaultTo; + blocked: Attribute.Boolean & Attribute.DefaultTo; + role: Attribute.Relation< + 'plugin::users-permissions.user', 'manyToOne', - 'plugin::upload.folder' - >; - children: Attribute.Relation< - 'plugin::upload.folder', - 'oneToMany', - 'plugin::upload.folder' + 'plugin::users-permissions.role' >; - files: Attribute.Relation< - 'plugin::upload.folder', + gender: Attribute.Enumeration<['Female', 'Male', 'Other']>; + enrollments: Attribute.Relation< + 'plugin::users-permissions.user', 'oneToMany', - 'plugin::upload.file' + 'api::enrollment.enrollment' >; - path: Attribute.String & - Attribute.Required & - Attribute.SetMinMax<{ - min: 1; - }>; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'plugin::upload.folder', + 'plugin::users-permissions.user', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'plugin::upload.folder', + 'plugin::users-permissions.user', 'oneToOne', 'admin::user' > & @@ -830,88 +727,233 @@ export interface PluginUploadFolder extends Schema.CollectionType { }; } -export interface PluginReactIconsIconlibrary extends Schema.CollectionType { - collectionName: 'iconlibrary'; +export interface ApiActivityActivity extends Schema.CollectionType { + collectionName: 'activities'; info: { - singularName: 'iconlibrary'; - pluralName: 'iconlibraries'; - displayName: 'IconLibrary'; + singularName: 'activity'; + pluralName: 'activities'; + displayName: 'Activity'; + description: ''; }; options: { - draftAndPublish: false; - comment: ''; + draftAndPublish: true; }; pluginOptions: { - 'content-manager': { - visible: false; - }; - 'content-type-builder': { - visible: false; + i18n: { + localized: true; }; }; attributes: { - name: Attribute.String & Attribute.Required; - abbreviation: Attribute.String & + name: Attribute.String & + Attribute.Required & + Attribute.Unique & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + displayName: Attribute.String & + Attribute.Required & + Attribute.Unique & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + ribbon: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + summary: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + detail: Attribute.RichText & + Attribute.Required & + Attribute.CustomField< + 'plugin::ckeditor.CKEditor', + { + output: 'HTML'; + preset: 'rich'; + } + > & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + banners: Attribute.Media & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + status: Attribute.Enumeration< + ['planning', 'pendingApproval', 'online', 'offline'] + > & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }> & + Attribute.DefaultTo<'planning'>; + creator: Attribute.Relation< + 'api::activity.activity', + 'oneToOne', + 'plugin::users-permissions.user' + >; + maxEnrollment: Attribute.Integer & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }> & + Attribute.SetMinMax<{ + min: 0; + }>; + tags: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + eventStartedAt: Attribute.DateTime & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + eventEndedAt: Attribute.DateTime & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + enrollmentStartedAt: Attribute.DateTime & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + enrollmentEndedAt: Attribute.DateTime & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + judgeStartedAt: Attribute.DateTime & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + judgeEndedAt: Attribute.DateTime & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + gitTemplates: Attribute.Component<'common.multiple-text', true> & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + enrollments: Attribute.Relation< + 'api::activity.activity', + 'oneToMany', + 'api::enrollment.enrollment' + >; + questionnaire: Attribute.Relation< + 'api::activity.activity', + 'oneToOne', + 'api::questionnaire.questionnaire' + >; + cooperations: Attribute.Component<'business.cooperation', true> & Attribute.Required & - Attribute.Unique & - Attribute.SetMinMaxLength<{ - maxLength: 3; + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; }>; - isEnabled: Attribute.Boolean & Attribute.DefaultTo; + messages: Attribute.Relation< + 'api::activity.activity', + 'oneToMany', + 'api::message.message' + >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; + publishedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'plugin::react-icons.iconlibrary', + 'api::activity.activity', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'plugin::react-icons.iconlibrary', + 'api::activity.activity', 'oneToOne', 'admin::user' > & Attribute.Private; + localizations: Attribute.Relation< + 'api::activity.activity', + 'oneToMany', + 'api::activity.activity' + >; + locale: Attribute.String; }; } -export interface PluginI18NLocale extends Schema.CollectionType { - collectionName: 'i18n_locale'; +export interface ApiEnrollmentEnrollment extends Schema.CollectionType { + collectionName: 'enrollments'; info: { - singularName: 'locale'; - pluralName: 'locales'; - collectionName: 'locales'; - displayName: 'Locale'; - description: ''; + singularName: 'enrollment'; + pluralName: 'enrollments'; + displayName: 'Enrollment'; }; options: { draftAndPublish: false; }; - pluginOptions: { - 'content-manager': { - visible: false; - }; - 'content-type-builder': { - visible: false; - }; - }; attributes: { - name: Attribute.String & - Attribute.SetMinMax<{ - min: 1; - max: 50; - }>; - code: Attribute.String & Attribute.Unique; + activity: Attribute.Relation< + 'api::enrollment.enrollment', + 'manyToOne', + 'api::activity.activity' + >; + user: Attribute.Relation< + 'api::enrollment.enrollment', + 'manyToOne', + 'plugin::users-permissions.user' + >; + status: Attribute.Enumeration< + ['none', 'pendingApproval', 'approved', 'rejected'] + > & + Attribute.Required & + Attribute.DefaultTo<'none'>; + extensions: Attribute.JSON; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'plugin::i18n.locale', + 'api::enrollment.enrollment', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'plugin::i18n.locale', + 'api::enrollment.enrollment', 'oneToOne', 'admin::user' > & @@ -919,159 +961,181 @@ export interface PluginI18NLocale extends Schema.CollectionType { }; } -export interface PluginUsersPermissionsPermission - extends Schema.CollectionType { - collectionName: 'up_permissions'; +export interface ApiMessageMessage extends Schema.CollectionType { + collectionName: 'messages'; info: { - name: 'permission'; + singularName: 'message'; + pluralName: 'messages'; + displayName: 'Message'; description: ''; - singularName: 'permission'; - pluralName: 'permissions'; - displayName: 'Permission'; + }; + options: { + draftAndPublish: false; }; pluginOptions: { - 'content-manager': { - visible: false; - }; - 'content-type-builder': { - visible: false; + i18n: { + localized: true; }; }; attributes: { - action: Attribute.String & Attribute.Required; - role: Attribute.Relation< - 'plugin::users-permissions.permission', + title: Attribute.String & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + content: Attribute.Text & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + activity: Attribute.Relation< + 'api::message.message', 'manyToOne', - 'plugin::users-permissions.role' + 'api::activity.activity' >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'plugin::users-permissions.permission', + 'api::message.message', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'plugin::users-permissions.permission', + 'api::message.message', 'oneToOne', 'admin::user' > & Attribute.Private; + localizations: Attribute.Relation< + 'api::message.message', + 'oneToMany', + 'api::message.message' + >; + locale: Attribute.String; }; } -export interface PluginUsersPermissionsRole extends Schema.CollectionType { - collectionName: 'up_roles'; +export interface ApiOrganizationOrganization extends Schema.CollectionType { + collectionName: 'organizations'; info: { - name: 'role'; + singularName: 'organization'; + pluralName: 'organizations'; + displayName: 'Organization'; description: ''; - singularName: 'role'; - pluralName: 'roles'; - displayName: 'Role'; + }; + options: { + draftAndPublish: false; }; pluginOptions: { - 'content-manager': { - visible: false; - }; - 'content-type-builder': { - visible: false; + i18n: { + localized: true; }; }; attributes: { name: Attribute.String & Attribute.Required & - Attribute.SetMinMaxLength<{ - minLength: 3; + Attribute.Unique & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + description: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + logo: Attribute.Media & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + url: Attribute.String & + Attribute.Unique & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; }>; - description: Attribute.String; - type: Attribute.String & Attribute.Unique; - permissions: Attribute.Relation< - 'plugin::users-permissions.role', - 'oneToMany', - 'plugin::users-permissions.permission' - >; - users: Attribute.Relation< - 'plugin::users-permissions.role', - 'oneToMany', - 'plugin::users-permissions.user' - >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'plugin::users-permissions.role', + 'api::organization.organization', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'plugin::users-permissions.role', + 'api::organization.organization', 'oneToOne', 'admin::user' > & Attribute.Private; + localizations: Attribute.Relation< + 'api::organization.organization', + 'oneToMany', + 'api::organization.organization' + >; + locale: Attribute.String; }; } -export interface PluginUsersPermissionsUser extends Schema.CollectionType { - collectionName: 'up_users'; +export interface ApiQuestionnaireQuestionnaire extends Schema.CollectionType { + collectionName: 'questionnaires'; info: { - name: 'user'; - description: ''; - singularName: 'user'; - pluralName: 'users'; - displayName: 'User'; + singularName: 'questionnaire'; + pluralName: 'questionnaires'; + displayName: 'Questionnaire'; }; options: { - draftAndPublish: false; + draftAndPublish: true; + }; + pluginOptions: { + i18n: { + localized: true; + }; }; attributes: { - username: Attribute.String & - Attribute.Required & - Attribute.Unique & - Attribute.SetMinMaxLength<{ - minLength: 3; - }>; - email: Attribute.Email & + activity: Attribute.Relation< + 'api::questionnaire.questionnaire', + 'oneToOne', + 'api::activity.activity' + >; + extensions: Attribute.Component<'form.field', true> & Attribute.Required & - Attribute.SetMinMaxLength<{ - minLength: 6; - }>; - provider: Attribute.String; - password: Attribute.Password & - Attribute.Private & - Attribute.SetMinMaxLength<{ - minLength: 6; + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; }>; - resetPasswordToken: Attribute.String & Attribute.Private; - confirmationToken: Attribute.String & Attribute.Private; - confirmed: Attribute.Boolean & Attribute.DefaultTo; - blocked: Attribute.Boolean & Attribute.DefaultTo; - role: Attribute.Relation< - 'plugin::users-permissions.user', - 'manyToOne', - 'plugin::users-permissions.role' - >; - gender: Attribute.Enumeration<['Female', 'Male', 'Other']>; - enrollments: Attribute.Relation< - 'plugin::users-permissions.user', - 'oneToMany', - 'api::enrollment.enrollment' - >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; + publishedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'plugin::users-permissions.user', + 'api::questionnaire.questionnaire', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'plugin::users-permissions.user', + 'api::questionnaire.questionnaire', 'oneToOne', 'admin::user' > & Attribute.Private; + localizations: Attribute.Relation< + 'api::questionnaire.questionnaire', + 'oneToMany', + 'api::questionnaire.questionnaire' + >; + locale: Attribute.String; }; } @@ -1085,10 +1149,6 @@ declare module '@strapi/types' { 'admin::api-token-permission': AdminApiTokenPermission; 'admin::transfer-token': AdminTransferToken; 'admin::transfer-token-permission': AdminTransferTokenPermission; - 'api::activity.activity': ApiActivityActivity; - 'api::enrollment.enrollment': ApiEnrollmentEnrollment; - 'api::organization.organization': ApiOrganizationOrganization; - 'api::questionnaire.questionnaire': ApiQuestionnaireQuestionnaire; 'plugin::upload.file': PluginUploadFile; 'plugin::upload.folder': PluginUploadFolder; 'plugin::react-icons.iconlibrary': PluginReactIconsIconlibrary; @@ -1096,6 +1156,11 @@ declare module '@strapi/types' { 'plugin::users-permissions.permission': PluginUsersPermissionsPermission; 'plugin::users-permissions.role': PluginUsersPermissionsRole; 'plugin::users-permissions.user': PluginUsersPermissionsUser; + 'api::activity.activity': ApiActivityActivity; + 'api::enrollment.enrollment': ApiEnrollmentEnrollment; + 'api::message.message': ApiMessageMessage; + 'api::organization.organization': ApiOrganizationOrganization; + 'api::questionnaire.questionnaire': ApiQuestionnaireQuestionnaire; } } }