From 1708cda514275cda146f4467f788ed6d32f73192 Mon Sep 17 00:00:00 2001 From: He4eT Date: Tue, 1 Apr 2025 19:29:30 +0200 Subject: [PATCH] Hackspace: add linked_spaces --- .../content-types/hackspace/schema.json | 5 +++++ src/components/hackspace/linked-space.json | 16 ++++++++++++++++ types/generated/components.d.ts | 13 +++++++++++++ types/generated/contentTypes.d.ts | 1 + 4 files changed, 35 insertions(+) create mode 100644 src/components/hackspace/linked-space.json diff --git a/src/api/hackspace/content-types/hackspace/schema.json b/src/api/hackspace/content-types/hackspace/schema.json index ae1d23b..a889d4f 100644 --- a/src/api/hackspace/content-types/hackspace/schema.json +++ b/src/api/hackspace/content-types/hackspace/schema.json @@ -67,6 +67,11 @@ "type": "component", "repeatable": true, "component": "membership.plans" + }, + "linked_spaces": { + "type": "component", + "repeatable": true, + "component": "hackspace.linked-space" } } } diff --git a/src/components/hackspace/linked-space.json b/src/components/hackspace/linked-space.json new file mode 100644 index 0000000..919d71e --- /dev/null +++ b/src/components/hackspace/linked-space.json @@ -0,0 +1,16 @@ +{ + "collectionName": "components_hackspace_linked_spaces", + "info": { + "displayName": "Linked Space", + "icon": "alien" + }, + "options": {}, + "attributes": { + "endpoint": { + "type": "string" + }, + "website": { + "type": "string" + } + } +} diff --git a/types/generated/components.d.ts b/types/generated/components.d.ts index 03316b8..a06c183 100644 --- a/types/generated/components.d.ts +++ b/types/generated/components.d.ts @@ -99,6 +99,18 @@ export interface HackspaceLink extends Struct.ComponentSchema { }; } +export interface HackspaceLinkedSpace extends Struct.ComponentSchema { + collectionName: 'components_hackspace_linked_spaces'; + info: { + displayName: 'Linked Space'; + icon: 'alien'; + }; + attributes: { + endpoint: Schema.Attribute.String; + website: Schema.Attribute.String; + }; +} + export interface HackspaceLocation extends Struct.ComponentSchema { collectionName: 'components_hackspace_locations'; info: { @@ -196,6 +208,7 @@ declare module '@strapi/strapi' { 'hackspace.feed-list': HackspaceFeedList; 'hackspace.keymaster': HackspaceKeymaster; 'hackspace.link': HackspaceLink; + 'hackspace.linked-space': HackspaceLinkedSpace; 'hackspace.location': HackspaceLocation; 'hackspace.project': HackspaceProject; 'hackspace.spacefed': HackspaceSpacefed; diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index ca111f4..133d379 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -416,6 +416,7 @@ export interface ApiHackspaceHackspace extends Struct.SingleTypeSchema { createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & Schema.Attribute.Private; feeds: Schema.Attribute.Component<'hackspace.feed-list', false>; + linked_spaces: Schema.Attribute.Component<'hackspace.linked-space', true>; links: Schema.Attribute.Component<'hackspace.link', true>; locale: Schema.Attribute.String & Schema.Attribute.Private; localizations: Schema.Attribute.Relation<