[skip ci] wip: preserve Hermes crank development checkpoint
Owner-authorized recovery of accumulated source changes.
Includes accepted work and in-progress changes; NOT a release or acceptance.
Parent baseline 1b6db09bd1. Runtime data, build caches and local credentials excluded.
This commit is contained in:
1 parent
1b6db09bd1
commit
75fe5a123c
357 files changed
+118831
-5113
No files matched your search
@@ -45,6 +45,17 @@ use crate::{
|
||||
get_operation_version, list_operations, publish_operation, run_test, update_operation,
|
||||
upload_input_json, upload_output_json,
|
||||
},
|
||||
prompts::{
|
||||
create_prompt_draft, export_prompt_draft, export_prompt_version, get_prompt_draft,
|
||||
import_prompt, list_prompt_drafts, preview_prompt_draft, prompt_action,
|
||||
update_prompt_draft,
|
||||
},
|
||||
resources::{
|
||||
archive_resource, create_resource, download_resource, download_resource_version,
|
||||
export_resource, export_resource_version, get_resource, get_resource_version,
|
||||
import_resource, list_resources, preview_resource, publish_resource, revoke_resource,
|
||||
test_resource, update_resource,
|
||||
},
|
||||
secrets::{create_secret, delete_secret, get_secret, list_secrets, rotate_secret},
|
||||
upstreams::{create_upstream, list_upstreams, update_upstream},
|
||||
workspaces::{get_workspace, list_workspaces, update_workspace},
|
||||
@@ -55,6 +66,60 @@ use crate::{
|
||||
pub fn build_app(state: AppState) -> Router {
|
||||
let workspace_router = Router::new()
|
||||
.route("/operations", get(list_operations).post(create_operation))
|
||||
.route(
|
||||
"/resources",
|
||||
get(list_resources)
|
||||
.post(create_resource)
|
||||
.layer(DefaultBodyLimit::max(MAX_ARTIFACT_BYTES + 32 * 1024)),
|
||||
)
|
||||
.route(
|
||||
"/prompts",
|
||||
get(list_prompt_drafts).post(create_prompt_draft),
|
||||
)
|
||||
.route(
|
||||
"/prompts/{prompt_id}",
|
||||
get(get_prompt_draft)
|
||||
.put(update_prompt_draft)
|
||||
.post(prompt_action),
|
||||
)
|
||||
.route("/prompts/{prompt_id}/preview", post(preview_prompt_draft))
|
||||
.route("/prompts/import", post(import_prompt))
|
||||
.route("/prompts/{prompt_id}/export", get(export_prompt_draft))
|
||||
.route(
|
||||
"/prompts/{prompt_id}/versions/{version}/export",
|
||||
get(export_prompt_version),
|
||||
)
|
||||
.route(
|
||||
"/resources/{resource_id}",
|
||||
get(get_resource)
|
||||
.put(update_resource)
|
||||
.layer(DefaultBodyLimit::max(MAX_ARTIFACT_BYTES + 32 * 1024)),
|
||||
)
|
||||
.route("/resources/{resource_id}/preview", get(preview_resource))
|
||||
.route("/resources/{resource_id}/test-runs", post(test_resource))
|
||||
.route("/resources/{resource_id}/content", get(download_resource))
|
||||
.route("/resources/{resource_id}/export", get(export_resource))
|
||||
.route(
|
||||
"/resources/import",
|
||||
post(import_resource).layer(DefaultBodyLimit::max(
|
||||
crate::service::resources::portability::MAX_IMPORT_BODY_BYTES,
|
||||
)),
|
||||
)
|
||||
.route("/resources/{resource_id}/publish", post(publish_resource))
|
||||
.route("/resources/{resource_id}/archive", post(archive_resource))
|
||||
.route("/resources/{resource_id}/revoke", post(revoke_resource))
|
||||
.route(
|
||||
"/resources/{resource_id}/versions/{version}",
|
||||
get(get_resource_version),
|
||||
)
|
||||
.route(
|
||||
"/resources/{resource_id}/versions/{version}/content",
|
||||
get(download_resource_version),
|
||||
)
|
||||
.route(
|
||||
"/resources/{resource_id}/versions/{version}/export",
|
||||
get(export_resource_version),
|
||||
)
|
||||
.route(
|
||||
"/imports/openapi/preview",
|
||||
post(preview_openapi_import)
|
||||
@@ -250,3 +315,8 @@ pub fn build_app(state: AppState) -> Router {
|
||||
}
|
||||
|
||||
use crate::routes::operations::import_operation;
|
||||
|
||||
/// AT-3.6-02/06: приватная тестовая composition fixture (FINAL-DISPOSITION run99:47).
|
||||
/// Собирается только в `cfg(test)`: non-test сборка `admin-api` модуль не видит.
|
||||
#[cfg(test)]
|
||||
pub(crate) mod resource_test_support;
|
||||
Reference in new issue
Block a user