content.ts 69 KB

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