@ume-group/contracts 0.2.1
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.
- package/README.md +37 -0
- package/dist/adserving.d.ts +150 -0
- package/dist/adserving.d.ts.map +1 -0
- package/dist/adserving.js +8 -0
- package/dist/campaigns.d.ts +37 -0
- package/dist/campaigns.d.ts.map +1 -0
- package/dist/campaigns.js +8 -0
- package/dist/gausst.d.ts +236 -0
- package/dist/gausst.d.ts.map +1 -0
- package/dist/gausst.js +307 -0
- package/dist/gausst.test.d.ts +2 -0
- package/dist/gausst.test.d.ts.map +1 -0
- package/dist/gausst.test.js +71 -0
- package/dist/index.d.ts +1531 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1112 -0
- package/dist/layer2/index.d.ts +9 -0
- package/dist/layer2/index.d.ts.map +1 -0
- package/dist/layer2/index.js +10 -0
- package/dist/layer2/shaders.d.ts +185 -0
- package/dist/layer2/shaders.d.ts.map +1 -0
- package/dist/layer2/shaders.js +604 -0
- package/dist/layer2/webcam-utils.d.ts +113 -0
- package/dist/layer2/webcam-utils.d.ts.map +1 -0
- package/dist/layer2/webcam-utils.js +147 -0
- package/dist/layer2/webcam-utils.test.d.ts +2 -0
- package/dist/layer2/webcam-utils.test.d.ts.map +1 -0
- package/dist/layer2/webcam-utils.test.js +18 -0
- package/dist/layer2.d.ts +558 -0
- package/dist/layer2.d.ts.map +1 -0
- package/dist/layer2.js +376 -0
- package/dist/layer2.test.d.ts +2 -0
- package/dist/layer2.test.d.ts.map +1 -0
- package/dist/layer2.test.js +65 -0
- package/dist/perspective.d.ts +28 -0
- package/dist/perspective.d.ts.map +1 -0
- package/dist/perspective.js +157 -0
- package/dist/segmentation/MediaPipeSegmenter.d.ts +201 -0
- package/dist/segmentation/MediaPipeSegmenter.d.ts.map +1 -0
- package/dist/segmentation/MediaPipeSegmenter.js +434 -0
- package/dist/segmentation/index.d.ts +5 -0
- package/dist/segmentation/index.d.ts.map +1 -0
- package/dist/segmentation/index.js +4 -0
- package/dist/webcam/GarbageMatteDragManager.d.ts +63 -0
- package/dist/webcam/GarbageMatteDragManager.d.ts.map +1 -0
- package/dist/webcam/GarbageMatteDragManager.js +183 -0
- package/dist/webcam/WebcamStreamManager.d.ts +103 -0
- package/dist/webcam/WebcamStreamManager.d.ts.map +1 -0
- package/dist/webcam/WebcamStreamManager.js +356 -0
- package/dist/webcam/index.d.ts +5 -0
- package/dist/webcam/index.d.ts.map +1 -0
- package/dist/webcam/index.js +2 -0
- package/openapi/admetise.yaml +632 -0
- package/openapi/includu.yaml +621 -0
- package/openapi/integration.yaml +372 -0
- package/openapi/shared/schemas.yaml +227 -0
- package/package.json +53 -0
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: Includu API
|
|
4
|
+
description: |
|
|
5
|
+
Content creation and publishing API for the Includu video inclusion platform.
|
|
6
|
+
|
|
7
|
+
## Authentication
|
|
8
|
+
All endpoints except `/api/published/:id` and `/api/preview/:id` are behind
|
|
9
|
+
Cloudflare Zero Trust (`@ume.group` email policy).
|
|
10
|
+
|
|
11
|
+
## Base URL
|
|
12
|
+
Production: `https://includu-api.ume-group-as.workers.dev`
|
|
13
|
+
version: 1.0.0
|
|
14
|
+
contact:
|
|
15
|
+
name: uMe Group
|
|
16
|
+
url: https://ume.group
|
|
17
|
+
license:
|
|
18
|
+
name: Proprietary
|
|
19
|
+
|
|
20
|
+
servers:
|
|
21
|
+
- url: https://includu-api.ume-group-as.workers.dev
|
|
22
|
+
description: Production
|
|
23
|
+
|
|
24
|
+
tags:
|
|
25
|
+
- name: Health
|
|
26
|
+
description: Service health check
|
|
27
|
+
- name: Upload
|
|
28
|
+
description: Video upload to R2
|
|
29
|
+
- name: Projects
|
|
30
|
+
description: Project CRUD
|
|
31
|
+
- name: Publishing
|
|
32
|
+
description: Publish and unpublish projects
|
|
33
|
+
- name: Video
|
|
34
|
+
description: Video streaming from R2
|
|
35
|
+
- name: Preview
|
|
36
|
+
description: Temporary preview manifests
|
|
37
|
+
|
|
38
|
+
paths:
|
|
39
|
+
# =========================================================================
|
|
40
|
+
# HEALTH
|
|
41
|
+
# =========================================================================
|
|
42
|
+
|
|
43
|
+
/api/health:
|
|
44
|
+
get:
|
|
45
|
+
tags: [Health]
|
|
46
|
+
summary: Health check
|
|
47
|
+
operationId: getHealth
|
|
48
|
+
responses:
|
|
49
|
+
'200':
|
|
50
|
+
description: Service is healthy
|
|
51
|
+
content:
|
|
52
|
+
application/json:
|
|
53
|
+
schema:
|
|
54
|
+
type: object
|
|
55
|
+
properties:
|
|
56
|
+
status:
|
|
57
|
+
type: string
|
|
58
|
+
example: ok
|
|
59
|
+
environment:
|
|
60
|
+
type: string
|
|
61
|
+
timestamp:
|
|
62
|
+
type: string
|
|
63
|
+
format: date-time
|
|
64
|
+
|
|
65
|
+
# =========================================================================
|
|
66
|
+
# UPLOAD
|
|
67
|
+
# =========================================================================
|
|
68
|
+
|
|
69
|
+
/api/upload:
|
|
70
|
+
post:
|
|
71
|
+
tags: [Upload]
|
|
72
|
+
summary: Simple video upload
|
|
73
|
+
description: Upload a video file directly to R2. For files >100MB, use multipart upload.
|
|
74
|
+
operationId: uploadVideo
|
|
75
|
+
requestBody:
|
|
76
|
+
required: true
|
|
77
|
+
content:
|
|
78
|
+
multipart/form-data:
|
|
79
|
+
schema:
|
|
80
|
+
type: object
|
|
81
|
+
required: [file]
|
|
82
|
+
properties:
|
|
83
|
+
file:
|
|
84
|
+
type: string
|
|
85
|
+
format: binary
|
|
86
|
+
responses:
|
|
87
|
+
'200':
|
|
88
|
+
description: Upload successful
|
|
89
|
+
content:
|
|
90
|
+
application/json:
|
|
91
|
+
schema:
|
|
92
|
+
type: object
|
|
93
|
+
properties:
|
|
94
|
+
key:
|
|
95
|
+
type: string
|
|
96
|
+
description: R2 object key
|
|
97
|
+
size:
|
|
98
|
+
type: integer
|
|
99
|
+
'400':
|
|
100
|
+
description: No file provided
|
|
101
|
+
content:
|
|
102
|
+
application/json:
|
|
103
|
+
schema:
|
|
104
|
+
$ref: 'shared/schemas.yaml#/components/schemas/Error'
|
|
105
|
+
|
|
106
|
+
/api/upload/multipart/init:
|
|
107
|
+
post:
|
|
108
|
+
tags: [Upload]
|
|
109
|
+
summary: Initialize multipart upload
|
|
110
|
+
operationId: initMultipartUpload
|
|
111
|
+
requestBody:
|
|
112
|
+
required: true
|
|
113
|
+
content:
|
|
114
|
+
application/json:
|
|
115
|
+
schema:
|
|
116
|
+
type: object
|
|
117
|
+
required: [projectId, filename, contentType, size, type]
|
|
118
|
+
properties:
|
|
119
|
+
projectId:
|
|
120
|
+
type: string
|
|
121
|
+
format: uuid
|
|
122
|
+
filename:
|
|
123
|
+
type: string
|
|
124
|
+
contentType:
|
|
125
|
+
type: string
|
|
126
|
+
size:
|
|
127
|
+
type: integer
|
|
128
|
+
type:
|
|
129
|
+
type: string
|
|
130
|
+
enum: [video, proxy]
|
|
131
|
+
responses:
|
|
132
|
+
'200':
|
|
133
|
+
description: Multipart upload initialized
|
|
134
|
+
content:
|
|
135
|
+
application/json:
|
|
136
|
+
schema:
|
|
137
|
+
type: object
|
|
138
|
+
properties:
|
|
139
|
+
key:
|
|
140
|
+
type: string
|
|
141
|
+
uploadId:
|
|
142
|
+
type: string
|
|
143
|
+
|
|
144
|
+
/api/upload/multipart/part:
|
|
145
|
+
put:
|
|
146
|
+
tags: [Upload]
|
|
147
|
+
summary: Upload a part
|
|
148
|
+
operationId: uploadPart
|
|
149
|
+
parameters:
|
|
150
|
+
- name: key
|
|
151
|
+
in: query
|
|
152
|
+
required: true
|
|
153
|
+
schema:
|
|
154
|
+
type: string
|
|
155
|
+
- name: uploadId
|
|
156
|
+
in: query
|
|
157
|
+
required: true
|
|
158
|
+
schema:
|
|
159
|
+
type: string
|
|
160
|
+
- name: partNumber
|
|
161
|
+
in: query
|
|
162
|
+
required: true
|
|
163
|
+
schema:
|
|
164
|
+
type: integer
|
|
165
|
+
requestBody:
|
|
166
|
+
required: true
|
|
167
|
+
content:
|
|
168
|
+
application/octet-stream:
|
|
169
|
+
schema:
|
|
170
|
+
type: string
|
|
171
|
+
format: binary
|
|
172
|
+
responses:
|
|
173
|
+
'200':
|
|
174
|
+
description: Part uploaded
|
|
175
|
+
content:
|
|
176
|
+
application/json:
|
|
177
|
+
schema:
|
|
178
|
+
type: object
|
|
179
|
+
properties:
|
|
180
|
+
etag:
|
|
181
|
+
type: string
|
|
182
|
+
|
|
183
|
+
/api/upload/multipart/complete:
|
|
184
|
+
post:
|
|
185
|
+
tags: [Upload]
|
|
186
|
+
summary: Complete multipart upload
|
|
187
|
+
operationId: completeMultipartUpload
|
|
188
|
+
requestBody:
|
|
189
|
+
required: true
|
|
190
|
+
content:
|
|
191
|
+
application/json:
|
|
192
|
+
schema:
|
|
193
|
+
type: object
|
|
194
|
+
required: [key, uploadId, parts]
|
|
195
|
+
properties:
|
|
196
|
+
key:
|
|
197
|
+
type: string
|
|
198
|
+
uploadId:
|
|
199
|
+
type: string
|
|
200
|
+
parts:
|
|
201
|
+
type: array
|
|
202
|
+
items:
|
|
203
|
+
type: object
|
|
204
|
+
properties:
|
|
205
|
+
partNumber:
|
|
206
|
+
type: integer
|
|
207
|
+
etag:
|
|
208
|
+
type: string
|
|
209
|
+
responses:
|
|
210
|
+
'200':
|
|
211
|
+
description: Upload completed
|
|
212
|
+
content:
|
|
213
|
+
application/json:
|
|
214
|
+
schema:
|
|
215
|
+
type: object
|
|
216
|
+
properties:
|
|
217
|
+
key:
|
|
218
|
+
type: string
|
|
219
|
+
|
|
220
|
+
# =========================================================================
|
|
221
|
+
# PROJECTS
|
|
222
|
+
# =========================================================================
|
|
223
|
+
|
|
224
|
+
/api/projects:
|
|
225
|
+
get:
|
|
226
|
+
tags: [Projects]
|
|
227
|
+
summary: List all projects
|
|
228
|
+
operationId: listProjects
|
|
229
|
+
responses:
|
|
230
|
+
'200':
|
|
231
|
+
description: Projects listed (sorted by updatedAt desc)
|
|
232
|
+
content:
|
|
233
|
+
application/json:
|
|
234
|
+
schema:
|
|
235
|
+
type: array
|
|
236
|
+
items:
|
|
237
|
+
$ref: '#/components/schemas/Project'
|
|
238
|
+
post:
|
|
239
|
+
tags: [Projects]
|
|
240
|
+
summary: Create a new project
|
|
241
|
+
operationId: createProject
|
|
242
|
+
requestBody:
|
|
243
|
+
required: true
|
|
244
|
+
content:
|
|
245
|
+
application/json:
|
|
246
|
+
schema:
|
|
247
|
+
type: object
|
|
248
|
+
required: [name]
|
|
249
|
+
properties:
|
|
250
|
+
name:
|
|
251
|
+
type: string
|
|
252
|
+
fps:
|
|
253
|
+
type: number
|
|
254
|
+
default: 24
|
|
255
|
+
duration:
|
|
256
|
+
type: number
|
|
257
|
+
default: 0
|
|
258
|
+
videoSource:
|
|
259
|
+
$ref: '#/components/schemas/VideoSource'
|
|
260
|
+
responses:
|
|
261
|
+
'201':
|
|
262
|
+
description: Project created
|
|
263
|
+
content:
|
|
264
|
+
application/json:
|
|
265
|
+
schema:
|
|
266
|
+
$ref: '#/components/schemas/Project'
|
|
267
|
+
|
|
268
|
+
/api/projects/by-clip:
|
|
269
|
+
get:
|
|
270
|
+
tags: [Projects]
|
|
271
|
+
summary: Find projects by VMS clip
|
|
272
|
+
operationId: getProjectsByClip
|
|
273
|
+
parameters:
|
|
274
|
+
- name: clipId
|
|
275
|
+
in: query
|
|
276
|
+
schema:
|
|
277
|
+
type: string
|
|
278
|
+
- name: hlsUrl
|
|
279
|
+
in: query
|
|
280
|
+
schema:
|
|
281
|
+
type: string
|
|
282
|
+
responses:
|
|
283
|
+
'200':
|
|
284
|
+
description: Matching projects
|
|
285
|
+
content:
|
|
286
|
+
application/json:
|
|
287
|
+
schema:
|
|
288
|
+
type: array
|
|
289
|
+
items:
|
|
290
|
+
$ref: '#/components/schemas/Project'
|
|
291
|
+
|
|
292
|
+
/api/projects/{id}:
|
|
293
|
+
get:
|
|
294
|
+
tags: [Projects]
|
|
295
|
+
summary: Get project by ID
|
|
296
|
+
operationId: getProject
|
|
297
|
+
parameters:
|
|
298
|
+
- $ref: '#/components/parameters/ProjectId'
|
|
299
|
+
responses:
|
|
300
|
+
'200':
|
|
301
|
+
description: Project found
|
|
302
|
+
content:
|
|
303
|
+
application/json:
|
|
304
|
+
schema:
|
|
305
|
+
$ref: '#/components/schemas/Project'
|
|
306
|
+
'404':
|
|
307
|
+
description: Project not found
|
|
308
|
+
content:
|
|
309
|
+
application/json:
|
|
310
|
+
schema:
|
|
311
|
+
$ref: 'shared/schemas.yaml#/components/schemas/Error'
|
|
312
|
+
put:
|
|
313
|
+
tags: [Projects]
|
|
314
|
+
summary: Update project
|
|
315
|
+
operationId: updateProject
|
|
316
|
+
parameters:
|
|
317
|
+
- $ref: '#/components/parameters/ProjectId'
|
|
318
|
+
requestBody:
|
|
319
|
+
required: true
|
|
320
|
+
content:
|
|
321
|
+
application/json:
|
|
322
|
+
schema:
|
|
323
|
+
$ref: '#/components/schemas/Project'
|
|
324
|
+
responses:
|
|
325
|
+
'200':
|
|
326
|
+
description: Project updated
|
|
327
|
+
content:
|
|
328
|
+
application/json:
|
|
329
|
+
schema:
|
|
330
|
+
$ref: '#/components/schemas/Project'
|
|
331
|
+
'404':
|
|
332
|
+
description: Project not found
|
|
333
|
+
content:
|
|
334
|
+
application/json:
|
|
335
|
+
schema:
|
|
336
|
+
$ref: 'shared/schemas.yaml#/components/schemas/Error'
|
|
337
|
+
delete:
|
|
338
|
+
tags: [Projects]
|
|
339
|
+
summary: Delete project
|
|
340
|
+
description: Deletes project and associated R2 video files.
|
|
341
|
+
operationId: deleteProject
|
|
342
|
+
parameters:
|
|
343
|
+
- $ref: '#/components/parameters/ProjectId'
|
|
344
|
+
responses:
|
|
345
|
+
'200':
|
|
346
|
+
description: Project deleted
|
|
347
|
+
content:
|
|
348
|
+
application/json:
|
|
349
|
+
schema:
|
|
350
|
+
type: object
|
|
351
|
+
properties:
|
|
352
|
+
deleted:
|
|
353
|
+
type: boolean
|
|
354
|
+
'404':
|
|
355
|
+
description: Project not found
|
|
356
|
+
content:
|
|
357
|
+
application/json:
|
|
358
|
+
schema:
|
|
359
|
+
$ref: 'shared/schemas.yaml#/components/schemas/Error'
|
|
360
|
+
|
|
361
|
+
# =========================================================================
|
|
362
|
+
# PUBLISHING
|
|
363
|
+
# =========================================================================
|
|
364
|
+
|
|
365
|
+
/api/projects/{id}/publish:
|
|
366
|
+
post:
|
|
367
|
+
tags: [Publishing]
|
|
368
|
+
summary: Publish project
|
|
369
|
+
description: |
|
|
370
|
+
Creates an immutable published manifest with player links.
|
|
371
|
+
Generates a nanoid publishId.
|
|
372
|
+
operationId: publishProject
|
|
373
|
+
parameters:
|
|
374
|
+
- $ref: '#/components/parameters/ProjectId'
|
|
375
|
+
responses:
|
|
376
|
+
'200':
|
|
377
|
+
description: Project published
|
|
378
|
+
content:
|
|
379
|
+
application/json:
|
|
380
|
+
schema:
|
|
381
|
+
$ref: 'shared/schemas.yaml#/components/schemas/PublishedManifest'
|
|
382
|
+
'404':
|
|
383
|
+
description: Project not found
|
|
384
|
+
content:
|
|
385
|
+
application/json:
|
|
386
|
+
schema:
|
|
387
|
+
$ref: 'shared/schemas.yaml#/components/schemas/Error'
|
|
388
|
+
|
|
389
|
+
/api/projects/{id}/published:
|
|
390
|
+
get:
|
|
391
|
+
tags: [Publishing]
|
|
392
|
+
summary: List published versions
|
|
393
|
+
operationId: listPublishedVersions
|
|
394
|
+
parameters:
|
|
395
|
+
- $ref: '#/components/parameters/ProjectId'
|
|
396
|
+
responses:
|
|
397
|
+
'200':
|
|
398
|
+
description: Published versions
|
|
399
|
+
content:
|
|
400
|
+
application/json:
|
|
401
|
+
schema:
|
|
402
|
+
type: array
|
|
403
|
+
items:
|
|
404
|
+
$ref: 'shared/schemas.yaml#/components/schemas/PublishedManifest'
|
|
405
|
+
|
|
406
|
+
/api/published/by-clip:
|
|
407
|
+
get:
|
|
408
|
+
tags: [Publishing]
|
|
409
|
+
summary: Find latest published version by clip
|
|
410
|
+
operationId: getPublishedByClip
|
|
411
|
+
parameters:
|
|
412
|
+
- name: clipId
|
|
413
|
+
in: query
|
|
414
|
+
schema:
|
|
415
|
+
type: string
|
|
416
|
+
- name: hlsUrl
|
|
417
|
+
in: query
|
|
418
|
+
schema:
|
|
419
|
+
type: string
|
|
420
|
+
responses:
|
|
421
|
+
'200':
|
|
422
|
+
description: Published manifest found
|
|
423
|
+
content:
|
|
424
|
+
application/json:
|
|
425
|
+
schema:
|
|
426
|
+
$ref: 'shared/schemas.yaml#/components/schemas/PublishedManifest'
|
|
427
|
+
'404':
|
|
428
|
+
description: No published version found
|
|
429
|
+
|
|
430
|
+
/api/published/{id}:
|
|
431
|
+
get:
|
|
432
|
+
tags: [Publishing]
|
|
433
|
+
summary: Get published manifest
|
|
434
|
+
description: Public endpoint — no authentication required.
|
|
435
|
+
operationId: getPublishedManifest
|
|
436
|
+
parameters:
|
|
437
|
+
- name: id
|
|
438
|
+
in: path
|
|
439
|
+
required: true
|
|
440
|
+
description: Publish ID (nanoid)
|
|
441
|
+
schema:
|
|
442
|
+
type: string
|
|
443
|
+
responses:
|
|
444
|
+
'200':
|
|
445
|
+
description: Published manifest
|
|
446
|
+
content:
|
|
447
|
+
application/json:
|
|
448
|
+
schema:
|
|
449
|
+
$ref: 'shared/schemas.yaml#/components/schemas/PublishedManifest'
|
|
450
|
+
'404':
|
|
451
|
+
description: Not found
|
|
452
|
+
content:
|
|
453
|
+
application/json:
|
|
454
|
+
schema:
|
|
455
|
+
$ref: 'shared/schemas.yaml#/components/schemas/Error'
|
|
456
|
+
delete:
|
|
457
|
+
tags: [Publishing]
|
|
458
|
+
summary: Unpublish a version
|
|
459
|
+
operationId: unpublish
|
|
460
|
+
parameters:
|
|
461
|
+
- name: id
|
|
462
|
+
in: path
|
|
463
|
+
required: true
|
|
464
|
+
schema:
|
|
465
|
+
type: string
|
|
466
|
+
responses:
|
|
467
|
+
'200':
|
|
468
|
+
description: Unpublished
|
|
469
|
+
content:
|
|
470
|
+
application/json:
|
|
471
|
+
schema:
|
|
472
|
+
type: object
|
|
473
|
+
properties:
|
|
474
|
+
deleted:
|
|
475
|
+
type: boolean
|
|
476
|
+
|
|
477
|
+
# =========================================================================
|
|
478
|
+
# PREVIEW
|
|
479
|
+
# =========================================================================
|
|
480
|
+
|
|
481
|
+
/api/preview:
|
|
482
|
+
post:
|
|
483
|
+
tags: [Preview]
|
|
484
|
+
summary: Create temporary preview
|
|
485
|
+
description: Creates a temporary preview manifest with a 30-minute TTL.
|
|
486
|
+
operationId: createPreview
|
|
487
|
+
requestBody:
|
|
488
|
+
required: true
|
|
489
|
+
content:
|
|
490
|
+
application/json:
|
|
491
|
+
schema:
|
|
492
|
+
$ref: '#/components/schemas/Project'
|
|
493
|
+
responses:
|
|
494
|
+
'200':
|
|
495
|
+
description: Preview created
|
|
496
|
+
content:
|
|
497
|
+
application/json:
|
|
498
|
+
schema:
|
|
499
|
+
type: object
|
|
500
|
+
properties:
|
|
501
|
+
previewId:
|
|
502
|
+
type: string
|
|
503
|
+
url:
|
|
504
|
+
type: string
|
|
505
|
+
format: uri
|
|
506
|
+
|
|
507
|
+
/api/preview/{id}:
|
|
508
|
+
get:
|
|
509
|
+
tags: [Preview]
|
|
510
|
+
summary: Get preview manifest
|
|
511
|
+
description: Public endpoint. Previews expire after 30 minutes.
|
|
512
|
+
operationId: getPreview
|
|
513
|
+
parameters:
|
|
514
|
+
- name: id
|
|
515
|
+
in: path
|
|
516
|
+
required: true
|
|
517
|
+
schema:
|
|
518
|
+
type: string
|
|
519
|
+
responses:
|
|
520
|
+
'200':
|
|
521
|
+
description: Preview manifest
|
|
522
|
+
content:
|
|
523
|
+
application/json:
|
|
524
|
+
schema:
|
|
525
|
+
$ref: 'shared/schemas.yaml#/components/schemas/PublishedManifest'
|
|
526
|
+
'404':
|
|
527
|
+
description: Preview expired or not found
|
|
528
|
+
|
|
529
|
+
# =========================================================================
|
|
530
|
+
# VIDEO STREAMING
|
|
531
|
+
# =========================================================================
|
|
532
|
+
|
|
533
|
+
/api/video/{key}:
|
|
534
|
+
get:
|
|
535
|
+
tags: [Video]
|
|
536
|
+
summary: Stream video from R2
|
|
537
|
+
description: Proxies video from R2 with CORS headers and caching.
|
|
538
|
+
operationId: streamVideo
|
|
539
|
+
parameters:
|
|
540
|
+
- name: key
|
|
541
|
+
in: path
|
|
542
|
+
required: true
|
|
543
|
+
schema:
|
|
544
|
+
type: string
|
|
545
|
+
responses:
|
|
546
|
+
'200':
|
|
547
|
+
description: Video stream
|
|
548
|
+
content:
|
|
549
|
+
video/*:
|
|
550
|
+
schema:
|
|
551
|
+
type: string
|
|
552
|
+
format: binary
|
|
553
|
+
'404':
|
|
554
|
+
description: Video not found
|
|
555
|
+
|
|
556
|
+
components:
|
|
557
|
+
parameters:
|
|
558
|
+
ProjectId:
|
|
559
|
+
name: id
|
|
560
|
+
in: path
|
|
561
|
+
required: true
|
|
562
|
+
description: Project UUID
|
|
563
|
+
schema:
|
|
564
|
+
type: string
|
|
565
|
+
format: uuid
|
|
566
|
+
|
|
567
|
+
schemas:
|
|
568
|
+
VideoSource:
|
|
569
|
+
type: object
|
|
570
|
+
properties:
|
|
571
|
+
type:
|
|
572
|
+
type: string
|
|
573
|
+
enum: [vms, local, r2]
|
|
574
|
+
vmsClipId:
|
|
575
|
+
type: string
|
|
576
|
+
vmsStreamUid:
|
|
577
|
+
type: string
|
|
578
|
+
vmsHlsUrl:
|
|
579
|
+
type: string
|
|
580
|
+
vmsTitle:
|
|
581
|
+
type: string
|
|
582
|
+
|
|
583
|
+
Project:
|
|
584
|
+
type: object
|
|
585
|
+
required:
|
|
586
|
+
- id
|
|
587
|
+
- name
|
|
588
|
+
- fps
|
|
589
|
+
- duration
|
|
590
|
+
- overlays
|
|
591
|
+
- createdAt
|
|
592
|
+
- updatedAt
|
|
593
|
+
properties:
|
|
594
|
+
id:
|
|
595
|
+
type: string
|
|
596
|
+
format: uuid
|
|
597
|
+
name:
|
|
598
|
+
type: string
|
|
599
|
+
createdAt:
|
|
600
|
+
type: string
|
|
601
|
+
format: date-time
|
|
602
|
+
updatedAt:
|
|
603
|
+
type: string
|
|
604
|
+
format: date-time
|
|
605
|
+
fps:
|
|
606
|
+
type: number
|
|
607
|
+
example: 24
|
|
608
|
+
duration:
|
|
609
|
+
type: number
|
|
610
|
+
description: Video duration in seconds
|
|
611
|
+
overlays:
|
|
612
|
+
type: array
|
|
613
|
+
items:
|
|
614
|
+
$ref: 'shared/schemas.yaml#/components/schemas/PublishedOverlay'
|
|
615
|
+
videoSource:
|
|
616
|
+
$ref: '#/components/schemas/VideoSource'
|
|
617
|
+
monetization:
|
|
618
|
+
type: object
|
|
619
|
+
properties:
|
|
620
|
+
enabled:
|
|
621
|
+
type: boolean
|