350 lines
10 KiB
YAML
350 lines
10 KiB
YAML
paths:
|
|
/v1/approval-runs:
|
|
get:
|
|
tags: [Approval Runs]
|
|
operationId: searchApprovalRuns
|
|
x-implementation-status: implemented
|
|
summary: Search wrapped approval run history
|
|
parameters:
|
|
- $ref: ../components/parameters.yaml#/CorpId
|
|
- $ref: ../components/parameters.yaml#/Offset
|
|
- $ref: ../components/parameters.yaml#/Limit
|
|
- name: startDate
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: Creation-time lower bound in milliseconds.
|
|
- name: endDate
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: Creation-time upper bound in milliseconds.
|
|
- name: status
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: taskMode
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: manualApprovalStatus
|
|
in: query
|
|
schema:
|
|
oneOf:
|
|
- type: string
|
|
- type: array
|
|
items:
|
|
type: string
|
|
- name: sourceDocumentSN
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: Hose/易快报单号 or other external source document number.
|
|
- name: sourceDocumentId
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: humanResult
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: Local human result contains filter, such as 驳回 or 通过.
|
|
- name: query
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: Search across record ID, source document fields, document ID, and trace fields.
|
|
- name: includeBridge
|
|
in: query
|
|
schema:
|
|
type: boolean
|
|
default: false
|
|
description: Include full Langfuse bridge rows.
|
|
responses:
|
|
"200":
|
|
description: Compact wrapped approval run list.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas/index.yaml#/ApprovalRunsResponse
|
|
/v1/approval-runs/summary:
|
|
get:
|
|
tags: [Approval Runs]
|
|
operationId: summarizeApprovalRuns
|
|
x-implementation-status: implemented
|
|
summary: Summarize approval runs by local date
|
|
parameters:
|
|
- $ref: ../components/parameters.yaml#/CorpId
|
|
- name: date
|
|
in: query
|
|
schema:
|
|
type: string
|
|
format: date
|
|
- name: timezone
|
|
in: query
|
|
schema:
|
|
type: string
|
|
default: Asia/Shanghai
|
|
- $ref: ../components/parameters.yaml#/Limit
|
|
- name: query
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: humanResult
|
|
in: query
|
|
schema:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Date summary with counts and compact records.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas/index.yaml#/ApprovalRunsSummary
|
|
/v1/approval-runs/stats:
|
|
get:
|
|
tags: [Approval Runs]
|
|
operationId: statApprovalRuns
|
|
x-implementation-status: implemented
|
|
summary: Aggregate approval run counts by status and source system
|
|
parameters:
|
|
- $ref: ../components/parameters.yaml#/CorpId
|
|
- name: since
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: Time window such as 3months, 7days or 24hours.
|
|
- name: dedupeBy
|
|
in: query
|
|
schema:
|
|
type: string
|
|
enum: [sourceDocumentSN, sourceDocumentId, id]
|
|
default: sourceDocumentSN
|
|
description: Field used to count distinct business documents.
|
|
- name: status
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: sourceSystem
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: taskMode
|
|
in: query
|
|
schema:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Counts grouped by status and source system, plus the deduplicated total.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
/v1/approval-runs/pick:
|
|
get:
|
|
tags: [Approval Runs]
|
|
operationId: pickApprovalRuns
|
|
x-implementation-status: implemented
|
|
summary: Pick likely approval runs by document number or trace key
|
|
parameters:
|
|
- $ref: ../components/parameters.yaml#/CorpId
|
|
- name: query
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: sn
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: Source document number for direct lookup.
|
|
- name: batch
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: Optional simulation batch ID.
|
|
- name: latest
|
|
in: query
|
|
schema:
|
|
type: boolean
|
|
- name: fields
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: Comma-separated response fields.
|
|
- name: limit
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
default: 20
|
|
- name: maxScan
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
default: 1000
|
|
responses:
|
|
"200":
|
|
description: Picked records and suggested next actions.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
additionalProperties: true
|
|
/v1/approval-runs/bridge:
|
|
get:
|
|
tags: [Approval Runs]
|
|
operationId: getApprovalRunLangfuseBridge
|
|
x-implementation-status: planned
|
|
summary: Resolve approval runs to Langfuse trace or session hints
|
|
parameters:
|
|
- $ref: ../components/parameters.yaml#/CorpId
|
|
- name: recordId
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: sourceDocumentSN
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: sourceDocumentId
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: simulationBatchId
|
|
in: query
|
|
schema:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Trace/session bridge hints.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas/index.yaml#/BridgeResponse
|
|
/v1/approval-runs/url:
|
|
get:
|
|
tags: [Approval Runs]
|
|
operationId: getApprovalRunUrl
|
|
x-implementation-status: implemented
|
|
summary: Get Seal AI result URL and optional source document URL
|
|
parameters:
|
|
- $ref: ../components/parameters.yaml#/CorpId
|
|
- name: recordId
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: sourceDocumentSN
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: sourceDocumentId
|
|
in: query
|
|
schema:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Seal AI result URL and source document URL.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas/index.yaml#/RunUrlResponse
|
|
/v1/approval-runs/{recordId}:
|
|
parameters:
|
|
- $ref: ../components/parameters.yaml#/RecordId
|
|
get:
|
|
tags: [Approval Runs]
|
|
operationId: getApprovalRun
|
|
x-implementation-status: implemented
|
|
summary: Get wrapped approval run detail
|
|
parameters:
|
|
- name: summary
|
|
in: query
|
|
schema:
|
|
type: boolean
|
|
- name: fields
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: Comma-separated field paths such as metadata,document.fields,result.summary.
|
|
responses:
|
|
"200":
|
|
description: Approval run detail plus stable aliases and human result.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
additionalProperties: true
|
|
/v1/approval-runs/{recordId}/cited-rules:
|
|
parameters:
|
|
- $ref: ../components/parameters.yaml#/RecordId
|
|
get:
|
|
tags: [Approval Runs]
|
|
operationId: getApprovalRunCitedRules
|
|
x-implementation-status: implemented
|
|
summary: Extract rules cited or matched by the AI result
|
|
responses:
|
|
"200":
|
|
description: Cited rule summaries.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
additionalProperties: true
|
|
/v1/approval-runs/{recordId}/document-summary:
|
|
parameters:
|
|
- $ref: ../components/parameters.yaml#/RecordId
|
|
get:
|
|
tags: [Approval Runs]
|
|
operationId: getApprovalRunDocumentSummary
|
|
x-implementation-status: implemented
|
|
summary: Get key document fields and compact AI/manual result
|
|
responses:
|
|
"200":
|
|
description: Document summary.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
additionalProperties: true
|
|
/v1/approval-runs/{recordId}/attachments:
|
|
parameters:
|
|
- $ref: ../components/parameters.yaml#/RecordId
|
|
get:
|
|
tags: [Approval Runs]
|
|
operationId: getApprovalRunAttachments
|
|
x-implementation-status: implemented
|
|
summary: List compact attachment metadata
|
|
parameters:
|
|
- name: summary
|
|
in: query
|
|
schema:
|
|
type: boolean
|
|
responses:
|
|
"200":
|
|
description: Attachment metadata.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
additionalProperties: true
|
|
/v1/approval-runs/{recordId}/result:
|
|
parameters:
|
|
- $ref: ../components/parameters.yaml#/RecordId
|
|
get:
|
|
tags: [Approval Runs]
|
|
operationId: getApprovalRunResult
|
|
x-implementation-status: implemented
|
|
summary: Get AI result, optionally as a compact summary
|
|
parameters:
|
|
- name: summary
|
|
in: query
|
|
schema:
|
|
type: boolean
|
|
responses:
|
|
"200":
|
|
description: AI result or summary.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
additionalProperties: true
|