@giveitsmaller/contracts 0.4.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/asyncapi/events.yaml +455 -41
  2. package/availability/availability.json +706 -83
  3. package/dist/asyncapi/OperationType.d.ts +5 -1
  4. package/dist/asyncapi/OperationType.js +4 -0
  5. package/dist/openapi/models/AudioWatermarkDecodeRequest.d.ts +1 -1
  6. package/dist/openapi/models/AudioWatermarkDecodeRequest.js +1 -1
  7. package/dist/openapi/models/AudioWatermarkDecodeResponse.d.ts +1 -1
  8. package/dist/openapi/models/AudioWatermarkDecodeResponse.js +1 -1
  9. package/dist/openapi/models/AuthErrorResponse.d.ts +1 -1
  10. package/dist/openapi/models/AuthErrorResponse.js +1 -1
  11. package/dist/openapi/models/AuthErrorType.d.ts +1 -1
  12. package/dist/openapi/models/AuthErrorType.js +1 -1
  13. package/dist/openapi/models/AvailabilityValue.d.ts +1 -1
  14. package/dist/openapi/models/AvailabilityValue.js +1 -1
  15. package/dist/openapi/models/BalanceExhaustedResponse.d.ts +1 -1
  16. package/dist/openapi/models/BalanceExhaustedResponse.js +1 -1
  17. package/dist/openapi/models/BalanceExhaustedResponseAllOfLinks.d.ts +1 -1
  18. package/dist/openapi/models/BalanceExhaustedResponseAllOfLinks.js +1 -1
  19. package/dist/openapi/models/CallbackEventType.d.ts +1 -1
  20. package/dist/openapi/models/CallbackEventType.js +1 -1
  21. package/dist/openapi/models/ConnectionSource.d.ts +1 -1
  22. package/dist/openapi/models/ConnectionSource.js +1 -1
  23. package/dist/openapi/models/ContactRequest.d.ts +1 -1
  24. package/dist/openapi/models/ContactRequest.js +1 -1
  25. package/dist/openapi/models/ContactSubject.d.ts +1 -1
  26. package/dist/openapi/models/ContactSubject.js +1 -1
  27. package/dist/openapi/models/ContactValidationErrorResponse.d.ts +1 -1
  28. package/dist/openapi/models/ContactValidationErrorResponse.js +1 -1
  29. package/dist/openapi/models/CreateExternalImport403Response.d.ts +1 -1
  30. package/dist/openapi/models/CreateExternalImport403Response.js +1 -1
  31. package/dist/openapi/models/CreateExternalImport422Response.d.ts +1 -1
  32. package/dist/openapi/models/CreateExternalImport422Response.js +1 -1
  33. package/dist/openapi/models/CreateWorkflow422Response.d.ts +3 -2
  34. package/dist/openapi/models/CreateWorkflow422Response.js +8 -1
  35. package/dist/openapi/models/CreditTransaction.d.ts +1 -1
  36. package/dist/openapi/models/CreditTransaction.js +1 -1
  37. package/dist/openapi/models/CreditTransactionSourceBucket.d.ts +1 -1
  38. package/dist/openapi/models/CreditTransactionSourceBucket.js +1 -1
  39. package/dist/openapi/models/CreditsBalanceResponse.d.ts +1 -1
  40. package/dist/openapi/models/CreditsBalanceResponse.js +1 -1
  41. package/dist/openapi/models/CreditsBalanceSuccessEnvelope.d.ts +1 -1
  42. package/dist/openapi/models/CreditsBalanceSuccessEnvelope.js +1 -1
  43. package/dist/openapi/models/CreditsUsageResponse.d.ts +1 -1
  44. package/dist/openapi/models/CreditsUsageResponse.js +1 -1
  45. package/dist/openapi/models/CreditsUsageSuccessEnvelope.d.ts +1 -1
  46. package/dist/openapi/models/CreditsUsageSuccessEnvelope.js +1 -1
  47. package/dist/openapi/models/Delivery.d.ts +1 -1
  48. package/dist/openapi/models/Delivery.js +1 -1
  49. package/dist/openapi/models/DeliveryOutputRef.d.ts +1 -1
  50. package/dist/openapi/models/DeliveryOutputRef.js +1 -1
  51. package/dist/openapi/models/DeliveryPlan.d.ts +1 -1
  52. package/dist/openapi/models/DeliveryPlan.js +1 -1
  53. package/dist/openapi/models/DeliveryPlanOutput.d.ts +1 -1
  54. package/dist/openapi/models/DeliveryPlanOutput.js +1 -1
  55. package/dist/openapi/models/DeliveryPlanReason.d.ts +1 -1
  56. package/dist/openapi/models/DeliveryPlanReason.js +1 -1
  57. package/dist/openapi/models/DeliverySelection.d.ts +1 -1
  58. package/dist/openapi/models/DeliverySelection.js +1 -1
  59. package/dist/openapi/models/EndpointProjection.d.ts +98 -0
  60. package/dist/openapi/models/EndpointProjection.js +78 -0
  61. package/dist/openapi/models/ErrorEnvelope.d.ts +1 -1
  62. package/dist/openapi/models/ErrorEnvelope.js +1 -1
  63. package/dist/openapi/models/EstimateQuality.d.ts +1 -1
  64. package/dist/openapi/models/EstimateQuality.js +1 -1
  65. package/dist/openapi/models/EstimateRange.d.ts +1 -1
  66. package/dist/openapi/models/EstimateRange.js +1 -1
  67. package/dist/openapi/models/ExternalDestination.d.ts +1 -1
  68. package/dist/openapi/models/ExternalDestination.js +1 -1
  69. package/dist/openapi/models/ExternalImportCreatedResponse.d.ts +1 -1
  70. package/dist/openapi/models/ExternalImportCreatedResponse.js +1 -1
  71. package/dist/openapi/models/ExternalImportCreatedSuccessEnvelope.d.ts +1 -1
  72. package/dist/openapi/models/ExternalImportCreatedSuccessEnvelope.js +1 -1
  73. package/dist/openapi/models/ExternalImportRequest.d.ts +1 -1
  74. package/dist/openapi/models/ExternalImportRequest.js +1 -1
  75. package/dist/openapi/models/ExternalImportToken.d.ts +1 -1
  76. package/dist/openapi/models/ExternalImportToken.js +1 -1
  77. package/dist/openapi/models/ExternalSource.d.ts +1 -1
  78. package/dist/openapi/models/ExternalSource.js +1 -1
  79. package/dist/openapi/models/FeatureNotAvailableResponse.d.ts +1 -1
  80. package/dist/openapi/models/FeatureNotAvailableResponse.js +1 -1
  81. package/dist/openapi/models/FeatureTierRestrictedResponse.d.ts +1 -1
  82. package/dist/openapi/models/FeatureTierRestrictedResponse.js +1 -1
  83. package/dist/openapi/models/FeatureViolation.d.ts +1 -1
  84. package/dist/openapi/models/FeatureViolation.js +1 -1
  85. package/dist/openapi/models/JobDefinition.d.ts +17 -6
  86. package/dist/openapi/models/JobDefinition.js +1 -1
  87. package/dist/openapi/models/JobDownload.d.ts +1 -1
  88. package/dist/openapi/models/JobDownload.js +1 -1
  89. package/dist/openapi/models/JobInputV2.d.ts +16 -1
  90. package/dist/openapi/models/JobInputV2.js +1 -1
  91. package/dist/openapi/models/JobOutputSource.d.ts +1 -1
  92. package/dist/openapi/models/JobOutputSource.js +1 -1
  93. package/dist/openapi/models/JobResponse.d.ts +1 -1
  94. package/dist/openapi/models/JobResponse.js +1 -1
  95. package/dist/openapi/models/JobStatus.d.ts +1 -1
  96. package/dist/openapi/models/JobStatus.js +1 -1
  97. package/dist/openapi/models/JobType.d.ts +1 -1
  98. package/dist/openapi/models/JobType.js +1 -1
  99. package/dist/openapi/models/LivenessResponse.d.ts +1 -1
  100. package/dist/openapi/models/LivenessResponse.js +1 -1
  101. package/dist/openapi/models/LoginUser200Response.d.ts +1 -1
  102. package/dist/openapi/models/LoginUser200Response.js +1 -1
  103. package/dist/openapi/models/LoginUser200ResponseData.d.ts +1 -1
  104. package/dist/openapi/models/LoginUser200ResponseData.js +1 -1
  105. package/dist/openapi/models/LoginUser200ResponseDataUser.d.ts +1 -1
  106. package/dist/openapi/models/LoginUser200ResponseDataUser.js +1 -1
  107. package/dist/openapi/models/LoginUserRequest.d.ts +1 -1
  108. package/dist/openapi/models/LoginUserRequest.js +1 -1
  109. package/dist/openapi/models/LogoutUser200Response.d.ts +1 -1
  110. package/dist/openapi/models/LogoutUser200Response.js +1 -1
  111. package/dist/openapi/models/MetadataResponse.d.ts +1 -1
  112. package/dist/openapi/models/MetadataResponse.js +1 -1
  113. package/dist/openapi/models/MetadataResponseDimensions.d.ts +1 -1
  114. package/dist/openapi/models/MetadataResponseDimensions.js +1 -1
  115. package/dist/openapi/models/MetadataResponseExif.d.ts +1 -1
  116. package/dist/openapi/models/MetadataResponseExif.js +1 -1
  117. package/dist/openapi/models/MetadataResponseExifGps.d.ts +1 -1
  118. package/dist/openapi/models/MetadataResponseExifGps.js +1 -1
  119. package/dist/openapi/models/MetadataSuccessEnvelope.d.ts +1 -1
  120. package/dist/openapi/models/MetadataSuccessEnvelope.js +1 -1
  121. package/dist/openapi/models/MimeGroupSchema.d.ts +1 -1
  122. package/dist/openapi/models/MimeGroupSchema.js +1 -1
  123. package/dist/openapi/models/MultipartCompleteRequest.d.ts +1 -1
  124. package/dist/openapi/models/MultipartCompleteRequest.js +1 -1
  125. package/dist/openapi/models/MultipartCompleteRequestPartsInner.d.ts +1 -1
  126. package/dist/openapi/models/MultipartCompleteRequestPartsInner.js +1 -1
  127. package/dist/openapi/models/MultipartCompleteResponse.d.ts +1 -1
  128. package/dist/openapi/models/MultipartCompleteResponse.js +1 -1
  129. package/dist/openapi/models/MultipartCompleteSuccessEnvelope.d.ts +1 -1
  130. package/dist/openapi/models/MultipartCompleteSuccessEnvelope.js +1 -1
  131. package/dist/openapi/models/MultipartInitiateRequestMetadataHint.d.ts +1 -1
  132. package/dist/openapi/models/MultipartInitiateRequestMetadataHint.js +1 -1
  133. package/dist/openapi/models/MultipartInitiateResponse.d.ts +1 -1
  134. package/dist/openapi/models/MultipartInitiateResponse.js +1 -1
  135. package/dist/openapi/models/MultipartInitiateSuccessEnvelope.d.ts +1 -1
  136. package/dist/openapi/models/MultipartInitiateSuccessEnvelope.js +1 -1
  137. package/dist/openapi/models/MultipartKeepaliveResponse.d.ts +1 -1
  138. package/dist/openapi/models/MultipartKeepaliveResponse.js +1 -1
  139. package/dist/openapi/models/MultipartKeepaliveSuccessEnvelope.d.ts +1 -1
  140. package/dist/openapi/models/MultipartKeepaliveSuccessEnvelope.js +1 -1
  141. package/dist/openapi/models/MultipartPartListing.d.ts +1 -1
  142. package/dist/openapi/models/MultipartPartListing.js +1 -1
  143. package/dist/openapi/models/MultipartPresignRequest.d.ts +1 -1
  144. package/dist/openapi/models/MultipartPresignRequest.js +1 -1
  145. package/dist/openapi/models/MultipartPresignResponse.d.ts +1 -1
  146. package/dist/openapi/models/MultipartPresignResponse.js +1 -1
  147. package/dist/openapi/models/MultipartPresignSuccessEnvelope.d.ts +1 -1
  148. package/dist/openapi/models/MultipartPresignSuccessEnvelope.js +1 -1
  149. package/dist/openapi/models/MultipartStatusResponse.d.ts +1 -1
  150. package/dist/openapi/models/MultipartStatusResponse.js +1 -1
  151. package/dist/openapi/models/MultipartStatusSuccessEnvelope.d.ts +1 -1
  152. package/dist/openapi/models/MultipartStatusSuccessEnvelope.js +1 -1
  153. package/dist/openapi/models/OperationDefinition.d.ts +1 -1
  154. package/dist/openapi/models/OperationDefinition.js +1 -1
  155. package/dist/openapi/models/OperationDownload.d.ts +1 -1
  156. package/dist/openapi/models/OperationDownload.js +1 -1
  157. package/dist/openapi/models/OperationInputModel.d.ts +4 -3
  158. package/dist/openapi/models/OperationInputModel.js +4 -3
  159. package/dist/openapi/models/OperationResponse.d.ts +1 -1
  160. package/dist/openapi/models/OperationResponse.js +1 -1
  161. package/dist/openapi/models/OperationResult.d.ts +1 -1
  162. package/dist/openapi/models/OperationResult.js +1 -1
  163. package/dist/openapi/models/OperationResultMetrics.d.ts +1 -1
  164. package/dist/openapi/models/OperationResultMetrics.js +1 -1
  165. package/dist/openapi/models/OperationSchemaDefinition.d.ts +23 -2
  166. package/dist/openapi/models/OperationSchemaDefinition.js +4 -1
  167. package/dist/openapi/models/OperationStatus.d.ts +1 -1
  168. package/dist/openapi/models/OperationStatus.js +1 -1
  169. package/dist/openapi/models/OperationType.d.ts +10 -2
  170. package/dist/openapi/models/OperationType.js +11 -3
  171. package/dist/openapi/models/OperationsSchemaResponse.d.ts +29 -1
  172. package/dist/openapi/models/OperationsSchemaResponse.js +4 -1
  173. package/dist/openapi/models/OptionSchema.d.ts +2 -1
  174. package/dist/openapi/models/OptionSchema.js +3 -2
  175. package/dist/openapi/models/PerRoleCardinalityEntry.d.ts +47 -0
  176. package/dist/openapi/models/PerRoleCardinalityEntry.js +47 -0
  177. package/dist/openapi/models/PerValueAvailabilityEntry.d.ts +1 -1
  178. package/dist/openapi/models/PerValueAvailabilityEntry.js +1 -1
  179. package/dist/openapi/models/PresignedUrlPart.d.ts +1 -1
  180. package/dist/openapi/models/PresignedUrlPart.js +1 -1
  181. package/dist/openapi/models/ProbePendingResponse.d.ts +171 -0
  182. package/dist/openapi/models/ProbePendingResponse.js +75 -0
  183. package/dist/openapi/models/ProcessingClass.d.ts +1 -1
  184. package/dist/openapi/models/ProcessingClass.js +1 -1
  185. package/dist/openapi/models/ProcessingClassBandViolation.d.ts +1 -1
  186. package/dist/openapi/models/ProcessingClassBandViolation.js +1 -1
  187. package/dist/openapi/models/ProcessingClassExceedsBandResponse.d.ts +1 -1
  188. package/dist/openapi/models/ProcessingClassExceedsBandResponse.js +1 -1
  189. package/dist/openapi/models/ProcessingClassHint.d.ts +1 -1
  190. package/dist/openapi/models/ProcessingClassHint.js +1 -1
  191. package/dist/openapi/models/ProcessingClassReason.d.ts +1 -1
  192. package/dist/openapi/models/ProcessingClassReason.js +1 -1
  193. package/dist/openapi/models/ProcessingClassRejectReason.d.ts +1 -1
  194. package/dist/openapi/models/ProcessingClassRejectReason.js +1 -1
  195. package/dist/openapi/models/ProcessingPlan.d.ts +1 -1
  196. package/dist/openapi/models/ProcessingPlan.js +1 -1
  197. package/dist/openapi/models/ProcessingPlanJob.d.ts +1 -1
  198. package/dist/openapi/models/ProcessingPlanJob.js +1 -1
  199. package/dist/openapi/models/ReadinessResponse.d.ts +1 -1
  200. package/dist/openapi/models/ReadinessResponse.js +1 -1
  201. package/dist/openapi/models/ResponseEnvelope.d.ts +1 -1
  202. package/dist/openapi/models/ResponseEnvelope.js +1 -1
  203. package/dist/openapi/models/RetryResponse.d.ts +1 -1
  204. package/dist/openapi/models/RetryResponse.js +1 -1
  205. package/dist/openapi/models/RetrySuccessEnvelope.d.ts +1 -1
  206. package/dist/openapi/models/RetrySuccessEnvelope.js +1 -1
  207. package/dist/openapi/models/SseCompletionBase.d.ts +63 -0
  208. package/dist/openapi/models/SseCompletionBase.js +50 -0
  209. package/dist/openapi/models/SseEventType.d.ts +1 -1
  210. package/dist/openapi/models/SseEventType.js +1 -1
  211. package/dist/openapi/models/SseJobCompletedData.d.ts +1 -1
  212. package/dist/openapi/models/SseJobCompletedData.js +1 -1
  213. package/dist/openapi/models/SseJobFailedData.d.ts +1 -1
  214. package/dist/openapi/models/SseJobFailedData.js +1 -1
  215. package/dist/openapi/models/SseMultiOutputCompletion.d.ts +60 -0
  216. package/dist/openapi/models/SseMultiOutputCompletion.js +51 -0
  217. package/dist/openapi/models/SseMultiOutputCompletionMetrics.d.ts +38 -0
  218. package/dist/openapi/models/SseMultiOutputCompletionMetrics.js +43 -0
  219. package/dist/openapi/models/SseMultiOutputCompletionWithKind.d.ts +73 -0
  220. package/dist/openapi/models/SseMultiOutputCompletionWithKind.js +61 -0
  221. package/dist/openapi/models/SseMultiOutputResultEntry.d.ts +74 -0
  222. package/dist/openapi/models/SseMultiOutputResultEntry.js +51 -0
  223. package/dist/openapi/models/SseOperationCompletedData.d.ts +4 -4
  224. package/dist/openapi/models/SseOperationCompletedData.js +4 -4
  225. package/dist/openapi/models/SseOperationCompletionResult.d.ts +100 -0
  226. package/dist/openapi/models/SseOperationCompletionResult.js +47 -0
  227. package/dist/openapi/models/SseOperationFailedData.d.ts +1 -1
  228. package/dist/openapi/models/SseOperationFailedData.js +1 -1
  229. package/dist/openapi/models/SseOperationProgressData.d.ts +1 -1
  230. package/dist/openapi/models/SseOperationProgressData.js +1 -1
  231. package/dist/openapi/models/SseSingleOutputCompletion.d.ts +69 -0
  232. package/dist/openapi/models/SseSingleOutputCompletion.js +62 -0
  233. package/dist/openapi/models/SseWorkflowTerminalData.d.ts +1 -1
  234. package/dist/openapi/models/SseWorkflowTerminalData.js +1 -1
  235. package/dist/openapi/models/TierRestrictionKind.d.ts +1 -1
  236. package/dist/openapi/models/TierRestrictionKind.js +1 -1
  237. package/dist/openapi/models/TierRestrictionResponse.d.ts +1 -1
  238. package/dist/openapi/models/TierRestrictionResponse.js +1 -1
  239. package/dist/openapi/models/UploadConstraintsApplied.d.ts +1 -1
  240. package/dist/openapi/models/UploadConstraintsApplied.js +1 -1
  241. package/dist/openapi/models/UploadDurationExceedsTierResponse.d.ts +1 -1
  242. package/dist/openapi/models/UploadDurationExceedsTierResponse.js +1 -1
  243. package/dist/openapi/models/UploadFile403Response.d.ts +1 -1
  244. package/dist/openapi/models/UploadFile403Response.js +1 -1
  245. package/dist/openapi/models/UploadFile422Response.d.ts +1 -1
  246. package/dist/openapi/models/UploadFile422Response.js +1 -1
  247. package/dist/openapi/models/UploadProbeMediaMetadata.d.ts +1 -1
  248. package/dist/openapi/models/UploadProbeMediaMetadata.js +1 -1
  249. package/dist/openapi/models/UploadProbeProcessingClass.d.ts +1 -1
  250. package/dist/openapi/models/UploadProbeProcessingClass.js +1 -1
  251. package/dist/openapi/models/UploadProbeResponse.d.ts +4 -2
  252. package/dist/openapi/models/UploadProbeResponse.js +1 -1
  253. package/dist/openapi/models/UploadProbeStatus.d.ts +1 -1
  254. package/dist/openapi/models/UploadProbeStatus.js +1 -1
  255. package/dist/openapi/models/UploadProbeSuccessEnvelope.d.ts +56 -0
  256. package/dist/openapi/models/UploadProbeSuccessEnvelope.js +54 -0
  257. package/dist/openapi/models/UploadResponse.d.ts +1 -1
  258. package/dist/openapi/models/UploadResponse.js +1 -1
  259. package/dist/openapi/models/UploadSizeExceedsTierResponse.d.ts +1 -1
  260. package/dist/openapi/models/UploadSizeExceedsTierResponse.js +1 -1
  261. package/dist/openapi/models/UploadSource.d.ts +1 -1
  262. package/dist/openapi/models/UploadSource.js +1 -1
  263. package/dist/openapi/models/UploadSuccessEnvelope.d.ts +1 -1
  264. package/dist/openapi/models/UploadSuccessEnvelope.js +1 -1
  265. package/dist/openapi/models/UploadThresholds.d.ts +1 -1
  266. package/dist/openapi/models/UploadThresholds.js +1 -1
  267. package/dist/openapi/models/UserTier.d.ts +1 -1
  268. package/dist/openapi/models/UserTier.js +1 -1
  269. package/dist/openapi/models/ValidationErrorEnvelope.d.ts +1 -1
  270. package/dist/openapi/models/ValidationErrorEnvelope.js +1 -1
  271. package/dist/openapi/models/ValidationErrorEnvelopeDetailsInner.d.ts +1 -1
  272. package/dist/openapi/models/ValidationErrorEnvelopeDetailsInner.js +1 -1
  273. package/dist/openapi/models/WarningType.d.ts +1 -1
  274. package/dist/openapi/models/WarningType.js +1 -1
  275. package/dist/openapi/models/WebhookOperationContext.d.ts +1 -1
  276. package/dist/openapi/models/WebhookOperationContext.js +1 -1
  277. package/dist/openapi/models/WebhookPayload.d.ts +1 -1
  278. package/dist/openapi/models/WebhookPayload.js +1 -1
  279. package/dist/openapi/models/WorkflowCancelBillingEffect.d.ts +1 -1
  280. package/dist/openapi/models/WorkflowCancelBillingEffect.js +1 -1
  281. package/dist/openapi/models/WorkflowCancelResponse.d.ts +1 -1
  282. package/dist/openapi/models/WorkflowCancelResponse.js +1 -1
  283. package/dist/openapi/models/WorkflowCancelSuccessEnvelope.d.ts +1 -1
  284. package/dist/openapi/models/WorkflowCancelSuccessEnvelope.js +1 -1
  285. package/dist/openapi/models/WorkflowCreateRequest.d.ts +1 -1
  286. package/dist/openapi/models/WorkflowCreateRequest.js +1 -1
  287. package/dist/openapi/models/WorkflowCreateResponse.d.ts +1 -1
  288. package/dist/openapi/models/WorkflowCreateResponse.js +1 -1
  289. package/dist/openapi/models/WorkflowCreateSuccessEnvelope.d.ts +1 -1
  290. package/dist/openapi/models/WorkflowCreateSuccessEnvelope.js +1 -1
  291. package/dist/openapi/models/WorkflowDownloadResponse.d.ts +1 -1
  292. package/dist/openapi/models/WorkflowDownloadResponse.js +1 -1
  293. package/dist/openapi/models/WorkflowDownloadSuccessEnvelope.d.ts +1 -1
  294. package/dist/openapi/models/WorkflowDownloadSuccessEnvelope.js +1 -1
  295. package/dist/openapi/models/WorkflowEdge.d.ts +1 -1
  296. package/dist/openapi/models/WorkflowEdge.js +1 -1
  297. package/dist/openapi/models/WorkflowExpiredResponse.d.ts +1 -1
  298. package/dist/openapi/models/WorkflowExpiredResponse.js +1 -1
  299. package/dist/openapi/models/WorkflowPauseRequiredAction.d.ts +1 -1
  300. package/dist/openapi/models/WorkflowPauseRequiredAction.js +1 -1
  301. package/dist/openapi/models/WorkflowPausedDetail.d.ts +1 -1
  302. package/dist/openapi/models/WorkflowPausedDetail.js +1 -1
  303. package/dist/openapi/models/WorkflowPausedDetailLinks.d.ts +1 -1
  304. package/dist/openapi/models/WorkflowPausedDetailLinks.js +1 -1
  305. package/dist/openapi/models/WorkflowProcessing.d.ts +1 -1
  306. package/dist/openapi/models/WorkflowProcessing.js +1 -1
  307. package/dist/openapi/models/WorkflowResumeResponse.d.ts +1 -1
  308. package/dist/openapi/models/WorkflowResumeResponse.js +1 -1
  309. package/dist/openapi/models/WorkflowResumeSuccessEnvelope.d.ts +1 -1
  310. package/dist/openapi/models/WorkflowResumeSuccessEnvelope.js +1 -1
  311. package/dist/openapi/models/WorkflowSource.d.ts +1 -1
  312. package/dist/openapi/models/WorkflowSource.js +1 -1
  313. package/dist/openapi/models/WorkflowStatus.d.ts +1 -1
  314. package/dist/openapi/models/WorkflowStatus.js +1 -1
  315. package/dist/openapi/models/WorkflowStatusResponse.d.ts +1 -1
  316. package/dist/openapi/models/WorkflowStatusResponse.js +1 -1
  317. package/dist/openapi/models/WorkflowStatusSuccessEnvelope.d.ts +1 -1
  318. package/dist/openapi/models/WorkflowStatusSuccessEnvelope.js +1 -1
  319. package/dist/openapi/models/WorkflowWarning.d.ts +1 -1
  320. package/dist/openapi/models/WorkflowWarning.js +1 -1
  321. package/dist/openapi/models/WorkflowWarningSeverity.d.ts +1 -1
  322. package/dist/openapi/models/WorkflowWarningSeverity.js +1 -1
  323. package/dist/openapi/models/index.d.ts +11 -0
  324. package/dist/openapi/models/index.js +11 -0
  325. package/dist/openapi/runtime.d.ts +1 -1
  326. package/dist/openapi/runtime.js +1 -1
  327. package/dist/operations/audio_to_video.d.ts +20 -0
  328. package/dist/operations/audio_to_video.js +17 -0
  329. package/dist/operations/audio_to_video.metadata.d.ts +2 -0
  330. package/dist/operations/audio_to_video.metadata.js +29 -0
  331. package/dist/operations/image_watermark.d.ts +0 -18
  332. package/dist/operations/image_watermark.js +0 -12
  333. package/dist/operations/image_watermark.metadata.js +0 -41
  334. package/dist/operations/index.d.ts +8 -0
  335. package/dist/operations/index.js +8 -0
  336. package/dist/operations/metadata-types.d.ts +17 -0
  337. package/dist/operations/split.d.ts +50 -0
  338. package/dist/operations/split.js +34 -0
  339. package/dist/operations/split.metadata.d.ts +2 -0
  340. package/dist/operations/split.metadata.js +103 -0
  341. package/dist/operations/video_text_watermark.d.ts +31 -0
  342. package/dist/operations/video_text_watermark.js +22 -0
  343. package/dist/operations/video_text_watermark.metadata.d.ts +2 -0
  344. package/dist/operations/video_text_watermark.metadata.js +65 -0
  345. package/dist/operations/video_watermark.d.ts +18 -0
  346. package/dist/operations/video_watermark.js +13 -0
  347. package/dist/operations/video_watermark.metadata.d.ts +2 -0
  348. package/dist/operations/video_watermark.metadata.js +52 -0
  349. package/openapi/api.yaml +772 -72
  350. package/operations/schemas/audio_to_video.yaml +122 -0
  351. package/operations/schemas/compress.yaml +0 -3
  352. package/operations/schemas/convert.yaml +14 -1
  353. package/operations/schemas/image_watermark.yaml +15 -103
  354. package/operations/schemas/split.yaml +309 -0
  355. package/operations/schemas/thumbnail.yaml +7 -1
  356. package/operations/schemas/video_text_watermark.yaml +174 -0
  357. package/operations/schemas/video_watermark.yaml +136 -0
  358. package/package.json +8 -3
package/openapi/api.yaml CHANGED
@@ -75,7 +75,7 @@ info:
75
75
  of truth instead of hardcoding magic numbers. A runtime
76
76
  `GET /api/uploads/limits` endpoint for dynamic discovery
77
77
  (per-tier / per-environment overrides) is a deferred follow-up.
78
- version: 2.12.0
78
+ version: 2.17.0
79
79
  contact:
80
80
  name: API Support
81
81
 
@@ -103,6 +103,14 @@ tags:
103
103
  - name: AudioWatermark
104
104
  description: Steganographic audio watermark embed and decode
105
105
 
106
+ # Spec-root default per ADR-0016 D2: anonymous-OK unless overridden
107
+ # per-operation. Every inbound operation declares an explicit `security:`
108
+ # block (one of `[]`, `[{bearerAuth: []}, {sessionAuth: []}]`, or
109
+ # `[{}, {bearerAuth: []}, {sessionAuth: []}]`) so the contract is
110
+ # self-documenting — `[]` here protects against future endpoints that
111
+ # accidentally inherit a stricter default.
112
+ security: []
113
+
106
114
  paths:
107
115
  # ============================================
108
116
  # UPLOAD ENDPOINTS
@@ -122,6 +130,7 @@ paths:
122
130
  (10 MB). Files above this size MUST use the multipart upload flow
123
131
  instead (`POST /api/uploads/multipart/initiate`).
124
132
  operationId: uploadFile
133
+ security: [{}, {bearerAuth: []}, {sessionAuth: []}] # optional (anon-OK; auth attribution if present)
125
134
  tags:
126
135
  - Upload
127
136
  requestBody:
@@ -321,6 +330,7 @@ paths:
321
330
 
322
331
  After all parts are uploaded to S3, call the complete endpoint to finalise.
323
332
  operationId: multipartInitiate
333
+ security: [{}, {bearerAuth: []}, {sessionAuth: []}] # optional (anon-tolerant; manifest.userId pinned to caller if authed)
324
334
  tags:
325
335
  - Upload
326
336
  requestBody:
@@ -455,6 +465,8 @@ paths:
455
465
  rule and additionally refuse anonymous-initiated sessions
456
466
  outright (returning 403 `MULTIPART_SESSION_AUTH_REQUIRED`).
457
467
  operationId: multipartComplete
468
+ security: [{}, {bearerAuth: []}, {sessionAuth: []}] # optional (anon-tolerant; ownership-scoped per HxUmVr3Y when manifest.userId set)
469
+ x-identity-scoped: true # session/ownership-scoped per ADR-0016 D3
458
470
  tags:
459
471
  - Upload
460
472
  requestBody:
@@ -550,6 +562,8 @@ paths:
550
562
  Completion-readiness is client-derived (walk all pages, compare
551
563
  the count of returned parts to `total_parts`).
552
564
  operationId: multipartStatus
565
+ security: [{bearerAuth: []}, {sessionAuth: []}] # required (anon-initiated sessions rejected with MULTIPART_SESSION_AUTH_REQUIRED — see ErrorCode.authentication_required prose)
566
+ x-identity-scoped: true # session/ownership-scoped per ADR-0016 D3
553
567
  tags:
554
568
  - Upload
555
569
  parameters:
@@ -674,6 +688,8 @@ paths:
674
688
  **Authentication required.** Same `MULTIPART_SESSION_*` codes
675
689
  apply as on `/status`.
676
690
  operationId: multipartPresign
691
+ security: [{bearerAuth: []}, {sessionAuth: []}] # required (anon-initiated sessions rejected; resume-only endpoint)
692
+ x-identity-scoped: true # session/ownership-scoped per ADR-0016 D3
677
693
  tags:
678
694
  - Upload
679
695
  parameters:
@@ -793,6 +809,8 @@ paths:
793
809
  **Authentication required.** Same `MULTIPART_SESSION_*` codes
794
810
  apply as on `/status` and `/presign`.
795
811
  operationId: multipartKeepalive
812
+ security: [{bearerAuth: []}, {sessionAuth: []}] # required (anon-initiated sessions rejected; resume-only endpoint)
813
+ x-identity-scoped: true # session/ownership-scoped per ADR-0016 D3
796
814
  tags:
797
815
  - Upload
798
816
  parameters:
@@ -868,6 +886,8 @@ paths:
868
886
  - **Audio:** duration, bitrate, channels, sample_rate, codec
869
887
  - **Documents:** page_count, dimensions (for PDF)
870
888
  operationId: getUploadMetadata
889
+ security: [{}, {bearerAuth: []}, {sessionAuth: []}] # optional (anon-OK; identity-scoped to caller's session/identity)
890
+ x-identity-scoped: true # ownership-scoped per ADR-0016 D3
871
891
  tags:
872
892
  - Upload
873
893
  parameters:
@@ -955,6 +975,8 @@ paths:
955
975
  same `probed_at` timestamp + result (cached server-side per
956
976
  upload).
957
977
  operationId: probeUpload
978
+ security: [{bearerAuth: []}, {sessionAuth: []}] # required (explicit 401 in response set; ownership-scoped)
979
+ x-identity-scoped: true # ownership-scoped per ADR-0016 D3
958
980
  tags:
959
981
  - Upload
960
982
  x-availability: planned
@@ -968,82 +990,92 @@ paths:
968
990
  responses:
969
991
  '200':
970
992
  description: |
971
- Probe completed. The `probe_status` field indicates
993
+ Probe completed. The `data.probe_status` field indicates
972
994
  whether the file is workflow-ready (`ok`) or has issues
973
995
  that warrant exclusion / re-upload.
974
996
  content:
975
997
  application/json:
976
998
  schema:
977
- $ref: '#/components/schemas/UploadProbeResponse'
999
+ $ref: '#/components/schemas/UploadProbeSuccessEnvelope'
978
1000
  examples:
979
1001
  ok_short_form:
980
1002
  summary: Short-form clip probed cleanly
981
1003
  value:
982
- file_id: "019539ab-1111-7000-8000-000000000001"
983
- probe_status: "ok"
984
- media_metadata:
985
- duration_seconds: 187
986
- width: 1920
987
- height: 1080
988
- codec: "h264"
989
- container: "mp4"
990
- audio_layout: "stereo"
991
- probed_at: "2026-04-26T13:50:00Z"
992
- processing_class_pre_assignment: "short_form"
1004
+ success: true
1005
+ data:
1006
+ file_id: "019539ab-1111-7000-8000-000000000001"
1007
+ probe_status: "ok"
1008
+ media_metadata:
1009
+ duration_seconds: 187
1010
+ width: 1920
1011
+ height: 1080
1012
+ codec: "h264"
1013
+ container: "mp4"
1014
+ audio_layout: "stereo"
1015
+ probed_at: "2026-04-26T13:50:00Z"
1016
+ processing_class_pre_assignment: "short_form"
993
1017
  ok_long_form:
994
1018
  summary: Long-form clip — full M2 union populated (video + audio fields)
995
1019
  value:
996
- file_id: "019539ab-1111-7000-8000-000000000002"
997
- probe_status: "ok"
998
- media_metadata:
999
- duration_seconds: 5400
1000
- width: 3840
1001
- height: 2160
1002
- codec: "h265"
1003
- audio_codec: "aac"
1004
- container: "mp4"
1005
- fps: 23.976
1006
- bitrate_bps: 18000000
1007
- audio_layout: "stereo"
1008
- channels: 2
1009
- sample_rate_hz: 48000
1010
- probed_at: "2026-04-26T13:50:00Z"
1011
- processing_class_pre_assignment: "long_form"
1020
+ success: true
1021
+ data:
1022
+ file_id: "019539ab-1111-7000-8000-000000000002"
1023
+ probe_status: "ok"
1024
+ media_metadata:
1025
+ duration_seconds: 5400
1026
+ width: 3840
1027
+ height: 2160
1028
+ codec: "h265"
1029
+ audio_codec: "aac"
1030
+ container: "mp4"
1031
+ fps: 23.976
1032
+ bitrate_bps: 18000000
1033
+ audio_layout: "stereo"
1034
+ channels: 2
1035
+ sample_rate_hz: 48000
1036
+ probed_at: "2026-04-26T13:50:00Z"
1037
+ processing_class_pre_assignment: "long_form"
1012
1038
  corrupt:
1013
1039
  summary: File header damaged — caller should exclude
1014
1040
  value:
1015
- file_id: "019539ab-1111-7000-8000-000000000003"
1016
- probe_status: "corrupt"
1017
- media_metadata:
1018
- probed_at: "2026-04-26T13:50:00Z"
1019
- processing_class_pre_assignment: "blocked"
1041
+ success: true
1042
+ data:
1043
+ file_id: "019539ab-1111-7000-8000-000000000003"
1044
+ probe_status: "corrupt"
1045
+ media_metadata:
1046
+ probed_at: "2026-04-26T13:50:00Z"
1047
+ processing_class_pre_assignment: "blocked"
1020
1048
  unsupported_codec:
1021
1049
  summary: Container readable but codec unsupported
1022
1050
  value:
1023
- file_id: "019539ab-1111-7000-8000-000000000004"
1024
- probe_status: "unsupported_codec"
1025
- media_metadata:
1026
- duration_seconds: 600
1027
- width: 1280
1028
- height: 720
1029
- codec: "prores_4444"
1030
- container: "mov"
1031
- probed_at: "2026-04-26T13:50:00Z"
1032
- processing_class_pre_assignment: "blocked"
1051
+ success: true
1052
+ data:
1053
+ file_id: "019539ab-1111-7000-8000-000000000004"
1054
+ probe_status: "unsupported_codec"
1055
+ media_metadata:
1056
+ duration_seconds: 600
1057
+ width: 1280
1058
+ height: 720
1059
+ codec: "prores_4444"
1060
+ container: "mov"
1061
+ probed_at: "2026-04-26T13:50:00Z"
1062
+ processing_class_pre_assignment: "blocked"
1033
1063
  blocked_by_tier:
1034
1064
  summary: Free-tier caller probes a long-form clip
1035
1065
  value:
1036
- file_id: "019539ab-1111-7000-8000-000000000005"
1037
- probe_status: "ok"
1038
- media_metadata:
1039
- duration_seconds: 5400
1040
- width: 1920
1041
- height: 1080
1042
- codec: "h264"
1043
- container: "mp4"
1044
- audio_layout: "stereo"
1045
- probed_at: "2026-04-26T13:50:00Z"
1046
- processing_class_pre_assignment: "blocked"
1066
+ success: true
1067
+ data:
1068
+ file_id: "019539ab-1111-7000-8000-000000000005"
1069
+ probe_status: "ok"
1070
+ media_metadata:
1071
+ duration_seconds: 5400
1072
+ width: 1920
1073
+ height: 1080
1074
+ codec: "h264"
1075
+ container: "mp4"
1076
+ audio_layout: "stereo"
1077
+ probed_at: "2026-04-26T13:50:00Z"
1078
+ processing_class_pre_assignment: "blocked"
1047
1079
  '401':
1048
1080
  description: Authentication required.
1049
1081
  content:
@@ -1163,6 +1195,8 @@ paths:
1163
1195
  idempotency-key wire shape for retried reservation attempts
1164
1196
  is deferred per ADR-0001 §1.7 row 5.
1165
1197
  operationId: createWorkflow
1198
+ security: [{}, {bearerAuth: []}, {sessionAuth: []}] # optional (anon-OK on free-tier baseline; auth required for tier-gated operations)
1199
+ x-identity-scoped: true # request body dereferences upload file_ids — cross-identity references return 403 per ADR-0016 D3 (NOTE: §D4 ADR sample showed identity_scoped: false; B3 audit flipped to true per §D3 principle — SDK-acked 2026-05-28)
1166
1200
  tags:
1167
1201
  - Workflow
1168
1202
  requestBody:
@@ -1495,8 +1529,12 @@ paths:
1495
1529
  duck-type against. `FeatureNotAvailableResponse` carries
1496
1530
  `error_type: feature_not_available` + `violations[]`;
1497
1531
  `ProcessingClassExceedsBandResponse` carries `error_type:
1498
- processing_class_exceeds_band` + `violations[]`. The
1499
- `REQUIRES_REENCODE` flavour reuses `ValidationErrorEnvelope`
1532
+ processing_class_exceeds_band` + `violations[]`.
1533
+ `ProbePendingResponse` carries `error_type: probe_pending`
1534
+ + `job_ref` (and NO `violations[]` / `details[]`), emitted
1535
+ when the probe-pending gate is on and a job's upload has
1536
+ not yet been probed. The `REQUIRES_REENCODE` flavour reuses
1537
+ `ValidationErrorEnvelope`
1500
1538
  (a user-fixable validation error in the same family as
1501
1539
  `INVALID_OPTIONS`) and is distinguished by the stable
1502
1540
  `error: "REQUIRES_REENCODE"` string code rather than a new
@@ -1508,6 +1546,21 @@ paths:
1508
1546
  here because `ValidationErrorEnvelope` has no `error_type`
1509
1547
  field; OpenAPI 3.1 discriminators require the property to
1510
1548
  be present on every branch).
1549
+ headers:
1550
+ Retry-After:
1551
+ required: false
1552
+ description: |
1553
+ Optional, best-effort. Present only on the
1554
+ `probe_pending` branch — suggested seconds to wait
1555
+ before re-polling the upload probe and retrying the
1556
+ workflow. Delta-seconds (RFC 9110), mirroring the 429
1557
+ login path's `Retry-After` convention. Absent until the
1558
+ server-side probe-staleness bound (API `e1Idv6UL`)
1559
+ lands; consumers MUST treat absence as "retry on your
1560
+ own backoff schedule."
1561
+ schema:
1562
+ type: integer
1563
+ minimum: 0
1511
1564
  content:
1512
1565
  application/json:
1513
1566
  schema:
@@ -1515,6 +1568,7 @@ paths:
1515
1568
  - $ref: '#/components/schemas/ValidationErrorEnvelope'
1516
1569
  - $ref: '#/components/schemas/FeatureNotAvailableResponse'
1517
1570
  - $ref: '#/components/schemas/ProcessingClassExceedsBandResponse'
1571
+ - $ref: '#/components/schemas/ProbePendingResponse'
1518
1572
  examples:
1519
1573
  validation_error:
1520
1574
  summary: Generic validation error (legacy shape)
@@ -1541,6 +1595,19 @@ paths:
1541
1595
  documentation_url: "https://docs.giveitsmaller.com/operations/audio_overlay"
1542
1596
  - feature: "operation.merge.mime_group.image.option.transition.dissolve"
1543
1597
  availability: "experimental"
1598
+ probe_pending:
1599
+ summary: |
1600
+ Probe-pending gate is on and a single-op video
1601
+ compress references an upload whose server-side
1602
+ probe has not yet landed. Client polls the upload
1603
+ probe endpoint, then re-POSTs the workflow. The
1604
+ `Retry-After` header (5s here) hints the poll delay.
1605
+ value:
1606
+ success: false
1607
+ error: "Upload probe has not completed; poll the upload probe endpoint and retry"
1608
+ error_type: "probe_pending"
1609
+ job_ref: "job_0"
1610
+ message_key: "error.probe_pending"
1544
1611
  processing_class_exceeds_band_combined_size:
1545
1612
  summary: |
1546
1613
  merge job whose summed inputs (130 GB) exceed the
@@ -1613,6 +1680,8 @@ paths:
1613
1680
  Each operation includes its current progress and, when completed, its result
1614
1681
  (download URL, size, metrics).
1615
1682
  operationId: getWorkflowStatus
1683
+ security: [{}, {bearerAuth: []}, {sessionAuth: []}] # optional (anon-OK; identity-scoped to workflow owner)
1684
+ x-identity-scoped: true # workflow-ownership-scoped per ADR-0016 D3
1616
1685
  tags:
1617
1686
  - Workflow
1618
1687
  parameters:
@@ -1694,6 +1763,8 @@ paths:
1694
1763
  Each job's operations are listed with their output files and pre-signed
1695
1764
  download URLs.
1696
1765
  operationId: getWorkflowDownloads
1766
+ security: [{}, {bearerAuth: []}, {sessionAuth: []}] # optional (anon-OK; identity-scoped to workflow owner)
1767
+ x-identity-scoped: true # workflow-ownership-scoped per ADR-0016 D3
1697
1768
  tags:
1698
1769
  - Workflow
1699
1770
  parameters:
@@ -1766,7 +1837,38 @@ paths:
1766
1837
  event: workflow.completed
1767
1838
  data: {"workflow_id":"wf-uuid","status":"completed"}
1768
1839
  ```
1840
+
1841
+ **Reconnect & delivery semantics:**
1842
+
1843
+ Delivery is **at-least-once per connection with no client-driven
1844
+ resume**. The server does **not** read an inbound `Last-Event-ID`
1845
+ header; each connection re-derives state from scratch and replays
1846
+ every underlying stream from the start. Consequently **terminal events
1847
+ (`operation.completed` / `operation.failed`, `job.completed` /
1848
+ `job.failed`, `workflow.completed` / `workflow.failed` /
1849
+ `workflow.partially_failed`) are re-delivered on every (re)connection**.
1850
+ Within a single connection events are not duplicated (the cursor
1851
+ advances as events are sent), so duplicates only arise across
1852
+ reconnects. Clients MUST therefore treat the stream as idempotent and
1853
+ dedupe terminal events themselves (e.g. by `operation_id` + event type,
1854
+ or by workflow/job terminal status) rather than relying on
1855
+ resume-from-cursor. Resume-from-`Last-Event-ID` is **not** implemented;
1856
+ if added later it will be a separate, explicitly-specified feature.
1857
+
1858
+ **`id:` field (SSE event id):** emitted **only on operation frames**
1859
+ (`operation.progress` / `operation.completed` / `operation.failed`),
1860
+ where it carries the underlying stream's event id. **Transition frames**
1861
+ (`job.completed` / `job.failed`, `workflow.*`) carry **no `id:`**.
1862
+ Because there is no `Last-Event-ID` resume, any emitted `id:` is
1863
+ informational only — clients cannot use it to resume a stream.
1864
+
1865
+ **Framing vs payload:** the `Sse*Data` component schemas describe only
1866
+ the `data:` JSON payload of each event. The SSE envelope framing itself
1867
+ (the `id:` and `event:` lines) is transport-level and intentionally
1868
+ **not** schema-described.
1769
1869
  operationId: streamWorkflowEvents
1870
+ security: [{}, {bearerAuth: []}, {sessionAuth: []}] # optional (anon-OK; identity-scoped to workflow owner)
1871
+ x-identity-scoped: true # workflow-ownership-scoped per ADR-0016 D3
1770
1872
  tags:
1771
1873
  - Workflow
1772
1874
  parameters:
@@ -1830,6 +1932,8 @@ paths:
1830
1932
  cancel response is the binding "no further reservations
1831
1933
  will be made" signal.
1832
1934
  operationId: cancelWorkflow
1935
+ security: [{bearerAuth: []}, {sessionAuth: []}] # required (explicit 401 in response set)
1936
+ x-identity-scoped: true # workflow-ownership-scoped per ADR-0016 D3
1833
1937
  tags:
1834
1938
  - Workflow
1835
1939
  parameters:
@@ -1932,6 +2036,8 @@ paths:
1932
2036
  a 409 (no-op — the workflow is already running, terminal,
1933
2037
  or cancelled).
1934
2038
  operationId: resumeWorkflow
2039
+ security: [{bearerAuth: []}, {sessionAuth: []}] # required (explicit 401 in response set)
2040
+ x-identity-scoped: true # workflow-ownership-scoped per ADR-0016 D3
1935
2041
  tags:
1936
2042
  - Workflow
1937
2043
  parameters:
@@ -2053,6 +2159,7 @@ paths:
2053
2159
  on `OptionSchema` (ticket I17). Clients should use these to build
2054
2160
  dynamic forms with availability-aware UX.
2055
2161
  operationId: getOperationsSchema
2162
+ security: [{}, {bearerAuth: []}, {sessionAuth: []}] # optional (anon-OK returns free-tier baseline; auth tier-scopes the response)
2056
2163
  tags:
2057
2164
  - Operations
2058
2165
  parameters:
@@ -2215,6 +2322,8 @@ paths:
2215
2322
  The original failed operation is marked as `retried` and a new operation with
2216
2323
  a new ID is created in `pending` state.
2217
2324
  operationId: retryOperation
2325
+ security: [{}, {bearerAuth: []}, {sessionAuth: []}] # optional (anon-OK; identity-scoped to operation owner)
2326
+ x-identity-scoped: true # operation-ownership-scoped per ADR-0016 D3
2218
2327
  tags:
2219
2328
  - Operations
2220
2329
  parameters:
@@ -2268,6 +2377,7 @@ paths:
2268
2377
  summary: Liveness probe
2269
2378
  description: Kubernetes liveness probe endpoint
2270
2379
  operationId: liveness
2380
+ security: [] # anonymous (k8s probe — auth irrelevant)
2271
2381
  tags:
2272
2382
  - Health
2273
2383
  responses:
@@ -2285,6 +2395,7 @@ paths:
2285
2395
  summary: Readiness probe
2286
2396
  description: Kubernetes readiness probe endpoint - checks database and cache connectivity
2287
2397
  operationId: readiness
2398
+ security: [] # anonymous (k8s probe — auth irrelevant)
2288
2399
  tags:
2289
2400
  - Health
2290
2401
  responses:
@@ -2321,6 +2432,7 @@ paths:
2321
2432
  - `429` — infrastructure rate-limit (too many attempts in the current
2322
2433
  window). Distinct from `account_locked`, which is persisted state.
2323
2434
  operationId: loginUser
2435
+ security: [] # anonymous (entry point — you're logging in, no creds yet)
2324
2436
  tags:
2325
2437
  - Auth
2326
2438
  requestBody:
@@ -2508,6 +2620,8 @@ paths:
2508
2620
  endpoint since `AuthController.php:19-22`; this declaration
2509
2621
  catches the contract up).
2510
2622
  operationId: logoutUser
2623
+ security: [{bearerAuth: []}, {sessionAuth: []}] # required (logout requires an authenticated principal to invalidate)
2624
+ x-identity-scoped: true # identity-bound (caller's own session) per ADR-0016 D3 — by symmetry with credits/balance per §D4 sample
2511
2625
  tags:
2512
2626
  - Auth
2513
2627
  responses:
@@ -2602,6 +2716,14 @@ paths:
2602
2716
  per ADR-0001 §1.3); the runtime endpoint returns `404` until
2603
2717
  cross-repo wiring lands.
2604
2718
  operationId: createExternalImport
2719
+ # Auth: REQUIRED defensively. Endpoint is availability:planned (no
2720
+ # controller yet); but the endpoint stores encrypted server-side
2721
+ # secrets (bearer URLs, passwords) and anon-callable secret
2722
+ # storage is almost certainly wrong. Locking the contract here
2723
+ # while we still own the source of truth; runtime tightens to
2724
+ # match when the controller lands. Per ADR-0016 / karen review
2725
+ # on yN309QVb-B2.
2726
+ security: [{bearerAuth: []}, {sessionAuth: []}]
2605
2727
  x-availability: planned
2606
2728
  tags:
2607
2729
  - Upload
@@ -2708,6 +2830,7 @@ paths:
2708
2830
  `feature_not_available` (422) until the Lambda lands. Per
2709
2831
  Tension 1 (ADR-0001 §1.3).
2710
2832
  operationId: decodeAudioWatermark
2833
+ security: [{bearerAuth: []}, {sessionAuth: []}] # required (explicit 401 in response set; tier-gated runtime call)
2711
2834
  tags:
2712
2835
  - AudioWatermark
2713
2836
  x-availability: planned
@@ -2805,6 +2928,8 @@ paths:
2805
2928
  SDKs gate UI on `available_credits` for the spend-now affordance
2806
2929
  and on `tier` for tier-upgrade prompts.
2807
2930
  operationId: getCreditsBalance
2931
+ security: [{bearerAuth: []}, {sessionAuth: []}] # required (identity-scoped to caller's wallet)
2932
+ x-identity-scoped: true # caller's wallet — per ADR-0016 §D4 sample
2808
2933
  tags:
2809
2934
  - Billing
2810
2935
  responses:
@@ -2884,6 +3009,8 @@ paths:
2884
3009
 
2885
3010
  Default page is 20 transactions, ordered most-recent-first.
2886
3011
  operationId: getCreditsUsage
3012
+ security: [{bearerAuth: []}, {sessionAuth: []}] # required (identity-scoped to caller's usage history)
3013
+ x-identity-scoped: true # caller's usage history — per ADR-0016 D3
2887
3014
  tags:
2888
3015
  - Billing
2889
3016
  parameters:
@@ -3067,6 +3194,7 @@ paths:
3067
3194
  On success, returns 204 with no body. The API sends the message via its
3068
3195
  configured delivery channel (e.g. email, queue).
3069
3196
  operationId: submitContact
3197
+ security: [] # anonymous (public contact form)
3070
3198
  tags:
3071
3199
  - Contact
3072
3200
  requestBody:
@@ -3153,6 +3281,38 @@ webhooks:
3153
3281
  description: Callback acknowledged (no body)
3154
3282
 
3155
3283
  components:
3284
+ # Per ADR-0016: auth presence is modeled with OpenAPI-native
3285
+ # `security` / `securitySchemes` (NOT a custom `auth:` field) so codegen,
3286
+ # spectral, and oasdiff understand it natively. Two schemes — the same
3287
+ # Symfony `api` firewall accepts BOTH a bearer API-key and a login-session
3288
+ # cookie. Per-operation `security:` blocks OR the two schemes for the
3289
+ # three idioms (anonymous / required / optional). Spec root carries
3290
+ # `security: []` default (anonymous-OK); per-operation overrides flip
3291
+ # the requirement.
3292
+ securitySchemes:
3293
+ bearerAuth:
3294
+ type: http
3295
+ scheme: bearer
3296
+ description: |
3297
+ API-key bearer authentication. The `ApiKeyAuthenticator`
3298
+ (Symfony `api` firewall) validates
3299
+ `Authorization: Bearer <api-key>` per the prose under
3300
+ `ErrorCode.authentication_required`.
3301
+ sessionAuth:
3302
+ type: apiKey
3303
+ in: cookie
3304
+ name: PHPSESSID
3305
+ description: |
3306
+ Login-session cookie authentication. The `ApiEntryPoint`
3307
+ (Symfony `api` firewall) recognises an authenticated session
3308
+ when the cookie is present and the session has a valid
3309
+ principal. Set by `POST /api/auth/login`; cleared by
3310
+ `POST /api/auth/logout`. Cookie name `PHPSESSID` follows the
3311
+ Symfony / PHP default — no `framework.session.name` override
3312
+ in `compression/config/packages/framework.yaml` as of v2.16.6
3313
+ verification. Update this declaration if the API repo ever
3314
+ adds a `session.name` override.
3315
+
3156
3316
  schemas:
3157
3317
  # ============================================
3158
3318
  # SHARED PRIMITIVES
@@ -3498,6 +3658,62 @@ components:
3498
3658
  additionalProperties:
3499
3659
  $ref: '#/components/schemas/PerValueAvailabilityEntry'
3500
3660
 
3661
+ PerRoleCardinality:
3662
+ type: object
3663
+ description: |
3664
+ Map of role-name → `PerRoleCardinalityEntry`. Attached to
3665
+ a role-based multi-input operation's `per_role_cardinality`
3666
+ field to declare the required and maximum input count per
3667
+ role. **Cardinality overlay, not availability overlay** —
3668
+ sits alongside `PerValueAvailability` / `PerMimeAvailability`
3669
+ structurally but expresses a different concern.
3670
+
3671
+ Keys MUST be a subset of the `JobInputRole` enum
3672
+ (CI-checked by `scripts/check-per-role-cardinality.py`).
3673
+ The script additionally enforces arithmetic-consistency:
3674
+ `sum(role.min) == OperationSchemaDefinition.min_inputs`
3675
+ and `sum(role.max) == OperationSchemaDefinition.max_inputs`
3676
+ — this is the load-bearing invariant that makes the
3677
+ primitive useful.
3678
+
3679
+ Absence of `per_role_cardinality` on a role-based op keeps
3680
+ the current prose-only semantics (image_watermark /
3681
+ audio_overlay / custom_luma encode their role rules in
3682
+ prose at `JobInputRole`'s description today; migration to
3683
+ predicate form is per-op follow-up work).
3684
+
3685
+ Per ticket [`SlluxMBN`](https://trello.com/c/SlluxMBN) /
3686
+ ADR-0015. Consumed by `OperationInputRoleValidator` in
3687
+ `compression_api` (rule table becomes data-driven) and by
3688
+ SDK generators when emitting typed role-binding helpers.
3689
+ additionalProperties:
3690
+ $ref: '#/components/schemas/PerRoleCardinalityEntry'
3691
+
3692
+ PerRoleCardinalityEntry:
3693
+ type: object
3694
+ description: |
3695
+ Per-role cardinality entry. `min: 0` makes the role optional.
3696
+ `max: 1` is the most common upper bound (one base, one
3697
+ overlay); future role-based ops may declare higher maxima
3698
+ (e.g. multi-overlay video composites). Both fields default to
3699
+ `1` when absent on a role key — but consumers SHOULD treat
3700
+ absence of either field as a contract bug surfaced by
3701
+ `scripts/check-per-role-cardinality.py` rather than silently
3702
+ defaulting.
3703
+ required:
3704
+ - min
3705
+ - max
3706
+ properties:
3707
+ min:
3708
+ type: integer
3709
+ minimum: 0
3710
+ description: Minimum input count for this role (0 = optional).
3711
+ max:
3712
+ type: integer
3713
+ minimum: 1
3714
+ description: |
3715
+ Maximum input count for this role. MUST be >= `min`.
3716
+
3501
3717
  # ============================================
3502
3718
  # EXTERNAL SOURCES + DESTINATIONS
3503
3719
  # ============================================
@@ -4745,6 +4961,54 @@ components:
4745
4961
  items:
4746
4962
  $ref: '#/components/schemas/FeatureViolation'
4747
4963
 
4964
+ ProbePendingResponse:
4965
+ description: |
4966
+ 422 response on `POST /api/workflows` when the probe-pending
4967
+ gate (API `av1J0rEF`, shipped behind a default-OFF feature flag)
4968
+ is enabled and a job references an upload whose server-side
4969
+ probe has not yet completed at workflow-create time. Rather than
4970
+ silently routing the job as `short_form` (which hard-fails long
4971
+ video clips), the server rejects with this envelope so the
4972
+ client can recover deterministically.
4973
+
4974
+ **Recovery contract.** Poll `POST /api/uploads/{id}/probe` for
4975
+ the pending upload until its `probe_status` is terminal
4976
+ (`ok` → re-`POST /api/workflows` the same request; `corrupt` /
4977
+ `unsupported_codec` → surface the probe error, do not retry).
4978
+ The `Retry-After` response header (when present) carries the
4979
+ suggested delay in seconds before the next poll/retry.
4980
+
4981
+ Delivered alongside `ValidationErrorEnvelope`,
4982
+ `FeatureNotAvailableResponse`, and
4983
+ `ProcessingClassExceedsBandResponse` via the naked `oneOf` on
4984
+ the 422 response — duck-typed on required-field shape: this
4985
+ branch is the only one carrying `error_type: probe_pending`
4986
+ and it has neither `details` (ValidationErrorEnvelope) nor
4987
+ `violations` (the other two typed envelopes), so it matches
4988
+ exactly one branch.
4989
+ allOf:
4990
+ - $ref: '#/components/schemas/ErrorEnvelope'
4991
+ - type: object
4992
+ required:
4993
+ - error_type
4994
+ - job_ref
4995
+ properties:
4996
+ error_type:
4997
+ type: string
4998
+ enum:
4999
+ - probe_pending
5000
+ description: Discriminator for the 422 oneOf. Always `probe_pending`.
5001
+ job_ref:
5002
+ type: string
5003
+ description: |
5004
+ Workflow-local identifier of the job whose upload-probe
5005
+ has not landed — `JobDefinition.id` if the caller
5006
+ supplied one, else the auto-generated `job_N` token.
5007
+ Mirrors `ProcessingClassBandViolation.job_ref`; NOT
5008
+ `format: uuid` because workflow-create rejects fire
5009
+ before server-side UUIDs are assigned.
5010
+ example: "job_0"
5011
+
4748
5012
  ProcessingClassRejectReason:
4749
5013
  type: string
4750
5014
  description: |
@@ -5154,7 +5418,7 @@ components:
5154
5418
  - thumbnail_office: Office document (DOCX/XLSX/PPTX/ODT/ODS/ODP)
5155
5419
  thumbnail sub-type. Backed by a dedicated LibreOffice Lambda.
5156
5420
  Not yet emitted.
5157
- - image_watermark: Image overlay (file or external_source) onto a base media asset. Multi-input (Path B with role: base + overlay). Stable for image bases (jpeg/png/webp); animated GIF and video bases are advertised as `planned` via parallel mime_groups (`image_gif`, `video`) — dispatch returns `feature_not_available` (422) until Lambda support ships. Per ADR-0004 + I4-CONS + I5 (Trello AKZiOXnd).
5421
+ - image_watermark: Image overlay (file or external_source) onto a base IMAGE asset. Multi-input (Path B with role: base + overlay). Stable for static-image bases (jpeg/png/webp); animated GIF is advertised as `planned` via the `image_gif` mime_group — dispatch returns `feature_not_available` (422) until Lambda support ships. Video bases are NOT supported by image_watermark — use the dedicated `video_watermark` operation per ADR-0013. Per ADR-0004 + I4-CONS + I5 (Trello AKZiOXnd).
5158
5422
  - text_watermark: Text overlay rendered onto an image (Liberation Sans). Single-input. Per ADR-0004 + I4-CONS.
5159
5423
  - merge: Concatenate/combine multiple files into one (images, video, audio). Multi-input. Image inputs merge into animated GIF or slideshow video; image collage/grid and PDF concatenation are not supported by the V1 Lambda.
5160
5424
  - archive: Bundle files into ZIP/tar.gz (all types). Multi-input.
@@ -5162,6 +5426,10 @@ components:
5162
5426
  - custom_luma: Apply a caller-uploaded luma matte to a base video for a custom luma-matte transition effect. Multi-input (`role: base` + `role: transition_mask`). `availability: planned` + `required_tier: pro`; dispatch returns `feature_not_available` (422) until Lambda ships. Distinct from FFmpeg `xfade=custom` (which is an expression, not an operation). Per ticket I29 (Trello EPUE5Vs1).
5163
5427
  - audio_overlay: Mix a secondary audio asset over a primary audio or video base (DJ tags, podcast intros/outros, station IDs, jingles). Multi-input (`role: base` + `role: overlay`). `availability: planned`; dispatch returns `feature_not_available` (422) until Lambda ships. **NOT** the same as `audio_watermark` — that operation is steganographic (imperceptible identifier embedded for ownership tracking), tracked separately by I20. Per ticket I19 (Trello Xr3Z4GBF).
5164
5428
  - audio_watermark: Embed a steganographic forensic watermark into an audio asset (or a video's audio track) — Cinavia / Resemble PerTh territory. Single-input. `availability: planned` + `required_tier: enterprise`; dispatch returns `feature_not_available` (422) until Lambda ships. Pairs with `POST /api/audio-watermark/decode` for own-watermarks-only extraction. Per ticket I20 (Trello omiCq7Vn).
5429
+ - audio_to_video: Produce a video from an audio input plus an OPTIONAL still image overlay. Multi-input role-based with the first OPTIONAL role on the contract (`role: base` audio required, `role: overlay` image 0..1 — see `per_role_cardinality`). When overlay is omitted, the video uses a solid background colour. `availability: planned`; dispatch returns `feature_not_available` (422) until Lambda ships. Per ticket [`SlluxMBN`](https://trello.com/c/SlluxMBN) + ADR-0015 (introduces `per_role_cardinality` vocab).
5430
+ - video_watermark: Apply an image overlay onto a base video via FFmpeg's `overlay` filter. Multi-input role-based (`role: base` video + `role: overlay` image, exactly one of each per `per_role_cardinality`). Re-encode required; audio stream-copy passthrough. Distinct from `image_watermark` (pure-Rust/image-only). `availability: planned`; dispatch returns `feature_not_available` (422) until Lambda ships. Per ticket [`4NrRPCgh`](https://trello.com/c/4NrRPCgh) + ADR-0013.
5431
+ - video_text_watermark: Render a text overlay onto a base video via FFmpeg's `drawtext` filter. Single-input — text and styling in options. Same `watermark_mode` (single/tiled), anchor + margin vocab as `text_watermark`. Re-encode required; audio stream-copy passthrough. `availability: planned`; dispatch returns `feature_not_available` (422) until Lambda ships. Per ticket [`4NrRPCgh`](https://trello.com/c/4NrRPCgh) + ADR-0013.
5432
+ - split: Fan one input file into N outputs across GIF / PDF / audio / video MIME families. Single-input per-mime-group catalog (mirrors merge/convert): GIF uses `frame_range` (REQUIRED) + `output_format`; PDF uses `page_range` OR `page_groups` (mutually exclusive); audio + video use a `mode` discriminator (interval/count/cut_points) + numeric-seconds wire format + `precision` flag (fast/exact). 200-output hard cap per ADR-0009 §D5 with per-mode preflight math; output naming `output-001..output-200`. Long-form video routes to a separate `split-video-fargate` worker via `processing_class`. `availability: planned`; dispatch returns `feature_not_available` (422) until Lambda ships. Per ticket [`vKI0CFDu`](https://trello.com/c/vKI0CFDu) + ADR-0014.
5165
5433
 
5166
5434
  Both the legacy `thumbnail` value and the four sub-type values
5167
5435
  are valid routing targets today during the thumbnail migration
@@ -5186,6 +5454,10 @@ components:
5186
5454
  - custom_luma
5187
5455
  - audio_overlay
5188
5456
  - audio_watermark
5457
+ - audio_to_video
5458
+ - video_watermark
5459
+ - video_text_watermark
5460
+ - split
5189
5461
 
5190
5462
  OperationInputModel:
5191
5463
  type: string
@@ -5193,8 +5465,9 @@ components:
5193
5465
  Whether the operation accepts a single file or multiple files:
5194
5466
  - single: One input file (compress, thumbnail, thumbnail_image,
5195
5467
  thumbnail_video, thumbnail_document, thumbnail_office,
5196
- text_watermark, convert, audio_watermark)
5197
- - multi: Multiple input files (merge, archive, image_watermark, custom_luma, audio_overlay)
5468
+ text_watermark, convert, audio_watermark,
5469
+ video_text_watermark, split)
5470
+ - multi: Multiple input files (merge, archive, image_watermark, custom_luma, audio_overlay, audio_to_video, video_watermark). audio_to_video is the first role-based op with an OPTIONAL role (min_inputs=1, max_inputs=2 — see `per_role_cardinality`); video_watermark mirrors `image_watermark`'s 2-required pattern on video bases.
5198
5471
  enum:
5199
5472
  - single
5200
5473
  - multi
@@ -6142,10 +6415,21 @@ components:
6142
6415
  type: array
6143
6416
  description: |
6144
6417
  Multi-input list for `merge`, `archive`, `image_watermark`,
6145
- `custom_luma`, and `audio_overlay`. Each entry is a
6146
- `JobInputV2` with its own `WorkflowSource`. Mutually
6147
- exclusive with `source`.
6148
- minItems: 2
6418
+ `custom_luma`, `audio_overlay`, and `audio_to_video`. Each
6419
+ entry is a `JobInputV2` with its own `WorkflowSource`.
6420
+ Mutually exclusive with `source` — the V2 shape boundary
6421
+ stays `source` (single-input) XOR `inputs[]` (multi-input
6422
+ role-based) per ADR-0004 / I12.
6423
+
6424
+ **Minimum input count = sum of role minima** declared in
6425
+ the operation's `per_role_cardinality` (per ticket
6426
+ [`SlluxMBN`](https://trello.com/c/SlluxMBN) ADR-0015).
6427
+ `audio_to_video` requires 1 input (`base` audio; `overlay`
6428
+ optional, 0..1); all other role-based ops require 2+ today.
6429
+ The schema floor here is `minItems: 1` to admit the
6430
+ audio_to_video case; per-operation gates enforce the
6431
+ actual count via `OperationSchemaDefinition.min_inputs`.
6432
+ minItems: 1
6149
6433
  items:
6150
6434
  $ref: '#/components/schemas/JobInputV2'
6151
6435
  operations:
@@ -6157,8 +6441,8 @@ components:
6157
6441
 
6158
6442
  Multi-input jobs (with `inputs[]`) must have exactly one
6159
6443
  operation, and it must be a multi-input type (`merge`,
6160
- `archive`, `image_watermark`, `custom_luma`, or
6161
- `audio_overlay`).
6444
+ `archive`, `image_watermark`, `custom_luma`,
6445
+ `audio_overlay`, or `audio_to_video`).
6162
6446
  items:
6163
6447
  $ref: '#/components/schemas/OperationDefinition'
6164
6448
  deliver:
@@ -6189,7 +6473,7 @@ components:
6189
6473
  items:
6190
6474
  properties:
6191
6475
  type:
6192
- enum: [merge, archive, image_watermark, custom_luma, audio_overlay]
6476
+ enum: [merge, archive, image_watermark, custom_luma, audio_overlay, audio_to_video, video_watermark]
6193
6477
  required: [operations]
6194
6478
  description: |
6195
6479
  Multi-input jobs must have exactly one operation, and it
@@ -6236,6 +6520,21 @@ components:
6236
6520
  `overlay` value already declared for `image_watermark`
6237
6521
  — semantics differ by operation type, but the same
6238
6522
  role label keeps the enum compact.
6523
+ - `audio_to_video`: REQUIRED `base` (audio source); OPTIONAL
6524
+ `overlay` (still image, 0..1). FIRST role-based op with
6525
+ an OPTIONAL role — see `per_role_cardinality` for the
6526
+ machine-readable cardinality declaration (per ticket
6527
+ [`SlluxMBN`](https://trello.com/c/SlluxMBN) /
6528
+ ADR-0015). Reuses `base` + `overlay` role values
6529
+ already declared for `image_watermark` / `audio_overlay`.
6530
+ - `video_watermark`: REQUIRED; values `base` (the source
6531
+ video) or `overlay` (the watermark image). Exactly one
6532
+ of each per job — `per_role_cardinality { base: 1/1,
6533
+ overlay: 1/1 }`. First non-introductory adoption of the
6534
+ `per_role_cardinality` vocab (per ticket
6535
+ [`4NrRPCgh`](https://trello.com/c/4NrRPCgh) /
6536
+ ADR-0013). `video_text_watermark` is single-input (no
6537
+ `role` field — text comes from options).
6239
6538
  - `merge` / `archive`: omit (all inputs share the same role).
6240
6539
 
6241
6540
  `text_watermark` is single-input via `JobDefinition.source`
@@ -6867,7 +7166,9 @@ components:
6867
7166
  UploadProbeResponse:
6868
7167
  type: object
6869
7168
  description: |
6870
- Response body for `POST /api/uploads/{id}/probe` per ticket
7169
+ Payload schema carried on the `data` field of
7170
+ `UploadProbeSuccessEnvelope` returned by
7171
+ `POST /api/uploads/{id}/probe`, per ticket
6871
7172
  [I28 `KbVAnGCm`](https://trello.com/c/KbVAnGCm). Designed
6872
7173
  so SDKs can compile a `client.preflight_clips([file_ids])`
6873
7174
  helper into N parallel probes and aggregate by
@@ -6888,6 +7189,29 @@ components:
6888
7189
  processing_class_pre_assignment:
6889
7190
  $ref: '#/components/schemas/UploadProbeProcessingClass'
6890
7191
 
7192
+ UploadProbeSuccessEnvelope:
7193
+ type: object
7194
+ description: |
7195
+ Success envelope wrapping `UploadProbeResponse` on
7196
+ `POST /api/uploads/{id}/probe` 200 responses, per ticket
7197
+ [`9XlWEnZU`](https://trello.com/c/9XlWEnZU). Mirrors the
7198
+ spec-wide `*SuccessEnvelope` convention (`{success: true,
7199
+ data: <payload>}`) used by every other 2xx endpoint; the
7200
+ probe endpoint shipped during the v2.3 declared-but-pending
7201
+ phase missing the wrap. The API
7202
+ (`ApiResponseTrait::respondSuccess` in `compression_api`)
7203
+ already emits this shape — the envelope brings the contract
7204
+ in line with the wire.
7205
+ required:
7206
+ - success
7207
+ - data
7208
+ properties:
7209
+ success:
7210
+ type: boolean
7211
+ enum: [true]
7212
+ data:
7213
+ $ref: '#/components/schemas/UploadProbeResponse'
7214
+
6891
7215
  # ============================================
6892
7216
  # UPLOAD-SIDE GATING (per ticket I15-CONS F8.1)
6893
7217
  # ============================================
@@ -7479,7 +7803,289 @@ components:
7479
7803
  type: integer
7480
7804
  const: 100
7481
7805
  result:
7482
- $ref: '#/components/schemas/OperationResult'
7806
+ $ref: '#/components/schemas/SseOperationCompletionResult'
7807
+
7808
+ SseOperationCompletionResult:
7809
+ description: |
7810
+ Result payload carried on the SSE `operation.completed` event
7811
+ (`SseOperationCompletedData.result`). A 2-branch `oneOf` mirroring the
7812
+ single-output vs multi-output completion split of the AsyncAPI
7813
+ `OperationResult` union (per [ADR-0009](../docs/decisions/0009-multi-output-result-envelope.md)),
7814
+ projected into the client-facing (download-URL) shape rather than the
7815
+ S3-wire shape.
7816
+
7817
+ - **Single-output**: `SseSingleOutputCompletion` (allOf wrap of
7818
+ `OperationResult` + a `result_kind: "single"` discriminator field).
7819
+ `download_url` + `size_bytes`, optional `export_key` / `metrics`. Every
7820
+ operation that produces one canonical output.
7821
+ - **Multi-output**: `SseMultiOutputCompletionWithKind` (allOf wrap of
7822
+ `SseMultiOutputCompletion` + a `result_kind: "multi"` discriminator
7823
+ field). `outputs[]` + `total_output_size_bytes`. Used by convert
7824
+ PDF->image and future fan-out operations.
7825
+
7826
+ Failure is **not** a branch here — it is carried by the separate
7827
+ `operation.failed` event (`SseOperationFailedData`), unlike the AsyncAPI
7828
+ `OperationResult` which folds failure into the same union.
7829
+
7830
+ **Branch dispatch via `result_kind` discriminator.** The branches are
7831
+ disambiguated by an explicit `result_kind` field (`"single"` |
7832
+ `"multi"`) that the API SSE emitter populates. The wrapper allOf shape
7833
+ keeps the underlying `OperationResult` and `SseMultiOutputCompletion`
7834
+ schemas unchanged (they continue to be used elsewhere — REST polling,
7835
+ AsyncAPI Lambda→API — without the discriminator). The discriminator
7836
+ approach replaces the v2.15.1 bare-`$ref` design, which dispatched
7837
+ correctly at validation but generated TS deserialization code that
7838
+ checked camelCase property names against snake_case wire payloads —
7839
+ silent data-loss on every single-output completion. The
7840
+ discriminator-based dispatch reads the snake_case wire key directly
7841
+ (`switch (json['result_kind'])`), avoiding the case-mismatch bug
7842
+ entirely.
7843
+
7844
+ **v2.16.1 attempted PHP-template fix (superseded by v2.16.5).**
7845
+ The v2.16.1 cut introduced the shared `SseCompletionBase`
7846
+ schema declaring `result_kind: { enum: [single, multi] }` (both
7847
+ literal values together) and had the branch wrappers
7848
+ allOf-merge it. The intent was to fix the v2.15.3 design where
7849
+ `result_kind` was declared only as `enum: [single]` /
7850
+ `enum: [multi]` inside each branch's inline `allOf` block —
7851
+ which made the openapi-generator PHP template flatten only one
7852
+ branch's enum into `getResultKindAllowableValues()`. The
7853
+ v2.16.1 verification at the time confirmed PHP emitted both
7854
+ values, but against the v2.15.3-generated tree, not against a
7855
+ fresh v2.16.1 regen. SDKs later caught (via codex on the
7856
+ v2.16.3 regen, surfaced by ChSmslxj) that v2.16.1's shared-base
7857
+ fix did NOT actually propagate through the PHP template — the
7858
+ template visits each oneOf branch's allOf and only flattens the
7859
+ per-branch single-value enum, NOT the shared base's full-union
7860
+ enum. PHP root model still emitted `RESULT_KIND_MULTI` only
7861
+ (the second branch's value). SseCompletionBase is RETAINED in
7862
+ v2.16.5 for documentation + JSON Schema branch identification
7863
+ + consumers that traverse the allOf chain, but on its own it
7864
+ is NOT load-bearing for PHP correctness.
7865
+
7866
+ **v2.16.5 ChSmslxj PHP-template fix (load-bearing).**
7867
+ Declares `result_kind` with the full `enum: [single, multi]`
7868
+ directly on the ROOT `SseOperationCompletionResult` schema as
7869
+ a sibling of `oneOf` and `discriminator` (with `type: object`
7870
+ + `required: [result_kind]`). The openapi-generator PHP
7871
+ template flattens this root enum cleanly into
7872
+ `getResultKindAllowableValues()`, emitting both
7873
+ `RESULT_KIND_SINGLE` and `RESULT_KIND_MULTI`. The triple
7874
+ declaration (root + SseCompletionBase + per-branch wrappers)
7875
+ is harmless redundancy: the root carries the full union for
7876
+ the PHP template; SseCompletionBase carries the full union
7877
+ for allOf-chain consumers; per-branch wrappers pin to a
7878
+ single literal value for OpenAPI discriminator semantics +
7879
+ JSON Schema branch identification. TypeScript dispatch is
7880
+ unchanged (`switch (json['result_kind'])` reads the
7881
+ snake_case wire key directly — verified on openapi-generator-
7882
+ cli v7.21.0).
7883
+ type: object
7884
+ required:
7885
+ - result_kind
7886
+ properties:
7887
+ result_kind:
7888
+ type: string
7889
+ enum: [single, multi]
7890
+ description: |
7891
+ Discriminator field. The full `[single, multi]` enum is
7892
+ declared directly on the root (this object) so the
7893
+ openapi-generator PHP template flattens both literal
7894
+ values into `getResultKindAllowableValues()` per
7895
+ ChSmslxj. Also declared on the shared `SseCompletionBase`
7896
+ (retained for consumers that traverse the allOf chain)
7897
+ and on each per-branch wrapper (single-value enum pinning
7898
+ the branch). The triple declaration is harmless redundancy
7899
+ necessary for PHP template flattening.
7900
+ oneOf:
7901
+ - $ref: '#/components/schemas/SseSingleOutputCompletion'
7902
+ - $ref: '#/components/schemas/SseMultiOutputCompletionWithKind'
7903
+ discriminator:
7904
+ propertyName: result_kind
7905
+ mapping:
7906
+ single: '#/components/schemas/SseSingleOutputCompletion'
7907
+ multi: '#/components/schemas/SseMultiOutputCompletionWithKind'
7908
+
7909
+ SseCompletionBase:
7910
+ type: object
7911
+ description: |
7912
+ Shared base schema for the two `SseOperationCompletionResult`
7913
+ branches. Declares the `result_kind` discriminator field as a
7914
+ `[single, multi]` enum with both literal values, then each branch
7915
+ wrapper allOf-merges this base + its body schema.
7916
+
7917
+ **Rationale (v2.16.1):** the v2.15.3 design declared `result_kind`
7918
+ as a single-value `enum [single]` / `enum [multi]` inside each
7919
+ branch's inline `allOf` block. The openapi-generator PHP template
7920
+ for this shape flattens only the FIRST branch's discriminator enum
7921
+ into the root `getResultKindAllowableValues()` list, so PHP
7922
+ deserialisation rejects the other branch's wire value as invalid.
7923
+ Promoting `result_kind` to a shared base with the full union
7924
+ `enum [single, multi]` makes PHP accept both values; the
7925
+ per-branch `enum [single]` / `enum [multi]` (kept on the wrappers
7926
+ for JSON Schema-level branch identification + OpenAPI
7927
+ discriminator semantics) does not regress. TypeScript dispatch
7928
+ continues to use `switch (json['result_kind'])` — confirmed by
7929
+ codegen verification on openapi-generator-cli v7.21.0.
7930
+ required:
7931
+ - result_kind
7932
+ properties:
7933
+ result_kind:
7934
+ type: string
7935
+ enum: [single, multi]
7936
+ description: |
7937
+ Discriminator field on `SseOperationCompletionResult`. The
7938
+ API SSE serializer emits `"single"` for single-output
7939
+ completion payloads and `"multi"` for multi-output payloads;
7940
+ generated SDK dispatch routes on this value to pick the
7941
+ correct branch deserializer.
7942
+
7943
+ SseSingleOutputCompletion:
7944
+ description: |
7945
+ Single-output branch of `SseOperationCompletionResult` — wraps
7946
+ `OperationResult` + the shared `SseCompletionBase` + pins
7947
+ `result_kind` to the literal `"single"`. See
7948
+ `SseOperationCompletionResult` description for the rationale +
7949
+ codegen-quirk context.
7950
+ allOf:
7951
+ - $ref: '#/components/schemas/OperationResult'
7952
+ - $ref: '#/components/schemas/SseCompletionBase'
7953
+ - type: object
7954
+ properties:
7955
+ result_kind:
7956
+ type: string
7957
+ enum: [single]
7958
+
7959
+ SseMultiOutputCompletionWithKind:
7960
+ description: |
7961
+ Multi-output branch of `SseOperationCompletionResult` — wraps
7962
+ `SseMultiOutputCompletion` + the shared `SseCompletionBase` +
7963
+ pins `result_kind` to the literal `"multi"`. See
7964
+ `SseOperationCompletionResult` description for the rationale +
7965
+ codegen-quirk context.
7966
+ allOf:
7967
+ - $ref: '#/components/schemas/SseMultiOutputCompletion'
7968
+ - $ref: '#/components/schemas/SseCompletionBase'
7969
+ - type: object
7970
+ properties:
7971
+ result_kind:
7972
+ type: string
7973
+ enum: [multi]
7974
+
7975
+ SseMultiOutputCompletion:
7976
+ type: object
7977
+ description: |
7978
+ Multi-output completion body for the SSE `operation.completed` event.
7979
+ Per-output details plus an aggregate size, mirroring the AsyncAPI
7980
+ `MultiOutputCompletion` branch of `OperationResult` (per
7981
+ [ADR-0009](../docs/decisions/0009-multi-output-result-envelope.md)) in
7982
+ the client-facing (download-URL) projection.
7983
+ required:
7984
+ - outputs
7985
+ - total_output_size_bytes
7986
+ properties:
7987
+ outputs:
7988
+ type: array
7989
+ minItems: 1
7990
+ maxItems: 200
7991
+ description: |
7992
+ Per-output deliverables for a multi-output operation (e.g. convert
7993
+ PDF->image emits one entry per page). Consumers use `outputs.length`
7994
+ for the count — per ADR-0009 §D4 a denormalised `output_count` was
7995
+ deliberately rejected. `maxItems: 200` mirrors the AsyncAPI
7996
+ `OperationResult.outputs` transport bound.
7997
+ items:
7998
+ $ref: '#/components/schemas/SseMultiOutputResultEntry'
7999
+ total_output_size_bytes:
8000
+ type: integer
8001
+ format: int64
8002
+ minimum: 0
8003
+ description: |
8004
+ Aggregate size of all `outputs[]` in bytes. Equals
8005
+ `sum(outputs[].size_bytes)`. Per ADR-0009 §D4 this is denormalised
8006
+ against the per-entry sum; consumers SHOULD trust the per-entry sum
8007
+ if the two disagree (and log a warning).
8008
+ example: 786432
8009
+ metrics:
8010
+ type: object
8011
+ description: Operation-specific performance metrics (aggregate)
8012
+ properties:
8013
+ compression_ratio:
8014
+ type: number
8015
+ format: double
8016
+ description: Ratio of output size to input size (e.g. 0.45 = 55% reduction)
8017
+ duration_ms:
8018
+ type: integer
8019
+ description: Processing time in milliseconds
8020
+
8021
+ SseMultiOutputResultEntry:
8022
+ type: object
8023
+ description: |
8024
+ A single deliverable output file in an SSE multi-output
8025
+ `operation.completed` result (`SseMultiOutputCompletion.outputs[]`).
8026
+ This is the SSE-local, client-facing twin of the AsyncAPI
8027
+ `OperationResultOutputEntry` (which is S3-wire: `output_key`) and is
8028
+ deliberately **decoupled** from the REST `OperationDownload` schema — it
8029
+ carries `download_url` + `size_bytes` and the same `page_index` /
8030
+ `position` indexing model defined per
8031
+ [ADR-0009](../docs/decisions/0009-multi-output-result-envelope.md) §D2
8032
+ (`page_index` for PDF-page outputs, `position` for generic ordinals,
8033
+ mutually exclusive within an entry).
8034
+ required:
8035
+ - download_url
8036
+ - size_bytes
8037
+ oneOf:
8038
+ - title: PageIndexed
8039
+ description: PDF-page output (convert PDF->image).
8040
+ required: [page_index]
8041
+ not: { required: [position] }
8042
+ - title: PositionIndexed
8043
+ description: Generic ordinal output (frame strip, chapter split).
8044
+ required: [position]
8045
+ not: { required: [page_index] }
8046
+ - title: Unindexed
8047
+ description: |
8048
+ Output without an explicit indexing field. Reserved for future
8049
+ operations that index by something other than page/position.
8050
+ Schema-valid but not currently emitted by any operation.
8051
+ not:
8052
+ anyOf:
8053
+ - required: [page_index]
8054
+ - required: [position]
8055
+ properties:
8056
+ download_url:
8057
+ type: string
8058
+ format: uri
8059
+ description: Pre-signed download URL for this individual output file.
8060
+ size_bytes:
8061
+ type: integer
8062
+ format: int64
8063
+ minimum: 0
8064
+ description: |
8065
+ Size of this individual output file in bytes. `minimum: 0` mirrors
8066
+ the AsyncAPI `OperationResultOutputEntry.output_size_bytes` bound and
8067
+ keeps `total_output_size_bytes` (the sum of these) internally
8068
+ consistent.
8069
+ page_index:
8070
+ type: integer
8071
+ minimum: 1
8072
+ description: |
8073
+ 1-based page number for PDF-page fan-out outputs (convert
8074
+ PDF->image). Gapless within an operation (an N-page conversion
8075
+ emits `page_index` 1..N). Mutually exclusive with `position`.
8076
+ Absent on non-indexed outputs. Mirrors
8077
+ `OperationResultOutputEntry.page_index`. Per ADR-0009 §D2.
8078
+ example: 1
8079
+ position:
8080
+ type: integer
8081
+ minimum: 0
8082
+ description: |
8083
+ 0-based ordinal for non-PDF multi-output operations (e.g. frame
8084
+ strip, chapter split). Mutually exclusive with `page_index`.
8085
+ Absent on non-indexed outputs. Forward-looking — not emitted by any
8086
+ current operation; declared for parity with
8087
+ `OperationResultOutputEntry.position`. Per ADR-0009 §D2.
8088
+ example: 0
7483
8089
 
7484
8090
  SseOperationFailedData:
7485
8091
  type: object
@@ -7679,6 +8285,84 @@ components:
7679
8285
  availability metadata per I1 / I17).
7680
8286
  additionalProperties:
7681
8287
  $ref: '#/components/schemas/OperationSchemaDefinition'
8288
+ endpoints:
8289
+ type: object
8290
+ description: |
8291
+ Flat per-endpoint auth/identity projection per
8292
+ [ADR-0016](../docs/decisions/0016-per-endpoint-auth-identity-modeling.md)
8293
+ §D4. Keys are `<METHOD> <PATH>` literals (e.g.
8294
+ `"POST /api/workflows"`); values declare the auth axis +
8295
+ identity-scoping + reserved tier/availability slots +
8296
+ operation_id for SDK ergonomic-layer consumption.
8297
+
8298
+ Webhook operations are EXCLUDED per ADR-0016 §D5 — outbound
8299
+ HMAC-signed callbacks use a separate auth model.
8300
+
8301
+ **Optional in the wire envelope** to keep the runtime
8302
+ endpoint's mirroring obligation incremental: the
8303
+ committed sidecar (yN309QVb-B3 / v2.17.0+) emits this
8304
+ block authoritatively; the runtime `GET /api/operations/
8305
+ schema` MAY mirror it once the API team's runtime
8306
+ generator catches up. Consumers MUST tolerate absent
8307
+ `endpoints` from the runtime endpoint (read the sidecar
8308
+ instead) and MUST tolerate present `endpoints` from
8309
+ either source.
8310
+ additionalProperties:
8311
+ $ref: '#/components/schemas/EndpointProjection'
8312
+
8313
+ EndpointProjection:
8314
+ type: object
8315
+ description: |
8316
+ Per-endpoint projection entry per ADR-0016 §D4. Five fields;
8317
+ `required_tier` and `availability` at endpoint level are
8318
+ reserved/null today (operation-level `required_tier` continues
8319
+ to flow via `operations.*.required_tier`; every shipped
8320
+ endpoint is currently `availability: stable`).
8321
+ required:
8322
+ - auth
8323
+ - identity_scoped
8324
+ - required_tier
8325
+ - availability
8326
+ - operation_id
8327
+ properties:
8328
+ auth:
8329
+ type: string
8330
+ enum: [anonymous, optional, required]
8331
+ description: |
8332
+ 3-value projection of the operation's `security:` block:
8333
+ `anonymous` (`security: []`), `optional` (`security`
8334
+ contains the empty requirement `{}`), `required`
8335
+ (otherwise).
8336
+ identity_scoped:
8337
+ type: boolean
8338
+ description: |
8339
+ Value of the `x-identity-scoped` vendor extension on the
8340
+ operation (default `false`). True iff the operation
8341
+ targets an identity-bound resource and cross-identity
8342
+ access returns 403 — OR acts on the caller's implicit
8343
+ identity-scoped data (credits balance, own session).
8344
+ required_tier:
8345
+ description: |
8346
+ Endpoint-level entitlement gate. Reserved/null today —
8347
+ operation-level `required_tier` flows via
8348
+ `operations.*.required_tier` and is NOT duplicated here.
8349
+ oneOf:
8350
+ - $ref: '#/components/schemas/UserTier'
8351
+ - type: 'null'
8352
+ availability:
8353
+ type: string
8354
+ enum: [stable, beta, experimental, planned, deprecated]
8355
+ description: |
8356
+ Endpoint-level availability tag. Currently always
8357
+ `"stable"` for shipped endpoints. Reserved for future
8358
+ `planned` / `deprecated` endpoint-level annotation.
8359
+ operation_id:
8360
+ type: string
8361
+ description: |
8362
+ OpenAPI `operationId` for the operation. SDK code
8363
+ generators anchor on this for method naming; including
8364
+ it in the sidecar saves a round-trip to `openapi/api.yaml`.
8365
+ Per the SDK ask at ADR-0016 B1 sign-off.
7682
8366
 
7683
8367
  OperationSchemaDefinition:
7684
8368
  type: object
@@ -7726,11 +8410,26 @@ components:
7726
8410
  $ref: '#/components/schemas/OperationInputModel'
7727
8411
  min_inputs:
7728
8412
  type: integer
7729
- description: Minimum number of inputs (multi-input operations only)
7730
- minimum: 2
8413
+ description: |
8414
+ Minimum number of inputs (multi-input operations only).
8415
+ `audio_to_video` declares `min_inputs: 1` (first
8416
+ role-based op with an optional role); all other
8417
+ role-based ops declare `min_inputs: 2`. Per
8418
+ `per_role_cardinality` semantics (ADR-0015), this value
8419
+ equals the sum of role-level minima.
8420
+ minimum: 1
7731
8421
  max_inputs:
7732
8422
  type: integer
7733
8423
  description: Maximum number of inputs (multi-input operations only)
8424
+ per_role_cardinality:
8425
+ $ref: '#/components/schemas/PerRoleCardinality'
8426
+ description: |
8427
+ Optional per-role input-count overlay for role-based
8428
+ multi-input operations. Per ticket
8429
+ [`SlluxMBN`](https://trello.com/c/SlluxMBN) / ADR-0015.
8430
+ Absent on operations whose role rules are still encoded
8431
+ in prose only (image_watermark, audio_overlay,
8432
+ custom_luma — per-op migration follow-ups).
7734
8433
  accepts_mixed_types:
7735
8434
  type: boolean
7736
8435
  description: Whether mixed MIME types are allowed (archive only)
@@ -7840,6 +8539,7 @@ components:
7840
8539
  - boolean
7841
8540
  - enum
7842
8541
  - string
8542
+ - array
7843
8543
  description:
7844
8544
  type: string
7845
8545
  description: Human-readable description