Task 004: add demo auth and role checks
This commit is contained in:
@@ -703,6 +703,50 @@
|
||||
"title": "ClaimSupportStatus",
|
||||
"type": "string"
|
||||
},
|
||||
"CurrentUser": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"display_name": {
|
||||
"minLength": 1,
|
||||
"title": "Display Name",
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"minLength": 1,
|
||||
"title": "Email",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"format": "uuid",
|
||||
"title": "Id",
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"$ref": "#/components/schemas/Role"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"email",
|
||||
"display_name",
|
||||
"role"
|
||||
],
|
||||
"title": "CurrentUser",
|
||||
"type": "object"
|
||||
},
|
||||
"CurrentUserResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"user": {
|
||||
"$ref": "#/components/schemas/CurrentUser"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"user"
|
||||
],
|
||||
"title": "CurrentUserResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"DraftSummary": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -1285,6 +1329,19 @@
|
||||
"title": "ResearchArtifactSummary",
|
||||
"type": "object"
|
||||
},
|
||||
"ReviewActionResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"review": {
|
||||
"$ref": "#/components/schemas/ReviewSummary"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"review"
|
||||
],
|
||||
"title": "ReviewActionResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"ReviewStatus": {
|
||||
"enum": [
|
||||
"PENDING",
|
||||
@@ -1400,6 +1457,93 @@
|
||||
"title": "RunnerFileRef",
|
||||
"type": "object"
|
||||
},
|
||||
"ScriptConfigVersionCreateRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"activate": {
|
||||
"default": false,
|
||||
"title": "Activate",
|
||||
"type": "boolean"
|
||||
},
|
||||
"diff": {
|
||||
"additionalProperties": true,
|
||||
"title": "Diff",
|
||||
"type": "object"
|
||||
},
|
||||
"publishing_yaml": {
|
||||
"minLength": 1,
|
||||
"title": "Publishing Yaml",
|
||||
"type": "string"
|
||||
},
|
||||
"rollback_target_version_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Rollback Target Version Id"
|
||||
},
|
||||
"transform_script": {
|
||||
"minLength": 1,
|
||||
"title": "Transform Script",
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"anyOf": [
|
||||
{
|
||||
"minimum": 1,
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Version"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"publishing_yaml",
|
||||
"transform_script"
|
||||
],
|
||||
"title": "ScriptConfigVersionCreateRequest",
|
||||
"type": "object"
|
||||
},
|
||||
"ScriptConfigVersionListResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"versions": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ScriptConfigVersionSummary"
|
||||
},
|
||||
"title": "Versions",
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"versions"
|
||||
],
|
||||
"title": "ScriptConfigVersionListResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"ScriptConfigVersionResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"version": {
|
||||
"$ref": "#/components/schemas/ScriptConfigVersionSummary"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"version"
|
||||
],
|
||||
"title": "ScriptConfigVersionResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"ScriptConfigVersionStatus": {
|
||||
"enum": [
|
||||
"DRAFT",
|
||||
@@ -1559,6 +1703,244 @@
|
||||
"title": "TargetSiteConfig",
|
||||
"type": "object"
|
||||
},
|
||||
"TargetSiteConfigCreateRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"active_script_config_version_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Active Script Config Version Id"
|
||||
},
|
||||
"audience": {
|
||||
"minLength": 1,
|
||||
"title": "Audience",
|
||||
"type": "string"
|
||||
},
|
||||
"brand_voice": {
|
||||
"minLength": 1,
|
||||
"title": "Brand Voice",
|
||||
"type": "string"
|
||||
},
|
||||
"default_language": {
|
||||
"default": "en",
|
||||
"minLength": 2,
|
||||
"title": "Default Language",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"minLength": 1,
|
||||
"title": "Name",
|
||||
"type": "string"
|
||||
},
|
||||
"publishing_rules": {
|
||||
"$ref": "#/components/schemas/PublishingRules"
|
||||
},
|
||||
"publishing_type": {
|
||||
"default": "git_next",
|
||||
"minLength": 1,
|
||||
"title": "Publishing Type",
|
||||
"type": "string"
|
||||
},
|
||||
"seo_rules": {
|
||||
"additionalProperties": true,
|
||||
"title": "Seo Rules",
|
||||
"type": "object"
|
||||
},
|
||||
"slug": {
|
||||
"minLength": 1,
|
||||
"title": "Slug",
|
||||
"type": "string"
|
||||
},
|
||||
"source_rules": {
|
||||
"additionalProperties": true,
|
||||
"title": "Source Rules",
|
||||
"type": "object"
|
||||
},
|
||||
"visual_rules": {
|
||||
"additionalProperties": true,
|
||||
"title": "Visual Rules",
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"slug",
|
||||
"brand_voice",
|
||||
"audience",
|
||||
"publishing_rules"
|
||||
],
|
||||
"title": "TargetSiteConfigCreateRequest",
|
||||
"type": "object"
|
||||
},
|
||||
"TargetSiteConfigResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"site": {
|
||||
"$ref": "#/components/schemas/TargetSiteConfig"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"site"
|
||||
],
|
||||
"title": "TargetSiteConfigResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"TargetSiteConfigUpdateRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"active_script_config_version_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Active Script Config Version Id"
|
||||
},
|
||||
"audience": {
|
||||
"anyOf": [
|
||||
{
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Audience"
|
||||
},
|
||||
"brand_voice": {
|
||||
"anyOf": [
|
||||
{
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Brand Voice"
|
||||
},
|
||||
"default_language": {
|
||||
"anyOf": [
|
||||
{
|
||||
"minLength": 2,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Default Language"
|
||||
},
|
||||
"name": {
|
||||
"anyOf": [
|
||||
{
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Name"
|
||||
},
|
||||
"publishing_rules": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/PublishingRules"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"publishing_type": {
|
||||
"anyOf": [
|
||||
{
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Publishing Type"
|
||||
},
|
||||
"seo_rules": {
|
||||
"anyOf": [
|
||||
{
|
||||
"additionalProperties": true,
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Seo Rules"
|
||||
},
|
||||
"slug": {
|
||||
"anyOf": [
|
||||
{
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Slug"
|
||||
},
|
||||
"source_rules": {
|
||||
"anyOf": [
|
||||
{
|
||||
"additionalProperties": true,
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Source Rules"
|
||||
},
|
||||
"visual_rules": {
|
||||
"anyOf": [
|
||||
{
|
||||
"additionalProperties": true,
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Visual Rules"
|
||||
}
|
||||
},
|
||||
"title": "TargetSiteConfigUpdateRequest",
|
||||
"type": "object"
|
||||
},
|
||||
"UserSummary": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -1628,6 +2010,24 @@
|
||||
"/api/articles": {
|
||||
"post": {
|
||||
"operationId": "create_article_api_articles_post",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
@@ -1666,6 +2066,498 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/articles/{article_id}/plans/{plan_id}/approve": {
|
||||
"post": {
|
||||
"operationId": "approve_plan_api_articles__article_id__plans__plan_id__approve_post",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "article_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"title": "Article Id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "path",
|
||||
"name": "plan_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"title": "Plan Id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ReviewActionResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Approve Plan",
|
||||
"tags": [
|
||||
"articles"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/me": {
|
||||
"get": {
|
||||
"operationId": "get_me_api_me_get",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CurrentUserResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Get Me",
|
||||
"tags": [
|
||||
"auth"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/sites": {
|
||||
"get": {
|
||||
"operationId": "list_sites_api_sites_get",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/TargetSiteConfigResponse"
|
||||
},
|
||||
"title": "Response List Sites Api Sites Get",
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "List Sites",
|
||||
"tags": [
|
||||
"sites"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"operationId": "post_site_api_sites_post",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TargetSiteConfigCreateRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TargetSiteConfigResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Post Site",
|
||||
"tags": [
|
||||
"sites"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/sites/{site_id}": {
|
||||
"patch": {
|
||||
"operationId": "patch_site_api_sites__site_id__patch",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "site_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"title": "Site Id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TargetSiteConfigUpdateRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TargetSiteConfigResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Patch Site",
|
||||
"tags": [
|
||||
"sites"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/sites/{site_id}/publishing-config/versions": {
|
||||
"get": {
|
||||
"operationId": "get_script_config_versions_api_sites__site_id__publishing_config_versions_get",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "site_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"title": "Site Id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ScriptConfigVersionListResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Get Script Config Versions",
|
||||
"tags": [
|
||||
"sites"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"operationId": "post_script_config_version_api_sites__site_id__publishing_config_versions_post",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "site_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"title": "Site Id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ScriptConfigVersionCreateRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ScriptConfigVersionResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Post Script Config Version",
|
||||
"tags": [
|
||||
"sites"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/sites/{site_id}/publishing-config/versions/{version_id}/activate": {
|
||||
"post": {
|
||||
"operationId": "post_activate_script_config_version_api_sites__site_id__publishing_config_versions__version_id__activate_post",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "site_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"title": "Site Id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "path",
|
||||
"name": "version_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"title": "Version Id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ScriptConfigVersionResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Post Activate Script Config Version",
|
||||
"tags": [
|
||||
"sites"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/health": {
|
||||
"get": {
|
||||
"operationId": "health_health_get",
|
||||
|
||||
@@ -110,6 +110,17 @@ export type ClaimSummary = {
|
||||
|
||||
export type ClaimSupportStatus = "SUPPORTED" | "UNSUPPORTED" | "NEEDS_REVIEW";
|
||||
|
||||
export type CurrentUser = {
|
||||
display_name: string;
|
||||
email: string;
|
||||
id: string;
|
||||
role: Role;
|
||||
};
|
||||
|
||||
export type CurrentUserResponse = {
|
||||
user: CurrentUser;
|
||||
};
|
||||
|
||||
export type DraftSummary = {
|
||||
article_id: string;
|
||||
body_object_key?: string | null;
|
||||
@@ -209,6 +220,10 @@ export type ResearchArtifactSummary = {
|
||||
source_url: string;
|
||||
};
|
||||
|
||||
export type ReviewActionResponse = {
|
||||
review: ReviewSummary;
|
||||
};
|
||||
|
||||
export type ReviewStatus = "PENDING" | "APPROVED" | "CHANGES_REQUESTED";
|
||||
|
||||
export type ReviewSummary = {
|
||||
@@ -230,6 +245,23 @@ export type RunnerFileRef = {
|
||||
path: string;
|
||||
};
|
||||
|
||||
export type ScriptConfigVersionCreateRequest = {
|
||||
activate?: boolean;
|
||||
diff?: Record<string, unknown>;
|
||||
publishing_yaml: string;
|
||||
rollback_target_version_id?: string | null;
|
||||
transform_script: string;
|
||||
version?: number | null;
|
||||
};
|
||||
|
||||
export type ScriptConfigVersionListResponse = {
|
||||
versions: ScriptConfigVersionSummary[];
|
||||
};
|
||||
|
||||
export type ScriptConfigVersionResponse = {
|
||||
version: ScriptConfigVersionSummary;
|
||||
};
|
||||
|
||||
export type ScriptConfigVersionStatus = "DRAFT" | "ACTIVE" | "DEPRECATED";
|
||||
|
||||
export type ScriptConfigVersionSummary = {
|
||||
@@ -260,6 +292,38 @@ export type TargetSiteConfig = {
|
||||
visual_rules?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type TargetSiteConfigCreateRequest = {
|
||||
active_script_config_version_id?: string | null;
|
||||
audience: string;
|
||||
brand_voice: string;
|
||||
default_language?: string;
|
||||
name: string;
|
||||
publishing_rules: PublishingRules;
|
||||
publishing_type?: string;
|
||||
seo_rules?: Record<string, unknown>;
|
||||
slug: string;
|
||||
source_rules?: Record<string, unknown>;
|
||||
visual_rules?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type TargetSiteConfigResponse = {
|
||||
site: TargetSiteConfig;
|
||||
};
|
||||
|
||||
export type TargetSiteConfigUpdateRequest = {
|
||||
active_script_config_version_id?: string | null;
|
||||
audience?: string | null;
|
||||
brand_voice?: string | null;
|
||||
default_language?: string | null;
|
||||
name?: string | null;
|
||||
publishing_rules?: PublishingRules | null;
|
||||
publishing_type?: string | null;
|
||||
seo_rules?: Record<string, unknown> | null;
|
||||
slug?: string | null;
|
||||
source_rules?: Record<string, unknown> | null;
|
||||
visual_rules?: Record<string, unknown> | null;
|
||||
};
|
||||
|
||||
export type UserSummary = {
|
||||
display_name: string;
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user