From f0d1269d217c133f7d2fab498329dc70065e43ea Mon Sep 17 00:00:00 2001 From: He4eT Date: Tue, 1 Apr 2025 13:03:19 +0200 Subject: [PATCH] Hackspace: add feeds --- .../content-types/hackspace/schema.json | 5 ++++ src/components/hackspace/feed-list.json | 30 +++++++++++++++++++ types/generated/components.d.ts | 28 +++++++++++++++++ types/generated/contentTypes.d.ts | 1 + 4 files changed, 64 insertions(+) create mode 100644 src/components/hackspace/feed-list.json diff --git a/src/api/hackspace/content-types/hackspace/schema.json b/src/api/hackspace/content-types/hackspace/schema.json index 5ac80b5..c81068c 100644 --- a/src/api/hackspace/content-types/hackspace/schema.json +++ b/src/api/hackspace/content-types/hackspace/schema.json @@ -47,6 +47,11 @@ "type": "component", "repeatable": true, "component": "hackspace.camera" + }, + "feeds": { + "type": "component", + "repeatable": false, + "component": "hackspace.feed-list" } } } diff --git a/src/components/hackspace/feed-list.json b/src/components/hackspace/feed-list.json new file mode 100644 index 0000000..d2297a3 --- /dev/null +++ b/src/components/hackspace/feed-list.json @@ -0,0 +1,30 @@ +{ + "collectionName": "components_hackspace_feed_lists", + "info": { + "displayName": "Feed List", + "icon": "cast" + }, + "options": {}, + "attributes": { + "blog": { + "type": "component", + "repeatable": false, + "component": "hackspace.feed" + }, + "wiki": { + "type": "component", + "repeatable": false, + "component": "hackspace.feed" + }, + "calendar": { + "type": "component", + "repeatable": false, + "component": "hackspace.feed" + }, + "flickr": { + "type": "component", + "repeatable": false, + "component": "hackspace.feed" + } + } +} diff --git a/types/generated/components.d.ts b/types/generated/components.d.ts index f4a69b8..cd992cb 100644 --- a/types/generated/components.d.ts +++ b/types/generated/components.d.ts @@ -41,6 +41,32 @@ export interface HackspaceContacts extends Struct.ComponentSchema { }; } +export interface HackspaceFeed extends Struct.ComponentSchema { + collectionName: 'components_hackspace_feeds'; + info: { + displayName: 'Feed'; + icon: 'cast'; + }; + attributes: { + type: Schema.Attribute.String; + url: Schema.Attribute.String & Schema.Attribute.Required; + }; +} + +export interface HackspaceFeedList extends Struct.ComponentSchema { + collectionName: 'components_hackspace_feed_lists'; + info: { + displayName: 'Feed List'; + icon: 'cast'; + }; + attributes: { + blog: Schema.Attribute.Component<'hackspace.feed', false>; + calendar: Schema.Attribute.Component<'hackspace.feed', false>; + flickr: Schema.Attribute.Component<'hackspace.feed', false>; + wiki: Schema.Attribute.Component<'hackspace.feed', false>; + }; +} + export interface HackspaceKeymaster extends Struct.ComponentSchema { collectionName: 'components_hackspace_keymasters'; info: { @@ -123,6 +149,8 @@ declare module '@strapi/strapi' { export interface ComponentSchemas { 'hackspace.camera': HackspaceCamera; 'hackspace.contacts': HackspaceContacts; + 'hackspace.feed': HackspaceFeed; + 'hackspace.feed-list': HackspaceFeedList; 'hackspace.keymaster': HackspaceKeymaster; 'hackspace.location': HackspaceLocation; 'hackspace.spacefed': HackspaceSpacefed; diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index 7fd2706..91e8b20 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -415,6 +415,7 @@ export interface ApiHackspaceHackspace extends Struct.SingleTypeSchema { createdAt: Schema.Attribute.DateTime; createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & Schema.Attribute.Private; + feeds: Schema.Attribute.Component<'hackspace.feed-list', false>; locale: Schema.Attribute.String & Schema.Attribute.Private; localizations: Schema.Attribute.Relation< 'oneToMany',