feat: add database backed membership tiers
All checks were successful
deploy-socialize / image (push) Successful in 1m9s
deploy-socialize / deploy (push) Successful in 19s

This commit is contained in:
2026-05-07 20:29:53 -04:00
parent db16e79d9f
commit 6d92119c9c
23 changed files with 3512 additions and 30 deletions

View File

@@ -694,6 +694,101 @@
]
}
},
"/api/organization-membership-tiers": {
"get": {
"tags": [
"Organizations",
"Api"
],
"operationId": "SocializeApiModulesOrganizationsHandlersListOrganizationMembershipTiersHandler",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SocializeApiModulesOrganizationsHandlersOrganizationMembershipTierDto"
}
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"JWTBearerAuth": []
}
]
}
},
"/api/organizations/{organizationId}/membership-tier": {
"put": {
"tags": [
"Organizations",
"Api"
],
"operationId": "SocializeApiModulesOrganizationsHandlersUpdateOrganizationMembershipTierHandler",
"parameters": [
{
"name": "organizationId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "guid"
}
}
],
"requestBody": {
"x-name": "UpdateOrganizationMembershipTierRequest",
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SocializeApiModulesOrganizationsHandlersUpdateOrganizationMembershipTierRequest"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SocializeApiModulesOrganizationsHandlersOrganizationDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/FastEndpointsErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"JWTBearerAuth": []
}
]
}
},
"/api/notifications": {
"get": {
"tags": [
@@ -4201,6 +4296,14 @@
"type": "string",
"nullable": true
},
"membershipTier": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/SocializeApiModulesOrganizationsHandlersOrganizationMembershipTierDto"
}
]
},
"ownerUserId": {
"type": "string",
"format": "guid"
@@ -4231,16 +4334,76 @@
}
]
},
"availableMembershipTiers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SocializeApiModulesOrganizationsHandlersOrganizationMembershipTierDto"
}
},
"createdAt": {
"type": "string",
"format": "date-time"
}
}
},
"SocializeApiModulesOrganizationsHandlersOrganizationMembershipTierDto": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"format": "guid"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"monthlyPriceCents": {
"type": "integer",
"format": "int32",
"nullable": true
},
"workspaceLimit": {
"type": "integer",
"format": "int32",
"nullable": true
},
"activeContentLimit": {
"type": "integer",
"format": "int32",
"nullable": true
},
"memberLimit": {
"type": "integer",
"format": "int32",
"nullable": true
},
"externalReviewerLimit": {
"type": "integer",
"format": "int32",
"nullable": true
},
"isCustom": {
"type": "boolean"
},
"sortOrder": {
"type": "integer",
"format": "int32"
}
}
},
"SocializeApiModulesOrganizationsHandlersOrganizationUsageDto": {
"type": "object",
"additionalProperties": false,
"properties": {
"planKey": {
"type": "string"
},
"planName": {
"type": "string"
},
@@ -4282,6 +4445,11 @@
"maxLength": 256,
"minLength": 0,
"nullable": false
},
"membershipTierId": {
"type": "string",
"format": "guid",
"nullable": true
}
}
},
@@ -4300,6 +4468,21 @@
}
}
},
"SocializeApiModulesOrganizationsHandlersUpdateOrganizationMembershipTierRequest": {
"type": "object",
"additionalProperties": false,
"required": [
"membershipTierId"
],
"properties": {
"membershipTierId": {
"type": "string",
"format": "guid",
"minLength": 1,
"nullable": false
}
}
},
"SocializeApiModulesNotificationsHandlersNotificationEventDto": {
"type": "object",
"additionalProperties": false,