From 4899d0a8bc314ab0771ba0fd4c246c208d62a639 Mon Sep 17 00:00:00 2001 From: Rajat Date: Fri, 30 Oct 2026 12:55:43 +0530 Subject: [PATCH] Commit the generated OpenAPI spec and check it for drift - `bun run generate:openapi` writes the spec the API serves at /openapi.json to apps/api/openapi.json, with the production API host as the default server. - `check:openapi` joins `check:drift`, so CI fails when the committed spec no longer matches the contract. - Tools that read the spec from the repository (the docs' API reference) can point at apps/api/openapi.json. Co-Authored-By: Claude Opus 5.5 --- apps/api/openapi.json | 72902 ++++++++++++++++++++++++ apps/api/package.json | 4 +- apps/api/scripts/generate-openapi.mjs | 37 + biome.json | 3 +- docs/platform-based-rewrite.md | 2 +- 5 files changed, 72945 insertions(+), 3 deletions(-) create mode 100644 apps/api/openapi.json create mode 100644 apps/api/scripts/generate-openapi.mjs diff --git a/apps/api/openapi.json b/apps/api/openapi.json new file mode 100644 index 000000000..1e4f0c23d --- /dev/null +++ b/apps/api/openapi.json @@ -0,0 +1,72902 @@ +{ + "openapi": "3.0.2", + "paths": { + "/health": { + "get": { + "summary": "Liveness", + "tags": [ + "System" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "service": { + "type": "string" + }, + "time": { + "type": "string" + } + }, + "required": [ + "status", + "service", + "time" + ] + } + } + } + } + } + } + }, + "/ready": { + "get": { + "summary": "Readiness", + "tags": [ + "System" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "not_ready" + ] + }, + "checks": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "required": [ + "status", + "checks" + ] + } + } + } + }, + "503": { + "description": "503", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "not_ready" + ] + }, + "checks": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "required": [ + "status", + "checks" + ] + } + } + } + } + } + } + }, + "/v1/communities": { + "get": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "spaceId", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "membersCount": { + "type": "integer", + "minimum": 0 + }, + "postsCount": { + "type": "integer", + "minimum": 0 + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "membership": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "slug", + "description", + "banner", + "categories", + "autoAcceptMembers", + "joiningReasonText", + "enabled", + "featuredImage", + "membersCount", + "postsCount", + "deletedAt", + "membership", + "createdAt", + "updatedAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Communities" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "slug": { + "type": "string", + "minLength": 1, + "maxLength": 120, + "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + }, + "description": { + "default": "", + "type": "string", + "maxLength": 20000 + }, + "banner": { + "default": "", + "type": "string", + "maxLength": 20000 + }, + "categories": { + "default": [ + "General" + ], + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "minItems": 1 + }, + "autoAcceptMembers": { + "default": true, + "type": "boolean" + }, + "joiningReasonText": { + "default": "", + "type": "string", + "maxLength": 500 + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "membersCount": { + "type": "integer", + "minimum": 0 + }, + "postsCount": { + "type": "integer", + "minimum": 0 + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "membership": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "slug", + "description", + "banner", + "categories", + "autoAcceptMembers", + "joiningReasonText", + "enabled", + "featuredImage", + "membersCount", + "postsCount", + "deletedAt", + "membership", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/communities/{communityId}": { + "get": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "membersCount": { + "type": "integer", + "minimum": 0 + }, + "postsCount": { + "type": "integer", + "minimum": 0 + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "membership": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "slug", + "description", + "banner", + "categories", + "autoAcceptMembers", + "joiningReasonText", + "enabled", + "featuredImage", + "membersCount", + "postsCount", + "deletedAt", + "membership", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "slug": { + "type": "string", + "minLength": 1, + "maxLength": 120, + "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + }, + "description": { + "type": "string", + "maxLength": 20000 + }, + "banner": { + "type": "string", + "maxLength": 20000 + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "minItems": 1 + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string", + "maxLength": 500 + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "membersCount": { + "type": "integer", + "minimum": 0 + }, + "postsCount": { + "type": "integer", + "minimum": 0 + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "membership": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "slug", + "description", + "banner", + "categories", + "autoAcceptMembers", + "joiningReasonText", + "enabled", + "featuredImage", + "membersCount", + "postsCount", + "deletedAt", + "membership", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/sales-pages/{resourceType}/{resourceId}": { + "get": { + "tags": [ + "Storefront & Payments" + ], + "parameters": [ + { + "name": "resourceType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "product", + "community" + ] + } + }, + { + "name": "resourceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "product", + "community" + ] + }, + "resourceId": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "pageId": { + "type": "string", + "nullable": true + } + }, + "required": [ + "resourceType", + "resourceId", + "slug", + "pageId" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/communities/{communityId}/categories": { + "post": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "category": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + "required": [ + "category" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "membersCount": { + "type": "integer", + "minimum": 0 + }, + "postsCount": { + "type": "integer", + "minimum": 0 + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "membership": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "slug", + "description", + "banner", + "categories", + "autoAcceptMembers", + "joiningReasonText", + "enabled", + "featuredImage", + "membersCount", + "postsCount", + "deletedAt", + "membership", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/communities/{communityId}/categories/{category}": { + "delete": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "category", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "migrateToCategory": { + "type": "string", + "minLength": 1, + "maxLength": 100, + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "membersCount": { + "type": "integer", + "minimum": 0 + }, + "postsCount": { + "type": "integer", + "minimum": 0 + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "membership": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "slug", + "description", + "banner", + "categories", + "autoAcceptMembers", + "joiningReasonText", + "enabled", + "featuredImage", + "membersCount", + "postsCount", + "deletedAt", + "membership", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/communities/{communityId}/members": { + "get": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "spaceId", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "status", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "maxLength": 320 + }, + "name": { + "default": "", + "type": "string", + "maxLength": 200 + }, + "planId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "email", + "planId" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/community-memberships/{membershipId}": { + "patch": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "membershipId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "active", + "pending", + "rejected" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "rejectionReason": { + "type": "string", + "maxLength": 2000, + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/communities/{communityId}/posts": { + "get": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "spaceId", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "category": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "commentsCount": { + "type": "integer", + "minimum": 0 + }, + "subscribed": { + "type": "boolean" + }, + "pinned": { + "type": "boolean" + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "authorId", + "authorKind", + "author", + "title", + "content", + "category", + "media", + "reactions", + "commentsCount", + "subscribed", + "pinned", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 300 + }, + "content": { + "type": "string", + "minLength": 1, + "maxLength": 20000 + }, + "category": { + "default": "General", + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "mediaIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "maxItems": 10 + } + }, + "required": [ + "title", + "content" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "category": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "commentsCount": { + "type": "integer", + "minimum": 0 + }, + "subscribed": { + "type": "boolean" + }, + "pinned": { + "type": "boolean" + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "authorId", + "authorKind", + "author", + "title", + "content", + "category", + "media", + "reactions", + "commentsCount", + "subscribed", + "pinned", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/community-posts/{postId}": { + "patch": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "postId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 300 + }, + "content": { + "type": "string", + "minLength": 1, + "maxLength": 20000 + }, + "category": { + "default": "General", + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "mediaIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "maxItems": 10 + }, + "pinned": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "category": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "commentsCount": { + "type": "integer", + "minimum": 0 + }, + "subscribed": { + "type": "boolean" + }, + "pinned": { + "type": "boolean" + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "authorId", + "authorKind", + "author", + "title", + "content", + "category", + "media", + "reactions", + "commentsCount", + "subscribed", + "pinned", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "postId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/community-posts/{postId}/comments": { + "get": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "postId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "spaceId", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "postId": { + "type": "string" + }, + "parentCommentId": { + "type": "string", + "nullable": true + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "content": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "postId", + "parentCommentId", + "authorId", + "authorKind", + "author", + "content", + "media", + "reactions", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "postId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "minLength": 1, + "maxLength": 20000 + }, + "parentCommentId": { + "type": "string", + "minLength": 1, + "nullable": true + }, + "mediaIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "maxItems": 10 + } + }, + "required": [ + "content" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "postId": { + "type": "string" + }, + "parentCommentId": { + "type": "string", + "nullable": true + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "content": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "postId", + "parentCommentId", + "authorId", + "authorKind", + "author", + "content", + "media", + "reactions", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/community-comments/{commentId}": { + "patch": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "commentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "minLength": 1, + "maxLength": 20000 + }, + "mediaIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "maxItems": 10 + } + }, + "required": [ + "content" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "postId": { + "type": "string" + }, + "parentCommentId": { + "type": "string", + "nullable": true + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "content": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "postId", + "parentCommentId", + "authorId", + "authorKind", + "author", + "content", + "media", + "reactions", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "commentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/communities/{communityId}/reactions": { + "post": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "post", + "comment", + "reply" + ] + }, + "entityId": { + "type": "string", + "minLength": 1 + }, + "emoji": { + "type": "string", + "enum": [ + "👍", + "❤️", + "😄", + "🎉", + "😢", + "😮" + ] + } + }, + "required": [ + "entityType", + "entityId", + "emoji" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "active": { + "type": "boolean" + }, + "emoji": { + "type": "string" + }, + "entityId": { + "type": "string" + } + }, + "required": [ + "active", + "emoji", + "entityId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/community-posts/{postId}/subscription": { + "post": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "postId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + } + }, + "required": [ + "subscribed" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + } + }, + "required": [ + "subscribed" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/communities/{communityId}/reports": { + "post": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "contentType": { + "type": "string", + "enum": [ + "post", + "comment", + "reply" + ] + }, + "contentId": { + "type": "string", + "minLength": 1 + }, + "reason": { + "type": "string", + "minLength": 1, + "maxLength": 2000 + } + }, + "required": [ + "contentType", + "contentId", + "reason" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "contentType": { + "type": "string", + "enum": [ + "post", + "comment", + "reply" + ] + }, + "contentId": { + "type": "string" + }, + "contentParentId": { + "type": "string", + "nullable": true + }, + "reporterId": { + "type": "string", + "nullable": true + }, + "reporterKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "content": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + } + }, + "required": [ + "id", + "content", + "media", + "authorId", + "authorKind", + "author" + ], + "nullable": true + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "accepted", + "rejected" + ] + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "contentType", + "contentId", + "contentParentId", + "reporterId", + "reporterKind", + "content", + "authorId", + "authorKind", + "reason", + "status", + "rejectionReason", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "get": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "spaceId", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "status", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "pending", + "accepted", + "rejected" + ] + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "contentType": { + "type": "string", + "enum": [ + "post", + "comment", + "reply" + ] + }, + "contentId": { + "type": "string" + }, + "contentParentId": { + "type": "string", + "nullable": true + }, + "reporterId": { + "type": "string", + "nullable": true + }, + "reporterKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "content": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + } + }, + "required": [ + "id", + "content", + "media", + "authorId", + "authorKind", + "author" + ], + "nullable": true + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "accepted", + "rejected" + ] + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "contentType", + "contentId", + "contentParentId", + "reporterId", + "reporterKind", + "content", + "authorId", + "authorKind", + "reason", + "status", + "rejectionReason", + "createdAt", + "updatedAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/community-reports/{reportId}": { + "patch": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "reportId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "pending", + "accepted", + "rejected" + ] + }, + "rejectionReason": { + "type": "string", + "maxLength": 2000, + "nullable": true + } + }, + "required": [ + "status" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "contentType": { + "type": "string", + "enum": [ + "post", + "comment", + "reply" + ] + }, + "contentId": { + "type": "string" + }, + "contentParentId": { + "type": "string", + "nullable": true + }, + "reporterId": { + "type": "string", + "nullable": true + }, + "reporterKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "content": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + } + }, + "required": [ + "id", + "content", + "media", + "authorId", + "authorKind", + "author" + ], + "nullable": true + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "accepted", + "rejected" + ] + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "contentType", + "contentId", + "contentParentId", + "reporterId", + "reporterKind", + "content", + "authorId", + "authorKind", + "reason", + "status", + "rejectionReason", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/communities": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "spaceId", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "membersCount": { + "type": "integer", + "minimum": 0 + }, + "postsCount": { + "type": "integer", + "minimum": 0 + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "membership": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "slug", + "description", + "banner", + "categories", + "autoAcceptMembers", + "joiningReasonText", + "enabled", + "featuredImage", + "membersCount", + "postsCount", + "deletedAt", + "membership", + "createdAt", + "updatedAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/spaces": { + "get": { + "tags": [ + "Communities" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "follow": { + "type": "boolean" + }, + "whoCanPost": { + "type": "string", + "enum": [ + "members", + "admin" + ] + }, + "position": { + "type": "integer" + }, + "unlocks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "community", + "product" + ] + }, + "entityId": { + "type": "string", + "minLength": 1 + }, + "planIds": { + "default": [], + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "entityType" + ] + } + }, + "canPost": { + "type": "boolean" + }, + "followed": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "slug", + "description", + "logo", + "featuredImage", + "follow", + "whoCanPost", + "position", + "unlocks", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Communities" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "description": { + "type": "string", + "maxLength": 8000 + }, + "logo": { + "type": "string", + "maxLength": 80 + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "unlocks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "community", + "product" + ] + }, + "entityId": { + "type": "string", + "minLength": 1 + }, + "planIds": { + "default": [], + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "entityType" + ] + } + }, + "follow": { + "type": "boolean" + }, + "whoCanPost": { + "type": "string", + "enum": [ + "members", + "admin" + ] + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "follow": { + "type": "boolean" + }, + "whoCanPost": { + "type": "string", + "enum": [ + "members", + "admin" + ] + }, + "position": { + "type": "integer" + }, + "unlocks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "community", + "product" + ] + }, + "entityId": { + "type": "string", + "minLength": 1 + }, + "planIds": { + "default": [], + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "entityType" + ] + } + }, + "canPost": { + "type": "boolean" + }, + "followed": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "slug", + "description", + "logo", + "featuredImage", + "follow", + "whoCanPost", + "position", + "unlocks", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/spaces/{spaceId}": { + "get": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "spaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "follow": { + "type": "boolean" + }, + "whoCanPost": { + "type": "string", + "enum": [ + "members", + "admin" + ] + }, + "position": { + "type": "integer" + }, + "unlocks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "community", + "product" + ] + }, + "entityId": { + "type": "string", + "minLength": 1 + }, + "planIds": { + "default": [], + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "entityType" + ] + } + }, + "canPost": { + "type": "boolean" + }, + "followed": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "slug", + "description", + "logo", + "featuredImage", + "follow", + "whoCanPost", + "position", + "unlocks", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "spaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "description": { + "type": "string", + "maxLength": 8000 + }, + "logo": { + "type": "string", + "maxLength": 80 + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "unlocks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "community", + "product" + ] + }, + "entityId": { + "type": "string", + "minLength": 1 + }, + "planIds": { + "default": [], + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "entityType" + ] + } + }, + "follow": { + "type": "boolean" + }, + "whoCanPost": { + "type": "string", + "enum": [ + "members", + "admin" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "follow": { + "type": "boolean" + }, + "whoCanPost": { + "type": "string", + "enum": [ + "members", + "admin" + ] + }, + "position": { + "type": "integer" + }, + "unlocks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "community", + "product" + ] + }, + "entityId": { + "type": "string", + "minLength": 1 + }, + "planIds": { + "default": [], + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "entityType" + ] + } + }, + "canPost": { + "type": "boolean" + }, + "followed": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "slug", + "description", + "logo", + "featuredImage", + "follow", + "whoCanPost", + "position", + "unlocks", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "spaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "destinationSpaceId": { + "type": "string", + "minLength": 1 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/spaces/order": { + "put": { + "tags": [ + "Communities" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "spaceIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1 + } + }, + "required": [ + "spaceIds" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "follow": { + "type": "boolean" + }, + "whoCanPost": { + "type": "string", + "enum": [ + "members", + "admin" + ] + }, + "position": { + "type": "integer" + }, + "unlocks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "community", + "product" + ] + }, + "entityId": { + "type": "string", + "minLength": 1 + }, + "planIds": { + "default": [], + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "entityType" + ] + } + }, + "canPost": { + "type": "boolean" + }, + "followed": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "slug", + "description", + "logo", + "featuredImage", + "follow", + "whoCanPost", + "position", + "unlocks", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/spaces": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "follow": { + "type": "boolean" + }, + "whoCanPost": { + "type": "string", + "enum": [ + "members", + "admin" + ] + }, + "position": { + "type": "integer" + }, + "unlocks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "community", + "product" + ] + }, + "entityId": { + "type": "string", + "minLength": 1 + }, + "planIds": { + "default": [], + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "entityType" + ] + } + }, + "canPost": { + "type": "boolean" + }, + "followed": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "slug", + "description", + "logo", + "featuredImage", + "follow", + "whoCanPost", + "position", + "unlocks", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/spaces/{spaceId}/follow": { + "put": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "spaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "followed": { + "type": "boolean", + "enum": [ + true + ] + } + }, + "required": [ + "followed" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "spaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "followed": { + "type": "boolean", + "enum": [ + false + ] + } + }, + "required": [ + "followed" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/spaces/{spaceId}/posts": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "spaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 300 + }, + "content": { + "type": "string", + "minLength": 1, + "maxLength": 20000 + }, + "mediaIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "maxItems": 10 + } + }, + "required": [ + "title", + "content" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "spaceId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "spaceId", + "title", + "content" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/spaces/{spaceId}/posts/{postId}": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "spaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "postId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "category": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "commentsCount": { + "type": "integer", + "minimum": 0 + }, + "subscribed": { + "type": "boolean" + }, + "pinned": { + "type": "boolean" + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "community": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "slug" + ] + }, + "space": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + } + }, + "required": [ + "id", + "name", + "slug", + "description", + "logo", + "featuredImage" + ] + } + }, + "required": [ + "id", + "communityId", + "authorId", + "authorKind", + "author", + "title", + "content", + "category", + "media", + "reactions", + "commentsCount", + "subscribed", + "pinned", + "deletedAt", + "createdAt", + "updatedAt", + "community" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/feed": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "spaceId", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "category": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "commentsCount": { + "type": "integer", + "minimum": 0 + }, + "subscribed": { + "type": "boolean" + }, + "pinned": { + "type": "boolean" + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "community": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "slug" + ] + }, + "space": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + } + }, + "required": [ + "id", + "name", + "slug", + "description", + "logo", + "featuredImage" + ] + } + }, + "required": [ + "id", + "communityId", + "authorId", + "authorKind", + "author", + "title", + "content", + "category", + "media", + "reactions", + "commentsCount", + "subscribed", + "pinned", + "deletedAt", + "createdAt", + "updatedAt", + "community" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + }, + "banner": { + "type": "string" + } + }, + "required": [ + "items", + "nextCursor", + "banner" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/communities/available": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "spaceId", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "membersCount": { + "type": "integer", + "minimum": 0 + }, + "postsCount": { + "type": "integer", + "minimum": 0 + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "membership": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "slug", + "description", + "banner", + "categories", + "autoAcceptMembers", + "joiningReasonText", + "enabled", + "featuredImage", + "membersCount", + "postsCount", + "deletedAt", + "membership", + "createdAt", + "updatedAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/communities/{communityId}": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "membersCount": { + "type": "integer", + "minimum": 0 + }, + "postsCount": { + "type": "integer", + "minimum": 0 + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "membership": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "slug", + "description", + "banner", + "categories", + "autoAcceptMembers", + "joiningReasonText", + "enabled", + "featuredImage", + "membersCount", + "postsCount", + "deletedAt", + "membership", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/communities/{communityId}/posts": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "spaceId", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "category": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "commentsCount": { + "type": "integer", + "minimum": 0 + }, + "subscribed": { + "type": "boolean" + }, + "pinned": { + "type": "boolean" + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "authorId", + "authorKind", + "author", + "title", + "content", + "category", + "media", + "reactions", + "commentsCount", + "subscribed", + "pinned", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 300 + }, + "content": { + "type": "string", + "minLength": 1, + "maxLength": 20000 + }, + "category": { + "default": "General", + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "mediaIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "maxItems": 10 + } + }, + "required": [ + "title", + "content" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "category": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "commentsCount": { + "type": "integer", + "minimum": 0 + }, + "subscribed": { + "type": "boolean" + }, + "pinned": { + "type": "boolean" + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "authorId", + "authorKind", + "author", + "title", + "content", + "category", + "media", + "reactions", + "commentsCount", + "subscribed", + "pinned", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/community-posts/{postId}": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "postId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "category": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "commentsCount": { + "type": "integer", + "minimum": 0 + }, + "subscribed": { + "type": "boolean" + }, + "pinned": { + "type": "boolean" + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "authorId", + "authorKind", + "author", + "title", + "content", + "category", + "media", + "reactions", + "commentsCount", + "subscribed", + "pinned", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/community-posts/{postId}/comments": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "postId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "spaceId", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "postId": { + "type": "string" + }, + "parentCommentId": { + "type": "string", + "nullable": true + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "content": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "postId", + "parentCommentId", + "authorId", + "authorKind", + "author", + "content", + "media", + "reactions", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "postId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "minLength": 1, + "maxLength": 20000 + }, + "parentCommentId": { + "type": "string", + "minLength": 1, + "nullable": true + }, + "mediaIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "maxItems": 10 + } + }, + "required": [ + "content" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "postId": { + "type": "string" + }, + "parentCommentId": { + "type": "string", + "nullable": true + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "content": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "postId", + "parentCommentId", + "authorId", + "authorKind", + "author", + "content", + "media", + "reactions", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/community-comments/{commentId}": { + "patch": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "commentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "minLength": 1, + "maxLength": 20000 + }, + "mediaIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "maxItems": 10 + } + }, + "required": [ + "content" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "postId": { + "type": "string" + }, + "parentCommentId": { + "type": "string", + "nullable": true + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "content": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "active" + ] + } + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "postId", + "parentCommentId", + "authorId", + "authorKind", + "author", + "content", + "media", + "reactions", + "deletedAt", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "commentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/community-media/upload-authorizations": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "fileName": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0, + "maximum": 100000000 + }, + "accessPolicy": { + "default": "private", + "type": "string", + "enum": [ + "public", + "private" + ] + } + }, + "required": [ + "fileName", + "mimeType", + "byteSize" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uploadId": { + "type": "string" + }, + "uploadUrl": { + "type": "string", + "format": "uri" + }, + "uploadProtocol": { + "type": "string", + "enum": [ + "direct", + "tus" + ] + }, + "uploadMethod": { + "type": "string", + "enum": [ + "PUT", + "POST" + ] + }, + "uploadHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "uploadFields": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "expiresAt": { + "type": "string" + } + }, + "required": [ + "uploadId", + "uploadUrl", + "uploadProtocol", + "uploadMethod", + "uploadHeaders", + "uploadFields", + "expiresAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/community-media": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uploadId": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "altText": { + "default": "", + "type": "string", + "maxLength": 1000 + }, + "caption": { + "default": "", + "type": "string", + "maxLength": 2000 + }, + "accessPolicy": { + "default": "private", + "type": "string", + "enum": [ + "public", + "private" + ] + } + }, + "required": [ + "uploadId" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "canonicalUrl": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + }, + "width": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "height": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + }, + "category": { + "type": "string", + "enum": [ + "library", + "user_uploads" + ] + }, + "altText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "accessPolicy": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "deleting" + ] + }, + "usageCount": { + "type": "integer", + "minimum": 0 + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "canonicalUrl", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize", + "width", + "height", + "kind", + "category", + "altText", + "caption", + "accessPolicy", + "status", + "usageCount", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "search", + "in": "query", + "schema": { + "type": "string", + "maxLength": 200 + } + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "canonicalUrl": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + }, + "width": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "height": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + }, + "category": { + "type": "string", + "enum": [ + "library", + "user_uploads" + ] + }, + "altText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "accessPolicy": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "deleting" + ] + }, + "usageCount": { + "type": "integer", + "minimum": 0 + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "canonicalUrl", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize", + "width", + "height", + "kind", + "category", + "altText", + "caption", + "accessPolicy", + "status", + "usageCount", + "createdAt", + "updatedAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/profile-media/upload-authorizations": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "fileName": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0, + "maximum": 2000000 + } + }, + "required": [ + "fileName", + "mimeType", + "byteSize" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uploadId": { + "type": "string" + }, + "uploadUrl": { + "type": "string", + "format": "uri" + }, + "uploadProtocol": { + "type": "string", + "enum": [ + "direct", + "tus" + ] + }, + "uploadMethod": { + "type": "string", + "enum": [ + "PUT", + "POST" + ] + }, + "uploadHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "uploadFields": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "expiresAt": { + "type": "string" + } + }, + "required": [ + "uploadId", + "uploadUrl", + "uploadProtocol", + "uploadMethod", + "uploadHeaders", + "uploadFields", + "expiresAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/profile-media": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uploadId": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "altText": { + "default": "", + "type": "string", + "maxLength": 1000 + }, + "caption": { + "default": "", + "type": "string", + "maxLength": 2000 + } + }, + "required": [ + "uploadId" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "canonicalUrl": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + }, + "width": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "height": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + }, + "category": { + "type": "string", + "enum": [ + "library", + "user_uploads" + ] + }, + "altText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "accessPolicy": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "deleting" + ] + }, + "usageCount": { + "type": "integer", + "minimum": 0 + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "canonicalUrl", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize", + "width", + "height", + "kind", + "category", + "altText", + "caption", + "accessPolicy", + "status", + "usageCount", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/communities/{communityId}/reactions": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "post", + "comment", + "reply" + ] + }, + "entityId": { + "type": "string", + "minLength": 1 + }, + "emoji": { + "type": "string", + "enum": [ + "👍", + "❤️", + "😄", + "🎉", + "😢", + "😮" + ] + } + }, + "required": [ + "entityType", + "entityId", + "emoji" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "active": { + "type": "boolean" + }, + "emoji": { + "type": "string" + }, + "entityId": { + "type": "string" + } + }, + "required": [ + "active", + "emoji", + "entityId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/community-posts/{postId}/subscription": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "postId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + } + }, + "required": [ + "subscribed" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + } + }, + "required": [ + "subscribed" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/communities/{communityId}/reports": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "contentType": { + "type": "string", + "enum": [ + "post", + "comment", + "reply" + ] + }, + "contentId": { + "type": "string", + "minLength": 1 + }, + "reason": { + "type": "string", + "minLength": 1, + "maxLength": 2000 + } + }, + "required": [ + "contentType", + "contentId", + "reason" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "contentType": { + "type": "string", + "enum": [ + "post", + "comment", + "reply" + ] + }, + "contentId": { + "type": "string" + }, + "contentParentId": { + "type": "string", + "nullable": true + }, + "reporterId": { + "type": "string", + "nullable": true + }, + "reporterKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "content": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": "string" + }, + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image", + "video", + "pdf" + ] + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "type", + "title", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + } + }, + "required": [ + "id", + "content", + "media", + "authorId", + "authorKind", + "author" + ], + "nullable": true + }, + "authorId": { + "type": "string", + "nullable": true + }, + "authorKind": { + "type": "string", + "enum": [ + "learner", + "admin" + ], + "nullable": true + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "accepted", + "rejected" + ] + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "contentType", + "contentId", + "contentParentId", + "reporterId", + "reporterKind", + "content", + "authorId", + "authorKind", + "reason", + "status", + "rejectionReason", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/notifications": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "href": { + "type": "string", + "nullable": true + }, + "readAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "title", + "body", + "href", + "readAt", + "createdAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/notifications": { + "get": { + "tags": [ + "Notifications" + ], + "parameters": [ + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "href": { + "type": "string", + "nullable": true + }, + "readAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "title", + "body", + "href", + "readAt", + "createdAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/notification-preferences": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "community_post_created", + "community_post_liked", + "community_comment", + "community_comment_liked", + "community_reply", + "community_reply_liked", + "community_membership_granted" + ] + }, + "appEnabled": { + "type": "boolean" + }, + "emailEnabled": { + "type": "boolean" + } + }, + "required": [ + "type", + "appEnabled", + "emailEnabled" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/notification-preferences/{type}": { + "patch": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "type", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "community_post_created", + "community_post_liked", + "community_comment", + "community_comment_liked", + "community_reply", + "community_reply_liked", + "community_membership_granted" + ] + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "appEnabled": { + "type": "boolean" + }, + "emailEnabled": { + "type": "boolean" + } + }, + "required": [ + "appEnabled", + "emailEnabled" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "community_post_created", + "community_post_liked", + "community_comment", + "community_comment_liked", + "community_reply", + "community_reply_liked", + "community_membership_granted" + ] + }, + "appEnabled": { + "type": "boolean" + }, + "emailEnabled": { + "type": "boolean" + } + }, + "required": [ + "type", + "appEnabled", + "emailEnabled" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/notifications/{notificationId}/read": { + "patch": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "notificationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "href": { + "type": "string", + "nullable": true + }, + "readAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "title", + "body", + "href", + "readAt", + "createdAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/notifications/read-all": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "updated": { + "type": "boolean" + } + }, + "required": [ + "updated" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/notifications/{notificationId}/read": { + "patch": { + "tags": [ + "Notifications" + ], + "parameters": [ + { + "name": "notificationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "href": { + "type": "string", + "nullable": true + }, + "readAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "title", + "body", + "href", + "readAt", + "createdAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/notifications/read-all": { + "post": { + "tags": [ + "Notifications" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "updated": { + "type": "boolean" + } + }, + "required": [ + "updated" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/products": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "course", + "download" + ] + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "privacy": { + "type": "string", + "enum": [ + "public", + "unlisted" + ] + }, + "leadMagnet": { + "type": "boolean" + }, + "certificate": { + "type": "boolean" + }, + "discussions": { + "type": "boolean" + }, + "includedWithCommunity": { + "type": "boolean" + }, + "discussionSpaceId": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "totalLessons": { + "type": "integer", + "minimum": 0 + }, + "completedLessonsCount": { + "type": "integer", + "minimum": 0 + }, + "certificateId": { + "type": "string", + "nullable": true + }, + "downloaded": { + "type": "boolean" + } + }, + "required": [ + "id", + "schoolId", + "kind", + "status", + "slug", + "title", + "description", + "featuredImage", + "privacy", + "leadMagnet", + "certificate", + "discussions", + "includedWithCommunity", + "discussionSpaceId", + "publishedAt", + "createdAt", + "updatedAt", + "totalLessons", + "completedLessonsCount", + "certificateId", + "downloaded" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/communities/{communityId}/leave": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "left": { + "type": "boolean" + } + }, + "required": [ + "left" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/communities/{communityId}/plans": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "communityId": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt", + "communityId" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/communities/{communityId}/checkout": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "minLength": 1 + }, + "joiningReason": { + "default": "", + "type": "string", + "maxLength": 2000 + }, + "returnUrl": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "planId" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "planId": { + "type": "string" + }, + "provider": { + "type": "string", + "enum": [ + "free", + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "paid", + "failed", + "cancelled", + "refunded", + "disputed" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "checkoutUrl": { + "type": "string", + "nullable": true + }, + "checkoutData": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "publicKey": { + "type": "string" + }, + "orderId": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "customerEmail": { + "type": "string" + }, + "customerName": { + "type": "string" + } + }, + "required": [ + "provider" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "communityId", + "planId", + "provider", + "status", + "currency", + "amountMinor", + "checkoutUrl", + "checkoutData", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/community-checkouts/{checkoutId}": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "checkoutId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "planId": { + "type": "string" + }, + "provider": { + "type": "string", + "enum": [ + "free", + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "paid", + "failed", + "cancelled", + "refunded", + "disputed" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "checkoutUrl": { + "type": "string", + "nullable": true + }, + "checkoutData": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "publicKey": { + "type": "string" + }, + "orderId": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "customerEmail": { + "type": "string" + }, + "customerName": { + "type": "string" + } + }, + "required": [ + "provider" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "communityId", + "planId", + "provider", + "status", + "currency", + "amountMinor", + "checkoutUrl", + "checkoutData", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products": { + "get": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "kind", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "course", + "download" + ] + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "course", + "download" + ] + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "privacy": { + "type": "string", + "enum": [ + "public", + "unlisted" + ] + }, + "leadMagnet": { + "type": "boolean" + }, + "certificate": { + "type": "boolean" + }, + "discussions": { + "type": "boolean" + }, + "includedWithCommunity": { + "type": "boolean" + }, + "discussionSpaceId": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "sales": { + "type": "integer", + "minimum": 0 + }, + "customers": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "id", + "schoolId", + "kind", + "status", + "slug", + "title", + "description", + "featuredImage", + "privacy", + "leadMagnet", + "certificate", + "discussions", + "includedWithCommunity", + "discussionSpaceId", + "publishedAt", + "createdAt", + "updatedAt", + "currency", + "sales", + "customers" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Products & Courses" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "kind": { + "default": "course", + "type": "string", + "enum": [ + "course", + "download" + ] + }, + "slug": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "description": { + "default": "", + "type": "string", + "maxLength": 8000 + } + }, + "required": [ + "title" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "course", + "download" + ] + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "privacy": { + "type": "string", + "enum": [ + "public", + "unlisted" + ] + }, + "leadMagnet": { + "type": "boolean" + }, + "certificate": { + "type": "boolean" + }, + "discussions": { + "type": "boolean" + }, + "includedWithCommunity": { + "type": "boolean" + }, + "discussionSpaceId": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "kind", + "status", + "slug", + "title", + "description", + "featuredImage", + "privacy", + "leadMagnet", + "certificate", + "discussions", + "includedWithCommunity", + "discussionSpaceId", + "publishedAt", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/products": { + "get": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "kind", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "course", + "download" + ] + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "course", + "download" + ] + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "privacy": { + "type": "string", + "enum": [ + "public", + "unlisted" + ] + }, + "leadMagnet": { + "type": "boolean" + }, + "certificate": { + "type": "boolean" + }, + "discussions": { + "type": "boolean" + }, + "includedWithCommunity": { + "type": "boolean" + }, + "discussionSpaceId": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "priceMinor": { + "type": "integer", + "minimum": 0, + "nullable": true + } + }, + "required": [ + "id", + "schoolId", + "kind", + "status", + "slug", + "title", + "description", + "featuredImage", + "privacy", + "leadMagnet", + "certificate", + "discussions", + "includedWithCommunity", + "discussionSpaceId", + "publishedAt", + "createdAt", + "updatedAt", + "currency", + "priceMinor" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/resolve-host": { + "get": { + "summary": "Resolve a school website host (verified custom domain or platform subdomain) to its school", + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "host", + "in": "query", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 253 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schoolId": { + "type": "string" + }, + "subdomain": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "schoolId", + "subdomain", + "name" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/checkout-sessions": { + "post": { + "tags": [ + "Storefront & Payments" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "productId": { + "type": "string", + "minLength": 1 + }, + "communityId": { + "type": "string", + "minLength": 1 + }, + "planId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "planId" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "resourceType": { + "type": "string", + "enum": [ + "product", + "community" + ] + }, + "resourceId": { + "type": "string" + }, + "productId": { + "type": "string", + "nullable": true + }, + "communityId": { + "type": "string", + "nullable": true + }, + "planId": { + "type": "string" + }, + "productTitle": { + "type": "string", + "nullable": true + }, + "productKind": { + "type": "string", + "enum": [ + "course", + "download" + ], + "nullable": true + }, + "communityName": { + "type": "string", + "nullable": true + }, + "planName": { + "type": "string" + }, + "planDescription": { + "type": "string" + }, + "planType": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "open", + "completed", + "expired" + ] + }, + "checkoutId": { + "type": "string", + "nullable": true + }, + "checkoutStatus": { + "type": "string", + "enum": [ + "pending", + "paid", + "failed", + "cancelled", + "refunded", + "disputed" + ], + "nullable": true + }, + "expiresAt": { + "type": "string" + } + }, + "required": [ + "id", + "resourceType", + "resourceId", + "productId", + "communityId", + "planId", + "productTitle", + "productKind", + "communityName", + "planName", + "planDescription", + "planType", + "currency", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "checkoutId", + "checkoutStatus", + "expiresAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/checkout-sessions/{sessionId}": { + "get": { + "tags": [ + "Storefront & Payments" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + { + "name": "sessionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "resourceType": { + "type": "string", + "enum": [ + "product", + "community" + ] + }, + "resourceId": { + "type": "string" + }, + "productId": { + "type": "string", + "nullable": true + }, + "communityId": { + "type": "string", + "nullable": true + }, + "planId": { + "type": "string" + }, + "productTitle": { + "type": "string", + "nullable": true + }, + "productKind": { + "type": "string", + "enum": [ + "course", + "download" + ], + "nullable": true + }, + "communityName": { + "type": "string", + "nullable": true + }, + "planName": { + "type": "string" + }, + "planDescription": { + "type": "string" + }, + "planType": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "open", + "completed", + "expired" + ] + }, + "checkoutId": { + "type": "string", + "nullable": true + }, + "checkoutStatus": { + "type": "string", + "enum": [ + "pending", + "paid", + "failed", + "cancelled", + "refunded", + "disputed" + ], + "nullable": true + }, + "expiresAt": { + "type": "string" + } + }, + "required": [ + "id", + "resourceType", + "resourceId", + "productId", + "communityId", + "planId", + "productTitle", + "productKind", + "communityName", + "planName", + "planDescription", + "planType", + "currency", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "checkoutId", + "checkoutStatus", + "expiresAt" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/communities": { + "get": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + { + "name": "spaceId", + "in": "query", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "membersCount": { + "type": "integer", + "minimum": 0 + }, + "postsCount": { + "type": "integer", + "minimum": 0 + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "membership": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "priceMinor": { + "type": "integer", + "minimum": 0, + "nullable": true + } + }, + "required": [ + "id", + "schoolId", + "name", + "slug", + "description", + "banner", + "categories", + "autoAcceptMembers", + "joiningReasonText", + "enabled", + "featuredImage", + "membersCount", + "postsCount", + "deletedAt", + "membership", + "createdAt", + "updatedAt", + "currency", + "priceMinor" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/communities/{communityId}": { + "get": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "autoAcceptMembers": { + "type": "boolean" + }, + "joiningReasonText": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "membersCount": { + "type": "integer", + "minimum": 0 + }, + "postsCount": { + "type": "integer", + "minimum": 0 + }, + "deletedAt": { + "type": "string", + "nullable": true + }, + "membership": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "learnerId": { + "type": "string", + "nullable": true + }, + "adminUserId": { + "type": "string", + "nullable": true + }, + "member": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "learner", + "admin" + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "kind", + "name", + "email", + "imageUrl" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "member", + "moderator", + "owner" + ] + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "communityId", + "learnerId", + "adminUserId", + "member", + "status", + "role", + "joiningReason", + "rejectionReason", + "paymentPlanId", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "slug", + "description", + "banner", + "categories", + "autoAcceptMembers", + "joiningReasonText", + "enabled", + "featuredImage", + "membersCount", + "postsCount", + "deletedAt", + "membership", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/communities/{communityId}/plans": { + "get": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "communityId": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt", + "communityId" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/site/settings": { + "get": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "subtitle": { + "type": "string", + "nullable": true + }, + "logo": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "themeId": { + "type": "string", + "nullable": true + }, + "theme": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "codeInjectionHead": { + "type": "string" + }, + "codeInjectionBody": { + "type": "string" + }, + "canonicalHost": { + "type": "string", + "nullable": true + } + }, + "required": [ + "title", + "subtitle", + "logo", + "themeId", + "theme", + "codeInjectionHead", + "codeInjectionBody", + "canonicalHost" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/site/pages": { + "get": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + { + "name": "slug", + "in": "query", + "schema": { + "default": "", + "type": "string", + "maxLength": 200 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "pageId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "layout": { + "type": "array", + "items": { + "type": "object", + "properties": { + "widgetId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "deletable": { + "type": "boolean" + }, + "moveable": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "settings": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "required": [ + "widgetId", + "name", + "deletable", + "moveable", + "shared" + ] + } + }, + "title": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "socialImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "robotsAllowed": { + "type": "boolean", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "pageId", + "name", + "slug", + "layout", + "title", + "description", + "socialImage", + "robotsAllowed", + "publishedAt", + "updatedAt" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/site/blogs": { + "get": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "blogId": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string", + "nullable": true + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "meta": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "name", + "imageUrl" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "blogId", + "slug", + "title", + "content", + "excerpt", + "featuredImage", + "meta", + "author", + "createdAt", + "publishedAt", + "updatedAt" + ] + } + }, + "total": { + "type": "integer" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/site/blogs/{slug}": { + "get": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + { + "name": "slug", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 200 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "blogId": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string", + "nullable": true + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "meta": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "imageUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "name", + "imageUrl" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "blogId", + "slug", + "title", + "content", + "excerpt", + "featuredImage", + "meta", + "author", + "createdAt", + "publishedAt", + "updatedAt" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/contacts": { + "get": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [ + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "segmentId", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "schema": { + "default": 1, + "type": "integer", + "minimum": 1 + } + }, + { + "name": "rowsPerPage", + "in": "query", + "schema": { + "default": 20, + "type": "integer", + "minimum": 1, + "maximum": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "name": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "avatar": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "deactivated", + "deletion_pending" + ] + }, + "registrationStatus": { + "type": "string", + "enum": [ + "newsletter_only", + "registered" + ] + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "lastActiveAt": { + "type": "string", + "nullable": true + }, + "marketing": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "subscribed", + "tags" + ] + } + }, + "required": [ + "id", + "schoolId", + "email", + "name", + "bio", + "avatar", + "status", + "registrationStatus", + "createdAt", + "updatedAt", + "lastActiveAt", + "marketing" + ] + } + }, + "total": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/contacts/{contactId}": { + "get": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [ + { + "name": "contactId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "name": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "avatar": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "deactivated", + "deletion_pending" + ] + }, + "registrationStatus": { + "type": "string", + "enum": [ + "newsletter_only", + "registered" + ] + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "lastActiveAt": { + "type": "string", + "nullable": true + }, + "marketing": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "subscribed", + "tags" + ] + } + }, + "required": [ + "id", + "schoolId", + "email", + "name", + "bio", + "avatar", + "status", + "registrationStatus", + "createdAt", + "updatedAt", + "lastActiveAt", + "marketing" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [ + { + "name": "contactId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "bio": { + "type": "string", + "maxLength": 2000 + }, + "avatar": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "deactivated" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "name": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "avatar": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "deactivated", + "deletion_pending" + ] + }, + "registrationStatus": { + "type": "string", + "enum": [ + "newsletter_only", + "registered" + ] + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "lastActiveAt": { + "type": "string", + "nullable": true + }, + "marketing": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "subscribed", + "tags" + ] + } + }, + "required": [ + "id", + "schoolId", + "email", + "name", + "bio", + "avatar", + "status", + "registrationStatus", + "createdAt", + "updatedAt", + "lastActiveAt", + "marketing" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [ + { + "name": "contactId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + true + ] + } + }, + "required": [ + "success" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/contacts/{contactId}/marketing": { + "patch": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [ + { + "name": "contactId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "subscribed", + "tags" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/contacts/filter-preview": { + "post": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "filter": { + "type": "object", + "properties": { + "version": { + "default": 1, + "type": "number", + "enum": [ + 1 + ] + }, + "aggregator": { + "type": "string", + "enum": [ + "and", + "or" + ] + }, + "filters": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "email" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is exactly", + "Contains", + "Does not contain" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "product" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + }, + "valueLabel": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "community" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is a member", + "Is not a member" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "lastActive", + "signedUp" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Before", + "After", + "On" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "subscription" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Subscribed", + "Not subscribed" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "tag" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + } + ] + } + } + }, + "required": [ + "aggregator", + "filters" + ] + }, + "page": { + "default": 1, + "type": "integer", + "minimum": 1 + }, + "rowsPerPage": { + "default": 20, + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "required": [ + "filter" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "filter": { + "type": "object", + "properties": { + "version": { + "default": 1, + "type": "number", + "enum": [ + 1 + ] + }, + "aggregator": { + "type": "string", + "enum": [ + "and", + "or" + ] + }, + "filters": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "email" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is exactly", + "Contains", + "Does not contain" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "product" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + }, + "valueLabel": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "community" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is a member", + "Is not a member" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "lastActive", + "signedUp" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Before", + "After", + "On" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "subscription" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Subscribed", + "Not subscribed" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "tag" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + } + ] + } + } + }, + "required": [ + "aggregator", + "filters" + ] + }, + "totalCount": { + "type": "integer", + "minimum": 0 + }, + "contacts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "name": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "avatar": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "deactivated", + "deletion_pending" + ] + }, + "registrationStatus": { + "type": "string", + "enum": [ + "newsletter_only", + "registered" + ] + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "lastActiveAt": { + "type": "string", + "nullable": true + }, + "marketing": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "subscribed", + "tags" + ] + } + }, + "required": [ + "id", + "schoolId", + "email", + "name", + "bio", + "avatar", + "status", + "registrationStatus", + "createdAt", + "updatedAt", + "lastActiveAt", + "marketing" + ] + } + } + }, + "required": [ + "filter", + "totalCount", + "contacts" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/contact-segments": { + "get": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "filter": { + "type": "object", + "properties": { + "version": { + "default": 1, + "type": "number", + "enum": [ + 1 + ] + }, + "aggregator": { + "type": "string", + "enum": [ + "and", + "or" + ] + }, + "filters": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "email" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is exactly", + "Contains", + "Does not contain" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "product" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + }, + "valueLabel": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "community" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is a member", + "Is not a member" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "lastActive", + "signedUp" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Before", + "After", + "On" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "subscription" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Subscribed", + "Not subscribed" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "tag" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + } + ] + } + } + }, + "required": [ + "aggregator", + "filters" + ] + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "filter", + "createdAt", + "updatedAt" + ] + } + }, + "unsupportedCount": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "items", + "unsupportedCount" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "filter": { + "type": "object", + "properties": { + "version": { + "default": 1, + "type": "number", + "enum": [ + 1 + ] + }, + "aggregator": { + "type": "string", + "enum": [ + "and", + "or" + ] + }, + "filters": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "email" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is exactly", + "Contains", + "Does not contain" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "product" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + }, + "valueLabel": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "community" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is a member", + "Is not a member" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "lastActive", + "signedUp" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Before", + "After", + "On" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "subscription" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Subscribed", + "Not subscribed" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "tag" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + } + ] + } + } + }, + "required": [ + "aggregator", + "filters" + ] + } + }, + "required": [ + "name", + "filter" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "filter": { + "type": "object", + "properties": { + "version": { + "default": 1, + "type": "number", + "enum": [ + 1 + ] + }, + "aggregator": { + "type": "string", + "enum": [ + "and", + "or" + ] + }, + "filters": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "email" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is exactly", + "Contains", + "Does not contain" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "product" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + }, + "valueLabel": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "community" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is a member", + "Is not a member" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "lastActive", + "signedUp" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Before", + "After", + "On" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "subscription" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Subscribed", + "Not subscribed" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "tag" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + } + ] + } + } + }, + "required": [ + "aggregator", + "filters" + ] + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "filter", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/contact-segments/{segmentId}": { + "get": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [ + { + "name": "segmentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "filter": { + "type": "object", + "properties": { + "version": { + "default": 1, + "type": "number", + "enum": [ + 1 + ] + }, + "aggregator": { + "type": "string", + "enum": [ + "and", + "or" + ] + }, + "filters": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "email" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is exactly", + "Contains", + "Does not contain" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "product" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + }, + "valueLabel": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "community" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is a member", + "Is not a member" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "lastActive", + "signedUp" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Before", + "After", + "On" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "subscription" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Subscribed", + "Not subscribed" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "tag" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + } + ] + } + } + }, + "required": [ + "aggregator", + "filters" + ] + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "filter", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "422": { + "description": "422", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [ + { + "name": "segmentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "filter": { + "type": "object", + "properties": { + "version": { + "default": 1, + "type": "number", + "enum": [ + 1 + ] + }, + "aggregator": { + "type": "string", + "enum": [ + "and", + "or" + ] + }, + "filters": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "email" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is exactly", + "Contains", + "Does not contain" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "product" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + }, + "valueLabel": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "community" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is a member", + "Is not a member" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "lastActive", + "signedUp" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Before", + "After", + "On" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "subscription" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Subscribed", + "Not subscribed" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "tag" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + } + ] + } + } + }, + "required": [ + "aggregator", + "filters" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "filter": { + "type": "object", + "properties": { + "version": { + "default": 1, + "type": "number", + "enum": [ + 1 + ] + }, + "aggregator": { + "type": "string", + "enum": [ + "and", + "or" + ] + }, + "filters": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "email" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is exactly", + "Contains", + "Does not contain" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "product" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + }, + "valueLabel": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "community" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is a member", + "Is not a member" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "lastActive", + "signedUp" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Before", + "After", + "On" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "subscription" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Subscribed", + "Not subscribed" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "tag" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + } + ] + } + } + }, + "required": [ + "aggregator", + "filters" + ] + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "filter", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "422": { + "description": "422", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [ + { + "name": "segmentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + true + ] + } + }, + "required": [ + "success" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/contact-segments/{segmentId}/members": { + "get": { + "tags": [ + "Contacts & Marketing" + ], + "parameters": [ + { + "name": "segmentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "schema": { + "default": 1, + "type": "integer", + "minimum": 1 + } + }, + { + "name": "rowsPerPage", + "in": "query", + "schema": { + "default": 20, + "type": "integer", + "minimum": 1, + "maximum": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "segment": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "filter": { + "type": "object", + "properties": { + "version": { + "default": 1, + "type": "number", + "enum": [ + 1 + ] + }, + "aggregator": { + "type": "string", + "enum": [ + "and", + "or" + ] + }, + "filters": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "email" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is exactly", + "Contains", + "Does not contain" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "product" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + }, + "valueLabel": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "community" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Is a member", + "Is not a member" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "lastActive", + "signedUp" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Before", + "After", + "On" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "subscription" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Subscribed", + "Not subscribed" + ] + } + }, + "required": [ + "name", + "condition" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "tag" + ] + }, + "condition": { + "type": "string", + "enum": [ + "Has", + "Does not have" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "condition", + "value" + ] + } + ] + } + } + }, + "required": [ + "aggregator", + "filters" + ] + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "filter", + "createdAt", + "updatedAt" + ] + }, + "totalCount": { + "type": "integer", + "minimum": 0 + }, + "contacts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "name": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "avatar": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "deactivated", + "deletion_pending" + ] + }, + "registrationStatus": { + "type": "string", + "enum": [ + "newsletter_only", + "registered" + ] + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "lastActiveAt": { + "type": "string", + "nullable": true + }, + "marketing": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "subscribed", + "tags" + ] + } + }, + "required": [ + "id", + "schoolId", + "email", + "name", + "bio", + "avatar", + "status", + "registrationStatus", + "createdAt", + "updatedAt", + "lastActiveAt", + "marketing" + ] + } + } + }, + "required": [ + "segment", + "totalCount", + "contacts" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "422": { + "description": "422", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/newsletter/subscribe": { + "post": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "email" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "subscribed" + ] + }, + "email": { + "type": "string" + } + }, + "required": [ + "status", + "email" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products/{productId}": { + "patch": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "slug": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "description": { + "type": "string", + "maxLength": 8000 + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "privacy": { + "type": "string", + "enum": [ + "public", + "unlisted" + ] + }, + "leadMagnet": { + "type": "boolean" + }, + "certificate": { + "type": "boolean" + }, + "discussions": { + "type": "boolean" + }, + "includedWithCommunity": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "course", + "download" + ] + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "privacy": { + "type": "string", + "enum": [ + "public", + "unlisted" + ] + }, + "leadMagnet": { + "type": "boolean" + }, + "certificate": { + "type": "boolean" + }, + "discussions": { + "type": "boolean" + }, + "includedWithCommunity": { + "type": "boolean" + }, + "discussionSpaceId": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "kind", + "status", + "slug", + "title", + "description", + "featuredImage", + "privacy", + "leadMagnet", + "certificate", + "discussions", + "includedWithCommunity", + "discussionSpaceId", + "publishedAt", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "get": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "course", + "download" + ] + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "privacy": { + "type": "string", + "enum": [ + "public", + "unlisted" + ] + }, + "leadMagnet": { + "type": "boolean" + }, + "certificate": { + "type": "boolean" + }, + "discussions": { + "type": "boolean" + }, + "includedWithCommunity": { + "type": "boolean" + }, + "discussionSpaceId": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "enrolled": { + "type": "boolean" + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "dripEnabled": { + "type": "boolean" + }, + "dripType": { + "type": "string", + "enum": [ + "relative-date", + "exact-date" + ], + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "position", + "dripEnabled", + "dripType", + "dripDelaySeconds", + "dripAt" + ] + } + }, + "lessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "text", + "video", + "audio", + "pdf", + "file", + "embed", + "quiz", + "scorm" + ] + }, + "mediaId": { + "type": "string", + "nullable": true + }, + "sectionId": { + "type": "string", + "nullable": true + }, + "position": { + "type": "integer" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "downloadable": { + "type": "boolean" + }, + "requiresEnrollment": { + "type": "boolean" + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + }, + "availableAt": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "type", + "mediaId", + "sectionId", + "position", + "status", + "downloadable", + "requiresEnrollment", + "content", + "dripDelaySeconds", + "dripAt", + "availableAt", + "publishedAt" + ] + } + } + }, + "required": [ + "id", + "schoolId", + "kind", + "status", + "slug", + "title", + "description", + "featuredImage", + "privacy", + "leadMagnet", + "certificate", + "discussions", + "includedWithCommunity", + "discussionSpaceId", + "publishedAt", + "createdAt", + "updatedAt", + "enrolled", + "sections", + "lessons" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products/{productId}/certificate-template": { + "get": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "subtitle": { + "type": "string" + }, + "description": { + "type": "string", + "maxLength": 400 + }, + "signatureName": { + "type": "string" + }, + "signatureDesignation": { + "type": "string" + }, + "signatureImageId": { + "type": "string", + "nullable": true + }, + "logoId": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "productId", + "title", + "subtitle", + "description", + "signatureName", + "signatureDesignation", + "signatureImageId", + "logoId" + ], + "nullable": true + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "maxLength": 200 + }, + "subtitle": { + "type": "string", + "maxLength": 200 + }, + "description": { + "type": "string", + "maxLength": 400 + }, + "signatureName": { + "type": "string", + "maxLength": 200 + }, + "signatureDesignation": { + "type": "string", + "maxLength": 200 + }, + "signatureImageId": { + "type": "string", + "minLength": 1, + "nullable": true + }, + "logoId": { + "type": "string", + "minLength": 1, + "nullable": true + } + }, + "required": [ + "title", + "subtitle", + "description", + "signatureName", + "signatureDesignation", + "signatureImageId", + "logoId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "subtitle": { + "type": "string" + }, + "description": { + "type": "string", + "maxLength": 400 + }, + "signatureName": { + "type": "string" + }, + "signatureDesignation": { + "type": "string" + }, + "signatureImageId": { + "type": "string", + "nullable": true + }, + "logoId": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "productId", + "title", + "subtitle", + "description", + "signatureName", + "signatureDesignation", + "signatureImageId", + "logoId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products/{productId}/plans": { + "get": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "productId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "description": { + "default": "", + "type": "string", + "maxLength": 2000 + }, + "includedProducts": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "oneTimeAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "emiAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "minimum": 2, + "maximum": 60, + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "maximum": 60, + "nullable": true + }, + "providerProductId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "productId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/products/{productId}/plans": { + "get": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "productId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/plans/{planId}": { + "patch": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "planId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "description": { + "type": "string", + "maxLength": 2000 + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "oneTimeAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "emiAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "minimum": 2, + "maximum": 60, + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "maximum": 60, + "nullable": true + }, + "providerProductId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "nullable": true + } + }, + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "productId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/plans/{planId}/default": { + "post": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "planId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "productId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/plans/{planId}/archive": { + "post": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "planId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "productId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/communities/{communityId}/plans": { + "get": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "communityId": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt", + "communityId" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "communityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "description": { + "default": "", + "type": "string", + "maxLength": 2000 + }, + "includedProducts": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "oneTimeAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "emiAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "minimum": 2, + "maximum": 60, + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "maximum": 60, + "nullable": true + }, + "providerProductId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "communityId": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt", + "communityId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/community-plans/{planId}": { + "patch": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "planId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "description": { + "type": "string", + "maxLength": 2000 + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "oneTimeAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "emiAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "minimum": 2, + "maximum": 60, + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "maximum": 60, + "nullable": true + }, + "providerProductId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "nullable": true + } + }, + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "communityId": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt", + "communityId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/community-plans/{planId}/default": { + "post": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "planId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "communityId": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt", + "communityId" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/community-plans/{planId}/archive": { + "post": { + "tags": [ + "Communities" + ], + "parameters": [ + { + "name": "planId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "includedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "providerProductId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "free", + "onetime", + "emi", + "subscription" + ] + }, + "kind": { + "type": "string", + "enum": [ + "free", + "one_time", + "subscription", + "installment" + ] + }, + "currency": { + "type": "string" + }, + "oneTimeAmount": { + "type": "number", + "nullable": true + }, + "emiAmount": { + "type": "number", + "nullable": true + }, + "emiTotalInstallments": { + "type": "integer", + "nullable": true + }, + "subscriptionMonthlyAmount": { + "type": "number", + "nullable": true + }, + "subscriptionYearlyAmount": { + "type": "number", + "nullable": true + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "billingInterval": { + "type": "string", + "enum": [ + "month", + "year" + ], + "nullable": true + }, + "installmentCount": { + "type": "integer", + "minimum": 2, + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "communityId": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "description", + "includedProducts", + "providerProductId", + "type", + "kind", + "currency", + "oneTimeAmount", + "emiAmount", + "emiTotalInstallments", + "subscriptionMonthlyAmount", + "subscriptionYearlyAmount", + "amountMinor", + "billingInterval", + "installmentCount", + "status", + "isDefault", + "createdAt", + "updatedAt", + "communityId" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/products/{productId}": { + "get": { + "summary": "Read a published product; a learner session for the same school receives its enrolled view", + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "course", + "download" + ] + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "privacy": { + "type": "string", + "enum": [ + "public", + "unlisted" + ] + }, + "leadMagnet": { + "type": "boolean" + }, + "certificate": { + "type": "boolean" + }, + "discussions": { + "type": "boolean" + }, + "includedWithCommunity": { + "type": "boolean" + }, + "discussionSpaceId": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "enrolled": { + "type": "boolean" + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "dripEnabled": { + "type": "boolean" + }, + "dripType": { + "type": "string", + "enum": [ + "relative-date", + "exact-date" + ], + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "position", + "dripEnabled", + "dripType", + "dripDelaySeconds", + "dripAt" + ] + } + }, + "lessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "text", + "video", + "audio", + "pdf", + "file", + "embed", + "quiz", + "scorm" + ] + }, + "mediaId": { + "type": "string", + "nullable": true + }, + "sectionId": { + "type": "string", + "nullable": true + }, + "position": { + "type": "integer" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "downloadable": { + "type": "boolean" + }, + "requiresEnrollment": { + "type": "boolean" + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + }, + "availableAt": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "type", + "mediaId", + "sectionId", + "position", + "status", + "downloadable", + "requiresEnrollment", + "content", + "dripDelaySeconds", + "dripAt", + "availableAt", + "publishedAt" + ] + } + } + }, + "required": [ + "id", + "schoolId", + "kind", + "status", + "slug", + "title", + "description", + "featuredImage", + "privacy", + "leadMagnet", + "certificate", + "discussions", + "includedWithCommunity", + "discussionSpaceId", + "publishedAt", + "createdAt", + "updatedAt", + "enrolled", + "sections", + "lessons" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/login-methods": { + "get": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schoolId": { + "type": "string" + }, + "loginMethods": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "email", + "google" + ] + } + }, + "hasGoogle": { + "type": "boolean" + } + }, + "required": [ + "schoolId", + "loginMethods", + "hasGoogle" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/lead-magnets": { + "post": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "productId": { + "type": "string", + "minLength": 1 + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": [ + "productId", + "email" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "sent" + ] + }, + "email": { + "type": "string" + } + }, + "required": [ + "status", + "email" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "422": { + "description": "422", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products/{productId}/analytics": { + "get": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "range", + "in": "query", + "schema": { + "default": "7d", + "type": "string", + "enum": [ + "7d", + "30d", + "90d", + "1y" + ] + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "productId": { + "type": "string" + }, + "range": { + "type": "string", + "enum": [ + "7d", + "30d", + "90d", + "1y" + ] + }, + "currency": { + "type": "string" + }, + "sales": { + "type": "object", + "properties": { + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "growth": { + "type": "number" + }, + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "date", + "amountMinor" + ] + } + } + }, + "required": [ + "amountMinor", + "growth", + "points" + ] + }, + "customers": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "growth": { + "type": "number" + } + }, + "required": [ + "count", + "growth" + ] + }, + "completions": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "growth": { + "type": "number" + } + }, + "required": [ + "count", + "growth" + ] + }, + "downloads": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "growth": { + "type": "number" + } + }, + "required": [ + "count", + "growth" + ] + } + }, + "required": [ + "productId", + "range", + "currency", + "sales", + "customers", + "completions", + "downloads" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products/{productId}/customers": { + "get": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "schema": { + "default": 1, + "type": "integer", + "minimum": 1 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 100 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "membershipId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "avatar": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "accountStatus": { + "type": "string", + "enum": [ + "active", + "deactivated", + "deletion_pending" + ] + }, + "membershipStatus": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "subscriptionMethod": { + "type": "string", + "nullable": true + }, + "subscriptionId": { + "type": "string", + "nullable": true + }, + "signedUpAt": { + "type": "string" + }, + "lastActiveAt": { + "type": "string", + "nullable": true + }, + "progress": { + "type": "object", + "properties": { + "completedLessons": { + "type": "integer", + "minimum": 0 + }, + "totalLessons": { + "type": "integer", + "minimum": 0 + }, + "percentage": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + }, + "required": [ + "completedLessons", + "totalLessons", + "percentage" + ] + } + }, + "required": [ + "id", + "membershipId", + "name", + "email", + "avatar", + "accountStatus", + "membershipStatus", + "subscriptionMethod", + "subscriptionId", + "signedUpAt", + "lastActiveAt", + "progress" + ] + } + }, + "total": { + "type": "integer", + "minimum": 0 + }, + "page": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "items", + "total", + "page", + "limit" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products/{productId}/customers/{customerId}/progress": { + "get": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "customer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "avatar": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + } + }, + "required": [ + "id", + "name", + "email", + "avatar" + ] + }, + "lessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "completed": { + "type": "boolean" + }, + "completedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "completed", + "completedAt" + ] + } + } + }, + "required": [ + "customer", + "lessons" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/overview": { + "get": { + "tags": [ + "School & Team" + ], + "parameters": [ + { + "name": "range", + "in": "query", + "schema": { + "default": "7d", + "type": "string", + "enum": [ + "7d", + "30d", + "90d", + "1y" + ] + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "range": { + "type": "string", + "enum": [ + "7d", + "30d", + "90d", + "1y" + ] + }, + "currency": { + "type": "string" + }, + "sales": { + "type": "object", + "properties": { + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "growth": { + "type": "number" + }, + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "date", + "amountMinor" + ] + } + } + }, + "required": [ + "amountMinor", + "growth", + "points" + ] + }, + "customers": { + "type": "object", + "properties": { + "count": { + "type": "number", + "minimum": 0 + }, + "growth": { + "type": "number" + } + }, + "required": [ + "count", + "growth" + ] + }, + "communityMembers": { + "type": "object", + "properties": { + "count": { + "type": "number", + "minimum": 0 + }, + "growth": { + "type": "number" + } + }, + "required": [ + "count", + "growth" + ] + }, + "subscribers": { + "type": "object", + "properties": { + "count": { + "type": "number", + "minimum": 0 + }, + "growth": { + "type": "number" + } + }, + "required": [ + "count", + "growth" + ] + } + }, + "required": [ + "range", + "currency", + "sales", + "customers", + "communityMembers", + "subscribers" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products/{productId}/preview": { + "post": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ttlSeconds": { + "default": 900, + "type": "integer", + "minimum": 60, + "maximum": 3600 + } + } + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "expiresAt": { + "type": "string" + } + }, + "required": [ + "token", + "schoolId", + "productId", + "expiresAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/preview/products/{productId}": { + "get": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "x-preview-token", + "in": "header", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "course", + "download" + ] + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "slug": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "privacy": { + "type": "string", + "enum": [ + "public", + "unlisted" + ] + }, + "leadMagnet": { + "type": "boolean" + }, + "certificate": { + "type": "boolean" + }, + "discussions": { + "type": "boolean" + }, + "includedWithCommunity": { + "type": "boolean" + }, + "discussionSpaceId": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "enrolled": { + "type": "boolean" + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "dripEnabled": { + "type": "boolean" + }, + "dripType": { + "type": "string", + "enum": [ + "relative-date", + "exact-date" + ], + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "position", + "dripEnabled", + "dripType", + "dripDelaySeconds", + "dripAt" + ] + } + }, + "lessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "text", + "video", + "audio", + "pdf", + "file", + "embed", + "quiz", + "scorm" + ] + }, + "mediaId": { + "type": "string", + "nullable": true + }, + "sectionId": { + "type": "string", + "nullable": true + }, + "position": { + "type": "integer" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "downloadable": { + "type": "boolean" + }, + "requiresEnrollment": { + "type": "boolean" + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + }, + "availableAt": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "type", + "mediaId", + "sectionId", + "position", + "status", + "downloadable", + "requiresEnrollment", + "content", + "dripDelaySeconds", + "dripAt", + "availableAt", + "publishedAt" + ] + } + } + }, + "required": [ + "id", + "schoolId", + "kind", + "status", + "slug", + "title", + "description", + "featuredImage", + "privacy", + "leadMagnet", + "certificate", + "discussions", + "includedWithCommunity", + "discussionSpaceId", + "publishedAt", + "createdAt", + "updatedAt", + "enrolled", + "sections", + "lessons" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/public/{schoolId}/products/{productId}/lessons/{lessonId}/media": { + "get": { + "tags": [ + "Public Website" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lessonId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/preview/products/{productId}/lessons/{lessonId}/media": { + "get": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lessonId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "x-preview-token", + "in": "header", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "id", + "url", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/products/{productId}/lessons/{lessonId}/scorm/runtime": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lessonId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lessonId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "properties": { + "updates": { + "type": "object", + "additionalProperties": { + "type": "string", + "maxLength": 4096 + } + } + }, + "required": [ + "updates" + ] + }, + { + "type": "object", + "properties": { + "element": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "value": { + "type": "string", + "maxLength": 4096 + } + }, + "required": [ + "element", + "value" + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/lessons/{lessonId}/scorm/process": { + "post": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "lessonId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "mediaId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + true + ] + }, + "packageInfo": { + "type": "object", + "properties": { + "version": { + "type": "string", + "enum": [ + "1.2", + "2004" + ] + }, + "title": { + "type": "string" + }, + "entryPoint": { + "type": "string" + }, + "scoCount": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + }, + "fileCount": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "version", + "title", + "entryPoint", + "scoCount", + "fileCount" + ] + } + }, + "required": [ + "success", + "packageInfo" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/products/{productId}/lessons/{lessonId}/evaluation": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lessonId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "answers": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "maxItems": 1000 + }, + "minItems": 1, + "maxItems": 100 + } + }, + "required": [ + "answers" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "pass": { + "type": "boolean" + }, + "score": { + "type": "number" + }, + "requiresPassingGrade": { + "type": "boolean" + }, + "passingGrade": { + "type": "number" + } + }, + "required": [ + "pass", + "score", + "requiresPassingGrade", + "passingGrade" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products/{productId}/lessons": { + "post": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "type": { + "default": "text", + "type": "string", + "enum": [ + "text", + "video", + "audio", + "pdf", + "file", + "embed", + "quiz", + "scorm" + ] + }, + "content": { + "default": {}, + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "mediaId": { + "type": "string", + "minLength": 1, + "nullable": true + }, + "downloadable": { + "type": "boolean" + }, + "requiresEnrollment": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "sectionId": { + "type": "string", + "minLength": 1 + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "maximum": 315360000, + "nullable": true + }, + "dripAt": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "required": [ + "title" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "text", + "video", + "audio", + "pdf", + "file", + "embed", + "quiz", + "scorm" + ] + }, + "mediaId": { + "type": "string", + "nullable": true + }, + "sectionId": { + "type": "string", + "nullable": true + }, + "position": { + "type": "integer" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "downloadable": { + "type": "boolean" + }, + "requiresEnrollment": { + "type": "boolean" + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + }, + "availableAt": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "type", + "mediaId", + "sectionId", + "position", + "status", + "downloadable", + "requiresEnrollment", + "content", + "dripDelaySeconds", + "dripAt", + "availableAt", + "publishedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products/{productId}/sections": { + "get": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "dripEnabled": { + "type": "boolean" + }, + "dripType": { + "type": "string", + "enum": [ + "relative-date", + "exact-date" + ], + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "position", + "dripEnabled", + "dripType", + "dripDelaySeconds", + "dripAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "dripEnabled": { + "type": "boolean" + }, + "dripType": { + "type": "string", + "enum": [ + "relative-date", + "exact-date" + ], + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "maximum": 315360000, + "nullable": true + }, + "dripAt": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "required": [ + "title" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "dripEnabled": { + "type": "boolean" + }, + "dripType": { + "type": "string", + "enum": [ + "relative-date", + "exact-date" + ], + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "position", + "dripEnabled", + "dripType", + "dripDelaySeconds", + "dripAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products/{productId}/sections/reorder": { + "post": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sectionIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "sectionIds" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "dripEnabled": { + "type": "boolean" + }, + "dripType": { + "type": "string", + "enum": [ + "relative-date", + "exact-date" + ], + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "position", + "dripEnabled", + "dripType", + "dripDelaySeconds", + "dripAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/products/{productId}/lessons/reorder": { + "post": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "lessonIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "sectionAssignments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "lessonId": { + "type": "string", + "minLength": 1 + }, + "sectionId": { + "type": "string", + "minLength": 1, + "nullable": true + } + }, + "required": [ + "lessonId", + "sectionId" + ] + } + } + }, + "required": [ + "lessonIds" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "text", + "video", + "audio", + "pdf", + "file", + "embed", + "quiz", + "scorm" + ] + }, + "mediaId": { + "type": "string", + "nullable": true + }, + "sectionId": { + "type": "string", + "nullable": true + }, + "position": { + "type": "integer" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "downloadable": { + "type": "boolean" + }, + "requiresEnrollment": { + "type": "boolean" + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + }, + "availableAt": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "type", + "mediaId", + "sectionId", + "position", + "status", + "downloadable", + "requiresEnrollment", + "content", + "dripDelaySeconds", + "dripAt", + "availableAt", + "publishedAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/lessons/{lessonId}": { + "patch": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "lessonId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "mediaId": { + "type": "string", + "minLength": 1, + "nullable": true + }, + "downloadable": { + "type": "boolean" + }, + "requiresEnrollment": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "sectionId": { + "type": "string", + "minLength": 1, + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "maximum": 315360000, + "nullable": true + }, + "dripAt": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "text", + "video", + "audio", + "pdf", + "file", + "embed", + "quiz", + "scorm" + ] + }, + "mediaId": { + "type": "string", + "nullable": true + }, + "sectionId": { + "type": "string", + "nullable": true + }, + "position": { + "type": "integer" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published" + ] + }, + "downloadable": { + "type": "boolean" + }, + "requiresEnrollment": { + "type": "boolean" + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + }, + "availableAt": { + "type": "string", + "nullable": true + }, + "publishedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "type", + "mediaId", + "sectionId", + "position", + "status", + "downloadable", + "requiresEnrollment", + "content", + "dripDelaySeconds", + "dripAt", + "availableAt", + "publishedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "lessonId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/sections/{sectionId}": { + "patch": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "sectionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "dripEnabled": { + "type": "boolean" + }, + "dripType": { + "type": "string", + "enum": [ + "relative-date", + "exact-date" + ], + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "maximum": 315360000, + "nullable": true + }, + "dripAt": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "dripEnabled": { + "type": "boolean" + }, + "dripType": { + "type": "string", + "enum": [ + "relative-date", + "exact-date" + ], + "nullable": true + }, + "dripDelaySeconds": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "dripAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "title", + "position", + "dripEnabled", + "dripType", + "dripDelaySeconds", + "dripAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Products & Courses" + ], + "parameters": [ + { + "name": "sectionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/media/upload-authorizations": { + "post": { + "tags": [ + "Media" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "fileName": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0, + "maximum": 1000000000 + }, + "purpose": { + "type": "string", + "enum": [ + "school_branding", + "website_page", + "blog_artwork", + "product_artwork", + "product_content", + "lesson_media", + "lesson_content", + "downloadable_file", + "community_artwork", + "community_content", + "learner_avatar", + "certificate_template" + ] + }, + "accessPolicy": { + "default": "private", + "type": "string", + "enum": [ + "public", + "private" + ] + } + }, + "required": [ + "fileName", + "mimeType", + "byteSize", + "purpose" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uploadId": { + "type": "string" + }, + "uploadUrl": { + "type": "string", + "format": "uri" + }, + "uploadProtocol": { + "type": "string", + "enum": [ + "direct", + "tus" + ] + }, + "uploadMethod": { + "type": "string", + "enum": [ + "PUT", + "POST" + ] + }, + "uploadHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "uploadFields": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "expiresAt": { + "type": "string" + } + }, + "required": [ + "uploadId", + "uploadUrl", + "uploadProtocol", + "uploadMethod", + "uploadHeaders", + "uploadFields", + "expiresAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/media": { + "post": { + "tags": [ + "Media" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uploadId": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "altText": { + "default": "", + "type": "string", + "maxLength": 1000 + }, + "caption": { + "default": "", + "type": "string", + "maxLength": 2000 + }, + "accessPolicy": { + "default": "private", + "type": "string", + "enum": [ + "public", + "private" + ] + } + }, + "required": [ + "uploadId" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "canonicalUrl": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + }, + "width": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "height": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + }, + "category": { + "type": "string", + "enum": [ + "library", + "user_uploads" + ] + }, + "altText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "accessPolicy": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "deleting" + ] + }, + "usageCount": { + "type": "integer", + "minimum": 0 + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "canonicalUrl", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize", + "width", + "height", + "kind", + "category", + "altText", + "caption", + "accessPolicy", + "status", + "usageCount", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "get": { + "tags": [ + "Media" + ], + "parameters": [ + { + "name": "search", + "in": "query", + "schema": { + "type": "string", + "maxLength": 200 + } + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "maxLength": 500 + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "category", + "in": "query", + "schema": { + "default": "library", + "type": "string", + "enum": [ + "library", + "user_uploads" + ] + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "canonicalUrl": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + }, + "width": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "height": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + }, + "category": { + "type": "string", + "enum": [ + "library", + "user_uploads" + ] + }, + "altText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "accessPolicy": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "deleting" + ] + }, + "usageCount": { + "type": "integer", + "minimum": 0 + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "canonicalUrl", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize", + "width", + "height", + "kind", + "category", + "altText", + "caption", + "accessPolicy", + "status", + "usageCount", + "createdAt", + "updatedAt" + ] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": [ + "items", + "nextCursor" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/media/unsplash": { + "get": { + "tags": [ + "Media" + ], + "parameters": [ + { + "name": "q", + "in": "query", + "schema": { + "type": "string", + "maxLength": 200 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "configured": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbUrl": { + "type": "string", + "format": "uri" + }, + "alt": { + "type": "string" + }, + "photographer": { + "type": "string" + } + }, + "required": [ + "id", + "url", + "thumbUrl" + ] + } + } + }, + "required": [ + "configured", + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "502": { + "description": "502", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/media/{mediaId}": { + "get": { + "tags": [ + "Media" + ], + "parameters": [ + { + "name": "mediaId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "canonicalUrl": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + }, + "width": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "height": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + }, + "category": { + "type": "string", + "enum": [ + "library", + "user_uploads" + ] + }, + "altText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "accessPolicy": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "deleting" + ] + }, + "usageCount": { + "type": "integer", + "minimum": 0 + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "canonicalUrl", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize", + "width", + "height", + "kind", + "category", + "altText", + "caption", + "accessPolicy", + "status", + "usageCount", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "Media" + ], + "parameters": [ + { + "name": "mediaId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "altText": { + "type": "string", + "maxLength": 1000 + }, + "caption": { + "type": "string", + "maxLength": 2000 + }, + "accessPolicy": { + "type": "string", + "enum": [ + "public", + "private" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "canonicalUrl": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "fileName": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "byteSize": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + }, + "width": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "height": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + }, + "category": { + "type": "string", + "enum": [ + "library", + "user_uploads" + ] + }, + "altText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "accessPolicy": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "deleting" + ] + }, + "usageCount": { + "type": "integer", + "minimum": 0 + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "canonicalUrl", + "thumbnailUrl", + "fileName", + "mimeType", + "byteSize", + "width", + "height", + "kind", + "category", + "altText", + "caption", + "accessPolicy", + "status", + "usageCount", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "Media" + ], + "parameters": [ + { + "name": "mediaId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "204", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/media/{mediaId}/references": { + "get": { + "tags": [ + "Media" + ], + "parameters": [ + { + "name": "mediaId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "school_branding", + "website_page", + "blog_artwork", + "product_artwork", + "product_content", + "lesson_media", + "lesson_content", + "downloadable_file", + "community_artwork", + "community_content", + "learner_avatar", + "certificate_template" + ] + }, + "resourceId": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "parentResourceId": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true + } + }, + "required": [ + "resourceType", + "resourceId" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "Media" + ], + "parameters": [ + { + "name": "mediaId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "references": { + "type": "array", + "items": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "school_branding", + "website_page", + "blog_artwork", + "product_artwork", + "product_content", + "lesson_media", + "lesson_content", + "downloadable_file", + "community_artwork", + "community_content", + "learner_avatar", + "certificate_template" + ] + }, + "resourceId": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "parentResourceId": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true + } + }, + "required": [ + "resourceType", + "resourceId" + ] + }, + "maxItems": 100 + } + }, + "required": [ + "references" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "school_branding", + "website_page", + "blog_artwork", + "product_artwork", + "product_content", + "lesson_media", + "lesson_content", + "downloadable_file", + "community_artwork", + "community_content", + "learner_avatar", + "certificate_template" + ] + }, + "resourceId": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "parentResourceId": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true + } + }, + "required": [ + "resourceType", + "resourceId" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/memberships": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "productId": { + "type": "string", + "minLength": 1 + }, + "email": { + "type": "string", + "format": "email" + }, + "name": { + "default": "Learner", + "type": "string", + "minLength": 1, + "maxLength": 200 + } + }, + "required": [ + "productId", + "email" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "entityType": { + "type": "string", + "enum": [ + "product", + "community" + ] + }, + "entityId": { + "type": "string" + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "comment", + "post", + "moderate" + ], + "nullable": true + }, + "subscriptionId": { + "type": "string", + "nullable": true + }, + "subscriptionMethod": { + "type": "string", + "nullable": true + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "isIncludedInPlan": { + "type": "boolean" + } + }, + "required": [ + "id", + "schoolId", + "entityType", + "entityId", + "paymentPlanId", + "status", + "role", + "subscriptionId", + "subscriptionMethod", + "joiningReason", + "rejectionReason", + "isIncludedInPlan" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/auth/sign-up": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "password": { + "type": "string", + "minLength": 8, + "maxLength": 200 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "identityLinkToken": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "schoolId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "email", + "password", + "name", + "schoolId" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "name": { + "type": "string" + }, + "avatarMediaId": { + "type": "string", + "nullable": true + }, + "image": { + "type": "string", + "format": "uri", + "nullable": true + }, + "bio": { + "type": "string" + }, + "emailUpdatesEnabled": { + "type": "boolean" + } + }, + "required": [ + "id", + "schoolId", + "email", + "name", + "avatarMediaId", + "image", + "bio", + "emailUpdatesEnabled" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/auth/sign-in": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "password": { + "type": "string", + "minLength": 8, + "maxLength": 200 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "identityLinkToken": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "schoolId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "email", + "password", + "schoolId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "name": { + "type": "string" + }, + "avatarMediaId": { + "type": "string", + "nullable": true + }, + "image": { + "type": "string", + "format": "uri", + "nullable": true + }, + "bio": { + "type": "string" + }, + "emailUpdatesEnabled": { + "type": "boolean" + } + }, + "required": [ + "id", + "schoolId", + "email", + "name", + "avatarMediaId", + "image", + "bio", + "emailUpdatesEnabled" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/auth/sign-out": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "204": { + "description": "204", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/me": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "name": { + "type": "string" + }, + "avatarMediaId": { + "type": "string", + "nullable": true + }, + "image": { + "type": "string", + "format": "uri", + "nullable": true + }, + "bio": { + "type": "string" + }, + "emailUpdatesEnabled": { + "type": "boolean" + } + }, + "required": [ + "id", + "schoolId", + "email", + "name", + "avatarMediaId", + "image", + "bio", + "emailUpdatesEnabled" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "avatarMediaId": { + "type": "string", + "nullable": true + }, + "image": { + "type": "string", + "format": "uri", + "nullable": true + }, + "bio": { + "type": "string", + "maxLength": 2000 + }, + "emailUpdatesEnabled": { + "type": "boolean" + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "name": { + "type": "string" + }, + "avatarMediaId": { + "type": "string", + "nullable": true + }, + "image": { + "type": "string", + "format": "uri", + "nullable": true + }, + "bio": { + "type": "string" + }, + "emailUpdatesEnabled": { + "type": "boolean" + } + }, + "required": [ + "id", + "schoolId", + "email", + "name", + "avatarMediaId", + "image", + "bio", + "emailUpdatesEnabled" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/memberships": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "productId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "productId" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "entityType": { + "type": "string", + "enum": [ + "product", + "community" + ] + }, + "entityId": { + "type": "string" + }, + "paymentPlanId": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "payment_failed", + "expired", + "pending", + "rejected", + "paused" + ] + }, + "role": { + "type": "string", + "enum": [ + "comment", + "post", + "moderate" + ], + "nullable": true + }, + "subscriptionId": { + "type": "string", + "nullable": true + }, + "subscriptionMethod": { + "type": "string", + "nullable": true + }, + "joiningReason": { + "type": "string" + }, + "rejectionReason": { + "type": "string", + "nullable": true + }, + "isIncludedInPlan": { + "type": "boolean" + } + }, + "required": [ + "id", + "schoolId", + "entityType", + "entityId", + "paymentPlanId", + "status", + "role", + "subscriptionId", + "subscriptionMethod", + "joiningReason", + "rejectionReason", + "isIncludedInPlan" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/products/{productId}/download": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string", + "minLength": 128, + "maxLength": 128 + }, + "expiresAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "token", + "expiresAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/checkout": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "minLength": 1 + }, + "returnUrl": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "planId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "planId": { + "type": "string" + }, + "provider": { + "type": "string", + "enum": [ + "free", + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "paid", + "failed", + "cancelled", + "refunded", + "disputed" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "checkoutUrl": { + "type": "string", + "nullable": true + }, + "checkoutData": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "publicKey": { + "type": "string" + }, + "orderId": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "customerEmail": { + "type": "string" + }, + "customerName": { + "type": "string" + } + }, + "required": [ + "provider" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "productId", + "planId", + "provider", + "status", + "currency", + "amountMinor", + "checkoutUrl", + "checkoutData", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "planId": { + "type": "string" + }, + "provider": { + "type": "string", + "enum": [ + "free", + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "paid", + "failed", + "cancelled", + "refunded", + "disputed" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "checkoutUrl": { + "type": "string", + "nullable": true + }, + "checkoutData": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "publicKey": { + "type": "string" + }, + "orderId": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "customerEmail": { + "type": "string" + }, + "customerName": { + "type": "string" + } + }, + "required": [ + "provider" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "productId", + "planId", + "provider", + "status", + "currency", + "amountMinor", + "checkoutUrl", + "checkoutData", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/checkout-sessions/{sessionId}/checkout": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "returnUrl": { + "type": "string", + "format": "uri" + }, + "joiningReason": { + "type": "string", + "maxLength": 2000 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "planId": { + "type": "string" + }, + "provider": { + "type": "string", + "enum": [ + "free", + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "paid", + "failed", + "cancelled", + "refunded", + "disputed" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "checkoutUrl": { + "type": "string", + "nullable": true + }, + "checkoutData": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "publicKey": { + "type": "string" + }, + "orderId": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "customerEmail": { + "type": "string" + }, + "customerName": { + "type": "string" + } + }, + "required": [ + "provider" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "productId", + "planId", + "provider", + "status", + "currency", + "amountMinor", + "checkoutUrl", + "checkoutData", + "createdAt", + "updatedAt" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "planId": { + "type": "string" + }, + "provider": { + "type": "string", + "enum": [ + "free", + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "paid", + "failed", + "cancelled", + "refunded", + "disputed" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "checkoutUrl": { + "type": "string", + "nullable": true + }, + "checkoutData": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "publicKey": { + "type": "string" + }, + "orderId": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "customerEmail": { + "type": "string" + }, + "customerName": { + "type": "string" + } + }, + "required": [ + "provider" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "communityId", + "planId", + "provider", + "status", + "currency", + "amountMinor", + "checkoutUrl", + "checkoutData", + "createdAt", + "updatedAt" + ] + } + ] + } + } + } + }, + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "planId": { + "type": "string" + }, + "provider": { + "type": "string", + "enum": [ + "free", + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "paid", + "failed", + "cancelled", + "refunded", + "disputed" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "checkoutUrl": { + "type": "string", + "nullable": true + }, + "checkoutData": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "publicKey": { + "type": "string" + }, + "orderId": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "customerEmail": { + "type": "string" + }, + "customerName": { + "type": "string" + } + }, + "required": [ + "provider" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "productId", + "planId", + "provider", + "status", + "currency", + "amountMinor", + "checkoutUrl", + "checkoutData", + "createdAt", + "updatedAt" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "communityId": { + "type": "string" + }, + "planId": { + "type": "string" + }, + "provider": { + "type": "string", + "enum": [ + "free", + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "paid", + "failed", + "cancelled", + "refunded", + "disputed" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "checkoutUrl": { + "type": "string", + "nullable": true + }, + "checkoutData": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "publicKey": { + "type": "string" + }, + "orderId": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "customerEmail": { + "type": "string" + }, + "customerName": { + "type": "string" + } + }, + "required": [ + "provider" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "communityId", + "planId", + "provider", + "status", + "currency", + "amountMinor", + "checkoutUrl", + "checkoutData", + "createdAt", + "updatedAt" + ] + } + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/checkouts/{checkoutId}": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "checkoutId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "planId": { + "type": "string" + }, + "provider": { + "type": "string", + "enum": [ + "free", + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "paid", + "failed", + "cancelled", + "refunded", + "disputed" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer", + "minimum": 0 + }, + "checkoutUrl": { + "type": "string", + "nullable": true + }, + "checkoutData": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ] + }, + "publicKey": { + "type": "string" + }, + "orderId": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "customerEmail": { + "type": "string" + }, + "customerName": { + "type": "string" + } + }, + "required": [ + "provider" + ], + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "productId", + "planId", + "provider", + "status", + "currency", + "amountMinor", + "checkoutUrl", + "checkoutData", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/lessons/{lessonId}/complete": { + "post": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "lessonId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "default": {}, + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "lessonId": { + "type": "string" + }, + "membershipId": { + "type": "string" + }, + "startedAt": { + "type": "string" + }, + "completedAt": { + "type": "string" + }, + "courseCompleted": { + "type": "boolean" + }, + "certificateId": { + "type": "string", + "nullable": true + } + }, + "required": [ + "lessonId", + "membershipId", + "startedAt", + "completedAt", + "courseCompleted", + "certificateId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/storefront/webhooks/stripe": { + "post": { + "tags": [ + "Storefront & Payments" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "received": { + "type": "boolean" + }, + "duplicate": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "processed", + "ignored" + ] + } + }, + "required": [ + "received", + "duplicate", + "status" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/storefront/webhooks/lemonsqueezy": { + "post": { + "tags": [ + "Storefront & Payments" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "received": { + "type": "boolean" + }, + "duplicate": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "processed", + "ignored" + ] + } + }, + "required": [ + "received", + "duplicate", + "status" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/storefront/webhooks/razorpay": { + "post": { + "tags": [ + "Storefront & Payments" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "received": { + "type": "boolean" + }, + "duplicate": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "processed", + "ignored" + ] + } + }, + "required": [ + "received", + "duplicate", + "status" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/progress": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [ + { + "name": "productId", + "in": "query", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "lessonId": { + "type": "string" + }, + "membershipId": { + "type": "string" + }, + "startedAt": { + "type": "string" + }, + "completedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "lessonId", + "membershipId", + "startedAt", + "completedAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/learner/certificates": { + "get": { + "tags": [ + "Learners" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "verificationId": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "learnerId": { + "type": "string" + }, + "learnerName": { + "type": "string" + }, + "productTitle": { + "type": "string" + }, + "issuedAt": { + "type": "string" + }, + "revokedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "verificationId", + "schoolId", + "productId", + "learnerId", + "learnerName", + "productTitle", + "issuedAt", + "revokedAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/certificates/{verificationId}": { + "get": { + "tags": [ + "Certificates" + ], + "parameters": [ + { + "name": "verificationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "verificationId": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "learnerId": { + "type": "string" + }, + "learnerName": { + "type": "string" + }, + "productTitle": { + "type": "string" + }, + "issuedAt": { + "type": "string" + }, + "revokedAt": { + "type": "string", + "nullable": true + }, + "title": { + "type": "string" + }, + "subtitle": { + "type": "string" + }, + "description": { + "type": "string" + }, + "signatureName": { + "type": "string" + }, + "signatureDesignation": { + "type": "string", + "nullable": true + }, + "signatureImageUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "logoUrl": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "required": [ + "id", + "verificationId", + "schoolId", + "productId", + "learnerId", + "learnerName", + "productTitle", + "issuedAt", + "revokedAt", + "title", + "subtitle", + "description", + "signatureName", + "signatureDesignation", + "signatureImageUrl", + "logoUrl" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/certificate-templates": { + "get": { + "tags": [ + "Certificates" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "template": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "template", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Certificates" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "template": { + "default": {}, + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "template": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "template", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/certificate-templates/{templateId}": { + "patch": { + "tags": [ + "Certificates" + ], + "parameters": [ + { + "name": "templateId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "template": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schoolId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "template": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "schoolId", + "name", + "template", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/billing/catalog": { + "get": { + "tags": [ + "Platform Billing" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "catalogRevision": { + "type": "integer", + "nullable": true + }, + "currency": { + "type": "string", + "nullable": true + }, + "checkoutAvailable": { + "type": "boolean" + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "catalogKey": { + "type": "string" + }, + "plan": { + "type": "string", + "enum": [ + "pro", + "business" + ] + }, + "interval": { + "type": "string", + "enum": [ + "month", + "year" + ] + }, + "currency": { + "type": "string" + }, + "amountMinor": { + "type": "integer" + }, + "trialDays": { + "type": "integer" + } + }, + "required": [ + "catalogKey", + "plan", + "interval", + "currency", + "amountMinor", + "trialDays" + ] + } + } + }, + "required": [ + "catalogRevision", + "currency", + "checkoutAvailable", + "offers" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/billing/entitlement": { + "get": { + "tags": [ + "Platform Billing" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schoolId": { + "type": "string" + }, + "activePaidPlan": { + "type": "string", + "nullable": true + }, + "entitled": { + "type": "boolean" + }, + "subscriptionStatus": { + "type": "string", + "nullable": true + } + }, + "required": [ + "schoolId", + "activePaidPlan", + "entitled", + "subscriptionStatus" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/schools": { + "get": { + "tags": [ + "School & Team" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "subdomain": { + "type": "string" + }, + "storefrontHost": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "read_only", + "maintenance", + "migrating", + "deleted" + ] + }, + "locale": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "selected": { + "type": "boolean" + }, + "website": { + "type": "object", + "properties": { + "logo": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + } + }, + "required": [ + "logo" + ], + "nullable": true + } + }, + "required": [ + "id", + "name", + "subdomain", + "storefrontHost", + "status", + "locale", + "currency" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "subdomain": { + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + }, + "locale": { + "default": "en", + "type": "string", + "minLength": 2, + "maxLength": 35 + }, + "currency": { + "default": "USD", + "type": "string", + "minLength": 3, + "maxLength": 3 + }, + "plan": { + "type": "string", + "enum": [ + "oss", + "pro", + "business" + ] + }, + "interval": { + "type": "string", + "enum": [ + "month", + "year" + ] + }, + "catalogRevision": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": 0 + } + }, + "required": [ + "name", + "subdomain" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "subdomain": { + "type": "string" + }, + "storefrontHost": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "read_only", + "maintenance", + "migrating", + "deleted" + ] + }, + "locale": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "selected": { + "type": "boolean" + }, + "website": { + "type": "object", + "properties": { + "logo": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + } + }, + "required": [ + "logo" + ], + "nullable": true + }, + "checkoutUrl": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "subdomain", + "storefrontHost", + "status", + "locale", + "currency" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/team": { + "get": { + "tags": [ + "School & Team" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "members": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "membershipId": { + "type": "string" + }, + "schoolAccountId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "image": { + "type": "string", + "nullable": true + }, + "isOwner": { + "type": "boolean" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "effectivePermissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "presetId": { + "type": "string", + "nullable": true + }, + "version": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "email", + "image", + "isOwner", + "permissions", + "createdAt" + ] + } + }, + "invitations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "invitationId": { + "type": "string" + }, + "email": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "expiresAt": { + "type": "string" + }, + "createdAt": { + "type": "string" + } + }, + "required": [ + "invitationId", + "email", + "permissions", + "expiresAt", + "createdAt" + ] + } + }, + "viewer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "membershipId": { + "type": "string" + }, + "schoolAccountId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "image": { + "type": "string", + "nullable": true + }, + "isOwner": { + "type": "boolean" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "effectivePermissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "presetId": { + "type": "string", + "nullable": true + }, + "version": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "email", + "image", + "isOwner", + "permissions", + "createdAt" + ] + } + }, + "required": [ + "members", + "invitations", + "viewer" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/team/members/{userId}": { + "delete": { + "tags": [ + "School & Team" + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "204": { + "description": "204", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "School & Team" + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "presetId": { + "type": "string", + "nullable": true + }, + "expectedVersion": { + "type": "integer" + } + }, + "required": [ + "permissions" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "membershipId": { + "type": "string" + }, + "schoolAccountId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "image": { + "type": "string", + "nullable": true + }, + "isOwner": { + "type": "boolean" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "effectivePermissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "presetId": { + "type": "string", + "nullable": true + }, + "version": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "email", + "image", + "isOwner", + "permissions", + "createdAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/team/leave": { + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "responses": { + "204": { + "description": "204", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/team/transfer-ownership": { + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "targetMemberId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "targetMemberId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "type": "boolean", + "enum": [ + true + ] + } + }, + "required": [ + "ok" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/team/invitations": { + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "permissions": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "presetId": { + "type": "string", + "nullable": true + } + }, + "required": [ + "email" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "type": "boolean", + "enum": [ + true + ] + }, + "id": { + "type": "string" + }, + "token": { + "type": "string" + } + }, + "required": [ + "ok", + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/team/invitations/{invitationId}/resend": { + "post": { + "tags": [ + "School & Team" + ], + "parameters": [ + { + "name": "invitationId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "type": "boolean", + "enum": [ + true + ] + }, + "invitationId": { + "type": "string" + } + }, + "required": [ + "ok", + "invitationId" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/team/invitations/{invitationId}": { + "delete": { + "tags": [ + "School & Team" + ], + "parameters": [ + { + "name": "invitationId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "204": { + "description": "204", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/payment-settings": { + "get": { + "tags": [ + "Storefront & Payments" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ], + "nullable": true + }, + "stripe": { + "type": "object", + "properties": { + "publishableKey": { + "type": "string" + }, + "secretConfigured": { + "type": "boolean" + }, + "webhookSecretConfigured": { + "type": "boolean" + } + }, + "required": [ + "publishableKey", + "secretConfigured", + "webhookSecretConfigured" + ] + }, + "razorpay": { + "type": "object", + "properties": { + "keyId": { + "type": "string" + }, + "secretConfigured": { + "type": "boolean" + }, + "webhookSecretConfigured": { + "type": "boolean" + } + }, + "required": [ + "keyId", + "secretConfigured", + "webhookSecretConfigured" + ] + }, + "lemonsqueezy": { + "type": "object", + "properties": { + "storeId": { + "type": "string" + }, + "oneTimeVariantId": { + "type": "string" + }, + "monthlyVariantId": { + "type": "string" + }, + "yearlyVariantId": { + "type": "string" + }, + "apiKeyConfigured": { + "type": "boolean" + }, + "webhookSecretConfigured": { + "type": "boolean" + } + }, + "required": [ + "storeId", + "oneTimeVariantId", + "monthlyVariantId", + "yearlyVariantId", + "apiKeyConfigured", + "webhookSecretConfigured" + ] + } + }, + "required": [ + "provider", + "stripe", + "razorpay", + "lemonsqueezy" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "Storefront & Payments" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ], + "nullable": true + }, + "stripe": { + "type": "object", + "properties": { + "publishableKey": { + "type": "string" + }, + "secretKey": { + "type": "string" + }, + "webhookSecret": { + "type": "string" + } + } + }, + "razorpay": { + "type": "object", + "properties": { + "keyId": { + "type": "string" + }, + "keySecret": { + "type": "string" + }, + "webhookSecret": { + "type": "string" + } + } + }, + "lemonsqueezy": { + "type": "object", + "properties": { + "apiKey": { + "type": "string" + }, + "storeId": { + "type": "string" + }, + "oneTimeVariantId": { + "type": "string" + }, + "monthlyVariantId": { + "type": "string" + }, + "yearlyVariantId": { + "type": "string" + }, + "webhookSecret": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "stripe", + "lemonsqueezy", + "razorpay" + ], + "nullable": true + }, + "stripe": { + "type": "object", + "properties": { + "publishableKey": { + "type": "string" + }, + "secretConfigured": { + "type": "boolean" + }, + "webhookSecretConfigured": { + "type": "boolean" + } + }, + "required": [ + "publishableKey", + "secretConfigured", + "webhookSecretConfigured" + ] + }, + "razorpay": { + "type": "object", + "properties": { + "keyId": { + "type": "string" + }, + "secretConfigured": { + "type": "boolean" + }, + "webhookSecretConfigured": { + "type": "boolean" + } + }, + "required": [ + "keyId", + "secretConfigured", + "webhookSecretConfigured" + ] + }, + "lemonsqueezy": { + "type": "object", + "properties": { + "storeId": { + "type": "string" + }, + "oneTimeVariantId": { + "type": "string" + }, + "monthlyVariantId": { + "type": "string" + }, + "yearlyVariantId": { + "type": "string" + }, + "apiKeyConfigured": { + "type": "boolean" + }, + "webhookSecretConfigured": { + "type": "boolean" + } + }, + "required": [ + "storeId", + "oneTimeVariantId", + "monthlyVariantId", + "yearlyVariantId", + "apiKeyConfigured", + "webhookSecretConfigured" + ] + } + }, + "required": [ + "provider", + "stripe", + "razorpay", + "lemonsqueezy" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/code-injection": { + "get": { + "tags": [ + "School Website" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "codeInjectionHead": { + "type": "string" + }, + "codeInjectionBody": { + "type": "string" + } + }, + "required": [ + "codeInjectionHead", + "codeInjectionBody" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "School Website" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "codeInjectionHead": { + "type": "string", + "maxLength": 100000 + }, + "codeInjectionBody": { + "type": "string", + "maxLength": 100000 + } + }, + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "codeInjectionHead": { + "type": "string" + }, + "codeInjectionBody": { + "type": "string" + } + }, + "required": [ + "codeInjectionHead", + "codeInjectionBody" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/website/pages": { + "get": { + "tags": [ + "School Website" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "School Website" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/website/pages/{pageId}": { + "get": { + "tags": [ + "School Website" + ], + "parameters": [ + { + "name": "pageId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + }, + "pageId": { + "type": "string" + }, + "deletable": { + "type": "boolean" + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "layout": { + "type": "array", + "items": { + "type": "object", + "properties": { + "widgetId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "deletable": { + "type": "boolean" + }, + "moveable": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "settings": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "required": [ + "widgetId", + "name", + "deletable", + "moveable", + "shared" + ] + } + }, + "title": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "socialImage": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "robotsAllowed": { + "type": "boolean", + "nullable": true + }, + "draftLayout": { + "type": "array", + "items": { + "type": "object", + "properties": { + "widgetId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "deletable": { + "type": "boolean" + }, + "moveable": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "settings": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "required": [ + "widgetId", + "name", + "deletable", + "moveable", + "shared" + ] + } + }, + "draftTitle": { + "type": "string", + "nullable": true + }, + "draftDescription": { + "type": "string", + "nullable": true + }, + "draftSocialImage": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "draftRobotsAllowed": { + "type": "boolean", + "nullable": true + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "salesResourceType": { + "type": "string", + "enum": [ + "product", + "community" + ] + }, + "salesResourceId": { + "type": "string" + }, + "salesResourceKind": { + "type": "string", + "enum": [ + "course", + "download" + ], + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status", + "pageId", + "deletable", + "layout", + "draftLayout" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "School Website" + ], + "parameters": [ + { + "name": "pageId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "slug": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "layout": { + "type": "array", + "items": { + "type": "object", + "properties": { + "widgetId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "deletable": { + "type": "boolean" + }, + "moveable": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "settings": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "required": [ + "widgetId", + "name", + "deletable", + "moveable", + "shared" + ] + } + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "socialImage": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "robotsAllowed": { + "type": "boolean" + } + }, + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + }, + "pageId": { + "type": "string" + }, + "deletable": { + "type": "boolean" + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "layout": { + "type": "array", + "items": { + "type": "object", + "properties": { + "widgetId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "deletable": { + "type": "boolean" + }, + "moveable": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "settings": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "required": [ + "widgetId", + "name", + "deletable", + "moveable", + "shared" + ] + } + }, + "title": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "socialImage": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "robotsAllowed": { + "type": "boolean", + "nullable": true + }, + "draftLayout": { + "type": "array", + "items": { + "type": "object", + "properties": { + "widgetId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "deletable": { + "type": "boolean" + }, + "moveable": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "settings": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "required": [ + "widgetId", + "name", + "deletable", + "moveable", + "shared" + ] + } + }, + "draftTitle": { + "type": "string", + "nullable": true + }, + "draftDescription": { + "type": "string", + "nullable": true + }, + "draftSocialImage": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "draftRobotsAllowed": { + "type": "boolean", + "nullable": true + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "salesResourceType": { + "type": "string", + "enum": [ + "product", + "community" + ] + }, + "salesResourceId": { + "type": "string" + }, + "salesResourceKind": { + "type": "string", + "enum": [ + "course", + "download" + ], + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status", + "pageId", + "deletable", + "layout", + "draftLayout" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/website/branding": { + "get": { + "tags": [ + "School Website" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "subtitle": { + "type": "string", + "nullable": true + }, + "logo": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "themeId": { + "type": "string", + "nullable": true + } + }, + "required": [ + "title", + "subtitle", + "logo", + "themeId" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "School Website" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "maxLength": 200, + "nullable": true + }, + "subtitle": { + "type": "string", + "maxLength": 500, + "nullable": true + }, + "logo": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "themeId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "subtitle": { + "type": "string", + "nullable": true + }, + "logo": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "themeId": { + "type": "string", + "nullable": true + } + }, + "required": [ + "title", + "subtitle", + "logo", + "themeId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/website/branding/themes": { + "get": { + "tags": [ + "School Website" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "themeId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "style": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "themeId", + "name", + "style", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "School Website" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "style": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "required": [ + "name", + "style" + ], + "additionalProperties": false + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "themeId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "style": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "themeId", + "name", + "style", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/website/branding/themes/{themeId}": { + "patch": { + "tags": [ + "School Website" + ], + "parameters": [ + { + "name": "themeId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "style": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "themeId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "style": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "themeId", + "name", + "style", + "createdAt", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/website/pages/{pageId}/publish": { + "post": { + "tags": [ + "School Website" + ], + "parameters": [ + { + "name": "pageId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/website/pages/{pageId}/discard-draft": { + "post": { + "tags": [ + "School Website" + ], + "parameters": [ + { + "name": "pageId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + }, + "pageId": { + "type": "string" + }, + "deletable": { + "type": "boolean" + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "layout": { + "type": "array", + "items": { + "type": "object", + "properties": { + "widgetId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "deletable": { + "type": "boolean" + }, + "moveable": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "settings": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "required": [ + "widgetId", + "name", + "deletable", + "moveable", + "shared" + ] + } + }, + "title": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "socialImage": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "robotsAllowed": { + "type": "boolean", + "nullable": true + }, + "draftLayout": { + "type": "array", + "items": { + "type": "object", + "properties": { + "widgetId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "deletable": { + "type": "boolean" + }, + "moveable": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "settings": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "required": [ + "widgetId", + "name", + "deletable", + "moveable", + "shared" + ] + } + }, + "draftTitle": { + "type": "string", + "nullable": true + }, + "draftDescription": { + "type": "string", + "nullable": true + }, + "draftSocialImage": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "draftRobotsAllowed": { + "type": "boolean", + "nullable": true + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "salesResourceType": { + "type": "string", + "enum": [ + "product", + "community" + ] + }, + "salesResourceId": { + "type": "string" + }, + "salesResourceKind": { + "type": "string", + "enum": [ + "course", + "download" + ], + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status", + "pageId", + "deletable", + "layout", + "draftLayout" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/website/blogs/{blogId}/publish": { + "post": { + "tags": [ + "School Website" + ], + "parameters": [ + { + "name": "blogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/website/blogs": { + "get": { + "tags": [ + "School Website" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "School Website" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + } + }, + "required": [ + "title" + ], + "additionalProperties": false + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/website/blogs/{blogId}": { + "get": { + "tags": [ + "School Website" + ], + "parameters": [ + { + "name": "blogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + }, + "blogId": { + "type": "string" + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "title": { + "type": "string", + "nullable": true + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "meta": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "draftTitle": { + "type": "string" + }, + "draftContent": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "draftExcerpt": { + "type": "string", + "nullable": true + }, + "draftFeaturedImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "draftMeta": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "createdAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status", + "blogId", + "meta", + "draftTitle", + "draftContent", + "draftMeta" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "patch": { + "tags": [ + "School Website" + ], + "parameters": [ + { + "name": "blogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "title": { + "type": "string" + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "excerpt": { + "type": "string", + "maxLength": 200 + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "meta": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + }, + "blogId": { + "type": "string" + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "title": { + "type": "string", + "nullable": true + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "meta": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "draftTitle": { + "type": "string" + }, + "draftContent": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "draftExcerpt": { + "type": "string", + "nullable": true + }, + "draftFeaturedImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "draftMeta": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "createdAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status", + "blogId", + "meta", + "draftTitle", + "draftContent", + "draftMeta" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/website/blogs/{blogId}/discard-draft": { + "post": { + "tags": [ + "School Website" + ], + "parameters": [ + { + "name": "blogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "page", + "blog" + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "published", + "published_with_changes" + ] + }, + "featuredImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "excerpt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + }, + "blogId": { + "type": "string" + }, + "publishedAt": { + "type": "string", + "nullable": true + }, + "title": { + "type": "string", + "nullable": true + }, + "content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "meta": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "draftTitle": { + "type": "string" + }, + "draftContent": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "draftExcerpt": { + "type": "string", + "nullable": true + }, + "draftFeaturedImage": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + }, + "draftMeta": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "createdAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "kind", + "slug", + "status", + "blogId", + "meta", + "draftTitle", + "draftContent", + "draftMeta" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/schools/{schoolId}": { + "patch": { + "tags": [ + "School & Team" + ], + "parameters": [ + { + "name": "schoolId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "currency": { + "type": "string", + "minLength": 3, + "maxLength": 3, + "pattern": "^[A-Za-z]{3}$" + } + }, + "required": [ + "currency" + ], + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "subdomain": { + "type": "string" + }, + "storefrontHost": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "active", + "read_only", + "maintenance", + "migrating", + "deleted" + ] + }, + "locale": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "selected": { + "type": "boolean" + }, + "website": { + "type": "object", + "properties": { + "logo": { + "type": "object", + "properties": { + "mediaId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "format": "uri" + }, + "thumbnailUrl": { + "type": "string", + "format": "uri", + "nullable": true + }, + "alt": { + "type": "string", + "maxLength": 1000 + }, + "fileName": { + "type": "string", + "maxLength": 255 + }, + "mimeType": { + "type": "string", + "maxLength": 200 + }, + "byteSize": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "document", + "other" + ] + } + }, + "required": [ + "url" + ], + "nullable": true + } + }, + "required": [ + "logo" + ], + "nullable": true + } + }, + "required": [ + "id", + "name", + "subdomain", + "storefrontHost", + "status", + "locale", + "currency" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/hosts": { + "get": { + "tags": [ + "School & Team" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hostname": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "subdomain", + "custom" + ] + }, + "verificationStatus": { + "type": "string", + "enum": [ + "verified", + "unverified" + ] + }, + "verifiedAt": { + "type": "string", + "nullable": true + }, + "isPrimary": { + "type": "boolean" + }, + "verificationRecords": { + "type": "object", + "properties": { + "cnameTarget": { + "type": "string" + }, + "txtName": { + "type": "string" + }, + "txtValue": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "cname", + "alias" + ] + }, + "txtSatisfied": { + "type": "boolean", + "nullable": true + }, + "routingSatisfied": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "cnameTarget", + "txtName", + "txtValue", + "kind", + "txtSatisfied", + "routingSatisfied" + ], + "nullable": true + } + }, + "required": [ + "hostname", + "kind", + "verificationStatus", + "verifiedAt", + "isPrimary" + ] + } + }, + "platformDomain": { + "type": "string" + } + }, + "required": [ + "items", + "platformDomain" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hostname": { + "type": "string", + "minLength": 3, + "maxLength": 253 + } + }, + "required": [ + "hostname" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "host": { + "type": "object", + "properties": { + "hostname": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "subdomain", + "custom" + ] + }, + "verificationStatus": { + "type": "string", + "enum": [ + "verified", + "unverified" + ] + }, + "verifiedAt": { + "type": "string", + "nullable": true + }, + "isPrimary": { + "type": "boolean" + }, + "verificationRecords": { + "type": "object", + "properties": { + "cnameTarget": { + "type": "string" + }, + "txtName": { + "type": "string" + }, + "txtValue": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "cname", + "alias" + ] + }, + "txtSatisfied": { + "type": "boolean", + "nullable": true + }, + "routingSatisfied": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "cnameTarget", + "txtName", + "txtValue", + "kind", + "txtSatisfied", + "routingSatisfied" + ], + "nullable": true + } + }, + "required": [ + "hostname", + "kind", + "verificationStatus", + "verifiedAt", + "isPrimary" + ] + }, + "verification": { + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "dns_txt" + ] + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "method", + "name", + "value" + ] + } + }, + "required": [ + "host", + "verification" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/hosts/{hostname}/verify": { + "post": { + "tags": [ + "School & Team" + ], + "parameters": [ + { + "name": "hostname", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hostname": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "subdomain", + "custom" + ] + }, + "verificationStatus": { + "type": "string", + "enum": [ + "verified", + "unverified" + ] + }, + "verifiedAt": { + "type": "string", + "nullable": true + }, + "isPrimary": { + "type": "boolean" + }, + "verificationRecords": { + "type": "object", + "properties": { + "cnameTarget": { + "type": "string" + }, + "txtName": { + "type": "string" + }, + "txtValue": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "cname", + "alias" + ] + }, + "txtSatisfied": { + "type": "boolean", + "nullable": true + }, + "routingSatisfied": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "cnameTarget", + "txtName", + "txtValue", + "kind", + "txtSatisfied", + "routingSatisfied" + ], + "nullable": true + } + }, + "required": [ + "hostname", + "kind", + "verificationStatus", + "verifiedAt", + "isPrimary" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/school/hosts/{hostname}": { + "delete": { + "tags": [ + "School & Team" + ], + "parameters": [ + { + "name": "hostname", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "204": { + "description": "204", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/api/school/select": { + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schoolId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "schoolId" + ] + } + } + } + }, + "responses": { + "204": { + "description": "204", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/api-keys": { + "get": { + "tags": [ + "School & Team" + ], + "parameters": [], + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "publicId": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "nullable": true + }, + "revokedAt": { + "type": "string", + "nullable": true + }, + "lastUsedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + } + }, + "required": [ + "id", + "publicId" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permissions": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "expiresAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "publicId": { + "type": "string" + }, + "raw": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "nullable": true + }, + "revokedAt": { + "type": "string", + "nullable": true + }, + "lastUsedAt": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string" + } + }, + "required": [ + "id", + "publicId", + "raw" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/api-keys/{publicId}": { + "delete": { + "tags": [ + "School & Team" + ], + "parameters": [ + { + "name": "publicId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "204", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/invitations": { + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "permissions": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "email" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "type": "boolean", + "enum": [ + true + ] + }, + "id": { + "type": "string" + }, + "token": { + "type": "string" + } + }, + "required": [ + "ok", + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/team-invitations/preview": { + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invitationId": { + "type": "string", + "minLength": 1 + }, + "token": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "invitationId", + "token" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invitationId": { + "type": "string" + }, + "schoolName": { + "type": "string" + }, + "inviterName": { + "type": "string", + "nullable": true + }, + "expiresAt": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "email": { + "type": "string" + } + }, + "required": [ + "invitationId", + "schoolName", + "inviterName", + "expiresAt", + "permissions", + "email" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/team-invitations/accept": { + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invitationId": { + "type": "string", + "minLength": 1 + }, + "token": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "invitationId", + "token" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "type": "boolean", + "enum": [ + true + ] + }, + "schoolId": { + "type": "string" + } + }, + "required": [ + "ok", + "schoolId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/team-invitations/reject": { + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invitationId": { + "type": "string", + "minLength": 1 + }, + "token": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "invitationId", + "token" + ] + } + } + } + }, + "responses": { + "204": { + "description": "204", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/invitations/accept": { + "post": { + "tags": [ + "School & Team" + ], + "parameters": [], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string", + "minLength": 1 + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": [ + "token", + "email" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "type": "boolean", + "enum": [ + true + ] + }, + "schoolId": { + "type": "string" + } + }, + "required": [ + "ok", + "schoolId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + }, + "/v1/invitations/{invitationId}": { + "delete": { + "tags": [ + "School & Team" + ], + "parameters": [ + { + "name": "invitationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "204", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unauthenticated", + "credential_ambiguous", + "tenant_required", + "tenant_forbidden", + "forbidden", + "not_found", + "conflict", + "validation_failed", + "rate_limited", + "internal_error" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "null", + "nullable": true + } + ], + "nullable": true + } + } + }, + "required": [ + "code", + "message" + ] + } + } + } + } + } + } + } + }, + "info": { + "title": "CourseLit API", + "version": "1.0.0" + }, + "servers": [ + { + "url": "{protocol}://{host}", + "description": "API Server", + "variables": { + "protocol": { + "default": "https", + "enum": [ + "https", + "http" + ] + }, + "host": { + "default": "api.courselit.app" + } + } + } + ], + "tags": [ + { + "name": "System", + "description": "API health and readiness checks." + }, + { + "name": "School & Team", + "description": "School selection, school settings, team membership, invitations, and API keys." + }, + { + "name": "School Website", + "description": "School website pages, blogs, branding, themes, and code injection." + }, + { + "name": "Products & Courses", + "description": "Product configuration, course content, plans, previews, and product analytics." + }, + { + "name": "Communities", + "description": "Community setup, spaces, membership, discussions, moderation, and plans." + }, + { + "name": "Learners", + "description": "Learner authentication, memberships, learning activity, community access, and checkout." + }, + { + "name": "Storefront & Payments", + "description": "Sales pages, storefront checkout, payment settings, and payment provider webhooks." + }, + { + "name": "Public Website", + "description": "School-scoped public routes (`/v1/public/{schoolId}/...`): site content, catalog, lead magnets, and newsletter subscription, plus website host resolution." + }, + { + "name": "Media", + "description": "School media uploads, library management, and media references." + }, + { + "name": "Contacts & Marketing", + "description": "School contacts, contact segments, and segment membership." + }, + { + "name": "Platform Billing", + "description": "CourseLit school subscription catalog and entitlement information." + }, + { + "name": "Certificates", + "description": "Certificate templates and public certificate verification." + }, + { + "name": "Notifications", + "description": "School administrator notification reads and status updates." + } + ] +} diff --git a/apps/api/package.json b/apps/api/package.json index d51334ec6..6854966d0 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -19,7 +19,9 @@ "generate:auth-schema": "bun scripts/generate-auth-schema.mjs", "check:billing-schema": "codelit-billing generate --check --config billing.config.ts", "check:auth-schema": "bun scripts/generate-auth-schema.mjs --check", - "check:drift": "bun run check:billing-schema && bun run check:auth-schema", + "generate:openapi": "bun scripts/generate-openapi.mjs", + "check:openapi": "bun scripts/generate-openapi.mjs --check", + "check:drift": "bun run check:billing-schema && bun run check:auth-schema && bun run check:openapi", "migrate": "bun scripts/migrate.mjs", "migrate:domains": "bun scripts/import-domains.mjs", "migrate:products": "bun scripts/import-products.mjs", diff --git a/apps/api/scripts/generate-openapi.mjs b/apps/api/scripts/generate-openapi.mjs new file mode 100644 index 000000000..05a426214 --- /dev/null +++ b/apps/api/scripts/generate-openapi.mjs @@ -0,0 +1,37 @@ +import { createHash } from "node:crypto"; +import { readFileSync, writeFileSync } from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import { createOpenApiDocument } from "../src/openapi.ts"; + +// The committed copy of the spec the API serves at /openapi.json, for tools +// that read the spec from the repository (the API reference in the docs). +const root = path.join(path.dirname(fileURLToPath(import.meta.url)), ".."); +const specPath = path.join(root, "openapi.json"); +const check = process.argv.includes("--check"); + +const publicApiUrl = "https://api.courselit.app"; +const source = `${JSON.stringify(createOpenApiDocument(publicApiUrl), null, 2)}\n`; + +let existing; +try { + existing = readFileSync(specPath, "utf8"); +} catch { + // A missing spec is reported as drift below. +} + +if (check) { + if (existing !== source) { + const fp = (value) => createHash("sha256").update(value).digest("hex"); + process.stderr.write( + `openapi drift: ${specPath}\ncommitted=${existing ? fp(existing) : "missing"} generated=${fp(source)}\nRun \`bun run generate:openapi\` in apps/api and commit the result.\n`, + ); + process.exit(1); + } + process.stdout.write(`ok ${specPath}\n`); +} else if (existing !== source) { + writeFileSync(specPath, source); + process.stdout.write(`wrote ${specPath}\n`); +} else { + process.stdout.write(`unchanged ${specPath}\n`); +} diff --git a/biome.json b/biome.json index 13b63a9f8..751d8104b 100644 --- a/biome.json +++ b/biome.json @@ -13,7 +13,8 @@ "!**/dist", "!**/migrations", "!**/node_modules", - "!**/*.generated.ts" + "!**/*.generated.ts", + "!apps/api/openapi.json" ] }, "css": { diff --git a/docs/platform-based-rewrite.md b/docs/platform-based-rewrite.md index c34cd3b0a..e4459fc38 100644 --- a/docs/platform-based-rewrite.md +++ b/docs/platform-based-rewrite.md @@ -185,7 +185,7 @@ flowchart LR - Bun and TypeScript runtime. - Express with `ts-rest` routes. - Zod request and response schemas from `@courselit/api-contract`. -- OpenAPI generated from the runtime contract and served at `/docs` with the raw document at `/openapi.json`. +- OpenAPI generated from the runtime contract and served at `/docs` with the raw document at `/openapi.json`. A copy is committed at `apps/api/openapi.json` (`bun run generate:openapi`); `check:drift` fails CI when it falls out of date. - Better Auth and `@codelitdev/oauth-server-kit` for the admin authorization server. - A distinct school-scoped learner auth configuration and persistence boundary. - `@codelitdev/mcp-server-kit` mounted at `/mcp` with OAuth discovery, CIMD, and DCR compatibility.