content.ts 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476
  1. import { createTypeUnsafe } from "@polkadot/types/create";
  2. import { SubstrateEvent, SubstrateExtrinsic } from "@dzlzv/hydra-common";
  3. import { Codec } from "@polkadot/types/types";
  4. import { typeRegistry } from ".";
  5. import {
  6. Channel,
  7. ChannelCategory,
  8. ChannelCategoryCreationParameters,
  9. ChannelCategoryId,
  10. ChannelCategoryUpdateParameters,
  11. ChannelCreationParameters,
  12. ChannelId,
  13. ChannelOwnershipTransferRequest,
  14. ChannelOwnershipTransferRequestId,
  15. ChannelUpdateParameters,
  16. ContentActor,
  17. ContentId,
  18. CuratorGroupId,
  19. CuratorId,
  20. PlaylistCreationParameters,
  21. PlaylistId,
  22. PlaylistUpdateParameters,
  23. VideoCategoryCreationParameters,
  24. VideoCategoryId,
  25. VideoCategoryUpdateParameters,
  26. VideoCreationParameters,
  27. VideoId,
  28. VideoUpdateParameters
  29. } from "@joystream/types/augment";
  30. import { Bytes, Vec, bool } from "@polkadot/types";
  31. export namespace Content {
  32. export class CuratorGroupCreatedEvent {
  33. public readonly expectedParamTypes = ["CuratorGroupId"];
  34. constructor(public readonly ctx: SubstrateEvent) {}
  35. get data(): CuratorGroupCreated_Params {
  36. return new CuratorGroupCreated_Params(this.ctx);
  37. }
  38. validateParams(): boolean {
  39. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  40. return false;
  41. }
  42. let valid = true;
  43. this.expectedParamTypes.forEach((type, i) => {
  44. if (type !== this.ctx.params[i].type) {
  45. valid = false;
  46. }
  47. });
  48. return valid;
  49. }
  50. }
  51. class CuratorGroupCreated_Params {
  52. constructor(public readonly ctx: SubstrateEvent) {}
  53. get curatorGroupId(): CuratorGroupId {
  54. return createTypeUnsafe<CuratorGroupId & Codec>(
  55. typeRegistry,
  56. "CuratorGroupId",
  57. [this.ctx.params[0].value]
  58. );
  59. }
  60. }
  61. export class CuratorGroupStatusSetEvent {
  62. public readonly expectedParamTypes = ["CuratorGroupId", "bool"];
  63. constructor(public readonly ctx: SubstrateEvent) {}
  64. get data(): CuratorGroupStatusSet_Params {
  65. return new CuratorGroupStatusSet_Params(this.ctx);
  66. }
  67. validateParams(): boolean {
  68. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  69. return false;
  70. }
  71. let valid = true;
  72. this.expectedParamTypes.forEach((type, i) => {
  73. if (type !== this.ctx.params[i].type) {
  74. valid = false;
  75. }
  76. });
  77. return valid;
  78. }
  79. }
  80. class CuratorGroupStatusSet_Params {
  81. constructor(public readonly ctx: SubstrateEvent) {}
  82. get curatorGroupId(): CuratorGroupId {
  83. return createTypeUnsafe<CuratorGroupId & Codec>(
  84. typeRegistry,
  85. "CuratorGroupId",
  86. [this.ctx.params[0].value]
  87. );
  88. }
  89. get bool(): bool {
  90. return createTypeUnsafe<bool & Codec>(typeRegistry, "bool", [
  91. this.ctx.params[1].value
  92. ]);
  93. }
  94. }
  95. export class CuratorAddedEvent {
  96. public readonly expectedParamTypes = ["CuratorGroupId", "CuratorId"];
  97. constructor(public readonly ctx: SubstrateEvent) {}
  98. get data(): CuratorAdded_Params {
  99. return new CuratorAdded_Params(this.ctx);
  100. }
  101. validateParams(): boolean {
  102. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  103. return false;
  104. }
  105. let valid = true;
  106. this.expectedParamTypes.forEach((type, i) => {
  107. if (type !== this.ctx.params[i].type) {
  108. valid = false;
  109. }
  110. });
  111. return valid;
  112. }
  113. }
  114. class CuratorAdded_Params {
  115. constructor(public readonly ctx: SubstrateEvent) {}
  116. get curatorGroupId(): CuratorGroupId {
  117. return createTypeUnsafe<CuratorGroupId & Codec>(
  118. typeRegistry,
  119. "CuratorGroupId",
  120. [this.ctx.params[0].value]
  121. );
  122. }
  123. get curatorId(): CuratorId {
  124. return createTypeUnsafe<CuratorId & Codec>(typeRegistry, "CuratorId", [
  125. this.ctx.params[1].value
  126. ]);
  127. }
  128. }
  129. export class CuratorRemovedEvent {
  130. public readonly expectedParamTypes = ["CuratorGroupId", "CuratorId"];
  131. constructor(public readonly ctx: SubstrateEvent) {}
  132. get data(): CuratorRemoved_Params {
  133. return new CuratorRemoved_Params(this.ctx);
  134. }
  135. validateParams(): boolean {
  136. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  137. return false;
  138. }
  139. let valid = true;
  140. this.expectedParamTypes.forEach((type, i) => {
  141. if (type !== this.ctx.params[i].type) {
  142. valid = false;
  143. }
  144. });
  145. return valid;
  146. }
  147. }
  148. class CuratorRemoved_Params {
  149. constructor(public readonly ctx: SubstrateEvent) {}
  150. get curatorGroupId(): CuratorGroupId {
  151. return createTypeUnsafe<CuratorGroupId & Codec>(
  152. typeRegistry,
  153. "CuratorGroupId",
  154. [this.ctx.params[0].value]
  155. );
  156. }
  157. get curatorId(): CuratorId {
  158. return createTypeUnsafe<CuratorId & Codec>(typeRegistry, "CuratorId", [
  159. this.ctx.params[1].value
  160. ]);
  161. }
  162. }
  163. export class ChannelCreatedEvent {
  164. public readonly expectedParamTypes = [
  165. "ContentActor",
  166. "ChannelId",
  167. "Channel",
  168. "ChannelCreationParameters<ContentParameters, AccountId>"
  169. ];
  170. constructor(public readonly ctx: SubstrateEvent) {}
  171. get data(): ChannelCreated_Params {
  172. return new ChannelCreated_Params(this.ctx);
  173. }
  174. validateParams(): boolean {
  175. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  176. return false;
  177. }
  178. let valid = true;
  179. this.expectedParamTypes.forEach((type, i) => {
  180. if (type !== this.ctx.params[i].type) {
  181. valid = false;
  182. }
  183. });
  184. return valid;
  185. }
  186. }
  187. class ChannelCreated_Params {
  188. constructor(public readonly ctx: SubstrateEvent) {}
  189. get contentActor(): ContentActor {
  190. return createTypeUnsafe<ContentActor & Codec>(
  191. typeRegistry,
  192. "ContentActor",
  193. [this.ctx.params[0].value]
  194. );
  195. }
  196. get channelId(): ChannelId {
  197. return createTypeUnsafe<ChannelId & Codec>(typeRegistry, "ChannelId", [
  198. this.ctx.params[1].value
  199. ]);
  200. }
  201. get channel(): Channel {
  202. return createTypeUnsafe<Channel & Codec>(typeRegistry, "Channel", [
  203. this.ctx.params[2].value
  204. ]);
  205. }
  206. get channelCreationParameters(): ChannelCreationParameters {
  207. return createTypeUnsafe<ChannelCreationParameters & Codec>(
  208. typeRegistry,
  209. "ChannelCreationParameters",
  210. [this.ctx.params[3].value]
  211. );
  212. }
  213. }
  214. export class ChannelUpdatedEvent {
  215. public readonly expectedParamTypes = [
  216. "ContentActor",
  217. "ChannelId",
  218. "Channel",
  219. "ChannelUpdateParameters<ContentParameters, AccountId>"
  220. ];
  221. constructor(public readonly ctx: SubstrateEvent) {}
  222. get data(): ChannelUpdated_Params {
  223. return new ChannelUpdated_Params(this.ctx);
  224. }
  225. validateParams(): boolean {
  226. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  227. return false;
  228. }
  229. let valid = true;
  230. this.expectedParamTypes.forEach((type, i) => {
  231. if (type !== this.ctx.params[i].type) {
  232. valid = false;
  233. }
  234. });
  235. return valid;
  236. }
  237. }
  238. class ChannelUpdated_Params {
  239. constructor(public readonly ctx: SubstrateEvent) {}
  240. get contentActor(): ContentActor {
  241. return createTypeUnsafe<ContentActor & Codec>(
  242. typeRegistry,
  243. "ContentActor",
  244. [this.ctx.params[0].value]
  245. );
  246. }
  247. get channelId(): ChannelId {
  248. return createTypeUnsafe<ChannelId & Codec>(typeRegistry, "ChannelId", [
  249. this.ctx.params[1].value
  250. ]);
  251. }
  252. get channel(): Channel {
  253. return createTypeUnsafe<Channel & Codec>(typeRegistry, "Channel", [
  254. this.ctx.params[2].value
  255. ]);
  256. }
  257. get channelUpdateParameters(): ChannelUpdateParameters {
  258. return createTypeUnsafe<ChannelUpdateParameters & Codec>(
  259. typeRegistry,
  260. "ChannelUpdateParameters",
  261. [this.ctx.params[3].value]
  262. );
  263. }
  264. }
  265. export class ChannelAssetsRemovedEvent {
  266. public readonly expectedParamTypes = [
  267. "ContentActor",
  268. "ChannelId",
  269. "Vec<ContentId>"
  270. ];
  271. constructor(public readonly ctx: SubstrateEvent) {}
  272. get data(): ChannelAssetsRemoved_Params {
  273. return new ChannelAssetsRemoved_Params(this.ctx);
  274. }
  275. validateParams(): boolean {
  276. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  277. return false;
  278. }
  279. let valid = true;
  280. this.expectedParamTypes.forEach((type, i) => {
  281. if (type !== this.ctx.params[i].type) {
  282. valid = false;
  283. }
  284. });
  285. return valid;
  286. }
  287. }
  288. class ChannelAssetsRemoved_Params {
  289. constructor(public readonly ctx: SubstrateEvent) {}
  290. get contentActor(): ContentActor {
  291. return createTypeUnsafe<ContentActor & Codec>(
  292. typeRegistry,
  293. "ContentActor",
  294. [this.ctx.params[0].value]
  295. );
  296. }
  297. get channelId(): ChannelId {
  298. return createTypeUnsafe<ChannelId & Codec>(typeRegistry, "ChannelId", [
  299. this.ctx.params[1].value
  300. ]);
  301. }
  302. get contentId(): Vec<ContentId> {
  303. return createTypeUnsafe<Vec<ContentId> & Codec>(
  304. typeRegistry,
  305. "Vec<ContentId>",
  306. [this.ctx.params[2].value]
  307. );
  308. }
  309. }
  310. export class ChannelCensorshipStatusUpdatedEvent {
  311. public readonly expectedParamTypes = [
  312. "ContentActor",
  313. "ChannelId",
  314. "bool",
  315. "Vec<u8>"
  316. ];
  317. constructor(public readonly ctx: SubstrateEvent) {}
  318. get data(): ChannelCensorshipStatusUpdated_Params {
  319. return new ChannelCensorshipStatusUpdated_Params(this.ctx);
  320. }
  321. validateParams(): boolean {
  322. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  323. return false;
  324. }
  325. let valid = true;
  326. this.expectedParamTypes.forEach((type, i) => {
  327. if (type !== this.ctx.params[i].type) {
  328. valid = false;
  329. }
  330. });
  331. return valid;
  332. }
  333. }
  334. class ChannelCensorshipStatusUpdated_Params {
  335. constructor(public readonly ctx: SubstrateEvent) {}
  336. get contentActor(): ContentActor {
  337. return createTypeUnsafe<ContentActor & Codec>(
  338. typeRegistry,
  339. "ContentActor",
  340. [this.ctx.params[0].value]
  341. );
  342. }
  343. get channelId(): ChannelId {
  344. return createTypeUnsafe<ChannelId & Codec>(typeRegistry, "ChannelId", [
  345. this.ctx.params[1].value
  346. ]);
  347. }
  348. get bool(): bool {
  349. return createTypeUnsafe<bool & Codec>(typeRegistry, "bool", [
  350. this.ctx.params[2].value
  351. ]);
  352. }
  353. get bytes(): Bytes {
  354. return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
  355. this.ctx.params[3].value
  356. ]);
  357. }
  358. }
  359. export class ChannelOwnershipTransferRequestedEvent {
  360. public readonly expectedParamTypes = [
  361. "ContentActor",
  362. "ChannelOwnershipTransferRequestId",
  363. "ChannelOwnershipTransferRequest"
  364. ];
  365. constructor(public readonly ctx: SubstrateEvent) {}
  366. get data(): ChannelOwnershipTransferRequested_Params {
  367. return new ChannelOwnershipTransferRequested_Params(this.ctx);
  368. }
  369. validateParams(): boolean {
  370. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  371. return false;
  372. }
  373. let valid = true;
  374. this.expectedParamTypes.forEach((type, i) => {
  375. if (type !== this.ctx.params[i].type) {
  376. valid = false;
  377. }
  378. });
  379. return valid;
  380. }
  381. }
  382. class ChannelOwnershipTransferRequested_Params {
  383. constructor(public readonly ctx: SubstrateEvent) {}
  384. get contentActor(): ContentActor {
  385. return createTypeUnsafe<ContentActor & Codec>(
  386. typeRegistry,
  387. "ContentActor",
  388. [this.ctx.params[0].value]
  389. );
  390. }
  391. get channelOwnershipTransferRequestId(): ChannelOwnershipTransferRequestId {
  392. return createTypeUnsafe<ChannelOwnershipTransferRequestId & Codec>(
  393. typeRegistry,
  394. "ChannelOwnershipTransferRequestId",
  395. [this.ctx.params[1].value]
  396. );
  397. }
  398. get channelOwnershipTransferRequest(): ChannelOwnershipTransferRequest {
  399. return createTypeUnsafe<ChannelOwnershipTransferRequest & Codec>(
  400. typeRegistry,
  401. "ChannelOwnershipTransferRequest",
  402. [this.ctx.params[2].value]
  403. );
  404. }
  405. }
  406. export class ChannelOwnershipTransferRequestWithdrawnEvent {
  407. public readonly expectedParamTypes = [
  408. "ContentActor",
  409. "ChannelOwnershipTransferRequestId"
  410. ];
  411. constructor(public readonly ctx: SubstrateEvent) {}
  412. get data(): ChannelOwnershipTransferRequestWithdrawn_Params {
  413. return new ChannelOwnershipTransferRequestWithdrawn_Params(this.ctx);
  414. }
  415. validateParams(): boolean {
  416. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  417. return false;
  418. }
  419. let valid = true;
  420. this.expectedParamTypes.forEach((type, i) => {
  421. if (type !== this.ctx.params[i].type) {
  422. valid = false;
  423. }
  424. });
  425. return valid;
  426. }
  427. }
  428. class ChannelOwnershipTransferRequestWithdrawn_Params {
  429. constructor(public readonly ctx: SubstrateEvent) {}
  430. get contentActor(): ContentActor {
  431. return createTypeUnsafe<ContentActor & Codec>(
  432. typeRegistry,
  433. "ContentActor",
  434. [this.ctx.params[0].value]
  435. );
  436. }
  437. get channelOwnershipTransferRequestId(): ChannelOwnershipTransferRequestId {
  438. return createTypeUnsafe<ChannelOwnershipTransferRequestId & Codec>(
  439. typeRegistry,
  440. "ChannelOwnershipTransferRequestId",
  441. [this.ctx.params[1].value]
  442. );
  443. }
  444. }
  445. export class ChannelOwnershipTransferredEvent {
  446. public readonly expectedParamTypes = [
  447. "ContentActor",
  448. "ChannelOwnershipTransferRequestId"
  449. ];
  450. constructor(public readonly ctx: SubstrateEvent) {}
  451. get data(): ChannelOwnershipTransferred_Params {
  452. return new ChannelOwnershipTransferred_Params(this.ctx);
  453. }
  454. validateParams(): boolean {
  455. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  456. return false;
  457. }
  458. let valid = true;
  459. this.expectedParamTypes.forEach((type, i) => {
  460. if (type !== this.ctx.params[i].type) {
  461. valid = false;
  462. }
  463. });
  464. return valid;
  465. }
  466. }
  467. class ChannelOwnershipTransferred_Params {
  468. constructor(public readonly ctx: SubstrateEvent) {}
  469. get contentActor(): ContentActor {
  470. return createTypeUnsafe<ContentActor & Codec>(
  471. typeRegistry,
  472. "ContentActor",
  473. [this.ctx.params[0].value]
  474. );
  475. }
  476. get channelOwnershipTransferRequestId(): ChannelOwnershipTransferRequestId {
  477. return createTypeUnsafe<ChannelOwnershipTransferRequestId & Codec>(
  478. typeRegistry,
  479. "ChannelOwnershipTransferRequestId",
  480. [this.ctx.params[1].value]
  481. );
  482. }
  483. }
  484. export class ChannelCategoryCreatedEvent {
  485. public readonly expectedParamTypes = [
  486. "ChannelCategoryId",
  487. "ChannelCategory",
  488. "ChannelCategoryCreationParameters"
  489. ];
  490. constructor(public readonly ctx: SubstrateEvent) {}
  491. get data(): ChannelCategoryCreated_Params {
  492. return new ChannelCategoryCreated_Params(this.ctx);
  493. }
  494. validateParams(): boolean {
  495. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  496. return false;
  497. }
  498. let valid = true;
  499. this.expectedParamTypes.forEach((type, i) => {
  500. if (type !== this.ctx.params[i].type) {
  501. valid = false;
  502. }
  503. });
  504. return valid;
  505. }
  506. }
  507. class ChannelCategoryCreated_Params {
  508. constructor(public readonly ctx: SubstrateEvent) {}
  509. get channelCategoryId(): ChannelCategoryId {
  510. return createTypeUnsafe<ChannelCategoryId & Codec>(
  511. typeRegistry,
  512. "ChannelCategoryId",
  513. [this.ctx.params[0].value]
  514. );
  515. }
  516. get channelCategory(): ChannelCategory {
  517. return createTypeUnsafe<ChannelCategory & Codec>(
  518. typeRegistry,
  519. "ChannelCategory",
  520. [this.ctx.params[1].value]
  521. );
  522. }
  523. get channelCategoryCreationParameters(): ChannelCategoryCreationParameters {
  524. return createTypeUnsafe<ChannelCategoryCreationParameters & Codec>(
  525. typeRegistry,
  526. "ChannelCategoryCreationParameters",
  527. [this.ctx.params[2].value]
  528. );
  529. }
  530. }
  531. export class ChannelCategoryUpdatedEvent {
  532. public readonly expectedParamTypes = [
  533. "ContentActor",
  534. "ChannelCategoryId",
  535. "ChannelCategoryUpdateParameters"
  536. ];
  537. constructor(public readonly ctx: SubstrateEvent) {}
  538. get data(): ChannelCategoryUpdated_Params {
  539. return new ChannelCategoryUpdated_Params(this.ctx);
  540. }
  541. validateParams(): boolean {
  542. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  543. return false;
  544. }
  545. let valid = true;
  546. this.expectedParamTypes.forEach((type, i) => {
  547. if (type !== this.ctx.params[i].type) {
  548. valid = false;
  549. }
  550. });
  551. return valid;
  552. }
  553. }
  554. class ChannelCategoryUpdated_Params {
  555. constructor(public readonly ctx: SubstrateEvent) {}
  556. get contentActor(): ContentActor {
  557. return createTypeUnsafe<ContentActor & Codec>(
  558. typeRegistry,
  559. "ContentActor",
  560. [this.ctx.params[0].value]
  561. );
  562. }
  563. get channelCategoryId(): ChannelCategoryId {
  564. return createTypeUnsafe<ChannelCategoryId & Codec>(
  565. typeRegistry,
  566. "ChannelCategoryId",
  567. [this.ctx.params[1].value]
  568. );
  569. }
  570. get channelCategoryUpdateParameters(): ChannelCategoryUpdateParameters {
  571. return createTypeUnsafe<ChannelCategoryUpdateParameters & Codec>(
  572. typeRegistry,
  573. "ChannelCategoryUpdateParameters",
  574. [this.ctx.params[2].value]
  575. );
  576. }
  577. }
  578. export class ChannelCategoryDeletedEvent {
  579. public readonly expectedParamTypes = ["ContentActor", "ChannelCategoryId"];
  580. constructor(public readonly ctx: SubstrateEvent) {}
  581. get data(): ChannelCategoryDeleted_Params {
  582. return new ChannelCategoryDeleted_Params(this.ctx);
  583. }
  584. validateParams(): boolean {
  585. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  586. return false;
  587. }
  588. let valid = true;
  589. this.expectedParamTypes.forEach((type, i) => {
  590. if (type !== this.ctx.params[i].type) {
  591. valid = false;
  592. }
  593. });
  594. return valid;
  595. }
  596. }
  597. class ChannelCategoryDeleted_Params {
  598. constructor(public readonly ctx: SubstrateEvent) {}
  599. get contentActor(): ContentActor {
  600. return createTypeUnsafe<ContentActor & Codec>(
  601. typeRegistry,
  602. "ContentActor",
  603. [this.ctx.params[0].value]
  604. );
  605. }
  606. get channelCategoryId(): ChannelCategoryId {
  607. return createTypeUnsafe<ChannelCategoryId & Codec>(
  608. typeRegistry,
  609. "ChannelCategoryId",
  610. [this.ctx.params[1].value]
  611. );
  612. }
  613. }
  614. export class VideoCategoryCreatedEvent {
  615. public readonly expectedParamTypes = [
  616. "ContentActor",
  617. "VideoCategoryId",
  618. "VideoCategoryCreationParameters"
  619. ];
  620. constructor(public readonly ctx: SubstrateEvent) {}
  621. get data(): VideoCategoryCreated_Params {
  622. return new VideoCategoryCreated_Params(this.ctx);
  623. }
  624. validateParams(): boolean {
  625. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  626. return false;
  627. }
  628. let valid = true;
  629. this.expectedParamTypes.forEach((type, i) => {
  630. if (type !== this.ctx.params[i].type) {
  631. valid = false;
  632. }
  633. });
  634. return valid;
  635. }
  636. }
  637. class VideoCategoryCreated_Params {
  638. constructor(public readonly ctx: SubstrateEvent) {}
  639. get contentActor(): ContentActor {
  640. return createTypeUnsafe<ContentActor & Codec>(
  641. typeRegistry,
  642. "ContentActor",
  643. [this.ctx.params[0].value]
  644. );
  645. }
  646. get videoCategoryId(): VideoCategoryId {
  647. return createTypeUnsafe<VideoCategoryId & Codec>(
  648. typeRegistry,
  649. "VideoCategoryId",
  650. [this.ctx.params[1].value]
  651. );
  652. }
  653. get videoCategoryCreationParameters(): VideoCategoryCreationParameters {
  654. return createTypeUnsafe<VideoCategoryCreationParameters & Codec>(
  655. typeRegistry,
  656. "VideoCategoryCreationParameters",
  657. [this.ctx.params[2].value]
  658. );
  659. }
  660. }
  661. export class VideoCategoryUpdatedEvent {
  662. public readonly expectedParamTypes = [
  663. "ContentActor",
  664. "VideoCategoryId",
  665. "VideoCategoryUpdateParameters"
  666. ];
  667. constructor(public readonly ctx: SubstrateEvent) {}
  668. get data(): VideoCategoryUpdated_Params {
  669. return new VideoCategoryUpdated_Params(this.ctx);
  670. }
  671. validateParams(): boolean {
  672. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  673. return false;
  674. }
  675. let valid = true;
  676. this.expectedParamTypes.forEach((type, i) => {
  677. if (type !== this.ctx.params[i].type) {
  678. valid = false;
  679. }
  680. });
  681. return valid;
  682. }
  683. }
  684. class VideoCategoryUpdated_Params {
  685. constructor(public readonly ctx: SubstrateEvent) {}
  686. get contentActor(): ContentActor {
  687. return createTypeUnsafe<ContentActor & Codec>(
  688. typeRegistry,
  689. "ContentActor",
  690. [this.ctx.params[0].value]
  691. );
  692. }
  693. get videoCategoryId(): VideoCategoryId {
  694. return createTypeUnsafe<VideoCategoryId & Codec>(
  695. typeRegistry,
  696. "VideoCategoryId",
  697. [this.ctx.params[1].value]
  698. );
  699. }
  700. get videoCategoryUpdateParameters(): VideoCategoryUpdateParameters {
  701. return createTypeUnsafe<VideoCategoryUpdateParameters & Codec>(
  702. typeRegistry,
  703. "VideoCategoryUpdateParameters",
  704. [this.ctx.params[2].value]
  705. );
  706. }
  707. }
  708. export class VideoCategoryDeletedEvent {
  709. public readonly expectedParamTypes = ["ContentActor", "VideoCategoryId"];
  710. constructor(public readonly ctx: SubstrateEvent) {}
  711. get data(): VideoCategoryDeleted_Params {
  712. return new VideoCategoryDeleted_Params(this.ctx);
  713. }
  714. validateParams(): boolean {
  715. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  716. return false;
  717. }
  718. let valid = true;
  719. this.expectedParamTypes.forEach((type, i) => {
  720. if (type !== this.ctx.params[i].type) {
  721. valid = false;
  722. }
  723. });
  724. return valid;
  725. }
  726. }
  727. class VideoCategoryDeleted_Params {
  728. constructor(public readonly ctx: SubstrateEvent) {}
  729. get contentActor(): ContentActor {
  730. return createTypeUnsafe<ContentActor & Codec>(
  731. typeRegistry,
  732. "ContentActor",
  733. [this.ctx.params[0].value]
  734. );
  735. }
  736. get videoCategoryId(): VideoCategoryId {
  737. return createTypeUnsafe<VideoCategoryId & Codec>(
  738. typeRegistry,
  739. "VideoCategoryId",
  740. [this.ctx.params[1].value]
  741. );
  742. }
  743. }
  744. export class VideoCreatedEvent {
  745. public readonly expectedParamTypes = [
  746. "ContentActor",
  747. "ChannelId",
  748. "VideoId",
  749. "VideoCreationParameters<ContentParameters>"
  750. ];
  751. constructor(public readonly ctx: SubstrateEvent) {}
  752. get data(): VideoCreated_Params {
  753. return new VideoCreated_Params(this.ctx);
  754. }
  755. validateParams(): boolean {
  756. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  757. return false;
  758. }
  759. let valid = true;
  760. this.expectedParamTypes.forEach((type, i) => {
  761. if (type !== this.ctx.params[i].type) {
  762. valid = false;
  763. }
  764. });
  765. return valid;
  766. }
  767. }
  768. class VideoCreated_Params {
  769. constructor(public readonly ctx: SubstrateEvent) {}
  770. get contentActor(): ContentActor {
  771. return createTypeUnsafe<ContentActor & Codec>(
  772. typeRegistry,
  773. "ContentActor",
  774. [this.ctx.params[0].value]
  775. );
  776. }
  777. get channelId(): ChannelId {
  778. return createTypeUnsafe<ChannelId & Codec>(typeRegistry, "ChannelId", [
  779. this.ctx.params[1].value
  780. ]);
  781. }
  782. get videoId(): VideoId {
  783. return createTypeUnsafe<VideoId & Codec>(typeRegistry, "VideoId", [
  784. this.ctx.params[2].value
  785. ]);
  786. }
  787. get videoCreationParameters(): VideoCreationParameters {
  788. return createTypeUnsafe<VideoCreationParameters & Codec>(
  789. typeRegistry,
  790. "VideoCreationParameters",
  791. [this.ctx.params[3].value]
  792. );
  793. }
  794. }
  795. export class VideoUpdatedEvent {
  796. public readonly expectedParamTypes = [
  797. "ContentActor",
  798. "VideoId",
  799. "VideoUpdateParameters<ContentParameters>"
  800. ];
  801. constructor(public readonly ctx: SubstrateEvent) {}
  802. get data(): VideoUpdated_Params {
  803. return new VideoUpdated_Params(this.ctx);
  804. }
  805. validateParams(): boolean {
  806. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  807. return false;
  808. }
  809. let valid = true;
  810. this.expectedParamTypes.forEach((type, i) => {
  811. if (type !== this.ctx.params[i].type) {
  812. valid = false;
  813. }
  814. });
  815. return valid;
  816. }
  817. }
  818. class VideoUpdated_Params {
  819. constructor(public readonly ctx: SubstrateEvent) {}
  820. get contentActor(): ContentActor {
  821. return createTypeUnsafe<ContentActor & Codec>(
  822. typeRegistry,
  823. "ContentActor",
  824. [this.ctx.params[0].value]
  825. );
  826. }
  827. get videoId(): VideoId {
  828. return createTypeUnsafe<VideoId & Codec>(typeRegistry, "VideoId", [
  829. this.ctx.params[1].value
  830. ]);
  831. }
  832. get videoUpdateParameters(): VideoUpdateParameters {
  833. return createTypeUnsafe<VideoUpdateParameters & Codec>(
  834. typeRegistry,
  835. "VideoUpdateParameters",
  836. [this.ctx.params[2].value]
  837. );
  838. }
  839. }
  840. export class VideoDeletedEvent {
  841. public readonly expectedParamTypes = ["ContentActor", "VideoId"];
  842. constructor(public readonly ctx: SubstrateEvent) {}
  843. get data(): VideoDeleted_Params {
  844. return new VideoDeleted_Params(this.ctx);
  845. }
  846. validateParams(): boolean {
  847. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  848. return false;
  849. }
  850. let valid = true;
  851. this.expectedParamTypes.forEach((type, i) => {
  852. if (type !== this.ctx.params[i].type) {
  853. valid = false;
  854. }
  855. });
  856. return valid;
  857. }
  858. }
  859. class VideoDeleted_Params {
  860. constructor(public readonly ctx: SubstrateEvent) {}
  861. get contentActor(): ContentActor {
  862. return createTypeUnsafe<ContentActor & Codec>(
  863. typeRegistry,
  864. "ContentActor",
  865. [this.ctx.params[0].value]
  866. );
  867. }
  868. get videoId(): VideoId {
  869. return createTypeUnsafe<VideoId & Codec>(typeRegistry, "VideoId", [
  870. this.ctx.params[1].value
  871. ]);
  872. }
  873. }
  874. export class VideoCensorshipStatusUpdatedEvent {
  875. public readonly expectedParamTypes = [
  876. "ContentActor",
  877. "VideoId",
  878. "bool",
  879. "Vec<u8>"
  880. ];
  881. constructor(public readonly ctx: SubstrateEvent) {}
  882. get data(): VideoCensorshipStatusUpdated_Params {
  883. return new VideoCensorshipStatusUpdated_Params(this.ctx);
  884. }
  885. validateParams(): boolean {
  886. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  887. return false;
  888. }
  889. let valid = true;
  890. this.expectedParamTypes.forEach((type, i) => {
  891. if (type !== this.ctx.params[i].type) {
  892. valid = false;
  893. }
  894. });
  895. return valid;
  896. }
  897. }
  898. class VideoCensorshipStatusUpdated_Params {
  899. constructor(public readonly ctx: SubstrateEvent) {}
  900. get contentActor(): ContentActor {
  901. return createTypeUnsafe<ContentActor & Codec>(
  902. typeRegistry,
  903. "ContentActor",
  904. [this.ctx.params[0].value]
  905. );
  906. }
  907. get videoId(): VideoId {
  908. return createTypeUnsafe<VideoId & Codec>(typeRegistry, "VideoId", [
  909. this.ctx.params[1].value
  910. ]);
  911. }
  912. get bool(): bool {
  913. return createTypeUnsafe<bool & Codec>(typeRegistry, "bool", [
  914. this.ctx.params[2].value
  915. ]);
  916. }
  917. get bytes(): Bytes {
  918. return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
  919. this.ctx.params[3].value
  920. ]);
  921. }
  922. }
  923. export class FeaturedVideosSetEvent {
  924. public readonly expectedParamTypes = ["ContentActor", "Vec<VideoId>"];
  925. constructor(public readonly ctx: SubstrateEvent) {}
  926. get data(): FeaturedVideosSet_Params {
  927. return new FeaturedVideosSet_Params(this.ctx);
  928. }
  929. validateParams(): boolean {
  930. if (this.expectedParamTypes.length !== this.ctx.params.length) {
  931. return false;
  932. }
  933. let valid = true;
  934. this.expectedParamTypes.forEach((type, i) => {
  935. if (type !== this.ctx.params[i].type) {
  936. valid = false;
  937. }
  938. });
  939. return valid;
  940. }
  941. }
  942. class FeaturedVideosSet_Params {
  943. constructor(public readonly ctx: SubstrateEvent) {}
  944. get contentActor(): ContentActor {
  945. return createTypeUnsafe<ContentActor & Codec>(
  946. typeRegistry,
  947. "ContentActor",
  948. [this.ctx.params[0].value]
  949. );
  950. }
  951. get videoId(): Vec<VideoId> {
  952. return createTypeUnsafe<Vec<VideoId> & Codec>(
  953. typeRegistry,
  954. "Vec<VideoId>",
  955. [this.ctx.params[1].value]
  956. );
  957. }
  958. }
  959. /**
  960. * Add new curator group to runtime storage
  961. */
  962. export class CreateCuratorGroupCall {
  963. public readonly extrinsic: SubstrateExtrinsic;
  964. public readonly expectedArgTypes = [];
  965. constructor(public readonly ctx: SubstrateEvent) {
  966. if (ctx.extrinsic === undefined) {
  967. throw new Error(`No call data has been provided`);
  968. }
  969. this.extrinsic = ctx.extrinsic;
  970. }
  971. get args(): CreateCuratorGroup_Args {
  972. return new CreateCuratorGroup_Args(this.extrinsic);
  973. }
  974. validateArgs(): boolean {
  975. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  976. return false;
  977. }
  978. let valid = true;
  979. this.expectedArgTypes.forEach((type, i) => {
  980. if (type !== this.extrinsic.args[i].type) {
  981. valid = false;
  982. }
  983. });
  984. return valid;
  985. }
  986. }
  987. class CreateCuratorGroup_Args {
  988. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  989. }
  990. /**
  991. * Set `is_active` status for curator group under given `curator_group_id`
  992. */
  993. export class SetCuratorGroupStatusCall {
  994. public readonly extrinsic: SubstrateExtrinsic;
  995. public readonly expectedArgTypes = ["CuratorGroupId", "bool"];
  996. constructor(public readonly ctx: SubstrateEvent) {
  997. if (ctx.extrinsic === undefined) {
  998. throw new Error(`No call data has been provided`);
  999. }
  1000. this.extrinsic = ctx.extrinsic;
  1001. }
  1002. get args(): SetCuratorGroupStatus_Args {
  1003. return new SetCuratorGroupStatus_Args(this.extrinsic);
  1004. }
  1005. validateArgs(): boolean {
  1006. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1007. return false;
  1008. }
  1009. let valid = true;
  1010. this.expectedArgTypes.forEach((type, i) => {
  1011. if (type !== this.extrinsic.args[i].type) {
  1012. valid = false;
  1013. }
  1014. });
  1015. return valid;
  1016. }
  1017. }
  1018. class SetCuratorGroupStatus_Args {
  1019. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1020. get curatorGroupId(): CuratorGroupId {
  1021. return createTypeUnsafe<CuratorGroupId & Codec>(
  1022. typeRegistry,
  1023. "CuratorGroupId",
  1024. [this.extrinsic.args[0].value]
  1025. );
  1026. }
  1027. get isActive(): bool {
  1028. return createTypeUnsafe<bool & Codec>(typeRegistry, "bool", [
  1029. this.extrinsic.args[1].value
  1030. ]);
  1031. }
  1032. }
  1033. /**
  1034. * Add curator to curator group under given `curator_group_id`
  1035. */
  1036. export class AddCuratorToGroupCall {
  1037. public readonly extrinsic: SubstrateExtrinsic;
  1038. public readonly expectedArgTypes = ["CuratorGroupId", "CuratorId"];
  1039. constructor(public readonly ctx: SubstrateEvent) {
  1040. if (ctx.extrinsic === undefined) {
  1041. throw new Error(`No call data has been provided`);
  1042. }
  1043. this.extrinsic = ctx.extrinsic;
  1044. }
  1045. get args(): AddCuratorToGroup_Args {
  1046. return new AddCuratorToGroup_Args(this.extrinsic);
  1047. }
  1048. validateArgs(): boolean {
  1049. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1050. return false;
  1051. }
  1052. let valid = true;
  1053. this.expectedArgTypes.forEach((type, i) => {
  1054. if (type !== this.extrinsic.args[i].type) {
  1055. valid = false;
  1056. }
  1057. });
  1058. return valid;
  1059. }
  1060. }
  1061. class AddCuratorToGroup_Args {
  1062. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1063. get curatorGroupId(): CuratorGroupId {
  1064. return createTypeUnsafe<CuratorGroupId & Codec>(
  1065. typeRegistry,
  1066. "CuratorGroupId",
  1067. [this.extrinsic.args[0].value]
  1068. );
  1069. }
  1070. get curatorId(): CuratorId {
  1071. return createTypeUnsafe<CuratorId & Codec>(typeRegistry, "CuratorId", [
  1072. this.extrinsic.args[1].value
  1073. ]);
  1074. }
  1075. }
  1076. /**
  1077. * Remove curator from a given curator group
  1078. */
  1079. export class RemoveCuratorFromGroupCall {
  1080. public readonly extrinsic: SubstrateExtrinsic;
  1081. public readonly expectedArgTypes = ["CuratorGroupId", "CuratorId"];
  1082. constructor(public readonly ctx: SubstrateEvent) {
  1083. if (ctx.extrinsic === undefined) {
  1084. throw new Error(`No call data has been provided`);
  1085. }
  1086. this.extrinsic = ctx.extrinsic;
  1087. }
  1088. get args(): RemoveCuratorFromGroup_Args {
  1089. return new RemoveCuratorFromGroup_Args(this.extrinsic);
  1090. }
  1091. validateArgs(): boolean {
  1092. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1093. return false;
  1094. }
  1095. let valid = true;
  1096. this.expectedArgTypes.forEach((type, i) => {
  1097. if (type !== this.extrinsic.args[i].type) {
  1098. valid = false;
  1099. }
  1100. });
  1101. return valid;
  1102. }
  1103. }
  1104. class RemoveCuratorFromGroup_Args {
  1105. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1106. get curatorGroupId(): CuratorGroupId {
  1107. return createTypeUnsafe<CuratorGroupId & Codec>(
  1108. typeRegistry,
  1109. "CuratorGroupId",
  1110. [this.extrinsic.args[0].value]
  1111. );
  1112. }
  1113. get curatorId(): CuratorId {
  1114. return createTypeUnsafe<CuratorId & Codec>(typeRegistry, "CuratorId", [
  1115. this.extrinsic.args[1].value
  1116. ]);
  1117. }
  1118. }
  1119. export class CreateChannelCall {
  1120. public readonly extrinsic: SubstrateExtrinsic;
  1121. public readonly expectedArgTypes = [
  1122. "ContentActor",
  1123. "ChannelCreationParameters"
  1124. ];
  1125. constructor(public readonly ctx: SubstrateEvent) {
  1126. if (ctx.extrinsic === undefined) {
  1127. throw new Error(`No call data has been provided`);
  1128. }
  1129. this.extrinsic = ctx.extrinsic;
  1130. }
  1131. get args(): CreateChannel_Args {
  1132. return new CreateChannel_Args(this.extrinsic);
  1133. }
  1134. validateArgs(): boolean {
  1135. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1136. return false;
  1137. }
  1138. let valid = true;
  1139. this.expectedArgTypes.forEach((type, i) => {
  1140. if (type !== this.extrinsic.args[i].type) {
  1141. valid = false;
  1142. }
  1143. });
  1144. return valid;
  1145. }
  1146. }
  1147. class CreateChannel_Args {
  1148. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1149. get actor(): ContentActor {
  1150. return createTypeUnsafe<ContentActor & Codec>(
  1151. typeRegistry,
  1152. "ContentActor",
  1153. [this.extrinsic.args[0].value]
  1154. );
  1155. }
  1156. get params(): ChannelCreationParameters {
  1157. return createTypeUnsafe<ChannelCreationParameters & Codec>(
  1158. typeRegistry,
  1159. "ChannelCreationParameters",
  1160. [this.extrinsic.args[1].value]
  1161. );
  1162. }
  1163. }
  1164. export class UpdateChannelCall {
  1165. public readonly extrinsic: SubstrateExtrinsic;
  1166. public readonly expectedArgTypes = [
  1167. "ContentActor",
  1168. "ChannelId",
  1169. "ChannelUpdateParameters"
  1170. ];
  1171. constructor(public readonly ctx: SubstrateEvent) {
  1172. if (ctx.extrinsic === undefined) {
  1173. throw new Error(`No call data has been provided`);
  1174. }
  1175. this.extrinsic = ctx.extrinsic;
  1176. }
  1177. get args(): UpdateChannel_Args {
  1178. return new UpdateChannel_Args(this.extrinsic);
  1179. }
  1180. validateArgs(): boolean {
  1181. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1182. return false;
  1183. }
  1184. let valid = true;
  1185. this.expectedArgTypes.forEach((type, i) => {
  1186. if (type !== this.extrinsic.args[i].type) {
  1187. valid = false;
  1188. }
  1189. });
  1190. return valid;
  1191. }
  1192. }
  1193. class UpdateChannel_Args {
  1194. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1195. get actor(): ContentActor {
  1196. return createTypeUnsafe<ContentActor & Codec>(
  1197. typeRegistry,
  1198. "ContentActor",
  1199. [this.extrinsic.args[0].value]
  1200. );
  1201. }
  1202. get channelId(): ChannelId {
  1203. return createTypeUnsafe<ChannelId & Codec>(typeRegistry, "ChannelId", [
  1204. this.extrinsic.args[1].value
  1205. ]);
  1206. }
  1207. get params(): ChannelUpdateParameters {
  1208. return createTypeUnsafe<ChannelUpdateParameters & Codec>(
  1209. typeRegistry,
  1210. "ChannelUpdateParameters",
  1211. [this.extrinsic.args[2].value]
  1212. );
  1213. }
  1214. }
  1215. /**
  1216. * Remove assets of a channel from storage
  1217. */
  1218. export class RemoveChannelAssetsCall {
  1219. public readonly extrinsic: SubstrateExtrinsic;
  1220. public readonly expectedArgTypes = [
  1221. "ContentActor",
  1222. "ChannelId",
  1223. "Vec<ContentId>"
  1224. ];
  1225. constructor(public readonly ctx: SubstrateEvent) {
  1226. if (ctx.extrinsic === undefined) {
  1227. throw new Error(`No call data has been provided`);
  1228. }
  1229. this.extrinsic = ctx.extrinsic;
  1230. }
  1231. get args(): RemoveChannelAssets_Args {
  1232. return new RemoveChannelAssets_Args(this.extrinsic);
  1233. }
  1234. validateArgs(): boolean {
  1235. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1236. return false;
  1237. }
  1238. let valid = true;
  1239. this.expectedArgTypes.forEach((type, i) => {
  1240. if (type !== this.extrinsic.args[i].type) {
  1241. valid = false;
  1242. }
  1243. });
  1244. return valid;
  1245. }
  1246. }
  1247. class RemoveChannelAssets_Args {
  1248. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1249. get actor(): ContentActor {
  1250. return createTypeUnsafe<ContentActor & Codec>(
  1251. typeRegistry,
  1252. "ContentActor",
  1253. [this.extrinsic.args[0].value]
  1254. );
  1255. }
  1256. get channelId(): ChannelId {
  1257. return createTypeUnsafe<ChannelId & Codec>(typeRegistry, "ChannelId", [
  1258. this.extrinsic.args[1].value
  1259. ]);
  1260. }
  1261. get assets(): Vec<ContentId> {
  1262. return createTypeUnsafe<Vec<ContentId> & Codec>(
  1263. typeRegistry,
  1264. "Vec<ContentId>",
  1265. [this.extrinsic.args[2].value]
  1266. );
  1267. }
  1268. }
  1269. export class UpdateChannelCensorshipStatusCall {
  1270. public readonly extrinsic: SubstrateExtrinsic;
  1271. public readonly expectedArgTypes = [
  1272. "ContentActor",
  1273. "ChannelId",
  1274. "bool",
  1275. "Bytes"
  1276. ];
  1277. constructor(public readonly ctx: SubstrateEvent) {
  1278. if (ctx.extrinsic === undefined) {
  1279. throw new Error(`No call data has been provided`);
  1280. }
  1281. this.extrinsic = ctx.extrinsic;
  1282. }
  1283. get args(): UpdateChannelCensorshipStatus_Args {
  1284. return new UpdateChannelCensorshipStatus_Args(this.extrinsic);
  1285. }
  1286. validateArgs(): boolean {
  1287. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1288. return false;
  1289. }
  1290. let valid = true;
  1291. this.expectedArgTypes.forEach((type, i) => {
  1292. if (type !== this.extrinsic.args[i].type) {
  1293. valid = false;
  1294. }
  1295. });
  1296. return valid;
  1297. }
  1298. }
  1299. class UpdateChannelCensorshipStatus_Args {
  1300. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1301. get actor(): ContentActor {
  1302. return createTypeUnsafe<ContentActor & Codec>(
  1303. typeRegistry,
  1304. "ContentActor",
  1305. [this.extrinsic.args[0].value]
  1306. );
  1307. }
  1308. get channelId(): ChannelId {
  1309. return createTypeUnsafe<ChannelId & Codec>(typeRegistry, "ChannelId", [
  1310. this.extrinsic.args[1].value
  1311. ]);
  1312. }
  1313. get isCensored(): bool {
  1314. return createTypeUnsafe<bool & Codec>(typeRegistry, "bool", [
  1315. this.extrinsic.args[2].value
  1316. ]);
  1317. }
  1318. get rationale(): Bytes {
  1319. return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
  1320. this.extrinsic.args[3].value
  1321. ]);
  1322. }
  1323. }
  1324. export class CreateChannelCategoryCall {
  1325. public readonly extrinsic: SubstrateExtrinsic;
  1326. public readonly expectedArgTypes = [
  1327. "ContentActor",
  1328. "ChannelCategoryCreationParameters"
  1329. ];
  1330. constructor(public readonly ctx: SubstrateEvent) {
  1331. if (ctx.extrinsic === undefined) {
  1332. throw new Error(`No call data has been provided`);
  1333. }
  1334. this.extrinsic = ctx.extrinsic;
  1335. }
  1336. get args(): CreateChannelCategory_Args {
  1337. return new CreateChannelCategory_Args(this.extrinsic);
  1338. }
  1339. validateArgs(): boolean {
  1340. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1341. return false;
  1342. }
  1343. let valid = true;
  1344. this.expectedArgTypes.forEach((type, i) => {
  1345. if (type !== this.extrinsic.args[i].type) {
  1346. valid = false;
  1347. }
  1348. });
  1349. return valid;
  1350. }
  1351. }
  1352. class CreateChannelCategory_Args {
  1353. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1354. get actor(): ContentActor {
  1355. return createTypeUnsafe<ContentActor & Codec>(
  1356. typeRegistry,
  1357. "ContentActor",
  1358. [this.extrinsic.args[0].value]
  1359. );
  1360. }
  1361. get params(): ChannelCategoryCreationParameters {
  1362. return createTypeUnsafe<ChannelCategoryCreationParameters & Codec>(
  1363. typeRegistry,
  1364. "ChannelCategoryCreationParameters",
  1365. [this.extrinsic.args[1].value]
  1366. );
  1367. }
  1368. }
  1369. export class UpdateChannelCategoryCall {
  1370. public readonly extrinsic: SubstrateExtrinsic;
  1371. public readonly expectedArgTypes = [
  1372. "ContentActor",
  1373. "ChannelCategoryId",
  1374. "ChannelCategoryUpdateParameters"
  1375. ];
  1376. constructor(public readonly ctx: SubstrateEvent) {
  1377. if (ctx.extrinsic === undefined) {
  1378. throw new Error(`No call data has been provided`);
  1379. }
  1380. this.extrinsic = ctx.extrinsic;
  1381. }
  1382. get args(): UpdateChannelCategory_Args {
  1383. return new UpdateChannelCategory_Args(this.extrinsic);
  1384. }
  1385. validateArgs(): boolean {
  1386. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1387. return false;
  1388. }
  1389. let valid = true;
  1390. this.expectedArgTypes.forEach((type, i) => {
  1391. if (type !== this.extrinsic.args[i].type) {
  1392. valid = false;
  1393. }
  1394. });
  1395. return valid;
  1396. }
  1397. }
  1398. class UpdateChannelCategory_Args {
  1399. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1400. get actor(): ContentActor {
  1401. return createTypeUnsafe<ContentActor & Codec>(
  1402. typeRegistry,
  1403. "ContentActor",
  1404. [this.extrinsic.args[0].value]
  1405. );
  1406. }
  1407. get categoryId(): ChannelCategoryId {
  1408. return createTypeUnsafe<ChannelCategoryId & Codec>(
  1409. typeRegistry,
  1410. "ChannelCategoryId",
  1411. [this.extrinsic.args[1].value]
  1412. );
  1413. }
  1414. get params(): ChannelCategoryUpdateParameters {
  1415. return createTypeUnsafe<ChannelCategoryUpdateParameters & Codec>(
  1416. typeRegistry,
  1417. "ChannelCategoryUpdateParameters",
  1418. [this.extrinsic.args[2].value]
  1419. );
  1420. }
  1421. }
  1422. export class DeleteChannelCategoryCall {
  1423. public readonly extrinsic: SubstrateExtrinsic;
  1424. public readonly expectedArgTypes = ["ContentActor", "ChannelCategoryId"];
  1425. constructor(public readonly ctx: SubstrateEvent) {
  1426. if (ctx.extrinsic === undefined) {
  1427. throw new Error(`No call data has been provided`);
  1428. }
  1429. this.extrinsic = ctx.extrinsic;
  1430. }
  1431. get args(): DeleteChannelCategory_Args {
  1432. return new DeleteChannelCategory_Args(this.extrinsic);
  1433. }
  1434. validateArgs(): boolean {
  1435. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1436. return false;
  1437. }
  1438. let valid = true;
  1439. this.expectedArgTypes.forEach((type, i) => {
  1440. if (type !== this.extrinsic.args[i].type) {
  1441. valid = false;
  1442. }
  1443. });
  1444. return valid;
  1445. }
  1446. }
  1447. class DeleteChannelCategory_Args {
  1448. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1449. get actor(): ContentActor {
  1450. return createTypeUnsafe<ContentActor & Codec>(
  1451. typeRegistry,
  1452. "ContentActor",
  1453. [this.extrinsic.args[0].value]
  1454. );
  1455. }
  1456. get categoryId(): ChannelCategoryId {
  1457. return createTypeUnsafe<ChannelCategoryId & Codec>(
  1458. typeRegistry,
  1459. "ChannelCategoryId",
  1460. [this.extrinsic.args[1].value]
  1461. );
  1462. }
  1463. }
  1464. export class RequestChannelTransferCall {
  1465. public readonly extrinsic: SubstrateExtrinsic;
  1466. public readonly expectedArgTypes = [
  1467. "ContentActor",
  1468. "ChannelOwnershipTransferRequest"
  1469. ];
  1470. constructor(public readonly ctx: SubstrateEvent) {
  1471. if (ctx.extrinsic === undefined) {
  1472. throw new Error(`No call data has been provided`);
  1473. }
  1474. this.extrinsic = ctx.extrinsic;
  1475. }
  1476. get args(): RequestChannelTransfer_Args {
  1477. return new RequestChannelTransfer_Args(this.extrinsic);
  1478. }
  1479. validateArgs(): boolean {
  1480. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1481. return false;
  1482. }
  1483. let valid = true;
  1484. this.expectedArgTypes.forEach((type, i) => {
  1485. if (type !== this.extrinsic.args[i].type) {
  1486. valid = false;
  1487. }
  1488. });
  1489. return valid;
  1490. }
  1491. }
  1492. class RequestChannelTransfer_Args {
  1493. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1494. get actor(): ContentActor {
  1495. return createTypeUnsafe<ContentActor & Codec>(
  1496. typeRegistry,
  1497. "ContentActor",
  1498. [this.extrinsic.args[0].value]
  1499. );
  1500. }
  1501. get request(): ChannelOwnershipTransferRequest {
  1502. return createTypeUnsafe<ChannelOwnershipTransferRequest & Codec>(
  1503. typeRegistry,
  1504. "ChannelOwnershipTransferRequest",
  1505. [this.extrinsic.args[1].value]
  1506. );
  1507. }
  1508. }
  1509. export class CancelChannelTransferRequestCall {
  1510. public readonly extrinsic: SubstrateExtrinsic;
  1511. public readonly expectedArgTypes = ["ChannelOwnershipTransferRequestId"];
  1512. constructor(public readonly ctx: SubstrateEvent) {
  1513. if (ctx.extrinsic === undefined) {
  1514. throw new Error(`No call data has been provided`);
  1515. }
  1516. this.extrinsic = ctx.extrinsic;
  1517. }
  1518. get args(): CancelChannelTransferRequest_Args {
  1519. return new CancelChannelTransferRequest_Args(this.extrinsic);
  1520. }
  1521. validateArgs(): boolean {
  1522. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1523. return false;
  1524. }
  1525. let valid = true;
  1526. this.expectedArgTypes.forEach((type, i) => {
  1527. if (type !== this.extrinsic.args[i].type) {
  1528. valid = false;
  1529. }
  1530. });
  1531. return valid;
  1532. }
  1533. }
  1534. class CancelChannelTransferRequest_Args {
  1535. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1536. get requestId(): ChannelOwnershipTransferRequestId {
  1537. return createTypeUnsafe<ChannelOwnershipTransferRequestId & Codec>(
  1538. typeRegistry,
  1539. "ChannelOwnershipTransferRequestId",
  1540. [this.extrinsic.args[0].value]
  1541. );
  1542. }
  1543. }
  1544. export class AcceptChannelTransferCall {
  1545. public readonly extrinsic: SubstrateExtrinsic;
  1546. public readonly expectedArgTypes = [
  1547. "ContentActor",
  1548. "ChannelOwnershipTransferRequestId"
  1549. ];
  1550. constructor(public readonly ctx: SubstrateEvent) {
  1551. if (ctx.extrinsic === undefined) {
  1552. throw new Error(`No call data has been provided`);
  1553. }
  1554. this.extrinsic = ctx.extrinsic;
  1555. }
  1556. get args(): AcceptChannelTransfer_Args {
  1557. return new AcceptChannelTransfer_Args(this.extrinsic);
  1558. }
  1559. validateArgs(): boolean {
  1560. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1561. return false;
  1562. }
  1563. let valid = true;
  1564. this.expectedArgTypes.forEach((type, i) => {
  1565. if (type !== this.extrinsic.args[i].type) {
  1566. valid = false;
  1567. }
  1568. });
  1569. return valid;
  1570. }
  1571. }
  1572. class AcceptChannelTransfer_Args {
  1573. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1574. get actor(): ContentActor {
  1575. return createTypeUnsafe<ContentActor & Codec>(
  1576. typeRegistry,
  1577. "ContentActor",
  1578. [this.extrinsic.args[0].value]
  1579. );
  1580. }
  1581. get requestId(): ChannelOwnershipTransferRequestId {
  1582. return createTypeUnsafe<ChannelOwnershipTransferRequestId & Codec>(
  1583. typeRegistry,
  1584. "ChannelOwnershipTransferRequestId",
  1585. [this.extrinsic.args[1].value]
  1586. );
  1587. }
  1588. }
  1589. export class CreateVideoCall {
  1590. public readonly extrinsic: SubstrateExtrinsic;
  1591. public readonly expectedArgTypes = [
  1592. "ContentActor",
  1593. "ChannelId",
  1594. "VideoCreationParameters"
  1595. ];
  1596. constructor(public readonly ctx: SubstrateEvent) {
  1597. if (ctx.extrinsic === undefined) {
  1598. throw new Error(`No call data has been provided`);
  1599. }
  1600. this.extrinsic = ctx.extrinsic;
  1601. }
  1602. get args(): CreateVideo_Args {
  1603. return new CreateVideo_Args(this.extrinsic);
  1604. }
  1605. validateArgs(): boolean {
  1606. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1607. return false;
  1608. }
  1609. let valid = true;
  1610. this.expectedArgTypes.forEach((type, i) => {
  1611. if (type !== this.extrinsic.args[i].type) {
  1612. valid = false;
  1613. }
  1614. });
  1615. return valid;
  1616. }
  1617. }
  1618. class CreateVideo_Args {
  1619. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1620. get actor(): ContentActor {
  1621. return createTypeUnsafe<ContentActor & Codec>(
  1622. typeRegistry,
  1623. "ContentActor",
  1624. [this.extrinsic.args[0].value]
  1625. );
  1626. }
  1627. get channelId(): ChannelId {
  1628. return createTypeUnsafe<ChannelId & Codec>(typeRegistry, "ChannelId", [
  1629. this.extrinsic.args[1].value
  1630. ]);
  1631. }
  1632. get params(): VideoCreationParameters {
  1633. return createTypeUnsafe<VideoCreationParameters & Codec>(
  1634. typeRegistry,
  1635. "VideoCreationParameters",
  1636. [this.extrinsic.args[2].value]
  1637. );
  1638. }
  1639. }
  1640. export class UpdateVideoCall {
  1641. public readonly extrinsic: SubstrateExtrinsic;
  1642. public readonly expectedArgTypes = [
  1643. "ContentActor",
  1644. "VideoId",
  1645. "VideoUpdateParameters"
  1646. ];
  1647. constructor(public readonly ctx: SubstrateEvent) {
  1648. if (ctx.extrinsic === undefined) {
  1649. throw new Error(`No call data has been provided`);
  1650. }
  1651. this.extrinsic = ctx.extrinsic;
  1652. }
  1653. get args(): UpdateVideo_Args {
  1654. return new UpdateVideo_Args(this.extrinsic);
  1655. }
  1656. validateArgs(): boolean {
  1657. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1658. return false;
  1659. }
  1660. let valid = true;
  1661. this.expectedArgTypes.forEach((type, i) => {
  1662. if (type !== this.extrinsic.args[i].type) {
  1663. valid = false;
  1664. }
  1665. });
  1666. return valid;
  1667. }
  1668. }
  1669. class UpdateVideo_Args {
  1670. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1671. get actor(): ContentActor {
  1672. return createTypeUnsafe<ContentActor & Codec>(
  1673. typeRegistry,
  1674. "ContentActor",
  1675. [this.extrinsic.args[0].value]
  1676. );
  1677. }
  1678. get videoId(): VideoId {
  1679. return createTypeUnsafe<VideoId & Codec>(typeRegistry, "VideoId", [
  1680. this.extrinsic.args[1].value
  1681. ]);
  1682. }
  1683. get params(): VideoUpdateParameters {
  1684. return createTypeUnsafe<VideoUpdateParameters & Codec>(
  1685. typeRegistry,
  1686. "VideoUpdateParameters",
  1687. [this.extrinsic.args[2].value]
  1688. );
  1689. }
  1690. }
  1691. export class DeleteVideoCall {
  1692. public readonly extrinsic: SubstrateExtrinsic;
  1693. public readonly expectedArgTypes = ["ContentActor", "VideoId"];
  1694. constructor(public readonly ctx: SubstrateEvent) {
  1695. if (ctx.extrinsic === undefined) {
  1696. throw new Error(`No call data has been provided`);
  1697. }
  1698. this.extrinsic = ctx.extrinsic;
  1699. }
  1700. get args(): DeleteVideo_Args {
  1701. return new DeleteVideo_Args(this.extrinsic);
  1702. }
  1703. validateArgs(): boolean {
  1704. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1705. return false;
  1706. }
  1707. let valid = true;
  1708. this.expectedArgTypes.forEach((type, i) => {
  1709. if (type !== this.extrinsic.args[i].type) {
  1710. valid = false;
  1711. }
  1712. });
  1713. return valid;
  1714. }
  1715. }
  1716. class DeleteVideo_Args {
  1717. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1718. get actor(): ContentActor {
  1719. return createTypeUnsafe<ContentActor & Codec>(
  1720. typeRegistry,
  1721. "ContentActor",
  1722. [this.extrinsic.args[0].value]
  1723. );
  1724. }
  1725. get videoId(): VideoId {
  1726. return createTypeUnsafe<VideoId & Codec>(typeRegistry, "VideoId", [
  1727. this.extrinsic.args[1].value
  1728. ]);
  1729. }
  1730. }
  1731. export class CreatePlaylistCall {
  1732. public readonly extrinsic: SubstrateExtrinsic;
  1733. public readonly expectedArgTypes = [
  1734. "ContentActor",
  1735. "ChannelId",
  1736. "PlaylistCreationParameters"
  1737. ];
  1738. constructor(public readonly ctx: SubstrateEvent) {
  1739. if (ctx.extrinsic === undefined) {
  1740. throw new Error(`No call data has been provided`);
  1741. }
  1742. this.extrinsic = ctx.extrinsic;
  1743. }
  1744. get args(): CreatePlaylist_Args {
  1745. return new CreatePlaylist_Args(this.extrinsic);
  1746. }
  1747. validateArgs(): boolean {
  1748. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1749. return false;
  1750. }
  1751. let valid = true;
  1752. this.expectedArgTypes.forEach((type, i) => {
  1753. if (type !== this.extrinsic.args[i].type) {
  1754. valid = false;
  1755. }
  1756. });
  1757. return valid;
  1758. }
  1759. }
  1760. class CreatePlaylist_Args {
  1761. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1762. get actor(): ContentActor {
  1763. return createTypeUnsafe<ContentActor & Codec>(
  1764. typeRegistry,
  1765. "ContentActor",
  1766. [this.extrinsic.args[0].value]
  1767. );
  1768. }
  1769. get channelId(): ChannelId {
  1770. return createTypeUnsafe<ChannelId & Codec>(typeRegistry, "ChannelId", [
  1771. this.extrinsic.args[1].value
  1772. ]);
  1773. }
  1774. get params(): PlaylistCreationParameters {
  1775. return createTypeUnsafe<PlaylistCreationParameters & Codec>(
  1776. typeRegistry,
  1777. "PlaylistCreationParameters",
  1778. [this.extrinsic.args[2].value]
  1779. );
  1780. }
  1781. }
  1782. export class UpdatePlaylistCall {
  1783. public readonly extrinsic: SubstrateExtrinsic;
  1784. public readonly expectedArgTypes = [
  1785. "ContentActor",
  1786. "PlaylistId",
  1787. "PlaylistUpdateParameters"
  1788. ];
  1789. constructor(public readonly ctx: SubstrateEvent) {
  1790. if (ctx.extrinsic === undefined) {
  1791. throw new Error(`No call data has been provided`);
  1792. }
  1793. this.extrinsic = ctx.extrinsic;
  1794. }
  1795. get args(): UpdatePlaylist_Args {
  1796. return new UpdatePlaylist_Args(this.extrinsic);
  1797. }
  1798. validateArgs(): boolean {
  1799. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1800. return false;
  1801. }
  1802. let valid = true;
  1803. this.expectedArgTypes.forEach((type, i) => {
  1804. if (type !== this.extrinsic.args[i].type) {
  1805. valid = false;
  1806. }
  1807. });
  1808. return valid;
  1809. }
  1810. }
  1811. class UpdatePlaylist_Args {
  1812. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1813. get actor(): ContentActor {
  1814. return createTypeUnsafe<ContentActor & Codec>(
  1815. typeRegistry,
  1816. "ContentActor",
  1817. [this.extrinsic.args[0].value]
  1818. );
  1819. }
  1820. get playlist(): PlaylistId {
  1821. return createTypeUnsafe<PlaylistId & Codec>(typeRegistry, "PlaylistId", [
  1822. this.extrinsic.args[1].value
  1823. ]);
  1824. }
  1825. get params(): PlaylistUpdateParameters {
  1826. return createTypeUnsafe<PlaylistUpdateParameters & Codec>(
  1827. typeRegistry,
  1828. "PlaylistUpdateParameters",
  1829. [this.extrinsic.args[2].value]
  1830. );
  1831. }
  1832. }
  1833. export class DeletePlaylistCall {
  1834. public readonly extrinsic: SubstrateExtrinsic;
  1835. public readonly expectedArgTypes = [
  1836. "ContentActor",
  1837. "ChannelId",
  1838. "PlaylistId"
  1839. ];
  1840. constructor(public readonly ctx: SubstrateEvent) {
  1841. if (ctx.extrinsic === undefined) {
  1842. throw new Error(`No call data has been provided`);
  1843. }
  1844. this.extrinsic = ctx.extrinsic;
  1845. }
  1846. get args(): DeletePlaylist_Args {
  1847. return new DeletePlaylist_Args(this.extrinsic);
  1848. }
  1849. validateArgs(): boolean {
  1850. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1851. return false;
  1852. }
  1853. let valid = true;
  1854. this.expectedArgTypes.forEach((type, i) => {
  1855. if (type !== this.extrinsic.args[i].type) {
  1856. valid = false;
  1857. }
  1858. });
  1859. return valid;
  1860. }
  1861. }
  1862. class DeletePlaylist_Args {
  1863. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1864. get actor(): ContentActor {
  1865. return createTypeUnsafe<ContentActor & Codec>(
  1866. typeRegistry,
  1867. "ContentActor",
  1868. [this.extrinsic.args[0].value]
  1869. );
  1870. }
  1871. get channelId(): ChannelId {
  1872. return createTypeUnsafe<ChannelId & Codec>(typeRegistry, "ChannelId", [
  1873. this.extrinsic.args[1].value
  1874. ]);
  1875. }
  1876. get playlist(): PlaylistId {
  1877. return createTypeUnsafe<PlaylistId & Codec>(typeRegistry, "PlaylistId", [
  1878. this.extrinsic.args[2].value
  1879. ]);
  1880. }
  1881. }
  1882. export class SetFeaturedVideosCall {
  1883. public readonly extrinsic: SubstrateExtrinsic;
  1884. public readonly expectedArgTypes = ["ContentActor", "Vec<VideoId>"];
  1885. constructor(public readonly ctx: SubstrateEvent) {
  1886. if (ctx.extrinsic === undefined) {
  1887. throw new Error(`No call data has been provided`);
  1888. }
  1889. this.extrinsic = ctx.extrinsic;
  1890. }
  1891. get args(): SetFeaturedVideos_Args {
  1892. return new SetFeaturedVideos_Args(this.extrinsic);
  1893. }
  1894. validateArgs(): boolean {
  1895. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1896. return false;
  1897. }
  1898. let valid = true;
  1899. this.expectedArgTypes.forEach((type, i) => {
  1900. if (type !== this.extrinsic.args[i].type) {
  1901. valid = false;
  1902. }
  1903. });
  1904. return valid;
  1905. }
  1906. }
  1907. class SetFeaturedVideos_Args {
  1908. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1909. get actor(): ContentActor {
  1910. return createTypeUnsafe<ContentActor & Codec>(
  1911. typeRegistry,
  1912. "ContentActor",
  1913. [this.extrinsic.args[0].value]
  1914. );
  1915. }
  1916. get list(): Vec<VideoId> {
  1917. return createTypeUnsafe<Vec<VideoId> & Codec>(
  1918. typeRegistry,
  1919. "Vec<VideoId>",
  1920. [this.extrinsic.args[1].value]
  1921. );
  1922. }
  1923. }
  1924. export class CreateVideoCategoryCall {
  1925. public readonly extrinsic: SubstrateExtrinsic;
  1926. public readonly expectedArgTypes = [
  1927. "ContentActor",
  1928. "VideoCategoryCreationParameters"
  1929. ];
  1930. constructor(public readonly ctx: SubstrateEvent) {
  1931. if (ctx.extrinsic === undefined) {
  1932. throw new Error(`No call data has been provided`);
  1933. }
  1934. this.extrinsic = ctx.extrinsic;
  1935. }
  1936. get args(): CreateVideoCategory_Args {
  1937. return new CreateVideoCategory_Args(this.extrinsic);
  1938. }
  1939. validateArgs(): boolean {
  1940. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1941. return false;
  1942. }
  1943. let valid = true;
  1944. this.expectedArgTypes.forEach((type, i) => {
  1945. if (type !== this.extrinsic.args[i].type) {
  1946. valid = false;
  1947. }
  1948. });
  1949. return valid;
  1950. }
  1951. }
  1952. class CreateVideoCategory_Args {
  1953. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  1954. get actor(): ContentActor {
  1955. return createTypeUnsafe<ContentActor & Codec>(
  1956. typeRegistry,
  1957. "ContentActor",
  1958. [this.extrinsic.args[0].value]
  1959. );
  1960. }
  1961. get params(): VideoCategoryCreationParameters {
  1962. return createTypeUnsafe<VideoCategoryCreationParameters & Codec>(
  1963. typeRegistry,
  1964. "VideoCategoryCreationParameters",
  1965. [this.extrinsic.args[1].value]
  1966. );
  1967. }
  1968. }
  1969. export class UpdateVideoCategoryCall {
  1970. public readonly extrinsic: SubstrateExtrinsic;
  1971. public readonly expectedArgTypes = [
  1972. "ContentActor",
  1973. "VideoCategoryId",
  1974. "VideoCategoryUpdateParameters"
  1975. ];
  1976. constructor(public readonly ctx: SubstrateEvent) {
  1977. if (ctx.extrinsic === undefined) {
  1978. throw new Error(`No call data has been provided`);
  1979. }
  1980. this.extrinsic = ctx.extrinsic;
  1981. }
  1982. get args(): UpdateVideoCategory_Args {
  1983. return new UpdateVideoCategory_Args(this.extrinsic);
  1984. }
  1985. validateArgs(): boolean {
  1986. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  1987. return false;
  1988. }
  1989. let valid = true;
  1990. this.expectedArgTypes.forEach((type, i) => {
  1991. if (type !== this.extrinsic.args[i].type) {
  1992. valid = false;
  1993. }
  1994. });
  1995. return valid;
  1996. }
  1997. }
  1998. class UpdateVideoCategory_Args {
  1999. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  2000. get actor(): ContentActor {
  2001. return createTypeUnsafe<ContentActor & Codec>(
  2002. typeRegistry,
  2003. "ContentActor",
  2004. [this.extrinsic.args[0].value]
  2005. );
  2006. }
  2007. get categoryId(): VideoCategoryId {
  2008. return createTypeUnsafe<VideoCategoryId & Codec>(
  2009. typeRegistry,
  2010. "VideoCategoryId",
  2011. [this.extrinsic.args[1].value]
  2012. );
  2013. }
  2014. get params(): VideoCategoryUpdateParameters {
  2015. return createTypeUnsafe<VideoCategoryUpdateParameters & Codec>(
  2016. typeRegistry,
  2017. "VideoCategoryUpdateParameters",
  2018. [this.extrinsic.args[2].value]
  2019. );
  2020. }
  2021. }
  2022. export class DeleteVideoCategoryCall {
  2023. public readonly extrinsic: SubstrateExtrinsic;
  2024. public readonly expectedArgTypes = ["ContentActor", "VideoCategoryId"];
  2025. constructor(public readonly ctx: SubstrateEvent) {
  2026. if (ctx.extrinsic === undefined) {
  2027. throw new Error(`No call data has been provided`);
  2028. }
  2029. this.extrinsic = ctx.extrinsic;
  2030. }
  2031. get args(): DeleteVideoCategory_Args {
  2032. return new DeleteVideoCategory_Args(this.extrinsic);
  2033. }
  2034. validateArgs(): boolean {
  2035. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  2036. return false;
  2037. }
  2038. let valid = true;
  2039. this.expectedArgTypes.forEach((type, i) => {
  2040. if (type !== this.extrinsic.args[i].type) {
  2041. valid = false;
  2042. }
  2043. });
  2044. return valid;
  2045. }
  2046. }
  2047. class DeleteVideoCategory_Args {
  2048. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  2049. get actor(): ContentActor {
  2050. return createTypeUnsafe<ContentActor & Codec>(
  2051. typeRegistry,
  2052. "ContentActor",
  2053. [this.extrinsic.args[0].value]
  2054. );
  2055. }
  2056. get categoryId(): VideoCategoryId {
  2057. return createTypeUnsafe<VideoCategoryId & Codec>(
  2058. typeRegistry,
  2059. "VideoCategoryId",
  2060. [this.extrinsic.args[1].value]
  2061. );
  2062. }
  2063. }
  2064. export class RemovePersonFromVideoCall {
  2065. public readonly extrinsic: SubstrateExtrinsic;
  2066. public readonly expectedArgTypes = ["ContentActor", "VideoId"];
  2067. constructor(public readonly ctx: SubstrateEvent) {
  2068. if (ctx.extrinsic === undefined) {
  2069. throw new Error(`No call data has been provided`);
  2070. }
  2071. this.extrinsic = ctx.extrinsic;
  2072. }
  2073. get args(): RemovePersonFromVideo_Args {
  2074. return new RemovePersonFromVideo_Args(this.extrinsic);
  2075. }
  2076. validateArgs(): boolean {
  2077. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  2078. return false;
  2079. }
  2080. let valid = true;
  2081. this.expectedArgTypes.forEach((type, i) => {
  2082. if (type !== this.extrinsic.args[i].type) {
  2083. valid = false;
  2084. }
  2085. });
  2086. return valid;
  2087. }
  2088. }
  2089. class RemovePersonFromVideo_Args {
  2090. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  2091. get actor(): ContentActor {
  2092. return createTypeUnsafe<ContentActor & Codec>(
  2093. typeRegistry,
  2094. "ContentActor",
  2095. [this.extrinsic.args[0].value]
  2096. );
  2097. }
  2098. get videoId(): VideoId {
  2099. return createTypeUnsafe<VideoId & Codec>(typeRegistry, "VideoId", [
  2100. this.extrinsic.args[1].value
  2101. ]);
  2102. }
  2103. }
  2104. export class UpdateVideoCensorshipStatusCall {
  2105. public readonly extrinsic: SubstrateExtrinsic;
  2106. public readonly expectedArgTypes = [
  2107. "ContentActor",
  2108. "VideoId",
  2109. "bool",
  2110. "Bytes"
  2111. ];
  2112. constructor(public readonly ctx: SubstrateEvent) {
  2113. if (ctx.extrinsic === undefined) {
  2114. throw new Error(`No call data has been provided`);
  2115. }
  2116. this.extrinsic = ctx.extrinsic;
  2117. }
  2118. get args(): UpdateVideoCensorshipStatus_Args {
  2119. return new UpdateVideoCensorshipStatus_Args(this.extrinsic);
  2120. }
  2121. validateArgs(): boolean {
  2122. if (this.expectedArgTypes.length !== this.extrinsic.args.length) {
  2123. return false;
  2124. }
  2125. let valid = true;
  2126. this.expectedArgTypes.forEach((type, i) => {
  2127. if (type !== this.extrinsic.args[i].type) {
  2128. valid = false;
  2129. }
  2130. });
  2131. return valid;
  2132. }
  2133. }
  2134. class UpdateVideoCensorshipStatus_Args {
  2135. constructor(public readonly extrinsic: SubstrateExtrinsic) {}
  2136. get actor(): ContentActor {
  2137. return createTypeUnsafe<ContentActor & Codec>(
  2138. typeRegistry,
  2139. "ContentActor",
  2140. [this.extrinsic.args[0].value]
  2141. );
  2142. }
  2143. get videoId(): VideoId {
  2144. return createTypeUnsafe<VideoId & Codec>(typeRegistry, "VideoId", [
  2145. this.extrinsic.args[1].value
  2146. ]);
  2147. }
  2148. get isCensored(): bool {
  2149. return createTypeUnsafe<bool & Codec>(typeRegistry, "bool", [
  2150. this.extrinsic.args[2].value
  2151. ]);
  2152. }
  2153. get rationale(): Bytes {
  2154. return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
  2155. this.extrinsic.args[3].value
  2156. ]);
  2157. }
  2158. }
  2159. }