From a4626fb17492f5df12744cbce82c91f4781e082c Mon Sep 17 00:00:00 2001 From: ysyneu Date: Fri, 4 Sep 2026 09:06:37 -0700 Subject: [PATCH] feat: regenerate from the latest OpenAPI specs Sync vendored specs from flashduty-docs main and regenerate: - new Artifacts service: AI SRE artifact gallery CRUD, publish-from-file, file-state, public share enable/sync/revoke, sign and stream - StatusPages: add draft create operation --- artifacts.go | 159 ++++ models_gen.go | 192 +++++ openapi/openapi.en.json | 1502 ++++++++++++++++++++++++++++++++++- openapi/openapi.zh.json | 1642 +++++++++++++++++++++++++++++++++++++-- roundtrip_gen_test.go | 117 +-- services_gen.go | 2 + status_pages.go | 14 + 7 files changed, 3503 insertions(+), 125 deletions(-) create mode 100644 artifacts.go diff --git a/artifacts.go b/artifacts.go new file mode 100644 index 0000000..6c7eff0 --- /dev/null +++ b/artifacts.go @@ -0,0 +1,159 @@ +// Code generated by internal/cmd/gen; DO NOT EDIT. + +package flashduty + +import "context" + +// ArtifactsService handles the "AI SRE/Artifacts" API resource. +type ArtifactsService service + +// Get artifact detail. +// +// Get a single published artifact by ID. +// +// API: POST /safari/artifact/gallery/get (artifact-read-get). +func (s *ArtifactsService) ReadGet(ctx context.Context, req *ArtifactIDRequest) (*PublishedArtifactItem, *Response, error) { + out := new(PublishedArtifactItem) + resp, err := s.client.do(ctx, "/safari/artifact/gallery/get", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Get file publish state. +// +// Check which presented files already have a live published artifact. +// +// API: POST /safari/artifact/gallery/file-state (artifact-read-get-file-state). +func (s *ArtifactsService) ReadGetFileState(ctx context.Context, req *ArtifactFileStateRequest) (*ArtifactFileStateResponse, *Response, error) { + out := new(ArtifactFileStateResponse) + resp, err := s.client.do(ctx, "/safari/artifact/gallery/file-state", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// List artifacts. +// +// List published artifacts visible to the caller, with pagination and title search. +// +// API: POST /safari/artifact/gallery/list (artifact-read-list). +func (s *ArtifactsService) ReadList(ctx context.Context, req *ArtifactListRequest) (*ArtifactListResponse, *Response, error) { + out := new(ArtifactListResponse) + resp, err := s.client.do(ctx, "/safari/artifact/gallery/list", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Create signed file URLs. +// +// Create short-lived signed URLs to download or preview a presented file. +// +// API: POST /safari/artifact/sign (artifact-read-sign). +func (s *ArtifactsService) ReadSign(ctx context.Context, req *ArtifactSignRequest) (*SignedUrLs, *Response, error) { + out := new(SignedUrLs) + resp, err := s.client.do(ctx, "/safari/artifact/sign", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Download or preview a file. +// +// Download or preview a file's bytes using a signed token. +// +// The success body is a file, not a JSON envelope: it is returned on Response.Raw. +// +// API: GET /safari/artifact/stream (artifact-read-stream). +func (s *ArtifactsService) ReadStream(ctx context.Context, req *ArtifactsReadStreamRequest) (*Response, error) { + return s.client.doGet(ctx, "/safari/artifact/stream", req, nil) +} + +// Remove artifact from gallery. +// +// Detach an artifact from the gallery; the source file stays with its session. +// +// API: POST /safari/artifact/gallery/delete (artifact-write-delete). +func (s *ArtifactsService) WriteDelete(ctx context.Context, req *ArtifactIDRequest) (*any, *Response, error) { + out := new(any) + resp, err := s.client.do(ctx, "/safari/artifact/gallery/delete", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Publish file as artifact. +// +// Publish a session-produced file to the artifact gallery. +// +// API: POST /safari/artifact/gallery/publish-from-file (artifact-write-publish). +func (s *ArtifactsService) WritePublish(ctx context.Context, req *ArtifactPublishFromFileRequest) (*ArtifactPublishResponse, *Response, error) { + out := new(ArtifactPublishResponse) + resp, err := s.client.do(ctx, "/safari/artifact/gallery/publish-from-file", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Enable public sharing. +// +// Turn on anonymous public sharing for an artifact and return its public link. +// +// API: POST /safari/artifact/gallery/share/enable (artifact-write-share-enable). +func (s *ArtifactsService) WriteShareEnable(ctx context.Context, req *ArtifactIDRequest) (*ArtifactShareState, *Response, error) { + out := new(ArtifactShareState) + resp, err := s.client.do(ctx, "/safari/artifact/gallery/share/enable", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Revoke public sharing. +// +// Turn off public sharing; the link stops resolving immediately. +// +// API: POST /safari/artifact/gallery/share/revoke (artifact-write-share-revoke). +func (s *ArtifactsService) WriteShareRevoke(ctx context.Context, req *ArtifactIDRequest) (*any, *Response, error) { + out := new(any) + resp, err := s.client.do(ctx, "/safari/artifact/gallery/share/revoke", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Update shared snapshot. +// +// Refresh the public snapshot of a shared artifact with its latest content. +// +// API: POST /safari/artifact/gallery/share/sync (artifact-write-share-sync). +func (s *ArtifactsService) WriteShareSync(ctx context.Context, req *ArtifactIDRequest) (*ArtifactShareState, *Response, error) { + out := new(ArtifactShareState) + resp, err := s.client.do(ctx, "/safari/artifact/gallery/share/sync", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Update artifact. +// +// Rename an artifact or transfer it between personal and team scope. +// +// API: POST /safari/artifact/gallery/update (artifact-write-update). +func (s *ArtifactsService) WriteUpdate(ctx context.Context, req *ArtifactUpdateRequest) (*PublishedArtifactItem, *Response, error) { + out := new(PublishedArtifactItem) + resp, err := s.client.do(ctx, "/safari/artifact/gallery/update", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} diff --git a/models_gen.go b/models_gen.go index 98c8e12..a5f9368 100644 --- a/models_gen.go +++ b/models_gen.go @@ -1104,6 +1104,112 @@ type ApTitleReset struct { Title string `json:"title" toon:"title"` } +// ArtifactFileStateItem is generated from the Flashduty OpenAPI schema. +type ArtifactFileStateItem struct { + // Artifact ID (`art_` prefix). Also the key of the public-share link. + ArtifactID string `json:"artifact_id" toon:"artifact_id"` + // Echoes the requested presented-file ID. + FileID string `json:"file_id" toon:"file_id"` + // Console-relative path of the artifact page: `/ai-sre/artifacts/`. + GalleryPath string `json:"gallery_path" toon:"gallery_path"` + // Gallery display title of the published artifact. + Title string `json:"title" toon:"title"` +} + +// ArtifactFileStateRequest is generated from the Flashduty OpenAPI schema. +type ArtifactFileStateRequest struct { + // Presented-file IDs (`pf_` prefix) to probe. At most 50 per call; duplicates and empty strings are ignored. + FileIDs []string `json:"file_ids" toon:"file_ids"` +} + +// ArtifactFileStateResponse is generated from the Flashduty OpenAPI schema. +type ArtifactFileStateResponse struct { + // One entry per requested file that has a live published artifact; files without one are omitted. + Items []ArtifactFileStateItem `json:"items" toon:"items"` +} + +// ArtifactIDRequest is generated from the Flashduty OpenAPI schema. +type ArtifactIDRequest struct { + // Artifact ID (`art_` prefix). Also the key of the public-share link. + ArtifactID string `json:"artifact_id" toon:"artifact_id"` +} + +// ArtifactListRequest is generated from the Flashduty OpenAPI schema. +type ArtifactListRequest struct { + // Sort ascending when true, descending when false. Applies only when `orderby` is set. + Asc bool `json:"asc,omitempty" toon:"asc,omitempty"` + // Page size. Defaults to 20; capped at 100. + Limit int64 `json:"limit,omitempty" toon:"limit,omitempty"` + // Sort field: `created_at` or `updated_at`. Empty means `updated_at` descending. + Orderby string `json:"orderby,omitempty" toon:"orderby,omitempty"` + // Page number, 1-based. + Page int64 `json:"page,omitempty" toon:"page,omitempty"` + // Case-insensitive substring match on the artifact title. + Query string `json:"query,omitempty" toon:"query,omitempty"` + // Visibility scope. `all` (default) lists the caller's own personal artifacts plus artifacts of every team the caller belongs to; `personal` lists only the caller's own; `team` lists only team-owned artifacts of the caller's teams. + Scope string `json:"scope,omitempty" toon:"scope,omitempty"` + // Restrict to artifacts owned by these team IDs, intersected with the caller's visibility — teams the caller does not belong to silently return nothing. + TeamIDs []int64 `json:"team_ids,omitempty" toon:"team_ids,omitempty"` +} + +// ArtifactListResponse is generated from the Flashduty OpenAPI schema. +type ArtifactListResponse struct { + // Artifacts on this page. + Items []PublishedArtifactItem `json:"items" toon:"items"` + // Total number of artifacts matching the filter across all pages. + Total int64 `json:"total" toon:"total"` +} + +// ArtifactPublishFromFileRequest is generated from the Flashduty OpenAPI schema. +type ArtifactPublishFromFileRequest struct { + // Presented-file ID (`pf_` prefix) of a file produced in a session, as shown on the file card in chat. + FileID string `json:"file_id" toon:"file_id"` + // Gallery display title. Trimmed; must be non-empty. + Title string `json:"title" toon:"title"` +} + +// ArtifactPublishResponse is generated from the Flashduty OpenAPI schema. +type ArtifactPublishResponse struct { + // Artifact ID (`art_` prefix). Also the key of the public-share link. + ArtifactID string `json:"artifact_id" toon:"artifact_id"` + // Console-relative path of the artifact page: `/ai-sre/artifacts/`. + GalleryPath string `json:"gallery_path" toon:"gallery_path"` + // Gallery display title. + Title string `json:"title" toon:"title"` +} + +// ArtifactShareState is generated from the Flashduty OpenAPI schema. +type ArtifactShareState struct { + // Artifact ID (`art_` prefix). Also the key of the public-share link. + ArtifactID string `json:"artifact_id" toon:"artifact_id"` + // Anonymous public link served entirely from CDN. Anyone with the link can view the content, no login required. + PublicURL string `json:"public_url" toon:"public_url"` + // Always `true` in this response. + ShareEnabled bool `json:"share_enabled" toon:"share_enabled"` + // Unix timestamp in milliseconds of the last share enable or snapshot sync. + SharedAt TimestampMilli `json:"shared_at" toon:"shared_at"` + // Person ID of the member who enabled sharing. + SharedBy int64 `json:"shared_by" toon:"shared_by"` +} + +// ArtifactSignRequest is generated from the Flashduty OpenAPI schema. +type ArtifactSignRequest struct { + // Presented-file ID (`pf_` prefix) to sign. + FileID string `json:"file_id" toon:"file_id"` + // Optional session share-link token. Needed only when the caller reaches the file through a shared session link rather than account membership. + ShareToken string `json:"share_token,omitempty" toon:"share_token,omitempty"` +} + +// ArtifactUpdateRequest is generated from the Flashduty OpenAPI schema. +type ArtifactUpdateRequest struct { + // Artifact ID (`art_` prefix). Also the key of the public-share link. + ArtifactID string `json:"artifact_id" toon:"artifact_id"` + // Transfer target scope. `0` moves the artifact to personal scope (only the creator can manage it); a positive value moves it to a team the caller must belong to. Omit to leave unchanged. + TeamID *int64 `json:"team_id,omitempty" toon:"team_id,omitempty"` + // New title. Trimmed; must be non-empty when provided. Omit to leave unchanged. + Title *string `json:"title,omitempty" toon:"title,omitempty"` +} + // AssignIncidentRequest is generated from the Flashduty OpenAPI schema. type AssignIncidentRequest struct { // Assign target; at least one of `person_ids` and `escalate_rule_id` must be set. @@ -2138,6 +2244,14 @@ type CreateStatusPageChangeTimelineRequest struct { Status string `json:"status" toon:"status"` } +// CreateStatusPageDraftRequest is generated from the Flashduty OpenAPI schema. +type CreateStatusPageDraftRequest struct { + // Draft payload, stored verbatim, up to 64 KB serialized. Validated fields: `page_id`, `type` (`incident` or `maintenance`), `name`, `message`; optional `change_id` (append an update to an existing event when > 0), `status`, `affected_components`, and `start_time`/`end_time` (Unix epoch seconds, new maintenance only). + Draft map[string]any `json:"draft" toon:"draft"` + // Opaque marker of the drafting origin, e.g. `ai_sre:sess_xxx`. Up to 64 characters. + Source string `json:"source,omitempty" toon:"source,omitempty"` +} + // CreateStatusPageRequest is generated from the Flashduty OpenAPI schema. type CreateStatusPageRequest struct { // Get-in-touch contact, such as a mailto or website URL. @@ -6248,6 +6362,52 @@ type PreviewTemplateResponse struct { Success bool `json:"success" toon:"success"` } +// PublishedArtifactItem is generated from the Flashduty OpenAPI schema. +type PublishedArtifactItem struct { + // Artifact ID (`art_` prefix). Also the key of the public-share link. + ArtifactID string `json:"artifact_id" toon:"artifact_id"` + // Whether the caller may manage this artifact (rename, transfer, delete, share): the creator, any member of the owning team, or a manager of the source session. + CanEdit bool `json:"can_edit" toon:"can_edit"` + // MIME type of the file. + ContentType string `json:"content_type" toon:"content_type"` + // Unix timestamp in milliseconds when the artifact was published. + CreatedAt TimestampMilli `json:"created_at" toon:"created_at"` + // Creator's display name. + CreatorName string `json:"creator_name" toon:"creator_name"` + // Presented-file ID (`pf_` prefix) currently holding the artifact's bytes. Changes on every republish. + FileID string `json:"file_id" toon:"file_id"` + // Whether the caller is the creator. + IsMine bool `json:"is_mine" toon:"is_mine"` + // Underlying file name including extension. + Name string `json:"name" toon:"name"` + // Person (member) ID of the creator. + PersonID int64 `json:"person_id" toon:"person_id"` + // Anonymous public link — a console `/share/artifact/` page served entirely from CDN. Present only while shared; anyone with the link can view it, no login required. + PublicURL string `json:"public_url" toon:"public_url"` + // Source session ID (`sess_` prefix) that produced the file. + SessionID string `json:"session_id" toon:"session_id"` + // Source session's title. Omitted when the session has been deleted. + SessionTitle string `json:"session_title" toon:"session_title"` + // Whether anonymous public sharing is on. Omitted when false. + ShareEnabled bool `json:"share_enabled" toon:"share_enabled"` + // Presented-file ID the public snapshot was materialized from. When `share_enabled` is true and `file_id` differs from `share_file_id`, the public snapshot is stale — call `/safari/artifact/gallery/share/sync` to refresh it. + ShareFileID string `json:"share_file_id" toon:"share_file_id"` + // Unix timestamp in milliseconds of the last share enable or snapshot sync. Present only while shared. + SharedAt TimestampMilli `json:"shared_at" toon:"shared_at"` + // Person ID of the member who enabled sharing. Present only while shared. + SharedBy int64 `json:"shared_by" toon:"shared_by"` + // File size in bytes. + Size int64 `json:"size" toon:"size"` + // Owning team ID. `0` means a personal artifact (creator-only management); a positive value means team-owned. + TeamID int64 `json:"team_id" toon:"team_id"` + // Owning team's display name. Omitted for personal artifacts. + TeamName string `json:"team_name" toon:"team_name"` + // Display title in the gallery. + Title string `json:"title" toon:"title"` + // Unix timestamp in milliseconds when the artifact was last updated (rename, transfer, or republish). + UpdatedAt TimestampMilli `json:"updated_at" toon:"updated_at"` +} + // QueryDataRequest is generated from the Flashduty OpenAPI schema. type QueryDataRequest struct { // Optional consistency check. Must equal the authenticated account when supplied; mismatched values are rejected. Business execution always uses the authenticated account. @@ -9316,6 +9476,22 @@ type SessionTokenUsage struct { ReasoningTokens int64 `json:"reasoning_tokens" toon:"reasoning_tokens"` } +// SignedUrLs is generated from the Flashduty OpenAPI schema. +type SignedUrLs struct { + // MIME type of the file. + ContentType string `json:"content_type" toon:"content_type"` + // Relative URL (`/safari/artifact/stream?...`) that serves the file as an attachment. Prepend the API base `https://api.flashcat.cloud` before use; expires with `expires_in`. + DownloadURL string `json:"download_url" toon:"download_url"` + // Validity of both URLs in seconds (300). + ExpiresIn int64 `json:"expires_in" toon:"expires_in"` + // File name including extension. + Name string `json:"name" toon:"name"` + // Same as `download_url` but served inline for browser preview. + PreviewURL string `json:"preview_url" toon:"preview_url"` + // File size in bytes. + Size int64 `json:"size" toon:"size"` +} + // SilenceRuleItem is generated from the Flashduty OpenAPI schema. type SilenceRuleItem struct { // ID of the account the rule belongs to. @@ -9783,6 +9959,14 @@ type StatusPageComponentItem struct { SectionID string `json:"section_id" toon:"section_id"` } +// StatusPageDraftCreateResponse is generated from the Flashduty OpenAPI schema. +type StatusPageDraftCreateResponse struct { + // Creation time in Unix epoch seconds. + CreatedAt Timestamp `json:"created_at" toon:"created_at"` + // Draft ID matching `draft_[A-Za-z0-9]{22}`; the console review link carries it. + DraftID string `json:"draft_id" toon:"draft_id"` +} + // StatusPageInfoResponse is generated from the Flashduty OpenAPI schema. type StatusPageInfoResponse struct { // Components tracked on the status page. @@ -11916,6 +12100,14 @@ type CreateEscalationRuleRequestLayersItemTargetWebhooksItem struct { Type string `json:"type" toon:"type"` } +// ArtifactsReadStreamRequest holds the query parameters for Download or preview a file. +type ArtifactsReadStreamRequest struct { + // Signed token issued by `POST /safari/artifact/sign`. Bound to the calling account and person; valid for 5 minutes. + T string `url:"t"` + // `download` (default) serves the file as an attachment; `preview` serves it inline for browser display. Any other value falls back to `download`. + Mode string `url:"mode,omitempty"` +} + // IncidentsPostMortemInfoRequest holds the query parameters for Get post-mortem. type IncidentsPostMortemInfoRequest struct { // Post-mortem ID. Deterministic hash derived from account ID and the set of linked incident IDs. diff --git a/openapi/openapi.en.json b/openapi/openapi.en.json index eb3cc92..1a90df8 100644 --- a/openapi/openapi.en.json +++ b/openapi/openapi.en.json @@ -170,6 +170,10 @@ }, { "name": "AI SRE/Knowledge" + }, + { + "name": "AI SRE/Artifacts", + "description": "AI SRE artifact gallery — publish, browse, and publicly share agent-produced files." } ], "paths": { @@ -12224,6 +12228,92 @@ ] } }, + "/status-page/draft/create": { + "post": { + "operationId": "statusPageDraftCreate", + "summary": "Create status page draft", + "description": "Store a status page event draft so a human can review and publish it from the console.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The `draft` payload is stored verbatim (up to 64 KB); the console publish form reads it back to prefill the event.\n- A draft lives for 30 days and is consumed exactly once when the event is published.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/status-pages/status-page-draft-create", + "metadata": { + "sidebarTitle": "Create status page draft" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageDraftCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "draft_id": "draft_3xK9mQ2vN7pR4wT8yH1sJ5", + "created_at": 1788000000 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateStatusPageDraftRequest" + }, + "example": { + "draft": { + "v": 1, + "page_id": 5750613685214, + "type": "incident", + "name": "Web Console Degraded Performance", + "message": "We are investigating degraded performance affecting the web console.", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ] + }, + "source": "ai_sre:sess_01KC3H2A9ZQ8W7E6R5T4Y3U2I1" + } + } + } + } + } + }, "/status-page/change/create": { "post": { "operationId": "statusPageChangeCreate", @@ -21087,7 +21177,7 @@ }, "responses": { "200": { - "description": "OK", + "description": "Success", "content": { "application/json": { "schema": { @@ -30728,6 +30818,961 @@ } } } + }, + "/safari/artifact/gallery/list": { + "post": { + "operationId": "artifact-read-list", + "summary": "List artifacts", + "description": "List published artifacts visible to the caller, with pagination and title search.", + "tags": [ + "AI SRE/Artifacts" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `scope` selects `all` (default — the caller's own personal artifacts plus every team the caller belongs to), `personal` (only the caller's own), or `team` (only team-owned artifacts of the caller's teams).\n- `team_ids` narrows further to specific teams, intersected with the caller's visibility — teams the caller does not belong to return nothing.\n- Default sort is `updated_at` descending; set `orderby` to `created_at` to change the field and `asc: true` to flip direction.\n- For an `app_key` call, visibility is evaluated against the key owner's identity — the list shows that member's personal artifacts and their teams' artifacts.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-read-list", + "metadata": { + "sidebarTitle": "List artifacts" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactListRequest" + }, + "example": { + "scope": "all", + "page": 1, + "limit": 20 + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ArtifactListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析", + "team_id": 2477033058131, + "team_name": "研发团队", + "person_id": 2476444212131, + "creator_name": "yushuangyu", + "is_mine": true, + "can_edit": true, + "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", + "session_title": "分析海力士财报并发布报告", + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "name": "sk-hynix-q2-2026-report.html", + "size": 18996, + "content_type": "text/html", + "created_at": 1785293373899, + "updated_at": 1785747910219, + "share_enabled": true, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "shared_by": 3790925372131, + "shared_at": 1785747928665, + "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB" + }, + { + "artifact_id": "art_CWQzDU2PXSRJvKDhQbuMKu", + "title": "rum_recommendation", + "team_id": 2477033058131, + "team_name": "研发团队", + "person_id": 3790925372131, + "creator_name": "牛伟利", + "is_mine": false, + "can_edit": true, + "session_id": "sess_QXUC9C2PYWP5EE7vETR3UD", + "session_title": "生成 RUM 文档多格式", + "file_id": "pf_Jnc4E5YBcWLGzunB4ntP9s", + "name": "rum_recommendation.pdf", + "size": 137107, + "content_type": "application/pdf", + "created_at": 1785229432881, + "updated_at": 1785741344822 + } + ], + "total": 17 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/get": { + "post": { + "operationId": "artifact-read-get", + "summary": "Get artifact detail", + "description": "Get a single published artifact by ID.", + "tags": [ + "AI SRE/Artifacts" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Visibility is account-wide: any valid `app_key` can read any artifact in the account. `is_mine` and `can_edit` are computed relative to the key owner.\n- When `share_enabled` is true and `file_id` differs from `share_file_id`, the public snapshot is stale — refresh it with `/safari/artifact/gallery/share/sync`.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-read-get", + "metadata": { + "sidebarTitle": "Get artifact detail" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactIdRequest" + }, + "example": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublishedArtifactItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析", + "team_id": 2477033058131, + "team_name": "研发团队", + "person_id": 2476444212131, + "creator_name": "yushuangyu", + "is_mine": true, + "can_edit": true, + "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", + "session_title": "分析海力士财报并发布报告", + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "name": "sk-hynix-q2-2026-report.html", + "size": 18996, + "content_type": "text/html", + "created_at": 1785293373899, + "updated_at": 1785747910219, + "share_enabled": true, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "shared_by": 3790925372131, + "shared_at": 1785747928665, + "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/file-state": { + "post": { + "operationId": "artifact-read-get-file-state", + "summary": "Get file publish state", + "description": "Check which presented files already have a live published artifact.", + "tags": [ + "AI SRE/Artifacts" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- At most 50 `file_ids` per call; duplicates and empty strings are ignored.\n- Files with no live published artifact are simply absent from `items` — match results by the echoed `file_id`.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-read-get-file-state", + "metadata": { + "sidebarTitle": "Get file publish state" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactFileStateRequest" + }, + "example": { + "file_ids": [ + "pf_SdhEA5fbZJGnHzwrNJMMSB", + "pf_9kLm2nQpRsTuVwXyZaBcDe" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ArtifactFileStateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析", + "gallery_path": "/ai-sre/artifacts/art_VnfrWic8UbB9q3EfYR4Gmg" + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/sign": { + "post": { + "operationId": "artifact-read-sign", + "summary": "Create signed file URLs", + "description": "Create short-lived signed URLs to download or preview a presented file.", + "tags": [ + "AI SRE/Artifacts" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Both URLs expire after `expires_in` seconds (300). Sign again to get fresh URLs.\n- Returned URLs are relative — prepend `https://api.flashcat.cloud` before use, then follow them with `GET /safari/artifact/stream`.\n- The signed token is bound to the calling account and the app_key owner's identity, so a leaked URL does not work for another account or member.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-read-sign", + "metadata": { + "sidebarTitle": "Create signed file URLs" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactSignRequest" + }, + "example": { + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SignedURLs" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "download_url": "/safari/artifact/stream?mode=download&t=cGZfU2RoRUE1ZmJaSkduSHp3ck5KTU1TQnxzZXNzX1ZDYlZQWnJxOVlveUJ1OHNOQ21xVXl8MjQ1MTAwMjc1MTEzMXwyNDc2NDQ0MjEyMTMxfDB8MHwxNzg4NTI5NjI2NTU0.hPQHab0MBNbnrHYwc6VwDJbGonIamfWUr0yeSmLHYAs", + "preview_url": "/safari/artifact/stream?mode=preview&t=cGZfU2RoRUE1ZmJaSkduSHp3ck5KTU1TQnxzZXNzX1ZDYlZQWnJxOVlveUJ1OHNOQ21xVXl8MjQ1MTAwMjc1MTEzMXwyNDc2NDQ0MjEyMTMxfDB8MHwxNzg4NTI5NjI2NTU0.hPQHab0MBNbnrHYwc6VwDJbGonIamfWUr0yeSmLHYAs", + "expires_in": 300, + "name": "sk-hynix-q2-2026-report.html", + "size": 18996, + "content_type": "text/html" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/stream": { + "get": { + "operationId": "artifact-read-stream", + "summary": "Download or preview a file", + "description": "Download or preview a file's bytes using a signed token.", + "tags": [ + "AI SRE/Artifacts" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Success has two forms: a `302` redirect to a short-lived presigned object-storage URL (files stored in S3-compatible storage), or a `200` binary stream (files hosted on a self-hosted runner). Follow redirects.\n- Responses carry `Cache-Control: private, no-store` — they are never cached by the gateway.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-read-stream", + "metadata": { + "sidebarTitle": "Download or preview a file" + } + }, + "parameters": [ + { + "name": "t", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Signed token issued by `POST /safari/artifact/sign`. Bound to the calling account and person; valid for 5 minutes." + }, + { + "name": "mode", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "download", + "preview" + ], + "default": "download" + }, + "description": "`download` (default) serves the file as an attachment; `preview` serves it inline for browser display. Any other value falls back to `download`." + } + ], + "responses": { + "200": { + "description": "File bytes, proxied, when the file is hosted on a self-hosted runner. Content-Disposition follows `mode`.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "302": { + "description": "Redirect to a short-lived presigned object-storage URL when the file lives in S3-compatible storage. Follow the `Location` header; no body." + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/publish-from-file": { + "post": { + "operationId": "artifact-write-publish", + "summary": "Publish file as artifact", + "description": "Publish a session-produced file to the artifact gallery.", + "tags": [ + "AI SRE/Artifacts" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Allowed file types: HTML/Markdown, images, PDF, text/data/code files, and zip/tar archives, matched by extension. Files over 16 MiB are rejected.\n- Publishing is an upsert keyed by the source session and workspace path — republishing the same file replaces the artifact's bytes under a fresh `file_id`, which makes an existing public snapshot stale until synced.\n- The artifact inherits personal/team scope from the source session; move it afterwards with `/safari/artifact/gallery/update` if needed.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-publish", + "metadata": { + "sidebarTitle": "Publish file as artifact" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactPublishFromFileRequest" + }, + "example": { + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "title": "SK 海力士 2026 Q2 财报深度分析" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ArtifactPublishResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析", + "gallery_path": "/ai-sre/artifacts/art_VnfrWic8UbB9q3EfYR4Gmg" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/update": { + "post": { + "operationId": "artifact-write-update", + "summary": "Update artifact", + "description": "Rename an artifact or transfer it between personal and team scope.", + "tags": [ + "AI SRE/Artifacts" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Only the provided fields change — omit `title` or `team_id` to leave them unchanged.\n- `team_id: 0` moves the artifact to personal scope (only the creator can manage it); a positive `team_id` requires the caller (for `app_key` calls, the key owner) to be a member of that team.\n- Returns the full artifact after the update.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-update", + "metadata": { + "sidebarTitle": "Update artifact" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactUpdateRequest" + }, + "example": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析(终稿)" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublishedArtifactItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析(终稿)", + "team_id": 2477033058131, + "team_name": "研发团队", + "person_id": 2476444212131, + "creator_name": "yushuangyu", + "is_mine": true, + "can_edit": true, + "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", + "session_title": "分析海力士财报并发布报告", + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "name": "sk-hynix-q2-2026-report.html", + "size": 18996, + "content_type": "text/html", + "created_at": 1785293373899, + "updated_at": 1785829000000, + "share_enabled": true, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "shared_by": 3790925372131, + "shared_at": 1785747928665, + "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/delete": { + "post": { + "operationId": "artifact-write-delete", + "summary": "Remove artifact from gallery", + "description": "Detach an artifact from the gallery; the source file stays with its session.", + "tags": [ + "AI SRE/Artifacts" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- This is a detach, not a byte delete: the underlying presented file stays with the source session and can be published again.\n- If public sharing was enabled, the public objects are destroyed in the same operation and the link stops resolving.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-delete", + "metadata": { + "sidebarTitle": "Remove artifact from gallery" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactIdRequest" + }, + "example": { + "artifact_id": "art_CWQzDU2PXSRJvKDhQbuMKu" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "type": "null", + "description": "Always null on success." + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": null + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/share/enable": { + "post": { + "operationId": "artifact-write-share-enable", + "summary": "Enable public sharing", + "description": "Turn on anonymous public sharing for an artifact and return its public link.", + "tags": [ + "AI SRE/Artifacts" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The public link is anonymous — anyone with it can view the content, and the link may be forwarded. Content is copied to public CDN objects; the gallery API is not involved when the link is viewed.\n- Idempotent: enabling an already-shared artifact returns the existing link unchanged, and re-enabling after a revoke brings the same link back — the link is keyed by artifact ID.\n- Artifacts over 16 MiB cannot be shared; the call fails with `InvalidParameter`.\n- Sharing is a snapshot: later republishes do not update the public content until you call `/safari/artifact/gallery/share/sync`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-share-enable", + "metadata": { + "sidebarTitle": "Enable public sharing" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactIdRequest" + }, + "example": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ArtifactShareState" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "share_enabled": true, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "shared_by": 2476444212131, + "shared_at": 1785747928665 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/share/sync": { + "post": { + "operationId": "artifact-write-share-sync", + "summary": "Update shared snapshot", + "description": "Refresh the public snapshot of a shared artifact with its latest content.", + "tags": [ + "AI SRE/Artifacts" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Fails with `InvalidParameter` when sharing is not enabled — enable it first.\n- The link never changes; only the snapshot bytes and `shared_at` are refreshed.\n- Use `share_file_id != file_id` on the artifact detail to detect a stale snapshot before syncing.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-share-sync", + "metadata": { + "sidebarTitle": "Update shared snapshot" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactIdRequest" + }, + "example": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ArtifactShareState" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "share_enabled": true, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "shared_by": 2476444212131, + "shared_at": 1785829900000 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/share/revoke": { + "post": { + "operationId": "artifact-write-share-revoke", + "summary": "Revoke public sharing", + "description": "Turn off public sharing; the link stops resolving immediately.", + "tags": [ + "AI SRE/Artifacts" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The public CDN objects are deleted, so the link stops resolving; this is a no-op when the artifact is not shared.\n- Re-enabling later returns the same `public_url` — the link is keyed by artifact ID, so revoke is not a way to rotate the link.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-share-revoke", + "metadata": { + "sidebarTitle": "Revoke public sharing" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactIdRequest" + }, + "example": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "type": "null", + "description": "Always null on success." + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": null + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } } }, "components": { @@ -42665,6 +43710,25 @@ } } }, + "StatusPageDraftCreateResponse": { + "type": "object", + "description": "Result of storing a status page draft.", + "required": [ + "draft_id", + "created_at" + ], + "properties": { + "draft_id": { + "type": "string", + "description": "Draft ID matching `draft_[A-Za-z0-9]{22}`; the console review link carries it." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time in Unix epoch seconds." + } + } + }, "ImportStatusPageSubscribersRequest": { "type": "object", "description": "Parameters for bulk-importing subscribers. Each subscriber must have a non-empty `recipient` (≤255 chars) and subscribe to at least one component, change, or set `all: true`.", @@ -43195,6 +44259,24 @@ } } }, + "CreateStatusPageDraftRequest": { + "type": "object", + "description": "Parameters for storing a status page draft. The `draft` payload is stored verbatim; only the validated fields listed below are interpreted.", + "required": [ + "draft" + ], + "properties": { + "draft": { + "type": "object", + "description": "Draft payload, stored verbatim, up to 64 KB serialized. Validated fields: `page_id`, `type` (`incident` or `maintenance`), `name`, `message`; optional `change_id` (append an update to an existing event when > 0), `status`, `affected_components`, and `start_time`/`end_time` (Unix epoch seconds, new maintenance only)." + }, + "source": { + "type": "string", + "maxLength": 64, + "description": "Opaque marker of the drafting origin, e.g. `ai_sre:sess_xxx`. Up to 64 characters." + } + } + }, "RuleListRequest": { "type": "object", "description": "Filter parameter for listing rules in a folder.", @@ -60497,6 +61579,424 @@ "description": "When false (default), deletion fails with a `ReferenceExist` error listing the members that still hold the role in `data.refs`. When true, the role is first revoked from all holders and then deleted." } } + }, + "ArtifactIdRequest": { + "type": "object", + "description": "Identify one gallery artifact.", + "properties": { + "artifact_id": { + "type": "string", + "description": "Artifact ID (`art_` prefix). Also the key of the public-share link." + } + }, + "required": [ + "artifact_id" + ] + }, + "ArtifactListRequest": { + "type": "object", + "description": "Filter and paginate the artifact gallery.", + "properties": { + "scope": { + "type": "string", + "enum": [ + "all", + "personal", + "team" + ], + "default": "all", + "description": "Visibility scope. `all` (default) lists the caller's own personal artifacts plus artifacts of every team the caller belongs to; `personal` lists only the caller's own; `team` lists only team-owned artifacts of the caller's teams." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Restrict to artifacts owned by these team IDs, intersected with the caller's visibility — teams the caller does not belong to silently return nothing." + }, + "query": { + "type": "string", + "description": "Case-insensitive substring match on the artifact title." + }, + "page": { + "type": "integer", + "default": 1, + "minimum": 1, + "description": "Page number, 1-based." + }, + "limit": { + "type": "integer", + "default": 20, + "maximum": 100, + "description": "Page size. Defaults to 20; capped at 100." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "Sort field: `created_at` or `updated_at`. Empty means `updated_at` descending." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when true, descending when false. Applies only when `orderby` is set." + } + } + }, + "ArtifactListResponse": { + "type": "object", + "description": "A page of gallery artifacts.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublishedArtifactItem" + }, + "description": "Artifacts on this page." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of artifacts matching the filter across all pages." + } + } + }, + "PublishedArtifactItem": { + "type": "object", + "description": "One published artifact in the gallery. Time fields are Unix timestamps in milliseconds.", + "properties": { + "artifact_id": { + "type": "string", + "description": "Artifact ID (`art_` prefix). Also the key of the public-share link." + }, + "title": { + "type": "string", + "description": "Display title in the gallery." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID. `0` means a personal artifact (creator-only management); a positive value means team-owned." + }, + "team_name": { + "type": "string", + "description": "Owning team's display name. Omitted for personal artifacts." + }, + "person_id": { + "type": "integer", + "format": "int64", + "description": "Person (member) ID of the creator." + }, + "creator_name": { + "type": "string", + "description": "Creator's display name." + }, + "is_mine": { + "type": "boolean", + "description": "Whether the caller is the creator." + }, + "can_edit": { + "type": "boolean", + "description": "Whether the caller may manage this artifact (rename, transfer, delete, share): the creator, any member of the owning team, or a manager of the source session." + }, + "session_id": { + "type": "string", + "description": "Source session ID (`sess_` prefix) that produced the file." + }, + "session_title": { + "type": "string", + "description": "Source session's title. Omitted when the session has been deleted." + }, + "file_id": { + "type": "string", + "description": "Presented-file ID (`pf_` prefix) currently holding the artifact's bytes. Changes on every republish." + }, + "name": { + "type": "string", + "description": "Underlying file name including extension." + }, + "size": { + "type": "integer", + "format": "int64", + "description": "File size in bytes." + }, + "content_type": { + "type": "string", + "description": "MIME type of the file." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds when the artifact was published." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds when the artifact was last updated (rename, transfer, or republish)." + }, + "share_enabled": { + "type": "boolean", + "description": "Whether anonymous public sharing is on. Omitted when false." + }, + "public_url": { + "type": "string", + "description": "Anonymous public link — a console `/share/artifact/` page served entirely from CDN. Present only while shared; anyone with the link can view it, no login required." + }, + "shared_by": { + "type": "integer", + "format": "int64", + "description": "Person ID of the member who enabled sharing. Present only while shared." + }, + "shared_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds of the last share enable or snapshot sync. Present only while shared." + }, + "share_file_id": { + "type": "string", + "description": "Presented-file ID the public snapshot was materialized from. When `share_enabled` is true and `file_id` differs from `share_file_id`, the public snapshot is stale — call `/safari/artifact/gallery/share/sync` to refresh it." + } + }, + "required": [ + "artifact_id", + "title", + "team_id", + "person_id", + "creator_name", + "is_mine", + "can_edit", + "session_id", + "file_id", + "name", + "size", + "content_type", + "created_at", + "updated_at" + ] + }, + "ArtifactUpdateRequest": { + "type": "object", + "description": "Partial update of a gallery artifact. Only provided fields change.", + "properties": { + "artifact_id": { + "type": "string", + "description": "Artifact ID (`art_` prefix). Also the key of the public-share link." + }, + "title": { + "type": [ + "string", + "null" + ], + "description": "New title. Trimmed; must be non-empty when provided. Omit to leave unchanged." + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "Transfer target scope. `0` moves the artifact to personal scope (only the creator can manage it); a positive value moves it to a team the caller must belong to. Omit to leave unchanged." + } + }, + "required": [ + "artifact_id" + ] + }, + "ArtifactPublishFromFileRequest": { + "type": "object", + "description": "Publish a session-produced file to the artifact gallery.", + "properties": { + "file_id": { + "type": "string", + "description": "Presented-file ID (`pf_` prefix) of a file produced in a session, as shown on the file card in chat." + }, + "title": { + "type": "string", + "description": "Gallery display title. Trimmed; must be non-empty." + } + }, + "required": [ + "file_id", + "title" + ] + }, + "ArtifactPublishResponse": { + "type": "object", + "description": "Result of publishing a file to the gallery.", + "properties": { + "artifact_id": { + "type": "string", + "description": "Artifact ID (`art_` prefix). Also the key of the public-share link." + }, + "title": { + "type": "string", + "description": "Gallery display title." + }, + "gallery_path": { + "type": "string", + "description": "Console-relative path of the artifact page: `/ai-sre/artifacts/`." + } + }, + "required": [ + "artifact_id", + "title", + "gallery_path" + ] + }, + "ArtifactFileStateRequest": { + "type": "object", + "description": "Probe publish state for a batch of presented files.", + "properties": { + "file_ids": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 50, + "minItems": 1, + "description": "Presented-file IDs (`pf_` prefix) to probe. At most 50 per call; duplicates and empty strings are ignored." + } + }, + "required": [ + "file_ids" + ] + }, + "ArtifactFileStateItem": { + "type": "object", + "description": "Live publish state of one presented file. Returned only for files that have a live published artifact.", + "properties": { + "file_id": { + "type": "string", + "description": "Echoes the requested presented-file ID." + }, + "artifact_id": { + "type": "string", + "description": "Artifact ID (`art_` prefix). Also the key of the public-share link." + }, + "title": { + "type": "string", + "description": "Gallery display title of the published artifact." + }, + "gallery_path": { + "type": "string", + "description": "Console-relative path of the artifact page: `/ai-sre/artifacts/`." + } + }, + "required": [ + "file_id", + "artifact_id", + "title", + "gallery_path" + ] + }, + "ArtifactFileStateResponse": { + "type": "object", + "description": "Publish states keyed by file.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArtifactFileStateItem" + }, + "description": "One entry per requested file that has a live published artifact; files without one are omitted." + } + }, + "required": [ + "items" + ] + }, + "ArtifactShareState": { + "type": "object", + "description": "Public-share state of an artifact.", + "properties": { + "artifact_id": { + "type": "string", + "description": "Artifact ID (`art_` prefix). Also the key of the public-share link." + }, + "share_enabled": { + "type": "boolean", + "description": "Always `true` in this response." + }, + "public_url": { + "type": "string", + "description": "Anonymous public link served entirely from CDN. Anyone with the link can view the content, no login required." + }, + "shared_by": { + "type": "integer", + "format": "int64", + "description": "Person ID of the member who enabled sharing." + }, + "shared_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds of the last share enable or snapshot sync." + } + }, + "required": [ + "artifact_id", + "share_enabled", + "public_url", + "shared_by", + "shared_at" + ] + }, + "ArtifactSignRequest": { + "type": "object", + "description": "Request signed download/preview URLs for a presented file.", + "properties": { + "file_id": { + "type": "string", + "description": "Presented-file ID (`pf_` prefix) to sign." + }, + "share_token": { + "type": "string", + "description": "Optional session share-link token. Needed only when the caller reaches the file through a shared session link rather than account membership." + } + }, + "required": [ + "file_id" + ] + }, + "SignedURLs": { + "type": "object", + "description": "Short-lived signed URLs for downloading or previewing a file.", + "properties": { + "download_url": { + "type": "string", + "description": "Relative URL (`/safari/artifact/stream?...`) that serves the file as an attachment. Prepend the API base `https://api.flashcat.cloud` before use; expires with `expires_in`." + }, + "preview_url": { + "type": "string", + "description": "Same as `download_url` but served inline for browser preview." + }, + "expires_in": { + "type": "integer", + "description": "Validity of both URLs in seconds (300)." + }, + "name": { + "type": "string", + "description": "File name including extension." + }, + "size": { + "type": "integer", + "format": "int64", + "description": "File size in bytes." + }, + "content_type": { + "type": "string", + "description": "MIME type of the file." + } + }, + "required": [ + "download_url", + "preview_url", + "expires_in", + "name", + "size", + "content_type" + ] } } } diff --git a/openapi/openapi.zh.json b/openapi/openapi.zh.json index 8330b09..43e8ac4 100644 --- a/openapi/openapi.zh.json +++ b/openapi/openapi.zh.json @@ -149,7 +149,7 @@ "description": "管理和查询用于 Browser、Android、iOS 错误符号化的 RUM Sourcemap 文件。" }, { - "name": "RUM/Session replay", + "name": "RUM/RUM 会话回放", "description": "查询 RUM 会话的回放元数据与录制分段。" }, { @@ -170,6 +170,10 @@ }, { "name": "AI SRE/知识" + }, + { + "name": "AI SRE/产物", + "description": "AI SRE 产物库 —— 发布、浏览并公开分享智能体生成的文件。" } ], "paths": { @@ -856,7 +860,7 @@ "summary": "获取故障时间线", "description": "获取指定故障的时间线动态,包括状态变更、评论和系统事件。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |\n\n## 使用说明\n\n- 对于 `i_comm` 条目,`detail.comment_type` 在读取时根据当前账户级评论类型定义解析,因此始终反映类型的最新名称和颜色。", @@ -1891,7 +1895,7 @@ "summary": "评论故障", "description": "在故障时间线上添加文字评论。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 要提及成员,在 `comment` 中嵌入形如 `[@显示名](flashduty://ref/member/)` 的 markdown 链接。被提及的成员会收到专门的个人通知,不受 `mute_reply` 影响。\n- 不带链接语法的纯 `@名字` 文本不会形成提及。\n- 服务端会将每个提及的显示名改写为成员的规范名称。", @@ -11254,7 +11258,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/octet-stream": { "schema": { @@ -11428,7 +11432,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/octet-stream": { "schema": { @@ -11597,7 +11601,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/octet-stream": { "schema": { @@ -11757,7 +11761,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/octet-stream": { "schema": { @@ -12224,6 +12228,92 @@ ] } }, + "/status-page/draft/create": { + "post": { + "operationId": "statusPageDraftCreate", + "summary": "创建状态页草稿", + "description": "存储状态页事件草稿,供人工在控制台审核后发布。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 任意有效 `app_key` 均可调用 |\n\n## 使用说明\n\n- `draft` 载荷将被原样存储(最大 64 KB);控制台发布表单会读取它来预填事件内容。\n- 草稿保留 30 天,事件发布时被消费且仅可消费一次。\n- 每次调用都会记录到账户审计日志,请勿在请求字段中写入敏感信息。", + "href": "/zh/api-reference/on-call/status-pages/status-page-draft-create", + "metadata": { + "sidebarTitle": "创建状态页草稿" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageDraftCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "draft_id": "draft_3xK9mQ2vN7pR4wT8yH1sJ5", + "created_at": 1788000000 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateStatusPageDraftRequest" + }, + "example": { + "draft": { + "v": 1, + "page_id": 5750613685214, + "type": "incident", + "name": "Web Console Degraded Performance", + "message": "We are investigating degraded performance affecting the web console.", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ] + }, + "source": "ai_sre:sess_01KC3H2A9ZQ8W7E6R5T4Y3U2I1" + } + } + } + } + } + }, "/status-page/change/create": { "post": { "operationId": "statusPageChangeCreate", @@ -16411,7 +16501,7 @@ }, "responses": { "200": { - "description": "Success. CSV attachment, not a JSON envelope.", + "description": "成功。CSV 附件,非 JSON 信封。", "headers": { "X-Export-Total": { "description": "Total number of issues matching the filters, before the row cap.", @@ -20527,7 +20617,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -20632,7 +20722,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -20717,7 +20807,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -20793,7 +20883,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -20880,7 +20970,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -20976,7 +21066,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -21087,7 +21177,7 @@ }, "responses": { "200": { - "description": "OK", + "description": "成功", "content": { "application/json": { "schema": { @@ -23006,7 +23096,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -23094,7 +23184,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -23173,7 +23263,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -23252,7 +23342,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -23331,7 +23421,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -23431,7 +23521,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -23538,7 +23628,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -23618,7 +23708,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -23743,7 +23833,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -23822,7 +23912,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -23931,7 +24021,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -24046,7 +24136,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -24145,7 +24235,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -24266,7 +24356,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -24373,7 +24463,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -24461,7 +24551,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -24560,7 +24650,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -24639,7 +24729,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -24718,7 +24808,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -24797,7 +24887,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -24889,7 +24979,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -24988,7 +25078,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -25084,7 +25174,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -25227,7 +25317,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -25376,7 +25466,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -25501,7 +25591,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -25580,7 +25670,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -25659,7 +25749,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -25738,7 +25828,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -25838,7 +25928,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -25943,7 +26033,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -26045,7 +26135,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -26131,7 +26221,7 @@ "summary": "查看会话回放元数据", "description": "返回可回放会话记录的应用、设备、会话时间范围及全部视图信息。", "tags": [ - "RUM/Session replay" + "RUM/RUM 会话回放" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若会话不存在,或该会话没有录制回放数据(`session_has_replay` 为 false),返回 `InvalidParameter`。\n- 若该会话时间窗口内未查询到任何视图,返回 `InvalidParameter`。\n- 当 `session_id` 在不同时间窗口内被复用时,可传入 `ts` 加以区分。", @@ -26231,7 +26321,7 @@ "summary": "查询会话回放分段", "description": "分页获取会话录制的回放分段,可返回预签名下载地址或原始数据流。", "tags": [ - "RUM/Session replay" + "RUM/RUM 会话回放" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 当 `url_mode` 为 `false`(默认)时,响应以 `application/x-ndjson` 流式返回——每行是一条解压后的回放分段 JSON 记录——且**不会**包裹在标准信封中;下一页的分页游标改由响应头 `X-Search-After-Ctx` 返回,而非响应体字段。\n- 当 `url_mode` 为 `true` 时,响应为标准 JSON 信封,内含分段的预签名下载地址(1 小时内有效),而非原始字节流。\n- 传入 `ts` 可从该时间点之前最近的一个全量快照分段开始定位,而非从会话起始处分页。\n- `limit` 取值范围 1-99;传入 100 及以上将被拒绝。", @@ -26411,7 +26501,7 @@ "summary": "查询评论类型列表", "description": "获取账户下全部评论类型,按展示位置排序。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |\n\n## 使用说明\n\n- 一次调用返回完整列表,不分页。\n- 每个账户最多可创建 10 个评论类型。", @@ -26504,7 +26594,7 @@ "summary": "创建评论类型", "description": "创建可附加到故障评论的评论类型。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **评论类型管理**(`on-call`) |\n\n## 使用说明\n\n- 新类型追加到展示顺序的末尾。\n- 名称在账户内必须唯一(不区分大小写,忽略首尾空白)。\n- 每个账户最多可创建 10 个评论类型。\n- 该权限默认仅管理员拥有,自定义角色需显式授予。", @@ -26588,7 +26678,7 @@ "summary": "更新评论类型", "description": "更新已有账户评论类型的名称和/或颜色。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **评论类型管理**(`on-call`) |\n\n## 使用说明\n\n- 部分更新 —— 仅修改提供的字段,但 `name` 和 `color` 至少提供一个。\n- 名称在账户内必须保持唯一(不区分大小写,忽略首尾空白)。\n- 该权限默认仅管理员拥有,自定义角色需显式授予。", @@ -26659,7 +26749,7 @@ "summary": "删除评论类型", "description": "删除评论类型。已使用该类型的评论保留文本内容,但不再显示类型标签。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **评论类型管理**(`on-call`) |\n\n## 使用说明\n\n- 硬删除 —— 评论类型被永久移除,无法恢复。\n- 已引用该类型的评论会失去类型标签,其他内容不受影响。\n- 该权限默认仅管理员拥有,自定义角色需显式授予。", @@ -26729,7 +26819,7 @@ "summary": "调整评论类型顺序", "description": "传入账户全部评论类型 ID 的期望顺序,设置评论类型的展示顺序。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **评论类型管理**(`on-call`) |\n\n## 使用说明\n\n- 全量排序 —— `comment_type_ids` 必须包含账户的全部评论类型,每个恰好出现一次,按期望顺序排列。\n- 展示位置从 1 开始重新分配:数组中的第一个 ID 即为位置 1。\n- 该权限默认仅管理员拥有,自定义角色需显式授予。", @@ -26802,7 +26892,7 @@ "summary": "查询跟进事项列表", "description": "查询故障跟进事项(行动项与复盘后续行动),使用游标分页。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |\n\n## 使用说明\n\n- `incident_id`、`post_mortem_id`、`assignee_id` 至少提供一个。\n- 按 `updated_at_seconds` 倒序的游标分页 —— 将上一次响应的 `next_cursor` 作为 `cursor` 传入,直到 `has_more` 为 false。\n- 按 `incident_id` 查询时,同时包含锚定在该故障复盘上的后续行动。\n- 仅按 `assignee_id` 查询时,须为本人或账户管理员。", @@ -26914,7 +27004,7 @@ "summary": "创建跟进事项", "description": "在活动故障上创建行动项,或在其故障复盘上创建后续行动。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 需要 On-call Pro 许可。\n- `action` 锚定活动故障,且不得设置 `post_mortem_id`;`follow_up` 必须设置为关联到 `incident_id` 的故障复盘 ID。\n- 负责人须为已能查看锚定故障或复盘的活跃成员 —— 指派不会授予访问权限。\n- 新添加的负责人会收到通知。\n- 以相同的(`creator`、`idempotency_key`)重试时,返回原事项并标记 `idempotent_replay: true`,不会创建重复事项。\n- 已审计 —— 变更会记录到审计日志。", @@ -27013,7 +27103,7 @@ "summary": "更新跟进事项", "description": "部分更新跟进事项的标题、描述、状态或优先级。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 需要 On-call Pro 许可。\n- 部分更新:未提供的字段保持不变;显式传 `null` 则清空该字段。\n- 乐观锁 —— `version` 必须与事项当前版本一致;不一致返回冲突错误。\n- 负责人、`item_type` 以及故障/复盘锚点不能在此修改 —— 请使用专用接口。\n- 已审计 —— 变更会记录到审计日志。", @@ -27106,7 +27196,7 @@ "summary": "删除跟进事项", "description": "软删除跟进事项。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 需要 On-call Pro 许可。\n- 软删除 —— 事项不再出现在列表中,但数据仍保留。\n- 乐观锁 —— `version` 必须与事项当前版本一致;不一致返回冲突错误。\n- 已审计 —— 变更会记录到审计日志。", @@ -27177,7 +27267,7 @@ "summary": "完成跟进事项", "description": "通过设置客户端自定义的目标状态,将跟进事项标记为完成。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 需要 On-call Pro 许可。\n- 仅当前负责人可以完成跟进事项。\n- `target_status` 为客户端自定义字符串 —— 没有固定状态机。\n- 相同 `idempotency_key` 搭配相同 `target_status` 会幂等重放;相同键搭配不同 `target_status` 将返回错误。\n- 已审计 —— 变更会记录到审计日志。", @@ -27270,7 +27360,7 @@ "summary": "转化跟进事项为复盘后续行动", "description": "将故障行动项原地转化为故障复盘后续行动。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 需要 On-call Pro 许可。\n- 将 `action` 事项原地转化为复盘 `follow_up` —— `work_item_id` 不变。\n- 转化已是 `follow_up` 的事项时返回 `idempotent_replay: true`。\n- 如果故障已存在复盘,转化后的事项会自动绑定到该复盘。\n- 已审计 —— 变更会记录到审计日志。", @@ -27363,7 +27453,7 @@ "summary": "重置跟进事项负责人", "description": "整体替换跟进事项的负责人集合。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 需要 On-call Pro 许可。\n- 整体替换负责人集合 —— 空数组表示清空所有负责人。\n- 仅新添加的负责人会收到通知;移除不通知。\n- 已审计 —— 变更会记录到审计日志。", @@ -27464,7 +27554,7 @@ "summary": "绑定跟进事项到复盘", "description": "将故障下已转化但未绑定的后续行动批量绑定到故障复盘。", "tags": [ - "On-call/Incidents" + "On-call/故障管理" ], "x-mint": { "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 需要 On-call Pro 许可。\n- 一次调用将该故障全部已转化但未绑定的后续行动绑定到指定复盘。\n- `items` 为本次新绑定的批次;不设置 `next_cursor` 和 `has_more`。\n- 通过 `idempotency_key` 幂等 —— 以相同键重试时重放原始结果。\n- 已审计 —— 变更会记录到审计日志。", @@ -29909,7 +29999,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -30019,7 +30109,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -30130,7 +30220,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -30222,7 +30312,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -30316,7 +30406,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -30396,7 +30486,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -30495,7 +30585,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -30582,7 +30672,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -30673,7 +30763,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { @@ -30728,6 +30818,961 @@ } } } + }, + "/safari/artifact/gallery/list": { + "post": { + "operationId": "artifact-read-list", + "summary": "查询产物列表", + "description": "分页查询调用者可见的产物列表,支持按标题搜索。", + "tags": [ + "AI SRE/产物" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `scope` 可选 `all`(默认 —— 调用者自己的个人产物 + 其所属全部团队的产物)、`personal`(仅自己创建的)、`team`(仅所属团队的团队产物)。\n- `team_ids` 可在可见范围内进一步限定团队 —— 调用者不属于的团队不会有任何返回。\n- 默认按 `updated_at` 倒序;设置 `orderby` 为 `created_at` 可更换排序字段,`asc: true` 改为升序。\n- 使用 `app_key` 调用时,可见范围按 key 所属成员的身份计算 —— 返回该成员的个人产物及其所在团队的产物。\n", + "href": "/zh/api-reference/ai-sre/artifacts/artifact-read-list", + "metadata": { + "sidebarTitle": "查询产物列表" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactListRequest" + }, + "example": { + "scope": "all", + "page": 1, + "limit": 20 + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ArtifactListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析", + "team_id": 2477033058131, + "team_name": "研发团队", + "person_id": 2476444212131, + "creator_name": "yushuangyu", + "is_mine": true, + "can_edit": true, + "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", + "session_title": "分析海力士财报并发布报告", + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "name": "sk-hynix-q2-2026-report.html", + "size": 18996, + "content_type": "text/html", + "created_at": 1785293373899, + "updated_at": 1785747910219, + "share_enabled": true, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "shared_by": 3790925372131, + "shared_at": 1785747928665, + "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB" + }, + { + "artifact_id": "art_CWQzDU2PXSRJvKDhQbuMKu", + "title": "rum_recommendation", + "team_id": 2477033058131, + "team_name": "研发团队", + "person_id": 3790925372131, + "creator_name": "牛伟利", + "is_mine": false, + "can_edit": true, + "session_id": "sess_QXUC9C2PYWP5EE7vETR3UD", + "session_title": "生成 RUM 文档多格式", + "file_id": "pf_Jnc4E5YBcWLGzunB4ntP9s", + "name": "rum_recommendation.pdf", + "size": 137107, + "content_type": "application/pdf", + "created_at": 1785229432881, + "updated_at": 1785741344822 + } + ], + "total": 17 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/get": { + "post": { + "operationId": "artifact-read-get", + "summary": "获取产物详情", + "description": "根据产物 ID 获取产物详情。", + "tags": [ + "AI SRE/产物" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 可见范围为整个账号:任何有效 `app_key` 都能读取账号内任意产物。`is_mine` 和 `can_edit` 相对于 key 所属成员计算。\n- 当 `share_enabled` 为 true 且 `file_id` 与 `share_file_id` 不一致时,公开快照已过期 —— 调用 `/safari/artifact/gallery/share/sync` 刷新。\n", + "href": "/zh/api-reference/ai-sre/artifacts/artifact-read-get", + "metadata": { + "sidebarTitle": "获取产物详情" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactIdRequest" + }, + "example": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublishedArtifactItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析", + "team_id": 2477033058131, + "team_name": "研发团队", + "person_id": 2476444212131, + "creator_name": "yushuangyu", + "is_mine": true, + "can_edit": true, + "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", + "session_title": "分析海力士财报并发布报告", + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "name": "sk-hynix-q2-2026-report.html", + "size": 18996, + "content_type": "text/html", + "created_at": 1785293373899, + "updated_at": 1785747910219, + "share_enabled": true, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "shared_by": 3790925372131, + "shared_at": 1785747928665, + "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/file-state": { + "post": { + "operationId": "artifact-read-get-file-state", + "summary": "查询文件发布状态", + "description": "批量查询文件是否已发布为产物。", + "tags": [ + "AI SRE/产物" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 单次最多传入 50 个 `file_ids`;重复和空字符串会被忽略。\n- 没有已发布产物的文件不会出现在 `items` 中 —— 按回显的 `file_id` 对应结果。\n", + "href": "/zh/api-reference/ai-sre/artifacts/artifact-read-get-file-state", + "metadata": { + "sidebarTitle": "查询文件发布状态" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactFileStateRequest" + }, + "example": { + "file_ids": [ + "pf_SdhEA5fbZJGnHzwrNJMMSB", + "pf_9kLm2nQpRsTuVwXyZaBcDe" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ArtifactFileStateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析", + "gallery_path": "/ai-sre/artifacts/art_VnfrWic8UbB9q3EfYR4Gmg" + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/sign": { + "post": { + "operationId": "artifact-read-sign", + "summary": "签发文件访问链接", + "description": "为文件签发短期有效的下载/预览链接。", + "tags": [ + "AI SRE/产物" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 两个链接在 `expires_in` 秒(300 秒)后过期,需重新签发获取新链接。\n- 返回的是相对链接 —— 使用前拼接 `https://api.flashcat.cloud`,然后以 `GET /safari/artifact/stream` 访问。\n- 签名令牌与调用账号及 app_key 所属成员身份绑定 —— 链接泄露给其他账号或成员不可用。\n", + "href": "/zh/api-reference/ai-sre/artifacts/artifact-read-sign", + "metadata": { + "sidebarTitle": "签发文件访问链接" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactSignRequest" + }, + "example": { + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SignedURLs" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "download_url": "/safari/artifact/stream?mode=download&t=cGZfU2RoRUE1ZmJaSkduSHp3ck5KTU1TQnxzZXNzX1ZDYlZQWnJxOVlveUJ1OHNOQ21xVXl8MjQ1MTAwMjc1MTEzMXwyNDc2NDQ0MjEyMTMxfDB8MHwxNzg4NTI5NjI2NTU0.hPQHab0MBNbnrHYwc6VwDJbGonIamfWUr0yeSmLHYAs", + "preview_url": "/safari/artifact/stream?mode=preview&t=cGZfU2RoRUE1ZmJaSkduSHp3ck5KTU1TQnxzZXNzX1ZDYlZQWnJxOVlveUJ1OHNOQ21xVXl8MjQ1MTAwMjc1MTEzMXwyNDc2NDQ0MjEyMTMxfDB8MHwxNzg4NTI5NjI2NTU0.hPQHab0MBNbnrHYwc6VwDJbGonIamfWUr0yeSmLHYAs", + "expires_in": 300, + "name": "sk-hynix-q2-2026-report.html", + "size": 18996, + "content_type": "text/html" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/stream": { + "get": { + "operationId": "artifact-read-stream", + "summary": "下载或预览文件", + "description": "使用签名令牌下载或预览文件内容。", + "tags": [ + "AI SRE/产物" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **100 次/分钟**;**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 成功响应有两种形式:302 重定向到短期有效的对象存储预签名 URL(存储在 S3 兼容存储中的文件),或 200 二进制流(托管在自托管 runner 上的文件)。请跟随重定向。\n- 响应携带 `Cache-Control: private, no-store` —— 网关不会缓存。\n", + "href": "/zh/api-reference/ai-sre/artifacts/artifact-read-stream", + "metadata": { + "sidebarTitle": "下载或预览文件" + } + }, + "parameters": [ + { + "name": "t", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "由 `POST /safari/artifact/sign` 签发的令牌。与调用账号及成员绑定,有效期 5 分钟。" + }, + { + "name": "mode", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "download", + "preview" + ], + "default": "download" + }, + "description": "`download`(默认)以附件形式返回文件;`preview` 以 inline 方式返回供浏览器预览。其他取值按 `download` 处理。" + } + ], + "responses": { + "200": { + "description": "文件内容流。当文件托管在自托管 runner 上时由服务端代理返回,Content-Disposition 随 `mode` 变化。", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "302": { + "description": "当文件存储在 S3 兼容存储中时,302 重定向到短期有效的预签名 URL。请跟随 `Location` 头,无响应体。" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/publish-from-file": { + "post": { + "operationId": "artifact-write-publish", + "summary": "发布文件为产物", + "description": "将会话中生成的文件发布到产物库。", + "tags": [ + "AI SRE/产物" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 允许的文件类型:HTML/Markdown、图片、PDF、文本/数据/代码文件以及 zip/tar 压缩包(按扩展名判断)。超过 16 MiB 的文件会被拒绝。\n- 发布按(来源会话 + 工作区路径)做 upsert —— 重复发布同一文件会替换产物内容并使用新的 `file_id`,已有的公开快照会因此过期,需执行分享同步刷新。\n- 产物继承来源会话的个人/团队空间;如需调整,发布后调用 `/safari/artifact/gallery/update` 转移。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/artifacts/artifact-write-publish", + "metadata": { + "sidebarTitle": "发布文件为产物" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactPublishFromFileRequest" + }, + "example": { + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "title": "SK 海力士 2026 Q2 财报深度分析" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ArtifactPublishResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析", + "gallery_path": "/ai-sre/artifacts/art_VnfrWic8UbB9q3EfYR4Gmg" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/update": { + "post": { + "operationId": "artifact-write-update", + "summary": "更新产物", + "description": "更新产物标题,或在个人/团队空间之间转移产物。", + "tags": [ + "AI SRE/产物" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 仅更新传入的字段 —— 不传 `title` 或 `team_id` 则对应字段保持不变。\n- `team_id: 0` 表示转为个人产物(仅创建者可管理);传入大于 0 的 `team_id` 时,调用者(`app_key` 调用时为 key 所属成员)必须是该团队成员。\n- 返回更新后的完整产物。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/artifacts/artifact-write-update", + "metadata": { + "sidebarTitle": "更新产物" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactUpdateRequest" + }, + "example": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析(终稿)" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublishedArtifactItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析(终稿)", + "team_id": 2477033058131, + "team_name": "研发团队", + "person_id": 2476444212131, + "creator_name": "yushuangyu", + "is_mine": true, + "can_edit": true, + "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", + "session_title": "分析海力士财报并发布报告", + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "name": "sk-hynix-q2-2026-report.html", + "size": 18996, + "content_type": "text/html", + "created_at": 1785293373899, + "updated_at": 1785829000000, + "share_enabled": true, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "shared_by": 3790925372131, + "shared_at": 1785747928665, + "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/delete": { + "post": { + "operationId": "artifact-write-delete", + "summary": "从产物库移除产物", + "description": "将产物从产物库移除;来源文件仍保留在会话中。", + "tags": [ + "AI SRE/产物" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 该操作只是从产物库移除,不会删除文件本身 —— 来源文件仍保留在会话中,可再次发布。\n- 如果产物已开启公开分享,公开内容会在同一操作中被销毁,公开链接立即失效。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/artifacts/artifact-write-delete", + "metadata": { + "sidebarTitle": "从产物库移除产物" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactIdRequest" + }, + "example": { + "artifact_id": "art_CWQzDU2PXSRJvKDhQbuMKu" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "type": "null", + "description": "Always null on success." + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": null + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/share/enable": { + "post": { + "operationId": "artifact-write-share-enable", + "summary": "开启公开分享", + "description": "开启产物的匿名公开分享并返回公开链接。", + "tags": [ + "AI SRE/产物" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 公开链接是匿名的 —— 任何拿到链接的人都可以查看内容,链接也可能被继续转发。内容会被复制到公开 CDN 对象上,访问链接时不经过本 API。\n- 幂等:对已分享的产物重复开启会原样返回已有链接;撤销后重新开启也会得到同一个链接 —— 链接以产物 ID 为标识。\n- 超过 16 MiB 的产物无法分享,调用返回 `InvalidParameter`。\n- 分享是内容快照:之后重新发布产物不会自动更新公开内容,需调用 `/safari/artifact/gallery/share/sync` 同步。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/artifacts/artifact-write-share-enable", + "metadata": { + "sidebarTitle": "开启公开分享" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactIdRequest" + }, + "example": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ArtifactShareState" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "share_enabled": true, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "shared_by": 2476444212131, + "shared_at": 1785747928665 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/share/sync": { + "post": { + "operationId": "artifact-write-share-sync", + "summary": "更新公开分享快照", + "description": "将公开分享的内容快照更新为产物最新内容。", + "tags": [ + "AI SRE/产物" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 未开启分享时调用返回 `InvalidParameter` —— 请先开启分享。\n- 公开链接不变,仅更新快照内容和 `shared_at`。\n- 可通过产物详情中 `share_file_id != file_id` 判断快照是否过期,再决定是否同步。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/artifacts/artifact-write-share-sync", + "metadata": { + "sidebarTitle": "更新公开分享快照" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactIdRequest" + }, + "example": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ArtifactShareState" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "share_enabled": true, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "shared_by": 2476444212131, + "shared_at": 1785829900000 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/safari/artifact/gallery/share/revoke": { + "post": { + "operationId": "artifact-write-share-revoke", + "summary": "撤销公开分享", + "description": "撤销产物的公开分享,公开链接立即失效。", + "tags": [ + "AI SRE/产物" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 公开 CDN 对象会被删除,链接随即失效;产物未开启分享时该操作为空操作。\n- 之后重新开启分享会返回同一个 `public_url` —— 链接以产物 ID 为标识,撤销并不能用于更换链接。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/artifacts/artifact-write-share-revoke", + "metadata": { + "sidebarTitle": "撤销公开分享" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactIdRequest" + }, + "example": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "type": "null", + "description": "Always null on success." + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": null + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } } }, "components": { @@ -42665,6 +43710,25 @@ } } }, + "StatusPageDraftCreateResponse": { + "type": "object", + "description": "存储状态页草稿的结果。", + "required": [ + "draft_id", + "created_at" + ], + "properties": { + "draft_id": { + "type": "string", + "description": "草稿 ID,格式为 `draft_[A-Za-z0-9]{22}`;控制台审核链接会携带它。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix epoch 秒。" + } + } + }, "ImportStatusPageSubscribersRequest": { "type": "object", "description": "批量导入订阅者所需的参数。每个订阅者的 `recipient` 非空且不超过 255 字符;并且至少订阅一个组件/事件,或将 `all` 置为 true。", @@ -43195,6 +44259,24 @@ } } }, + "CreateStatusPageDraftRequest": { + "type": "object", + "description": "存储状态页草稿的参数。`draft` 载荷将被原样存储,仅下列被校验的字段会被解析。", + "required": [ + "draft" + ], + "properties": { + "draft": { + "type": "object", + "description": "草稿载荷,原样存储,序列化后最大 64 KB。被校验的字段:`page_id`、`type`(`incident` 或 `maintenance`)、`name`、`message`;可选 `change_id`(大于 0 时表示向已有事件追加进展)、`status`、`affected_components`,以及 `start_time`/`end_time`(Unix epoch 秒,仅新建维护窗口时使用)。" + }, + "source": { + "type": "string", + "maxLength": 64, + "description": "草稿来源的不透明标记,例如 `ai_sre:sess_xxx`。最长 64 个字符。" + } + } + }, "RuleListRequest": { "type": "object", "description": "按文件夹查询规则的过滤参数。", @@ -60497,6 +61579,424 @@ "description": "为 false(默认)时,若仍有成员持有该角色,删除失败并返回 `ReferenceExist` 错误,`data.refs` 中列出持有成员;为 true 时先从所有持有成员解除该角色,再删除角色。" } } + }, + "ArtifactIdRequest": { + "type": "object", + "description": "指定一个产物库中的产物。", + "properties": { + "artifact_id": { + "type": "string", + "description": "产物 ID(`art_` 前缀)。同时也是公开分享链接的标识。" + } + }, + "required": [ + "artifact_id" + ] + }, + "ArtifactListRequest": { + "type": "object", + "description": "产物库列表的过滤与分页参数。", + "properties": { + "scope": { + "type": "string", + "enum": [ + "all", + "personal", + "team" + ], + "default": "all", + "description": "可见范围。`all`(默认)= 调用者自己的个人产物 + 其所在团队的产物;`personal` = 仅调用者自己创建的;`team` = 仅调用者所属团队的团队产物。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "只看指定团队的产物,与调用者可见范围取交集 —— 不属于调用者的团队不会有任何返回。" + }, + "query": { + "type": "string", + "description": "按产物标题做大小写不敏感的子串匹配。" + }, + "page": { + "type": "integer", + "default": 1, + "minimum": 1, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "default": 20, + "maximum": 100, + "description": "每页条数。默认 20,最大 100。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "排序字段:`created_at` 或 `updated_at`。留空按 `updated_at` 倒序。" + }, + "asc": { + "type": "boolean", + "description": "为 true 时升序,为 false 时降序。仅在设置了 `orderby` 时生效。" + } + } + }, + "ArtifactListResponse": { + "type": "object", + "description": "一页产物列表。", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublishedArtifactItem" + }, + "description": "当前页的产物列表。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "符合过滤条件的产物总数(跨所有页)。" + } + } + }, + "PublishedArtifactItem": { + "type": "object", + "description": "产物库中的一个已发布产物。时间字段均为 Unix 毫秒时间戳。", + "properties": { + "artifact_id": { + "type": "string", + "description": "产物 ID(`art_` 前缀)。同时也是公开分享链接的标识。" + }, + "title": { + "type": "string", + "description": "产物在产物库中的展示标题。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "归属团队 ID。`0` 表示个人产物(仅创建者可管理);大于 0 表示团队产物。" + }, + "team_name": { + "type": "string", + "description": "归属团队的名称。个人产物不返回该字段。" + }, + "person_id": { + "type": "integer", + "format": "int64", + "description": "创建者的成员 ID。" + }, + "creator_name": { + "type": "string", + "description": "创建者的显示名称。" + }, + "is_mine": { + "type": "boolean", + "description": "调用者是否为创建者。" + }, + "can_edit": { + "type": "boolean", + "description": "调用者是否可管理该产物(重命名、转移、删除、分享):创建者、归属团队任一成员、或来源会话的管理者。" + }, + "session_id": { + "type": "string", + "description": "产出该文件的来源会话 ID(`sess_` 前缀)。" + }, + "session_title": { + "type": "string", + "description": "来源会话的标题。会话已删除时不返回该字段。" + }, + "file_id": { + "type": "string", + "description": "当前承载产物内容的文件 ID(`pf_` 前缀)。每次重新发布都会变化。" + }, + "name": { + "type": "string", + "description": "底层文件名(含扩展名)。" + }, + "size": { + "type": "integer", + "format": "int64", + "description": "文件大小,单位字节。" + }, + "content_type": { + "type": "string", + "description": "文件的 MIME 类型。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "产物发布的 Unix 毫秒时间戳。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "产物最近一次更新(重命名、转移或重新发布)的 Unix 毫秒时间戳。" + }, + "share_enabled": { + "type": "boolean", + "description": "是否已开启匿名公开分享。为 false 时不返回该字段。" + }, + "public_url": { + "type": "string", + "description": "匿名公开链接 —— 由 CDN 承载的控制台 `/share/artifact/` 页面。仅在分享开启时返回;任何拿到链接的人无需登录即可查看。" + }, + "shared_by": { + "type": "integer", + "format": "int64", + "description": "开启分享的成员 ID。仅在分享开启时返回。" + }, + "shared_at": { + "type": "integer", + "format": "int64", + "description": "最近一次开启分享或更新快照的 Unix 毫秒时间戳。仅在分享开启时返回。" + }, + "share_file_id": { + "type": "string", + "description": "公开快照所基于的文件 ID。当 `share_enabled` 为 true 且 `file_id` 与 `share_file_id` 不一致时,公开快照已过期 —— 调用 `/safari/artifact/gallery/share/sync` 刷新。" + } + }, + "required": [ + "artifact_id", + "title", + "team_id", + "person_id", + "creator_name", + "is_mine", + "can_edit", + "session_id", + "file_id", + "name", + "size", + "content_type", + "created_at", + "updated_at" + ] + }, + "ArtifactUpdateRequest": { + "type": "object", + "description": "产物的部分字段更新。仅更新传入的字段。", + "properties": { + "artifact_id": { + "type": "string", + "description": "产物 ID(`art_` 前缀)。同时也是公开分享链接的标识。" + }, + "title": { + "type": [ + "string", + "null" + ], + "description": "新标题。会去除首尾空白,传入时不能为空。不传则不变。" + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "转移目标空间。`0` 表示转为个人产物(仅创建者可管理);大于 0 表示转移到调用者所属的团队。不传则不变。" + } + }, + "required": [ + "artifact_id" + ] + }, + "ArtifactPublishFromFileRequest": { + "type": "object", + "description": "把会话中生成的文件发布到产物库。", + "properties": { + "file_id": { + "type": "string", + "description": "会话中生成的文件 ID(`pf_` 前缀),即会话文件卡片上的文件标识。" + }, + "title": { + "type": "string", + "description": "产物在产物库中的展示标题。会去除首尾空白,不能为空。" + } + }, + "required": [ + "file_id", + "title" + ] + }, + "ArtifactPublishResponse": { + "type": "object", + "description": "发布产物的结果。", + "properties": { + "artifact_id": { + "type": "string", + "description": "产物 ID(`art_` 前缀)。同时也是公开分享链接的标识。" + }, + "title": { + "type": "string", + "description": "产物展示标题。" + }, + "gallery_path": { + "type": "string", + "description": "产物页面的控制台相对路径:`/ai-sre/artifacts/`。" + } + }, + "required": [ + "artifact_id", + "title", + "gallery_path" + ] + }, + "ArtifactFileStateRequest": { + "type": "object", + "description": "批量查询文件的产物发布状态。", + "properties": { + "file_ids": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 50, + "minItems": 1, + "description": "要查询的文件 ID(`pf_` 前缀)。单次最多 50 个;重复和空字符串会被忽略。" + } + }, + "required": [ + "file_ids" + ] + }, + "ArtifactFileStateItem": { + "type": "object", + "description": "单个文件的发布状态。仅当文件存在已发布的产物时才会返回。", + "properties": { + "file_id": { + "type": "string", + "description": "回显请求中的文件 ID。" + }, + "artifact_id": { + "type": "string", + "description": "产物 ID(`art_` 前缀)。同时也是公开分享链接的标识。" + }, + "title": { + "type": "string", + "description": "已发布产物的展示标题。" + }, + "gallery_path": { + "type": "string", + "description": "产物页面的控制台相对路径:`/ai-sre/artifacts/`。" + } + }, + "required": [ + "file_id", + "artifact_id", + "title", + "gallery_path" + ] + }, + "ArtifactFileStateResponse": { + "type": "object", + "description": "按文件返回的发布状态。", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArtifactFileStateItem" + }, + "description": "每个存在已发布产物的请求文件对应一条记录;未发布的文件不会出现在列表中。" + } + }, + "required": [ + "items" + ] + }, + "ArtifactShareState": { + "type": "object", + "description": "产物的公开分享状态。", + "properties": { + "artifact_id": { + "type": "string", + "description": "产物 ID(`art_` 前缀)。同时也是公开分享链接的标识。" + }, + "share_enabled": { + "type": "boolean", + "description": "本响应中固定为 `true`。" + }, + "public_url": { + "type": "string", + "description": "完全由 CDN 承载的匿名公开链接。任何拿到链接的人无需登录即可查看内容。" + }, + "shared_by": { + "type": "integer", + "format": "int64", + "description": "开启分享的成员 ID。" + }, + "shared_at": { + "type": "integer", + "format": "int64", + "description": "最近一次开启分享或更新快照的 Unix 毫秒时间戳。" + } + }, + "required": [ + "artifact_id", + "share_enabled", + "public_url", + "shared_by", + "shared_at" + ] + }, + "ArtifactSignRequest": { + "type": "object", + "description": "为文件申请签名下载/预览链接。", + "properties": { + "file_id": { + "type": "string", + "description": "要签发的文件 ID(`pf_` 前缀)。" + }, + "share_token": { + "type": "string", + "description": "可选的会话分享链接令牌。仅当调用者通过会话分享链接(而非账号成员身份)访问文件时需要。" + } + }, + "required": [ + "file_id" + ] + }, + "SignedURLs": { + "type": "object", + "description": "短期有效的文件下载/预览签名链接。", + "properties": { + "download_url": { + "type": "string", + "description": "以下载方式(attachment)返回文件的相对链接(`/safari/artifact/stream?...`)。使用前需拼接 API 域名 `https://api.flashcat.cloud`;有效期见 `expires_in`。" + }, + "preview_url": { + "type": "string", + "description": "与 `download_url` 相同,但以 inline 方式返回,用于浏览器内预览。" + }, + "expires_in": { + "type": "integer", + "description": "两个链接的有效期,单位秒(300)。" + }, + "name": { + "type": "string", + "description": "文件名(含扩展名)。" + }, + "size": { + "type": "integer", + "format": "int64", + "description": "文件大小,单位字节。" + }, + "content_type": { + "type": "string", + "description": "文件的 MIME 类型。" + } + }, + "required": [ + "download_url", + "preview_url", + "expires_in", + "name", + "size", + "content_type" + ] } } } diff --git a/roundtrip_gen_test.go b/roundtrip_gen_test.go index a7938f6..b7bfc5e 100644 --- a/roundtrip_gen_test.go +++ b/roundtrip_gen_test.go @@ -167,65 +167,76 @@ var exampleDataDecoders = map[string]func(json.RawMessage) error{ var v RUMPresetSeverityRuleHistoryListResponse return json.Unmarshal(d, &v) }, - "POST /rum/issue/preset-severity/rules/list": func(d json.RawMessage) error { var v RUMPresetSeverityRuleListResponse; return json.Unmarshal(d, &v) }, - "POST /rum/resource/info": func(d json.RawMessage) error { var v RUMResourceItem; return json.Unmarshal(d, &v) }, - "POST /rum/session-replay/metadata": func(d json.RawMessage) error { var v RUMSessionReplayMetaItem; return json.Unmarshal(d, &v) }, - "POST /rum/session-replay/segments": func(d json.RawMessage) error { var v RUMSessionReplaySegmentsResult; return json.Unmarshal(d, &v) }, - "POST /safari/a2a-agent/create": func(d json.RawMessage) error { var v A2aAgentCreateResponse; return json.Unmarshal(d, &v) }, - "POST /safari/a2a-agent/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/a2a-agent/disable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/a2a-agent/enable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/a2a-agent/get": func(d json.RawMessage) error { var v A2aAgentItem; return json.Unmarshal(d, &v) }, - "POST /safari/a2a-agent/list": func(d json.RawMessage) error { var v A2aAgentListResponse; return json.Unmarshal(d, &v) }, - "POST /safari/a2a-agent/update": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/automation/rule/create": func(d json.RawMessage) error { var v AutomationRuleItem; return json.Unmarshal(d, &v) }, - "POST /safari/automation/rule/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/automation/rule/get": func(d json.RawMessage) error { var v AutomationRuleItem; return json.Unmarshal(d, &v) }, - "POST /safari/automation/rule/list": func(d json.RawMessage) error { var v AutomationRuleListResponse; return json.Unmarshal(d, &v) }, - "POST /safari/automation/rule/run": func(d json.RawMessage) error { var v ManualRunRuleResult; return json.Unmarshal(d, &v) }, - "POST /safari/automation/rule/update": func(d json.RawMessage) error { var v AutomationRuleItem; return json.Unmarshal(d, &v) }, - "POST /safari/automation/run/list": func(d json.RawMessage) error { var v AutomationRunListResponse; return json.Unmarshal(d, &v) }, - "POST /safari/automation/template/list": func(d json.RawMessage) error { var v AutomationTemplateListResponse; return json.Unmarshal(d, &v) }, - "POST /safari/knowledge/file/delete": func(d json.RawMessage) error { var v KnowledgeFileDeleteResponse; return json.Unmarshal(d, &v) }, - "POST /safari/knowledge/file/get": func(d json.RawMessage) error { var v KnowledgeFileGetResponse; return json.Unmarshal(d, &v) }, - "POST /safari/knowledge/file/list": func(d json.RawMessage) error { var v KnowledgeFileListResponse; return json.Unmarshal(d, &v) }, - "POST /safari/knowledge/file/put": func(d json.RawMessage) error { var v KnowledgeFilePutResponse; return json.Unmarshal(d, &v) }, - "POST /safari/knowledge/get": func(d json.RawMessage) error { var v KnowledgeGetResponse; return json.Unmarshal(d, &v) }, - "POST /safari/knowledge/pack/delete": func(d json.RawMessage) error { var v KnowledgePackDeleteResponse; return json.Unmarshal(d, &v) }, - "POST /safari/knowledge/pack/ensure": func(d json.RawMessage) error { var v KnowledgePackItem; return json.Unmarshal(d, &v) }, - "POST /safari/knowledge/pack/list": func(d json.RawMessage) error { var v KnowledgePackListResponse; return json.Unmarshal(d, &v) }, - "POST /safari/knowledge/pack/update": func(d json.RawMessage) error { var v KnowledgePackItem; return json.Unmarshal(d, &v) }, - "POST /safari/mcp/server/create": func(d json.RawMessage) error { var v McpServerItem; return json.Unmarshal(d, &v) }, - "POST /safari/mcp/server/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/mcp/server/disable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/mcp/server/enable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/mcp/server/get": func(d json.RawMessage) error { var v McpServerItem; return json.Unmarshal(d, &v) }, - "POST /safari/mcp/server/list": func(d json.RawMessage) error { var v McpServerListResponse; return json.Unmarshal(d, &v) }, - "POST /safari/mcp/server/update": func(d json.RawMessage) error { var v McpServerItem; return json.Unmarshal(d, &v) }, - "POST /safari/session/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/session/get": func(d json.RawMessage) error { var v SessionGetResponse; return json.Unmarshal(d, &v) }, - "POST /safari/session/list": func(d json.RawMessage) error { var v SessionListResponse; return json.Unmarshal(d, &v) }, - "POST /safari/skill/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/skill/disable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/skill/enable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, - "POST /safari/skill/get": func(d json.RawMessage) error { var v SkillItem; return json.Unmarshal(d, &v) }, - "POST /safari/skill/list": func(d json.RawMessage) error { var v SkillListResponse; return json.Unmarshal(d, &v) }, - "POST /safari/skill/update": func(d json.RawMessage) error { var v SkillItem; return json.Unmarshal(d, &v) }, - "POST /schedule/create": func(d json.RawMessage) error { var v ScheduleIDResponse; return json.Unmarshal(d, &v) }, - "POST /schedule/info": func(d json.RawMessage) error { var v ScheduleItem; return json.Unmarshal(d, &v) }, - "POST /schedule/infos": func(d json.RawMessage) error { var v ScheduleSelfResponse; return json.Unmarshal(d, &v) }, - "POST /schedule/list": func(d json.RawMessage) error { var v ScheduleListResponse; return json.Unmarshal(d, &v) }, - "POST /schedule/preview": func(d json.RawMessage) error { var v ScheduleItem; return json.Unmarshal(d, &v) }, - "POST /schedule/self": func(d json.RawMessage) error { var v ScheduleSelfResponse; return json.Unmarshal(d, &v) }, - "POST /sourcemap/list": func(d json.RawMessage) error { var v SourcemapListResponse; return json.Unmarshal(d, &v) }, - "POST /sourcemap/stack/enrich": func(d json.RawMessage) error { var v SourcemapStackEnrichResponse; return json.Unmarshal(d, &v) }, - "POST /status-page/change/create": func(d json.RawMessage) error { var v StatusPageChangeCreateResponse; return json.Unmarshal(d, &v) }, + "POST /rum/issue/preset-severity/rules/list": func(d json.RawMessage) error { var v RUMPresetSeverityRuleListResponse; return json.Unmarshal(d, &v) }, + "POST /rum/resource/info": func(d json.RawMessage) error { var v RUMResourceItem; return json.Unmarshal(d, &v) }, + "POST /rum/session-replay/metadata": func(d json.RawMessage) error { var v RUMSessionReplayMetaItem; return json.Unmarshal(d, &v) }, + "POST /rum/session-replay/segments": func(d json.RawMessage) error { var v RUMSessionReplaySegmentsResult; return json.Unmarshal(d, &v) }, + "POST /safari/a2a-agent/create": func(d json.RawMessage) error { var v A2aAgentCreateResponse; return json.Unmarshal(d, &v) }, + "POST /safari/a2a-agent/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/a2a-agent/disable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/a2a-agent/enable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/a2a-agent/get": func(d json.RawMessage) error { var v A2aAgentItem; return json.Unmarshal(d, &v) }, + "POST /safari/a2a-agent/list": func(d json.RawMessage) error { var v A2aAgentListResponse; return json.Unmarshal(d, &v) }, + "POST /safari/a2a-agent/update": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/artifact/gallery/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/artifact/gallery/file-state": func(d json.RawMessage) error { var v ArtifactFileStateResponse; return json.Unmarshal(d, &v) }, + "POST /safari/artifact/gallery/get": func(d json.RawMessage) error { var v PublishedArtifactItem; return json.Unmarshal(d, &v) }, + "POST /safari/artifact/gallery/list": func(d json.RawMessage) error { var v ArtifactListResponse; return json.Unmarshal(d, &v) }, + "POST /safari/artifact/gallery/publish-from-file": func(d json.RawMessage) error { var v ArtifactPublishResponse; return json.Unmarshal(d, &v) }, + "POST /safari/artifact/gallery/share/enable": func(d json.RawMessage) error { var v ArtifactShareState; return json.Unmarshal(d, &v) }, + "POST /safari/artifact/gallery/share/revoke": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/artifact/gallery/share/sync": func(d json.RawMessage) error { var v ArtifactShareState; return json.Unmarshal(d, &v) }, + "POST /safari/artifact/gallery/update": func(d json.RawMessage) error { var v PublishedArtifactItem; return json.Unmarshal(d, &v) }, + "POST /safari/artifact/sign": func(d json.RawMessage) error { var v SignedUrLs; return json.Unmarshal(d, &v) }, + "POST /safari/automation/rule/create": func(d json.RawMessage) error { var v AutomationRuleItem; return json.Unmarshal(d, &v) }, + "POST /safari/automation/rule/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/automation/rule/get": func(d json.RawMessage) error { var v AutomationRuleItem; return json.Unmarshal(d, &v) }, + "POST /safari/automation/rule/list": func(d json.RawMessage) error { var v AutomationRuleListResponse; return json.Unmarshal(d, &v) }, + "POST /safari/automation/rule/run": func(d json.RawMessage) error { var v ManualRunRuleResult; return json.Unmarshal(d, &v) }, + "POST /safari/automation/rule/update": func(d json.RawMessage) error { var v AutomationRuleItem; return json.Unmarshal(d, &v) }, + "POST /safari/automation/run/list": func(d json.RawMessage) error { var v AutomationRunListResponse; return json.Unmarshal(d, &v) }, + "POST /safari/automation/template/list": func(d json.RawMessage) error { var v AutomationTemplateListResponse; return json.Unmarshal(d, &v) }, + "POST /safari/knowledge/file/delete": func(d json.RawMessage) error { var v KnowledgeFileDeleteResponse; return json.Unmarshal(d, &v) }, + "POST /safari/knowledge/file/get": func(d json.RawMessage) error { var v KnowledgeFileGetResponse; return json.Unmarshal(d, &v) }, + "POST /safari/knowledge/file/list": func(d json.RawMessage) error { var v KnowledgeFileListResponse; return json.Unmarshal(d, &v) }, + "POST /safari/knowledge/file/put": func(d json.RawMessage) error { var v KnowledgeFilePutResponse; return json.Unmarshal(d, &v) }, + "POST /safari/knowledge/get": func(d json.RawMessage) error { var v KnowledgeGetResponse; return json.Unmarshal(d, &v) }, + "POST /safari/knowledge/pack/delete": func(d json.RawMessage) error { var v KnowledgePackDeleteResponse; return json.Unmarshal(d, &v) }, + "POST /safari/knowledge/pack/ensure": func(d json.RawMessage) error { var v KnowledgePackItem; return json.Unmarshal(d, &v) }, + "POST /safari/knowledge/pack/list": func(d json.RawMessage) error { var v KnowledgePackListResponse; return json.Unmarshal(d, &v) }, + "POST /safari/knowledge/pack/update": func(d json.RawMessage) error { var v KnowledgePackItem; return json.Unmarshal(d, &v) }, + "POST /safari/mcp/server/create": func(d json.RawMessage) error { var v McpServerItem; return json.Unmarshal(d, &v) }, + "POST /safari/mcp/server/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/mcp/server/disable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/mcp/server/enable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/mcp/server/get": func(d json.RawMessage) error { var v McpServerItem; return json.Unmarshal(d, &v) }, + "POST /safari/mcp/server/list": func(d json.RawMessage) error { var v McpServerListResponse; return json.Unmarshal(d, &v) }, + "POST /safari/mcp/server/update": func(d json.RawMessage) error { var v McpServerItem; return json.Unmarshal(d, &v) }, + "POST /safari/session/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/session/get": func(d json.RawMessage) error { var v SessionGetResponse; return json.Unmarshal(d, &v) }, + "POST /safari/session/list": func(d json.RawMessage) error { var v SessionListResponse; return json.Unmarshal(d, &v) }, + "POST /safari/skill/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/skill/disable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/skill/enable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, + "POST /safari/skill/get": func(d json.RawMessage) error { var v SkillItem; return json.Unmarshal(d, &v) }, + "POST /safari/skill/list": func(d json.RawMessage) error { var v SkillListResponse; return json.Unmarshal(d, &v) }, + "POST /safari/skill/update": func(d json.RawMessage) error { var v SkillItem; return json.Unmarshal(d, &v) }, + "POST /schedule/create": func(d json.RawMessage) error { var v ScheduleIDResponse; return json.Unmarshal(d, &v) }, + "POST /schedule/info": func(d json.RawMessage) error { var v ScheduleItem; return json.Unmarshal(d, &v) }, + "POST /schedule/infos": func(d json.RawMessage) error { var v ScheduleSelfResponse; return json.Unmarshal(d, &v) }, + "POST /schedule/list": func(d json.RawMessage) error { var v ScheduleListResponse; return json.Unmarshal(d, &v) }, + "POST /schedule/preview": func(d json.RawMessage) error { var v ScheduleItem; return json.Unmarshal(d, &v) }, + "POST /schedule/self": func(d json.RawMessage) error { var v ScheduleSelfResponse; return json.Unmarshal(d, &v) }, + "POST /sourcemap/list": func(d json.RawMessage) error { var v SourcemapListResponse; return json.Unmarshal(d, &v) }, + "POST /sourcemap/stack/enrich": func(d json.RawMessage) error { var v SourcemapStackEnrichResponse; return json.Unmarshal(d, &v) }, + "POST /status-page/change/create": func(d json.RawMessage) error { var v StatusPageChangeCreateResponse; return json.Unmarshal(d, &v) }, "POST /status-page/change/timeline/create": func(d json.RawMessage) error { var v StatusPageChangeTimelineCreateResponse return json.Unmarshal(d, &v) }, "POST /status-page/component/upsert": func(d json.RawMessage) error { var v UpsertStatusPageComponentResponse; return json.Unmarshal(d, &v) }, "POST /status-page/create": func(d json.RawMessage) error { var v CreateStatusPageResponse; return json.Unmarshal(d, &v) }, + "POST /status-page/draft/create": func(d json.RawMessage) error { var v StatusPageDraftCreateResponse; return json.Unmarshal(d, &v) }, "POST /status-page/migrate-email-subscribers": func(d json.RawMessage) error { var v StatusPageMigrationStartResponse; return json.Unmarshal(d, &v) }, "POST /status-page/migrate-structure": func(d json.RawMessage) error { var v StatusPageMigrationStartResponse; return json.Unmarshal(d, &v) }, "POST /status-page/section/upsert": func(d json.RawMessage) error { var v UpsertStatusPageSectionResponse; return json.Unmarshal(d, &v) }, diff --git a/services_gen.go b/services_gen.go index b853af6..7535617 100644 --- a/services_gen.go +++ b/services_gen.go @@ -9,6 +9,7 @@ type service struct{ client *Client } // genServices is embedded in Client to expose the generated service handles. type genServices struct { A2aAgents *A2aAgentsService + Artifacts *ArtifactsService Automations *AutomationsService Knowledge *KnowledgeService McpServers *McpServersService @@ -52,6 +53,7 @@ type genServices struct { func (c *Client) initServices() { c.common.client = c c.A2aAgents = (*A2aAgentsService)(&c.common) + c.Artifacts = (*ArtifactsService)(&c.common) c.Automations = (*AutomationsService)(&c.common) c.Knowledge = (*KnowledgeService)(&c.common) c.McpServers = (*McpServersService)(&c.common) diff --git a/status_pages.go b/status_pages.go index e8d51df..4e47788 100644 --- a/status_pages.go +++ b/status_pages.go @@ -173,6 +173,20 @@ func (s *StatusPagesService) Delete(ctx context.Context, req *DeleteStatusPageRe return s.client.do(ctx, "/status-page/delete", req, nil) } +// Create status page draft. +// +// Store a status page event draft so a human can review and publish it from the console. +// +// API: POST /status-page/draft/create (statusPageDraftCreate). +func (s *StatusPagesService) DraftCreate(ctx context.Context, req *CreateStatusPageDraftRequest) (*StatusPageDraftCreateResponse, *Response, error) { + out := new(StatusPageDraftCreateResponse) + resp, err := s.client.do(ctx, "/status-page/draft/create", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + // Get status page detail. // // Retrieve detailed configuration for a specific status page.