Browse Source

Merge branch 'babylon' into babylon-types-tooling

Leszek Wiesner 4 years ago
parent
commit
4eea2ed718

File diff suppressed because it is too large
+ 1 - 1
types/augment-codec/all.ts


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


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

@@ -743,7 +743,7 @@
         "all_entity_property_values_locked": "bool",
         "maintainers": "Vec<CuratorGroupId>"
     },
-    "SinglePropertyType": {
+    "PropertyTypeSingle": {
         "_enum": {
             "Bool": "Null",
             "Uint16": "Null",
@@ -757,14 +757,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