diff --git a/src/api/hackspace/content-types/hackspace/schema.json b/src/api/hackspace/content-types/hackspace/schema.json index 5de0ea3..ae1d23b 100644 --- a/src/api/hackspace/content-types/hackspace/schema.json +++ b/src/api/hackspace/content-types/hackspace/schema.json @@ -62,6 +62,11 @@ "type": "component", "repeatable": true, "component": "hackspace.link" + }, + "membership_plans": { + "type": "component", + "repeatable": true, + "component": "membership.plans" } } } diff --git a/src/components/membership/plans.json b/src/components/membership/plans.json new file mode 100644 index 0000000..341687f --- /dev/null +++ b/src/components/membership/plans.json @@ -0,0 +1,39 @@ +{ + "collectionName": "components_membership_plans", + "info": { + "displayName": "Plan", + "icon": "briefcase", + "description": "" + }, + "options": {}, + "attributes": { + "name": { + "type": "string", + "required": true + }, + "value": { + "type": "decimal", + "required": true + }, + "currency": { + "type": "string", + "required": true + }, + "billing_interval": { + "type": "enumeration", + "enum": [ + "yearly", + "quarterly", + "monthly", + "weekly", + "daily", + "hourly", + "other" + ], + "required": true + }, + "description": { + "type": "text" + } + } +} diff --git a/types/generated/components.d.ts b/types/generated/components.d.ts index 6baa757..03316b8 100644 --- a/types/generated/components.d.ts +++ b/types/generated/components.d.ts @@ -155,6 +155,25 @@ export interface LocationArea extends Struct.ComponentSchema { }; } +export interface MembershipPlans extends Struct.ComponentSchema { + collectionName: 'components_membership_plans'; + info: { + description: ''; + displayName: 'Plan'; + icon: 'briefcase'; + }; + attributes: { + billing_interval: Schema.Attribute.Enumeration< + ['yearly', 'quarterly', 'monthly', 'weekly', 'daily', 'hourly', 'other'] + > & + Schema.Attribute.Required; + currency: Schema.Attribute.String & Schema.Attribute.Required; + description: Schema.Attribute.Text; + name: Schema.Attribute.String & Schema.Attribute.Required; + value: Schema.Attribute.Decimal & Schema.Attribute.Required; + }; +} + export interface StateStateIcon extends Struct.ComponentSchema { collectionName: 'components_state_state_icons'; info: { @@ -181,6 +200,7 @@ declare module '@strapi/strapi' { 'hackspace.project': HackspaceProject; 'hackspace.spacefed': HackspaceSpacefed; 'location.area': LocationArea; + 'membership.plans': MembershipPlans; 'state.state-icon': StateStateIcon; } } diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index d256536..ca111f4 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -425,6 +425,7 @@ export interface ApiHackspaceHackspace extends Struct.SingleTypeSchema { Schema.Attribute.Private; location: Schema.Attribute.Component<'hackspace.location', false>; logo: Schema.Attribute.Media<'images'> & Schema.Attribute.Required; + membership_plans: Schema.Attribute.Component<'membership.plans', true>; projects: Schema.Attribute.Component<'hackspace.project', true>; publishedAt: Schema.Attribute.DateTime; space: Schema.Attribute.String & Schema.Attribute.Required;