digital-tools 2.0.2 → 2.1.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/CHANGELOG.md +17 -0
- package/package.json +3 -4
- package/src/define.js +267 -0
- package/src/entities/advertising.js +999 -0
- package/src/entities/ai.js +756 -0
- package/src/entities/analytics.js +1588 -0
- package/src/entities/automation.js +601 -0
- package/src/entities/communication.js +1150 -0
- package/src/entities/crm.js +1386 -0
- package/src/entities/design.js +546 -0
- package/src/entities/development.js +2212 -0
- package/src/entities/document.js +874 -0
- package/src/entities/ecommerce.js +1429 -0
- package/src/entities/experiment.js +1039 -0
- package/src/entities/finance.js +3478 -0
- package/src/entities/forms.js +1892 -0
- package/src/entities/hr.js +661 -0
- package/src/entities/identity.js +997 -0
- package/src/entities/index.js +282 -0
- package/src/entities/infrastructure.js +1153 -0
- package/src/entities/knowledge.js +1438 -0
- package/src/entities/marketing.js +1610 -0
- package/src/entities/media.js +1634 -0
- package/src/entities/notification.js +1199 -0
- package/src/entities/presentation.js +1274 -0
- package/src/entities/productivity.js +1317 -0
- package/src/entities/project-management.js +1136 -0
- package/src/entities/recruiting.js +736 -0
- package/src/entities/shipping.js +509 -0
- package/src/entities/signature.js +1102 -0
- package/src/entities/site.js +222 -0
- package/src/entities/spreadsheet.js +1341 -0
- package/src/entities/storage.js +1198 -0
- package/src/entities/support.js +1166 -0
- package/src/entities/video-conferencing.js +1750 -0
- package/src/entities/video.js +950 -0
- package/src/entities.js +1663 -0
- package/src/index.js +74 -0
- package/src/providers/analytics/index.js +17 -0
- package/src/providers/analytics/mixpanel.js +255 -0
- package/src/providers/calendar/cal-com.js +303 -0
- package/src/providers/calendar/google-calendar.js +335 -0
- package/src/providers/calendar/index.js +20 -0
- package/src/providers/crm/hubspot.js +566 -0
- package/src/providers/crm/index.js +17 -0
- package/src/providers/development/github.js +472 -0
- package/src/providers/development/index.js +17 -0
- package/src/providers/ecommerce/index.js +17 -0
- package/src/providers/ecommerce/shopify.js +378 -0
- package/src/providers/email/index.js +20 -0
- package/src/providers/email/resend.js +258 -0
- package/src/providers/email/sendgrid.js +161 -0
- package/src/providers/finance/index.js +17 -0
- package/src/providers/finance/stripe.js +549 -0
- package/src/providers/forms/index.js +17 -0
- package/src/providers/forms/typeform.js +500 -0
- package/src/providers/index.js +123 -0
- package/src/providers/knowledge/index.js +17 -0
- package/src/providers/knowledge/notion.js +389 -0
- package/src/providers/marketing/index.js +17 -0
- package/src/providers/marketing/mailchimp.js +443 -0
- package/src/providers/media/cloudinary.js +318 -0
- package/src/providers/media/index.js +17 -0
- package/src/providers/messaging/index.js +20 -0
- package/src/providers/messaging/slack.js +393 -0
- package/src/providers/messaging/twilio-sms.js +249 -0
- package/src/providers/project-management/index.js +17 -0
- package/src/providers/project-management/linear.js +575 -0
- package/src/providers/registry.js +86 -0
- package/src/providers/spreadsheet/google-sheets.js +375 -0
- package/src/providers/spreadsheet/index.js +20 -0
- package/src/providers/spreadsheet/xlsx.js +423 -0
- package/src/providers/storage/index.js +24 -0
- package/src/providers/storage/s3.js +419 -0
- package/src/providers/support/index.js +17 -0
- package/src/providers/support/zendesk.js +373 -0
- package/src/providers/tasks/index.js +17 -0
- package/src/providers/tasks/todoist.js +286 -0
- package/src/providers/types.js +9 -0
- package/src/providers/video-conferencing/google-meet.js +286 -0
- package/src/providers/video-conferencing/index.js +31 -0
- package/src/providers/video-conferencing/jitsi.js +254 -0
- package/src/providers/video-conferencing/teams.js +270 -0
- package/src/providers/video-conferencing/zoom.js +332 -0
- package/src/registry.js +128 -0
- package/src/tools/communication.js +184 -0
- package/src/tools/data.js +205 -0
- package/src/tools/index.js +11 -0
- package/src/tools/web.js +137 -0
- package/src/types.js +10 -0
- package/test/define.test.js +306 -0
- package/test/registry.test.js +357 -0
- package/test/tools.test.js +363 -0
|
@@ -0,0 +1,950 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Streaming & Video Platform Entity Types (Nouns)
|
|
3
|
+
*
|
|
4
|
+
* Entities for video platforms like YouTube, Twitch, etc.
|
|
5
|
+
* Includes videos, channels, playlists, live streams, and comments.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// Video Channel
|
|
11
|
+
// =============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* Video channel entity
|
|
14
|
+
*
|
|
15
|
+
* Represents a video channel/creator account
|
|
16
|
+
*/
|
|
17
|
+
export const VideoChannel = {
|
|
18
|
+
singular: 'video channel',
|
|
19
|
+
plural: 'video channels',
|
|
20
|
+
description: 'A video channel or creator account',
|
|
21
|
+
properties: {
|
|
22
|
+
// Identity
|
|
23
|
+
name: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'Channel name',
|
|
26
|
+
},
|
|
27
|
+
handle: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
optional: true,
|
|
30
|
+
description: 'Channel handle/username',
|
|
31
|
+
},
|
|
32
|
+
description: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
optional: true,
|
|
35
|
+
description: 'Channel description',
|
|
36
|
+
},
|
|
37
|
+
// Branding
|
|
38
|
+
thumbnailUrl: {
|
|
39
|
+
type: 'url',
|
|
40
|
+
optional: true,
|
|
41
|
+
description: 'Channel thumbnail/avatar',
|
|
42
|
+
},
|
|
43
|
+
bannerUrl: {
|
|
44
|
+
type: 'url',
|
|
45
|
+
optional: true,
|
|
46
|
+
description: 'Channel banner image',
|
|
47
|
+
},
|
|
48
|
+
customUrl: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
optional: true,
|
|
51
|
+
description: 'Custom channel URL',
|
|
52
|
+
},
|
|
53
|
+
// Status
|
|
54
|
+
status: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Channel status: active, suspended, terminated',
|
|
57
|
+
examples: ['active', 'suspended', 'terminated'],
|
|
58
|
+
},
|
|
59
|
+
verified: {
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
optional: true,
|
|
62
|
+
description: 'Whether channel is verified',
|
|
63
|
+
},
|
|
64
|
+
// Statistics
|
|
65
|
+
subscriberCount: {
|
|
66
|
+
type: 'number',
|
|
67
|
+
optional: true,
|
|
68
|
+
description: 'Number of subscribers',
|
|
69
|
+
},
|
|
70
|
+
videoCount: {
|
|
71
|
+
type: 'number',
|
|
72
|
+
optional: true,
|
|
73
|
+
description: 'Number of videos',
|
|
74
|
+
},
|
|
75
|
+
viewCount: {
|
|
76
|
+
type: 'number',
|
|
77
|
+
optional: true,
|
|
78
|
+
description: 'Total view count',
|
|
79
|
+
},
|
|
80
|
+
// Settings
|
|
81
|
+
country: {
|
|
82
|
+
type: 'string',
|
|
83
|
+
optional: true,
|
|
84
|
+
description: 'Channel country',
|
|
85
|
+
},
|
|
86
|
+
defaultLanguage: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
optional: true,
|
|
89
|
+
description: 'Default language',
|
|
90
|
+
},
|
|
91
|
+
madeForKids: {
|
|
92
|
+
type: 'boolean',
|
|
93
|
+
optional: true,
|
|
94
|
+
description: 'Whether channel is made for kids',
|
|
95
|
+
},
|
|
96
|
+
// Monetization
|
|
97
|
+
monetizationEnabled: {
|
|
98
|
+
type: 'boolean',
|
|
99
|
+
optional: true,
|
|
100
|
+
description: 'Whether monetization is enabled',
|
|
101
|
+
},
|
|
102
|
+
partnerProgram: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
optional: true,
|
|
105
|
+
description: 'Partner program status',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
relationships: {
|
|
109
|
+
owner: {
|
|
110
|
+
type: 'Contact',
|
|
111
|
+
description: 'Channel owner',
|
|
112
|
+
},
|
|
113
|
+
videos: {
|
|
114
|
+
type: 'StreamingVideo[]',
|
|
115
|
+
backref: 'channel',
|
|
116
|
+
description: 'Videos on this channel',
|
|
117
|
+
},
|
|
118
|
+
playlists: {
|
|
119
|
+
type: 'Playlist[]',
|
|
120
|
+
backref: 'channel',
|
|
121
|
+
description: 'Channel playlists',
|
|
122
|
+
},
|
|
123
|
+
liveStreams: {
|
|
124
|
+
type: 'LiveStream[]',
|
|
125
|
+
backref: 'channel',
|
|
126
|
+
description: 'Live streams',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
actions: [
|
|
130
|
+
'create',
|
|
131
|
+
'update',
|
|
132
|
+
'delete',
|
|
133
|
+
'verify',
|
|
134
|
+
'suspend',
|
|
135
|
+
'unsuspend',
|
|
136
|
+
'enableMonetization',
|
|
137
|
+
'disableMonetization',
|
|
138
|
+
'subscribe',
|
|
139
|
+
'unsubscribe',
|
|
140
|
+
],
|
|
141
|
+
events: [
|
|
142
|
+
'created',
|
|
143
|
+
'updated',
|
|
144
|
+
'deleted',
|
|
145
|
+
'verified',
|
|
146
|
+
'suspended',
|
|
147
|
+
'unsuspended',
|
|
148
|
+
'monetizationEnabled',
|
|
149
|
+
'monetizationDisabled',
|
|
150
|
+
'subscribed',
|
|
151
|
+
'unsubscribed',
|
|
152
|
+
],
|
|
153
|
+
};
|
|
154
|
+
// =============================================================================
|
|
155
|
+
// Streaming Video
|
|
156
|
+
// =============================================================================
|
|
157
|
+
/**
|
|
158
|
+
* Streaming video entity
|
|
159
|
+
*
|
|
160
|
+
* Represents a video on a streaming platform
|
|
161
|
+
*/
|
|
162
|
+
export const StreamingVideo = {
|
|
163
|
+
singular: 'streaming video',
|
|
164
|
+
plural: 'streaming videos',
|
|
165
|
+
description: 'A video on a streaming platform',
|
|
166
|
+
properties: {
|
|
167
|
+
// Identity
|
|
168
|
+
title: {
|
|
169
|
+
type: 'string',
|
|
170
|
+
description: 'Video title',
|
|
171
|
+
},
|
|
172
|
+
description: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
optional: true,
|
|
175
|
+
description: 'Video description',
|
|
176
|
+
},
|
|
177
|
+
tags: {
|
|
178
|
+
type: 'string',
|
|
179
|
+
array: true,
|
|
180
|
+
optional: true,
|
|
181
|
+
description: 'Video tags',
|
|
182
|
+
},
|
|
183
|
+
category: {
|
|
184
|
+
type: 'string',
|
|
185
|
+
optional: true,
|
|
186
|
+
description: 'Video category',
|
|
187
|
+
},
|
|
188
|
+
// Media
|
|
189
|
+
thumbnailUrl: {
|
|
190
|
+
type: 'url',
|
|
191
|
+
optional: true,
|
|
192
|
+
description: 'Video thumbnail',
|
|
193
|
+
},
|
|
194
|
+
duration: {
|
|
195
|
+
type: 'number',
|
|
196
|
+
optional: true,
|
|
197
|
+
description: 'Video duration in seconds',
|
|
198
|
+
},
|
|
199
|
+
resolution: {
|
|
200
|
+
type: 'string',
|
|
201
|
+
optional: true,
|
|
202
|
+
description: 'Video resolution: 720p, 1080p, 4k',
|
|
203
|
+
examples: ['480p', '720p', '1080p', '1440p', '4k'],
|
|
204
|
+
},
|
|
205
|
+
// Status
|
|
206
|
+
status: {
|
|
207
|
+
type: 'string',
|
|
208
|
+
description: 'Video status: processing, public, private, unlisted, deleted',
|
|
209
|
+
examples: ['processing', 'public', 'private', 'unlisted', 'deleted'],
|
|
210
|
+
},
|
|
211
|
+
publishedAt: {
|
|
212
|
+
type: 'datetime',
|
|
213
|
+
optional: true,
|
|
214
|
+
description: 'Publication date',
|
|
215
|
+
},
|
|
216
|
+
scheduledPublishAt: {
|
|
217
|
+
type: 'datetime',
|
|
218
|
+
optional: true,
|
|
219
|
+
description: 'Scheduled publication date',
|
|
220
|
+
},
|
|
221
|
+
// Settings
|
|
222
|
+
madeForKids: {
|
|
223
|
+
type: 'boolean',
|
|
224
|
+
optional: true,
|
|
225
|
+
description: 'Whether video is made for kids',
|
|
226
|
+
},
|
|
227
|
+
ageRestricted: {
|
|
228
|
+
type: 'boolean',
|
|
229
|
+
optional: true,
|
|
230
|
+
description: 'Whether video is age-restricted',
|
|
231
|
+
},
|
|
232
|
+
embeddable: {
|
|
233
|
+
type: 'boolean',
|
|
234
|
+
optional: true,
|
|
235
|
+
description: 'Whether video can be embedded',
|
|
236
|
+
},
|
|
237
|
+
license: {
|
|
238
|
+
type: 'string',
|
|
239
|
+
optional: true,
|
|
240
|
+
description: 'Video license',
|
|
241
|
+
},
|
|
242
|
+
// Statistics
|
|
243
|
+
viewCount: {
|
|
244
|
+
type: 'number',
|
|
245
|
+
optional: true,
|
|
246
|
+
description: 'View count',
|
|
247
|
+
},
|
|
248
|
+
likeCount: {
|
|
249
|
+
type: 'number',
|
|
250
|
+
optional: true,
|
|
251
|
+
description: 'Like count',
|
|
252
|
+
},
|
|
253
|
+
dislikeCount: {
|
|
254
|
+
type: 'number',
|
|
255
|
+
optional: true,
|
|
256
|
+
description: 'Dislike count',
|
|
257
|
+
},
|
|
258
|
+
commentCount: {
|
|
259
|
+
type: 'number',
|
|
260
|
+
optional: true,
|
|
261
|
+
description: 'Comment count',
|
|
262
|
+
},
|
|
263
|
+
shareCount: {
|
|
264
|
+
type: 'number',
|
|
265
|
+
optional: true,
|
|
266
|
+
description: 'Share count',
|
|
267
|
+
},
|
|
268
|
+
// Engagement
|
|
269
|
+
averageViewDuration: {
|
|
270
|
+
type: 'number',
|
|
271
|
+
optional: true,
|
|
272
|
+
description: 'Average view duration in seconds',
|
|
273
|
+
},
|
|
274
|
+
averageViewPercentage: {
|
|
275
|
+
type: 'number',
|
|
276
|
+
optional: true,
|
|
277
|
+
description: 'Average percentage watched',
|
|
278
|
+
},
|
|
279
|
+
// Monetization
|
|
280
|
+
monetized: {
|
|
281
|
+
type: 'boolean',
|
|
282
|
+
optional: true,
|
|
283
|
+
description: 'Whether video is monetized',
|
|
284
|
+
},
|
|
285
|
+
adSuitability: {
|
|
286
|
+
type: 'string',
|
|
287
|
+
optional: true,
|
|
288
|
+
description: 'Ad suitability status',
|
|
289
|
+
},
|
|
290
|
+
estimatedRevenue: {
|
|
291
|
+
type: 'number',
|
|
292
|
+
optional: true,
|
|
293
|
+
description: 'Estimated revenue',
|
|
294
|
+
},
|
|
295
|
+
// Captions
|
|
296
|
+
captionsAvailable: {
|
|
297
|
+
type: 'boolean',
|
|
298
|
+
optional: true,
|
|
299
|
+
description: 'Whether captions are available',
|
|
300
|
+
},
|
|
301
|
+
captionLanguages: {
|
|
302
|
+
type: 'string',
|
|
303
|
+
array: true,
|
|
304
|
+
optional: true,
|
|
305
|
+
description: 'Available caption languages',
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
relationships: {
|
|
309
|
+
channel: {
|
|
310
|
+
type: 'VideoChannel',
|
|
311
|
+
backref: 'videos',
|
|
312
|
+
description: 'Channel that owns this video',
|
|
313
|
+
},
|
|
314
|
+
comments: {
|
|
315
|
+
type: 'VideoComment[]',
|
|
316
|
+
backref: 'video',
|
|
317
|
+
description: 'Video comments',
|
|
318
|
+
},
|
|
319
|
+
playlists: {
|
|
320
|
+
type: 'Playlist[]',
|
|
321
|
+
description: 'Playlists containing this video',
|
|
322
|
+
},
|
|
323
|
+
captions: {
|
|
324
|
+
type: 'Caption[]',
|
|
325
|
+
description: 'Video captions',
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
actions: [
|
|
329
|
+
'upload',
|
|
330
|
+
'update',
|
|
331
|
+
'delete',
|
|
332
|
+
'publish',
|
|
333
|
+
'unpublish',
|
|
334
|
+
'setPrivacy',
|
|
335
|
+
'like',
|
|
336
|
+
'dislike',
|
|
337
|
+
'share',
|
|
338
|
+
'comment',
|
|
339
|
+
'addToPlaylist',
|
|
340
|
+
'removeFromPlaylist',
|
|
341
|
+
'monetize',
|
|
342
|
+
'demonetize',
|
|
343
|
+
'addCaption',
|
|
344
|
+
'removeCaption',
|
|
345
|
+
],
|
|
346
|
+
events: [
|
|
347
|
+
'uploaded',
|
|
348
|
+
'updated',
|
|
349
|
+
'deleted',
|
|
350
|
+
'published',
|
|
351
|
+
'unpublished',
|
|
352
|
+
'privacyChanged',
|
|
353
|
+
'liked',
|
|
354
|
+
'disliked',
|
|
355
|
+
'shared',
|
|
356
|
+
'commented',
|
|
357
|
+
'addedToPlaylist',
|
|
358
|
+
'removedFromPlaylist',
|
|
359
|
+
'monetized',
|
|
360
|
+
'demonetized',
|
|
361
|
+
'viewed',
|
|
362
|
+
],
|
|
363
|
+
};
|
|
364
|
+
// =============================================================================
|
|
365
|
+
// Playlist
|
|
366
|
+
// =============================================================================
|
|
367
|
+
/**
|
|
368
|
+
* Playlist entity
|
|
369
|
+
*
|
|
370
|
+
* Represents a video playlist
|
|
371
|
+
*/
|
|
372
|
+
export const Playlist = {
|
|
373
|
+
singular: 'playlist',
|
|
374
|
+
plural: 'playlists',
|
|
375
|
+
description: 'A video playlist',
|
|
376
|
+
properties: {
|
|
377
|
+
// Identity
|
|
378
|
+
title: {
|
|
379
|
+
type: 'string',
|
|
380
|
+
description: 'Playlist title',
|
|
381
|
+
},
|
|
382
|
+
description: {
|
|
383
|
+
type: 'string',
|
|
384
|
+
optional: true,
|
|
385
|
+
description: 'Playlist description',
|
|
386
|
+
},
|
|
387
|
+
// Branding
|
|
388
|
+
thumbnailUrl: {
|
|
389
|
+
type: 'url',
|
|
390
|
+
optional: true,
|
|
391
|
+
description: 'Playlist thumbnail',
|
|
392
|
+
},
|
|
393
|
+
// Status
|
|
394
|
+
visibility: {
|
|
395
|
+
type: 'string',
|
|
396
|
+
description: 'Playlist visibility: public, private, unlisted',
|
|
397
|
+
examples: ['public', 'private', 'unlisted'],
|
|
398
|
+
},
|
|
399
|
+
// Content
|
|
400
|
+
itemCount: {
|
|
401
|
+
type: 'number',
|
|
402
|
+
optional: true,
|
|
403
|
+
description: 'Number of items in playlist',
|
|
404
|
+
},
|
|
405
|
+
// Settings
|
|
406
|
+
defaultLanguage: {
|
|
407
|
+
type: 'string',
|
|
408
|
+
optional: true,
|
|
409
|
+
description: 'Default language',
|
|
410
|
+
},
|
|
411
|
+
embedEnabled: {
|
|
412
|
+
type: 'boolean',
|
|
413
|
+
optional: true,
|
|
414
|
+
description: 'Whether embedding is enabled',
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
relationships: {
|
|
418
|
+
channel: {
|
|
419
|
+
type: 'VideoChannel',
|
|
420
|
+
backref: 'playlists',
|
|
421
|
+
description: 'Channel that owns this playlist',
|
|
422
|
+
},
|
|
423
|
+
items: {
|
|
424
|
+
type: 'PlaylistItem[]',
|
|
425
|
+
backref: 'playlist',
|
|
426
|
+
description: 'Items in this playlist',
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
actions: [
|
|
430
|
+
'create',
|
|
431
|
+
'update',
|
|
432
|
+
'delete',
|
|
433
|
+
'addItem',
|
|
434
|
+
'removeItem',
|
|
435
|
+
'reorderItems',
|
|
436
|
+
'setVisibility',
|
|
437
|
+
],
|
|
438
|
+
events: [
|
|
439
|
+
'created',
|
|
440
|
+
'updated',
|
|
441
|
+
'deleted',
|
|
442
|
+
'itemAdded',
|
|
443
|
+
'itemRemoved',
|
|
444
|
+
'itemsReordered',
|
|
445
|
+
'visibilityChanged',
|
|
446
|
+
],
|
|
447
|
+
};
|
|
448
|
+
/**
|
|
449
|
+
* Playlist item entity
|
|
450
|
+
*/
|
|
451
|
+
export const PlaylistItem = {
|
|
452
|
+
singular: 'playlist item',
|
|
453
|
+
plural: 'playlist items',
|
|
454
|
+
description: 'An item in a playlist',
|
|
455
|
+
properties: {
|
|
456
|
+
position: {
|
|
457
|
+
type: 'number',
|
|
458
|
+
description: 'Position in playlist (0-indexed)',
|
|
459
|
+
},
|
|
460
|
+
addedAt: {
|
|
461
|
+
type: 'datetime',
|
|
462
|
+
optional: true,
|
|
463
|
+
description: 'When item was added',
|
|
464
|
+
},
|
|
465
|
+
note: {
|
|
466
|
+
type: 'string',
|
|
467
|
+
optional: true,
|
|
468
|
+
description: 'Note about this item',
|
|
469
|
+
},
|
|
470
|
+
},
|
|
471
|
+
relationships: {
|
|
472
|
+
playlist: {
|
|
473
|
+
type: 'Playlist',
|
|
474
|
+
backref: 'items',
|
|
475
|
+
description: 'Parent playlist',
|
|
476
|
+
},
|
|
477
|
+
video: {
|
|
478
|
+
type: 'StreamingVideo',
|
|
479
|
+
description: 'The video',
|
|
480
|
+
},
|
|
481
|
+
},
|
|
482
|
+
actions: ['add', 'remove', 'move', 'setNote'],
|
|
483
|
+
events: ['added', 'removed', 'moved', 'noteSet'],
|
|
484
|
+
};
|
|
485
|
+
// =============================================================================
|
|
486
|
+
// Live Stream
|
|
487
|
+
// =============================================================================
|
|
488
|
+
/**
|
|
489
|
+
* Live stream entity
|
|
490
|
+
*
|
|
491
|
+
* Represents a live streaming broadcast
|
|
492
|
+
*/
|
|
493
|
+
export const LiveStream = {
|
|
494
|
+
singular: 'live stream',
|
|
495
|
+
plural: 'live streams',
|
|
496
|
+
description: 'A live streaming broadcast',
|
|
497
|
+
properties: {
|
|
498
|
+
// Identity
|
|
499
|
+
title: {
|
|
500
|
+
type: 'string',
|
|
501
|
+
description: 'Stream title',
|
|
502
|
+
},
|
|
503
|
+
description: {
|
|
504
|
+
type: 'string',
|
|
505
|
+
optional: true,
|
|
506
|
+
description: 'Stream description',
|
|
507
|
+
},
|
|
508
|
+
category: {
|
|
509
|
+
type: 'string',
|
|
510
|
+
optional: true,
|
|
511
|
+
description: 'Stream category',
|
|
512
|
+
},
|
|
513
|
+
tags: {
|
|
514
|
+
type: 'string',
|
|
515
|
+
array: true,
|
|
516
|
+
optional: true,
|
|
517
|
+
description: 'Stream tags',
|
|
518
|
+
},
|
|
519
|
+
// Branding
|
|
520
|
+
thumbnailUrl: {
|
|
521
|
+
type: 'url',
|
|
522
|
+
optional: true,
|
|
523
|
+
description: 'Stream thumbnail',
|
|
524
|
+
},
|
|
525
|
+
// Status
|
|
526
|
+
status: {
|
|
527
|
+
type: 'string',
|
|
528
|
+
description: 'Stream status: scheduled, live, ended, cancelled',
|
|
529
|
+
examples: ['scheduled', 'live', 'ended', 'cancelled'],
|
|
530
|
+
},
|
|
531
|
+
visibility: {
|
|
532
|
+
type: 'string',
|
|
533
|
+
description: 'Stream visibility: public, private, unlisted',
|
|
534
|
+
examples: ['public', 'private', 'unlisted'],
|
|
535
|
+
},
|
|
536
|
+
// Timing
|
|
537
|
+
scheduledStartTime: {
|
|
538
|
+
type: 'datetime',
|
|
539
|
+
optional: true,
|
|
540
|
+
description: 'Scheduled start time',
|
|
541
|
+
},
|
|
542
|
+
actualStartTime: {
|
|
543
|
+
type: 'datetime',
|
|
544
|
+
optional: true,
|
|
545
|
+
description: 'Actual start time',
|
|
546
|
+
},
|
|
547
|
+
actualEndTime: {
|
|
548
|
+
type: 'datetime',
|
|
549
|
+
optional: true,
|
|
550
|
+
description: 'Actual end time',
|
|
551
|
+
},
|
|
552
|
+
duration: {
|
|
553
|
+
type: 'number',
|
|
554
|
+
optional: true,
|
|
555
|
+
description: 'Stream duration in seconds',
|
|
556
|
+
},
|
|
557
|
+
// Configuration
|
|
558
|
+
streamKey: {
|
|
559
|
+
type: 'string',
|
|
560
|
+
optional: true,
|
|
561
|
+
description: 'Stream key',
|
|
562
|
+
},
|
|
563
|
+
rtmpUrl: {
|
|
564
|
+
type: 'url',
|
|
565
|
+
optional: true,
|
|
566
|
+
description: 'RTMP ingest URL',
|
|
567
|
+
},
|
|
568
|
+
latencyPreference: {
|
|
569
|
+
type: 'string',
|
|
570
|
+
optional: true,
|
|
571
|
+
description: 'Latency preference: normal, low, ultra_low',
|
|
572
|
+
examples: ['normal', 'low', 'ultra_low'],
|
|
573
|
+
},
|
|
574
|
+
dvr: {
|
|
575
|
+
type: 'boolean',
|
|
576
|
+
optional: true,
|
|
577
|
+
description: 'Whether DVR is enabled',
|
|
578
|
+
},
|
|
579
|
+
// Chat
|
|
580
|
+
chatEnabled: {
|
|
581
|
+
type: 'boolean',
|
|
582
|
+
optional: true,
|
|
583
|
+
description: 'Whether chat is enabled',
|
|
584
|
+
},
|
|
585
|
+
chatMode: {
|
|
586
|
+
type: 'string',
|
|
587
|
+
optional: true,
|
|
588
|
+
description: 'Chat mode: open, subscribers, slow, members',
|
|
589
|
+
examples: ['open', 'subscribers', 'slow', 'members'],
|
|
590
|
+
},
|
|
591
|
+
// Statistics
|
|
592
|
+
concurrentViewers: {
|
|
593
|
+
type: 'number',
|
|
594
|
+
optional: true,
|
|
595
|
+
description: 'Current concurrent viewers',
|
|
596
|
+
},
|
|
597
|
+
peakViewers: {
|
|
598
|
+
type: 'number',
|
|
599
|
+
optional: true,
|
|
600
|
+
description: 'Peak concurrent viewers',
|
|
601
|
+
},
|
|
602
|
+
totalViews: {
|
|
603
|
+
type: 'number',
|
|
604
|
+
optional: true,
|
|
605
|
+
description: 'Total unique views',
|
|
606
|
+
},
|
|
607
|
+
chatMessages: {
|
|
608
|
+
type: 'number',
|
|
609
|
+
optional: true,
|
|
610
|
+
description: 'Total chat messages',
|
|
611
|
+
},
|
|
612
|
+
// Recording
|
|
613
|
+
recordingEnabled: {
|
|
614
|
+
type: 'boolean',
|
|
615
|
+
optional: true,
|
|
616
|
+
description: 'Whether recording is enabled',
|
|
617
|
+
},
|
|
618
|
+
recordingUrl: {
|
|
619
|
+
type: 'url',
|
|
620
|
+
optional: true,
|
|
621
|
+
description: 'Recording URL (after stream ends)',
|
|
622
|
+
},
|
|
623
|
+
},
|
|
624
|
+
relationships: {
|
|
625
|
+
channel: {
|
|
626
|
+
type: 'VideoChannel',
|
|
627
|
+
backref: 'liveStreams',
|
|
628
|
+
description: 'Channel broadcasting the stream',
|
|
629
|
+
},
|
|
630
|
+
recording: {
|
|
631
|
+
type: 'StreamingVideo',
|
|
632
|
+
required: false,
|
|
633
|
+
description: 'Recording of the stream',
|
|
634
|
+
},
|
|
635
|
+
chatMessages: {
|
|
636
|
+
type: 'ChatMessage[]',
|
|
637
|
+
description: 'Chat messages during stream',
|
|
638
|
+
},
|
|
639
|
+
},
|
|
640
|
+
actions: [
|
|
641
|
+
'schedule',
|
|
642
|
+
'start',
|
|
643
|
+
'end',
|
|
644
|
+
'cancel',
|
|
645
|
+
'update',
|
|
646
|
+
'delete',
|
|
647
|
+
'enableChat',
|
|
648
|
+
'disableChat',
|
|
649
|
+
'setChatMode',
|
|
650
|
+
'enableDvr',
|
|
651
|
+
'disableDvr',
|
|
652
|
+
'generateStreamKey',
|
|
653
|
+
'revokeStreamKey',
|
|
654
|
+
],
|
|
655
|
+
events: [
|
|
656
|
+
'scheduled',
|
|
657
|
+
'started',
|
|
658
|
+
'ended',
|
|
659
|
+
'cancelled',
|
|
660
|
+
'updated',
|
|
661
|
+
'deleted',
|
|
662
|
+
'chatEnabled',
|
|
663
|
+
'chatDisabled',
|
|
664
|
+
'chatModeChanged',
|
|
665
|
+
'viewerJoined',
|
|
666
|
+
'viewerLeft',
|
|
667
|
+
],
|
|
668
|
+
};
|
|
669
|
+
/**
|
|
670
|
+
* Chat message entity
|
|
671
|
+
*/
|
|
672
|
+
export const ChatMessage = {
|
|
673
|
+
singular: 'chat message',
|
|
674
|
+
plural: 'chat messages',
|
|
675
|
+
description: 'A chat message in a live stream',
|
|
676
|
+
properties: {
|
|
677
|
+
content: {
|
|
678
|
+
type: 'string',
|
|
679
|
+
description: 'Message content',
|
|
680
|
+
},
|
|
681
|
+
authorName: {
|
|
682
|
+
type: 'string',
|
|
683
|
+
description: 'Author display name',
|
|
684
|
+
},
|
|
685
|
+
authorAvatar: {
|
|
686
|
+
type: 'url',
|
|
687
|
+
optional: true,
|
|
688
|
+
description: 'Author avatar URL',
|
|
689
|
+
},
|
|
690
|
+
isModerator: {
|
|
691
|
+
type: 'boolean',
|
|
692
|
+
optional: true,
|
|
693
|
+
description: 'Whether author is a moderator',
|
|
694
|
+
},
|
|
695
|
+
isSubscriber: {
|
|
696
|
+
type: 'boolean',
|
|
697
|
+
optional: true,
|
|
698
|
+
description: 'Whether author is a subscriber',
|
|
699
|
+
},
|
|
700
|
+
isMember: {
|
|
701
|
+
type: 'boolean',
|
|
702
|
+
optional: true,
|
|
703
|
+
description: 'Whether author is a member',
|
|
704
|
+
},
|
|
705
|
+
isOwner: {
|
|
706
|
+
type: 'boolean',
|
|
707
|
+
optional: true,
|
|
708
|
+
description: 'Whether author is the channel owner',
|
|
709
|
+
},
|
|
710
|
+
timestamp: {
|
|
711
|
+
type: 'datetime',
|
|
712
|
+
description: 'Message timestamp',
|
|
713
|
+
},
|
|
714
|
+
superchat: {
|
|
715
|
+
type: 'boolean',
|
|
716
|
+
optional: true,
|
|
717
|
+
description: 'Whether this is a paid message',
|
|
718
|
+
},
|
|
719
|
+
superchatAmount: {
|
|
720
|
+
type: 'number',
|
|
721
|
+
optional: true,
|
|
722
|
+
description: 'Super chat amount',
|
|
723
|
+
},
|
|
724
|
+
deleted: {
|
|
725
|
+
type: 'boolean',
|
|
726
|
+
optional: true,
|
|
727
|
+
description: 'Whether message was deleted',
|
|
728
|
+
},
|
|
729
|
+
},
|
|
730
|
+
relationships: {
|
|
731
|
+
liveStream: {
|
|
732
|
+
type: 'LiveStream',
|
|
733
|
+
backref: 'chatMessages',
|
|
734
|
+
description: 'Parent live stream',
|
|
735
|
+
},
|
|
736
|
+
author: {
|
|
737
|
+
type: 'Contact',
|
|
738
|
+
description: 'Message author',
|
|
739
|
+
},
|
|
740
|
+
},
|
|
741
|
+
actions: ['send', 'delete', 'pin', 'unpin', 'timeout', 'ban'],
|
|
742
|
+
events: ['sent', 'deleted', 'pinned', 'unpinned'],
|
|
743
|
+
};
|
|
744
|
+
// =============================================================================
|
|
745
|
+
// Video Comment
|
|
746
|
+
// =============================================================================
|
|
747
|
+
/**
|
|
748
|
+
* Video comment entity
|
|
749
|
+
*
|
|
750
|
+
* Represents a comment on a video
|
|
751
|
+
*/
|
|
752
|
+
export const VideoComment = {
|
|
753
|
+
singular: 'video comment',
|
|
754
|
+
plural: 'video comments',
|
|
755
|
+
description: 'A comment on a video',
|
|
756
|
+
properties: {
|
|
757
|
+
// Content
|
|
758
|
+
text: {
|
|
759
|
+
type: 'string',
|
|
760
|
+
description: 'Comment text',
|
|
761
|
+
},
|
|
762
|
+
textOriginal: {
|
|
763
|
+
type: 'string',
|
|
764
|
+
optional: true,
|
|
765
|
+
description: 'Original text before any edits',
|
|
766
|
+
},
|
|
767
|
+
// Author
|
|
768
|
+
authorName: {
|
|
769
|
+
type: 'string',
|
|
770
|
+
description: 'Author display name',
|
|
771
|
+
},
|
|
772
|
+
authorAvatar: {
|
|
773
|
+
type: 'url',
|
|
774
|
+
optional: true,
|
|
775
|
+
description: 'Author avatar URL',
|
|
776
|
+
},
|
|
777
|
+
authorChannelUrl: {
|
|
778
|
+
type: 'url',
|
|
779
|
+
optional: true,
|
|
780
|
+
description: 'Author channel URL',
|
|
781
|
+
},
|
|
782
|
+
// Status
|
|
783
|
+
published: {
|
|
784
|
+
type: 'boolean',
|
|
785
|
+
optional: true,
|
|
786
|
+
description: 'Whether comment is published',
|
|
787
|
+
},
|
|
788
|
+
heldForReview: {
|
|
789
|
+
type: 'boolean',
|
|
790
|
+
optional: true,
|
|
791
|
+
description: 'Whether comment is held for review',
|
|
792
|
+
},
|
|
793
|
+
// Engagement
|
|
794
|
+
likeCount: {
|
|
795
|
+
type: 'number',
|
|
796
|
+
optional: true,
|
|
797
|
+
description: 'Number of likes',
|
|
798
|
+
},
|
|
799
|
+
replyCount: {
|
|
800
|
+
type: 'number',
|
|
801
|
+
optional: true,
|
|
802
|
+
description: 'Number of replies',
|
|
803
|
+
},
|
|
804
|
+
// Metadata
|
|
805
|
+
isReply: {
|
|
806
|
+
type: 'boolean',
|
|
807
|
+
optional: true,
|
|
808
|
+
description: 'Whether this is a reply to another comment',
|
|
809
|
+
},
|
|
810
|
+
timestamp: {
|
|
811
|
+
type: 'datetime',
|
|
812
|
+
description: 'Comment timestamp',
|
|
813
|
+
},
|
|
814
|
+
editedAt: {
|
|
815
|
+
type: 'datetime',
|
|
816
|
+
optional: true,
|
|
817
|
+
description: 'Last edit timestamp',
|
|
818
|
+
},
|
|
819
|
+
// Pinned
|
|
820
|
+
pinned: {
|
|
821
|
+
type: 'boolean',
|
|
822
|
+
optional: true,
|
|
823
|
+
description: 'Whether comment is pinned',
|
|
824
|
+
},
|
|
825
|
+
heartedByCreator: {
|
|
826
|
+
type: 'boolean',
|
|
827
|
+
optional: true,
|
|
828
|
+
description: 'Whether creator hearted this comment',
|
|
829
|
+
},
|
|
830
|
+
},
|
|
831
|
+
relationships: {
|
|
832
|
+
video: {
|
|
833
|
+
type: 'StreamingVideo',
|
|
834
|
+
backref: 'comments',
|
|
835
|
+
description: 'Video this comment is on',
|
|
836
|
+
},
|
|
837
|
+
author: {
|
|
838
|
+
type: 'Contact',
|
|
839
|
+
description: 'Comment author',
|
|
840
|
+
},
|
|
841
|
+
parentComment: {
|
|
842
|
+
type: 'VideoComment',
|
|
843
|
+
required: false,
|
|
844
|
+
description: 'Parent comment if this is a reply',
|
|
845
|
+
},
|
|
846
|
+
replies: {
|
|
847
|
+
type: 'VideoComment[]',
|
|
848
|
+
description: 'Replies to this comment',
|
|
849
|
+
},
|
|
850
|
+
},
|
|
851
|
+
actions: [
|
|
852
|
+
'create',
|
|
853
|
+
'update',
|
|
854
|
+
'delete',
|
|
855
|
+
'like',
|
|
856
|
+
'unlike',
|
|
857
|
+
'reply',
|
|
858
|
+
'pin',
|
|
859
|
+
'unpin',
|
|
860
|
+
'heart',
|
|
861
|
+
'unheart',
|
|
862
|
+
'approve',
|
|
863
|
+
'reject',
|
|
864
|
+
'report',
|
|
865
|
+
],
|
|
866
|
+
events: [
|
|
867
|
+
'created',
|
|
868
|
+
'updated',
|
|
869
|
+
'deleted',
|
|
870
|
+
'liked',
|
|
871
|
+
'unliked',
|
|
872
|
+
'replied',
|
|
873
|
+
'pinned',
|
|
874
|
+
'unpinned',
|
|
875
|
+
'hearted',
|
|
876
|
+
'unhearted',
|
|
877
|
+
'approved',
|
|
878
|
+
'rejected',
|
|
879
|
+
'reported',
|
|
880
|
+
],
|
|
881
|
+
};
|
|
882
|
+
// =============================================================================
|
|
883
|
+
// Subscription
|
|
884
|
+
// =============================================================================
|
|
885
|
+
/**
|
|
886
|
+
* Channel subscription entity
|
|
887
|
+
*
|
|
888
|
+
* Represents a subscription to a video channel
|
|
889
|
+
*/
|
|
890
|
+
export const ChannelSubscription = {
|
|
891
|
+
singular: 'channel subscription',
|
|
892
|
+
plural: 'channel subscriptions',
|
|
893
|
+
description: 'A subscription to a video channel',
|
|
894
|
+
properties: {
|
|
895
|
+
// Notification settings
|
|
896
|
+
notificationPreference: {
|
|
897
|
+
type: 'string',
|
|
898
|
+
description: 'Notification preference: all, personalized, none',
|
|
899
|
+
examples: ['all', 'personalized', 'none'],
|
|
900
|
+
},
|
|
901
|
+
// Timestamps
|
|
902
|
+
subscribedAt: {
|
|
903
|
+
type: 'datetime',
|
|
904
|
+
description: 'When subscription was created',
|
|
905
|
+
},
|
|
906
|
+
},
|
|
907
|
+
relationships: {
|
|
908
|
+
subscriber: {
|
|
909
|
+
type: 'Contact',
|
|
910
|
+
description: 'The subscriber',
|
|
911
|
+
},
|
|
912
|
+
channel: {
|
|
913
|
+
type: 'VideoChannel',
|
|
914
|
+
description: 'The subscribed channel',
|
|
915
|
+
},
|
|
916
|
+
},
|
|
917
|
+
actions: ['subscribe', 'unsubscribe', 'setNotifications'],
|
|
918
|
+
events: ['subscribed', 'unsubscribed', 'notificationsChanged'],
|
|
919
|
+
};
|
|
920
|
+
// =============================================================================
|
|
921
|
+
// Export all entities as a schema
|
|
922
|
+
// =============================================================================
|
|
923
|
+
/**
|
|
924
|
+
* All video entity types
|
|
925
|
+
*/
|
|
926
|
+
export const VideoEntities = {
|
|
927
|
+
// Channels
|
|
928
|
+
VideoChannel,
|
|
929
|
+
// Videos
|
|
930
|
+
StreamingVideo,
|
|
931
|
+
// Playlists
|
|
932
|
+
Playlist,
|
|
933
|
+
PlaylistItem,
|
|
934
|
+
// Live Streaming
|
|
935
|
+
LiveStream,
|
|
936
|
+
ChatMessage,
|
|
937
|
+
// Comments
|
|
938
|
+
VideoComment,
|
|
939
|
+
// Subscriptions
|
|
940
|
+
ChannelSubscription,
|
|
941
|
+
};
|
|
942
|
+
/**
|
|
943
|
+
* Entity categories for organization
|
|
944
|
+
*/
|
|
945
|
+
export const VideoCategories = {
|
|
946
|
+
channels: ['VideoChannel'],
|
|
947
|
+
videos: ['StreamingVideo', 'Playlist', 'PlaylistItem'],
|
|
948
|
+
liveStreaming: ['LiveStream', 'ChatMessage'],
|
|
949
|
+
engagement: ['VideoComment', 'ChannelSubscription'],
|
|
950
|
+
};
|