content.ts 65 KB

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