This commit is contained in:
2026-08-20 09:10:30 +08:00
parent 064247a8c9
commit f227cf05a3
32 changed files with 268 additions and 58 deletions
@@ -7,11 +7,13 @@ paths:
/api/platform/v1/carrier-schedule-queries/carriers:
get:
summary: List official carrier sources and compliant access modes
x-permission: platform:firstleg:port-schedule-query:list
responses:
'200': {description: MATSON, SML, ZIM, COSCO, EMC and HEDE descriptors}
/api/platform/v1/carrier-schedule-queries:
get:
summary: Query carrier schedule tasks
x-permission: platform:firstleg:port-schedule-query:list
parameters:
- {name: customerId, in: query, schema: {type: integer, format: int64, minimum: 1}}
- {name: oceanBookingId, in: query, schema: {type: integer, format: int64, minimum: 1}}
@@ -26,6 +28,7 @@ paths:
'200': {description: Query tasks with source, freshness and rate-limit fields}
post:
summary: Create a query task linked to a real booking and allocated container
x-permission: platform:firstleg:port-schedule-query:create
parameters: [{$ref: '#/components/parameters/IdempotencyKey'}]
requestBody:
required: true
@@ -38,18 +41,21 @@ paths:
parameters: [{$ref: '#/components/parameters/QueryId'}]
get:
summary: Get task, immutable attempts and history
x-permission: platform:firstleg:port-schedule-query:list
responses:
'200': {description: Stable task detail}
/api/platform/v1/carrier-schedule-queries/{queryId}/history:
parameters: [{$ref: '#/components/parameters/QueryId'}]
get:
summary: Get immutable task history
x-permission: platform:firstleg:port-schedule-query:list
responses:
'200': {description: CREATE, ATTEMPT and MANUAL_RESULT history}
/api/platform/v1/carrier-schedule-queries/{queryId}/attempts:
parameters: [{$ref: '#/components/parameters/QueryId'}]
post:
summary: Execute the compliant carrier strategy; never bypass captcha or dynamic pages
x-permission: platform:firstleg:port-schedule-query:attempt
parameters: [{$ref: '#/components/parameters/IdempotencyKey'}]
requestBody:
required: true
@@ -62,6 +68,7 @@ paths:
parameters: [{$ref: '#/components/parameters/QueryId'}]
post:
summary: Link a validated manual port-schedule observation without pretending automated success
x-permission: platform:firstleg:port-schedule-query:manual
parameters: [{$ref: '#/components/parameters/IdempotencyKey'}]
requestBody:
required: true
@@ -7,6 +7,7 @@ paths:
/api/platform/v1/port-schedules:
get:
summary: Query schedules by customer, ocean booking, allocated container or expiry
x-permission: platform:firstleg:port-schedule:list
parameters:
- {name: customerId, in: query, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
- {name: oceanBookingId, in: query, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
@@ -20,6 +21,7 @@ paths:
description: HTTP 200 business envelope containing a page of schedule views
post:
summary: Create a source observation linked to a real ocean booking
x-permission: platform:firstleg:port-schedule:create
parameters: [{$ref: '#/components/parameters/IdempotencyKey'}]
requestBody:
required: true
@@ -32,10 +34,12 @@ paths:
parameters: [{$ref: '#/components/parameters/PortScheduleId'}]
get:
summary: Get schedule and immutable history
x-permission: platform:firstleg:port-schedule:list
responses:
'200': {description: Schedule detail with computed expired flag}
put:
summary: Update source observation with optimistic locking
x-permission: platform:firstleg:port-schedule:edit
parameters: [{$ref: '#/components/parameters/IdempotencyKey'}]
requestBody:
required: true
@@ -48,6 +52,7 @@ paths:
parameters: [{$ref: '#/components/parameters/PortScheduleId'}]
get:
summary: Query immutable source observation history
x-permission: platform:firstleg:port-schedule:list
responses:
'200': {description: Ordered CREATE and UPDATE history records}
components: