docs: finalize growth report lifecycle contract

This commit is contained in:
2026-08-21 00:38:36 +03:30
parent 6c80f71847
commit 49084ea577

View File

@@ -1049,7 +1049,7 @@ components:
intervalCoverageBps: {type: integer, format: int64, minimum: 0, maximum: 10000} intervalCoverageBps: {type: integer, format: int64, minimum: 0, maximum: 10000}
GrowthHistoricalWin: GrowthHistoricalWin:
type: object type: object
additionalProperties: true additionalProperties: false
required: [evidenceId, eventId, eventTitleFa, startDate, endDate, materialWin] required: [evidenceId, eventId, eventTitleFa, startDate, endDate, materialWin]
properties: properties:
evidenceId: {type: string} evidenceId: {type: string}
@@ -1092,8 +1092,8 @@ components:
evidenceId: {type: string} evidenceId: {type: string}
date: {type: string, format: date-time} date: {type: string, format: date-time}
endDate: {type: string, format: date-time} endDate: {type: string, format: date-time}
sessionDeclineBps: {type: integer, format: int64, minimum: 2000} sessionDeclineBps: {type: integer, format: int64, minimum: 0, description: At least one decline dimension is 2000 BPS or greater.}
amountDeclineBps: {type: integer, format: int64, minimum: 2000} amountDeclineBps: {type: integer, format: int64, minimum: 0, description: At least one decline dimension is 2000 BPS or greater.}
expectedSessions: {$ref: '#/components/schemas/GrowthRange'} expectedSessions: {$ref: '#/components/schemas/GrowthRange'}
expectedAmountRial: {$ref: '#/components/schemas/GrowthRange'} expectedAmountRial: {$ref: '#/components/schemas/GrowthRange'}
GrowthPeer: GrowthPeer:
@@ -1119,6 +1119,18 @@ components:
preparationAction: {type: string} preparationAction: {type: string}
limitation: {type: string} limitation: {type: string}
evidenceIds: {type: array, minItems: 1, items: {type: string}} evidenceIds: {type: array, minItems: 1, items: {type: string}}
GrowthFallbackBrief:
type: object
additionalProperties: false
required: [headlineFa, guidanceFa, offerFa, messageFa, preparationFa, limitationFa, evidenceIds]
properties:
headlineFa: {type: string}
guidanceFa: {type: string}
offerFa: {type: string}
messageFa: {type: string}
preparationFa: {type: string}
limitationFa: {type: string}
evidenceIds: {type: array, minItems: 1, items: {type: string}}
GrowthEvidence: GrowthEvidence:
type: object type: object
additionalProperties: false additionalProperties: false
@@ -1129,13 +1141,14 @@ components:
opportunities: {type: array, maxItems: 5, items: {$ref: '#/components/schemas/GrowthOpportunity'}} opportunities: {type: array, maxItems: 5, items: {$ref: '#/components/schemas/GrowthOpportunity'}}
risks: {type: array, maxItems: 3, items: {$ref: '#/components/schemas/GrowthRisk'}} risks: {type: array, maxItems: 3, items: {$ref: '#/components/schemas/GrowthRisk'}}
peer: {$ref: '#/components/schemas/GrowthPeer'} peer: {$ref: '#/components/schemas/GrowthPeer'}
fallbackBriefs: {type: array, items: {$ref: '#/components/schemas/GrowthCampaignBrief'}} fallbackBriefs: {type: array, items: {$ref: '#/components/schemas/GrowthFallbackBrief'}}
GrowthReport: GrowthReport:
type: object type: object
additionalProperties: false additionalProperties: false
required: [reportId, status, scope, horizonDays, deterministicEvidence, cached, stale, nextRefreshAt, createdAt, updatedAt, eventsUrl] required: [reportId, revision, status, scope, horizonDays, cached, stale, nextRefreshAt, createdAt, updatedAt, eventsUrl]
properties: properties:
reportId: {type: string} reportId: {type: string}
revision: {type: integer, minimum: 1}
status: {type: string, enum: [QUEUED, ANALYZING, GENERATING, READY, PARTIAL, FAILED]} status: {type: string, enum: [QUEUED, ANALYZING, GENERATING, READY, PARTIAL, FAILED]}
scope: scope:
type: object type: object
@@ -2120,3 +2133,7 @@ components:
type: string type: string
format: uri-reference format: uri-reference
description: Optional safe recovery link for run-related problems. description: Optional safe recovery link for run-related problems.
nextRefreshAt:
type: string
format: date-time
description: Present for REFRESH_LIMITED responses.