Bläddra i källkod

Update @joystream/types

Leszek Wiesner 3 år sedan
förälder
incheckning
c4e57cd8c9

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
types/augment-codec/all.ts


+ 176 - 7
types/augment-codec/augment-api-consts.ts

@@ -3,7 +3,7 @@
 
 import type { Vec, u32, u64, u8 } from '@polkadot/types';
 import type { MaxNumber, ProposalParameters } from './all';
-import type { Balance, BalanceOf, BlockNumber, Moment, Perbill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime';
+import type { Balance, BalanceOf, BlockNumber, LockIdentifier, Moment, Perbill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime';
 import type { SessionIndex } from '@polkadot/types/interfaces/session';
 import type { EraIndex } from '@polkadot/types/interfaces/staking';
 import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
@@ -33,6 +33,10 @@ declare module '@polkadot/api/types/consts' {
       existentialDeposit: Balance & AugmentedConst<ApiType>;
     };
     bounty: {
+      /**
+       * Exports const - bounty lock id.
+       **/
+      bountyLockId: LockIdentifier & AugmentedConst<ApiType>;
       /**
        * Exports const - max work entry number for a closed assurance type contract bounty.
        **/
@@ -58,9 +62,30 @@ declare module '@polkadot/api/types/consts' {
     };
     contentDirectoryWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     council: {
       /**
@@ -71,6 +96,14 @@ declare module '@polkadot/api/types/consts' {
        * Interval between automatic budget refills.
        **/
       budgetRefillPeriod: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Exports const - candidacy lock id.
+       **/
+      candidacyLockId: LockIdentifier & AugmentedConst<ApiType>;
+      /**
+       * Exports const - candidacy lock id.
+       **/
+      councilorLockId: LockIdentifier & AugmentedConst<ApiType>;
       /**
        * Council member count
        **/
@@ -103,19 +136,76 @@ declare module '@polkadot/api/types/consts' {
        **/
       windowSize: BlockNumber & AugmentedConst<ApiType>;
     };
+    forum: {
+      /**
+       * Exports const
+       * Deposit needed to create a post
+       **/
+      postDeposit: BalanceOf & AugmentedConst<ApiType>;
+      /**
+       * Deposit needed to create a thread
+       **/
+      threadDeposit: BalanceOf & AugmentedConst<ApiType>;
+    };
     forumWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     gatewayWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     members: {
+      /**
+       * Exports const - Stake needed to candidate as staking account.
+       **/
+      candidateStake: BalanceOf & AugmentedConst<ApiType>;
       /**
        * Exports const - default balance for the invited member.
        **/
@@ -124,22 +214,72 @@ declare module '@polkadot/api/types/consts' {
        * Exports const - default membership fee.
        **/
       defaultMembershipPrice: BalanceOf & AugmentedConst<ApiType>;
+      /**
+       * Exports const - invited member lock id.
+       **/
+      invitedMemberLockId: LockIdentifier & AugmentedConst<ApiType>;
       /**
        * Exports const - maximum percent value of the membership fee for the referral cut.
        **/
       referralCutMaximumPercent: u8 & AugmentedConst<ApiType>;
+      /**
+       * Exports const - staking candidate lock id.
+       **/
+      stakingCandidateLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     membershipWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     operationsWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     proposalsCodex: {
       /**
@@ -237,6 +377,10 @@ declare module '@polkadot/api/types/consts' {
        * be slashed (burned).
        **/
       rejectionFee: BalanceOf & AugmentedConst<ApiType>;
+      /**
+       * Exports const - staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
       /**
        * Exports const -  max allowed proposal title length.
        **/
@@ -256,6 +400,10 @@ declare module '@polkadot/api/types/consts' {
        * Duration of revealing stage (number of blocks)
        **/
       revealStageDuration: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Exports const - staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
       /**
        * Duration of voting stage (number of blocks)
        **/
@@ -308,9 +456,30 @@ declare module '@polkadot/api/types/consts' {
     };
     storageWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     system: {
       /**

+ 9 - 8
types/augment-codec/augment-api-events.ts

@@ -1,9 +1,9 @@
 // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
 /* eslint-disable */
 
-import type { BTreeSet, Bytes, Option, Text, Vec, bool, u32, u64, u8 } from '@polkadot/types';
+import type { BTreeMap, BTreeSet, Bytes, Option, Text, Vec, bool, u32, u64, u8 } from '@polkadot/types';
 import type { ITuple } from '@polkadot/types/types';
-import type { ActorId, ApplicationId, ApplicationIdToWorkerIdMap, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, Channel, ChannelCategory, ChannelCategoryCreationParameters, ChannelCategoryId, ChannelCategoryUpdateParameters, ChannelCreationParameters, ChannelId, ChannelOwnershipTransferRequest, ChannelOwnershipTransferRequestId, ChannelUpdateParameters, ContentActor, ContentId, ContentParameters, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, EntryId, ExecutionStatus, ForumUserId, GeneralProposalParameters, InviteMembershipParameters, IsCensored, MemberId, MemoText, ModeratorId, NewAsset, OpeningId, OpeningType, OptionResult, OracleJudgment, ParticipantId, PersonCreationParameters, PersonId, PersonUpdateParameters, PlaylistCreationParameters, PlaylistId, PlaylistUpdateParameters, Poll, PostId, PostReactionId, PrivilegedActor, ProposalDecision, ProposalDetailsOf, ProposalId, ProposalStatus, ReplyId, RewardPaymentType, Series, SeriesId, SeriesParameters, StakePolicy, StorageObjectOwner, StorageProviderId, ThreadId, ThreadMode, Title, UpdatedBody, UpdatedTitle, UploadingStatus, VideoCategoryCreationParameters, VideoCategoryId, VideoCategoryUpdateParameters, VideoCreationParameters, VideoId, VideoUpdateParameters, VoteKind, VoucherLimit, WorkerId, WorkingGroup } from './all';
+import type { ActorId, ApplicationId, ApplicationIdToWorkerIdMap, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, Channel, ChannelCategory, ChannelCategoryCreationParameters, ChannelCategoryId, ChannelCategoryUpdateParameters, ChannelCreationParameters, ChannelId, ChannelOwnershipTransferRequest, ChannelOwnershipTransferRequestId, ChannelUpdateParameters, ContentActor, ContentId, ContentParameters, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, EntryId, ExecutionStatus, ForumUserId, GeneralProposalParameters, InviteMembershipParameters, IsCensored, MemberId, MemoText, ModeratorId, NewAsset, OpeningId, OpeningType, OptionResult, OracleJudgment, ParticipantId, PersonCreationParameters, PersonId, PersonUpdateParameters, PlaylistCreationParameters, PlaylistId, PlaylistUpdateParameters, PollInput, PostId, PostReactionId, PrivilegedActor, ProposalDecision, ProposalDetailsOf, ProposalId, ProposalStatus, ReplyId, RewardPaymentType, Series, SeriesId, SeriesParameters, StakePolicy, StorageObjectOwner, StorageProviderId, ThreadId, ThreadMode, Title, UpdatedBody, UpdatedTitle, UploadingStatus, VideoCategoryCreationParameters, VideoCategoryId, VideoCategoryUpdateParameters, VideoCreationParameters, VideoId, VideoUpdateParameters, VoteKind, VoucherLimit, WorkerId, WorkingGroup } from './all';
 import type { BalanceStatus } from '@polkadot/types/interfaces/balances';
 import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
 import type { AuthorityList } from '@polkadot/types/interfaces/grandpa';
@@ -622,7 +622,7 @@ declare module '@polkadot/api/types/events' {
       /**
        * Post with givne id was deleted.
        **/
-      PostDeleted: AugmentedEvent<ApiType, [Bytes, ForumUserId, Vec<ITuple<[CategoryId, ThreadId, PostId, bool]>>]>;
+      PostDeleted: AugmentedEvent<ApiType, [Bytes, ForumUserId, BTreeMap<ITuple<[CategoryId, ThreadId, PostId]>, bool>]>;
       /**
        * Post with givne id was moderated.
        **/
@@ -638,12 +638,17 @@ declare module '@polkadot/api/types/events' {
       PostTextUpdated: AugmentedEvent<ApiType, [PostId, ForumUserId, CategoryId, ThreadId, Bytes]>;
       /**
        * A thread with given id was created.
+       * A third argument reflects the initial post id of the thread.
        **/
-      ThreadCreated: AugmentedEvent<ApiType, [ThreadId, ForumUserId, CategoryId, Bytes, Bytes, Option<Poll>]>;
+      ThreadCreated: AugmentedEvent<ApiType, [CategoryId, ThreadId, PostId, ForumUserId, Bytes, Bytes, Option<PollInput>]>;
       /**
        * A thread was deleted.
        **/
       ThreadDeleted: AugmentedEvent<ApiType, [ThreadId, ForumUserId, CategoryId, bool]>;
+      /**
+       * A thread metadata given id was updated.
+       **/
+      ThreadMetadataUpdated: AugmentedEvent<ApiType, [ThreadId, ForumUserId, CategoryId, Bytes]>;
       /**
        * A thread with given id was moderated.
        **/
@@ -652,10 +657,6 @@ declare module '@polkadot/api/types/events' {
        * A thread was moved to new category
        **/
       ThreadMoved: AugmentedEvent<ApiType, [ThreadId, CategoryId, PrivilegedActor, CategoryId]>;
-      /**
-       * A thread with given id was moderated.
-       **/
-      ThreadTitleUpdated: AugmentedEvent<ApiType, [ThreadId, ForumUserId, CategoryId, Bytes]>;
       /**
        * A thread with given id was updated.
        * The second argument reflects the new archival status of the thread.

+ 5 - 5
types/augment-codec/augment-api-tx.ts

@@ -1,9 +1,9 @@
 // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
 /* eslint-disable */
 
-import type { BTreeSet, Bytes, Compact, Option, Vec, bool, u16, u32, u64, u8 } from '@polkadot/types';
+import type { BTreeMap, BTreeSet, Bytes, Compact, Option, Vec, bool, u16, u32, u64, u8 } from '@polkadot/types';
 import type { AnyNumber, ITuple } from '@polkadot/types/types';
-import type { ActorId, ApplicationId, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, ChannelCategoryCreationParameters, ChannelCategoryId, ChannelCategoryUpdateParameters, ChannelCreationParameters, ChannelId, ChannelOwnershipTransferRequest, ChannelOwnershipTransferRequestId, ChannelUpdateParameters, ContentActor, ContentId, ContentParameters, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, EntryId, ForumUserId, FundingRequestParameters, GeneralProposalParameters, InviteMembershipParameters, MemberId, MemoText, ModeratorId, ObjectOwner, OpeningId, OpeningType, OracleJudgment, ParticipantId, PersonActor, PersonCreationParameters, PersonId, PersonUpdateParameters, PlaylistCreationParameters, PlaylistId, PlaylistUpdateParameters, Poll, PostId, PostReactionId, PrivilegedActor, ProposalDetailsOf, ProposalId, ReplyId, ReplyToDelete, SeriesId, SeriesParameters, StakePolicy, StorageProviderId, ThreadId, ThreadMode, VideoCategoryCreationParameters, VideoCategoryId, VideoCategoryUpdateParameters, VideoCreationParameters, VideoId, VideoUpdateParameters, VoteKind, WorkerId, WorkingGroup } from './all';
+import type { ActorId, ApplicationId, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, ChannelCategoryCreationParameters, ChannelCategoryId, ChannelCategoryUpdateParameters, ChannelCreationParameters, ChannelId, ChannelOwnershipTransferRequest, ChannelOwnershipTransferRequestId, ChannelUpdateParameters, ContentActor, ContentId, ContentParameters, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, EntryId, ForumUserId, FundingRequestParameters, GeneralProposalParameters, InviteMembershipParameters, MemberId, MemoText, ModeratorId, ObjectOwner, OpeningId, OpeningType, OracleJudgment, ParticipantId, PersonActor, PersonCreationParameters, PersonId, PersonUpdateParameters, PlaylistCreationParameters, PlaylistId, PlaylistUpdateParameters, PollInput, PostId, PostReactionId, PrivilegedActor, ProposalDetailsOf, ProposalId, ReplyId, ReplyToDelete, SeriesId, SeriesParameters, StakePolicy, StorageProviderId, ThreadId, ThreadMode, VideoCategoryCreationParameters, VideoCategoryId, VideoCategoryUpdateParameters, VideoCreationParameters, VideoId, VideoUpdateParameters, VoteKind, WorkerId, WorkingGroup } from './all';
 import type { BabeEquivocationProof } from '@polkadot/types/interfaces/babe';
 import type { Extrinsic, Signature } from '@polkadot/types/interfaces/extrinsics';
 import type { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa';
@@ -862,7 +862,7 @@ declare module '@polkadot/api/types/submittable' {
        * - O(W)
        * # </weight>
        **/
-      createThread: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, text: Bytes | string | Uint8Array, poll: Option<Poll> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, CategoryId, Bytes, Bytes, Option<Poll>]>;
+      createThread: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array, text: Bytes | string | Uint8Array, pollInput: Option<PollInput> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, CategoryId, Bytes, Bytes, Option<PollInput>]>;
       /**
        * Delete category
        * 
@@ -891,7 +891,7 @@ declare module '@polkadot/api/types/submittable' {
        * - O(W + P)
        * # </weight>
        **/
-      deletePosts: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, posts: Vec<ITuple<[CategoryId, ThreadId, PostId, bool]>> | ([CategoryId | AnyNumber | Uint8Array, ThreadId | AnyNumber | Uint8Array, PostId | AnyNumber | Uint8Array, bool | boolean | Uint8Array])[], rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, Vec<ITuple<[CategoryId, ThreadId, PostId, bool]>>, Bytes]>;
+      deletePosts: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, posts: BTreeMap<ITuple<[CategoryId, ThreadId, PostId]>, bool>, rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, BTreeMap<ITuple<[CategoryId, ThreadId, PostId]>, bool>, Bytes]>;
       /**
        * Delete thread
        * 
@@ -932,7 +932,7 @@ declare module '@polkadot/api/types/submittable' {
        * - O(W)
        * # </weight>
        **/
-      editThreadTitle: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newTitle: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, CategoryId, ThreadId, Bytes]>;
+      editThreadMetadata: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newMetadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, CategoryId, ThreadId, Bytes]>;
       /**
        * Moderate post
        * 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
types/augment-codec/augment-types.ts


+ 9 - 0
types/augment/all/defs.json

@@ -139,6 +139,15 @@
             "Moderator": "ModeratorId"
         }
     },
+    "PollAlternativeInput": {
+        "alternative_text": "Bytes",
+        "vote_count": "u32"
+    },
+    "PollInput": {
+        "description": "Bytes",
+        "end_time": "u64",
+        "poll_alternatives": "Vec<PollAlternativeInput>"
+    },
     "ThreadOf": {
         "title_hash": "Hash",
         "category_id": "CategoryId",

+ 13 - 0
types/augment/all/types.ts

@@ -582,6 +582,19 @@ export interface PollAlternative extends Struct {
   readonly vote_count: u32;
 }
 
+/** @name PollAlternativeInput */
+export interface PollAlternativeInput extends Struct {
+  readonly alternative_text: Bytes;
+  readonly vote_count: u32;
+}
+
+/** @name PollInput */
+export interface PollInput extends Struct {
+  readonly description: Bytes;
+  readonly end_time: u64;
+  readonly poll_alternatives: Vec<PollAlternativeInput>;
+}
+
 /** @name Post */
 export interface Post extends Struct {
   readonly thread_id: ThreadId;

+ 176 - 7
types/augment/augment-api-consts.ts

@@ -3,7 +3,7 @@
 
 import type { Vec, u32, u64, u8 } from '@polkadot/types';
 import type { MaxNumber, ProposalParameters } from './all';
-import type { Balance, BalanceOf, BlockNumber, Moment, Perbill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime';
+import type { Balance, BalanceOf, BlockNumber, LockIdentifier, Moment, Perbill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime';
 import type { SessionIndex } from '@polkadot/types/interfaces/session';
 import type { EraIndex } from '@polkadot/types/interfaces/staking';
 import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
@@ -33,6 +33,10 @@ declare module '@polkadot/api/types/consts' {
       existentialDeposit: Balance & AugmentedConst<ApiType>;
     };
     bounty: {
+      /**
+       * Exports const - bounty lock id.
+       **/
+      bountyLockId: LockIdentifier & AugmentedConst<ApiType>;
       /**
        * Exports const - max work entry number for a closed assurance type contract bounty.
        **/
@@ -58,9 +62,30 @@ declare module '@polkadot/api/types/consts' {
     };
     contentDirectoryWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     council: {
       /**
@@ -71,6 +96,14 @@ declare module '@polkadot/api/types/consts' {
        * Interval between automatic budget refills.
        **/
       budgetRefillPeriod: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Exports const - candidacy lock id.
+       **/
+      candidacyLockId: LockIdentifier & AugmentedConst<ApiType>;
+      /**
+       * Exports const - candidacy lock id.
+       **/
+      councilorLockId: LockIdentifier & AugmentedConst<ApiType>;
       /**
        * Council member count
        **/
@@ -103,19 +136,76 @@ declare module '@polkadot/api/types/consts' {
        **/
       windowSize: BlockNumber & AugmentedConst<ApiType>;
     };
+    forum: {
+      /**
+       * Exports const
+       * Deposit needed to create a post
+       **/
+      postDeposit: BalanceOf & AugmentedConst<ApiType>;
+      /**
+       * Deposit needed to create a thread
+       **/
+      threadDeposit: BalanceOf & AugmentedConst<ApiType>;
+    };
     forumWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     gatewayWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     members: {
+      /**
+       * Exports const - Stake needed to candidate as staking account.
+       **/
+      candidateStake: BalanceOf & AugmentedConst<ApiType>;
       /**
        * Exports const - default balance for the invited member.
        **/
@@ -124,22 +214,72 @@ declare module '@polkadot/api/types/consts' {
        * Exports const - default membership fee.
        **/
       defaultMembershipPrice: BalanceOf & AugmentedConst<ApiType>;
+      /**
+       * Exports const - invited member lock id.
+       **/
+      invitedMemberLockId: LockIdentifier & AugmentedConst<ApiType>;
       /**
        * Exports const - maximum percent value of the membership fee for the referral cut.
        **/
       referralCutMaximumPercent: u8 & AugmentedConst<ApiType>;
+      /**
+       * Exports const - staking candidate lock id.
+       **/
+      stakingCandidateLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     membershipWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     operationsWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     proposalsCodex: {
       /**
@@ -237,6 +377,10 @@ declare module '@polkadot/api/types/consts' {
        * be slashed (burned).
        **/
       rejectionFee: BalanceOf & AugmentedConst<ApiType>;
+      /**
+       * Exports const - staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
       /**
        * Exports const -  max allowed proposal title length.
        **/
@@ -256,6 +400,10 @@ declare module '@polkadot/api/types/consts' {
        * Duration of revealing stage (number of blocks)
        **/
       revealStageDuration: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Exports const - staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
       /**
        * Duration of voting stage (number of blocks)
        **/
@@ -308,9 +456,30 @@ declare module '@polkadot/api/types/consts' {
     };
     storageWorkingGroup: {
       /**
-       * Exports const -  max simultaneous active worker number.
+       * Stake needed to create an opening.
+       **/
+      leaderOpeningStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Exports const
+       * Max simultaneous active worker number.
        **/
       maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>;
+      /**
+       * Minimum stake required for applying into an opening.
+       **/
+      minimumApplicationStake: Balance & AugmentedConst<ApiType>;
+      /**
+       * Defines min unstaking period in the group.
+       **/
+      minUnstakingPeriodLimit: BlockNumber & AugmentedConst<ApiType>;
+      /**
+       * Defines the period every worker gets paid in blocks.
+       **/
+      rewardPeriod: u32 & AugmentedConst<ApiType>;
+      /**
+       * Staking handler lock id.
+       **/
+      stakingHandlerLockId: LockIdentifier & AugmentedConst<ApiType>;
     };
     system: {
       /**

+ 9 - 8
types/augment/augment-api-events.ts

@@ -1,9 +1,9 @@
 // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
 /* eslint-disable */
 
-import type { BTreeSet, Bytes, Option, Text, Vec, bool, u32, u64, u8 } from '@polkadot/types';
+import type { BTreeMap, BTreeSet, Bytes, Option, Text, Vec, bool, u32, u64, u8 } from '@polkadot/types';
 import type { ITuple } from '@polkadot/types/types';
-import type { ActorId, ApplicationId, ApplicationIdToWorkerIdMap, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, Channel, ChannelCategory, ChannelCategoryCreationParameters, ChannelCategoryId, ChannelCategoryUpdateParameters, ChannelCreationParameters, ChannelId, ChannelOwnershipTransferRequest, ChannelOwnershipTransferRequestId, ChannelUpdateParameters, ContentActor, ContentId, ContentParameters, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, EntryId, ExecutionStatus, ForumUserId, GeneralProposalParameters, InviteMembershipParameters, IsCensored, MemberId, MemoText, ModeratorId, NewAsset, OpeningId, OpeningType, OptionResult, OracleJudgment, ParticipantId, PersonCreationParameters, PersonId, PersonUpdateParameters, PlaylistCreationParameters, PlaylistId, PlaylistUpdateParameters, Poll, PostId, PostReactionId, PrivilegedActor, ProposalDecision, ProposalDetailsOf, ProposalId, ProposalStatus, ReplyId, RewardPaymentType, Series, SeriesId, SeriesParameters, StakePolicy, StorageObjectOwner, StorageProviderId, ThreadId, ThreadMode, Title, UpdatedBody, UpdatedTitle, UploadingStatus, VideoCategoryCreationParameters, VideoCategoryId, VideoCategoryUpdateParameters, VideoCreationParameters, VideoId, VideoUpdateParameters, VoteKind, VoucherLimit, WorkerId, WorkingGroup } from './all';
+import type { ActorId, ApplicationId, ApplicationIdToWorkerIdMap, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, Channel, ChannelCategory, ChannelCategoryCreationParameters, ChannelCategoryId, ChannelCategoryUpdateParameters, ChannelCreationParameters, ChannelId, ChannelOwnershipTransferRequest, ChannelOwnershipTransferRequestId, ChannelUpdateParameters, ContentActor, ContentId, ContentParameters, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, EntryId, ExecutionStatus, ForumUserId, GeneralProposalParameters, InviteMembershipParameters, IsCensored, MemberId, MemoText, ModeratorId, NewAsset, OpeningId, OpeningType, OptionResult, OracleJudgment, ParticipantId, PersonCreationParameters, PersonId, PersonUpdateParameters, PlaylistCreationParameters, PlaylistId, PlaylistUpdateParameters, PollInput, PostId, PostReactionId, PrivilegedActor, ProposalDecision, ProposalDetailsOf, ProposalId, ProposalStatus, ReplyId, RewardPaymentType, Series, SeriesId, SeriesParameters, StakePolicy, StorageObjectOwner, StorageProviderId, ThreadId, ThreadMode, Title, UpdatedBody, UpdatedTitle, UploadingStatus, VideoCategoryCreationParameters, VideoCategoryId, VideoCategoryUpdateParameters, VideoCreationParameters, VideoId, VideoUpdateParameters, VoteKind, VoucherLimit, WorkerId, WorkingGroup } from './all';
 import type { BalanceStatus } from '@polkadot/types/interfaces/balances';
 import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
 import type { AuthorityList } from '@polkadot/types/interfaces/grandpa';
@@ -622,7 +622,7 @@ declare module '@polkadot/api/types/events' {
       /**
        * Post with givne id was deleted.
        **/
-      PostDeleted: AugmentedEvent<ApiType, [Bytes, ForumUserId, Vec<ITuple<[CategoryId, ThreadId, PostId, bool]>>]>;
+      PostDeleted: AugmentedEvent<ApiType, [Bytes, ForumUserId, BTreeMap<ITuple<[CategoryId, ThreadId, PostId]>, bool>]>;
       /**
        * Post with givne id was moderated.
        **/
@@ -638,12 +638,17 @@ declare module '@polkadot/api/types/events' {
       PostTextUpdated: AugmentedEvent<ApiType, [PostId, ForumUserId, CategoryId, ThreadId, Bytes]>;
       /**
        * A thread with given id was created.
+       * A third argument reflects the initial post id of the thread.
        **/
-      ThreadCreated: AugmentedEvent<ApiType, [ThreadId, ForumUserId, CategoryId, Bytes, Bytes, Option<Poll>]>;
+      ThreadCreated: AugmentedEvent<ApiType, [CategoryId, ThreadId, PostId, ForumUserId, Bytes, Bytes, Option<PollInput>]>;
       /**
        * A thread was deleted.
        **/
       ThreadDeleted: AugmentedEvent<ApiType, [ThreadId, ForumUserId, CategoryId, bool]>;
+      /**
+       * A thread metadata given id was updated.
+       **/
+      ThreadMetadataUpdated: AugmentedEvent<ApiType, [ThreadId, ForumUserId, CategoryId, Bytes]>;
       /**
        * A thread with given id was moderated.
        **/
@@ -652,10 +657,6 @@ declare module '@polkadot/api/types/events' {
        * A thread was moved to new category
        **/
       ThreadMoved: AugmentedEvent<ApiType, [ThreadId, CategoryId, PrivilegedActor, CategoryId]>;
-      /**
-       * A thread with given id was moderated.
-       **/
-      ThreadTitleUpdated: AugmentedEvent<ApiType, [ThreadId, ForumUserId, CategoryId, Bytes]>;
       /**
        * A thread with given id was updated.
        * The second argument reflects the new archival status of the thread.

+ 5 - 5
types/augment/augment-api-tx.ts

@@ -1,9 +1,9 @@
 // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
 /* eslint-disable */
 
-import type { BTreeSet, Bytes, Compact, Option, Vec, bool, u16, u32, u64, u8 } from '@polkadot/types';
+import type { BTreeMap, BTreeSet, Bytes, Compact, Option, Vec, bool, u16, u32, u64, u8 } from '@polkadot/types';
 import type { AnyNumber, ITuple } from '@polkadot/types/types';
-import type { ActorId, ApplicationId, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, ChannelCategoryCreationParameters, ChannelCategoryId, ChannelCategoryUpdateParameters, ChannelCreationParameters, ChannelId, ChannelOwnershipTransferRequest, ChannelOwnershipTransferRequestId, ChannelUpdateParameters, ContentActor, ContentId, ContentParameters, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, EntryId, ForumUserId, FundingRequestParameters, GeneralProposalParameters, InviteMembershipParameters, MemberId, MemoText, ModeratorId, ObjectOwner, OpeningId, OpeningType, OracleJudgment, ParticipantId, PersonActor, PersonCreationParameters, PersonId, PersonUpdateParameters, PlaylistCreationParameters, PlaylistId, PlaylistUpdateParameters, Poll, PostId, PostReactionId, PrivilegedActor, ProposalDetailsOf, ProposalId, ReplyId, ReplyToDelete, SeriesId, SeriesParameters, StakePolicy, StorageProviderId, ThreadId, ThreadMode, VideoCategoryCreationParameters, VideoCategoryId, VideoCategoryUpdateParameters, VideoCreationParameters, VideoId, VideoUpdateParameters, VoteKind, WorkerId, WorkingGroup } from './all';
+import type { ActorId, ApplicationId, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, ChannelCategoryCreationParameters, ChannelCategoryId, ChannelCategoryUpdateParameters, ChannelCreationParameters, ChannelId, ChannelOwnershipTransferRequest, ChannelOwnershipTransferRequestId, ChannelUpdateParameters, ContentActor, ContentId, ContentParameters, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, EntryId, ForumUserId, FundingRequestParameters, GeneralProposalParameters, InviteMembershipParameters, MemberId, MemoText, ModeratorId, ObjectOwner, OpeningId, OpeningType, OracleJudgment, ParticipantId, PersonActor, PersonCreationParameters, PersonId, PersonUpdateParameters, PlaylistCreationParameters, PlaylistId, PlaylistUpdateParameters, PollInput, PostId, PostReactionId, PrivilegedActor, ProposalDetailsOf, ProposalId, ReplyId, ReplyToDelete, SeriesId, SeriesParameters, StakePolicy, StorageProviderId, ThreadId, ThreadMode, VideoCategoryCreationParameters, VideoCategoryId, VideoCategoryUpdateParameters, VideoCreationParameters, VideoId, VideoUpdateParameters, VoteKind, WorkerId, WorkingGroup } from './all';
 import type { BabeEquivocationProof } from '@polkadot/types/interfaces/babe';
 import type { Extrinsic, Signature } from '@polkadot/types/interfaces/extrinsics';
 import type { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa';
@@ -862,7 +862,7 @@ declare module '@polkadot/api/types/submittable' {
        * - O(W)
        * # </weight>
        **/
-      createThread: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, text: Bytes | string | Uint8Array, poll: Option<Poll> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, CategoryId, Bytes, Bytes, Option<Poll>]>;
+      createThread: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array, text: Bytes | string | Uint8Array, pollInput: Option<PollInput> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, CategoryId, Bytes, Bytes, Option<PollInput>]>;
       /**
        * Delete category
        * 
@@ -891,7 +891,7 @@ declare module '@polkadot/api/types/submittable' {
        * - O(W + P)
        * # </weight>
        **/
-      deletePosts: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, posts: Vec<ITuple<[CategoryId, ThreadId, PostId, bool]>> | ([CategoryId | AnyNumber | Uint8Array, ThreadId | AnyNumber | Uint8Array, PostId | AnyNumber | Uint8Array, bool | boolean | Uint8Array])[], rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, Vec<ITuple<[CategoryId, ThreadId, PostId, bool]>>, Bytes]>;
+      deletePosts: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, posts: BTreeMap<ITuple<[CategoryId, ThreadId, PostId]>, bool>, rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, BTreeMap<ITuple<[CategoryId, ThreadId, PostId]>, bool>, Bytes]>;
       /**
        * Delete thread
        * 
@@ -932,7 +932,7 @@ declare module '@polkadot/api/types/submittable' {
        * - O(W)
        * # </weight>
        **/
-      editThreadTitle: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newTitle: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, CategoryId, ThreadId, Bytes]>;
+      editThreadMetadata: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newMetadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ForumUserId, CategoryId, ThreadId, Bytes]>;
       /**
        * Moderate post
        * 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
types/augment/augment-types.ts


+ 14 - 1
types/src/forum.ts

@@ -1,4 +1,4 @@
-import { bool, u32, u64, Option, Vec, Null } from '@polkadot/types'
+import { bool, u32, u64, Option, Vec, Null, Bytes } from '@polkadot/types'
 import { Moment } from '@polkadot/types/interfaces'
 import { Hash, ThreadId, PostId, JoyStructDecorated, JoyEnum } from './common'
 import { RegistryTypes } from '@polkadot/types/types'
@@ -62,6 +62,17 @@ export class PrivilegedActor extends JoyEnum({
   Moderator: ModeratorId,
 }) {}
 
+export class PollAlternativeInput extends JoyStructDecorated({
+  alternative_text: Bytes,
+  vote_count: u32,
+}) {}
+
+export class PollInput extends JoyStructDecorated({
+  description: Bytes,
+  end_time: u64,
+  poll_alternatives: Vec.with(PollAlternativeInput),
+}) {}
+
 export const forumTypes: RegistryTypes = {
   ForumUserId,
   ModeratorId,
@@ -73,6 +84,8 @@ export const forumTypes: RegistryTypes = {
   PollAlternative,
   Poll,
   PrivilegedActor,
+  PollAlternativeInput,
+  PollInput,
   // runtime alias
   ThreadOf: Thread,
 }

Vissa filer visades inte eftersom för många filer har ändrats