Browse Source

PropertyType variants rename + yarn.lock

Leszek Wiesner 4 years ago
parent
commit
1009b19784

+ 7 - 7
types/augment-codec/augment-types.ts

@@ -16,7 +16,7 @@ import { RationaleText as RationaleText, Application as ApplicationOf, Applicati
 import { Url as Url, IPNSIdentity as IPNSIdentity, ServiceProviderRecord as ServiceProviderRecord } from '../discovery'
 import { ContentId as ContentId, LiaisonJudgement as LiaisonJudgement, DataObject as DataObject, DataObjectStorageRelationshipId as DataObjectStorageRelationshipId, DataObjectStorageRelationship as DataObjectStorageRelationship, DataObjectTypeId as DataObjectTypeId, DataObjectType as DataObjectType, DataObjectsMap as DataObjectsMap } from '../media'
 import { ProposalId as ProposalId, ProposalStatus as ProposalStatus, Proposal as ProposalOf, ProposalDetails as ProposalDetails, ProposalDetails as ProposalDetailsOf, VotingResults as VotingResults, ProposalParameters as ProposalParameters, VoteKind as VoteKind, ThreadCounter as ThreadCounter, DiscussionThread as DiscussionThread, DiscussionPost as DiscussionPost, AddOpeningParameters as AddOpeningParameters, FillOpeningParameters as FillOpeningParameters, TerminateRoleParameters as TerminateRoleParameters, ActiveStake as ActiveStake, Finalized as Finalized, ProposalDecisionStatus as ProposalDecisionStatus, ExecutionFailed as ExecutionFailed, Approved as Approved, SetLeadParams as SetLeadParams } from '../proposals'
-import { Nonce as Nonce, EntityId as EntityId, ClassId as ClassId, CuratorGroupId as CuratorGroupId, VecMaxLength as VecMaxLength, TextMaxLength as TextMaxLength, HashedTextMaxLength as HashedTextMaxLength, PropertyId as PropertyId, SchemaId as SchemaId, SameController as SameController, ClassPermissions as ClassPermissions, SinglePropertyType as SinglePropertyType, VecPropertyType as VecPropertyType, PropertyType as PropertyType, PropertyLockingPolicy as PropertyLockingPolicy, Property as Property, Schema as Schema, Class as Class, EntityController as EntityController, EntityPermissions as EntityPermissions, StoredValue as StoredValue, VecStoredValue as VecStoredValue, VecStoredPropertyValue as VecStoredPropertyValue, StoredPropertyValue as StoredPropertyValue, InboundReferenceCounter as InboundReferenceCounter, Entity as Entity, CuratorGroup as CuratorGroup, EntityCreationVoucher as EntityCreationVoucher, Actor as Actor, EntityReferenceCounterSideEffect as EntityReferenceCounterSideEffect, ReferenceCounterSideEffects as ReferenceCounterSideEffects, SideEffects as SideEffects, SideEffect as SideEffect, Status as Status, InputValue as InputValue, VecInputValue as VecInputValue, InputPropertyValue as InputPropertyValue, ParameterizedEntity as ParameterizedEntity, ParametrizedPropertyValue as ParametrizedPropertyValue, ParametrizedClassPropertyValue as ParametrizedClassPropertyValue, CreateEntityOperation as CreateEntityOperation, UpdatePropertyValuesOperation as UpdatePropertyValuesOperation, AddSchemaSupportToEntityOperation as AddSchemaSupportToEntityOperation, OperationType as OperationType, ClassPermissionsType as ClassPermissionsType, ClassPropertyValue as ClassPropertyValue, Operation as Operation, ReferenceConstraint as ReferenceConstraint } from '../content-directory'
+import { Nonce as Nonce, EntityId as EntityId, ClassId as ClassId, CuratorGroupId as CuratorGroupId, VecMaxLength as VecMaxLength, TextMaxLength as TextMaxLength, HashedTextMaxLength as HashedTextMaxLength, PropertyId as PropertyId, SchemaId as SchemaId, SameController as SameController, ClassPermissions as ClassPermissions, PropertyTypeSingle as PropertyTypeSingle, PropertyTypeVector as PropertyTypeVector, PropertyType as PropertyType, PropertyLockingPolicy as PropertyLockingPolicy, Property as Property, Schema as Schema, Class as Class, EntityController as EntityController, EntityPermissions as EntityPermissions, StoredValue as StoredValue, VecStoredValue as VecStoredValue, VecStoredPropertyValue as VecStoredPropertyValue, StoredPropertyValue as StoredPropertyValue, InboundReferenceCounter as InboundReferenceCounter, Entity as Entity, CuratorGroup as CuratorGroup, EntityCreationVoucher as EntityCreationVoucher, Actor as Actor, EntityReferenceCounterSideEffect as EntityReferenceCounterSideEffect, ReferenceCounterSideEffects as ReferenceCounterSideEffects, SideEffects as SideEffects, SideEffect as SideEffect, Status as Status, InputValue as InputValue, VecInputValue as VecInputValue, InputPropertyValue as InputPropertyValue, ParameterizedEntity as ParameterizedEntity, ParametrizedPropertyValue as ParametrizedPropertyValue, ParametrizedClassPropertyValue as ParametrizedClassPropertyValue, CreateEntityOperation as CreateEntityOperation, UpdatePropertyValuesOperation as UpdatePropertyValuesOperation, AddSchemaSupportToEntityOperation as AddSchemaSupportToEntityOperation, OperationType as OperationType, ClassPermissionsType as ClassPermissionsType, ClassPropertyValue as ClassPropertyValue, Operation as Operation, ReferenceConstraint as ReferenceConstraint } from '../content-directory'
 /** /CUSTOMIMPORTS **/
 import { Compact, Option, Raw, Vec } from '@polkadot/types/codec';
 import { BitVec, Bytes, Data, DoNotConstruct, Null, StorageKey, Text, Type, U256, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types/primitive';
@@ -534,12 +534,12 @@ declare module '@polkadot/types/types/registry' {
     "ClassPermissions": ClassPermissions;
     "Option<ClassPermissions>": Option<ClassPermissions>;
     "Vec<ClassPermissions>": Vec<ClassPermissions>;
-    "SinglePropertyType": SinglePropertyType;
-    "Option<SinglePropertyType>": Option<SinglePropertyType>;
-    "Vec<SinglePropertyType>": Vec<SinglePropertyType>;
-    "VecPropertyType": VecPropertyType;
-    "Option<VecPropertyType>": Option<VecPropertyType>;
-    "Vec<VecPropertyType>": Vec<VecPropertyType>;
+    "PropertyTypeSingle": PropertyTypeSingle;
+    "Option<PropertyTypeSingle>": Option<PropertyTypeSingle>;
+    "Vec<PropertyTypeSingle>": Vec<PropertyTypeSingle>;
+    "PropertyTypeVector": PropertyTypeVector;
+    "Option<PropertyTypeVector>": Option<PropertyTypeVector>;
+    "Vec<PropertyTypeVector>": Vec<PropertyTypeVector>;
     "PropertyType": PropertyType;
     "Option<PropertyType>": Option<PropertyType>;
     "Vec<PropertyType>": Vec<PropertyType>;

+ 5 - 5
types/augment/all/defs.json

@@ -740,7 +740,7 @@
         "all_entity_property_values_locked": "bool",
         "maintainers": "Vec<CuratorGroupId>"
     },
-    "SinglePropertyType": {
+    "PropertyTypeSingle": {
         "_enum": {
             "Bool": "Null",
             "Uint16": "Null",
@@ -754,14 +754,14 @@
             "Reference": "(ClassId,SameController)"
         }
     },
-    "VecPropertyType": {
-        "vec_type": "SinglePropertyType",
+    "PropertyTypeVector": {
+        "vec_type": "PropertyTypeSingle",
         "max_length": "VecMaxLength"
     },
     "PropertyType": {
         "_enum": {
-            "Single": "SinglePropertyType",
-            "Vector": "VecPropertyType"
+            "Single": "PropertyTypeSingle",
+            "Vector": "PropertyTypeVector"
         }
     },
     "PropertyLockingPolicy": {

+ 25 - 25
types/augment/all/types.ts

@@ -830,9 +830,32 @@ export interface PropertyLockingPolicy extends Struct {
 /** @name PropertyType */
 export interface PropertyType extends Enum {
   readonly isSingle: boolean;
-  readonly asSingle: SinglePropertyType;
+  readonly asSingle: PropertyTypeSingle;
   readonly isVector: boolean;
-  readonly asVector: VecPropertyType;
+  readonly asVector: PropertyTypeVector;
+}
+
+/** @name PropertyTypeSingle */
+export interface PropertyTypeSingle extends Enum {
+  readonly isBool: boolean;
+  readonly isUint16: boolean;
+  readonly isUint32: boolean;
+  readonly isUint64: boolean;
+  readonly isInt16: boolean;
+  readonly isInt32: boolean;
+  readonly isInt64: boolean;
+  readonly isText: boolean;
+  readonly asText: TextMaxLength;
+  readonly isHash: boolean;
+  readonly asHash: HashedTextMaxLength;
+  readonly isReference: boolean;
+  readonly asReference: ITuple<[ClassId, SameController]>;
+}
+
+/** @name PropertyTypeVector */
+export interface PropertyTypeVector extends Struct {
+  readonly vec_type: PropertyTypeSingle;
+  readonly max_length: VecMaxLength;
 }
 
 /** @name ProposalDecisionStatus */
@@ -1078,23 +1101,6 @@ export interface SideEffect extends Option<ITuple<[EntityId, EntityReferenceCoun
 /** @name SideEffects */
 export interface SideEffects extends Option<ReferenceCounterSideEffects> {}
 
-/** @name SinglePropertyType */
-export interface SinglePropertyType extends Enum {
-  readonly isBool: boolean;
-  readonly isUint16: boolean;
-  readonly isUint32: boolean;
-  readonly isUint64: boolean;
-  readonly isInt16: boolean;
-  readonly isInt32: boolean;
-  readonly isInt64: boolean;
-  readonly isText: boolean;
-  readonly asText: TextMaxLength;
-  readonly isHash: boolean;
-  readonly asHash: HashedTextMaxLength;
-  readonly isReference: boolean;
-  readonly asReference: ITuple<[ClassId, SameController]>;
-}
-
 /** @name Slash */
 export interface Slash extends Struct {
   readonly started_at_block: u32;
@@ -1290,12 +1296,6 @@ export interface VecInputValue extends Enum {
 /** @name VecMaxLength */
 export interface VecMaxLength extends u16 {}
 
-/** @name VecPropertyType */
-export interface VecPropertyType extends Struct {
-  readonly vec_type: SinglePropertyType;
-  readonly max_length: VecMaxLength;
-}
-
 /** @name VecStoredPropertyValue */
 export interface VecStoredPropertyValue extends Struct {
   readonly vec_value: VecStoredValue;

File diff suppressed because it is too large
+ 0 - 0
types/augment/augment-types.ts


+ 7 - 7
types/src/content-directory/index.ts

@@ -23,7 +23,7 @@ export class ClassPermissions extends JoyStructDecorated({
 }) {}
 
 // Named just "Type" in the runtime, but this name conflicts with @polkadot/types/primitive/Type.ts
-export class SinglePropertyType extends JoyEnum({
+export class PropertyTypeSingle extends JoyEnum({
   Bool: Null,
   Uint16: Null,
   Uint32: Null,
@@ -36,14 +36,14 @@ export class SinglePropertyType extends JoyEnum({
   Reference: Tuple.with([ClassId, SameController]),
 }) {}
 
-export class VecPropertyType extends JoyStructDecorated({
-  vec_type: SinglePropertyType,
+export class PropertyTypeVector extends JoyStructDecorated({
+  vec_type: PropertyTypeSingle,
   max_length: VecMaxLength,
 }) {}
 
 export class PropertyType extends JoyEnum({
-  Single: SinglePropertyType,
-  Vector: VecPropertyType,
+  Single: PropertyTypeSingle,
+  Vector: PropertyTypeVector,
 }) {}
 
 export class PropertyLockingPolicy extends JoyStructDecorated({
@@ -254,8 +254,8 @@ export const contentDirectoryTypes = {
   SchemaId,
   SameController,
   ClassPermissions,
-  SinglePropertyType,
-  VecPropertyType,
+  PropertyTypeSingle,
+  PropertyTypeVector,
   PropertyType,
   PropertyLockingPolicy,
   Property,

+ 15 - 1
yarn.lock

@@ -2196,8 +2196,22 @@
     "@types/yargs" "^15.0.0"
     chalk "^4.0.0"
 
+"@joystream/types@^0.13.0":
+  version "0.13.1"
+  resolved "https://registry.yarnpkg.com/@joystream/types/-/types-0.13.1.tgz#d91773375a069663a3ec319f0929be8ddbb80210"
+  integrity sha512-Nz0zUzqS+gD0eaom+lzu595gm5XFG9uAK5L5ubwKceVDYgwVYC3rrZgfpKdPJJkGoGpVa8m0Gtl7YdOO1neMWw==
+  dependencies:
+    "@polkadot/api" "1.26.1"
+    "@polkadot/keyring" "^3.0.1"
+    "@polkadot/types" "1.26.1"
+    "@types/lodash" "^4.14.157"
+    "@types/vfile" "^4.0.0"
+    ajv "^6.11.0"
+    lodash "^4.17.15"
+    moment "^2.24.0"
+
 "@joystream/types@link:types":
-  version "0.13.0"
+  version "0.14.0"
   dependencies:
     "@polkadot/api" "1.26.1"
     "@polkadot/keyring" "^3.0.1"

Some files were not shown because too many files changed in this diff