digital-tools 2.1.1 → 2.3.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 (293) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +2 -0
  3. package/dist/client.d.ts +109 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/client.js +69 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/define.d.ts +2 -2
  8. package/dist/define.d.ts.map +1 -1
  9. package/dist/define.js +22 -20
  10. package/dist/define.js.map +1 -1
  11. package/dist/function-ref.d.ts +229 -0
  12. package/dist/function-ref.d.ts.map +1 -0
  13. package/dist/function-ref.js +28 -0
  14. package/dist/function-ref.js.map +1 -0
  15. package/dist/function-sugar.d.ts +57 -0
  16. package/dist/function-sugar.d.ts.map +1 -0
  17. package/dist/function-sugar.js +79 -0
  18. package/dist/function-sugar.js.map +1 -0
  19. package/dist/index.d.ts +10 -3
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +24 -4
  22. package/dist/index.js.map +1 -1
  23. package/dist/providers/analytics/mixpanel.d.ts.map +1 -1
  24. package/dist/providers/analytics/mixpanel.js +21 -18
  25. package/dist/providers/analytics/mixpanel.js.map +1 -1
  26. package/dist/providers/calendar/cal-com.d.ts.map +1 -1
  27. package/dist/providers/calendar/cal-com.js +10 -10
  28. package/dist/providers/calendar/cal-com.js.map +1 -1
  29. package/dist/providers/calendar/google-calendar.d.ts.map +1 -1
  30. package/dist/providers/calendar/google-calendar.js +4 -4
  31. package/dist/providers/calendar/google-calendar.js.map +1 -1
  32. package/dist/providers/crm/hubspot.d.ts.map +1 -1
  33. package/dist/providers/crm/hubspot.js +107 -85
  34. package/dist/providers/crm/hubspot.js.map +1 -1
  35. package/dist/providers/development/github.d.ts.map +1 -1
  36. package/dist/providers/development/github.js +40 -43
  37. package/dist/providers/development/github.js.map +1 -1
  38. package/dist/providers/ecommerce/shopify.d.ts.map +1 -1
  39. package/dist/providers/ecommerce/shopify.js +79 -62
  40. package/dist/providers/ecommerce/shopify.js.map +1 -1
  41. package/dist/providers/email/resend.d.ts.map +1 -1
  42. package/dist/providers/email/resend.js +20 -16
  43. package/dist/providers/email/resend.js.map +1 -1
  44. package/dist/providers/email/sendgrid.d.ts.map +1 -1
  45. package/dist/providers/email/sendgrid.js +12 -9
  46. package/dist/providers/email/sendgrid.js.map +1 -1
  47. package/dist/providers/finance/stripe.d.ts.map +1 -1
  48. package/dist/providers/finance/stripe.js +44 -42
  49. package/dist/providers/finance/stripe.js.map +1 -1
  50. package/dist/providers/forms/typeform.d.ts.map +1 -1
  51. package/dist/providers/forms/typeform.js +68 -58
  52. package/dist/providers/forms/typeform.js.map +1 -1
  53. package/dist/providers/knowledge/notion.d.ts.map +1 -1
  54. package/dist/providers/knowledge/notion.js +75 -41
  55. package/dist/providers/knowledge/notion.js.map +1 -1
  56. package/dist/providers/marketing/mailchimp.d.ts.map +1 -1
  57. package/dist/providers/marketing/mailchimp.js +74 -61
  58. package/dist/providers/marketing/mailchimp.js.map +1 -1
  59. package/dist/providers/media/cloudinary.d.ts.map +1 -1
  60. package/dist/providers/media/cloudinary.js +30 -28
  61. package/dist/providers/media/cloudinary.js.map +1 -1
  62. package/dist/providers/messaging/slack.d.ts.map +1 -1
  63. package/dist/providers/messaging/slack.js +75 -58
  64. package/dist/providers/messaging/slack.js.map +1 -1
  65. package/dist/providers/messaging/twilio-sms.d.ts.map +1 -1
  66. package/dist/providers/messaging/twilio-sms.js +33 -15
  67. package/dist/providers/messaging/twilio-sms.js.map +1 -1
  68. package/dist/providers/project-management/linear.d.ts.map +1 -1
  69. package/dist/providers/project-management/linear.js +31 -27
  70. package/dist/providers/project-management/linear.js.map +1 -1
  71. package/dist/providers/spreadsheet/google-sheets.d.ts.map +1 -1
  72. package/dist/providers/spreadsheet/google-sheets.js +21 -18
  73. package/dist/providers/spreadsheet/google-sheets.js.map +1 -1
  74. package/dist/providers/spreadsheet/xlsx.d.ts.map +1 -1
  75. package/dist/providers/spreadsheet/xlsx.js +4 -4
  76. package/dist/providers/spreadsheet/xlsx.js.map +1 -1
  77. package/dist/providers/storage/index.js +1 -0
  78. package/dist/providers/storage/index.js.map +1 -1
  79. package/dist/providers/storage/s3.d.ts.map +1 -1
  80. package/dist/providers/storage/s3.js +36 -27
  81. package/dist/providers/storage/s3.js.map +1 -1
  82. package/dist/providers/support/zendesk.d.ts.map +1 -1
  83. package/dist/providers/support/zendesk.js +24 -25
  84. package/dist/providers/support/zendesk.js.map +1 -1
  85. package/dist/providers/tasks/todoist.d.ts.map +1 -1
  86. package/dist/providers/tasks/todoist.js +18 -18
  87. package/dist/providers/tasks/todoist.js.map +1 -1
  88. package/dist/providers/video-conferencing/google-meet.d.ts.map +1 -1
  89. package/dist/providers/video-conferencing/google-meet.js +11 -11
  90. package/dist/providers/video-conferencing/google-meet.js.map +1 -1
  91. package/dist/providers/video-conferencing/jitsi.js +14 -14
  92. package/dist/providers/video-conferencing/jitsi.js.map +1 -1
  93. package/dist/providers/video-conferencing/teams.d.ts.map +1 -1
  94. package/dist/providers/video-conferencing/teams.js +9 -7
  95. package/dist/providers/video-conferencing/teams.js.map +1 -1
  96. package/dist/providers/video-conferencing/zoom.d.ts.map +1 -1
  97. package/dist/providers/video-conferencing/zoom.js +26 -24
  98. package/dist/providers/video-conferencing/zoom.js.map +1 -1
  99. package/dist/tools/data.d.ts.map +1 -1
  100. package/dist/tools/data.js +5 -12
  101. package/dist/tools/data.js.map +1 -1
  102. package/dist/tools/index.d.ts +1 -0
  103. package/dist/tools/index.d.ts.map +1 -1
  104. package/dist/tools/index.js +1 -0
  105. package/dist/tools/index.js.map +1 -1
  106. package/dist/tools/system.d.ts +289 -0
  107. package/dist/tools/system.d.ts.map +1 -0
  108. package/dist/tools/system.js +752 -0
  109. package/dist/tools/system.js.map +1 -0
  110. package/dist/tools/web.d.ts.map +1 -1
  111. package/dist/tools/web.js +22 -10
  112. package/dist/tools/web.js.map +1 -1
  113. package/dist/track-record.d.ts +101 -0
  114. package/dist/track-record.d.ts.map +1 -0
  115. package/dist/track-record.js +17 -0
  116. package/dist/track-record.js.map +1 -0
  117. package/dist/types.d.ts +210 -9
  118. package/dist/types.d.ts.map +1 -1
  119. package/dist/verb-registration.d.ts +122 -0
  120. package/dist/verb-registration.d.ts.map +1 -0
  121. package/dist/verb-registration.js +176 -0
  122. package/dist/verb-registration.js.map +1 -0
  123. package/dist/worker.d.ts +93 -0
  124. package/dist/worker.d.ts.map +1 -0
  125. package/dist/worker.js +315 -0
  126. package/dist/worker.js.map +1 -0
  127. package/dist/wrap.d.ts +89 -0
  128. package/dist/wrap.d.ts.map +1 -0
  129. package/dist/wrap.js +225 -0
  130. package/dist/wrap.js.map +1 -0
  131. package/package.json +21 -4
  132. package/src/client.ts +136 -0
  133. package/src/define.ts +31 -37
  134. package/src/function-ref.ts +264 -0
  135. package/src/function-sugar.ts +134 -0
  136. package/src/index.ts +132 -10
  137. package/src/providers/analytics/mixpanel.ts +19 -18
  138. package/src/providers/calendar/cal-com.ts +29 -18
  139. package/src/providers/calendar/google-calendar.ts +20 -14
  140. package/src/providers/crm/hubspot.ts +225 -99
  141. package/src/providers/development/github.ts +206 -135
  142. package/src/providers/ecommerce/shopify.ts +250 -89
  143. package/src/providers/email/resend.ts +101 -28
  144. package/src/providers/email/sendgrid.ts +12 -9
  145. package/src/providers/finance/stripe.ts +128 -49
  146. package/src/providers/forms/typeform.ts +74 -58
  147. package/src/providers/knowledge/notion.ts +340 -88
  148. package/src/providers/marketing/mailchimp.ts +86 -70
  149. package/src/providers/media/cloudinary.ts +99 -41
  150. package/src/providers/messaging/slack.ts +283 -85
  151. package/src/providers/messaging/twilio-sms.ts +35 -15
  152. package/src/providers/project-management/linear.ts +143 -55
  153. package/src/providers/spreadsheet/google-sheets.ts +222 -56
  154. package/src/providers/spreadsheet/xlsx.ts +47 -16
  155. package/src/providers/storage/s3.ts +119 -47
  156. package/src/providers/support/zendesk.ts +196 -46
  157. package/src/providers/tasks/todoist.ts +20 -26
  158. package/src/providers/video-conferencing/google-meet.ts +17 -20
  159. package/src/providers/video-conferencing/jitsi.ts +14 -14
  160. package/src/providers/video-conferencing/teams.ts +14 -13
  161. package/src/providers/video-conferencing/zoom.ts +54 -49
  162. package/src/tools/data.ts +6 -16
  163. package/src/tools/index.ts +1 -0
  164. package/src/tools/system.ts +887 -0
  165. package/src/tools/web.ts +22 -10
  166. package/src/track-record.ts +106 -0
  167. package/src/types.ts +241 -13
  168. package/src/verb-registration.ts +197 -0
  169. package/src/worker.ts +370 -0
  170. package/src/wrap.ts +260 -0
  171. package/test/client.test.ts +146 -0
  172. package/test/communication-tools-extended.test.ts +734 -0
  173. package/test/data-tools-extended.test.ts +743 -0
  174. package/test/define-extended.test.ts +819 -0
  175. package/test/define.test.ts +150 -41
  176. package/test/entities.test.ts +623 -0
  177. package/test/extended-entities.test.ts +1228 -0
  178. package/test/provider-implementations.test.ts +725 -0
  179. package/test/provider-registry-extended.test.ts +583 -0
  180. package/test/providers/google-sheets.test.ts +851 -0
  181. package/test/providers/helpers.ts +554 -0
  182. package/test/providers/hubspot.test.ts +576 -0
  183. package/test/providers/slack.test.ts +932 -0
  184. package/test/providers/stripe.test.ts +701 -0
  185. package/test/providers.test.ts +578 -0
  186. package/test/system-tools-extended.test.ts +632 -0
  187. package/test/system.test.ts +673 -0
  188. package/test/tools.test.ts +15 -11
  189. package/test/types.test.ts +402 -0
  190. package/test/verb-registration.test.ts +395 -0
  191. package/test/web-tools.test.ts +553 -0
  192. package/test/worker-extended.test.ts +699 -0
  193. package/test/worker.test.ts +576 -0
  194. package/test/wrap.test.ts +366 -0
  195. package/tsconfig.json +3 -13
  196. package/vitest.config.ts +37 -0
  197. package/wrangler.jsonc +9 -0
  198. package/.turbo/turbo-build.log +0 -5
  199. package/dist/providers/voice/vapi.d.ts +0 -27
  200. package/dist/providers/voice/vapi.d.ts.map +0 -1
  201. package/dist/providers/voice/vapi.js +0 -440
  202. package/dist/providers/voice/vapi.js.map +0 -1
  203. package/src/define.js +0 -267
  204. package/src/entities/advertising.js +0 -999
  205. package/src/entities/ai.js +0 -756
  206. package/src/entities/analytics.js +0 -1588
  207. package/src/entities/automation.js +0 -601
  208. package/src/entities/communication.js +0 -1150
  209. package/src/entities/crm.js +0 -1386
  210. package/src/entities/design.js +0 -546
  211. package/src/entities/development.js +0 -2212
  212. package/src/entities/document.js +0 -874
  213. package/src/entities/ecommerce.js +0 -1429
  214. package/src/entities/experiment.js +0 -1039
  215. package/src/entities/finance.js +0 -3478
  216. package/src/entities/forms.js +0 -1892
  217. package/src/entities/hr.js +0 -661
  218. package/src/entities/identity.js +0 -997
  219. package/src/entities/index.js +0 -282
  220. package/src/entities/infrastructure.js +0 -1153
  221. package/src/entities/knowledge.js +0 -1438
  222. package/src/entities/marketing.js +0 -1610
  223. package/src/entities/media.js +0 -1634
  224. package/src/entities/notification.js +0 -1199
  225. package/src/entities/presentation.js +0 -1274
  226. package/src/entities/productivity.js +0 -1317
  227. package/src/entities/project-management.js +0 -1136
  228. package/src/entities/recruiting.js +0 -736
  229. package/src/entities/shipping.js +0 -509
  230. package/src/entities/signature.js +0 -1102
  231. package/src/entities/site.js +0 -222
  232. package/src/entities/spreadsheet.js +0 -1341
  233. package/src/entities/storage.js +0 -1198
  234. package/src/entities/support.js +0 -1166
  235. package/src/entities/video-conferencing.js +0 -1750
  236. package/src/entities/video.js +0 -950
  237. package/src/entities.js +0 -1663
  238. package/src/index.js +0 -74
  239. package/src/providers/analytics/index.js +0 -17
  240. package/src/providers/analytics/mixpanel.js +0 -255
  241. package/src/providers/calendar/cal-com.js +0 -303
  242. package/src/providers/calendar/google-calendar.js +0 -335
  243. package/src/providers/calendar/index.js +0 -20
  244. package/src/providers/crm/hubspot.js +0 -566
  245. package/src/providers/crm/index.js +0 -17
  246. package/src/providers/development/github.js +0 -472
  247. package/src/providers/development/index.js +0 -17
  248. package/src/providers/ecommerce/index.js +0 -17
  249. package/src/providers/ecommerce/shopify.js +0 -378
  250. package/src/providers/email/index.js +0 -20
  251. package/src/providers/email/resend.js +0 -258
  252. package/src/providers/email/sendgrid.js +0 -161
  253. package/src/providers/finance/index.js +0 -17
  254. package/src/providers/finance/stripe.js +0 -549
  255. package/src/providers/forms/index.js +0 -17
  256. package/src/providers/forms/typeform.js +0 -500
  257. package/src/providers/index.js +0 -123
  258. package/src/providers/knowledge/index.js +0 -17
  259. package/src/providers/knowledge/notion.js +0 -389
  260. package/src/providers/marketing/index.js +0 -17
  261. package/src/providers/marketing/mailchimp.js +0 -443
  262. package/src/providers/media/cloudinary.js +0 -318
  263. package/src/providers/media/index.js +0 -17
  264. package/src/providers/messaging/index.js +0 -20
  265. package/src/providers/messaging/slack.js +0 -393
  266. package/src/providers/messaging/twilio-sms.js +0 -249
  267. package/src/providers/project-management/index.js +0 -17
  268. package/src/providers/project-management/linear.js +0 -575
  269. package/src/providers/registry.js +0 -86
  270. package/src/providers/spreadsheet/google-sheets.js +0 -375
  271. package/src/providers/spreadsheet/index.js +0 -20
  272. package/src/providers/spreadsheet/xlsx.js +0 -423
  273. package/src/providers/storage/index.js +0 -24
  274. package/src/providers/storage/s3.js +0 -419
  275. package/src/providers/support/index.js +0 -17
  276. package/src/providers/support/zendesk.js +0 -373
  277. package/src/providers/tasks/index.js +0 -17
  278. package/src/providers/tasks/todoist.js +0 -286
  279. package/src/providers/types.js +0 -9
  280. package/src/providers/video-conferencing/google-meet.js +0 -286
  281. package/src/providers/video-conferencing/index.js +0 -31
  282. package/src/providers/video-conferencing/jitsi.js +0 -254
  283. package/src/providers/video-conferencing/teams.js +0 -270
  284. package/src/providers/video-conferencing/zoom.js +0 -332
  285. package/src/registry.js +0 -128
  286. package/src/tools/communication.js +0 -184
  287. package/src/tools/data.js +0 -205
  288. package/src/tools/index.js +0 -11
  289. package/src/tools/web.js +0 -137
  290. package/src/types.js +0 -10
  291. package/test/define.test.js +0 -306
  292. package/test/registry.test.js +0 -357
  293. package/test/tools.test.js +0 -363
@@ -1,950 +0,0 @@
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
- };