ContentDirectory.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. },
  31. }
  32. export const VideoInputSchema: JsonSchema<VideoInputParameters> = {
  33. type: 'object',
  34. additionalProperties: false,
  35. properties: {
  36. category: { type: 'number' },
  37. description: { type: 'string' },
  38. duration: { type: 'number' },
  39. hasMarketing: { type: 'boolean' },
  40. isExplicit: { type: 'boolean' },
  41. isPublic: { type: 'boolean' },
  42. language: { type: 'string' },
  43. license: {
  44. type: 'object',
  45. properties: {
  46. code: {
  47. type: 'number',
  48. },
  49. attribution: {
  50. type: 'string',
  51. },
  52. customText: {
  53. type: 'string',
  54. },
  55. },
  56. },
  57. mediaPixelHeight: { type: 'number' },
  58. mediaPixelWidth: { type: 'number' },
  59. mediaType: {
  60. type: 'object',
  61. properties: {
  62. codecName: {
  63. type: 'string',
  64. },
  65. container: {
  66. type: 'string',
  67. },
  68. mimeMediaType: {
  69. type: 'string',
  70. },
  71. },
  72. },
  73. personsList: { type: 'array' },
  74. publishedBeforeJoystream: {
  75. type: 'object',
  76. properties: {
  77. date: {
  78. type: 'string',
  79. },
  80. isPublished: {
  81. type: 'boolean',
  82. },
  83. },
  84. },
  85. thumbnailPhotoPath: { type: 'string' },
  86. title: { type: 'string' },
  87. videoPath: { type: 'string' },
  88. },
  89. }