Selaa lähdekoodia

Pioneer webpack/tsconfig for "@joystream/types"

Leszek Wiesner 4 vuotta sitten
vanhempi
commit
ba5f54b697
100 muutettua tiedostoa jossa 1556 lisäystä ja 1549 poistoa
  1. 1 1
      cli/src/Api.ts
  2. 1 1
      cli/src/Types.ts
  3. 1 1
      cli/src/commands/council/info.ts
  4. 2 1
      package.json
  5. 1 1
      pioneer/packages/apps/src/SideBar/Item.tsx
  6. 1 1
      pioneer/packages/apps/src/index.tsx
  7. 10 4
      pioneer/packages/apps/webpack.config.js
  8. 1 1
      pioneer/packages/joy-election/src/Applicant.tsx
  9. 1 1
      pioneer/packages/joy-election/src/ApplyForm.tsx
  10. 1 1
      pioneer/packages/joy-election/src/Council.tsx
  11. 1 1
      pioneer/packages/joy-election/src/Dashboard.tsx
  12. 1 1
      pioneer/packages/joy-election/src/SealedVote.tsx
  13. 1 1
      pioneer/packages/joy-election/src/index.tsx
  14. 1 1
      pioneer/packages/joy-forum/src/CategoryList.tsx
  15. 1 1
      pioneer/packages/joy-forum/src/Context.tsx
  16. 1 1
      pioneer/packages/joy-forum/src/EditCategory.tsx
  17. 1 1
      pioneer/packages/joy-forum/src/EditReply.tsx
  18. 1 1
      pioneer/packages/joy-forum/src/EditThread.tsx
  19. 1 1
      pioneer/packages/joy-forum/src/Moderate.tsx
  20. 1 1
      pioneer/packages/joy-forum/src/ViewReply.tsx
  21. 1 1
      pioneer/packages/joy-forum/src/ViewThread.tsx
  22. 1 1
      pioneer/packages/joy-forum/src/calls.tsx
  23. 1 1
      pioneer/packages/joy-forum/src/utils.tsx
  24. 1 1
      pioneer/packages/joy-forum/src/validation.tsx
  25. 1 1
      pioneer/packages/joy-media/src/DiscoveryProvider.tsx
  26. 1 1
      pioneer/packages/joy-media/src/MediaView.tsx
  27. 2 2
      pioneer/packages/joy-media/src/Upload.tsx
  28. 1 1
      pioneer/packages/joy-media/src/channels/ChannelHelpers.ts
  29. 1 1
      pioneer/packages/joy-media/src/channels/ChannelsByOwner.tsx
  30. 1 1
      pioneer/packages/joy-media/src/channels/CurationPanel.tsx
  31. 1 1
      pioneer/packages/joy-media/src/channels/EditChannel.tsx
  32. 1 1
      pioneer/packages/joy-media/src/channels/EditChannel.view.tsx
  33. 1 1
      pioneer/packages/joy-media/src/channels/ViewChannel.tsx
  34. 1 1
      pioneer/packages/joy-media/src/channels/ViewChannel.view.tsx
  35. 2 2
      pioneer/packages/joy-media/src/common/MediaDropdownOptions.tsx
  36. 3 3
      pioneer/packages/joy-media/src/common/MediaPlayerView.tsx
  37. 2 2
      pioneer/packages/joy-media/src/common/MediaPlayerWithResolver.tsx
  38. 2 2
      pioneer/packages/joy-media/src/common/TypeHelpers.ts
  39. 3 3
      pioneer/packages/joy-media/src/music/EditMusicAlbum.tsx
  40. 166 166
      pioneer/packages/joy-media/src/schemas/channel/Channel.ts
  41. 60 60
      pioneer/packages/joy-media/src/schemas/general/ContentLicense.ts
  42. 60 60
      pioneer/packages/joy-media/src/schemas/general/CurationStatus.ts
  43. 83 83
      pioneer/packages/joy-media/src/schemas/general/FeaturedContent.ts
  44. 60 60
      pioneer/packages/joy-media/src/schemas/general/Language.ts
  45. 60 60
      pioneer/packages/joy-media/src/schemas/general/MediaObject.ts
  46. 60 60
      pioneer/packages/joy-media/src/schemas/general/PublicationStatus.ts
  47. 308 308
      pioneer/packages/joy-media/src/schemas/music/MusicAlbum.ts
  48. 60 60
      pioneer/packages/joy-media/src/schemas/music/MusicGenre.ts
  49. 60 60
      pioneer/packages/joy-media/src/schemas/music/MusicMood.ts
  50. 60 60
      pioneer/packages/joy-media/src/schemas/music/MusicTheme.ts
  51. 292 292
      pioneer/packages/joy-media/src/schemas/music/MusicTrack.ts
  52. 1 1
      pioneer/packages/joy-media/src/schemas/video/Video.ts
  53. 60 60
      pioneer/packages/joy-media/src/schemas/video/VideoCategory.ts
  54. 2 2
      pioneer/packages/joy-media/src/stories/MusicAlbumTracks.stories.tsx
  55. 2 2
      pioneer/packages/joy-media/src/stories/MyChannels.stories.tsx
  56. 3 3
      pioneer/packages/joy-media/src/stories/Playback.stories.tsx
  57. 4 4
      pioneer/packages/joy-media/src/stories/UploadAudio.stories.tsx
  58. 4 4
      pioneer/packages/joy-media/src/stories/UploadVideo.stories.tsx
  59. 4 4
      pioneer/packages/joy-media/src/stories/data/ChannelSamples.ts
  60. 1 1
      pioneer/packages/joy-media/src/transport.mock.ts
  61. 4 4
      pioneer/packages/joy-media/src/transport.substrate.ts
  62. 2 2
      pioneer/packages/joy-media/src/transport.ts
  63. 2 2
      pioneer/packages/joy-media/src/upload/EditVideo.view.tsx
  64. 3 3
      pioneer/packages/joy-media/src/upload/UploadAudio.tsx
  65. 12 12
      pioneer/packages/joy-media/src/upload/UploadVideo.tsx
  66. 4 4
      pioneer/packages/joy-media/src/video/PlayVideo.tsx
  67. 2 2
      pioneer/packages/joy-media/src/video/PlayVideo.view.tsx
  68. 2 2
      pioneer/packages/joy-members/src/Details.tsx
  69. 1 1
      pioneer/packages/joy-members/src/DetailsByHandle.tsx
  70. 2 2
      pioneer/packages/joy-members/src/EditForm.tsx
  71. 1 1
      pioneer/packages/joy-members/src/List.tsx
  72. 2 2
      pioneer/packages/joy-members/src/MemberPreview.tsx
  73. 3 3
      pioneer/packages/joy-proposals/src/Proposal/Body.tsx
  74. 3 3
      pioneer/packages/joy-proposals/src/Proposal/ProposalDetails.tsx
  75. 1 1
      pioneer/packages/joy-proposals/src/Proposal/Votes.tsx
  76. 4 4
      pioneer/packages/joy-proposals/src/Proposal/VotingSection.tsx
  77. 1 1
      pioneer/packages/joy-proposals/src/forms/GenericProposalForm.tsx
  78. 1 1
      pioneer/packages/joy-proposals/src/forms/SetContentWorkingGroupLeadForm.tsx
  79. 1 1
      pioneer/packages/joy-proposals/src/forms/SetCouncilParamsForm.tsx
  80. 4 4
      pioneer/packages/joy-proposals/src/runtime/transport.substrate.ts
  81. 2 2
      pioneer/packages/joy-proposals/src/runtime/transport.ts
  82. 1 1
      pioneer/packages/joy-proposals/src/stories/data/ProposalDetails.mock.ts
  83. 1 1
      pioneer/packages/joy-proposals/src/utils.ts
  84. 1 1
      pioneer/packages/joy-roles/src/classifiers.spec.ts
  85. 1 1
      pioneer/packages/joy-roles/src/classifiers.ts
  86. 1 1
      pioneer/packages/joy-roles/src/elements.stories.tsx
  87. 3 3
      pioneer/packages/joy-roles/src/elements.tsx
  88. 1 1
      pioneer/packages/joy-roles/src/flows/apply.controller.tsx
  89. 1 1
      pioneer/packages/joy-roles/src/flows/apply.elements.stories.tsx
  90. 2 2
      pioneer/packages/joy-roles/src/flows/apply.tsx
  91. 1 1
      pioneer/packages/joy-roles/src/mocks.ts
  92. 5 5
      pioneer/packages/joy-roles/src/tabs/Admin.controller.tsx
  93. 1 1
      pioneer/packages/joy-roles/src/tabs/MyRoles.elements.stories.tsx
  94. 3 3
      pioneer/packages/joy-roles/src/tabs/MyRoles.tsx
  95. 1 1
      pioneer/packages/joy-roles/src/tabs/Opportunities.controller.tsx
  96. 1 1
      pioneer/packages/joy-roles/src/tabs/Opportunities.stories.tsx
  97. 3 3
      pioneer/packages/joy-roles/src/tabs/Opportunities.tsx
  98. 1 1
      pioneer/packages/joy-roles/src/tabs/Opportunity.controller.tsx
  99. 2 2
      pioneer/packages/joy-roles/src/tabs/WorkingGroup.stories.tsx
  100. 2 2
      pioneer/packages/joy-roles/src/tabs/WorkingGroup.tsx

+ 1 - 1
cli/src/Api.ts

@@ -1,5 +1,5 @@
 import BN from 'bn.js';
-import { registerJoystreamTypes } from '@joystream/types/lib';
+import { registerJoystreamTypes } from '@joystream/types/';
 import { ApiPromise, WsProvider } from '@polkadot/api';
 import { QueryableStorageMultiArg } from '@polkadot/api/types';
 import { formatBalance } from '@polkadot/util';

+ 1 - 1
cli/src/Types.ts

@@ -1,5 +1,5 @@
 import BN from 'bn.js';
-import { ElectionStage, Seat } from '@joystream/types/lib';
+import { ElectionStage, Seat } from '@joystream/types/';
 import { Option } from '@polkadot/types';
 import { BlockNumber, Balance } from '@polkadot/types/interfaces';
 import { DerivedBalances } from '@polkadot/api-derive/types';

+ 1 - 1
cli/src/commands/council/info.ts

@@ -1,4 +1,4 @@
-import { ElectionStage } from '@joystream/types/lib';
+import { ElectionStage } from '@joystream/types/';
 import { formatNumber, formatBalance } from '@polkadot/util';
 import { BlockNumber } from '@polkadot/types/interfaces';
 import { CouncilInfoObj, NameValueObj } from '../../Types';

+ 2 - 1
package.json

@@ -4,7 +4,8 @@
 	"license": "GPL-3.0-only",
 	"scripts": {
 		"test": "yarn && yarn workspaces run test",
-		"test-migration": "yarn && yarn workspaces run test-migration"
+		"test-migration": "yarn && yarn workspaces run test-migration",
+		"postinstall": "yarn workspace @joystream/types build"
 	},
 	"workspaces": [
 		"tests/network-tests",

+ 1 - 1
pioneer/packages/apps/src/SideBar/Item.tsx

@@ -20,7 +20,7 @@ import { Option } from '@polkadot/types';
 import translate from '../translate';
 
 import { queryToProp } from '@polkadot/joy-utils/index';
-import { ElectionStage } from '@joystream/types/lib/';
+import { ElectionStage } from '@joystream/types/';
 import { councilSidebarName } from '@polkadot/apps-routing/joy-election';
 
 interface Props extends I18nProps {

+ 1 - 1
pioneer/packages/apps/src/index.tsx

@@ -61,7 +61,7 @@ const wsEndpoint = _wsEndpoint.split('#')[0];
 console.log('WS endpoint=', wsEndpoint);
 
 try {
-  require('@joystream/types/lib/').registerJoystreamTypes();
+  require('@joystream/types/').registerJoystreamTypes();
 
   const types = store.get('types') || {};
   const names = Object.keys(types);

+ 10 - 4
pioneer/packages/apps/webpack.config.js

@@ -224,9 +224,15 @@ function createWebpack ({ alias = {}, context, name = 'index' }) {
 
 module.exports = createWebpack({
   context: __dirname,
-  alias: findPackages().reduce((alias, { dir, name }) => {
-    alias[name] = path.resolve(__dirname, `../${dir}/src`);
+  alias: {
+    ...(
+      findPackages().reduce((alias, { dir, name }) => {
+        alias[name] = path.resolve(__dirname, `../${dir}/src`);
 
-    return alias;
-  }, {})
+        return alias;
+      }, {})
+    ),
+    // TODO: Me might try to add it to "findPackages", but this will be a little more tricky
+    "@joystream/types": path.resolve(__dirname, '../../../types/src')
+  }
 });

+ 1 - 1
pioneer/packages/joy-election/src/Applicant.tsx

@@ -11,7 +11,7 @@ import CandidatePreview from "./CandidatePreview";
 
 import translate from './translate';
 import { calcTotalStake } from '@polkadot/joy-utils/index';
-import { Stake } from '@joystream/types/lib/';
+import { Stake } from '@joystream/types/';
 
 type Props = ApiProps & I18nProps & {
   index: number,

+ 1 - 1
pioneer/packages/joy-election/src/ApplyForm.tsx

@@ -10,7 +10,7 @@ import { Balance } from '@polkadot/types/interfaces';
 import translate from './translate';
 import TxButton from '@polkadot/joy-utils/TxButton';
 import InputStake from '@polkadot/joy-utils/InputStake';
-import { Stake } from '@joystream/types/lib/';
+import { Stake } from '@joystream/types/';
 import { calcTotalStake, ZERO } from '@polkadot/joy-utils/index';
 import { MyAddressProps, withOnlyMembers } from '@polkadot/joy-utils/MyAccount';
 

+ 1 - 1
pioneer/packages/joy-election/src/Council.tsx

@@ -8,7 +8,7 @@ import { formatBalance } from "@polkadot/util";
 import CouncilCandidate from './CandidatePreview';
 
 import { calcBackersStake } from "@polkadot/joy-utils/index";
-import { Seat } from "@joystream/types/lib/";
+import { Seat } from "@joystream/types/";
 import translate from "./translate";
 import Section from "@polkadot/joy-utils/Section";
 

+ 1 - 1
pioneer/packages/joy-election/src/Dashboard.tsx

@@ -11,7 +11,7 @@ import { formatNumber, formatBalance } from '@polkadot/util';
 
 import Section from '@polkadot/joy-utils/Section';
 import { queryToProp } from '@polkadot/joy-utils/index';
-import { ElectionStage, Seat } from '@joystream/types/lib/';
+import { ElectionStage, Seat } from '@joystream/types/';
 import translate from './translate';
 
 type Props = ApiProps & I18nProps & {

+ 1 - 1
pioneer/packages/joy-election/src/SealedVote.tsx

@@ -10,7 +10,7 @@ import { formatBalance } from '@polkadot/util';
 
 import translate from './translate';
 import { calcTotalStake } from '@polkadot/joy-utils/index';
-import { SealedVote } from '@joystream/types/lib/';
+import { SealedVote } from '@joystream/types/';
 import AddressMini from '@polkadot/react-components/AddressMiniJoy';
 import CandidatePreview from "./CandidatePreview";
 import { findVoteByHash } from './myVotesStore';

+ 1 - 1
pioneer/packages/joy-election/src/index.tsx

@@ -18,7 +18,7 @@ import Applicants from './Applicants';
 import Votes from './Votes';
 import Reveals from './Reveals';
 import { queryToProp } from '@polkadot/joy-utils/index';
-import { Seat } from '@joystream/types/lib/';
+import { Seat } from '@joystream/types/';
 
 // define out internal types
 type Props = AppProps & ApiProps & I18nProps & {

+ 1 - 1
pioneer/packages/joy-forum/src/CategoryList.tsx

@@ -7,7 +7,7 @@ import orderBy from 'lodash/orderBy';
 import BN from 'bn.js';
 
 import { Option, bool } from '@polkadot/types';
-import { CategoryId, Category, ThreadId, Thread } from '@joystream/types/lib/forum';
+import { CategoryId, Category, ThreadId, Thread } from '@joystream/types/forum';
 import { ViewThread } from './ViewThread';
 import { MutedSpan } from '@polkadot/joy-utils/MutedText';
 import { UrlHasIdProps, CategoryCrumbs, Pagination, ThreadsPerPage } from './utils';

+ 1 - 1
pioneer/packages/joy-forum/src/Context.tsx

@@ -2,7 +2,7 @@
 // NOTE: The purpose of this context is to immitate a Substrate storage for the forum until it's implemented as a substrate runtime module.
 
 import React, { useReducer, createContext, useContext } from 'react';
-import { Category, Thread, Reply, ModerationAction, BlockchainTimestamp } from '@joystream/types/lib/forum';
+import { Category, Thread, Reply, ModerationAction, BlockchainTimestamp } from '@joystream/types/forum';
 import { Option, Text } from '@polkadot/types';
 import { GenericAccountId } from '@polkadot/types';
 

+ 1 - 1
pioneer/packages/joy-forum/src/EditCategory.tsx

@@ -11,7 +11,7 @@ import { withMulti } from '@polkadot/react-api/with';
 import * as JoyForms from '@polkadot/joy-utils/forms';
 import { Text } from '@polkadot/types';
 import { Option } from '@polkadot/types/codec';
-import { CategoryId, Category } from '@joystream/types/lib/forum';
+import { CategoryId, Category } from '@joystream/types/forum';
 import Section from '@polkadot/joy-utils/Section';
 import { useMyAccount } from '@polkadot/joy-utils/MyAccountContext';
 import { UrlHasIdProps, CategoryCrumbs } from './utils';

+ 1 - 1
pioneer/packages/joy-forum/src/EditReply.tsx

@@ -10,7 +10,7 @@ import { withMulti } from '@polkadot/react-api/with';
 
 import * as JoyForms from '@polkadot/joy-utils/forms';
 import { Text } from '@polkadot/types';
-import { PostId, Post, ThreadId } from '@joystream/types/lib/forum';
+import { PostId, Post, ThreadId } from '@joystream/types/forum';
 import { withOnlyMembers } from '@polkadot/joy-utils/MyAccount';
 import Section from '@polkadot/joy-utils/Section';
 import { useMyAccount } from '@polkadot/joy-utils/MyAccountContext';

+ 1 - 1
pioneer/packages/joy-forum/src/EditThread.tsx

@@ -12,7 +12,7 @@ import { withMulti } from '@polkadot/react-api/with';
 
 import * as JoyForms from '@polkadot/joy-utils/forms';
 import { Text } from '@polkadot/types';
-import { ThreadId, Thread, CategoryId } from '@joystream/types/lib/forum';
+import { ThreadId, Thread, CategoryId } from '@joystream/types/forum';
 import { withOnlyMembers } from '@polkadot/joy-utils/MyAccount';
 import Section from '@polkadot/joy-utils/Section';
 import { useMyAccount } from '@polkadot/joy-utils/MyAccountContext';

+ 1 - 1
pioneer/packages/joy-forum/src/Moderate.tsx

@@ -9,7 +9,7 @@ import { withMulti } from '@polkadot/react-api/with';
 
 import * as JoyForms from '@polkadot/joy-utils/forms';
 import { Text } from '@polkadot/types';
-import { ReplyId, ThreadId } from '@joystream/types/lib/forum';
+import { ReplyId, ThreadId } from '@joystream/types/forum';
 import Section from '@polkadot/joy-utils/Section';
 import { withOnlyForumSudo } from './ForumSudo';
 import { ValidationProps, withPostModerationValidation } from './validation';

+ 1 - 1
pioneer/packages/joy-forum/src/ViewReply.tsx

@@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
 import ReactMarkdown from 'react-markdown';
 import { Segment, Button } from 'semantic-ui-react';
 
-import { Post, Category, Thread } from '@joystream/types/lib/forum';
+import { Post, Category, Thread } from '@joystream/types/forum';
 import { Moderate } from './Moderate';
 import { JoyWarn } from '@polkadot/joy-utils/JoyStatus';
 import { useMyAccount } from '@polkadot/joy-utils/MyAccountContext';

+ 1 - 1
pioneer/packages/joy-forum/src/ViewThread.tsx

@@ -5,7 +5,7 @@ import { Table, Button, Label } from 'semantic-ui-react';
 import { History } from 'history';
 import BN from 'bn.js';
 
-import { Category, Thread, ThreadId, Post, PostId } from '@joystream/types/lib/forum';
+import { Category, Thread, ThreadId, Post, PostId } from '@joystream/types/forum';
 import { Pagination, RepliesPerPage, CategoryCrumbs } from './utils';
 import { ViewReply } from './ViewReply';
 import { Moderate } from './Moderate';

+ 1 - 1
pioneer/packages/joy-forum/src/calls.tsx

@@ -7,7 +7,7 @@ import { Option } from '@polkadot/types/codec';
 import { AccountId } from '@polkadot/types/interfaces';
 import { u64 } from '@polkadot/types';
 import { Constructor } from '@polkadot/types/types';
-import { Category, Thread, Reply } from '@joystream/types/lib/forum';
+import { Category, Thread, Reply } from '@joystream/types/forum';
 import { useForum, ForumState } from './Context';
 
 type Call = string | [string, Options];

+ 1 - 1
pioneer/packages/joy-forum/src/utils.tsx

@@ -2,7 +2,7 @@ import React from 'react';
 import { Link } from 'react-router-dom';
 import { Pagination as SuiPagination } from 'semantic-ui-react';
 
-import { Category, CategoryId, Thread, ThreadId } from '@joystream/types/lib/forum';
+import { Category, CategoryId, Thread, ThreadId } from '@joystream/types/forum';
 import { withForumCalls } from './calls';
 import { withMulti } from '@polkadot/react-api';
 

+ 1 - 1
pioneer/packages/joy-forum/src/validation.tsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { withMulti } from '@polkadot/react-api/with';
-import { InputValidationLengthConstraint } from '@joystream/types/lib/forum';
+import { InputValidationLengthConstraint } from '@joystream/types/forum';
 import { withForumCalls } from './calls';
 
 export type ValidationProps = {

+ 1 - 1
pioneer/packages/joy-media/src/DiscoveryProvider.tsx

@@ -5,7 +5,7 @@ import { parse as parseUrl } from 'url';
 
 import { AccountId } from '@polkadot/types/interfaces';
 import { Vec } from '@polkadot/types';
-import { Url } from '@joystream/types/lib/discovery'
+import { Url } from '@joystream/types/discovery'
 import ApiContext from '@polkadot/react-api/ApiContext';
 import { ApiProps } from '@polkadot/react-api/types';
 import { JoyInfo } from '@polkadot/joy-utils/JoyStatus';

+ 1 - 1
pioneer/packages/joy-media/src/MediaView.tsx

@@ -1,6 +1,6 @@
 import React, { useState, useEffect } from 'react';
 import { MediaTransport } from './transport';
-import { MemberId } from '@joystream/types/lib/members';
+import { MemberId } from '@joystream/types/members';
 import { useMyMembership } from '@polkadot/joy-utils/MyMembershipContext';
 import { useTransportContext } from './TransportContext';
 import { withMembershipRequired } from '@polkadot/joy-utils/MyAccount';

+ 2 - 2
pioneer/packages/joy-media/src/Upload.tsx

@@ -15,12 +15,12 @@ import { AccountId } from '@polkadot/types/interfaces';
 
 import translate from './translate';
 import { fileNameWoExt } from './utils';
-import { ContentId, DataObject } from '@joystream/types/lib/media';
+import { ContentId, DataObject } from '@joystream/types/media';
 import { withMembershipRequired } from '@polkadot/joy-utils/MyAccount';
 import { DiscoveryProviderProps, withDiscoveryProvider } from './DiscoveryProvider';
 import TxButton from '@polkadot/joy-utils/TxButton';
 import IpfsHash from 'ipfs-only-hash';
-import { ChannelId } from '@joystream/types/lib/content-working-group';
+import { ChannelId } from '@joystream/types/content-working-group';
 import { EditVideoView } from './upload/EditVideo.view';
 import { JoyInfo } from '@polkadot/joy-utils/JoyStatus';
 import { IterableFile } from './IterableFile';

+ 1 - 1
pioneer/packages/joy-media/src/channels/ChannelHelpers.ts

@@ -1,6 +1,6 @@
 import { AccountId } from '@polkadot/types/interfaces';
 import { ChannelType } from "../schemas/channel/Channel";
-import { ChannelPublicationStatusAllValues } from "@joystream/types/lib/content-working-group";
+import { ChannelPublicationStatusAllValues } from "@joystream/types/content-working-group";
 
 export const ChannelPublicationStatusDropdownOptions =
   ChannelPublicationStatusAllValues

+ 1 - 1
pioneer/packages/joy-media/src/channels/ChannelsByOwner.tsx

@@ -4,7 +4,7 @@ import { Segment, Tab } from 'semantic-ui-react';
 import { AccountId } from '@polkadot/types/interfaces';
 import { ChannelEntity } from '../entities/ChannelEntity';
 import { YouHaveNoChannels } from './YouHaveNoChannels';
-import { ChannelContentTypeValue } from '@joystream/types/lib/content-working-group';
+import { ChannelContentTypeValue } from '@joystream/types/content-working-group';
 import { ChannelPreview } from './ChannelPreview';
 
 export type ChannelsByOwnerProps = {

+ 1 - 1
pioneer/packages/joy-media/src/channels/CurationPanel.tsx

@@ -3,7 +3,7 @@ import { ChannelEntity } from '../entities/ChannelEntity';
 import { isVerifiedChannel, isCensoredChannel } from './ChannelHelpers';
 import { useMyMembership } from '@polkadot/joy-utils/MyMembershipContext';
 import TxButton from '@polkadot/joy-utils/TxButton';
-import { ChannelCurationStatus } from '@joystream/types/lib/content-working-group';
+import { ChannelCurationStatus } from '@joystream/types/content-working-group';
 import { AccountId } from '@polkadot/types/interfaces';
 
 type ChannelCurationPanelProps = {

+ 1 - 1
pioneer/packages/joy-media/src/channels/EditChannel.tsx

@@ -9,7 +9,7 @@ import { onImageError } from '@polkadot/joy-utils/images';
 import { withMediaForm, MediaFormProps } from '../common/MediaForms';
 import { ChannelType, ChannelClass as Fields, buildChannelValidationSchema, ChannelFormValues, ChannelToFormValues, ChannelGenericProp } from '../schemas/channel/Channel';
 import { MediaDropdownOptions } from '../common/MediaDropdownOptions';
-import { ChannelId, ChannelContentType, ChannelPublicationStatus, OptionalText } from '@joystream/types/lib/content-working-group';
+import { ChannelId, ChannelContentType, ChannelPublicationStatus, OptionalText } from '@joystream/types/content-working-group';
 import { newOptionalText, findFirstParamOfSubstrateEvent } from '@polkadot/joy-utils/index';
 import { useMyMembership } from '@polkadot/joy-utils/MyMembershipContext';
 import { ChannelPublicationStatusDropdownOptions, isAccountAChannelOwner } from './ChannelHelpers';

+ 1 - 1
pioneer/packages/joy-media/src/channels/EditChannel.view.tsx

@@ -2,7 +2,7 @@ import React from 'react';
 import { RouteComponentProps } from 'react-router';
 import { MediaView } from '../MediaView';
 import { OuterProps, EditForm } from './EditChannel';
-import { ChannelId } from '@joystream/types/lib/content-working-group';
+import { ChannelId } from '@joystream/types/content-working-group';
 import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 type Props = OuterProps;

+ 1 - 1
pioneer/packages/joy-media/src/channels/ViewChannel.tsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { ChannelEntity } from '../entities/ChannelEntity';
-import { ChannelId } from '@joystream/types/lib/content-working-group';
+import { ChannelId } from '@joystream/types/content-working-group';
 import { VideoType } from '../schemas/video/Video';
 import { MusicAlbumPreviewProps } from '../music/MusicAlbumPreview';
 import { MusicTrackReaderPreviewProps } from '../music/MusicTrackReaderPreview';

+ 1 - 1
pioneer/packages/joy-media/src/channels/ViewChannel.view.tsx

@@ -2,7 +2,7 @@ import React from 'react';
 import { RouteComponentProps } from 'react-router';
 import { MediaView } from '../MediaView';
 import { ViewChannelProps, ViewChannel } from './ViewChannel';
-import { ChannelId } from '@joystream/types/lib/content-working-group';
+import { ChannelId } from '@joystream/types/content-working-group';
 import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 type Props = ViewChannelProps;

+ 2 - 2
pioneer/packages/joy-media/src/common/MediaDropdownOptions.tsx

@@ -1,7 +1,7 @@
 import ISO6391 from 'iso-639-1';
 import { DropdownItemProps } from 'semantic-ui-react';
 import { LanguageType } from '../schemas/general/Language';
-import { TextValueEntity } from '@joystream/types/lib/versioned-store/EntityCodec';
+import { TextValueEntity } from '@joystream/types/versioned-store/EntityCodec';
 import { InternalEntities } from '../transport';
 
 const buildOptions = (entities: TextValueEntity[]): DropdownItemProps[] =>
@@ -42,4 +42,4 @@ export class MediaDropdownOptions {
     publicationStatuses: [],
     videoCategories: [],
   });
-}
+}

+ 3 - 3
pioneer/packages/joy-media/src/common/MediaPlayerView.tsx

@@ -10,7 +10,7 @@ import { Option } from '@polkadot/types/codec';
 
 import translate from '../translate';
 import { DiscoveryProviderProps } from '../DiscoveryProvider';
-import { DataObject, ContentId } from '@joystream/types/lib/media';
+import { DataObject, ContentId } from '@joystream/types/media';
 import { VideoType } from '../schemas/video/Video';
 import { isAccountAChannelOwner } from '../channels/ChannelHelpers';
 import { ChannelEntity } from '../entities/ChannelEntity';
@@ -99,7 +99,7 @@ function Player(props: PlayerProps) {
 
 function InnerComponent(props: MediaPlayerViewProps) {
   const { video, resolvedAssetUrl: url } = props
-  
+
   const { dataObjectOpt, channel } = props;
   if (!dataObjectOpt || dataObjectOpt.isNone ) {
     return null;
@@ -113,7 +113,7 @@ function InnerComponent(props: MediaPlayerViewProps) {
 
   return (
     <div className='PlayBox'>
-      
+
       {/* Note that here we use a 'key' prop to force Player component to rerender */}
       <Player {...props} key={url} />
 

+ 2 - 2
pioneer/packages/joy-media/src/common/MediaPlayerWithResolver.tsx

@@ -10,7 +10,7 @@ import { AccountId } from '@polkadot/types/interfaces';
 
 import translate from '../translate';
 import { DiscoveryProviderProps, withDiscoveryProvider } from '../DiscoveryProvider';
-import { DataObjectStorageRelationshipId, DataObjectStorageRelationship } from '@joystream/types/lib/media';
+import { DataObjectStorageRelationshipId, DataObjectStorageRelationship } from '@joystream/types/media';
 import { Message } from 'semantic-ui-react';
 import { MediaPlayerView, RequiredMediaPlayerProps } from './MediaPlayerView';
 import { JoyInfo } from '@polkadot/joy-utils/JoyStatus';
@@ -102,7 +102,7 @@ function InnerComponent(props: Props) {
             // network connection error
             discoveryProvider.reportUnreachable(provider);
           }
-          
+
           // try next provider
           continue;
         }

+ 2 - 2
pioneer/packages/joy-media/src/common/TypeHelpers.ts

@@ -1,6 +1,6 @@
 import BN from 'bn.js'
-import { ChannelId } from "@joystream/types/lib/content-working-group"
-import { EntityId, ClassId } from "@joystream/types/lib/versioned-store"
+import { ChannelId } from "@joystream/types/content-working-group"
+import { EntityId, ClassId } from "@joystream/types/versioned-store"
 
 export type AnyChannelId = ChannelId | BN | number | string
 

+ 3 - 3
pioneer/packages/joy-media/src/music/EditMusicAlbum.tsx

@@ -8,7 +8,7 @@ import { onImageError } from '@polkadot/joy-utils/images';
 import { ReorderableTracks } from './ReorderableTracks';
 import { MusicAlbumValidationSchema, MusicAlbumType, MusicAlbumClass as Fields, MusicAlbumFormValues, MusicAlbumToFormValues } from '../schemas/music/MusicAlbum';
 import { withMediaForm, MediaFormProps, datePlaceholder } from '../common/MediaForms';
-import EntityId from '@joystream/types/lib/versioned-store/EntityId';
+import EntityId from '@joystream/types/versioned-store/EntityId';
 import { MediaDropdownOptions } from '../common/MediaDropdownOptions';
 import { MusicTrackReaderPreviewProps } from './MusicTrackReaderPreview';
 import { FormTabs } from '../common/FormTabs';
@@ -80,7 +80,7 @@ const InnerForm = (props: MediaFormProps<OuterProps, FormValues>) => {
   </Tab.Pane>
 
   const tracksTab = () => <Tab.Pane as='div'>
-    <ReorderableTracks 
+    <ReorderableTracks
       tracks={tracks}
       noTracksView={<em style={{ padding: '1rem 0', display: 'block' }}>This album has no tracks yet.</em>}
     />
@@ -145,7 +145,7 @@ const InnerForm = (props: MediaFormProps<OuterProps, FormValues>) => {
     </div>
 
     <Form className='ui form JoyForm EditMetaForm'>
-      
+
       {tabs}
 
       <LabelledField style={{ marginTop: '1rem' }} {...props}>

+ 166 - 166
pioneer/packages/joy-media/src/schemas/channel/Channel.ts

@@ -1,166 +1,166 @@
-
-import * as Yup from 'yup';
-import { BlockNumber, AccountId } from '@polkadot/types/interfaces';
-import { ChannelContentTypeValue, PrincipalId, Channel, ChannelId, ChannelPublicationStatusValue, ChannelCurationStatusValue } from '@joystream/types/lib/content-working-group';
-import { MemberId } from '@joystream/types/lib/members';
-import { ChannelValidationConstraints } from '@polkadot/joy-media/transport';
-import { ValidationConstraint } from '@polkadot/joy-utils/ValidationConstraint';
-
-function textValidation (constraint?: ValidationConstraint) {
-  if (!constraint) {
-    return Yup.string()
-  }
-  
-  const { min, max } = constraint
-  return Yup.string()
-    .min(min, `Text is too short. Minimum length is ${min} chars.`)
-    .max(max, `Text is too long. Maximum length is ${max} chars.`)
-}
-export const buildChannelValidationSchema = (constraints?: ChannelValidationConstraints) =>
-  Yup.object().shape({
-    handle: textValidation(constraints?.handle).required('This field is required'),
-    title: textValidation(constraints?.title),
-    description: textValidation(constraints?.description),
-    avatar: textValidation(constraints?.avatar),
-    banner: textValidation(constraints?.banner)
-  });
-
-export type ChannelFormValues = {
-  content: ChannelContentTypeValue
-  handle: string
-  title: string
-  description: string
-  avatar: string
-  banner: string
-  publicationStatus: ChannelPublicationStatusValue
-};
-
-export type ChannelType = {
-  id: number
-  verified: boolean
-  handle: string
-  title?: string
-  description?: string
-  avatar?: string
-  banner?: string
-  content: ChannelContentTypeValue
-  owner: MemberId
-  roleAccount: AccountId
-  publicationStatus: ChannelPublicationStatusValue
-  curationStatus: ChannelCurationStatusValue
-  created: BlockNumber
-  principalId: PrincipalId
-};
-
-export class ChannelCodec {
-  static fromSubstrate(id: ChannelId, sub: Channel): ChannelType {
-    return {
-      id: id.toNumber(),
-      verified: sub.getBoolean('verified'),
-      handle: sub.getString('handle'),
-      title: sub.getOptionalString('title'),
-      description: sub.getOptionalString('description'),
-      avatar: sub.getOptionalString('avatar'),
-      banner: sub.getOptionalString('banner'),
-      content: sub.getEnumAsString<ChannelContentTypeValue>('content'),
-      owner: sub.getField('owner'),
-      roleAccount: sub.getField('role_account'),
-      publicationStatus: sub.getEnumAsString<ChannelPublicationStatusValue>('publication_status'),
-      curationStatus: sub.getEnumAsString<ChannelCurationStatusValue>('curation_status'),
-      created: sub.getField('created'),
-      principalId: sub.getField('principal_id')
-    }
-  }
-}
-
-export function ChannelToFormValues(entity?: ChannelType): ChannelFormValues {
-  return {
-    content: entity && entity.content || 'Video',
-    handle: entity && entity.handle || '',
-    title: entity && entity.title || '',
-    description: entity && entity.description || '',
-    avatar: entity && entity.avatar || '',
-    banner: entity && entity.banner || '',
-    publicationStatus: entity && entity.publicationStatus || 'Public'
-  }
-}
-
-export type ChannelPropId =
-  'content' |
-  'handle' |
-  'title' |
-  'description' |
-  'avatar' |
-  'banner' |
-  'publicationStatus'
-  ;
-
-export type ChannelGenericProp = {
-  id: ChannelPropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type ChannelClassType = {
-  [id in ChannelPropId]: ChannelGenericProp
-};
-
-export const ChannelClass: ChannelClassType = {
-  content: {
-    "id": "content",
-    "name": "Content",
-    "description": "The type of channel.",
-    "type": "Text",
-    "required": true,
-    "maxTextLength": 100
-  },
-  handle: {
-    "id": "handle",
-    "name": "Handle",
-    "description": "Unique URL handle of channel.",
-    "type": "Text",
-    "required": true,
-    "maxTextLength": 40
-  },
-  title: {
-    "id": "title",
-    "name": "Title",
-    "description": "Human readable title of channel.",
-    "type": "Text",
-    "maxTextLength": 100
-  },
-  description: {
-    "id": "description",
-    "name": "Description",
-    "description": "Human readable description of channel purpose and scope.",
-    "type": "Text",
-    "maxTextLength": 4000
-  },
-  avatar: {
-    "id": "avatar",
-    "name": "Avatar",
-    "description": "URL to avatar (logo) iamge: NOTE: Should be an https link to a square image.",
-    "type": "Text",
-    "maxTextLength": 1000
-  },
-  banner: {
-    "id": "banner",
-    "name": "Banner",
-    "description": "URL to banner image: NOTE: Should be an https link to a rectangular image, between 1400x1400 and 3000x3000 pixels, in JPEG or PNG format.",
-    "type": "Text",
-    "maxTextLength": 1000
-  },
-  publicationStatus: {
-    "id": "publicationStatus",
-    "name": "Publication Status",
-    "description": "The publication status of the channel.",
-    "required": true,
-    "type": "Internal",
-    "classId": "Publication Status"
-  }
-};
+
+import * as Yup from 'yup';
+import { BlockNumber, AccountId } from '@polkadot/types/interfaces';
+import { ChannelContentTypeValue, PrincipalId, Channel, ChannelId, ChannelPublicationStatusValue, ChannelCurationStatusValue } from '@joystream/types/content-working-group';
+import { MemberId } from '@joystream/types/members';
+import { ChannelValidationConstraints } from '@polkadot/joy-media/transport';
+import { ValidationConstraint } from '@polkadot/joy-utils/ValidationConstraint';
+
+function textValidation (constraint?: ValidationConstraint) {
+  if (!constraint) {
+    return Yup.string()
+  }
+
+  const { min, max } = constraint
+  return Yup.string()
+    .min(min, `Text is too short. Minimum length is ${min} chars.`)
+    .max(max, `Text is too long. Maximum length is ${max} chars.`)
+}
+export const buildChannelValidationSchema = (constraints?: ChannelValidationConstraints) =>
+  Yup.object().shape({
+    handle: textValidation(constraints?.handle).required('This field is required'),
+    title: textValidation(constraints?.title),
+    description: textValidation(constraints?.description),
+    avatar: textValidation(constraints?.avatar),
+    banner: textValidation(constraints?.banner)
+  });
+
+export type ChannelFormValues = {
+  content: ChannelContentTypeValue
+  handle: string
+  title: string
+  description: string
+  avatar: string
+  banner: string
+  publicationStatus: ChannelPublicationStatusValue
+};
+
+export type ChannelType = {
+  id: number
+  verified: boolean
+  handle: string
+  title?: string
+  description?: string
+  avatar?: string
+  banner?: string
+  content: ChannelContentTypeValue
+  owner: MemberId
+  roleAccount: AccountId
+  publicationStatus: ChannelPublicationStatusValue
+  curationStatus: ChannelCurationStatusValue
+  created: BlockNumber
+  principalId: PrincipalId
+};
+
+export class ChannelCodec {
+  static fromSubstrate(id: ChannelId, sub: Channel): ChannelType {
+    return {
+      id: id.toNumber(),
+      verified: sub.getBoolean('verified'),
+      handle: sub.getString('handle'),
+      title: sub.getOptionalString('title'),
+      description: sub.getOptionalString('description'),
+      avatar: sub.getOptionalString('avatar'),
+      banner: sub.getOptionalString('banner'),
+      content: sub.getEnumAsString<ChannelContentTypeValue>('content'),
+      owner: sub.getField('owner'),
+      roleAccount: sub.getField('role_account'),
+      publicationStatus: sub.getEnumAsString<ChannelPublicationStatusValue>('publication_status'),
+      curationStatus: sub.getEnumAsString<ChannelCurationStatusValue>('curation_status'),
+      created: sub.getField('created'),
+      principalId: sub.getField('principal_id')
+    }
+  }
+}
+
+export function ChannelToFormValues(entity?: ChannelType): ChannelFormValues {
+  return {
+    content: entity && entity.content || 'Video',
+    handle: entity && entity.handle || '',
+    title: entity && entity.title || '',
+    description: entity && entity.description || '',
+    avatar: entity && entity.avatar || '',
+    banner: entity && entity.banner || '',
+    publicationStatus: entity && entity.publicationStatus || 'Public'
+  }
+}
+
+export type ChannelPropId =
+  'content' |
+  'handle' |
+  'title' |
+  'description' |
+  'avatar' |
+  'banner' |
+  'publicationStatus'
+  ;
+
+export type ChannelGenericProp = {
+  id: ChannelPropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type ChannelClassType = {
+  [id in ChannelPropId]: ChannelGenericProp
+};
+
+export const ChannelClass: ChannelClassType = {
+  content: {
+    "id": "content",
+    "name": "Content",
+    "description": "The type of channel.",
+    "type": "Text",
+    "required": true,
+    "maxTextLength": 100
+  },
+  handle: {
+    "id": "handle",
+    "name": "Handle",
+    "description": "Unique URL handle of channel.",
+    "type": "Text",
+    "required": true,
+    "maxTextLength": 40
+  },
+  title: {
+    "id": "title",
+    "name": "Title",
+    "description": "Human readable title of channel.",
+    "type": "Text",
+    "maxTextLength": 100
+  },
+  description: {
+    "id": "description",
+    "name": "Description",
+    "description": "Human readable description of channel purpose and scope.",
+    "type": "Text",
+    "maxTextLength": 4000
+  },
+  avatar: {
+    "id": "avatar",
+    "name": "Avatar",
+    "description": "URL to avatar (logo) iamge: NOTE: Should be an https link to a square image.",
+    "type": "Text",
+    "maxTextLength": 1000
+  },
+  banner: {
+    "id": "banner",
+    "name": "Banner",
+    "description": "URL to banner image: NOTE: Should be an https link to a rectangular image, between 1400x1400 and 3000x3000 pixels, in JPEG or PNG format.",
+    "type": "Text",
+    "maxTextLength": 1000
+  },
+  publicationStatus: {
+    "id": "publicationStatus",
+    "name": "Publication Status",
+    "description": "The publication status of the channel.",
+    "required": true,
+    "type": "Internal",
+    "classId": "Publication Status"
+  }
+};

+ 60 - 60
pioneer/packages/joy-media/src/schemas/general/ContentLicense.ts

@@ -1,60 +1,60 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-
-export const ContentLicenseValidationSchema = Yup.object().shape({
-  value: Yup.string()
-    .required('This field is required')
-    .max(200, 'Text is too long. Maximum length is 200 chars.')
-});
-
-export type ContentLicenseFormValues = {
-  value: string
-};
-
-export type ContentLicenseType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  value: string
-};
-
-export class ContentLicenseCodec extends EntityCodec<ContentLicenseType> { }
-
-export function ContentLicenseToFormValues(entity?: ContentLicenseType): ContentLicenseFormValues {
-  return {
-    value: entity && entity.value || ''
-  }
-}
-
-export type ContentLicensePropId =
-  'value'
-  ;
-
-export type ContentLicenseGenericProp = {
-  id: ContentLicensePropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type ContentLicenseClassType = {
-  [id in ContentLicensePropId]: ContentLicenseGenericProp
-};
-
-export const ContentLicenseClass: ContentLicenseClassType = {
-  value: {
-    "id": "value",
-    "name": "Value",
-    "description": "The license of which the content is originally published under.",
-    "type": "Text",
-    "required": true,
-    "maxTextLength": 200
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+
+export const ContentLicenseValidationSchema = Yup.object().shape({
+  value: Yup.string()
+    .required('This field is required')
+    .max(200, 'Text is too long. Maximum length is 200 chars.')
+});
+
+export type ContentLicenseFormValues = {
+  value: string
+};
+
+export type ContentLicenseType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  value: string
+};
+
+export class ContentLicenseCodec extends EntityCodec<ContentLicenseType> { }
+
+export function ContentLicenseToFormValues(entity?: ContentLicenseType): ContentLicenseFormValues {
+  return {
+    value: entity && entity.value || ''
+  }
+}
+
+export type ContentLicensePropId =
+  'value'
+  ;
+
+export type ContentLicenseGenericProp = {
+  id: ContentLicensePropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type ContentLicenseClassType = {
+  [id in ContentLicensePropId]: ContentLicenseGenericProp
+};
+
+export const ContentLicenseClass: ContentLicenseClassType = {
+  value: {
+    "id": "value",
+    "name": "Value",
+    "description": "The license of which the content is originally published under.",
+    "type": "Text",
+    "required": true,
+    "maxTextLength": 200
+  }
+};

+ 60 - 60
pioneer/packages/joy-media/src/schemas/general/CurationStatus.ts

@@ -1,60 +1,60 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-
-export const CurationStatusValidationSchema = Yup.object().shape({
-  value: Yup.string()
-    .required('This field is required')
-    .max(255, 'Text is too long. Maximum length is 255 chars.')
-});
-
-export type CurationStatusFormValues = {
-  value: string
-};
-
-export type CurationStatusType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  value: string
-};
-
-export class CurationStatusCodec extends EntityCodec<CurationStatusType> { }
-
-export function CurationStatusToFormValues(entity?: CurationStatusType): CurationStatusFormValues {
-  return {
-    value: entity && entity.value || ''
-  }
-}
-
-export type CurationStatusPropId =
-  'value'
-  ;
-
-export type CurationStatusGenericProp = {
-  id: CurationStatusPropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type CurationStatusClassType = {
-  [id in CurationStatusPropId]: CurationStatusGenericProp
-};
-
-export const CurationStatusClass: CurationStatusClassType = {
-  value: {
-    "id": "value",
-    "name": "Value",
-    "description": "The curator publication status of the content in the content directory.",
-    "required": true,
-    "type": "Text",
-    "maxTextLength": 255
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+
+export const CurationStatusValidationSchema = Yup.object().shape({
+  value: Yup.string()
+    .required('This field is required')
+    .max(255, 'Text is too long. Maximum length is 255 chars.')
+});
+
+export type CurationStatusFormValues = {
+  value: string
+};
+
+export type CurationStatusType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  value: string
+};
+
+export class CurationStatusCodec extends EntityCodec<CurationStatusType> { }
+
+export function CurationStatusToFormValues(entity?: CurationStatusType): CurationStatusFormValues {
+  return {
+    value: entity && entity.value || ''
+  }
+}
+
+export type CurationStatusPropId =
+  'value'
+  ;
+
+export type CurationStatusGenericProp = {
+  id: CurationStatusPropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type CurationStatusClassType = {
+  [id in CurationStatusPropId]: CurationStatusGenericProp
+};
+
+export const CurationStatusClass: CurationStatusClassType = {
+  value: {
+    "id": "value",
+    "name": "Value",
+    "description": "The curator publication status of the content in the content directory.",
+    "required": true,
+    "type": "Text",
+    "maxTextLength": 255
+  }
+};

+ 83 - 83
pioneer/packages/joy-media/src/schemas/general/FeaturedContent.ts

@@ -1,83 +1,83 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-import { VideoType } from '../video/Video';
-import { MusicAlbumType } from '../music/MusicAlbum';
-
-export const FeaturedContentValidationSchema = Yup.object().shape({
-  // No validation rules.
-});
-
-export type FeaturedContentFormValues = {
-  topVideo: number
-  featuredVideos: number[]
-  featuredAlbums: number[]
-};
-
-export type FeaturedContentType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  topVideo?: VideoType
-  featuredVideos?: VideoType[]
-  featuredAlbums?: MusicAlbumType[]
-};
-
-export class FeaturedContentCodec extends EntityCodec<FeaturedContentType> { }
-
-export function FeaturedContentToFormValues(entity?: FeaturedContentType): FeaturedContentFormValues {
-  return {
-    topVideo: entity && entity.topVideo?.id || 0,
-    featuredVideos: entity && entity.featuredVideos?.map(x => x.id) || [],
-    featuredAlbums: entity && entity.featuredAlbums?.map(x => x.id) || []
-  }
-}
-
-export type FeaturedContentPropId =
-  'topVideo' |
-  'featuredVideos' |
-  'featuredAlbums'
-  ;
-
-export type FeaturedContentGenericProp = {
-  id: FeaturedContentPropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type FeaturedContentClassType = {
-  [id in FeaturedContentPropId]: FeaturedContentGenericProp
-};
-
-export const FeaturedContentClass: FeaturedContentClassType = {
-  topVideo: {
-    "id": "topVideo",
-    "name": "Top Video",
-    "description": "The video that has the most prominent position(s) on the platform.",
-    "type": "Internal",
-    "classId": "Video"
-  },
-  featuredVideos: {
-    "id": "featuredVideos",
-    "name": "Featured Videos",
-    "description": "Videos featured in the Video tab.",
-    "type": "InternalVec",
-    "maxItems": 12,
-    "classId": "Video"
-  },
-  featuredAlbums: {
-    "id": "featuredAlbums",
-    "name": "Featured Albums",
-    "description": "Music albums featured in the Music tab.",
-    "type": "InternalVec",
-    "maxItems": 12,
-    "classId": "Music Album"
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+import { VideoType } from '../video/Video';
+import { MusicAlbumType } from '../music/MusicAlbum';
+
+export const FeaturedContentValidationSchema = Yup.object().shape({
+  // No validation rules.
+});
+
+export type FeaturedContentFormValues = {
+  topVideo: number
+  featuredVideos: number[]
+  featuredAlbums: number[]
+};
+
+export type FeaturedContentType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  topVideo?: VideoType
+  featuredVideos?: VideoType[]
+  featuredAlbums?: MusicAlbumType[]
+};
+
+export class FeaturedContentCodec extends EntityCodec<FeaturedContentType> { }
+
+export function FeaturedContentToFormValues(entity?: FeaturedContentType): FeaturedContentFormValues {
+  return {
+    topVideo: entity && entity.topVideo?.id || 0,
+    featuredVideos: entity && entity.featuredVideos?.map(x => x.id) || [],
+    featuredAlbums: entity && entity.featuredAlbums?.map(x => x.id) || []
+  }
+}
+
+export type FeaturedContentPropId =
+  'topVideo' |
+  'featuredVideos' |
+  'featuredAlbums'
+  ;
+
+export type FeaturedContentGenericProp = {
+  id: FeaturedContentPropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type FeaturedContentClassType = {
+  [id in FeaturedContentPropId]: FeaturedContentGenericProp
+};
+
+export const FeaturedContentClass: FeaturedContentClassType = {
+  topVideo: {
+    "id": "topVideo",
+    "name": "Top Video",
+    "description": "The video that has the most prominent position(s) on the platform.",
+    "type": "Internal",
+    "classId": "Video"
+  },
+  featuredVideos: {
+    "id": "featuredVideos",
+    "name": "Featured Videos",
+    "description": "Videos featured in the Video tab.",
+    "type": "InternalVec",
+    "maxItems": 12,
+    "classId": "Video"
+  },
+  featuredAlbums: {
+    "id": "featuredAlbums",
+    "name": "Featured Albums",
+    "description": "Music albums featured in the Music tab.",
+    "type": "InternalVec",
+    "maxItems": 12,
+    "classId": "Music Album"
+  }
+};

+ 60 - 60
pioneer/packages/joy-media/src/schemas/general/Language.ts

@@ -1,60 +1,60 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-
-export const LanguageValidationSchema = Yup.object().shape({
-  value: Yup.string()
-    .required('This field is required')
-    .max(2, 'Text is too long. Maximum length is 2 chars.')
-});
-
-export type LanguageFormValues = {
-  value: string
-};
-
-export type LanguageType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  value: string
-};
-
-export class LanguageCodec extends EntityCodec<LanguageType> { }
-
-export function LanguageToFormValues(entity?: LanguageType): LanguageFormValues {
-  return {
-    value: entity && entity.value || ''
-  }
-}
-
-export type LanguagePropId =
-  'value'
-  ;
-
-export type LanguageGenericProp = {
-  id: LanguagePropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type LanguageClassType = {
-  [id in LanguagePropId]: LanguageGenericProp
-};
-
-export const LanguageClass: LanguageClassType = {
-  value: {
-    "id": "value",
-    "name": "Value",
-    "description": "Language code following the ISO 639-1 two letter standard.",
-    "type": "Text",
-    "required": true,
-    "maxTextLength": 2
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+
+export const LanguageValidationSchema = Yup.object().shape({
+  value: Yup.string()
+    .required('This field is required')
+    .max(2, 'Text is too long. Maximum length is 2 chars.')
+});
+
+export type LanguageFormValues = {
+  value: string
+};
+
+export type LanguageType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  value: string
+};
+
+export class LanguageCodec extends EntityCodec<LanguageType> { }
+
+export function LanguageToFormValues(entity?: LanguageType): LanguageFormValues {
+  return {
+    value: entity && entity.value || ''
+  }
+}
+
+export type LanguagePropId =
+  'value'
+  ;
+
+export type LanguageGenericProp = {
+  id: LanguagePropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type LanguageClassType = {
+  [id in LanguagePropId]: LanguageGenericProp
+};
+
+export const LanguageClass: LanguageClassType = {
+  value: {
+    "id": "value",
+    "name": "Value",
+    "description": "Language code following the ISO 639-1 two letter standard.",
+    "type": "Text",
+    "required": true,
+    "maxTextLength": 2
+  }
+};

+ 60 - 60
pioneer/packages/joy-media/src/schemas/general/MediaObject.ts

@@ -1,60 +1,60 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-
-export const MediaObjectValidationSchema = Yup.object().shape({
-  value: Yup.string()
-    .required('This field is required')
-    .max(66, 'Text is too long. Maximum length is 66 chars.')
-});
-
-export type MediaObjectFormValues = {
-  value: string
-};
-
-export type MediaObjectType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  value: string
-};
-
-export class MediaObjectCodec extends EntityCodec<MediaObjectType> { }
-
-export function MediaObjectToFormValues(entity?: MediaObjectType): MediaObjectFormValues {
-  return {
-    value: entity && entity.value || ''
-  }
-}
-
-export type MediaObjectPropId =
-  'value'
-  ;
-
-export type MediaObjectGenericProp = {
-  id: MediaObjectPropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type MediaObjectClassType = {
-  [id in MediaObjectPropId]: MediaObjectGenericProp
-};
-
-export const MediaObjectClass: MediaObjectClassType = {
-  value: {
-    "id": "value",
-    "name": "Value",
-    "description": "Content id of object in the data directory.",
-    "type": "Text",
-    "required": true,
-    "maxTextLength": 48
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+
+export const MediaObjectValidationSchema = Yup.object().shape({
+  value: Yup.string()
+    .required('This field is required')
+    .max(66, 'Text is too long. Maximum length is 66 chars.')
+});
+
+export type MediaObjectFormValues = {
+  value: string
+};
+
+export type MediaObjectType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  value: string
+};
+
+export class MediaObjectCodec extends EntityCodec<MediaObjectType> { }
+
+export function MediaObjectToFormValues(entity?: MediaObjectType): MediaObjectFormValues {
+  return {
+    value: entity && entity.value || ''
+  }
+}
+
+export type MediaObjectPropId =
+  'value'
+  ;
+
+export type MediaObjectGenericProp = {
+  id: MediaObjectPropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type MediaObjectClassType = {
+  [id in MediaObjectPropId]: MediaObjectGenericProp
+};
+
+export const MediaObjectClass: MediaObjectClassType = {
+  value: {
+    "id": "value",
+    "name": "Value",
+    "description": "Content id of object in the data directory.",
+    "type": "Text",
+    "required": true,
+    "maxTextLength": 48
+  }
+};

+ 60 - 60
pioneer/packages/joy-media/src/schemas/general/PublicationStatus.ts

@@ -1,60 +1,60 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-
-export const PublicationStatusValidationSchema = Yup.object().shape({
-  value: Yup.string()
-    .required('This field is required')
-    .max(50, 'Text is too long. Maximum length is 50 chars.')
-});
-
-export type PublicationStatusFormValues = {
-  value: string
-};
-
-export type PublicationStatusType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  value: string
-};
-
-export class PublicationStatusCodec extends EntityCodec<PublicationStatusType> { }
-
-export function PublicationStatusToFormValues(entity?: PublicationStatusType): PublicationStatusFormValues {
-  return {
-    value: entity && entity.value || ''
-  }
-}
-
-export type PublicationStatusPropId =
-  'value'
-  ;
-
-export type PublicationStatusGenericProp = {
-  id: PublicationStatusPropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type PublicationStatusClassType = {
-  [id in PublicationStatusPropId]: PublicationStatusGenericProp
-};
-
-export const PublicationStatusClass: PublicationStatusClassType = {
-  value: {
-    "id": "value",
-    "name": "Value",
-    "description": "The publication status of the content in the content directory.",
-    "required": true,
-    "type": "Text",
-    "maxTextLength": 50
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+
+export const PublicationStatusValidationSchema = Yup.object().shape({
+  value: Yup.string()
+    .required('This field is required')
+    .max(50, 'Text is too long. Maximum length is 50 chars.')
+});
+
+export type PublicationStatusFormValues = {
+  value: string
+};
+
+export type PublicationStatusType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  value: string
+};
+
+export class PublicationStatusCodec extends EntityCodec<PublicationStatusType> { }
+
+export function PublicationStatusToFormValues(entity?: PublicationStatusType): PublicationStatusFormValues {
+  return {
+    value: entity && entity.value || ''
+  }
+}
+
+export type PublicationStatusPropId =
+  'value'
+  ;
+
+export type PublicationStatusGenericProp = {
+  id: PublicationStatusPropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type PublicationStatusClassType = {
+  [id in PublicationStatusPropId]: PublicationStatusGenericProp
+};
+
+export const PublicationStatusClass: PublicationStatusClassType = {
+  value: {
+    "id": "value",
+    "name": "Value",
+    "description": "The publication status of the content in the content directory.",
+    "required": true,
+    "type": "Text",
+    "maxTextLength": 50
+  }
+};

+ 308 - 308
pioneer/packages/joy-media/src/schemas/music/MusicAlbum.ts

@@ -1,308 +1,308 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-import moment from 'moment';
-import { MusicGenreType } from './MusicGenre';
-import { MusicMoodType } from './MusicMood';
-import { MusicThemeType } from './MusicTheme';
-import { MusicTrackType } from './MusicTrack';
-import { LanguageType } from '../general/Language';
-import { PublicationStatusType } from '../general/PublicationStatus';
-import { CurationStatusType } from '../general/CurationStatus';
-import { ContentLicenseType } from '../general/ContentLicense';
-import { ChannelEntity } from '@polkadot/joy-media/entities/ChannelEntity';
-
-export const MusicAlbumValidationSchema = Yup.object().shape({
-  title: Yup.string()
-    .required('This field is required')
-    .max(255, 'Text is too long. Maximum length is 255 chars.'),
-  artist: Yup.string()
-    .required('This field is required')
-    .max(255, 'Text is too long. Maximum length is 255 chars.'),
-  thumbnail: Yup.string()
-    .required('This field is required')
-    .max(255, 'Text is too long. Maximum length is 255 chars.'),
-  description: Yup.string()
-    .required('This field is required')
-    .max(4000, 'Text is too long. Maximum length is 4000 chars.'),
-  firstReleased: Yup.string()
-    .required('This field is required')
-    .test('valid-date', 'Invalid date. Valid date formats are yyyy-mm-dd or yyyy-mm or yyyy.', (val?: any) => {
-      return moment(val as any).isValid();
-    }),
-  lyrics: Yup.string()
-    .max(255, 'Text is too long. Maximum length is 255 chars.'),
-  composerOrSongwriter: Yup.string()
-    .max(255, 'Text is too long. Maximum length is 255 chars.'),
-  attribution: Yup.string()
-    .max(255, 'Text is too long. Maximum length is 255 chars.')
-});
-
-export type MusicAlbumFormValues = {
-  title: string
-  artist: string
-  thumbnail: string
-  description: string
-  firstReleased: string
-  genre: number
-  mood: number
-  theme: number
-  tracks: number[]
-  language: number
-  links: string[]
-  lyrics: string
-  composerOrSongwriter: string
-  reviews: string[]
-  publicationStatus: number
-  curationStatus: number
-  explicit: boolean
-  license: number
-  attribution: string
-  channelId: number
-};
-
-export type MusicAlbumType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  title: string
-  artist: string
-  thumbnail: string
-  description: string
-  firstReleased: number
-  genre?: MusicGenreType
-  mood?: MusicMoodType
-  theme?: MusicThemeType
-  tracks?: MusicTrackType[]
-  language?: LanguageType
-  links?: string[]
-  lyrics?: string
-  composerOrSongwriter?: string
-  reviews?: string[]
-  publicationStatus: PublicationStatusType
-  curationStatus?: CurationStatusType
-  explicit: boolean
-  license: ContentLicenseType
-  attribution?: string
-  channelId?: number
-  channel?: ChannelEntity
-};
-
-export class MusicAlbumCodec extends EntityCodec<MusicAlbumType> { }
-
-export function MusicAlbumToFormValues(entity?: MusicAlbumType): MusicAlbumFormValues {
-  return {
-    title: entity && entity.title || '',
-    artist: entity && entity.artist || '',
-    thumbnail: entity && entity.thumbnail || '',
-    description: entity && entity.description || '',
-    firstReleased: entity && moment(entity.firstReleased * 1000).format('YYYY-MM-DD') || '',
-    genre: entity && entity.genre?.id || 0,
-    mood: entity && entity.mood?.id || 0,
-    theme: entity && entity.theme?.id || 0,
-    tracks: entity && entity.tracks?.map(x => x.id) || [],
-    language: entity && entity.language?.id || 0,
-    links: entity && entity.links || [],
-    lyrics: entity && entity.lyrics || '',
-    composerOrSongwriter: entity && entity.composerOrSongwriter || '',
-    reviews: entity && entity.reviews || [],
-    publicationStatus: entity && entity.publicationStatus.id || 0,
-    curationStatus: entity && entity.curationStatus?.id || 0,
-    explicit: entity && entity.explicit || false,
-    license: entity && entity.license?.id || 0,
-    attribution: entity && entity.attribution || '',
-    channelId: entity && entity.channelId || 0
-  }
-}
-
-export type MusicAlbumPropId =
-  'title' |
-  'artist' |
-  'thumbnail' |
-  'description' |
-  'firstReleased' |
-  'genre' |
-  'mood' |
-  'theme' |
-  'tracks' |
-  'language' |
-  'links' |
-  'lyrics' |
-  'composerOrSongwriter' |
-  'reviews' |
-  'publicationStatus' |
-  'curationStatus' |
-  'explicit' |
-  'license' |
-  'attribution' |
-  'channelId'
-  ;
-
-export type MusicAlbumGenericProp = {
-  id: MusicAlbumPropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type MusicAlbumClassType = {
-  [id in MusicAlbumPropId]: MusicAlbumGenericProp
-};
-
-export const MusicAlbumClass: MusicAlbumClassType = {
-  title: {
-    "id": "title",
-    "name": "Title",
-    "description": "The title of the album",
-    "type": "Text",
-    "required": true,
-    "maxTextLength": 255
-  },
-  artist: {
-    "id": "artist",
-    "name": "Artist",
-    "description": "The artist, composer, band or group that published the album.",
-    "type": "Text",
-    "required": true,
-    "maxTextLength": 255
-  },
-  thumbnail: {
-    "id": "thumbnail",
-    "name": "Thumbnail",
-    "description": "URL to album cover art thumbnail: NOTE: Should be an https link to a square image, between 1400x1400 and 3000x3000 pixels, in JPEG or PNG format.",
-    "required": true,
-    "type": "Text",
-    "maxTextLength": 255
-  },
-  description: {
-    "id": "description",
-    "name": "Description",
-    "description": "Information about the album and artist.",
-    "required": true,
-    "type": "Text",
-    "maxTextLength": 4000
-  },
-  firstReleased: {
-    "id": "firstReleased",
-    "name": "First Released",
-    "description": "When the album was first released",
-    "required": true,
-    "type": "Int64"
-  },
-  genre: {
-    "id": "genre",
-    "name": "Genre",
-    "description": "The genre of the album.",
-    "type": "Internal",
-    "classId": "Music Genre"
-  },
-  mood: {
-    "id": "mood",
-    "name": "Mood",
-    "description": "The mood of the album.",
-    "type": "Internal",
-    "classId": "Music Mood"
-  },
-  theme: {
-    "id": "theme",
-    "name": "Theme",
-    "description": "The theme of the album.",
-    "type": "Internal",
-    "classId": "Music Theme"
-  },
-  tracks: {
-    "id": "tracks",
-    "name": "Tracks",
-    "description": "The tracks of the album.",
-    "type": "InternalVec",
-    "maxItems": 100,
-    "classId": "Music Track"
-  },
-  language: {
-    "id": "language",
-    "name": "Language",
-    "description": "The language of the song lyrics in the album.",
-    "required": false,
-    "type": "Internal",
-    "classId": "Language"
-  },
-  links: {
-    "id": "links",
-    "name": "Links",
-    "description": "Links to the artist or album site, or social media pages.",
-    "type": "TextVec",
-    "maxItems": 5,
-    "maxTextLength": 255
-  },
-  lyrics: {
-    "id": "lyrics",
-    "name": "Lyrics",
-    "description": "Link to the album tracks lyrics.",
-    "type": "Text",
-    "maxTextLength": 255
-  },
-  composerOrSongwriter: {
-    "id": "composerOrSongwriter",
-    "name": "Composer or songwriter",
-    "description": "The composer(s) and/or songwriter(s) of the album.",
-    "type": "Text",
-    "maxTextLength": 255
-  },
-  reviews: {
-    "id": "reviews",
-    "name": "Reviews",
-    "description": "Links to reviews of the album.",
-    "type": "TextVec",
-    "maxItems": 5,
-    "maxTextLength": 255
-  },
-  publicationStatus: {
-    "id": "publicationStatus",
-    "name": "Publication Status",
-    "description": "The publication status of the album.",
-    "required": true,
-    "type": "Internal",
-    "classId": "Publication Status"
-  },
-  curationStatus: {
-    "id": "curationStatus",
-    "name": "Curation Status",
-    "description": "The publication status of the album set by the a content curator on the platform.",
-    "type": "Internal",
-    "classId": "Curation Status"
-  },
-  explicit: {
-    "id": "explicit",
-    "name": "Explicit",
-    "description": "Indicates whether the album contains explicit material.",
-    "required": true,
-    "type": "Bool"
-  },
-  license: {
-    "id": "license",
-    "name": "License",
-    "description": "The license of which the album is released under.",
-    "required": true,
-    "type": "Internal",
-    "classId": "Content License"
-  },
-  attribution: {
-    "id": "attribution",
-    "name": "Attribution",
-    "description": "If the License requires attribution, add this here.",
-    "type": "Text",
-    "maxTextLength": 255
-  },
-  channelId: {
-    "id": "channelId",
-    "name": "Channel Id",
-    "description": "Id of the channel this album is published under.",
-    "type": "Uint64"
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+import moment from 'moment';
+import { MusicGenreType } from './MusicGenre';
+import { MusicMoodType } from './MusicMood';
+import { MusicThemeType } from './MusicTheme';
+import { MusicTrackType } from './MusicTrack';
+import { LanguageType } from '../general/Language';
+import { PublicationStatusType } from '../general/PublicationStatus';
+import { CurationStatusType } from '../general/CurationStatus';
+import { ContentLicenseType } from '../general/ContentLicense';
+import { ChannelEntity } from '@polkadot/joy-media/entities/ChannelEntity';
+
+export const MusicAlbumValidationSchema = Yup.object().shape({
+  title: Yup.string()
+    .required('This field is required')
+    .max(255, 'Text is too long. Maximum length is 255 chars.'),
+  artist: Yup.string()
+    .required('This field is required')
+    .max(255, 'Text is too long. Maximum length is 255 chars.'),
+  thumbnail: Yup.string()
+    .required('This field is required')
+    .max(255, 'Text is too long. Maximum length is 255 chars.'),
+  description: Yup.string()
+    .required('This field is required')
+    .max(4000, 'Text is too long. Maximum length is 4000 chars.'),
+  firstReleased: Yup.string()
+    .required('This field is required')
+    .test('valid-date', 'Invalid date. Valid date formats are yyyy-mm-dd or yyyy-mm or yyyy.', (val?: any) => {
+      return moment(val as any).isValid();
+    }),
+  lyrics: Yup.string()
+    .max(255, 'Text is too long. Maximum length is 255 chars.'),
+  composerOrSongwriter: Yup.string()
+    .max(255, 'Text is too long. Maximum length is 255 chars.'),
+  attribution: Yup.string()
+    .max(255, 'Text is too long. Maximum length is 255 chars.')
+});
+
+export type MusicAlbumFormValues = {
+  title: string
+  artist: string
+  thumbnail: string
+  description: string
+  firstReleased: string
+  genre: number
+  mood: number
+  theme: number
+  tracks: number[]
+  language: number
+  links: string[]
+  lyrics: string
+  composerOrSongwriter: string
+  reviews: string[]
+  publicationStatus: number
+  curationStatus: number
+  explicit: boolean
+  license: number
+  attribution: string
+  channelId: number
+};
+
+export type MusicAlbumType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  title: string
+  artist: string
+  thumbnail: string
+  description: string
+  firstReleased: number
+  genre?: MusicGenreType
+  mood?: MusicMoodType
+  theme?: MusicThemeType
+  tracks?: MusicTrackType[]
+  language?: LanguageType
+  links?: string[]
+  lyrics?: string
+  composerOrSongwriter?: string
+  reviews?: string[]
+  publicationStatus: PublicationStatusType
+  curationStatus?: CurationStatusType
+  explicit: boolean
+  license: ContentLicenseType
+  attribution?: string
+  channelId?: number
+  channel?: ChannelEntity
+};
+
+export class MusicAlbumCodec extends EntityCodec<MusicAlbumType> { }
+
+export function MusicAlbumToFormValues(entity?: MusicAlbumType): MusicAlbumFormValues {
+  return {
+    title: entity && entity.title || '',
+    artist: entity && entity.artist || '',
+    thumbnail: entity && entity.thumbnail || '',
+    description: entity && entity.description || '',
+    firstReleased: entity && moment(entity.firstReleased * 1000).format('YYYY-MM-DD') || '',
+    genre: entity && entity.genre?.id || 0,
+    mood: entity && entity.mood?.id || 0,
+    theme: entity && entity.theme?.id || 0,
+    tracks: entity && entity.tracks?.map(x => x.id) || [],
+    language: entity && entity.language?.id || 0,
+    links: entity && entity.links || [],
+    lyrics: entity && entity.lyrics || '',
+    composerOrSongwriter: entity && entity.composerOrSongwriter || '',
+    reviews: entity && entity.reviews || [],
+    publicationStatus: entity && entity.publicationStatus.id || 0,
+    curationStatus: entity && entity.curationStatus?.id || 0,
+    explicit: entity && entity.explicit || false,
+    license: entity && entity.license?.id || 0,
+    attribution: entity && entity.attribution || '',
+    channelId: entity && entity.channelId || 0
+  }
+}
+
+export type MusicAlbumPropId =
+  'title' |
+  'artist' |
+  'thumbnail' |
+  'description' |
+  'firstReleased' |
+  'genre' |
+  'mood' |
+  'theme' |
+  'tracks' |
+  'language' |
+  'links' |
+  'lyrics' |
+  'composerOrSongwriter' |
+  'reviews' |
+  'publicationStatus' |
+  'curationStatus' |
+  'explicit' |
+  'license' |
+  'attribution' |
+  'channelId'
+  ;
+
+export type MusicAlbumGenericProp = {
+  id: MusicAlbumPropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type MusicAlbumClassType = {
+  [id in MusicAlbumPropId]: MusicAlbumGenericProp
+};
+
+export const MusicAlbumClass: MusicAlbumClassType = {
+  title: {
+    "id": "title",
+    "name": "Title",
+    "description": "The title of the album",
+    "type": "Text",
+    "required": true,
+    "maxTextLength": 255
+  },
+  artist: {
+    "id": "artist",
+    "name": "Artist",
+    "description": "The artist, composer, band or group that published the album.",
+    "type": "Text",
+    "required": true,
+    "maxTextLength": 255
+  },
+  thumbnail: {
+    "id": "thumbnail",
+    "name": "Thumbnail",
+    "description": "URL to album cover art thumbnail: NOTE: Should be an https link to a square image, between 1400x1400 and 3000x3000 pixels, in JPEG or PNG format.",
+    "required": true,
+    "type": "Text",
+    "maxTextLength": 255
+  },
+  description: {
+    "id": "description",
+    "name": "Description",
+    "description": "Information about the album and artist.",
+    "required": true,
+    "type": "Text",
+    "maxTextLength": 4000
+  },
+  firstReleased: {
+    "id": "firstReleased",
+    "name": "First Released",
+    "description": "When the album was first released",
+    "required": true,
+    "type": "Int64"
+  },
+  genre: {
+    "id": "genre",
+    "name": "Genre",
+    "description": "The genre of the album.",
+    "type": "Internal",
+    "classId": "Music Genre"
+  },
+  mood: {
+    "id": "mood",
+    "name": "Mood",
+    "description": "The mood of the album.",
+    "type": "Internal",
+    "classId": "Music Mood"
+  },
+  theme: {
+    "id": "theme",
+    "name": "Theme",
+    "description": "The theme of the album.",
+    "type": "Internal",
+    "classId": "Music Theme"
+  },
+  tracks: {
+    "id": "tracks",
+    "name": "Tracks",
+    "description": "The tracks of the album.",
+    "type": "InternalVec",
+    "maxItems": 100,
+    "classId": "Music Track"
+  },
+  language: {
+    "id": "language",
+    "name": "Language",
+    "description": "The language of the song lyrics in the album.",
+    "required": false,
+    "type": "Internal",
+    "classId": "Language"
+  },
+  links: {
+    "id": "links",
+    "name": "Links",
+    "description": "Links to the artist or album site, or social media pages.",
+    "type": "TextVec",
+    "maxItems": 5,
+    "maxTextLength": 255
+  },
+  lyrics: {
+    "id": "lyrics",
+    "name": "Lyrics",
+    "description": "Link to the album tracks lyrics.",
+    "type": "Text",
+    "maxTextLength": 255
+  },
+  composerOrSongwriter: {
+    "id": "composerOrSongwriter",
+    "name": "Composer or songwriter",
+    "description": "The composer(s) and/or songwriter(s) of the album.",
+    "type": "Text",
+    "maxTextLength": 255
+  },
+  reviews: {
+    "id": "reviews",
+    "name": "Reviews",
+    "description": "Links to reviews of the album.",
+    "type": "TextVec",
+    "maxItems": 5,
+    "maxTextLength": 255
+  },
+  publicationStatus: {
+    "id": "publicationStatus",
+    "name": "Publication Status",
+    "description": "The publication status of the album.",
+    "required": true,
+    "type": "Internal",
+    "classId": "Publication Status"
+  },
+  curationStatus: {
+    "id": "curationStatus",
+    "name": "Curation Status",
+    "description": "The publication status of the album set by the a content curator on the platform.",
+    "type": "Internal",
+    "classId": "Curation Status"
+  },
+  explicit: {
+    "id": "explicit",
+    "name": "Explicit",
+    "description": "Indicates whether the album contains explicit material.",
+    "required": true,
+    "type": "Bool"
+  },
+  license: {
+    "id": "license",
+    "name": "License",
+    "description": "The license of which the album is released under.",
+    "required": true,
+    "type": "Internal",
+    "classId": "Content License"
+  },
+  attribution: {
+    "id": "attribution",
+    "name": "Attribution",
+    "description": "If the License requires attribution, add this here.",
+    "type": "Text",
+    "maxTextLength": 255
+  },
+  channelId: {
+    "id": "channelId",
+    "name": "Channel Id",
+    "description": "Id of the channel this album is published under.",
+    "type": "Uint64"
+  }
+};

+ 60 - 60
pioneer/packages/joy-media/src/schemas/music/MusicGenre.ts

@@ -1,60 +1,60 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-
-export const MusicGenreValidationSchema = Yup.object().shape({
-  value: Yup.string()
-    .required('This field is required')
-    .max(100, 'Text is too long. Maximum length is 100 chars.')
-});
-
-export type MusicGenreFormValues = {
-  value: string
-};
-
-export type MusicGenreType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  value: string
-};
-
-export class MusicGenreCodec extends EntityCodec<MusicGenreType> { }
-
-export function MusicGenreToFormValues(entity?: MusicGenreType): MusicGenreFormValues {
-  return {
-    value: entity && entity.value || ''
-  }
-}
-
-export type MusicGenrePropId =
-  'value'
-  ;
-
-export type MusicGenreGenericProp = {
-  id: MusicGenrePropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type MusicGenreClassType = {
-  [id in MusicGenrePropId]: MusicGenreGenericProp
-};
-
-export const MusicGenreClass: MusicGenreClassType = {
-  value: {
-    "id": "value",
-    "name": "Value",
-    "description": "Genres for music.",
-    "required": true,
-    "type": "Text",
-    "maxTextLength": 100
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+
+export const MusicGenreValidationSchema = Yup.object().shape({
+  value: Yup.string()
+    .required('This field is required')
+    .max(100, 'Text is too long. Maximum length is 100 chars.')
+});
+
+export type MusicGenreFormValues = {
+  value: string
+};
+
+export type MusicGenreType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  value: string
+};
+
+export class MusicGenreCodec extends EntityCodec<MusicGenreType> { }
+
+export function MusicGenreToFormValues(entity?: MusicGenreType): MusicGenreFormValues {
+  return {
+    value: entity && entity.value || ''
+  }
+}
+
+export type MusicGenrePropId =
+  'value'
+  ;
+
+export type MusicGenreGenericProp = {
+  id: MusicGenrePropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type MusicGenreClassType = {
+  [id in MusicGenrePropId]: MusicGenreGenericProp
+};
+
+export const MusicGenreClass: MusicGenreClassType = {
+  value: {
+    "id": "value",
+    "name": "Value",
+    "description": "Genres for music.",
+    "required": true,
+    "type": "Text",
+    "maxTextLength": 100
+  }
+};

+ 60 - 60
pioneer/packages/joy-media/src/schemas/music/MusicMood.ts

@@ -1,60 +1,60 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-
-export const MusicMoodValidationSchema = Yup.object().shape({
-  value: Yup.string()
-    .required('This field is required')
-    .max(100, 'Text is too long. Maximum length is 100 chars.')
-});
-
-export type MusicMoodFormValues = {
-  value: string
-};
-
-export type MusicMoodType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  value: string
-};
-
-export class MusicMoodCodec extends EntityCodec<MusicMoodType> { }
-
-export function MusicMoodToFormValues(entity?: MusicMoodType): MusicMoodFormValues {
-  return {
-    value: entity && entity.value || ''
-  }
-}
-
-export type MusicMoodPropId =
-  'value'
-  ;
-
-export type MusicMoodGenericProp = {
-  id: MusicMoodPropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type MusicMoodClassType = {
-  [id in MusicMoodPropId]: MusicMoodGenericProp
-};
-
-export const MusicMoodClass: MusicMoodClassType = {
-  value: {
-    "id": "value",
-    "name": "Value",
-    "description": "Moods for music.",
-    "required": true,
-    "type": "Text",
-    "maxTextLength": 100
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+
+export const MusicMoodValidationSchema = Yup.object().shape({
+  value: Yup.string()
+    .required('This field is required')
+    .max(100, 'Text is too long. Maximum length is 100 chars.')
+});
+
+export type MusicMoodFormValues = {
+  value: string
+};
+
+export type MusicMoodType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  value: string
+};
+
+export class MusicMoodCodec extends EntityCodec<MusicMoodType> { }
+
+export function MusicMoodToFormValues(entity?: MusicMoodType): MusicMoodFormValues {
+  return {
+    value: entity && entity.value || ''
+  }
+}
+
+export type MusicMoodPropId =
+  'value'
+  ;
+
+export type MusicMoodGenericProp = {
+  id: MusicMoodPropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type MusicMoodClassType = {
+  [id in MusicMoodPropId]: MusicMoodGenericProp
+};
+
+export const MusicMoodClass: MusicMoodClassType = {
+  value: {
+    "id": "value",
+    "name": "Value",
+    "description": "Moods for music.",
+    "required": true,
+    "type": "Text",
+    "maxTextLength": 100
+  }
+};

+ 60 - 60
pioneer/packages/joy-media/src/schemas/music/MusicTheme.ts

@@ -1,60 +1,60 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-
-export const MusicThemeValidationSchema = Yup.object().shape({
-  value: Yup.string()
-    .required('This field is required')
-    .max(100, 'Text is too long. Maximum length is 100 chars.')
-});
-
-export type MusicThemeFormValues = {
-  value: string
-};
-
-export type MusicThemeType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  value: string
-};
-
-export class MusicThemeCodec extends EntityCodec<MusicThemeType> { }
-
-export function MusicThemeToFormValues(entity?: MusicThemeType): MusicThemeFormValues {
-  return {
-    value: entity && entity.value || ''
-  }
-}
-
-export type MusicThemePropId =
-  'value'
-  ;
-
-export type MusicThemeGenericProp = {
-  id: MusicThemePropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type MusicThemeClassType = {
-  [id in MusicThemePropId]: MusicThemeGenericProp
-};
-
-export const MusicThemeClass: MusicThemeClassType = {
-  value: {
-    "id": "value",
-    "name": "Value",
-    "description": "Themes for music.",
-    "required": true,
-    "type": "Text",
-    "maxTextLength": 100
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+
+export const MusicThemeValidationSchema = Yup.object().shape({
+  value: Yup.string()
+    .required('This field is required')
+    .max(100, 'Text is too long. Maximum length is 100 chars.')
+});
+
+export type MusicThemeFormValues = {
+  value: string
+};
+
+export type MusicThemeType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  value: string
+};
+
+export class MusicThemeCodec extends EntityCodec<MusicThemeType> { }
+
+export function MusicThemeToFormValues(entity?: MusicThemeType): MusicThemeFormValues {
+  return {
+    value: entity && entity.value || ''
+  }
+}
+
+export type MusicThemePropId =
+  'value'
+  ;
+
+export type MusicThemeGenericProp = {
+  id: MusicThemePropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type MusicThemeClassType = {
+  [id in MusicThemePropId]: MusicThemeGenericProp
+};
+
+export const MusicThemeClass: MusicThemeClassType = {
+  value: {
+    "id": "value",
+    "name": "Value",
+    "description": "Themes for music.",
+    "required": true,
+    "type": "Text",
+    "maxTextLength": 100
+  }
+};

+ 292 - 292
pioneer/packages/joy-media/src/schemas/music/MusicTrack.ts

@@ -1,292 +1,292 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-import moment from 'moment';
-import { LanguageType } from '../general/Language';
-import { MusicGenreType } from './MusicGenre';
-import { MusicMoodType } from './MusicMood';
-import { MusicThemeType } from './MusicTheme';
-import { MediaObjectType } from '../general/MediaObject';
-import { PublicationStatusType } from '../general/PublicationStatus';
-import { CurationStatusType } from '../general/CurationStatus';
-import { ContentLicenseType } from '../general/ContentLicense';
-import { ChannelEntity } from '@polkadot/joy-media/entities/ChannelEntity';
-
-export const MusicTrackValidationSchema = Yup.object().shape({
-  title: Yup.string()
-    .required('This field is required')
-    .max(255, 'Text is too long. Maximum length is 255 chars.'),
-  artist: Yup.string()
-    .required('This field is required')
-    .max(255, 'Text is too long. Maximum length is 255 chars.'),
-  thumbnail: Yup.string()
-    .required('This field is required')
-    .max(255, 'Text is too long. Maximum length is 255 chars.'),
-  description: Yup.string()
-    .max(255, 'Text is too long. Maximum length is 255 chars.'),
-  firstReleased: Yup.string()
-    .required('This field is required')
-    .test('valid-date', 'Invalid date. Valid date formats are yyyy-mm-dd or yyyy-mm or yyyy.', (val?: any) => {
-      return moment(val as any).isValid();
-    }),
-  composerOrSongwriter: Yup.string()
-    .max(255, 'Text is too long. Maximum length is 255 chars.'),
-  lyrics: Yup.string()
-    .max(255, 'Text is too long. Maximum length is 255 chars.'),
-  attribution: Yup.string()
-    .max(255, 'Text is too long. Maximum length is 255 chars.')
-});
-
-export type MusicTrackFormValues = {
-  title: string
-  artist: string
-  thumbnail: string
-  description: string
-  language: number
-  firstReleased: string
-  genre: number
-  mood: number
-  theme: number
-  links: string[]
-  composerOrSongwriter: string
-  lyrics: string
-  object: number
-  publicationStatus: number
-  curationStatus: number
-  explicit: boolean
-  license: number
-  attribution: string
-  channelId: number
-};
-
-export type MusicTrackType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  title: string
-  artist: string
-  thumbnail: string
-  description?: string
-  language?: LanguageType
-  firstReleased: number
-  genre?: MusicGenreType
-  mood?: MusicMoodType
-  theme?: MusicThemeType
-  links?: string[]
-  composerOrSongwriter?: string
-  lyrics?: string
-  object?: MediaObjectType
-  publicationStatus: PublicationStatusType
-  curationStatus?: CurationStatusType
-  explicit: boolean
-  license: ContentLicenseType
-  attribution?: string
-  channelId?: number
-  channel?: ChannelEntity
-};
-
-export class MusicTrackCodec extends EntityCodec<MusicTrackType> { }
-
-export function MusicTrackToFormValues(entity?: MusicTrackType): MusicTrackFormValues {
-  return {
-    title: entity && entity.title || '',
-    artist: entity && entity.artist || '',
-    thumbnail: entity && entity.thumbnail || '',
-    description: entity && entity.description || '',
-    language: entity && entity.language?.id || 0,
-    firstReleased: entity && moment(entity.firstReleased * 1000).format('YYYY-MM-DD') || '',
-    genre: entity && entity.genre?.id || 0,
-    mood: entity && entity.mood?.id || 0,
-    theme: entity && entity.theme?.id || 0,
-    links: entity && entity.links || [],
-    composerOrSongwriter: entity && entity.composerOrSongwriter || '',
-    lyrics: entity && entity.lyrics || '',
-    object: entity && entity.object?.id || 0,
-    publicationStatus: entity && entity.publicationStatus?.id || 0,
-    curationStatus: entity && entity.curationStatus?.id || 0,
-    explicit: entity && entity.explicit || false,
-    license: entity && entity.license?.id || 0,
-    attribution: entity && entity.attribution || '',
-    channelId: entity && entity.channelId || 0
-  }
-}
-
-export type MusicTrackPropId =
-  'title' |
-  'artist' |
-  'thumbnail' |
-  'description' |
-  'language' |
-  'firstReleased' |
-  'genre' |
-  'mood' |
-  'theme' |
-  'links' |
-  'composerOrSongwriter' |
-  'lyrics' |
-  'object' |
-  'publicationStatus' |
-  'curationStatus' |
-  'explicit' |
-  'license' |
-  'attribution' |
-  'channelId'
-  ;
-
-export type MusicTrackGenericProp = {
-  id: MusicTrackPropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type MusicTrackClassType = {
-  [id in MusicTrackPropId]: MusicTrackGenericProp
-};
-
-export const MusicTrackClass: MusicTrackClassType = {
-  title: {
-    "id": "title",
-    "name": "Title",
-    "description": "The title of the track",
-    "type": "Text",
-    "required": true,
-    "maxTextLength": 255
-  },
-  artist: {
-    "id": "artist",
-    "name": "Artist",
-    "description": "The artist, composer, band or group that published the track.",
-    "type": "Text",
-    "required": true,
-    "maxTextLength": 255
-  },
-  thumbnail: {
-    "id": "thumbnail",
-    "name": "Thumbnail",
-    "description": "URL to track cover art: NOTE: Should be an https link to a square image, between 1400x1400 and 3000x3000 pixels, in JPEG or PNG format.",
-    "required": true,
-    "type": "Text",
-    "maxTextLength": 255
-  },
-  description: {
-    "id": "description",
-    "name": "Description",
-    "description": "Information about the track.",
-    "type": "Text",
-    "maxTextLength": 255
-  },
-  language: {
-    "id": "language",
-    "name": "Language",
-    "description": "The language of the lyrics in the track.",
-    "type": "Internal",
-    "classId": "Language"
-  },
-  firstReleased: {
-    "id": "firstReleased",
-    "name": "First Released",
-    "description": "When the track was first released",
-    "required": true,
-    "type": "Int64"
-  },
-  genre: {
-    "id": "genre",
-    "name": "Genre",
-    "description": "The genre of the track.",
-    "type": "Internal",
-    "classId": "Music Genre"
-  },
-  mood: {
-    "id": "mood",
-    "name": "Mood",
-    "description": "The mood of the track.",
-    "type": "Internal",
-    "classId": "Music Mood"
-  },
-  theme: {
-    "id": "theme",
-    "name": "Theme",
-    "description": "The theme of the track.",
-    "type": "Internal",
-    "classId": "Music Theme"
-  },
-  links: {
-    "id": "links",
-    "name": "Links",
-    "description": "Links to the artist site or social media pages.",
-    "type": "TextVec",
-    "maxItems": 5,
-    "maxTextLength": 255
-  },
-  composerOrSongwriter: {
-    "id": "composerOrSongwriter",
-    "name": "Composer or songwriter",
-    "description": "The composer(s) and/or songwriter(s) of the track.",
-    "type": "Text",
-    "maxTextLength": 255
-  },
-  lyrics: {
-    "id": "lyrics",
-    "name": "Lyrics",
-    "description": "Link to the track lyrics.",
-    "type": "Text",
-    "maxTextLength": 255
-  },
-  object: {
-    "id": "object",
-    "name": "Object",
-    "description": "The entityId of the object in the data directory.",
-    "type": "Internal",
-    "classId": "Media Object"
-  },
-  publicationStatus: {
-    "id": "publicationStatus",
-    "name": "Publication Status",
-    "description": "The publication status of the track.",
-    "required": true,
-    "type": "Internal",
-    "classId": "Publication Status"
-  },
-  curationStatus: {
-    "id": "curationStatus",
-    "name": "Curation Status",
-    "description": "The publication status of the track set by the a content curator on the platform.",
-    "type": "Internal",
-    "classId": "Curation Status"
-  },
-  explicit: {
-    "id": "explicit",
-    "name": "Explicit",
-    "description": "Indicates whether the track contains explicit material.",
-    "required": true,
-    "type": "Bool"
-  },
-  license: {
-    "id": "license",
-    "name": "License",
-    "description": "The license of which the track is released under.",
-    "required": true,
-    "type": "Internal",
-    "classId": "Content License"
-  },
-  attribution: {
-    "id": "attribution",
-    "name": "Attribution",
-    "description": "If the License requires attribution, add this here.",
-    "type": "Text",
-    "maxTextLength": 255
-  },
-  channelId: {
-    "id": "channelId",
-    "name": "Channel Id",
-    "description": "Id of the channel this track is published under.",
-    "type": "Uint64"
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+import moment from 'moment';
+import { LanguageType } from '../general/Language';
+import { MusicGenreType } from './MusicGenre';
+import { MusicMoodType } from './MusicMood';
+import { MusicThemeType } from './MusicTheme';
+import { MediaObjectType } from '../general/MediaObject';
+import { PublicationStatusType } from '../general/PublicationStatus';
+import { CurationStatusType } from '../general/CurationStatus';
+import { ContentLicenseType } from '../general/ContentLicense';
+import { ChannelEntity } from '@polkadot/joy-media/entities/ChannelEntity';
+
+export const MusicTrackValidationSchema = Yup.object().shape({
+  title: Yup.string()
+    .required('This field is required')
+    .max(255, 'Text is too long. Maximum length is 255 chars.'),
+  artist: Yup.string()
+    .required('This field is required')
+    .max(255, 'Text is too long. Maximum length is 255 chars.'),
+  thumbnail: Yup.string()
+    .required('This field is required')
+    .max(255, 'Text is too long. Maximum length is 255 chars.'),
+  description: Yup.string()
+    .max(255, 'Text is too long. Maximum length is 255 chars.'),
+  firstReleased: Yup.string()
+    .required('This field is required')
+    .test('valid-date', 'Invalid date. Valid date formats are yyyy-mm-dd or yyyy-mm or yyyy.', (val?: any) => {
+      return moment(val as any).isValid();
+    }),
+  composerOrSongwriter: Yup.string()
+    .max(255, 'Text is too long. Maximum length is 255 chars.'),
+  lyrics: Yup.string()
+    .max(255, 'Text is too long. Maximum length is 255 chars.'),
+  attribution: Yup.string()
+    .max(255, 'Text is too long. Maximum length is 255 chars.')
+});
+
+export type MusicTrackFormValues = {
+  title: string
+  artist: string
+  thumbnail: string
+  description: string
+  language: number
+  firstReleased: string
+  genre: number
+  mood: number
+  theme: number
+  links: string[]
+  composerOrSongwriter: string
+  lyrics: string
+  object: number
+  publicationStatus: number
+  curationStatus: number
+  explicit: boolean
+  license: number
+  attribution: string
+  channelId: number
+};
+
+export type MusicTrackType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  title: string
+  artist: string
+  thumbnail: string
+  description?: string
+  language?: LanguageType
+  firstReleased: number
+  genre?: MusicGenreType
+  mood?: MusicMoodType
+  theme?: MusicThemeType
+  links?: string[]
+  composerOrSongwriter?: string
+  lyrics?: string
+  object?: MediaObjectType
+  publicationStatus: PublicationStatusType
+  curationStatus?: CurationStatusType
+  explicit: boolean
+  license: ContentLicenseType
+  attribution?: string
+  channelId?: number
+  channel?: ChannelEntity
+};
+
+export class MusicTrackCodec extends EntityCodec<MusicTrackType> { }
+
+export function MusicTrackToFormValues(entity?: MusicTrackType): MusicTrackFormValues {
+  return {
+    title: entity && entity.title || '',
+    artist: entity && entity.artist || '',
+    thumbnail: entity && entity.thumbnail || '',
+    description: entity && entity.description || '',
+    language: entity && entity.language?.id || 0,
+    firstReleased: entity && moment(entity.firstReleased * 1000).format('YYYY-MM-DD') || '',
+    genre: entity && entity.genre?.id || 0,
+    mood: entity && entity.mood?.id || 0,
+    theme: entity && entity.theme?.id || 0,
+    links: entity && entity.links || [],
+    composerOrSongwriter: entity && entity.composerOrSongwriter || '',
+    lyrics: entity && entity.lyrics || '',
+    object: entity && entity.object?.id || 0,
+    publicationStatus: entity && entity.publicationStatus?.id || 0,
+    curationStatus: entity && entity.curationStatus?.id || 0,
+    explicit: entity && entity.explicit || false,
+    license: entity && entity.license?.id || 0,
+    attribution: entity && entity.attribution || '',
+    channelId: entity && entity.channelId || 0
+  }
+}
+
+export type MusicTrackPropId =
+  'title' |
+  'artist' |
+  'thumbnail' |
+  'description' |
+  'language' |
+  'firstReleased' |
+  'genre' |
+  'mood' |
+  'theme' |
+  'links' |
+  'composerOrSongwriter' |
+  'lyrics' |
+  'object' |
+  'publicationStatus' |
+  'curationStatus' |
+  'explicit' |
+  'license' |
+  'attribution' |
+  'channelId'
+  ;
+
+export type MusicTrackGenericProp = {
+  id: MusicTrackPropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type MusicTrackClassType = {
+  [id in MusicTrackPropId]: MusicTrackGenericProp
+};
+
+export const MusicTrackClass: MusicTrackClassType = {
+  title: {
+    "id": "title",
+    "name": "Title",
+    "description": "The title of the track",
+    "type": "Text",
+    "required": true,
+    "maxTextLength": 255
+  },
+  artist: {
+    "id": "artist",
+    "name": "Artist",
+    "description": "The artist, composer, band or group that published the track.",
+    "type": "Text",
+    "required": true,
+    "maxTextLength": 255
+  },
+  thumbnail: {
+    "id": "thumbnail",
+    "name": "Thumbnail",
+    "description": "URL to track cover art: NOTE: Should be an https link to a square image, between 1400x1400 and 3000x3000 pixels, in JPEG or PNG format.",
+    "required": true,
+    "type": "Text",
+    "maxTextLength": 255
+  },
+  description: {
+    "id": "description",
+    "name": "Description",
+    "description": "Information about the track.",
+    "type": "Text",
+    "maxTextLength": 255
+  },
+  language: {
+    "id": "language",
+    "name": "Language",
+    "description": "The language of the lyrics in the track.",
+    "type": "Internal",
+    "classId": "Language"
+  },
+  firstReleased: {
+    "id": "firstReleased",
+    "name": "First Released",
+    "description": "When the track was first released",
+    "required": true,
+    "type": "Int64"
+  },
+  genre: {
+    "id": "genre",
+    "name": "Genre",
+    "description": "The genre of the track.",
+    "type": "Internal",
+    "classId": "Music Genre"
+  },
+  mood: {
+    "id": "mood",
+    "name": "Mood",
+    "description": "The mood of the track.",
+    "type": "Internal",
+    "classId": "Music Mood"
+  },
+  theme: {
+    "id": "theme",
+    "name": "Theme",
+    "description": "The theme of the track.",
+    "type": "Internal",
+    "classId": "Music Theme"
+  },
+  links: {
+    "id": "links",
+    "name": "Links",
+    "description": "Links to the artist site or social media pages.",
+    "type": "TextVec",
+    "maxItems": 5,
+    "maxTextLength": 255
+  },
+  composerOrSongwriter: {
+    "id": "composerOrSongwriter",
+    "name": "Composer or songwriter",
+    "description": "The composer(s) and/or songwriter(s) of the track.",
+    "type": "Text",
+    "maxTextLength": 255
+  },
+  lyrics: {
+    "id": "lyrics",
+    "name": "Lyrics",
+    "description": "Link to the track lyrics.",
+    "type": "Text",
+    "maxTextLength": 255
+  },
+  object: {
+    "id": "object",
+    "name": "Object",
+    "description": "The entityId of the object in the data directory.",
+    "type": "Internal",
+    "classId": "Media Object"
+  },
+  publicationStatus: {
+    "id": "publicationStatus",
+    "name": "Publication Status",
+    "description": "The publication status of the track.",
+    "required": true,
+    "type": "Internal",
+    "classId": "Publication Status"
+  },
+  curationStatus: {
+    "id": "curationStatus",
+    "name": "Curation Status",
+    "description": "The publication status of the track set by the a content curator on the platform.",
+    "type": "Internal",
+    "classId": "Curation Status"
+  },
+  explicit: {
+    "id": "explicit",
+    "name": "Explicit",
+    "description": "Indicates whether the track contains explicit material.",
+    "required": true,
+    "type": "Bool"
+  },
+  license: {
+    "id": "license",
+    "name": "License",
+    "description": "The license of which the track is released under.",
+    "required": true,
+    "type": "Internal",
+    "classId": "Content License"
+  },
+  attribution: {
+    "id": "attribution",
+    "name": "Attribution",
+    "description": "If the License requires attribution, add this here.",
+    "type": "Text",
+    "maxTextLength": 255
+  },
+  channelId: {
+    "id": "channelId",
+    "name": "Channel Id",
+    "description": "Id of the channel this track is published under.",
+    "type": "Uint64"
+  }
+};

+ 1 - 1
pioneer/packages/joy-media/src/schemas/video/Video.ts

@@ -2,7 +2,7 @@
 /** This file is generated based on JSON schema. Do not modify. */
 
 import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
 import moment from 'moment';
 import { LanguageType } from '../general/Language';
 import { VideoCategoryType } from './VideoCategory';

+ 60 - 60
pioneer/packages/joy-media/src/schemas/video/VideoCategory.ts

@@ -1,60 +1,60 @@
-
-/** This file is generated based on JSON schema. Do not modify. */
-
-import * as Yup from 'yup';
-import { EntityCodec } from '@joystream/types/lib/versioned-store/EntityCodec';
-
-export const VideoCategoryValidationSchema = Yup.object().shape({
-  value: Yup.string()
-    .required('This field is required')
-    .max(255, 'Text is too long. Maximum length is 255 chars.')
-});
-
-export type VideoCategoryFormValues = {
-  value: string
-};
-
-export type VideoCategoryType = {
-  classId: number
-  inClassSchemaIndexes: number[]
-  id: number
-  value: string
-};
-
-export class VideoCategoryCodec extends EntityCodec<VideoCategoryType> { }
-
-export function VideoCategoryToFormValues(entity?: VideoCategoryType): VideoCategoryFormValues {
-  return {
-    value: entity && entity.value || ''
-  }
-}
-
-export type VideoCategoryPropId =
-  'value'
-  ;
-
-export type VideoCategoryGenericProp = {
-  id: VideoCategoryPropId,
-  type: string,
-  name: string,
-  description?: string,
-  required?: boolean,
-  maxItems?: number,
-  maxTextLength?: number,
-  classId?: any
-};
-
-type VideoCategoryClassType = {
-  [id in VideoCategoryPropId]: VideoCategoryGenericProp
-};
-
-export const VideoCategoryClass: VideoCategoryClassType = {
-  value: {
-    "id": "value",
-    "name": "Value",
-    "description": "Categories for videos.",
-    "type": "Text",
-    "required": true,
-    "maxTextLength": 255
-  }
-};
+
+/** This file is generated based on JSON schema. Do not modify. */
+
+import * as Yup from 'yup';
+import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
+
+export const VideoCategoryValidationSchema = Yup.object().shape({
+  value: Yup.string()
+    .required('This field is required')
+    .max(255, 'Text is too long. Maximum length is 255 chars.')
+});
+
+export type VideoCategoryFormValues = {
+  value: string
+};
+
+export type VideoCategoryType = {
+  classId: number
+  inClassSchemaIndexes: number[]
+  id: number
+  value: string
+};
+
+export class VideoCategoryCodec extends EntityCodec<VideoCategoryType> { }
+
+export function VideoCategoryToFormValues(entity?: VideoCategoryType): VideoCategoryFormValues {
+  return {
+    value: entity && entity.value || ''
+  }
+}
+
+export type VideoCategoryPropId =
+  'value'
+  ;
+
+export type VideoCategoryGenericProp = {
+  id: VideoCategoryPropId,
+  type: string,
+  name: string,
+  description?: string,
+  required?: boolean,
+  maxItems?: number,
+  maxTextLength?: number,
+  classId?: any
+};
+
+type VideoCategoryClassType = {
+  [id in VideoCategoryPropId]: VideoCategoryGenericProp
+};
+
+export const VideoCategoryClass: VideoCategoryClassType = {
+  value: {
+    "id": "value",
+    "name": "Value",
+    "description": "Categories for videos.",
+    "type": "Text",
+    "required": true,
+    "maxTextLength": 255
+  }
+};

+ 2 - 2
pioneer/packages/joy-media/src/stories/MusicAlbumTracks.stories.tsx

@@ -7,9 +7,9 @@ import { MusicAlbumSamples } from './data/MusicAlbumSamples';
 import { albumTracks, AllMusicTrackSamples } from './data/MusicTrackSamples';
 import { withMockTransport } from './withMockTransport';
 import { EditMusicAlbumView } from '../music/EditMusicAlbum.view';
-import EntityId from '@joystream/types/lib/versioned-store/EntityId';
+import EntityId from '@joystream/types/versioned-store/EntityId';
 
-export default { 
+export default {
 	title: 'Media | My music tracks',
 	decorators: [ withMockTransport ],
 };

+ 2 - 2
pioneer/packages/joy-media/src/stories/MyChannels.stories.tsx

@@ -7,10 +7,10 @@ import { AllMockChannels } from './data/ChannelSamples';
 import { withMockTransport } from './withMockTransport';
 import EditForm from '../channels/EditChannel';
 import { EditChannelView } from '../channels/EditChannel.view';
-import { ChannelId } from '@joystream/types/lib/content-working-group';
+import { ChannelId } from '@joystream/types/content-working-group';
 import { AccountIdSamples } from './data/AccountIdSamples';
 
-export default { 
+export default {
 	title: 'Media | My channels',
 	decorators: [ withMockTransport ],
 };

+ 3 - 3
pioneer/packages/joy-media/src/stories/Playback.stories.tsx

@@ -8,9 +8,9 @@ import { Album1TrackSamples } from './data/MusicTrackSamples';
 import { MockMusicChannel, MockVideoChannel } from './data/ChannelSamples';
 import { withMockTransport } from './withMockTransport';
 import { Video } from '../mocks';
-import { EntityId } from '@joystream/types/lib/versioned-store';
+import { EntityId } from '@joystream/types/versioned-store';
 
-export default { 
+export default {
 	title: 'Media | Playback',
 	decorators: [ withMockTransport ],
 };
@@ -23,7 +23,7 @@ export const PlayVideoStory = () =>
 	/>;
 
 export const PlayAlbumStory = () =>
-	<PlayContent 
+	<PlayContent
 		channel={MockMusicChannel}
 		featuredAlbums={FeaturedAlbums}
 		tracks={Album1TrackSamples}

+ 4 - 4
pioneer/packages/joy-media/src/stories/UploadAudio.stories.tsx

@@ -2,12 +2,12 @@ import React from 'react';
 import { EditForm } from '../upload/UploadAudio'
 import '../index.css';
 
-import { ContentId } from '@joystream/types/lib/media';
-import EntityId from '@joystream/types/lib/versioned-store/EntityId';
+import { ContentId } from '@joystream/types/media';
+import EntityId from '@joystream/types/versioned-store/EntityId';
 import { UploadAudioView } from '../upload/UploadAudio.view';
 import { withMockTransport } from './withMockTransport';
 
-export default { 
+export default {
 	title: 'Media | Upload audio',
 	decorators: [ withMockTransport ],
 };
@@ -16,7 +16,7 @@ const contentId = ContentId.generate();
 
 export const DefaultState = () =>
 	<EditForm
-		contentId={contentId} 
+		contentId={contentId}
 	/>;
 
 export const MockEditFormView = () =>

+ 4 - 4
pioneer/packages/joy-media/src/stories/UploadVideo.stories.tsx

@@ -2,12 +2,12 @@ import React from 'react';
 import { EditForm } from '../upload/UploadVideo'
 import '../index.css';
 
-import { ContentId } from '@joystream/types/lib/media';
+import { ContentId } from '@joystream/types/media';
 import { withMockTransport } from './withMockTransport';
 import EditVideoView from '../upload/EditVideo.view';
-import EntityId from '@joystream/types/lib/versioned-store/EntityId';
+import EntityId from '@joystream/types/versioned-store/EntityId';
 
-export default { 
+export default {
 	title: 'Media | Upload video',
 	decorators: [ withMockTransport ],
 };
@@ -16,7 +16,7 @@ const contentId = ContentId.generate();
 
 export const DefaultState = () =>
 	<EditForm
-		contentId={contentId} 
+		contentId={contentId}
 	/>;
 
 export const MockEditFormView = () =>

+ 4 - 4
pioneer/packages/joy-media/src/stories/data/ChannelSamples.ts

@@ -2,8 +2,8 @@ import BN from 'bn.js';
 import { ChannelEntity } from '@polkadot/joy-media/entities/ChannelEntity';
 import { u32 } from '@polkadot/types';
 import { AccountIdSamples } from './AccountIdSamples';
-import { MemberId } from '@joystream/types/lib/members';
-import { PrincipalId } from '@joystream/types/lib/content-working-group';
+import { MemberId } from '@joystream/types/members';
+import { PrincipalId } from '@joystream/types/content-working-group';
 
 let id = 0;
 const nextId = () => ++id;
@@ -26,7 +26,7 @@ export const MockMusicChannel: ChannelEntity =
   roleAccount: AccountIdSamples.Alice,
   principalId: new PrincipalId(1),
   created: new u32(123456),
-	
+
 	rewardEarned: new BN('4587'),
 	contentItemsCount: 57,
 };
@@ -49,7 +49,7 @@ export const MockVideoChannel: ChannelEntity =
   roleAccount: AccountIdSamples.Alice,
   principalId: new PrincipalId(1),
   created: new u32(123456),
-	
+
 	rewardEarned: new BN('1820021'),
 	contentItemsCount: 1529,
 };

+ 1 - 1
pioneer/packages/joy-media/src/transport.mock.ts

@@ -1,5 +1,5 @@
 import { MediaTransport, ChannelValidationConstraints } from './transport';
-import { Entity, Class } from '@joystream/types/lib/versioned-store';
+import { Entity, Class } from '@joystream/types/versioned-store';
 import { MusicTrackType } from './schemas/music/MusicTrack';
 import { MusicAlbumType } from './schemas/music/MusicAlbum';
 import { VideoType } from './schemas/video/Video';

+ 4 - 4
pioneer/packages/joy-media/src/transport.substrate.ts

@@ -1,8 +1,8 @@
 import BN from 'bn.js';
 import { MediaTransport, ChannelValidationConstraints } from './transport';
-import { ClassId, Class, EntityId, Entity, ClassName } from '@joystream/types/lib/versioned-store';
-import { InputValidationLengthConstraint } from '@joystream/types/lib/forum';
-import { PlainEntity, EntityCodecResolver } from '@joystream/types/lib/versioned-store/EntityCodec';
+import { ClassId, Class, EntityId, Entity, ClassName } from '@joystream/types/versioned-store';
+import { InputValidationLengthConstraint } from '@joystream/types/forum';
+import { PlainEntity, EntityCodecResolver } from '@joystream/types/versioned-store/EntityCodec';
 import { MusicTrackType } from './schemas/music/MusicTrack';
 import { MusicAlbumType } from './schemas/music/MusicAlbum';
 import { VideoType } from './schemas/video/Video';
@@ -16,7 +16,7 @@ import { MusicThemeType } from './schemas/music/MusicTheme';
 import { PublicationStatusType } from './schemas/general/PublicationStatus';
 import { VideoCategoryType } from './schemas/video/VideoCategory';
 import { ChannelEntity } from './entities/ChannelEntity';
-import { ChannelId, Channel } from '@joystream/types/lib/content-working-group';
+import { ChannelId, Channel } from '@joystream/types/content-working-group';
 import { ApiPromise } from '@polkadot/api/index';
 import { ApiProps } from '@polkadot/react-api/types';
 import { Vec } from '@polkadot/types';

+ 2 - 2
pioneer/packages/joy-media/src/transport.ts

@@ -1,6 +1,6 @@
 import { Transport } from '@polkadot/joy-utils/index'
 import { AccountId } from '@polkadot/types/interfaces';
-import { EntityId, Class, ClassName, unifyClassName, ClassIdByNameMap } from '@joystream/types/lib/versioned-store';
+import { EntityId, Class, ClassName, unifyClassName, ClassIdByNameMap } from '@joystream/types/versioned-store';
 import { MusicTrackType, MusicTrackCodec } from './schemas/music/MusicTrack';
 import { MusicAlbumType, MusicAlbumCodec } from './schemas/music/MusicAlbum';
 import { VideoType, VideoCodec } from './schemas/video/Video';
@@ -16,7 +16,7 @@ import { PublicationStatusType, PublicationStatusCodec } from './schemas/general
 import { VideoCategoryType, VideoCategoryCodec } from './schemas/video/VideoCategory';
 import { MediaDropdownOptions } from './common/MediaDropdownOptions';
 import { ChannelEntity } from './entities/ChannelEntity';
-import { ChannelId } from '@joystream/types/lib/content-working-group';
+import { ChannelId } from '@joystream/types/content-working-group';
 import { isVideoChannel, isPublicChannel } from './channels/ChannelHelpers';
 import { ValidationConstraint } from '@polkadot/joy-utils/ValidationConstraint';
 

+ 2 - 2
pioneer/packages/joy-media/src/upload/EditVideo.view.tsx

@@ -2,8 +2,8 @@ import React from 'react';
 import { RouteComponentProps } from 'react-router';
 import { MediaView } from '../MediaView';
 import { OuterProps, EditForm } from './UploadVideo';
-import EntityId from '@joystream/types/lib/versioned-store/EntityId';
-import { ChannelId } from '@joystream/types/lib/content-working-group';
+import EntityId from '@joystream/types/versioned-store/EntityId';
+import { ChannelId } from '@joystream/types/content-working-group';
 import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 type Props = OuterProps;

+ 3 - 3
pioneer/packages/joy-media/src/upload/UploadAudio.tsx

@@ -4,11 +4,11 @@ import { Form, withFormik } from 'formik';
 import { History } from 'history';
 
 import TxButton from '@polkadot/joy-utils/TxButton';
-import { ContentId } from '@joystream/types/lib/media';
+import { ContentId } from '@joystream/types/media';
 import { onImageError } from '@polkadot/joy-utils/images';
 import { MusicTrackValidationSchema, MusicTrackType, MusicTrackClass as Fields, MusicTrackFormValues, MusicTrackToFormValues } from '../schemas/music/MusicTrack';
 import { withMediaForm, MediaFormProps, datePlaceholder } from '../common/MediaForms';
-import EntityId from '@joystream/types/lib/versioned-store/EntityId';
+import EntityId from '@joystream/types/versioned-store/EntityId';
 import { MediaDropdownOptions } from '../common/MediaDropdownOptions';
 import { FormTabs } from '../common/FormTabs';
 
@@ -135,7 +135,7 @@ const InnerForm = (props: MediaFormProps<OuterProps, FormValues>) => {
     </div>
 
     <Form className='ui form JoyForm EditMetaForm'>
-      
+
       {tabs}
 
       <LabelledField style={{ marginTop: '1rem' }} {...props}>

+ 12 - 12
pioneer/packages/joy-media/src/upload/UploadVideo.tsx

@@ -5,29 +5,29 @@ import { History } from 'history';
 import moment from 'moment';
 
 import TxButton, { OnTxButtonClick } from '@polkadot/joy-utils/TxButton';
-import { ContentId } from '@joystream/types/lib/media';
+import { ContentId } from '@joystream/types/media';
 import { onImageError } from '@polkadot/joy-utils/images';
 import { VideoValidationSchema, VideoType, VideoClass as Fields, VideoFormValues, VideoToFormValues, VideoCodec, VideoPropId } from '../schemas/video/Video';
 import { MediaFormProps, withMediaForm, datePlaceholder } from '../common/MediaForms';
-import EntityId from '@joystream/types/lib/versioned-store/EntityId';
+import EntityId from '@joystream/types/versioned-store/EntityId';
 import { MediaDropdownOptions } from '../common/MediaDropdownOptions';
 import { FormTabs } from '../common/FormTabs';
-import { ChannelId } from '@joystream/types/lib/content-working-group';
+import { ChannelId } from '@joystream/types/content-working-group';
 import { ChannelEntity } from '../entities/ChannelEntity';
-import { Credential } from '@joystream/types/lib/versioned-store/permissions/credentials';
-import { Class, VecClassPropertyValue } from '@joystream/types/lib/versioned-store';
+import { Credential } from '@joystream/types/versioned-store/permissions/credentials';
+import { Class, VecClassPropertyValue } from '@joystream/types/versioned-store';
 import { TxCallback } from '@polkadot/react-components/Status/types';
 import { SubmittableResult } from '@polkadot/api';
 import { nonEmptyStr, filterSubstrateEventsAndExtractData } from '@polkadot/joy-utils/index';
 import { u16, u32, bool, Option, Vec } from '@polkadot/types';
-import { isInternalProp } from '@joystream/types/lib/versioned-store/EntityCodec';
+import { isInternalProp } from '@joystream/types/versioned-store/EntityCodec';
 import { MediaObjectCodec } from '../schemas/general/MediaObject';
-import { Operation } from '@joystream/types/lib/versioned-store/permissions/batching';
-import { OperationType } from '@joystream/types/lib/versioned-store/permissions/batching/operation-types';
-import { ParametrizedEntity } from '@joystream/types/lib/versioned-store/permissions/batching/parametrized-entity';
-import ParametrizedClassPropertyValue from '@joystream/types/lib/versioned-store/permissions/batching/ParametrizedClassPropertyValue';
-import { ParametrizedPropertyValue } from '@joystream/types/lib/versioned-store/permissions/batching/parametrized-property-value';
-import { ParameterizedClassPropertyValues } from '@joystream/types/lib/versioned-store/permissions/batching/operations';
+import { Operation } from '@joystream/types/versioned-store/permissions/batching';
+import { OperationType } from '@joystream/types/versioned-store/permissions/batching/operation-types';
+import { ParametrizedEntity } from '@joystream/types/versioned-store/permissions/batching/parametrized-entity';
+import ParametrizedClassPropertyValue from '@joystream/types/versioned-store/permissions/batching/ParametrizedClassPropertyValue';
+import { ParametrizedPropertyValue } from '@joystream/types/versioned-store/permissions/batching/parametrized-property-value';
+import { ParameterizedClassPropertyValues } from '@joystream/types/versioned-store/permissions/batching/operations';
 import { useMyMembership } from '@polkadot/joy-utils/MyMembershipContext';
 import { isAccountAChannelOwner } from '../channels/ChannelHelpers';
 import { JoyError } from '@polkadot/joy-utils/JoyStatus';

+ 4 - 4
pioneer/packages/joy-media/src/video/PlayVideo.tsx

@@ -3,7 +3,7 @@ import ReactMarkdown from 'react-markdown';
 import { Table } from 'semantic-ui-react';
 import { ApiProps } from '@polkadot/react-api/types';
 import { ApiConsumer } from '@polkadot/react-api/ApiContext';
-import EntityId from '@joystream/types/lib/versioned-store/EntityId';
+import EntityId from '@joystream/types/versioned-store/EntityId';
 import { ChannelEntity } from '../entities/ChannelEntity';
 import { ChannelPreview } from '../channels/ChannelPreview';
 import { VideoPreview } from './VideoPreview';
@@ -11,7 +11,7 @@ import { VideoType, VideoClass as Fields, VideoGenericProp } from '../schemas/vi
 import { printExplicit, printReleaseDate, printLanguage } from '../entities/EntityHelpers';
 import { MediaObjectType } from '../schemas/general/MediaObject';
 import { MediaPlayerWithResolver } from '../common/MediaPlayerWithResolver';
-import { ContentId } from '@joystream/types/lib/media';
+import { ContentId } from '@joystream/types/media';
 import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 export type PlayVideoProps = {
@@ -90,7 +90,7 @@ export function PlayVideo (props: PlayVideoProps) {
         <div className='PlayBox'>
 
           <ApiConsumer>
-            {(apiProps?: ApiProps): React.ReactNode => 
+            {(apiProps?: ApiProps): React.ReactNode =>
               <MediaPlayerWithResolver {...props} contentId={contentId} api={apiProps?.api} />
             }
           </ApiConsumer>
@@ -126,4 +126,4 @@ export function PlayVideo (props: PlayVideoProps) {
       }
     </div>
   </div>;
-}
+}

+ 2 - 2
pioneer/packages/joy-media/src/video/PlayVideo.view.tsx

@@ -2,8 +2,8 @@ import React from 'react';
 import { RouteComponentProps } from 'react-router';
 import { MediaView } from '../MediaView';
 import { PlayVideoProps, PlayVideo } from './PlayVideo';
-import { ChannelId } from '@joystream/types/lib/content-working-group';
-import { EntityId } from '@joystream/types/lib/versioned-store';
+import { ChannelId } from '@joystream/types/content-working-group';
+import { EntityId } from '@joystream/types/versioned-store';
 import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 type Props = PlayVideoProps;

+ 2 - 2
pioneer/packages/joy-members/src/Details.tsx

@@ -12,9 +12,9 @@ import AddressMini from '@polkadot/react-components/AddressMiniJoy';
 import { formatNumber } from '@polkadot/util';
 
 import translate from './translate';
-import { MemberId, Profile, EntryMethod, Paid, Screening, Genesis, SubscriptionId } from '@joystream/types/lib/members';
+import { MemberId, Profile, EntryMethod, Paid, Screening, Genesis, SubscriptionId } from '@joystream/types/members';
 import { queryMembershipToProp } from './utils';
-import { Seat } from '@joystream/types/lib/';
+import { Seat } from '@joystream/types/';
 import { nonEmptyStr, queryToProp } from '@polkadot/joy-utils/index';
 import { MyAccountProps, withMyAccount } from '@polkadot/joy-utils/MyAccount';
 

+ 1 - 1
pioneer/packages/joy-members/src/DetailsByHandle.tsx

@@ -6,7 +6,7 @@ import { stringToU8a, u8aToHex } from '@polkadot/util';
 
 import translate from './translate';
 import Details from './Details';
-import { MemberId } from '@joystream/types/lib/members';
+import { MemberId } from '@joystream/types/members';
 import { queryMembershipToProp } from './utils';
 
 type DetailsByHandleProps = {

+ 2 - 2
pioneer/packages/joy-members/src/EditForm.tsx

@@ -9,8 +9,8 @@ import Section from '@polkadot/joy-utils/Section';
 import TxButton from '@polkadot/joy-utils/TxButton';
 import * as JoyForms from '@polkadot/joy-utils/forms';
 import { SubmittableResult } from '@polkadot/api';
-import { MemberId, UserInfo, Profile, PaidTermId, PaidMembershipTerms } from '@joystream/types/lib/members';
-import { OptionText } from '@joystream/types/lib/';
+import { MemberId, UserInfo, Profile, PaidTermId, PaidMembershipTerms } from '@joystream/types/members';
+import { OptionText } from '@joystream/types/';
 import { MyAccountProps, withMyAccount } from '@polkadot/joy-utils/MyAccount';
 import { queryMembershipToProp } from './utils';
 import { withCalls } from '@polkadot/react-api/index';

+ 1 - 1
pioneer/packages/joy-members/src/List.tsx

@@ -7,7 +7,7 @@ import { I18nProps } from '@polkadot/react-components/types';
 import Section from '@polkadot/joy-utils/Section';
 import translate from './translate';
 import Details from './Details';
-import { MemberId } from '@joystream/types/lib/members';
+import { MemberId } from '@joystream/types/members';
 import { RouteComponentProps, Redirect } from 'react-router-dom';
 import { Pagination, Icon, PaginationProps } from 'semantic-ui-react';
 import styled from 'styled-components';

+ 2 - 2
pioneer/packages/joy-members/src/MemberPreview.tsx

@@ -9,9 +9,9 @@ import { AccountId } from '@polkadot/types/interfaces';
 import IdentityIcon from '@polkadot/react-components/IdentityIcon';
 
 import translate from './translate';
-import { MemberId, Profile } from '@joystream/types/lib/members';
+import { MemberId, Profile } from '@joystream/types/members';
 import { queryMembershipToProp } from './utils';
-import { Seat } from '@joystream/types/lib/';
+import { Seat } from '@joystream/types/';
 import { nonEmptyStr, queryToProp } from '@polkadot/joy-utils/index';
 import { FlexCenter } from '@polkadot/joy-utils/FlexCenter';
 import { MutedSpan } from '@polkadot/joy-utils/MutedText';

+ 3 - 3
pioneer/packages/joy-proposals/src/Proposal/Body.tsx

@@ -5,12 +5,12 @@ import { blake2AsHex } from '@polkadot/util-crypto';
 import styled from 'styled-components';
 import AddressMini from '@polkadot/react-components/AddressMiniJoy';
 import TxButton from '@polkadot/joy-utils/TxButton';
-import { ProposalId } from "@joystream/types/lib/proposals";
-import { MemberId } from "@joystream/types/lib/members";
+import { ProposalId } from "@joystream/types/proposals";
+import { MemberId } from "@joystream/types/members";
 import ProfilePreview from "@polkadot/joy-utils/MemberProfilePreview";
 import { useTransport } from "../runtime";
 import { usePromise } from "../utils";
-import { Profile } from "@joystream/types/lib/members";
+import { Profile } from "@joystream/types/members";
 import { Option } from "@polkadot/types/";
 import { formatBalance } from "@polkadot/util";
 import PromiseComponent from "./PromiseComponent";

+ 3 - 3
pioneer/packages/joy-proposals/src/Proposal/ProposalDetails.tsx

@@ -11,10 +11,10 @@ import { withCalls } from '@polkadot/react-api';
 import { withMulti } from '@polkadot/react-api/with';
 
 import "./Proposal.css";
-import { ProposalId, ProposalDecisionStatuses, ApprovedProposalStatuses, ExecutionFailedStatus } from "@joystream/types/lib/proposals";
+import { ProposalId, ProposalDecisionStatuses, ApprovedProposalStatuses, ExecutionFailedStatus } from "@joystream/types/proposals";
 import { BlockNumber } from '@polkadot/types/interfaces'
-import { MemberId } from "@joystream/types/lib/members";
-import { Seat } from "@joystream/types/lib/";
+import { MemberId } from "@joystream/types/members";
+import { Seat } from "@joystream/types/";
 import PromiseComponent from './PromiseComponent';
 
 type BasicProposalStatus = 'Active' | 'Finalized';

+ 1 - 1
pioneer/packages/joy-proposals/src/Proposal/Votes.tsx

@@ -2,7 +2,7 @@ import React from "react";
 import { Header, Divider, Table, Icon } from "semantic-ui-react";
 import useVoteStyles from "./useVoteStyles";
 import { ProposalVote } from "../runtime";
-import { VoteKind } from "@joystream/types/lib/proposals";
+import { VoteKind } from "@joystream/types/proposals";
 import { VoteKindStr } from "./VotingSection";
 import ProfilePreview from "@polkadot/joy-utils/MemberProfilePreview";
 

+ 4 - 4
pioneer/packages/joy-proposals/src/Proposal/VotingSection.tsx

@@ -3,12 +3,12 @@ import React, { useState } from "react";
 import { Icon, Button, Message, Divider, Header } from "semantic-ui-react";
 import useVoteStyles from "./useVoteStyles";
 import TxButton from "@polkadot/joy-utils/TxButton";
-import { MemberId } from "@joystream/types/lib/members";
-import { ProposalId } from "@joystream/types/lib/proposals";
+import { MemberId } from "@joystream/types/members";
+import { ProposalId } from "@joystream/types/proposals";
 import { useTransport } from "../runtime";
-import { VoteKind } from '@joystream/types/lib/proposals';
+import { VoteKind } from '@joystream/types/proposals';
 import { usePromise } from "../utils";
-import { VoteKinds } from "@joystream/types/lib/proposals";
+import { VoteKinds } from "@joystream/types/proposals";
 
 export type VoteKindStr = typeof VoteKinds[number];
 

+ 1 - 1
pioneer/packages/joy-proposals/src/forms/GenericProposalForm.tsx

@@ -17,7 +17,7 @@ import { ProposalType } from "../runtime";
 import { calculateStake } from "../utils";
 import { formatBalance } from "@polkadot/util"
 import "./forms.css";
-import { ProposalId } from "@joystream/types/lib/proposals";
+import { ProposalId } from "@joystream/types/proposals";
 
 
 // Generic form values

+ 1 - 1
pioneer/packages/joy-proposals/src/forms/SetContentWorkingGroupLeadForm.tsx

@@ -17,7 +17,7 @@ import { FormField } from "./FormFields";
 import { withFormContainer } from "./FormContainer";
 import { useTransport } from "../runtime";
 import { usePromise } from "../utils";
-import { Profile } from "@joystream/types/lib/members";
+import { Profile } from "@joystream/types/members";
 import PromiseComponent from "../Proposal/PromiseComponent";
 import _ from 'lodash';
 import "./forms.css";

+ 1 - 1
pioneer/packages/joy-proposals/src/forms/SetCouncilParamsForm.tsx

@@ -19,7 +19,7 @@ import { createType } from "@polkadot/types";
 import "./forms.css";
 import { useTransport } from "../runtime";
 import { usePromise, snakeCaseToCamelCase } from "../utils";
-import { ElectionParameters } from "@joystream/types/lib/proposals";
+import { ElectionParameters } from "@joystream/types/proposals";
 import PromiseComponent from "../Proposal/PromiseComponent";
 
 type FormValues = GenericFormValues & {

+ 4 - 4
pioneer/packages/joy-proposals/src/runtime/transport.substrate.ts

@@ -7,8 +7,8 @@ import {
   ProposalVote,
   IStorageRoleParameters
 } from "./transport";
-import { Proposal, ProposalId, Seats, VoteKind, ElectionParameters } from "@joystream/types/lib/proposals";
-import { MemberId, Profile, ActorInRole, RoleKeys, Role } from "@joystream/types/lib/members";
+import { Proposal, ProposalId, Seats, VoteKind, ElectionParameters } from "@joystream/types/proposals";
+import { MemberId, Profile, ActorInRole, RoleKeys, Role } from "@joystream/types/members";
 import { ApiProps } from "@polkadot/react-api/types";
 import { u32, u128, Vec, Option } from "@polkadot/types/";
 import { Balance, Moment, AccountId, BlockNumber, BalanceOf } from "@polkadot/types/interfaces";
@@ -17,8 +17,8 @@ import { ApiPromise } from "@polkadot/api";
 import { FIRST_MEMBER_ID } from "@polkadot/joy-members/constants";
 
 import { includeKeys, calculateStake, calculateMetaFromType, splitOnUpperCase } from "../utils";
-import { MintId, Mint } from "@joystream/types/lib/mint";
-import { LeadId } from "@joystream/types/lib/content-working-group";
+import { MintId, Mint } from "@joystream/types/mint";
+import { LeadId } from "@joystream/types/content-working-group";
 
 export class SubstrateTransport extends Transport {
   protected api: ApiPromise;

+ 2 - 2
pioneer/packages/joy-proposals/src/runtime/transport.ts

@@ -1,5 +1,5 @@
-import { ProposalId, VoteKind } from "@joystream/types/lib/proposals";
-import { MemberId } from "@joystream/types/lib/members";
+import { ProposalId, VoteKind } from "@joystream/types/proposals";
+import { MemberId } from "@joystream/types/members";
 export const ProposalTypes = [
   "Text",
   "RuntimeUpgrade",

+ 1 - 1
pioneer/packages/joy-proposals/src/stories/data/ProposalDetails.mock.ts

@@ -1,5 +1,5 @@
 import { ParsedProposal } from "../../runtime";
-import { ProposalId } from "@joystream/types/lib/proposals"
+import { ProposalId } from "@joystream/types/proposals"
 
 const mockedProposal: ParsedProposal = {
   id: new ProposalId(100),

+ 1 - 1
pioneer/packages/joy-proposals/src/utils.ts

@@ -2,7 +2,7 @@ import { useState, useEffect, useCallback } from "react";
 import { ProposalType } from "./runtime";
 import { Category } from "./Proposal/ChooseProposalType";
 import { useTransport, ParsedProposal, ProposalVote } from "./runtime";
-import { ProposalId } from "@joystream/types/lib/proposals";
+import { ProposalId } from "@joystream/types/proposals";
 
 type ProposalMeta = {
   description: string;

+ 1 - 1
pioneer/packages/joy-roles/src/classifiers.spec.ts

@@ -6,7 +6,7 @@ import {
   StakingPolicy,
   Opening, OpeningStage,
   ReviewPeriod,
-} from "@joystream/types/lib/hiring"
+} from "@joystream/types/hiring"
 
 import {
   OpeningState,

+ 1 - 1
pioneer/packages/joy-roles/src/classifiers.ts

@@ -17,7 +17,7 @@ import {
   ApplicationDeactivationCause, ApplicationDeactivationCauseKeys,
   UnstakingApplicationStage,
   InactiveApplicationStage,
-} from "@joystream/types/lib/hiring"
+} from "@joystream/types/hiring"
 
 import {
   StakeRequirement,

+ 1 - 1
pioneer/packages/joy-roles/src/elements.stories.tsx

@@ -5,7 +5,7 @@ import { Table } from 'semantic-ui-react';
 
 import { u128, Text } from '@polkadot/types'
 
-import { Actor } from '@joystream/types/lib/roles'
+import { Actor } from '@joystream/types/roles'
 
 import { BalanceView, GroupMemberView, HandleView, MemberView, MemoView } from './elements'
 

+ 3 - 3
pioneer/packages/joy-roles/src/elements.tsx

@@ -6,10 +6,10 @@ import { Link } from 'react-router-dom';
 import { Balance } from '@polkadot/types/interfaces';
 import { formatBalance } from '@polkadot/util';
 import Identicon from '@polkadot/react-identicon';
-import { Actor } from '@joystream/types/lib/roles';
-import { IProfile, MemberId } from '@joystream/types/lib/members';
+import { Actor } from '@joystream/types/roles';
+import { IProfile, MemberId } from '@joystream/types/members';
 import { Text, GenericAccountId } from '@polkadot/types';
-import { LeadRoleState } from '@joystream/types/lib/content-working-group';
+import { LeadRoleState } from '@joystream/types/content-working-group';
 
 type ActorProps = {
   actor: Actor

+ 1 - 1
pioneer/packages/joy-roles/src/flows/apply.controller.tsx

@@ -7,7 +7,7 @@ import AccountId from '@polkadot/types/primitive/Generic/AccountId';
 
 import { Controller, View } from '@polkadot/joy-utils/index'
 
-import { GenericJoyStreamRoleSchema } from '@joystream/types/lib/hiring/schemas/role.schema.typings'
+import { GenericJoyStreamRoleSchema } from '@joystream/types/hiring/schemas/role.schema.typings'
 
 import { Container } from 'semantic-ui-react'
 

+ 1 - 1
pioneer/packages/joy-roles/src/flows/apply.elements.stories.tsx

@@ -8,7 +8,7 @@ import { Balance } from '@polkadot/types/interfaces';
 
 import {
   ApplicationDetails
-} from '@joystream/types/lib/schemas/role.schema'
+} from '@joystream/types/schemas/role.schema'
 import {
   ConfirmStakesStage, ConfirmStakesStageProps,
   ProgressStepsView, ProgressStepsProps, ProgressSteps,

+ 2 - 2
pioneer/packages/joy-roles/src/flows/apply.tsx

@@ -34,7 +34,7 @@ import { Slider } from "react-semantic-ui-range";
 import Identicon from '@polkadot/react-identicon';
 import AccountId from '@polkadot/types/primitive/Generic/AccountId';
 
-import { GenericJoyStreamRoleSchema } from '@joystream/types/lib/hiring/schemas/role.schema.typings'
+import { GenericJoyStreamRoleSchema } from '@joystream/types/hiring/schemas/role.schema.typings'
 
 import {
   OpeningBodyApplicationsStatus, OpeningStakeAndApplicationStatus,
@@ -46,7 +46,7 @@ import {
   ApplicationDetails,
   QuestionField,
   QuestionSection,
-} from '@joystream/types/lib/hiring/schemas/role.schema.typings'
+} from '@joystream/types/hiring/schemas/role.schema.typings'
 
 import { Loadable } from '@polkadot/joy-utils/index'
 import { Add } from '../balances'

+ 1 - 1
pioneer/packages/joy-roles/src/mocks.ts

@@ -1,7 +1,7 @@
 import { bool, Option, Text, u32, u64, Vec } from '@polkadot/types'
 import AccountId from '@polkadot/types/primitive/Generic/AccountId';
 
-import { ActorInRole, IProfile, EntryMethod } from '@joystream/types/lib/members';
+import { ActorInRole, IProfile, EntryMethod } from '@joystream/types/members';
 
 export function mockProfile(name: string, avatar_uri: string = ""): IProfile {
   return {

+ 5 - 5
pioneer/packages/joy-roles/src/tabs/Admin.controller.tsx

@@ -40,23 +40,23 @@ import {
   OpeningStage,
   StakingPolicy,
   StakingAmountLimitModeKeys,
-} from '@joystream/types/lib/hiring'
+} from '@joystream/types/hiring'
 
 import {
   Profile,
   MemberId,
-} from '@joystream/types/lib/members'
+} from '@joystream/types/members'
 
-import { Stake, StakeId } from '@joystream/types/lib/stake'
+import { Stake, StakeId } from '@joystream/types/stake'
 
 import {
   GenericJoyStreamRoleSchema,
-} from '@joystream/types/lib/hiring/schemas/role.schema.typings'
+} from '@joystream/types/hiring/schemas/role.schema.typings'
 import {
   CuratorApplication, CuratorApplicationId,
   CuratorOpening,
   OpeningPolicyCommitment, IOpeningPolicyCommitment,
-} from '@joystream/types/lib/content-working-group'
+} from '@joystream/types/content-working-group'
 
 import {
   classifyOpeningStage,

+ 1 - 1
pioneer/packages/joy-roles/src/tabs/MyRoles.elements.stories.tsx

@@ -30,7 +30,7 @@ import {
 } from './Opportunities.stories'
 import { OpeningState } from "../classifiers"
 
-import { CuratorId } from '@joystream/types/lib/content-working-group';
+import { CuratorId } from '@joystream/types/content-working-group';
 
 export default {
   title: 'Roles / Components / My roles tab / Elements',

+ 3 - 3
pioneer/packages/joy-roles/src/tabs/MyRoles.tsx

@@ -22,8 +22,8 @@ import { Balance } from '@polkadot/types/interfaces';
 
 import { Loadable } from '@polkadot/joy-utils/index'
 
-import { GenericJoyStreamRoleSchema } from '@joystream/types/lib/hiring/schemas/role.schema.typings'
-import { Opening } from "@joystream/types/lib/hiring"
+import { GenericJoyStreamRoleSchema } from '@joystream/types/hiring/schemas/role.schema.typings'
+import { Opening } from "@joystream/types/hiring"
 
 import {
   OpeningBodyReviewInProgress,
@@ -34,7 +34,7 @@ import {
 } from '../openingStateMarkup'
 import { CancelledReason, OpeningStageClassification, OpeningState } from "../classifiers"
 import { OpeningMetadata } from "../OpeningMetadata"
-import { CuratorId } from '@joystream/types/lib/content-working-group';
+import { CuratorId } from '@joystream/types/content-working-group';
 
 type CTACallback = (rationale: string) => void
 

+ 1 - 1
pioneer/packages/joy-roles/src/tabs/Opportunities.controller.tsx

@@ -4,7 +4,7 @@ import { Controller, View } from '@polkadot/joy-utils/index'
 
 import { ITransport } from '../transport'
 
-import { MemberId } from '@joystream/types/lib/members';
+import { MemberId } from '@joystream/types/members';
 
 import {
   WorkingGroupOpening,

+ 1 - 1
pioneer/packages/joy-roles/src/tabs/Opportunities.stories.tsx

@@ -11,7 +11,7 @@ import {
   ActiveOpeningStage,
   ApplicationRationingPolicy,
   StakingPolicy,
-} from "@joystream/types/lib/hiring"
+} from "@joystream/types/hiring"
 import {
   OpeningView,
   OpeningStakeAndApplicationStatus,

+ 3 - 3
pioneer/packages/joy-roles/src/tabs/Opportunities.tsx

@@ -24,9 +24,9 @@ import { useMyAccount } from '@polkadot/joy-utils/MyAccountContext'
 
 import { Countdown } from '../elements'
 import { ApplicationStakeRequirement, RoleStakeRequirement } from '../StakeRequirement'
-import { GenericJoyStreamRoleSchema } from '@joystream/types/lib/hiring/schemas/role.schema.typings'
-import { Opening } from "@joystream/types/lib/hiring"
-import { MemberId } from '@joystream/types/lib/members';
+import { GenericJoyStreamRoleSchema } from '@joystream/types/hiring/schemas/role.schema.typings'
+import { Opening } from "@joystream/types/hiring"
+import { MemberId } from '@joystream/types/members';
 
 import { OpeningStageClassification, OpeningState } from "../classifiers"
 import { OpeningMetadataProps } from "../OpeningMetadata"

+ 1 - 1
pioneer/packages/joy-roles/src/tabs/Opportunity.controller.tsx

@@ -4,7 +4,7 @@ import { Controller, memoize, View } from '@polkadot/joy-utils/index'
 
 import { ITransport } from '../transport'
 
-import { MemberId } from '@joystream/types/lib/members';
+import { MemberId } from '@joystream/types/members';
 
 import {
   WorkingGroupOpening,

+ 2 - 2
pioneer/packages/joy-roles/src/tabs/WorkingGroup.stories.tsx

@@ -4,8 +4,8 @@ import { boolean, number, text, withKnobs } from '@storybook/addon-knobs'
 import { Balance } from '@polkadot/types/interfaces'
 import { Text, u128, GenericAccountId } from '@polkadot/types'
 
-import { Actor } from '@joystream/types/lib/roles'
-import { IProfile, MemberId } from '@joystream/types/lib/members';
+import { Actor } from '@joystream/types/roles'
+import { IProfile, MemberId } from '@joystream/types/members';
 
 import { ContentCurators, StorageAndDistribution } from "@polkadot/joy-roles/tabs/WorkingGroup"
 import { GroupMember } from "../elements"

+ 2 - 2
pioneer/packages/joy-roles/src/tabs/WorkingGroup.tsx

@@ -3,8 +3,8 @@ import { Button, Card, Icon, Message, SemanticICONS, Table } from 'semantic-ui-r
 import { Link } from 'react-router-dom';
 
 import { Balance } from '@polkadot/types/interfaces';
-import { Actor } from '@joystream/types/lib/roles';
-import { IProfile } from '@joystream/types/lib/members';
+import { Actor } from '@joystream/types/roles';
+import { IProfile } from '@joystream/types/members';
 import { Text } from '@polkadot/types';
 
 import { ActorDetailsView, MemberView, GroupMemberView, GroupLeadView } from "../elements"

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä