{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2019-09/schema","info":{"title":"AI Hero Agent and Content API","version":"1.2.0","description":"Start at /api. Scoped aih_pat_* tokens may use content:read plus the narrow write scopes content:write, content:publish, content:relations, media:upload, and shortlinks:manage. On scoped write operations, x-required-scopes lists every PAT scope that can gate the operation and x-scope-requirements states the exact required combination or payload condition. Role-derived device tokens use x-required-ability instead. Customer data, purchases, surveys, survey responses, support memory, and agent-token administration remain outside PAT write access."},"servers":[{"url":"https://www.aihero.dev"}],"tags":[{"name":"Agent tokens","description":"Admin-only mint, list, and revoke operations."},{"name":"Content API","description":"Public reads, PAT-backed reads and narrow writes, and role-derived device-token operations."},{"name":"Resource editor","description":"Resource-bound collaborator operations authorized by an active editor contribution and an active AI Hero DeviceAccessToken. Existing analytics-issued DeviceAccessToken values are valid while active."}],"paths":{"/api/{videoResourceId}":{"parameters":[{"name":"videoResourceId","in":"path","required":true,"description":"Video resource id.","schema":{"type":"string"}}],"options":{"tags":["Content API"],"operationId":"preflightVideoResource","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"getVideoResource","summary":"Get a raw video resource","description":"Returns media internals, including playable Mux identifiers and transcript data. This route is not available to scoped PATs.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"create Content","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use a role-derived device token with create Content.","responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoResourceResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/lessons/{lessonId}/solution":{"parameters":[{"name":"lessonId","in":"path","required":true,"description":"Parent lesson id or slug.","schema":{"type":"string"}}],"options":{"tags":["Content API"],"operationId":"preflightLessonSolution","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"getLessonSolution","summary":"Read a lesson solution","description":"content:read includes solutions for readable draft, private, unlisted, and published lessons.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:read"],"x-agent-token-policy":"A scoped aih_pat_* token with content:read is accepted.","responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Content API"],"operationId":"updateLessonSolution","summary":"Update a lesson solution","description":"Updates the existing solution attached to the lesson.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"manage the target lesson Content subject","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use a role-derived device token with manage the target lesson Content subject.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionUpdateRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"createLessonSolution","summary":"Create a lesson solution","description":"Creates one solution attached to the lesson.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"manage the target lesson Content subject","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use a role-derived device token with manage the target lesson Content subject.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionCreateRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Content API"],"operationId":"deleteLessonSolution","summary":"Delete a lesson solution","description":"Deletes the solution attached to the lesson.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"manage the target lesson Content subject","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use a role-derived device token with manage the target lesson Content subject.","responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMessageResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/lessons":{"options":{"tags":["Content API"],"operationId":"preflightLessons","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"getLessons","summary":"Read lessons","description":"Return one lesson with ?slugOrId= or all readable lessons when omitted.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:read"],"x-agent-token-policy":"A scoped aih_pat_* token with content:read is accepted.","parameters":[{"name":"slugOrId","in":"query","required":false,"description":"Optional lesson id or slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonReadResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Content API"],"operationId":"updateLesson","summary":"Update or publish a lesson","description":"Use ?id=<lesson-id>. For PATs, action=save requires content:write and only updates an existing draft; action=publish requires content:publish. Saving tags also requires content:relations. PATs cannot unpublish or archive lessons.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:write","content:publish","content:relations"],"x-scope-requirements":"PAT: content:write for action=save, content:publish for action=publish, and content:relations in addition to content:write when the save body contains tags.","x-required-ability":"update Content and manage the target lesson","x-agent-token-policy":"PAT: content:write for action=save, content:publish for action=publish, and content:relations in addition to content:write when the save body contains tags.","parameters":[{"name":"id","in":"query","required":true,"description":"Lesson id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonUpdateRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/posts":{"options":{"tags":["Content API"],"operationId":"preflightPosts","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"getPosts","summary":"Read posts","description":"Return one post with ?slugOrId= or all readable posts when omitted.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:read"],"x-agent-token-policy":"A scoped aih_pat_* token with content:read is accepted.","parameters":[{"name":"slugOrId","in":"query","required":false,"description":"Optional post id or slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostReadResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"createPost","summary":"Create a post","description":"Creates a draft post. The server supplies createdById. PATs also need content:relations when videoResourceId or parentLessonId is present.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:write","content:relations"],"x-scope-requirements":"PAT: content:write is required. content:relations is additionally required when videoResourceId or parentLessonId is present.","x-required-ability":"create Content","x-agent-token-policy":"PAT: content:write is required. content:relations is additionally required when videoResourceId or parentLessonId is present.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCreateRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Content API"],"operationId":"updatePost","summary":"Update or publish a post","description":"Use ?id=<post-id>&action=<publish|save>. For PATs, save requires content:write and only updates an existing draft; publish requires content:publish. Saving tags or videoResourceId also requires content:relations. PATs cannot unpublish, archive, or change fields.state.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:write","content:publish","content:relations"],"x-scope-requirements":"PAT: content:write for action=save or no action, content:publish for action=publish, and content:relations in addition when the body contains tags or videoResourceId.","x-required-ability":"update Content and manage the target post","x-agent-token-policy":"PAT: content:write for action=save or no action, content:publish for action=publish, and content:relations in addition when the body contains tags or videoResourceId.","parameters":[{"name":"id","in":"query","required":true,"description":"Post id.","schema":{"type":"string"}},{"name":"action","in":"query","required":false,"description":"State transition or save action.","schema":{"type":"string","enum":["publish","unpublish","archive","save"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostUpdateRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Content API"],"operationId":"deletePost","summary":"Delete a post","description":"Use ?id=<post-id>.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"delete the target Content subject","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use a role-derived device token with delete the target Content subject.","parameters":[{"name":"id","in":"query","required":true,"description":"Post id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMessageResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/products/{productId}/availability":{"parameters":[{"name":"productId","in":"path","required":true,"description":"Product id.","schema":{"type":"string"}}],"options":{"tags":["Content API"],"operationId":"preflightProductAvailability","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"getProductAvailability","summary":"Read public product availability","description":"Returns remaining quantity and whether capacity is unlimited.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public. A bearer token grants no extra privilege.","responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductAvailabilityResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/products":{"options":{"tags":["Content API"],"operationId":"preflightProducts","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"getProducts","summary":"Read product structure","description":"Return one product with ?slugOrId= or all products. Nested course structure is included; purchases and customers are not.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:read"],"x-agent-token-policy":"A scoped aih_pat_* token with content:read is accepted.","parameters":[{"name":"slugOrId","in":"query","required":false,"description":"Optional product id or slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReadResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"createProduct","summary":"Create a product","description":"Creates the product and optional explicit slug.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"create Content","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use a role-derived device token with create Content.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreateRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Content API"],"operationId":"updateProduct","summary":"Update a product","description":"Updates one or more product fields.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"update Content","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use a role-derived device token with update Content.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdateRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/resources":{"options":{"tags":["Content API"],"operationId":"preflightResources","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"getResources","summary":"Read sanitized content resources","description":"Return one resource by ?slugOrId= and optional ?type=. Carries two levels of children in position order, so a sectioned list shows what each section holds. List-all is allowed only for ?type=list. Mux capability fields are removed recursively.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:read"],"x-agent-token-policy":"A scoped aih_pat_* token with content:read is accepted.","parameters":[{"name":"slugOrId","in":"query","required":false,"description":"Resource id or slug.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Optional resource type filter.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceReadResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Content API"],"operationId":"updateResource","summary":"Merge resource fields","description":"Use ?id=<resource-id>. fields are merged, not replaced. Video chapters use the real chapter validator, are sorted by start time, and must fit the video duration.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"update Content","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use a role-derived device token with update Content.","parameters":[{"name":"id","in":"query","required":true,"description":"Resource id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceUpdateRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"createResource","summary":"Create a generic resource","description":"Creates a draft, unlisted resource. The server generates id and slug unless fields.slug is supplied.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"create Content","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use a role-derived device token with create Content.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceCreateRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/lists/{listId}/resources":{"parameters":[{"name":"listId","in":"path","required":true,"description":"The list's id or its slug.","schema":{"type":"string"}}],"options":{"tags":["Content API"],"operationId":"preflightListResources","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"addResourceToList","summary":"Add a resource to a list or one of its sections","description":"Omit parentId to add at the top level; pass a SECTION id to nest under it (only sections parent, and never each other). Appends after the last sibling. 409 when the parent already holds the resource.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:relations"],"x-scope-requirements":"PAT: content:relations is required.","x-required-ability":"update Content","x-agent-token-policy":"PAT: content:relations is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddListItemRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListItemRow"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The parent already holds this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Content API"],"operationId":"moveListResources","summary":"Reorder list items or move them between sections","description":"Applies the whole batch in one transaction, then renumbers every touched parent densely — positions stay unique and gap free regardless of the positions sent, and the response lists every applied write, sibling renumbering included. Each resourceId may appear once. Omit parentId to reorder an item in place; pass the list id to pull it out of a section. Any invalid item fails the batch before anything is written.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:relations"],"x-scope-requirements":"PAT: content:relations is required.","x-required-ability":"update Content","x-agent-token-policy":"PAT: content:relations is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveListItemsRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveListItemsResult"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Content API"],"operationId":"removeResourceFromList","summary":"Remove a resource from a list","description":"Removes one placement and answers with where it sat. When the resource sits in more than one place, parentId selects the placement; omitted, the top-level placement wins. 404 when the list does not hold it.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:relations"],"x-scope-requirements":"PAT: content:relations is required.","x-required-ability":"update Content","x-agent-token-policy":"PAT: content:relations is required.","parameters":[{"name":"resourceId","in":"query","required":true,"description":"The resource to remove.","schema":{"type":"string"}},{"name":"parentId","in":"query","required":false,"description":"Placement selector: the section id (or the list id) to remove from.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListItemLocation"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/search":{"options":{"tags":["Content API"],"operationId":"preflightSearch","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"searchContent","summary":"Search content","description":"Anonymous callers see public published hits. content:read also sees privileged hits through the safe field allowlist.","security":[{},{"bearerAuth":[]}],"x-required-scopes":["content:read"],"x-agent-token-policy":"Anonymous callers receive public results. content:read also permits privileged content.","parameters":[{"name":"q","in":"query","required":true,"description":"Search query.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Optional content type filter.","schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"description":"Result count, capped at 20.","schema":{"type":"integer","minimum":1,"maximum":20,"default":5}},{"name":"semantic","in":"query","required":false,"description":"Enable hybrid semantic search.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchSuccessResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Search is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/skills/changelog":{"options":{"tags":["Content API"],"operationId":"preflightSkillsChangelog","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandPreflightSuccessResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"createSkillsChangelog","summary":"Create a Skills Changelog entry","description":"Creates a draft or published Skills Changelog resource and optionally attaches a video. The canonical success shape is {ok, command, result, next_actions}; deprecated top-level id and slug mirror the nested result for compatibility.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:write","content:publish","content:relations"],"x-scope-requirements":"PAT: content:write is required. content:publish is additionally required when state=published. content:relations is additionally required when videoResourceId is present.","x-required-ability":"create Content","x-agent-token-policy":"PAT: content:write is required. content:publish is additionally required when state=published. content:relations is additionally required when videoResourceId is present.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillChangelogRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillChangelogSuccessResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The slug already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/uploads/multipart/create":{"options":{"tags":["Content API"],"operationId":"preflightCreateMultipartUpload","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"createMultipartUpload","summary":"Create a multipart upload","description":"Starts an S3 multipart upload and returns its id, key, and public URL.","security":[{"bearerAuth":[]}],"x-required-scopes":["media:upload"],"x-scope-requirements":"PAT: media:upload is required.","x-required-ability":"create Content","x-agent-token-policy":"PAT: media:upload is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMultipartUploadRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMultipartUploadResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/uploads/multipart/part-url":{"options":{"tags":["Content API"],"operationId":"preflightMultipartPartUrl","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"getMultipartPartUrl","summary":"Get a multipart upload part URL","description":"Returns a one-hour signed URL that grants direct storage write access.","security":[{"bearerAuth":[]}],"x-required-scopes":["media:upload"],"x-scope-requirements":"PAT: media:upload is required.","x-required-ability":"create Content","x-agent-token-policy":"PAT: media:upload is required.","parameters":[{"name":"key","in":"query","required":true,"description":"Multipart object key.","schema":{"type":"string"}},{"name":"uploadId","in":"query","required":true,"description":"Multipart upload id.","schema":{"type":"string"}},{"name":"partNumber","in":"query","required":true,"description":"Positive part number.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipartPartUrlResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/uploads/multipart/complete":{"options":{"tags":["Content API"],"operationId":"preflightCompleteMultipartUpload","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"completeMultipartUpload","summary":"Complete a multipart upload","description":"Completes an S3 multipart upload from uploaded part numbers and ETags.","security":[{"bearerAuth":[]}],"x-required-scopes":["media:upload"],"x-scope-requirements":"PAT: media:upload is required.","x-required-ability":"create Content","x-agent-token-policy":"PAT: media:upload is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteMultipartUploadRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteMultipartUploadResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/uploads/new":{"options":{"tags":["Content API"],"operationId":"preflightNewUpload","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"createUpload","summary":"Start video processing","description":"Queues video processing for an uploaded file and parent content resource. PATs may target only post, lesson, or skill-changelog parents. The route currently returns no job id.","security":[{"bearerAuth":[]}],"x-required-scopes":["media:upload","content:relations"],"x-scope-requirements":"PAT: media:upload and content:relations are both required.","x-required-ability":"create Content","x-agent-token-policy":"PAT: media:upload and content:relations are both required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadStartedResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/uploads/signed-url":{"get":{"tags":["Content API"],"operationId":"getUploadSignedUrl","summary":"Get a signed storage URL","description":"Returns a one-hour signed PUT URL and its resulting public URL.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"create Content","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use a role-derived device token with create Content.","parameters":[{"name":"objectName","in":"query","required":true,"description":"Original file name.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedUploadUrlResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/shortlinks":{"options":{"tags":["Content API"],"operationId":"preflightShortlinks","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"getShortlinks","summary":"List, search, or read short links","description":"Use ?id= for one link or ?search= to filter. shortlinks:manage PAT responses omit click counts and cannot use analytics modes; role-derived admin device tokens retain analytics access.","security":[{"bearerAuth":[]}],"x-required-scopes":["shortlinks:manage"],"x-scope-requirements":"PAT: shortlinks:manage is required.","x-required-ability":"manage all","x-agent-token-policy":"PAT: shortlinks:manage is required.","parameters":[{"name":"id","in":"query","required":false,"description":"Optional short-link id.","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"Optional slug, URL, or description search.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortlinkReadResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"createShortlink","summary":"Create a short link","description":"Creates a short link. The server generates a slug when omitted. PAT responses omit click counts.","security":[{"bearerAuth":[]}],"x-required-scopes":["shortlinks:manage"],"x-scope-requirements":"PAT: shortlinks:manage is required.","x-required-ability":"create Content","x-agent-token-policy":"PAT: shortlinks:manage is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShortlinkRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortlinkResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The slug already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Content API"],"operationId":"updateShortlink","summary":"Update a short link","description":"Updates the selected short-link fields. PAT responses omit click counts.","security":[{"bearerAuth":[]}],"x-required-scopes":["shortlinks:manage"],"x-scope-requirements":"PAT: shortlinks:manage is required.","x-required-ability":"update Content","x-agent-token-policy":"PAT: shortlinks:manage is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateShortlinkRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortlinkResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The slug already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Content API"],"operationId":"deleteShortlink","summary":"Delete a short link","description":"Use ?id=<short-link-id>.","security":[{"bearerAuth":[]}],"x-required-scopes":["shortlinks:manage"],"x-scope-requirements":"PAT: shortlinks:manage is required.","x-required-ability":"delete Content","x-agent-token-policy":"PAT: shortlinks:manage is required.","parameters":[{"name":"id","in":"query","required":true,"description":"Short-link id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMessageResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/tags":{"options":{"tags":["Content API"],"operationId":"preflightTags","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"getTags","summary":"List tags","description":"Public tag definition list. No customer or response data is returned.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public. A bearer token grants no extra privilege.","responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagListResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"createTag","summary":"Create a tag","description":"Creates a topic tag. id and timestamps are generated when omitted. Duplicate ids, names, or slugs return 409.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:relations"],"x-scope-requirements":"PAT: content:relations is required.","x-required-ability":"create Content","x-agent-token-policy":"PAT: content:relations is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTagRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The tag already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/tags/attach":{"options":{"tags":["Content API"],"operationId":"preflightTagAttachment","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"post":{"tags":["Content API"],"operationId":"attachTag","summary":"Attach a tag to a post","description":"Both the post and tag must already exist. PATs cannot attach tags to another resource type.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:relations"],"x-scope-requirements":"PAT: content:relations is required.","x-required-ability":"update Content","x-agent-token-policy":"PAT: content:relations is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTagInput"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTagMutationResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Content API"],"operationId":"detachTag","summary":"Detach a tag from a post","description":"Both the post and tag must already exist. PATs cannot detach tags from another resource type.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:relations"],"x-scope-requirements":"PAT: content:relations is required.","x-required-ability":"update Content","x-agent-token-policy":"PAT: content:relations is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTagInput"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTagMutationResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/pages":{"options":{"tags":["Content API"],"operationId":"preflightPages","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Content API"],"operationId":"getPages","summary":"List or read pages","description":"Admin-only. Use ?slugOrId= for one page or omit it for all pages.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"manage all","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use a role-derived device token with manage all.","parameters":[{"name":"slugOrId","in":"query","required":false,"description":"Optional page id or slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageReadResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Content API"],"operationId":"updatePage","summary":"Update or publish a page","description":"Use ?id=<page-id>. Fields are merged. For PATs, content:write only updates an existing draft; publishing requires content:publish. Updating fields and publishing in one request requires both scopes. PATs cannot unpublish, archive, or delete pages. A title change does not regenerate the slug.","security":[{"bearerAuth":[]}],"x-required-scopes":["content:write","content:publish"],"x-scope-requirements":"PAT: content:write for draft field changes, content:publish when fields.state=published, and both when publishing together with other field changes.","x-required-ability":"update Content","x-agent-token-policy":"PAT: content:write for draft field changes, content:publish when fields.state=published, and both when publishing together with other field changes.","parameters":[{"name":"id","in":"query","required":true,"description":"Page id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/editor/resources":{"options":{"tags":["Content API"],"operationId":"preflightEditorResources","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Resource editor"],"operationId":"listEditorResources","summary":"List assigned editor resources","description":"Lists supported page and workshop resources available to the active AI Hero DeviceAccessToken user. An active editor contribution grants exact-resource access. Admin access remains separate. Creator access also requires concrete manage Content ability; createdById alone is insufficient.","security":[{"bearerAuth":[]}],"x-read-only":true,"x-destructive":false,"x-required-scopes":[],"x-required-ability":"manage all, concrete manage Content ability for a resource created by the caller, or active editor contribution on the concrete resource","x-resource-authorization":"An active ContentContribution whose active contribution type slug is editor grants the authenticated user this operation on that exact resource. createdById alone grants nothing; creator compatibility also requires concrete manage Content ability.","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use Authorization: Bearer with an active AI Hero DeviceAccessToken. Existing analytics-issued DeviceAccessToken values are valid while active. No workspace-wide PAT write scope is required or accepted.","responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorResourceListResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/editor/resources/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Assigned resource id.","schema":{"type":"string"}}],"options":{"tags":["Content API"],"operationId":"preflightEditorResource","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Resource editor"],"operationId":"getEditorResource","summary":"Read an assigned editor resource","description":"Returns the assigned page or workshop, including revision in JSON and X-AIH-Resource-Revision for optimistic concurrency.","security":[{"bearerAuth":[]}],"x-read-only":true,"x-destructive":false,"x-required-scopes":[],"x-required-ability":"manage all, concrete manage Content ability for a resource created by the caller, or active editor contribution on the concrete resource","x-resource-authorization":"An active ContentContribution whose active contribution type slug is editor grants the authenticated user this operation on that exact resource. createdById alone grants nothing; creator compatibility also requires concrete manage Content ability.","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use Authorization: Bearer with an active AI Hero DeviceAccessToken. Existing analytics-issued DeviceAccessToken values are valid while active. No workspace-wide PAT write scope is required or accepted.","responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorResourceResponse"}}},"headers":{"X-AIH-Resource-Revision":{"description":"Resource revision to send as X-AIH-Expected-Revision on the next mutation.","schema":{"type":"string"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Resource editor"],"operationId":"updateEditorResource","summary":"Save or publish an assigned resource","description":"Merges allowed fields into an assigned page or workshop. The slug is immutable in v1. action=publish is the only accepted state transition. Every write appends immutable version history. Workshop search indexing is queued durably after commit; the response reports queued or degraded effect state and warnings. Page caches are invalidated synchronously. A stale X-AIH-Expected-Revision returns 409. This operation is not idempotent; after a timeout, GET and reconcile before retrying.","security":[{"bearerAuth":[]}],"x-read-only":false,"x-destructive":true,"x-required-scopes":[],"x-required-ability":"manage all, concrete manage Content ability for a resource created by the caller, or active editor contribution on the concrete resource","x-resource-authorization":"An active ContentContribution whose active contribution type slug is editor grants the authenticated user this operation on that exact resource. createdById alone grants nothing; creator compatibility also requires concrete manage Content ability.","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use Authorization: Bearer with an active AI Hero DeviceAccessToken. Existing analytics-issued DeviceAccessToken values are valid while active. No workspace-wide PAT write scope is required or accepted.","x-idempotency":"This operation is not idempotent and does not accept Idempotency-Key. Every accepted mutation appends a version. After a timeout, GET the resource and compare its representation and revision before retrying with the current X-AIH-Expected-Revision value.","parameters":[{"name":"X-AIH-Expected-Revision","in":"header","required":true,"description":"Revision from the last response body or X-AIH-Resource-Revision header.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorResourceMutationRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorResourceMutationResponse"}}},"headers":{"X-AIH-Resource-Revision":{"description":"Resource revision to send as X-AIH-Expected-Revision on the next mutation.","schema":{"type":"string"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The X-AIH-Expected-Revision value is stale.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The resource or state is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"428":{"description":"X-AIH-Expected-Revision is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/editor/resources/{id}/versions":{"parameters":[{"name":"id","in":"path","required":true,"description":"Assigned resource id.","schema":{"type":"string"}}],"options":{"tags":["Content API"],"operationId":"preflightEditorResourceVersions","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Resource editor"],"operationId":"listEditorResourceVersions","summary":"List immutable resource versions","description":"Lists immutable versions newest first for an assigned page or workshop.","security":[{"bearerAuth":[]}],"x-read-only":true,"x-destructive":false,"x-required-scopes":[],"x-required-ability":"manage all, concrete manage Content ability for a resource created by the caller, or active editor contribution on the concrete resource","x-resource-authorization":"An active ContentContribution whose active contribution type slug is editor grants the authenticated user this operation on that exact resource. createdById alone grants nothing; creator compatibility also requires concrete manage Content ability.","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use Authorization: Bearer with an active AI Hero DeviceAccessToken. Existing analytics-issued DeviceAccessToken values are valid while active. No workspace-wide PAT write scope is required or accepted.","responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorResourceVersionListResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/editor/resources/{id}/rollback":{"parameters":[{"name":"id","in":"path","required":true,"description":"Assigned resource id.","schema":{"type":"string"}}],"options":{"tags":["Content API"],"operationId":"preflightEditorResourceRollback","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"post":{"tags":["Resource editor"],"operationId":"rollbackEditorResource","summary":"Restore a prior resource version","description":"Copies a selected prior snapshot into a new immutable child version while preserving the current slug and lifecycle state. History is never rewritten. Workshop search indexing is queued durably after commit; the response reports queued or degraded effect state and warnings. Page caches are invalidated synchronously. A stale X-AIH-Expected-Revision returns 409. This operation is not idempotent; after a timeout, GET and reconcile before retrying.","security":[{"bearerAuth":[]}],"x-read-only":false,"x-destructive":true,"x-required-scopes":[],"x-required-ability":"manage all, concrete manage Content ability for a resource created by the caller, or active editor contribution on the concrete resource","x-resource-authorization":"An active ContentContribution whose active contribution type slug is editor grants the authenticated user this operation on that exact resource. createdById alone grants nothing; creator compatibility also requires concrete manage Content ability.","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use Authorization: Bearer with an active AI Hero DeviceAccessToken. Existing analytics-issued DeviceAccessToken values are valid while active. No workspace-wide PAT write scope is required or accepted.","x-idempotency":"This operation is not idempotent and does not accept Idempotency-Key. Every accepted mutation appends a version. After a timeout, GET the resource and compare its representation and revision before retrying with the current X-AIH-Expected-Revision value.","parameters":[{"name":"X-AIH-Expected-Revision","in":"header","required":true,"description":"Revision from the last response body or X-AIH-Resource-Revision header.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorResourceRollbackRequest"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorResourceMutationResponse"}}},"headers":{"X-AIH-Resource-Revision":{"description":"Resource revision to send as X-AIH-Expected-Revision on the next mutation.","schema":{"type":"string"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The X-AIH-Expected-Revision value is stale.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The selected version cannot be restored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"428":{"description":"X-AIH-Expected-Revision is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/personal-access-tokens":{"options":{"tags":["Content API"],"operationId":"preflightPersonalAccessTokens","summary":"CORS preflight","description":"Public preflight. Bearer credentials are ignored.","security":[],"x-required-scopes":[],"x-agent-token-policy":"Public preflight only.","responses":{"200":{"description":"Preflight response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyObjectResponse"}}}}}},"get":{"tags":["Agent tokens"],"operationId":"listPersonalAccessTokens","summary":"List the caller’s agent tokens","description":"Admin-only. Returns safe metadata for tokens owned by the caller and never returns raw tokens or token hashes.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"manage all","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use an admin role-derived device token.","responses":{"200":{"description":"Owned agent-token metadata.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PersonalAccessToken"}}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Agent tokens"],"operationId":"mintPersonalAccessToken","summary":"Mint a scoped agent token","description":"Admin-only and mint-for-self. The complete aih_pat_* token is returned exactly once.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"manage all","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use an admin role-derived device token.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintPersonalAccessTokenRequest"}}}},"responses":{"201":{"description":"Created. The token field is returned once and cannot be recovered later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintPersonalAccessTokenResponse"}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Personal access token hashing is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/personal-access-tokens/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Owned token id from the list operation.","schema":{"type":"string"}}],"delete":{"tags":["Agent tokens"],"operationId":"revokePersonalAccessToken","summary":"Revoke an owned agent token","description":"Admin-only, owned-token-only, and idempotent. Revocation is the immediate kill switch.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"x-required-ability":"manage all","x-agent-token-policy":"Scoped aih_pat_* tokens are excluded. Use an admin role-derived device token.","responses":{"200":{"description":"Current token metadata with revokedAt set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalAccessToken"}}}},"401":{"description":"Missing, malformed, expired, or revoked bearer credential. Use /api to discover the accepted bearer formats before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The bearer credential is valid, but the PAT lacks a required write scope, the requested mutation exceeds that scope (for example, content:write against published content), or the role-derived device token lacks the named ability. content:read never authorizes writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Send Authorization: Bearer <token>. Scoped aih_pat_* tokens receive only scope-derived abilities; role-derived device tokens receive the current abilities of their user. Never put either token in a query string."}},"schemas":{"EmptyObjectResponse":{"type":"object","properties":{},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message","code"],"additionalProperties":false},{"type":"array","items":{}}]},"details":{},"issues":{"type":"array","items":{}},"fix":{"type":"string"},"docs":{"type":"string"},"next_actions":{"type":"array","items":{}}},"required":["error"],"additionalProperties":true},"NextAction":{"type":"object","properties":{"command":{"type":"string"},"description":{"type":"string"},"params":{"type":"object","additionalProperties":{"type":"object","properties":{"description":{"type":"string"},"value":{"type":["string","number"]},"default":{"type":["string","number"]},"enum":{"type":"array","items":{"type":"string"}},"required":{"type":"boolean"}},"additionalProperties":false}}},"required":["command","description"],"additionalProperties":false},"CommandPreflightResult":{"type":"object","properties":{"methods":{"type":"array","items":{"type":"string"}}},"required":["methods"],"additionalProperties":false},"VideoResourceResponse":{"type":"object","properties":{"id":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"title":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"duration":{"anyOf":[{"anyOf":[{"not":{}},{"type":"number"}]},{"type":"null"}]},"resolution":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"muxPlaybackId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"muxAssetId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"transcript":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"transcriptWithScreenshots":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"srt":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"wordLevelSrt":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"chapters":{"anyOf":[{"anyOf":[{"not":{}},{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","minimum":0},"title":{"type":"string","minLength":1,"maxLength":120}},"required":["startTime","title"],"additionalProperties":false}}]},{"type":"null"}]},"state":{"type":"string","enum":["new","processing","preparing","ready","errored","deleted"]}},"required":["id","state"],"additionalProperties":false},"SolutionCreateRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1},"videoResourceId":{"type":"string"},"body":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"unlisted"},"github":{"type":["string","null"]},"thumbnailTime":{"type":["number","null"]},"optional":{"type":["boolean","null"],"default":false}},"required":["title","slug"],"additionalProperties":false},"SolutionUpdateRequest":{"type":"object","properties":{"fields":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":90},"body":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"slug":{"type":"string"},"description":{"type":["string","null"]},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"unlisted"},"github":{"type":["string","null"]},"thumbnailTime":{"type":["number","null"]},"optional":{"type":["boolean","null"],"default":false}},"required":["title","slug"],"additionalProperties":false},"tags":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"contentResourceId":{"type":"string"},"organizationId":{"type":["string","null"]},"tagId":{"type":"string"},"position":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deletedAt":{},"tag":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic","default":"topic"},"organizationId":{"type":["string","null"]},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deleteAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]}},"required":["id","fields","createdAt","updatedAt"],"additionalProperties":false}},"required":["contentResourceId","tagId","position","createdAt","updatedAt","tag"],"additionalProperties":false}},{"type":"null"}]}},"required":["fields"],"additionalProperties":false},"SolutionResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"solution"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"type":"object","properties":{"title":{"type":"string","minLength":0,"maxLength":90},"body":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"unlisted"},"videoResourceId":{"type":["string","null"]},"thumbnailTime":{"type":["number","null"]},"optional":{"type":["boolean","null"],"default":false}},"required":["title","slug"],"additionalProperties":false},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","fields","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false},"LessonUpdateRequest":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"fields":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":90},"body":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"slug":{"type":"string"},"description":{"type":["string","null"]},"state":{"type":"string","enum":["draft","published","archived","deleted"]},"visibility":{"type":"string","enum":["public","private","unlisted"]},"github":{"type":["string","null"]},"thumbnailTime":{"type":["number","null"]},"optional":{"type":["boolean","null"],"default":false},"prompt":{"type":["string","null"]}},"required":["title","slug"],"additionalProperties":false},"tags":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"contentResourceId":{"type":"string"},"organizationId":{"type":["string","null"]},"tagId":{"type":"string"},"position":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deletedAt":{},"tag":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic","default":"topic"},"organizationId":{"type":["string","null"]},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deleteAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]}},"required":["id","fields","createdAt","updatedAt"],"additionalProperties":false}},"required":["contentResourceId","tagId","position","createdAt","updatedAt","tag"],"additionalProperties":false}},{"type":"null"}]},"action":{"type":"string","enum":["publish","unpublish","archive","save"]}},"required":["id","fields"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["publish","unpublish","archive","save"]}},"required":["action"],"additionalProperties":false}]},"LessonReadResponse":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"type":"object","properties":{"title":{"type":"string","minLength":2},"body":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"unlisted"},"github":{"type":["string","null"]},"gitpod":{"type":["string","null"]},"thumbnailTime":{"type":["number","null"]},"optional":{"type":["boolean","null"],"default":false},"prompt":{"type":["string","null"]}},"required":["title","slug"],"additionalProperties":false},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]},"tags":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"contentResourceId":{"type":"string"},"organizationId":{"type":["string","null"]},"tagId":{"type":"string"},"position":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deletedAt":{},"tag":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic","default":"topic"},"organizationId":{"type":["string","null"]},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deleteAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]}},"required":["id","fields","createdAt","updatedAt"],"additionalProperties":false}},"required":["contentResourceId","tagId","position","createdAt","updatedAt","tag"],"additionalProperties":false}},{"type":"null"}]},"parentResources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false}}},"required":["id","type","createdById","fields","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"type":"object","properties":{"title":{"type":"string","minLength":2},"body":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"unlisted"},"github":{"type":["string","null"]},"gitpod":{"type":["string","null"]},"thumbnailTime":{"type":["number","null"]},"optional":{"type":["boolean","null"],"default":false},"prompt":{"type":["string","null"]}},"required":["title","slug"],"additionalProperties":false},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]},"tags":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"contentResourceId":{"type":"string"},"organizationId":{"type":["string","null"]},"tagId":{"type":"string"},"position":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deletedAt":{},"tag":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic","default":"topic"},"organizationId":{"type":["string","null"]},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deleteAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]}},"required":["id","fields","createdAt","updatedAt"],"additionalProperties":false}},"required":["contentResourceId","tagId","position","createdAt","updatedAt","tag"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","type","createdById","fields","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false}}]},"LessonResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"type":"object","properties":{"title":{"type":"string","minLength":2},"body":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"unlisted"},"github":{"type":["string","null"]},"gitpod":{"type":["string","null"]},"thumbnailTime":{"type":["number","null"]},"optional":{"type":["boolean","null"],"default":false},"prompt":{"type":["string","null"]}},"required":["title","slug"],"additionalProperties":false},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]},"tags":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"contentResourceId":{"type":"string"},"organizationId":{"type":["string","null"]},"tagId":{"type":"string"},"position":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deletedAt":{},"tag":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic","default":"topic"},"organizationId":{"type":["string","null"]},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deleteAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]}},"required":["id","fields","createdAt","updatedAt"],"additionalProperties":false}},"required":["contentResourceId","tagId","position","createdAt","updatedAt","tag"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","type","createdById","fields","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false},"PostCreateRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1},"videoResourceId":{"type":"string"},"postType":{"type":"string"},"parentLessonId":{"type":"string"}},"required":["title","postType"],"additionalProperties":false},"PostUpdateRequest":{"type":"object","properties":{"id":{"type":"string"},"fields":{"type":"object","properties":{"postType":{"type":"string","enum":["article","podcast","tip","course","playlist","skill-changelog","skill"],"default":"article"},"cta":{"anyOf":[{"type":"null"},{"type":"string","const":"course"},{"type":"string","const":"none"},{"type":"object","properties":{"kind":{"type":"string","const":"course"},"headline":{"type":"string"},"subtitle":{"type":"string"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unrecognised"}},"required":["kind"],"additionalProperties":false}]},"suppressCourseCta":{"type":"boolean"},"relatedPostsVariant":{"type":"string","enum":["section","suggested"]},"title":{"type":"string","minLength":2,"maxLength":90},"body":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"slug":{"type":"string"},"description":{"type":["string","null"]},"state":{"type":"string","enum":["draft","published","archived","deleted"]},"visibility":{"type":"string","enum":["public","private","unlisted"]},"github":{"type":["string","null"]},"githubSource":{"type":["string","null"]},"thumbnailTime":{"type":["number","null"]},"coverImage":{"anyOf":[{"type":"object","properties":{"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","const":""}]},"alt":{"type":"string"}},"required":["url"],"additionalProperties":false},{"type":"null"}]}},"required":["title","slug"],"additionalProperties":false},"tags":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"contentResourceId":{"type":"string"},"organizationId":{"type":["string","null"]},"tagId":{"type":"string"},"position":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deletedAt":{},"tag":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic","default":"topic"},"organizationId":{"type":["string","null"]},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deleteAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]}},"required":["id","fields","createdAt","updatedAt"],"additionalProperties":false}},"required":["contentResourceId","tagId","position","createdAt","updatedAt","tag"],"additionalProperties":false}},{"type":"null"}]},"videoResourceId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]}},"required":["id","fields"],"additionalProperties":false},"PostReadResponse":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"type":"object","properties":{"postType":{"type":"string","enum":["article","podcast","tip","course","playlist","skill-changelog","skill"],"default":"article"},"cta":{"anyOf":[{"type":"null"},{"type":"string","const":"course"},{"type":"string","const":"none"},{"type":"object","properties":{"kind":{"type":"string","const":"course"},"headline":{"type":"string"},"subtitle":{"type":"string"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unrecognised"}},"required":["kind"],"additionalProperties":false}]},"body":{"type":["string","null"]},"yDoc":{"type":["string","null"]},"title":{"type":"string"},"summary":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"description":{"type":["string","null"]},"slug":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"public"},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"github":{"type":["string","null"]},"githubSource":{"type":["string","null"]},"githubSourceSha":{"type":["string","null"]},"gitpod":{"type":["string","null"]},"thumbnailTime":{"type":["number","null"]},"suppressCourseCta":{"type":"boolean"},"relatedPostsVariant":{"type":"string","enum":["section","suggested"]},"featured":{"type":"object","properties":{"priority":{"type":"number"},"layout":{"type":"string","enum":["primary","secondary","tertiary"]}},"required":["priority","layout"],"additionalProperties":false},"coverImage":{"anyOf":[{"type":"object","properties":{"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","const":""}]},"alt":{"type":"string"}},"required":["url"],"additionalProperties":false},{"type":"null"}]},"_artwork":{"type":"object","properties":{"batchId":{"type":"string"},"startedAt":{"type":"string","format":"date-time"}},"additionalProperties":false}},"required":["title","slug"],"additionalProperties":false},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]},"tags":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"contentResourceId":{"type":"string"},"organizationId":{"type":["string","null"]},"tagId":{"type":"string"},"position":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deletedAt":{},"tag":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic","default":"topic"},"organizationId":{"type":["string","null"]},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deleteAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]}},"required":["id","fields","createdAt","updatedAt"],"additionalProperties":false}},"required":["contentResourceId","tagId","position","createdAt","updatedAt","tag"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","type","createdById","fields","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"type":"object","properties":{"postType":{"type":"string","enum":["article","podcast","tip","course","playlist","skill-changelog","skill"],"default":"article"},"cta":{"anyOf":[{"type":"null"},{"type":"string","const":"course"},{"type":"string","const":"none"},{"type":"object","properties":{"kind":{"type":"string","const":"course"},"headline":{"type":"string"},"subtitle":{"type":"string"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unrecognised"}},"required":["kind"],"additionalProperties":false}]},"body":{"type":["string","null"]},"yDoc":{"type":["string","null"]},"title":{"type":"string"},"summary":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"description":{"type":["string","null"]},"slug":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"public"},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"github":{"type":["string","null"]},"githubSource":{"type":["string","null"]},"githubSourceSha":{"type":["string","null"]},"gitpod":{"type":["string","null"]},"thumbnailTime":{"type":["number","null"]},"suppressCourseCta":{"type":"boolean"},"relatedPostsVariant":{"type":"string","enum":["section","suggested"]},"featured":{"type":"object","properties":{"priority":{"type":"number"},"layout":{"type":"string","enum":["primary","secondary","tertiary"]}},"required":["priority","layout"],"additionalProperties":false},"coverImage":{"anyOf":[{"type":"object","properties":{"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","const":""}]},"alt":{"type":"string"}},"required":["url"],"additionalProperties":false},{"type":"null"}]},"_artwork":{"type":"object","properties":{"batchId":{"type":"string"},"startedAt":{"type":"string","format":"date-time"}},"additionalProperties":false}},"required":["title","slug"],"additionalProperties":false},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]},"tags":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"contentResourceId":{"type":"string"},"organizationId":{"type":["string","null"]},"tagId":{"type":"string"},"position":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deletedAt":{},"tag":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic","default":"topic"},"organizationId":{"type":["string","null"]},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deleteAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]}},"required":["id","fields","createdAt","updatedAt"],"additionalProperties":false}},"required":["contentResourceId","tagId","position","createdAt","updatedAt","tag"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","type","createdById","fields","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false}}]},"PostResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"type":"object","properties":{"postType":{"type":"string","enum":["article","podcast","tip","course","playlist","skill-changelog","skill"],"default":"article"},"cta":{"anyOf":[{"type":"null"},{"type":"string","const":"course"},{"type":"string","const":"none"},{"type":"object","properties":{"kind":{"type":"string","const":"course"},"headline":{"type":"string"},"subtitle":{"type":"string"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unrecognised"}},"required":["kind"],"additionalProperties":false}]},"body":{"type":["string","null"]},"yDoc":{"type":["string","null"]},"title":{"type":"string"},"summary":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"description":{"type":["string","null"]},"slug":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"public"},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"github":{"type":["string","null"]},"githubSource":{"type":["string","null"]},"githubSourceSha":{"type":["string","null"]},"gitpod":{"type":["string","null"]},"thumbnailTime":{"type":["number","null"]},"suppressCourseCta":{"type":"boolean"},"relatedPostsVariant":{"type":"string","enum":["section","suggested"]},"featured":{"type":"object","properties":{"priority":{"type":"number"},"layout":{"type":"string","enum":["primary","secondary","tertiary"]}},"required":["priority","layout"],"additionalProperties":false},"coverImage":{"anyOf":[{"type":"object","properties":{"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","const":""}]},"alt":{"type":"string"}},"required":["url"],"additionalProperties":false},{"type":"null"}]},"_artwork":{"type":"object","properties":{"batchId":{"type":"string"},"startedAt":{"type":"string","format":"date-time"}},"additionalProperties":false}},"required":["title","slug"],"additionalProperties":false},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]},"tags":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"contentResourceId":{"type":"string"},"organizationId":{"type":["string","null"]},"tagId":{"type":"string"},"position":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deletedAt":{},"tag":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic","default":"topic"},"organizationId":{"type":["string","null"]},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deleteAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]}},"required":["id","fields","createdAt","updatedAt"],"additionalProperties":false}},"required":["contentResourceId","tagId","position","createdAt","updatedAt","tag"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","type","createdById","fields","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false},"DeleteMessageResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"ProductCreateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":90},"quantityAvailable":{"type":"number","default":-1},"price":{"type":"number","minimum":0,"default":0},"type":{"type":"string","enum":["live","self-paced","membership","cohort","cohort-archive","source-code-access"],"default":"self-paced"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"unlisted"},"availableAfterDays":{"type":"integer","exclusiveMinimum":true,"minimum":0},"accessDurationDays":{"type":"integer","exclusiveMinimum":true,"minimum":0},"slug":{"type":"string","minLength":2,"maxLength":191}},"required":["name"],"additionalProperties":false},"ProductUpdateRequest":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":2,"maxLength":90},"price":{"type":"number","minimum":0},"quantityAvailable":{"type":"integer"},"type":{"type":"string","enum":["live","self-paced","membership","cohort","cohort-archive","source-code-access"]},"state":{"type":"string","enum":["draft","published","archived","deleted"]},"visibility":{"type":"string","enum":["public","private","unlisted"]},"slug":{"type":"string","minLength":2,"maxLength":191},"fields":{"type":"object","additionalProperties":{}}},"required":["id"],"additionalProperties":false},"ProductReadResponse":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","maxLength":191},"organizationId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"name":{"type":"string","maxLength":191},"key":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"type":{"type":"string","enum":["live","self-paced","membership","cohort","cohort-archive","source-code-access"],"default":"self-paced"},"fields":{"type":"object","properties":{"body":{"type":["string","null"]},"description":{"type":["string","null"]},"slug":{"type":"string"},"image":{"anyOf":[{"anyOf":[{"not":{}},{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"width":{"anyOf":[{"anyOf":[{"not":{}},{"type":"number"}]},{"type":"null"}]},"height":{"anyOf":[{"anyOf":[{"not":{}},{"type":"number"}]},{"type":"null"}]}},"required":["url"],"additionalProperties":false}]},{"type":"null"}]},"action":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}],"default":"Buy Now"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"unlisted"},"openEnrollment":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"closeEnrollment":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"discordRoleId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"availableAfterDays":{"anyOf":[{"anyOf":[{"not":{}},{"type":"integer","exclusiveMinimum":true,"minimum":0}]},{"type":"null"}]},"accessDurationDays":{"anyOf":[{"anyOf":[{"not":{}},{"type":"integer","exclusiveMinimum":true,"minimum":0}]},{"type":"null"}]},"tier":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","enum":["standard","pro"]}]},{"type":"null"}]},"billingInterval":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","enum":["month","year"]}]},{"type":"null"}]}},"required":["slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"integer","default":0},"quantityAvailable":{"type":"integer","default":-1},"price":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","maxLength":191},"productId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"organizationId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"nickname":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"status":{"type":"integer","default":0},"unitAmount":{"type":"number"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"fields":{"type":"object","additionalProperties":{},"default":{}}},"required":["id","unitAmount","createdAt"],"additionalProperties":false},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]}},"required":["id","name","fields","createdAt"],"additionalProperties":false},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":191},"organizationId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"name":{"type":"string","maxLength":191},"key":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"type":{"type":"string","enum":["live","self-paced","membership","cohort","cohort-archive","source-code-access"],"default":"self-paced"},"fields":{"type":"object","properties":{"body":{"type":["string","null"]},"description":{"type":["string","null"]},"slug":{"type":"string"},"image":{"anyOf":[{"anyOf":[{"not":{}},{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"width":{"anyOf":[{"anyOf":[{"not":{}},{"type":"number"}]},{"type":"null"}]},"height":{"anyOf":[{"anyOf":[{"not":{}},{"type":"number"}]},{"type":"null"}]}},"required":["url"],"additionalProperties":false}]},{"type":"null"}]},"action":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}],"default":"Buy Now"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"unlisted"},"openEnrollment":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"closeEnrollment":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"discordRoleId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"availableAfterDays":{"anyOf":[{"anyOf":[{"not":{}},{"type":"integer","exclusiveMinimum":true,"minimum":0}]},{"type":"null"}]},"accessDurationDays":{"anyOf":[{"anyOf":[{"not":{}},{"type":"integer","exclusiveMinimum":true,"minimum":0}]},{"type":"null"}]},"tier":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","enum":["standard","pro"]}]},{"type":"null"}]},"billingInterval":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","enum":["month","year"]}]},{"type":"null"}]}},"required":["slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"integer","default":0},"quantityAvailable":{"type":"integer","default":-1},"price":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","maxLength":191},"productId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"organizationId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"nickname":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"status":{"type":"integer","default":0},"unitAmount":{"type":"number"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"fields":{"type":"object","additionalProperties":{},"default":{}}},"required":["id","unitAmount","createdAt"],"additionalProperties":false},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]}},"required":["id","name","fields","createdAt"],"additionalProperties":false}}]},"ProductResponse":{"type":"object","properties":{"id":{"type":"string","maxLength":191},"organizationId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"name":{"type":"string","maxLength":191},"key":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"type":{"type":"string","enum":["live","self-paced","membership","cohort","cohort-archive","source-code-access"],"default":"self-paced"},"fields":{"type":"object","properties":{"body":{"type":["string","null"]},"description":{"type":["string","null"]},"slug":{"type":"string"},"image":{"anyOf":[{"anyOf":[{"not":{}},{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"width":{"anyOf":[{"anyOf":[{"not":{}},{"type":"number"}]},{"type":"null"}]},"height":{"anyOf":[{"anyOf":[{"not":{}},{"type":"number"}]},{"type":"null"}]}},"required":["url"],"additionalProperties":false}]},{"type":"null"}]},"action":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}],"default":"Buy Now"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"unlisted"},"openEnrollment":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"closeEnrollment":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"discordRoleId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"availableAfterDays":{"anyOf":[{"anyOf":[{"not":{}},{"type":"integer","exclusiveMinimum":true,"minimum":0}]},{"type":"null"}]},"accessDurationDays":{"anyOf":[{"anyOf":[{"not":{}},{"type":"integer","exclusiveMinimum":true,"minimum":0}]},{"type":"null"}]},"tier":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","enum":["standard","pro"]}]},{"type":"null"}]},"billingInterval":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","enum":["month","year"]}]},{"type":"null"}]}},"required":["slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"integer","default":0},"quantityAvailable":{"type":"integer","default":-1},"price":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","maxLength":191},"productId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"organizationId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"nickname":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":191}]},{"type":"null"}]},"status":{"type":"integer","default":0},"unitAmount":{"type":"number"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"fields":{"type":"object","additionalProperties":{},"default":{}}},"required":["id","unitAmount","createdAt"],"additionalProperties":false},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]}},"required":["id","name","fields","createdAt"],"additionalProperties":false},"ProductAvailabilityResponse":{"type":"object","properties":{"quantityAvailable":{"type":"integer"},"unlimited":{"type":"boolean"}},"required":["quantityAvailable","unlimited"],"additionalProperties":false},"ResourceCreateRequest":{"type":"object","properties":{"type":{"type":"string","minLength":1},"title":{"type":"string","minLength":2},"fields":{"type":"object","properties":{"slug":{"type":"string","minLength":1}},"additionalProperties":true}},"required":["type","title"],"additionalProperties":true},"ResourceUpdateRequest":{"type":"object","properties":{"fields":{"type":"object","properties":{"chapters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","minimum":0},"title":{"type":"string","minLength":1,"maxLength":120}},"required":["startTime","title"],"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":true}},"additionalProperties":true},"ResourceReadResponse":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false}}]},"ResourceResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false},"SearchResult":{"type":"object","properties":{"query":{"type":"string"},"found":{"type":"number"},"search_time_ms":{"type":"number"},"mode":{"type":"string","enum":["keyword","hybrid"]},"hits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"summary":{"type":"string"},"vector_distance":{"type":"number"},"rank_fusion_score":{"type":"number"}},"required":["id","type","title","slug","url","summary"],"additionalProperties":false}}},"required":["query","found","search_time_ms","mode","hits"],"additionalProperties":false},"SkillChangelogRequest":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":120},"slug":{"type":"string","minLength":2},"description":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"body":{"type":"string","default":""},"newsletterCopy":{"type":"string","default":""},"newsletterSubject":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","minLength":2,"maxLength":120}]},{"type":"null"}]},"newsletterPreviewText":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":200}]},{"type":"null"}]},"github":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"null"}]},"videoResourceId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"thumbnailTime":{"anyOf":[{"anyOf":[{"not":{}},{"type":"number"}]},{"type":"null"}]},"state":{"type":"string","enum":["draft","published"],"default":"draft"},"visibility":{"type":"string","enum":["public","unlisted","private"],"default":"unlisted"}},"required":["title"],"additionalProperties":false},"SkillChangelogResult":{"anyOf":[{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false},"url":{"type":"string"},"newsletterCopy":{"type":"string"},"requestId":{"type":"string"},"inngestEventId":{"type":["string","null"]}},"required":["resource","url","newsletterCopy","requestId","inngestEventId"],"additionalProperties":false},{"type":"object","properties":{"created":{"type":"boolean","const":true},"parsed":{"type":"boolean","const":false},"resourceId":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"}},"required":["created","parsed","resourceId","slug","url"],"additionalProperties":false}]},"CreateMultipartUploadRequest":{"type":"object","properties":{"filename":{"type":"string","minLength":1}},"required":["filename"],"additionalProperties":false},"CreateMultipartUploadResponse":{"type":"object","properties":{"uploadId":{"type":"string"},"key":{"type":"string"},"publicUrl":{"type":"string","format":"uri"}},"required":["uploadId","key","publicUrl"],"additionalProperties":false},"MultipartPartUrlResponse":{"type":"object","properties":{"signedUrl":{"type":"string","format":"uri"},"partNumber":{"type":"integer","exclusiveMinimum":true,"minimum":0}},"required":["signedUrl","partNumber"],"additionalProperties":false},"CompleteMultipartUploadRequest":{"type":"object","properties":{"key":{"type":"string","minLength":1},"uploadId":{"type":"string","minLength":1},"parts":{"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer","exclusiveMinimum":true,"minimum":0},"etag":{"type":"string","minLength":1}},"required":["partNumber","etag"],"additionalProperties":false},"minItems":1}},"required":["key","uploadId","parts"],"additionalProperties":false},"CompleteMultipartUploadResponse":{"type":"object","properties":{"publicUrl":{"type":"string","format":"uri"},"key":{"type":"string"}},"required":["publicUrl","key"],"additionalProperties":false},"UploadRequest":{"type":"object","properties":{"file":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["url"],"additionalProperties":false},"metadata":{"type":"object","properties":{"parentResourceId":{"type":"string"}},"required":["parentResourceId"],"additionalProperties":false}},"required":["file","metadata"],"additionalProperties":false},"UploadStartedResponse":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false},"SignedUploadUrlResponse":{"type":"object","properties":{"signedUrl":{"type":"string","format":"uri"},"filename":{"type":"string"},"objectName":{"type":"string"},"publicUrl":{"type":"string","format":"uri"}},"required":["signedUrl","filename","objectName","publicUrl"],"additionalProperties":false},"CreateShortlinkRequest":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z0-9_-]+$"},"url":{"type":"string","format":"uri"},"description":{"type":"string","maxLength":255},"metadata":{"anyOf":[{"anyOf":[{"not":{}},{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"campaign":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"campaignPhase":{"type":"string","enum":["prelaunch_research","warmup","open_cart","urgency","post_close"]},"sourceSurface":{"type":"string","enum":["broadcast","sequence","support_reply","social","site","operator_preview"]},"sourceId":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"contentSlug":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"contentTopic":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"contentIntent":{"type":"string","enum":["problem_aware","solution_aware","proof","objection","checkout"]},"valuePath":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"linkRole":{"type":"string","enum":["answer_option","share_value_path","signup_cta","resource_link","certificate_claim"]},"signupSurface":{"type":"string","enum":["skills_newsletter","skills_page","generic_site_signup"]},"createdFor":{"type":"string","enum":["campaign","evergreen","support","internal"]}},"required":["schemaVersion","campaign","campaignPhase","sourceSurface","sourceId","createdFor"],"additionalProperties":false}]},{"type":"null"}]}},"required":["url"],"additionalProperties":false},"UpdateShortlinkRequest":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z0-9_-]+$"},"url":{"type":"string","format":"uri"},"description":{"type":"string","maxLength":255},"metadata":{"anyOf":[{"anyOf":[{"not":{}},{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"campaign":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"campaignPhase":{"type":"string","enum":["prelaunch_research","warmup","open_cart","urgency","post_close"]},"sourceSurface":{"type":"string","enum":["broadcast","sequence","support_reply","social","site","operator_preview"]},"sourceId":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"contentSlug":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"contentTopic":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"contentIntent":{"type":"string","enum":["problem_aware","solution_aware","proof","objection","checkout"]},"valuePath":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"linkRole":{"type":"string","enum":["answer_option","share_value_path","signup_cta","resource_link","certificate_claim"]},"signupSurface":{"type":"string","enum":["skills_newsletter","skills_page","generic_site_signup"]},"createdFor":{"type":"string","enum":["campaign","evergreen","support","internal"]}},"required":["schemaVersion","campaign","campaignPhase","sourceSurface","sourceId","createdFor"],"additionalProperties":false}]},{"type":"null"}]}},"required":["id"],"additionalProperties":false},"ShortlinkResponse":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":["string","null"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"clicks":{"type":"integer"},"createdById":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","slug","url","description","metadata","clicks","createdById","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":["string","null"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"createdById":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","slug","url","description","metadata","createdById","createdAt","updatedAt"],"additionalProperties":false}]},"ShortlinkReadResponse":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":["string","null"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"clicks":{"type":"integer"},"createdById":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","slug","url","description","metadata","clicks","createdById","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":["string","null"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"createdById":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","slug","url","description","metadata","createdById","createdAt","updatedAt"],"additionalProperties":false},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":["string","null"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"clicks":{"type":"integer"},"createdById":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","slug","url","description","metadata","clicks","createdById","createdAt","updatedAt"],"additionalProperties":false}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":["string","null"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"createdById":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","slug","url","description","metadata","createdById","createdAt","updatedAt"],"additionalProperties":false}}]},"CreateTagRequest":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic"},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["fields"],"additionalProperties":false},"TagResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic","default":"topic"},"organizationId":{"type":["string","null"]},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deleteAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]}},"required":["id","fields","createdAt","updatedAt"],"additionalProperties":false},"TagListResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"topic","default":"topic"},"organizationId":{"type":["string","null"]},"fields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contexts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"url":{"type":["string","null"]},"popularity_order":{"type":["number","null"]}},"required":["name","label","slug"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"deleteAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]}},"required":["id","fields","createdAt","updatedAt"],"additionalProperties":false}},"PostTagInput":{"type":"object","properties":{"postId":{"type":"string"},"tagId":{"type":"string"}},"required":["postId","tagId"],"additionalProperties":false},"PostTagMutationResponse":{"type":"object","properties":{"success":{"type":"boolean","const":true},"action":{"type":"string","enum":["attach","remove"]},"postId":{"type":"string"},"tagId":{"type":"string"}},"required":["success","action","postId","tagId"],"additionalProperties":false},"AddListItemRequest":{"type":"object","properties":{"resourceId":{"type":"string","minLength":1},"parentId":{"type":"string","minLength":1},"metadata":{"type":"object","properties":{"tier":{"type":"string"}},"additionalProperties":true}},"required":["resourceId"],"additionalProperties":false},"MoveListItemsRequest":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string","minLength":1},"parentId":{"type":"string","minLength":1},"position":{"type":"integer","minimum":0}},"required":["resourceId","position"],"additionalProperties":false},"minItems":1}},"required":["items"],"additionalProperties":false},"ListItemRow":{"type":"object","properties":{"resourceOfId":{"type":"string"},"resourceId":{"type":"string"},"position":{"type":"number"},"metadata":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"resource":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false},{"type":"null"}]}},"required":["resourceOfId","resourceId","position"],"additionalProperties":true},"ListItemLocation":{"type":"object","properties":{"resourceId":{"type":"string"},"parentId":{"type":"string"},"position":{"type":"number"}},"required":["resourceId","parentId","position"],"additionalProperties":false},"MoveListItemsResult":{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"fromParentId":{"type":"string"},"toParentId":{"type":"string"},"position":{"type":"number"}},"required":["resourceId","fromParentId","toParentId","position"],"additionalProperties":false}},"UpdatePageRequest":{"type":"object","properties":{"fields":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":90},"body":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"description":{"type":"string"},"slug":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"]},"visibility":{"type":"string","enum":["public","private","unlisted"]}},"additionalProperties":false}},"required":["fields"],"additionalProperties":false},"PageResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"type":"object","properties":{"body":{"type":["string","null"]},"title":{"type":"string","minLength":2,"maxLength":90},"description":{"type":"string"},"slug":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"public"},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false}},{"type":"null"}]},"socialImage":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","const":""}]}},"required":["type","url"],"additionalProperties":false},{"type":"null"}]}},"required":["title","slug"],"additionalProperties":false},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","fields","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false},"PageReadResponse":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"type":"object","properties":{"body":{"type":["string","null"]},"title":{"type":"string","minLength":2,"maxLength":90},"description":{"type":"string"},"slug":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"public"},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false}},{"type":"null"}]},"socialImage":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","const":""}]}},"required":["type","url"],"additionalProperties":false},{"type":"null"}]}},"required":["title","slug"],"additionalProperties":false},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","fields","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"type":"object","properties":{"body":{"type":["string","null"]},"title":{"type":"string","minLength":2,"maxLength":90},"description":{"type":"string"},"slug":{"type":"string"},"state":{"type":"string","enum":["draft","published","archived","deleted"],"default":"draft"},"visibility":{"type":"string","enum":["public","private","unlisted"],"default":"public"},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"createdById":{"type":"string"},"currentVersionId":{"type":["string","null"]},"fields":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false}},{"type":"null"}]},"socialImage":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","const":""}]}},"required":["type","url"],"additionalProperties":false},{"type":"null"}]}},"required":["title","slug"],"additionalProperties":false},"slug":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"resourceOfId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{}},"required":["resourceId","resourceOfId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"resourceProducts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"productId":{"type":"string"},"position":{"type":"number","default":0},"metadata":{"anyOf":[{"type":"object","additionalProperties":{},"default":{}},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resource":{},"product":{}},"required":["resourceId","productId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"default":[]},{"type":"null"}]},"organizationId":{"type":["string","null"]},"createdByOrganizationMembershipId":{"type":["string","null"]}},"required":["id","type","createdById","fields","createdAt","updatedAt","deletedAt","organizationId","createdByOrganizationMembershipId"],"additionalProperties":false}}]},"MintPersonalAccessTokenRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"type":"string","enum":["analytics:read","analytics:chat","content:read","content:write","content:publish","content:relations","media:upload","shortlinks:manage"]},"minItems":1},"expiresAt":{"type":"string","format":"date-time"}},"required":["name","scopes"],"additionalProperties":false},"PersonalAccessToken":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tokenPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","tokenPrefix","scopes","createdAt","lastUsedAt","expiresAt","revokedAt"],"additionalProperties":false},"MintPersonalAccessTokenResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tokenPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"token":{"type":"string","pattern":"^aih\\_pat\\_"}},"required":["id","name","tokenPrefix","scopes","createdAt","lastUsedAt","expiresAt","revokedAt","token"],"additionalProperties":false},"EditorResourceMutationRequest":{"type":"object","properties":{"action":{"type":"string","enum":["save","publish"],"default":"save"},"fields":{"type":"object","additionalProperties":{},"default":{}}},"additionalProperties":false},"EditorResourceRollbackRequest":{"type":"object","properties":{"versionId":{"type":"string","minLength":1}},"required":["versionId"],"additionalProperties":false},"EditorResourceResponse":{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["page","workshop"]},"fields":{"type":"object","additionalProperties":{}},"currentVersionId":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","type","fields","currentVersionId","createdAt","updatedAt"],"additionalProperties":false},"revision":{"type":"string"}},"required":["resource","revision"],"additionalProperties":false},"EditorResourceListResponse":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["page","workshop"]},"fields":{"type":"object","additionalProperties":{}},"currentVersionId":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","type","fields","currentVersionId","createdAt","updatedAt"],"additionalProperties":false},"revision":{"type":"string"}},"required":["resource","revision"],"additionalProperties":false}},"EditorResourceVersionListResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string"},"parentVersionId":{"type":["string","null"]},"versionNumber":{"type":"integer","exclusiveMinimum":true,"minimum":0},"fields":{"type":"object","additionalProperties":{}},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdById":{"type":"string"}},"required":["id","resourceId","parentVersionId","versionNumber","fields","createdAt","createdById"],"additionalProperties":false}},"EditorResourceMutationResponse":{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["page","workshop"]},"fields":{"type":"object","additionalProperties":{}},"currentVersionId":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","type","fields","currentVersionId","createdAt","updatedAt"],"additionalProperties":false},"revision":{"type":"string"},"version":{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string"},"parentVersionId":{"type":["string","null"]},"versionNumber":{"type":"integer","exclusiveMinimum":true,"minimum":0},"fields":{"type":"object","additionalProperties":{}},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdById":{"type":"string"}},"required":["id","resourceId","parentVersionId","versionNumber","fields","createdAt","createdById"],"additionalProperties":false},"baselineVersion":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string"},"parentVersionId":{"type":["string","null"]},"versionNumber":{"type":"integer","exclusiveMinimum":true,"minimum":0},"fields":{"type":"object","additionalProperties":{}},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdById":{"type":"string"}},"required":["id","resourceId","parentVersionId","versionNumber","fields","createdAt","createdById"],"additionalProperties":false},{"type":"null"}]},"effects":{"type":"object","properties":{"typesense":{"type":"string","enum":["queued","degraded","not-applicable"]},"cache":{"type":"string","enum":["completed","degraded"]}},"required":["typesense","cache"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["typesense","cache"]},"message":{"type":"string"}},"required":["effect","message"],"additionalProperties":false}}},"required":["resource","revision","version","baselineVersion","effects","warnings"],"additionalProperties":false},"CommandSuccessEnvelope":{"type":"object","description":"Shared success envelope for agent-oriented commands. result is operation-specific; next_actions contains executable discovery hints rather than hidden control flow.","required":["ok","command","result","next_actions"],"properties":{"ok":{"const":true},"command":{"type":"string"},"result":{"oneOf":[{"$ref":"#/components/schemas/SearchResult"},{"$ref":"#/components/schemas/SkillChangelogResult"},{"$ref":"#/components/schemas/CommandPreflightResult"}]},"next_actions":{"type":"array","items":{"$ref":"#/components/schemas/NextAction"}}}},"CommandPreflightSuccessResponse":{"allOf":[{"$ref":"#/components/schemas/CommandSuccessEnvelope"},{"type":"object","properties":{"result":{"$ref":"#/components/schemas/CommandPreflightResult"}}}],"unevaluatedProperties":false},"SearchSuccessResponse":{"allOf":[{"$ref":"#/components/schemas/CommandSuccessEnvelope"},{"type":"object","properties":{"result":{"$ref":"#/components/schemas/SearchResult"}}}],"unevaluatedProperties":false},"SkillChangelogSuccessResponse":{"description":"The canonical command envelope plus deprecated top-level id and slug compatibility fields. New clients should read result.resource.id and result.resource.fields.slug, or result.resourceId and result.slug in the defensive parse-failure result.","allOf":[{"$ref":"#/components/schemas/CommandSuccessEnvelope"},{"type":"object","required":["id","slug"],"properties":{"result":{"$ref":"#/components/schemas/SkillChangelogResult"},"id":{"type":"string","deprecated":true,"description":"Deprecated compatibility mirror of result.resource.id or result.resourceId."},"slug":{"type":"string","deprecated":true,"description":"Deprecated compatibility mirror of result.resource.fields.slug or result.slug."}}}],"unevaluatedProperties":false}}}}