ContentDirectory.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. import {
  2. ChannelInputParameters,
  3. VideoInputParameters,
  4. VideoCategoryInputParameters,
  5. ChannelCategoryInputParameters,
  6. JsonSchema,
  7. } from '../Types'
  8. export const VideoCategoryInputSchema: JsonSchema<VideoCategoryInputParameters> = {
  9. type: 'object',
  10. additionalProperties: false,
  11. properties: {
  12. name: {
  13. type: 'string',
  14. },
  15. },
  16. }
  17. export const ChannelCategoryInputSchema: JsonSchema<ChannelCategoryInputParameters> = VideoCategoryInputSchema
  18. export const ChannelInputSchema: JsonSchema<ChannelInputParameters> = {
  19. type: 'object',
  20. additionalProperties: false,
  21. properties: {
  22. category: { type: 'number' },
  23. description: { type: 'string' },
  24. isPublic: { type: 'boolean' },
  25. language: { type: 'string' },
  26. title: { type: 'string' },
  27. coverPhotoPath: { type: 'string' },
  28. avatarPhotoPath: { type: 'string' },
  29. rewardAccount: { type: ['string', 'null'] },
  30. collaborators: {
  31. type: ['array', 'null'],
  32. items: {
  33. type: 'integer',
  34. min: 0,
  35. },
  36. },
  37. },
  38. }
  39. export const VideoInputSchema: JsonSchema<VideoInputParameters> = {
  40. type: 'object',
  41. additionalProperties: false,
  42. properties: {
  43. category: { type: 'number' },
  44. description: { type: 'string' },
  45. duration: { type: 'number' },
  46. hasMarketing: { type: 'boolean' },
  47. isExplicit: { type: 'boolean' },
  48. isPublic: { type: 'boolean' },
  49. language: { type: 'string' },
  50. license: {
  51. type: 'object',
  52. properties: {
  53. code: {
  54. type: 'number',
  55. },
  56. attribution: {
  57. type: 'string',
  58. },
  59. customText: {
  60. type: 'string',
  61. },
  62. },
  63. },
  64. mediaPixelHeight: { type: 'number' },
  65. mediaPixelWidth: { type: 'number' },
  66. mediaType: {
  67. type: 'object',
  68. properties: {
  69. codecName: {
  70. type: 'string',
  71. },
  72. container: {
  73. type: 'string',
  74. },
  75. mimeMediaType: {
  76. type: 'string',
  77. },
  78. },
  79. },
  80. persons: { type: 'array' },
  81. publishedBeforeJoystream: {
  82. type: 'object',
  83. properties: {
  84. date: {
  85. type: 'string',
  86. },
  87. isPublished: {
  88. type: 'boolean',
  89. },
  90. },
  91. },
  92. thumbnailPhotoPath: { type: 'string' },
  93. title: { type: 'string' },
  94. videoPath: { type: 'string' },
  95. },
  96. }