aboutsummaryrefslogtreecommitdiffhomepage
path: root/packages/models/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/models/src')
-rw-r--r--packages/models/src/activitypub/context.ts3
-rw-r--r--packages/models/src/activitypub/objects/index.ts1
-rw-r--r--packages/models/src/activitypub/objects/video-chapters-object.ts11
-rw-r--r--packages/models/src/activitypub/objects/video-object.ts1
-rw-r--r--packages/models/src/videos/chapter/chapter-update.model.ts6
-rw-r--r--packages/models/src/videos/chapter/chapter.model.ts4
-rw-r--r--packages/models/src/videos/chapter/index.ts2
-rw-r--r--packages/models/src/videos/index.ts1
8 files changed, 28 insertions, 1 deletions
diff --git a/packages/models/src/activitypub/context.ts b/packages/models/src/activitypub/context.ts
index e9df38207..e52463c6c 100644
--- a/packages/models/src/activitypub/context.ts
+++ b/packages/models/src/activitypub/context.ts
@@ -13,4 +13,5 @@ export type ContextType =
13 'Flag' | 13 'Flag' |
14 'Actor' | 14 'Actor' |
15 'Collection' | 15 'Collection' |
16 'WatchAction' 16 'WatchAction' |
17 'Chapters'
diff --git a/packages/models/src/activitypub/objects/index.ts b/packages/models/src/activitypub/objects/index.ts
index 510f621ea..8e21f584f 100644
--- a/packages/models/src/activitypub/objects/index.ts
+++ b/packages/models/src/activitypub/objects/index.ts
@@ -4,6 +4,7 @@ export * from './cache-file-object.js'
4export * from './common-objects.js' 4export * from './common-objects.js'
5export * from './playlist-element-object.js' 5export * from './playlist-element-object.js'
6export * from './playlist-object.js' 6export * from './playlist-object.js'
7export * from './video-chapters-object.js'
7export * from './video-comment-object.js' 8export * from './video-comment-object.js'
8export * from './video-object.js' 9export * from './video-object.js'
9export * from './watch-action-object.js' 10export * from './watch-action-object.js'
diff --git a/packages/models/src/activitypub/objects/video-chapters-object.ts b/packages/models/src/activitypub/objects/video-chapters-object.ts
new file mode 100644
index 000000000..0149c6e87
--- /dev/null
+++ b/packages/models/src/activitypub/objects/video-chapters-object.ts
@@ -0,0 +1,11 @@
1export interface VideoChaptersObject {
2 id: string
3 hasPart: VideoChapterObject[]
4}
5
6// Same as https://schema.org/hasPart
7export interface VideoChapterObject {
8 name: string
9 startOffset: number
10 endOffset: number
11}
diff --git a/packages/models/src/activitypub/objects/video-object.ts b/packages/models/src/activitypub/objects/video-object.ts
index 14afd85a2..9abae6a39 100644
--- a/packages/models/src/activitypub/objects/video-object.ts
+++ b/packages/models/src/activitypub/objects/video-object.ts
@@ -50,6 +50,7 @@ export interface VideoObject {
50 dislikes: string 50 dislikes: string
51 shares: string 51 shares: string
52 comments: string 52 comments: string
53 hasParts: string
53 54
54 attributedTo: ActivityPubAttributedTo[] 55 attributedTo: ActivityPubAttributedTo[]
55 56
diff --git a/packages/models/src/videos/chapter/chapter-update.model.ts b/packages/models/src/videos/chapter/chapter-update.model.ts
new file mode 100644
index 000000000..82b2091af
--- /dev/null
+++ b/packages/models/src/videos/chapter/chapter-update.model.ts
@@ -0,0 +1,6 @@
1export interface VideoChapterUpdate {
2 chapters: {
3 timecode: number
4 title: string
5 }[]
6}
diff --git a/packages/models/src/videos/chapter/chapter.model.ts b/packages/models/src/videos/chapter/chapter.model.ts
new file mode 100644
index 000000000..7ecba61bc
--- /dev/null
+++ b/packages/models/src/videos/chapter/chapter.model.ts
@@ -0,0 +1,4 @@
1export interface VideoChapter {
2 timecode: number
3 title: string
4}
diff --git a/packages/models/src/videos/chapter/index.ts b/packages/models/src/videos/chapter/index.ts
new file mode 100644
index 000000000..15fca476f
--- /dev/null
+++ b/packages/models/src/videos/chapter/index.ts
@@ -0,0 +1,2 @@
1export * from './chapter-update.model.js'
2export * from './chapter.model.js'
diff --git a/packages/models/src/videos/index.ts b/packages/models/src/videos/index.ts
index d131212c9..7d96d31a6 100644
--- a/packages/models/src/videos/index.ts
+++ b/packages/models/src/videos/index.ts
@@ -12,6 +12,7 @@ export * from './rate/index.js'
12export * from './stats/index.js' 12export * from './stats/index.js'
13export * from './transcoding/index.js' 13export * from './transcoding/index.js'
14export * from './channel-sync/index.js' 14export * from './channel-sync/index.js'
15export * from './chapter/index.js'
15 16
16export * from './nsfw-policy.type.js' 17export * from './nsfw-policy.type.js'
17 18