Browse Source

Merge pull request #2515 from Lezek123/storagev2-query-node

Storage V2 - query node schema and mappings
shamil-gadelshin 3 years ago
parent
commit
7d36e17d5e
100 changed files with 2214 additions and 14023 deletions
  1. 1 1
      .github/workflows/joystream-node-checks.yml
  2. 0 6
      .github/workflows/query-node.yml
  3. 1 1
      .github/workflows/storage-node.yml
  4. 1 1
      README.md
  5. 44 4
      docker-compose.yml
  6. 4 0
      metadata-protobuf/.eslintignore
  7. 16 0
      metadata-protobuf/.eslintrc.js
  8. 2 0
      metadata-protobuf/.gitignore
  9. 4 0
      metadata-protobuf/.prettierignore
  10. 53 0
      metadata-protobuf/README.md
  11. 16 0
      metadata-protobuf/compile.sh
  12. 505 0
      metadata-protobuf/compiled/index.d.ts
  13. 1187 0
      metadata-protobuf/compiled/index.js
  14. 136 0
      metadata-protobuf/doc/index.md
  15. 10 0
      metadata-protobuf/generate-md-doc.sh
  16. 55 0
      metadata-protobuf/package.json
  17. 30 0
      metadata-protobuf/proto/Storage.proto
  18. 28 0
      metadata-protobuf/scripts/compile.ts
  19. 11 0
      metadata-protobuf/scripts/tsconfig.json
  20. 2 0
      metadata-protobuf/src/index.ts
  21. 25 0
      metadata-protobuf/src/types.ts
  22. 38 0
      metadata-protobuf/src/utils.ts
  23. 14 0
      metadata-protobuf/test/tsconfig.json
  24. 15 0
      metadata-protobuf/tsconfig.json
  25. 5 5
      package.json
  26. BIN
      pioneer/test/test.contract.wasm
  27. 1 2
      query-node/.gitignore
  28. 10 6
      query-node/build.sh
  29. 0 21
      query-node/generated/graphql-server/.env
  30. 0 6
      query-node/generated/graphql-server/.gitignore
  31. 0 46
      query-node/generated/graphql-server/db/migrations/channelCategoriesByName.migration.ts
  32. 0 46
      query-node/generated/graphql-server/db/migrations/membersByHandle.migration.ts
  33. 0 73
      query-node/generated/graphql-server/db/migrations/search.migration.ts
  34. 0 46
      query-node/generated/graphql-server/db/migrations/videoCategoriesByName.migration.ts
  35. 0 42
      query-node/generated/graphql-server/env.yml
  36. 0 2246
      query-node/generated/graphql-server/generated/binding.ts
  37. 0 4447
      query-node/generated/graphql-server/generated/classes.ts
  38. 0 1
      query-node/generated/graphql-server/generated/index.ts
  39. 0 3
      query-node/generated/graphql-server/generated/ormconfig.ts
  40. 0 2324
      query-node/generated/graphql-server/generated/schema.graphql
  41. 0 51
      query-node/generated/graphql-server/model/index.ts
  42. 0 105
      query-node/generated/graphql-server/package.json
  43. 0 7
      query-node/generated/graphql-server/src/config.ts
  44. 0 53
      query-node/generated/graphql-server/src/index.ts
  45. 0 35
      query-node/generated/graphql-server/src/logger.ts
  46. 0 27
      query-node/generated/graphql-server/src/modules/channel-category/channel-category.model.ts
  47. 0 142
      query-node/generated/graphql-server/src/modules/channel-category/channel-category.resolver.ts
  48. 0 28
      query-node/generated/graphql-server/src/modules/channel-category/channel-category.service.ts
  49. 0 151
      query-node/generated/graphql-server/src/modules/channel/channel.model.ts
  50. 0 213
      query-node/generated/graphql-server/src/modules/channel/channel.resolver.ts
  51. 0 28
      query-node/generated/graphql-server/src/modules/channel/channel.service.ts
  52. 0 30
      query-node/generated/graphql-server/src/modules/curator-group/curator-group.model.ts
  53. 0 142
      query-node/generated/graphql-server/src/modules/curator-group/curator-group.resolver.ts
  54. 0 28
      query-node/generated/graphql-server/src/modules/curator-group/curator-group.service.ts
  55. 0 108
      query-node/generated/graphql-server/src/modules/data-object/data-object.model.ts
  56. 0 188
      query-node/generated/graphql-server/src/modules/data-object/data-object.resolver.ts
  57. 0 31
      query-node/generated/graphql-server/src/modules/data-object/data-object.service.ts
  58. 0 23
      query-node/generated/graphql-server/src/modules/enums/enums.ts
  59. 0 36
      query-node/generated/graphql-server/src/modules/language/language.model.ts
  60. 0 154
      query-node/generated/graphql-server/src/modules/language/language.resolver.ts
  61. 0 28
      query-node/generated/graphql-server/src/modules/language/language.service.ts
  62. 0 38
      query-node/generated/graphql-server/src/modules/license/license.model.ts
  63. 0 142
      query-node/generated/graphql-server/src/modules/license/license.resolver.ts
  64. 0 28
      query-node/generated/graphql-server/src/modules/license/license.service.ts
  65. 0 66
      query-node/generated/graphql-server/src/modules/membership/membership.model.ts
  66. 0 142
      query-node/generated/graphql-server/src/modules/membership/membership.resolver.ts
  67. 0 28
      query-node/generated/graphql-server/src/modules/membership/membership.service.ts
  68. 0 14
      query-node/generated/graphql-server/src/modules/next-entity-id/next-entity-id.model.ts
  69. 0 128
      query-node/generated/graphql-server/src/modules/next-entity-id/next-entity-id.resolver.ts
  70. 0 28
      query-node/generated/graphql-server/src/modules/next-entity-id/next-entity-id.service.ts
  71. 0 46
      query-node/generated/graphql-server/src/modules/queries/channelCategoriesByName.resolver.ts
  72. 0 170
      query-node/generated/graphql-server/src/modules/queries/channelCategoriesByName.service.ts
  73. 0 46
      query-node/generated/graphql-server/src/modules/queries/membersByHandle.resolver.ts
  74. 0 170
      query-node/generated/graphql-server/src/modules/queries/membersByHandle.service.ts
  75. 0 49
      query-node/generated/graphql-server/src/modules/queries/search.resolver.ts
  76. 0 175
      query-node/generated/graphql-server/src/modules/queries/search.service.ts
  77. 0 46
      query-node/generated/graphql-server/src/modules/queries/videoCategoriesByName.resolver.ts
  78. 0 170
      query-node/generated/graphql-server/src/modules/queries/videoCategoriesByName.service.ts
  79. 0 85
      query-node/generated/graphql-server/src/modules/variants/variants.model.ts
  80. 0 28
      query-node/generated/graphql-server/src/modules/video-category/video-category.model.ts
  81. 0 142
      query-node/generated/graphql-server/src/modules/video-category/video-category.resolver.ts
  82. 0 28
      query-node/generated/graphql-server/src/modules/video-category/video-category.service.ts
  83. 0 38
      query-node/generated/graphql-server/src/modules/video-media-encoding/video-media-encoding.model.ts
  84. 0 142
      query-node/generated/graphql-server/src/modules/video-media-encoding/video-media-encoding.resolver.ts
  85. 0 28
      query-node/generated/graphql-server/src/modules/video-media-encoding/video-media-encoding.service.ts
  86. 0 55
      query-node/generated/graphql-server/src/modules/video-media-metadata/video-media-metadata.model.ts
  87. 0 154
      query-node/generated/graphql-server/src/modules/video-media-metadata/video-media-metadata.resolver.ts
  88. 0 28
      query-node/generated/graphql-server/src/modules/video-media-metadata/video-media-metadata.service.ts
  89. 0 177
      query-node/generated/graphql-server/src/modules/video/video.model.ts
  90. 0 213
      query-node/generated/graphql-server/src/modules/video/video.resolver.ts
  91. 0 28
      query-node/generated/graphql-server/src/modules/video/video.service.ts
  92. 0 42
      query-node/generated/graphql-server/src/modules/worker/worker.model.ts
  93. 0 142
      query-node/generated/graphql-server/src/modules/worker/worker.resolver.ts
  94. 0 28
      query-node/generated/graphql-server/src/modules/worker/worker.service.ts
  95. 0 38
      query-node/generated/graphql-server/src/processor.resolver.ts
  96. 0 52
      query-node/generated/graphql-server/src/pubsub.ts
  97. 0 72
      query-node/generated/graphql-server/src/queryTemplates.ts
  98. 0 53
      query-node/generated/graphql-server/src/server.ts
  99. 0 26
      query-node/generated/graphql-server/tsconfig.json
  100. 0 3
      query-node/generated/graphql-server/warthog.config.js

+ 1 - 1
.github/workflows/joystream-node-checks.yml

@@ -34,4 +34,4 @@ jobs:
       #     ./setup.sh
       #     yarn cargo-checks
       #     yarn cargo-build
-      #   if: env.GIT_DIFF
+      #   if: env.GIT_DIFF

+ 0 - 6
.github/workflows/query-node.yml

@@ -17,9 +17,6 @@ jobs:
     - name: checks
       run: |
         yarn install --frozen-lockfile
-        yarn workspace @joystream/types build
-        yarn workspace @joystream/content-metadata-protobuf build:ts
-        ./query-node/build.sh
         yarn workspace query-node-mappings checks --quiet
 
   query_node_build_osx:
@@ -37,7 +34,4 @@ jobs:
     - name: checks
       run: |
         yarn install --frozen-lockfile --network-timeout 120000
-        yarn workspace @joystream/types build
-        yarn workspace @joystream/content-metadata-protobuf build:ts
-        ./query-node/build.sh
         yarn workspace query-node-mappings checks --quiet

+ 1 - 1
.github/workflows/storage-node.yml

@@ -38,4 +38,4 @@ jobs:
         yarn install --frozen-lockfile --network-timeout 120000
         yarn workspace @joystream/types build
         yarn workspace storage-node checks --quiet
-        yarn workspace storage-node build
+        yarn workspace storage-node build

+ 1 - 1
README.md

@@ -12,7 +12,7 @@ functionality to support the [various roles](https://www.joystream.org/roles) th
 The following tools are required for building, testing and contributing to this repo:
 
 - [Rust](https://www.rust-lang.org/tools/install) toolchain - _required_
-- [nodejs](https://nodejs.org/) v12.x - _required_
+- [nodejs](https://nodejs.org/) v14.x - _required_
 - [yarn classic](https://classic.yarnpkg.com/en/docs/install) package manager v1.22.x- _required_
 - [docker](https://www.docker.com/get-started) and docker-compose - _optional_
 - [ansible](https://www.ansible.com/) - _optional_

+ 44 - 4
docker-compose.yml

@@ -86,6 +86,26 @@ services:
       - db
     command: ["workspace", "query-node-root", "query-node:start:prod"]
 
+  graphql-server-mnt:
+    image: node:14
+    restart: unless-stopped
+    env_file:
+      # relative to working directory where docker-compose was run from
+      - .env
+    environment:
+      - DB_HOST=db
+      - DB_NAME=${DB_NAME}
+    ports:
+      - "127.0.0.1:8081:${GRAPHQL_SERVER_PORT}"
+    depends_on:
+      - db
+    volumes:
+      - type: bind
+        source: .
+        target: /joystream
+    working_dir: /joystream
+    command: ["yarn", "workspace", "query-node-root", "query-node:start:prod"]
+
   processor:
     image: joystream/apps
     restart: unless-stopped
@@ -100,16 +120,36 @@ services:
       - TYPEORM_HOST=db
       - TYPEORM_DATABASE=${DB_NAME}
       - DEBUG=index-builder:*
-      - PROCESSOR_POLL_INTERVAL=1000 # refresh every second
+      - WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944
     volumes:
       - ./types/augment/all/defs.json:/joystream/query-node/mappings/lib/generated/types/typedefs.json
     depends_on:
-      - graphql-server
       - hydra-indexer-gateway
     command: ["workspace", "query-node-root", "processor:start"]
 
+  processor-mnt:
+    image: node:14
+    restart: unless-stopped
+    env_file:
+      # relative to working directory where docker-compose was run from
+      - .env
+    environment:
+      - INDEXER_ENDPOINT_URL=http://hydra-indexer-gateway:${WARTHOG_APP_PORT}/graphql
+      - TYPEORM_HOST=db
+      - TYPEORM_DATABASE=${DB_NAME}
+      - DEBUG=index-builder:*
+      - WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944
+    depends_on:
+      - hydra-indexer-gateway
+    volumes:
+      - type: bind
+        source: .
+        target: /joystream
+    working_dir: /joystream
+    command: ["yarn", "workspace", "query-node-root", "processor:start"]
+
   indexer:
-    image: joystream/hydra-indexer:2.1.0-beta.9
+    image: joystream/hydra-indexer:3.0.0
     restart: unless-stopped
     env_file:
       # relative to working directory where docker-compose was run from
@@ -131,7 +171,7 @@ services:
       sh -c "yarn db:bootstrap && yarn start:prod"
 
   hydra-indexer-gateway:
-    image: joystream/hydra-indexer-gateway:2.1.0-beta.5
+    image: joystream/hydra-indexer-gateway:3.0.0
     restart: unless-stopped
     env_file:
       # relative to working directory where docker-compose was run from

+ 4 - 0
metadata-protobuf/.eslintignore

@@ -0,0 +1,4 @@
+lib/
+proto/
+compiled/
+.eslintrc.js

+ 16 - 0
metadata-protobuf/.eslintrc.js

@@ -0,0 +1,16 @@
+module.exports = {
+  env: {
+    mocha: true,
+  },
+  parserOptions: {
+    project: './tsconfig.json'
+  },
+  extends: [
+    '@joystream/eslint-config'
+  ],
+  rules: {
+    'no-unused-vars': 'off', // Required by the typescript rule below
+    '@typescript-eslint/no-unused-vars': ['error'],
+    '@typescript-eslint/no-floating-promises': 'error',
+  },
+}

+ 2 - 0
metadata-protobuf/.gitignore

@@ -0,0 +1,2 @@
+node_modules/
+lib/

+ 4 - 0
metadata-protobuf/.prettierignore

@@ -0,0 +1,4 @@
+lib/
+doc/
+proto/
+compiled/

+ 53 - 0
metadata-protobuf/README.md

@@ -0,0 +1,53 @@
+## Joystream Content Directory Metadata Library
+
+This package contains protobuf message definitions compiled to Javascript/Typescript used for creating and updating various metadata blobs in the joystream content directory.
+
+### Message Specs
+
+Documented in [doc](./doc) folder
+
+### Choice of protobuf protocol v2
+
+For our usecase we wish to re-use same message to create and update  subset of fields.
+For this reason we need the explicit information about wether a field has been set or not and this is only possible with proto v2.
+
+Background: required/optional feilds are deprecated in [proto v3](https://www.ben-morris.com/handling-protocol-buffers-backwards-compatibility-between-versions-2-and-3-using-c/)
+
+
+### Helper methods
+The custom Joystream types such as License have helper methods to construct pre-defined well known values.
+
+### Example code:
+
+Best place to look at are the [tests specs](./test)
+
+### Opaque types
+We use simple [ISO_639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code representation for Language.
+useful npm package https://www.npmjs.com/package/iso-639-1
+
+### Building the package
+
+Building will compile the protofiles and build the library from source.
+
+- pre-requisists for compiling protofiles:
+    - [protoc](https://github.com/protocolbuffers/protobuf/releases)
+
+- pre-requisists for generating documentation:
+    - [golang](https://golang.org/)
+    - [protoc-gen-doc](https://github.com/pseudomuto/protoc-gen-doc) to generate docs
+
+```
+yarn && yarn build
+```
+
+### Generating docs
+
+```
+yarn generate-docs
+```
+
+### Tests
+
+```
+yarn test
+```

+ 16 - 0
metadata-protobuf/compile.sh

@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+# Directory to write generated code to (.js and .d.ts files)
+OUT_DIR="./compiled"
+mkdir -p ${OUT_DIR}
+
+yarn pbjs \
+  -t="static-module" \
+  -w="commonjs" \
+  -o="${OUT_DIR}/index.js" \
+  --force-long \
+  proto/*.proto
+
+yarn pbts \
+  -o="${OUT_DIR}/index.d.ts" \
+  ${OUT_DIR}/*.js

+ 505 - 0
metadata-protobuf/compiled/index.d.ts

@@ -0,0 +1,505 @@
+import { Long } from 'long'
+import * as $protobuf from "protobufjs";
+/** Properties of a GeoCoordiantes. */
+export interface IGeoCoordiantes {
+
+    /** GeoCoordiantes latitude */
+    latitude?: (number|null);
+
+    /** GeoCoordiantes longitude */
+    longitude?: (number|null);
+}
+
+/** Represents a GeoCoordiantes. */
+export class GeoCoordiantes implements IGeoCoordiantes {
+
+    /**
+     * Constructs a new GeoCoordiantes.
+     * @param [properties] Properties to set
+     */
+    constructor(properties?: IGeoCoordiantes);
+
+    /** GeoCoordiantes latitude. */
+    public latitude: number;
+
+    /** GeoCoordiantes longitude. */
+    public longitude: number;
+
+    /**
+     * Creates a new GeoCoordiantes instance using the specified properties.
+     * @param [properties] Properties to set
+     * @returns GeoCoordiantes instance
+     */
+    public static create(properties?: IGeoCoordiantes): GeoCoordiantes;
+
+    /**
+     * Encodes the specified GeoCoordiantes message. Does not implicitly {@link GeoCoordiantes.verify|verify} messages.
+     * @param message GeoCoordiantes message or plain object to encode
+     * @param [writer] Writer to encode to
+     * @returns Writer
+     */
+    public static encode(message: IGeoCoordiantes, writer?: $protobuf.Writer): $protobuf.Writer;
+
+    /**
+     * Encodes the specified GeoCoordiantes message, length delimited. Does not implicitly {@link GeoCoordiantes.verify|verify} messages.
+     * @param message GeoCoordiantes message or plain object to encode
+     * @param [writer] Writer to encode to
+     * @returns Writer
+     */
+    public static encodeDelimited(message: IGeoCoordiantes, writer?: $protobuf.Writer): $protobuf.Writer;
+
+    /**
+     * Decodes a GeoCoordiantes message from the specified reader or buffer.
+     * @param reader Reader or buffer to decode from
+     * @param [length] Message length if known beforehand
+     * @returns GeoCoordiantes
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): GeoCoordiantes;
+
+    /**
+     * Decodes a GeoCoordiantes message from the specified reader or buffer, length delimited.
+     * @param reader Reader or buffer to decode from
+     * @returns GeoCoordiantes
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): GeoCoordiantes;
+
+    /**
+     * Verifies a GeoCoordiantes message.
+     * @param message Plain object to verify
+     * @returns `null` if valid, otherwise the reason why it is not
+     */
+    public static verify(message: { [k: string]: any }): (string|null);
+
+    /**
+     * Creates a GeoCoordiantes message from a plain object. Also converts values to their respective internal types.
+     * @param object Plain object
+     * @returns GeoCoordiantes
+     */
+    public static fromObject(object: { [k: string]: any }): GeoCoordiantes;
+
+    /**
+     * Creates a plain object from a GeoCoordiantes message. Also converts values to other types if specified.
+     * @param message GeoCoordiantes
+     * @param [options] Conversion options
+     * @returns Plain object
+     */
+    public static toObject(message: GeoCoordiantes, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+    /**
+     * Converts this GeoCoordiantes to JSON.
+     * @returns JSON object
+     */
+    public toJSON(): { [k: string]: any };
+}
+
+/** Properties of a NodeLocationMetadata. */
+export interface INodeLocationMetadata {
+
+    /** NodeLocationMetadata countryCode */
+    countryCode?: (string|null);
+
+    /** NodeLocationMetadata city */
+    city?: (string|null);
+
+    /** NodeLocationMetadata coordinates */
+    coordinates?: (IGeoCoordiantes|null);
+}
+
+/** Represents a NodeLocationMetadata. */
+export class NodeLocationMetadata implements INodeLocationMetadata {
+
+    /**
+     * Constructs a new NodeLocationMetadata.
+     * @param [properties] Properties to set
+     */
+    constructor(properties?: INodeLocationMetadata);
+
+    /** NodeLocationMetadata countryCode. */
+    public countryCode: string;
+
+    /** NodeLocationMetadata city. */
+    public city: string;
+
+    /** NodeLocationMetadata coordinates. */
+    public coordinates?: (IGeoCoordiantes|null);
+
+    /**
+     * Creates a new NodeLocationMetadata instance using the specified properties.
+     * @param [properties] Properties to set
+     * @returns NodeLocationMetadata instance
+     */
+    public static create(properties?: INodeLocationMetadata): NodeLocationMetadata;
+
+    /**
+     * Encodes the specified NodeLocationMetadata message. Does not implicitly {@link NodeLocationMetadata.verify|verify} messages.
+     * @param message NodeLocationMetadata message or plain object to encode
+     * @param [writer] Writer to encode to
+     * @returns Writer
+     */
+    public static encode(message: INodeLocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+    /**
+     * Encodes the specified NodeLocationMetadata message, length delimited. Does not implicitly {@link NodeLocationMetadata.verify|verify} messages.
+     * @param message NodeLocationMetadata message or plain object to encode
+     * @param [writer] Writer to encode to
+     * @returns Writer
+     */
+    public static encodeDelimited(message: INodeLocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+    /**
+     * Decodes a NodeLocationMetadata message from the specified reader or buffer.
+     * @param reader Reader or buffer to decode from
+     * @param [length] Message length if known beforehand
+     * @returns NodeLocationMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): NodeLocationMetadata;
+
+    /**
+     * Decodes a NodeLocationMetadata message from the specified reader or buffer, length delimited.
+     * @param reader Reader or buffer to decode from
+     * @returns NodeLocationMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): NodeLocationMetadata;
+
+    /**
+     * Verifies a NodeLocationMetadata message.
+     * @param message Plain object to verify
+     * @returns `null` if valid, otherwise the reason why it is not
+     */
+    public static verify(message: { [k: string]: any }): (string|null);
+
+    /**
+     * Creates a NodeLocationMetadata message from a plain object. Also converts values to their respective internal types.
+     * @param object Plain object
+     * @returns NodeLocationMetadata
+     */
+    public static fromObject(object: { [k: string]: any }): NodeLocationMetadata;
+
+    /**
+     * Creates a plain object from a NodeLocationMetadata message. Also converts values to other types if specified.
+     * @param message NodeLocationMetadata
+     * @param [options] Conversion options
+     * @returns Plain object
+     */
+    public static toObject(message: NodeLocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+    /**
+     * Converts this NodeLocationMetadata to JSON.
+     * @returns JSON object
+     */
+    public toJSON(): { [k: string]: any };
+}
+
+/** Properties of a StorageBucketOperatorMetadata. */
+export interface IStorageBucketOperatorMetadata {
+
+    /** StorageBucketOperatorMetadata endpoint */
+    endpoint?: (string|null);
+
+    /** StorageBucketOperatorMetadata location */
+    location?: (INodeLocationMetadata|null);
+
+    /** StorageBucketOperatorMetadata extra */
+    extra?: (string|null);
+}
+
+/** Represents a StorageBucketOperatorMetadata. */
+export class StorageBucketOperatorMetadata implements IStorageBucketOperatorMetadata {
+
+    /**
+     * Constructs a new StorageBucketOperatorMetadata.
+     * @param [properties] Properties to set
+     */
+    constructor(properties?: IStorageBucketOperatorMetadata);
+
+    /** StorageBucketOperatorMetadata endpoint. */
+    public endpoint: string;
+
+    /** StorageBucketOperatorMetadata location. */
+    public location?: (INodeLocationMetadata|null);
+
+    /** StorageBucketOperatorMetadata extra. */
+    public extra: string;
+
+    /**
+     * Creates a new StorageBucketOperatorMetadata instance using the specified properties.
+     * @param [properties] Properties to set
+     * @returns StorageBucketOperatorMetadata instance
+     */
+    public static create(properties?: IStorageBucketOperatorMetadata): StorageBucketOperatorMetadata;
+
+    /**
+     * Encodes the specified StorageBucketOperatorMetadata message. Does not implicitly {@link StorageBucketOperatorMetadata.verify|verify} messages.
+     * @param message StorageBucketOperatorMetadata message or plain object to encode
+     * @param [writer] Writer to encode to
+     * @returns Writer
+     */
+    public static encode(message: IStorageBucketOperatorMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+    /**
+     * Encodes the specified StorageBucketOperatorMetadata message, length delimited. Does not implicitly {@link StorageBucketOperatorMetadata.verify|verify} messages.
+     * @param message StorageBucketOperatorMetadata message or plain object to encode
+     * @param [writer] Writer to encode to
+     * @returns Writer
+     */
+    public static encodeDelimited(message: IStorageBucketOperatorMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+    /**
+     * Decodes a StorageBucketOperatorMetadata message from the specified reader or buffer.
+     * @param reader Reader or buffer to decode from
+     * @param [length] Message length if known beforehand
+     * @returns StorageBucketOperatorMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): StorageBucketOperatorMetadata;
+
+    /**
+     * Decodes a StorageBucketOperatorMetadata message from the specified reader or buffer, length delimited.
+     * @param reader Reader or buffer to decode from
+     * @returns StorageBucketOperatorMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): StorageBucketOperatorMetadata;
+
+    /**
+     * Verifies a StorageBucketOperatorMetadata message.
+     * @param message Plain object to verify
+     * @returns `null` if valid, otherwise the reason why it is not
+     */
+    public static verify(message: { [k: string]: any }): (string|null);
+
+    /**
+     * Creates a StorageBucketOperatorMetadata message from a plain object. Also converts values to their respective internal types.
+     * @param object Plain object
+     * @returns StorageBucketOperatorMetadata
+     */
+    public static fromObject(object: { [k: string]: any }): StorageBucketOperatorMetadata;
+
+    /**
+     * Creates a plain object from a StorageBucketOperatorMetadata message. Also converts values to other types if specified.
+     * @param message StorageBucketOperatorMetadata
+     * @param [options] Conversion options
+     * @returns Plain object
+     */
+    public static toObject(message: StorageBucketOperatorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+    /**
+     * Converts this StorageBucketOperatorMetadata to JSON.
+     * @returns JSON object
+     */
+    public toJSON(): { [k: string]: any };
+}
+
+/** Properties of a DistributionBucketOperatorMetadata. */
+export interface IDistributionBucketOperatorMetadata {
+
+    /** DistributionBucketOperatorMetadata endpoint */
+    endpoint?: (string|null);
+
+    /** DistributionBucketOperatorMetadata location */
+    location?: (INodeLocationMetadata|null);
+
+    /** DistributionBucketOperatorMetadata extra */
+    extra?: (string|null);
+}
+
+/** Represents a DistributionBucketOperatorMetadata. */
+export class DistributionBucketOperatorMetadata implements IDistributionBucketOperatorMetadata {
+
+    /**
+     * Constructs a new DistributionBucketOperatorMetadata.
+     * @param [properties] Properties to set
+     */
+    constructor(properties?: IDistributionBucketOperatorMetadata);
+
+    /** DistributionBucketOperatorMetadata endpoint. */
+    public endpoint: string;
+
+    /** DistributionBucketOperatorMetadata location. */
+    public location?: (INodeLocationMetadata|null);
+
+    /** DistributionBucketOperatorMetadata extra. */
+    public extra: string;
+
+    /**
+     * Creates a new DistributionBucketOperatorMetadata instance using the specified properties.
+     * @param [properties] Properties to set
+     * @returns DistributionBucketOperatorMetadata instance
+     */
+    public static create(properties?: IDistributionBucketOperatorMetadata): DistributionBucketOperatorMetadata;
+
+    /**
+     * Encodes the specified DistributionBucketOperatorMetadata message. Does not implicitly {@link DistributionBucketOperatorMetadata.verify|verify} messages.
+     * @param message DistributionBucketOperatorMetadata message or plain object to encode
+     * @param [writer] Writer to encode to
+     * @returns Writer
+     */
+    public static encode(message: IDistributionBucketOperatorMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+    /**
+     * Encodes the specified DistributionBucketOperatorMetadata message, length delimited. Does not implicitly {@link DistributionBucketOperatorMetadata.verify|verify} messages.
+     * @param message DistributionBucketOperatorMetadata message or plain object to encode
+     * @param [writer] Writer to encode to
+     * @returns Writer
+     */
+    public static encodeDelimited(message: IDistributionBucketOperatorMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+    /**
+     * Decodes a DistributionBucketOperatorMetadata message from the specified reader or buffer.
+     * @param reader Reader or buffer to decode from
+     * @param [length] Message length if known beforehand
+     * @returns DistributionBucketOperatorMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): DistributionBucketOperatorMetadata;
+
+    /**
+     * Decodes a DistributionBucketOperatorMetadata message from the specified reader or buffer, length delimited.
+     * @param reader Reader or buffer to decode from
+     * @returns DistributionBucketOperatorMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): DistributionBucketOperatorMetadata;
+
+    /**
+     * Verifies a DistributionBucketOperatorMetadata message.
+     * @param message Plain object to verify
+     * @returns `null` if valid, otherwise the reason why it is not
+     */
+    public static verify(message: { [k: string]: any }): (string|null);
+
+    /**
+     * Creates a DistributionBucketOperatorMetadata message from a plain object. Also converts values to their respective internal types.
+     * @param object Plain object
+     * @returns DistributionBucketOperatorMetadata
+     */
+    public static fromObject(object: { [k: string]: any }): DistributionBucketOperatorMetadata;
+
+    /**
+     * Creates a plain object from a DistributionBucketOperatorMetadata message. Also converts values to other types if specified.
+     * @param message DistributionBucketOperatorMetadata
+     * @param [options] Conversion options
+     * @returns Plain object
+     */
+    public static toObject(message: DistributionBucketOperatorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+    /**
+     * Converts this DistributionBucketOperatorMetadata to JSON.
+     * @returns JSON object
+     */
+    public toJSON(): { [k: string]: any };
+}
+
+/** Properties of a DistributionBucketFamilyMetadata. */
+export interface IDistributionBucketFamilyMetadata {
+
+    /** DistributionBucketFamilyMetadata region */
+    region?: (string|null);
+
+    /** DistributionBucketFamilyMetadata description */
+    description?: (string|null);
+
+    /** DistributionBucketFamilyMetadata boundary */
+    boundary?: (IGeoCoordiantes[]|null);
+}
+
+/** Represents a DistributionBucketFamilyMetadata. */
+export class DistributionBucketFamilyMetadata implements IDistributionBucketFamilyMetadata {
+
+    /**
+     * Constructs a new DistributionBucketFamilyMetadata.
+     * @param [properties] Properties to set
+     */
+    constructor(properties?: IDistributionBucketFamilyMetadata);
+
+    /** DistributionBucketFamilyMetadata region. */
+    public region: string;
+
+    /** DistributionBucketFamilyMetadata description. */
+    public description: string;
+
+    /** DistributionBucketFamilyMetadata boundary. */
+    public boundary: IGeoCoordiantes[];
+
+    /**
+     * Creates a new DistributionBucketFamilyMetadata instance using the specified properties.
+     * @param [properties] Properties to set
+     * @returns DistributionBucketFamilyMetadata instance
+     */
+    public static create(properties?: IDistributionBucketFamilyMetadata): DistributionBucketFamilyMetadata;
+
+    /**
+     * Encodes the specified DistributionBucketFamilyMetadata message. Does not implicitly {@link DistributionBucketFamilyMetadata.verify|verify} messages.
+     * @param message DistributionBucketFamilyMetadata message or plain object to encode
+     * @param [writer] Writer to encode to
+     * @returns Writer
+     */
+    public static encode(message: IDistributionBucketFamilyMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+    /**
+     * Encodes the specified DistributionBucketFamilyMetadata message, length delimited. Does not implicitly {@link DistributionBucketFamilyMetadata.verify|verify} messages.
+     * @param message DistributionBucketFamilyMetadata message or plain object to encode
+     * @param [writer] Writer to encode to
+     * @returns Writer
+     */
+    public static encodeDelimited(message: IDistributionBucketFamilyMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+    /**
+     * Decodes a DistributionBucketFamilyMetadata message from the specified reader or buffer.
+     * @param reader Reader or buffer to decode from
+     * @param [length] Message length if known beforehand
+     * @returns DistributionBucketFamilyMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): DistributionBucketFamilyMetadata;
+
+    /**
+     * Decodes a DistributionBucketFamilyMetadata message from the specified reader or buffer, length delimited.
+     * @param reader Reader or buffer to decode from
+     * @returns DistributionBucketFamilyMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): DistributionBucketFamilyMetadata;
+
+    /**
+     * Verifies a DistributionBucketFamilyMetadata message.
+     * @param message Plain object to verify
+     * @returns `null` if valid, otherwise the reason why it is not
+     */
+    public static verify(message: { [k: string]: any }): (string|null);
+
+    /**
+     * Creates a DistributionBucketFamilyMetadata message from a plain object. Also converts values to their respective internal types.
+     * @param object Plain object
+     * @returns DistributionBucketFamilyMetadata
+     */
+    public static fromObject(object: { [k: string]: any }): DistributionBucketFamilyMetadata;
+
+    /**
+     * Creates a plain object from a DistributionBucketFamilyMetadata message. Also converts values to other types if specified.
+     * @param message DistributionBucketFamilyMetadata
+     * @param [options] Conversion options
+     * @returns Plain object
+     */
+    public static toObject(message: DistributionBucketFamilyMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+    /**
+     * Converts this DistributionBucketFamilyMetadata to JSON.
+     * @returns JSON object
+     */
+    public toJSON(): { [k: string]: any };
+}

+ 1187 - 0
metadata-protobuf/compiled/index.js

@@ -0,0 +1,1187 @@
+/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
+"use strict";
+
+var $protobuf = require("protobufjs/minimal");
+
+// Common aliases
+var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
+
+// Exported root namespace
+var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
+
+$root.GeoCoordiantes = (function() {
+
+    /**
+     * Properties of a GeoCoordiantes.
+     * @exports IGeoCoordiantes
+     * @interface IGeoCoordiantes
+     * @property {number|null} [latitude] GeoCoordiantes latitude
+     * @property {number|null} [longitude] GeoCoordiantes longitude
+     */
+
+    /**
+     * Constructs a new GeoCoordiantes.
+     * @exports GeoCoordiantes
+     * @classdesc Represents a GeoCoordiantes.
+     * @implements IGeoCoordiantes
+     * @constructor
+     * @param {IGeoCoordiantes=} [properties] Properties to set
+     */
+    function GeoCoordiantes(properties) {
+        if (properties)
+            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+                if (properties[keys[i]] != null)
+                    this[keys[i]] = properties[keys[i]];
+    }
+
+    /**
+     * GeoCoordiantes latitude.
+     * @member {number} latitude
+     * @memberof GeoCoordiantes
+     * @instance
+     */
+    GeoCoordiantes.prototype.latitude = 0;
+
+    /**
+     * GeoCoordiantes longitude.
+     * @member {number} longitude
+     * @memberof GeoCoordiantes
+     * @instance
+     */
+    GeoCoordiantes.prototype.longitude = 0;
+
+    /**
+     * Creates a new GeoCoordiantes instance using the specified properties.
+     * @function create
+     * @memberof GeoCoordiantes
+     * @static
+     * @param {IGeoCoordiantes=} [properties] Properties to set
+     * @returns {GeoCoordiantes} GeoCoordiantes instance
+     */
+    GeoCoordiantes.create = function create(properties) {
+        return new GeoCoordiantes(properties);
+    };
+
+    /**
+     * Encodes the specified GeoCoordiantes message. Does not implicitly {@link GeoCoordiantes.verify|verify} messages.
+     * @function encode
+     * @memberof GeoCoordiantes
+     * @static
+     * @param {IGeoCoordiantes} message GeoCoordiantes message or plain object to encode
+     * @param {$protobuf.Writer} [writer] Writer to encode to
+     * @returns {$protobuf.Writer} Writer
+     */
+    GeoCoordiantes.encode = function encode(message, writer) {
+        if (!writer)
+            writer = $Writer.create();
+        if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude"))
+            writer.uint32(/* id 3, wireType 5 =*/29).float(message.latitude);
+        if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude"))
+            writer.uint32(/* id 4, wireType 5 =*/37).float(message.longitude);
+        return writer;
+    };
+
+    /**
+     * Encodes the specified GeoCoordiantes message, length delimited. Does not implicitly {@link GeoCoordiantes.verify|verify} messages.
+     * @function encodeDelimited
+     * @memberof GeoCoordiantes
+     * @static
+     * @param {IGeoCoordiantes} message GeoCoordiantes message or plain object to encode
+     * @param {$protobuf.Writer} [writer] Writer to encode to
+     * @returns {$protobuf.Writer} Writer
+     */
+    GeoCoordiantes.encodeDelimited = function encodeDelimited(message, writer) {
+        return this.encode(message, writer).ldelim();
+    };
+
+    /**
+     * Decodes a GeoCoordiantes message from the specified reader or buffer.
+     * @function decode
+     * @memberof GeoCoordiantes
+     * @static
+     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+     * @param {number} [length] Message length if known beforehand
+     * @returns {GeoCoordiantes} GeoCoordiantes
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    GeoCoordiantes.decode = function decode(reader, length) {
+        if (!(reader instanceof $Reader))
+            reader = $Reader.create(reader);
+        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.GeoCoordiantes();
+        while (reader.pos < end) {
+            var tag = reader.uint32();
+            switch (tag >>> 3) {
+            case 3:
+                message.latitude = reader.float();
+                break;
+            case 4:
+                message.longitude = reader.float();
+                break;
+            default:
+                reader.skipType(tag & 7);
+                break;
+            }
+        }
+        return message;
+    };
+
+    /**
+     * Decodes a GeoCoordiantes message from the specified reader or buffer, length delimited.
+     * @function decodeDelimited
+     * @memberof GeoCoordiantes
+     * @static
+     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+     * @returns {GeoCoordiantes} GeoCoordiantes
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    GeoCoordiantes.decodeDelimited = function decodeDelimited(reader) {
+        if (!(reader instanceof $Reader))
+            reader = new $Reader(reader);
+        return this.decode(reader, reader.uint32());
+    };
+
+    /**
+     * Verifies a GeoCoordiantes message.
+     * @function verify
+     * @memberof GeoCoordiantes
+     * @static
+     * @param {Object.<string,*>} message Plain object to verify
+     * @returns {string|null} `null` if valid, otherwise the reason why it is not
+     */
+    GeoCoordiantes.verify = function verify(message) {
+        if (typeof message !== "object" || message === null)
+            return "object expected";
+        if (message.latitude != null && message.hasOwnProperty("latitude"))
+            if (typeof message.latitude !== "number")
+                return "latitude: number expected";
+        if (message.longitude != null && message.hasOwnProperty("longitude"))
+            if (typeof message.longitude !== "number")
+                return "longitude: number expected";
+        return null;
+    };
+
+    /**
+     * Creates a GeoCoordiantes message from a plain object. Also converts values to their respective internal types.
+     * @function fromObject
+     * @memberof GeoCoordiantes
+     * @static
+     * @param {Object.<string,*>} object Plain object
+     * @returns {GeoCoordiantes} GeoCoordiantes
+     */
+    GeoCoordiantes.fromObject = function fromObject(object) {
+        if (object instanceof $root.GeoCoordiantes)
+            return object;
+        var message = new $root.GeoCoordiantes();
+        if (object.latitude != null)
+            message.latitude = Number(object.latitude);
+        if (object.longitude != null)
+            message.longitude = Number(object.longitude);
+        return message;
+    };
+
+    /**
+     * Creates a plain object from a GeoCoordiantes message. Also converts values to other types if specified.
+     * @function toObject
+     * @memberof GeoCoordiantes
+     * @static
+     * @param {GeoCoordiantes} message GeoCoordiantes
+     * @param {$protobuf.IConversionOptions} [options] Conversion options
+     * @returns {Object.<string,*>} Plain object
+     */
+    GeoCoordiantes.toObject = function toObject(message, options) {
+        if (!options)
+            options = {};
+        var object = {};
+        if (options.defaults) {
+            object.latitude = 0;
+            object.longitude = 0;
+        }
+        if (message.latitude != null && message.hasOwnProperty("latitude"))
+            object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude;
+        if (message.longitude != null && message.hasOwnProperty("longitude"))
+            object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude;
+        return object;
+    };
+
+    /**
+     * Converts this GeoCoordiantes to JSON.
+     * @function toJSON
+     * @memberof GeoCoordiantes
+     * @instance
+     * @returns {Object.<string,*>} JSON object
+     */
+    GeoCoordiantes.prototype.toJSON = function toJSON() {
+        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+    };
+
+    return GeoCoordiantes;
+})();
+
+$root.NodeLocationMetadata = (function() {
+
+    /**
+     * Properties of a NodeLocationMetadata.
+     * @exports INodeLocationMetadata
+     * @interface INodeLocationMetadata
+     * @property {string|null} [countryCode] NodeLocationMetadata countryCode
+     * @property {string|null} [city] NodeLocationMetadata city
+     * @property {IGeoCoordiantes|null} [coordinates] NodeLocationMetadata coordinates
+     */
+
+    /**
+     * Constructs a new NodeLocationMetadata.
+     * @exports NodeLocationMetadata
+     * @classdesc Represents a NodeLocationMetadata.
+     * @implements INodeLocationMetadata
+     * @constructor
+     * @param {INodeLocationMetadata=} [properties] Properties to set
+     */
+    function NodeLocationMetadata(properties) {
+        if (properties)
+            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+                if (properties[keys[i]] != null)
+                    this[keys[i]] = properties[keys[i]];
+    }
+
+    /**
+     * NodeLocationMetadata countryCode.
+     * @member {string} countryCode
+     * @memberof NodeLocationMetadata
+     * @instance
+     */
+    NodeLocationMetadata.prototype.countryCode = "";
+
+    /**
+     * NodeLocationMetadata city.
+     * @member {string} city
+     * @memberof NodeLocationMetadata
+     * @instance
+     */
+    NodeLocationMetadata.prototype.city = "";
+
+    /**
+     * NodeLocationMetadata coordinates.
+     * @member {IGeoCoordiantes|null|undefined} coordinates
+     * @memberof NodeLocationMetadata
+     * @instance
+     */
+    NodeLocationMetadata.prototype.coordinates = null;
+
+    /**
+     * Creates a new NodeLocationMetadata instance using the specified properties.
+     * @function create
+     * @memberof NodeLocationMetadata
+     * @static
+     * @param {INodeLocationMetadata=} [properties] Properties to set
+     * @returns {NodeLocationMetadata} NodeLocationMetadata instance
+     */
+    NodeLocationMetadata.create = function create(properties) {
+        return new NodeLocationMetadata(properties);
+    };
+
+    /**
+     * Encodes the specified NodeLocationMetadata message. Does not implicitly {@link NodeLocationMetadata.verify|verify} messages.
+     * @function encode
+     * @memberof NodeLocationMetadata
+     * @static
+     * @param {INodeLocationMetadata} message NodeLocationMetadata message or plain object to encode
+     * @param {$protobuf.Writer} [writer] Writer to encode to
+     * @returns {$protobuf.Writer} Writer
+     */
+    NodeLocationMetadata.encode = function encode(message, writer) {
+        if (!writer)
+            writer = $Writer.create();
+        if (message.countryCode != null && Object.hasOwnProperty.call(message, "countryCode"))
+            writer.uint32(/* id 1, wireType 2 =*/10).string(message.countryCode);
+        if (message.city != null && Object.hasOwnProperty.call(message, "city"))
+            writer.uint32(/* id 2, wireType 2 =*/18).string(message.city);
+        if (message.coordinates != null && Object.hasOwnProperty.call(message, "coordinates"))
+            $root.GeoCoordiantes.encode(message.coordinates, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+        return writer;
+    };
+
+    /**
+     * Encodes the specified NodeLocationMetadata message, length delimited. Does not implicitly {@link NodeLocationMetadata.verify|verify} messages.
+     * @function encodeDelimited
+     * @memberof NodeLocationMetadata
+     * @static
+     * @param {INodeLocationMetadata} message NodeLocationMetadata message or plain object to encode
+     * @param {$protobuf.Writer} [writer] Writer to encode to
+     * @returns {$protobuf.Writer} Writer
+     */
+    NodeLocationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
+        return this.encode(message, writer).ldelim();
+    };
+
+    /**
+     * Decodes a NodeLocationMetadata message from the specified reader or buffer.
+     * @function decode
+     * @memberof NodeLocationMetadata
+     * @static
+     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+     * @param {number} [length] Message length if known beforehand
+     * @returns {NodeLocationMetadata} NodeLocationMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    NodeLocationMetadata.decode = function decode(reader, length) {
+        if (!(reader instanceof $Reader))
+            reader = $Reader.create(reader);
+        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.NodeLocationMetadata();
+        while (reader.pos < end) {
+            var tag = reader.uint32();
+            switch (tag >>> 3) {
+            case 1:
+                message.countryCode = reader.string();
+                break;
+            case 2:
+                message.city = reader.string();
+                break;
+            case 3:
+                message.coordinates = $root.GeoCoordiantes.decode(reader, reader.uint32());
+                break;
+            default:
+                reader.skipType(tag & 7);
+                break;
+            }
+        }
+        return message;
+    };
+
+    /**
+     * Decodes a NodeLocationMetadata message from the specified reader or buffer, length delimited.
+     * @function decodeDelimited
+     * @memberof NodeLocationMetadata
+     * @static
+     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+     * @returns {NodeLocationMetadata} NodeLocationMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    NodeLocationMetadata.decodeDelimited = function decodeDelimited(reader) {
+        if (!(reader instanceof $Reader))
+            reader = new $Reader(reader);
+        return this.decode(reader, reader.uint32());
+    };
+
+    /**
+     * Verifies a NodeLocationMetadata message.
+     * @function verify
+     * @memberof NodeLocationMetadata
+     * @static
+     * @param {Object.<string,*>} message Plain object to verify
+     * @returns {string|null} `null` if valid, otherwise the reason why it is not
+     */
+    NodeLocationMetadata.verify = function verify(message) {
+        if (typeof message !== "object" || message === null)
+            return "object expected";
+        if (message.countryCode != null && message.hasOwnProperty("countryCode"))
+            if (!$util.isString(message.countryCode))
+                return "countryCode: string expected";
+        if (message.city != null && message.hasOwnProperty("city"))
+            if (!$util.isString(message.city))
+                return "city: string expected";
+        if (message.coordinates != null && message.hasOwnProperty("coordinates")) {
+            var error = $root.GeoCoordiantes.verify(message.coordinates);
+            if (error)
+                return "coordinates." + error;
+        }
+        return null;
+    };
+
+    /**
+     * Creates a NodeLocationMetadata message from a plain object. Also converts values to their respective internal types.
+     * @function fromObject
+     * @memberof NodeLocationMetadata
+     * @static
+     * @param {Object.<string,*>} object Plain object
+     * @returns {NodeLocationMetadata} NodeLocationMetadata
+     */
+    NodeLocationMetadata.fromObject = function fromObject(object) {
+        if (object instanceof $root.NodeLocationMetadata)
+            return object;
+        var message = new $root.NodeLocationMetadata();
+        if (object.countryCode != null)
+            message.countryCode = String(object.countryCode);
+        if (object.city != null)
+            message.city = String(object.city);
+        if (object.coordinates != null) {
+            if (typeof object.coordinates !== "object")
+                throw TypeError(".NodeLocationMetadata.coordinates: object expected");
+            message.coordinates = $root.GeoCoordiantes.fromObject(object.coordinates);
+        }
+        return message;
+    };
+
+    /**
+     * Creates a plain object from a NodeLocationMetadata message. Also converts values to other types if specified.
+     * @function toObject
+     * @memberof NodeLocationMetadata
+     * @static
+     * @param {NodeLocationMetadata} message NodeLocationMetadata
+     * @param {$protobuf.IConversionOptions} [options] Conversion options
+     * @returns {Object.<string,*>} Plain object
+     */
+    NodeLocationMetadata.toObject = function toObject(message, options) {
+        if (!options)
+            options = {};
+        var object = {};
+        if (options.defaults) {
+            object.countryCode = "";
+            object.city = "";
+            object.coordinates = null;
+        }
+        if (message.countryCode != null && message.hasOwnProperty("countryCode"))
+            object.countryCode = message.countryCode;
+        if (message.city != null && message.hasOwnProperty("city"))
+            object.city = message.city;
+        if (message.coordinates != null && message.hasOwnProperty("coordinates"))
+            object.coordinates = $root.GeoCoordiantes.toObject(message.coordinates, options);
+        return object;
+    };
+
+    /**
+     * Converts this NodeLocationMetadata to JSON.
+     * @function toJSON
+     * @memberof NodeLocationMetadata
+     * @instance
+     * @returns {Object.<string,*>} JSON object
+     */
+    NodeLocationMetadata.prototype.toJSON = function toJSON() {
+        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+    };
+
+    return NodeLocationMetadata;
+})();
+
+$root.StorageBucketOperatorMetadata = (function() {
+
+    /**
+     * Properties of a StorageBucketOperatorMetadata.
+     * @exports IStorageBucketOperatorMetadata
+     * @interface IStorageBucketOperatorMetadata
+     * @property {string|null} [endpoint] StorageBucketOperatorMetadata endpoint
+     * @property {INodeLocationMetadata|null} [location] StorageBucketOperatorMetadata location
+     * @property {string|null} [extra] StorageBucketOperatorMetadata extra
+     */
+
+    /**
+     * Constructs a new StorageBucketOperatorMetadata.
+     * @exports StorageBucketOperatorMetadata
+     * @classdesc Represents a StorageBucketOperatorMetadata.
+     * @implements IStorageBucketOperatorMetadata
+     * @constructor
+     * @param {IStorageBucketOperatorMetadata=} [properties] Properties to set
+     */
+    function StorageBucketOperatorMetadata(properties) {
+        if (properties)
+            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+                if (properties[keys[i]] != null)
+                    this[keys[i]] = properties[keys[i]];
+    }
+
+    /**
+     * StorageBucketOperatorMetadata endpoint.
+     * @member {string} endpoint
+     * @memberof StorageBucketOperatorMetadata
+     * @instance
+     */
+    StorageBucketOperatorMetadata.prototype.endpoint = "";
+
+    /**
+     * StorageBucketOperatorMetadata location.
+     * @member {INodeLocationMetadata|null|undefined} location
+     * @memberof StorageBucketOperatorMetadata
+     * @instance
+     */
+    StorageBucketOperatorMetadata.prototype.location = null;
+
+    /**
+     * StorageBucketOperatorMetadata extra.
+     * @member {string} extra
+     * @memberof StorageBucketOperatorMetadata
+     * @instance
+     */
+    StorageBucketOperatorMetadata.prototype.extra = "";
+
+    /**
+     * Creates a new StorageBucketOperatorMetadata instance using the specified properties.
+     * @function create
+     * @memberof StorageBucketOperatorMetadata
+     * @static
+     * @param {IStorageBucketOperatorMetadata=} [properties] Properties to set
+     * @returns {StorageBucketOperatorMetadata} StorageBucketOperatorMetadata instance
+     */
+    StorageBucketOperatorMetadata.create = function create(properties) {
+        return new StorageBucketOperatorMetadata(properties);
+    };
+
+    /**
+     * Encodes the specified StorageBucketOperatorMetadata message. Does not implicitly {@link StorageBucketOperatorMetadata.verify|verify} messages.
+     * @function encode
+     * @memberof StorageBucketOperatorMetadata
+     * @static
+     * @param {IStorageBucketOperatorMetadata} message StorageBucketOperatorMetadata message or plain object to encode
+     * @param {$protobuf.Writer} [writer] Writer to encode to
+     * @returns {$protobuf.Writer} Writer
+     */
+    StorageBucketOperatorMetadata.encode = function encode(message, writer) {
+        if (!writer)
+            writer = $Writer.create();
+        if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint"))
+            writer.uint32(/* id 1, wireType 2 =*/10).string(message.endpoint);
+        if (message.location != null && Object.hasOwnProperty.call(message, "location"))
+            $root.NodeLocationMetadata.encode(message.location, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+        if (message.extra != null && Object.hasOwnProperty.call(message, "extra"))
+            writer.uint32(/* id 3, wireType 2 =*/26).string(message.extra);
+        return writer;
+    };
+
+    /**
+     * Encodes the specified StorageBucketOperatorMetadata message, length delimited. Does not implicitly {@link StorageBucketOperatorMetadata.verify|verify} messages.
+     * @function encodeDelimited
+     * @memberof StorageBucketOperatorMetadata
+     * @static
+     * @param {IStorageBucketOperatorMetadata} message StorageBucketOperatorMetadata message or plain object to encode
+     * @param {$protobuf.Writer} [writer] Writer to encode to
+     * @returns {$protobuf.Writer} Writer
+     */
+    StorageBucketOperatorMetadata.encodeDelimited = function encodeDelimited(message, writer) {
+        return this.encode(message, writer).ldelim();
+    };
+
+    /**
+     * Decodes a StorageBucketOperatorMetadata message from the specified reader or buffer.
+     * @function decode
+     * @memberof StorageBucketOperatorMetadata
+     * @static
+     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+     * @param {number} [length] Message length if known beforehand
+     * @returns {StorageBucketOperatorMetadata} StorageBucketOperatorMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    StorageBucketOperatorMetadata.decode = function decode(reader, length) {
+        if (!(reader instanceof $Reader))
+            reader = $Reader.create(reader);
+        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StorageBucketOperatorMetadata();
+        while (reader.pos < end) {
+            var tag = reader.uint32();
+            switch (tag >>> 3) {
+            case 1:
+                message.endpoint = reader.string();
+                break;
+            case 2:
+                message.location = $root.NodeLocationMetadata.decode(reader, reader.uint32());
+                break;
+            case 3:
+                message.extra = reader.string();
+                break;
+            default:
+                reader.skipType(tag & 7);
+                break;
+            }
+        }
+        return message;
+    };
+
+    /**
+     * Decodes a StorageBucketOperatorMetadata message from the specified reader or buffer, length delimited.
+     * @function decodeDelimited
+     * @memberof StorageBucketOperatorMetadata
+     * @static
+     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+     * @returns {StorageBucketOperatorMetadata} StorageBucketOperatorMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    StorageBucketOperatorMetadata.decodeDelimited = function decodeDelimited(reader) {
+        if (!(reader instanceof $Reader))
+            reader = new $Reader(reader);
+        return this.decode(reader, reader.uint32());
+    };
+
+    /**
+     * Verifies a StorageBucketOperatorMetadata message.
+     * @function verify
+     * @memberof StorageBucketOperatorMetadata
+     * @static
+     * @param {Object.<string,*>} message Plain object to verify
+     * @returns {string|null} `null` if valid, otherwise the reason why it is not
+     */
+    StorageBucketOperatorMetadata.verify = function verify(message) {
+        if (typeof message !== "object" || message === null)
+            return "object expected";
+        if (message.endpoint != null && message.hasOwnProperty("endpoint"))
+            if (!$util.isString(message.endpoint))
+                return "endpoint: string expected";
+        if (message.location != null && message.hasOwnProperty("location")) {
+            var error = $root.NodeLocationMetadata.verify(message.location);
+            if (error)
+                return "location." + error;
+        }
+        if (message.extra != null && message.hasOwnProperty("extra"))
+            if (!$util.isString(message.extra))
+                return "extra: string expected";
+        return null;
+    };
+
+    /**
+     * Creates a StorageBucketOperatorMetadata message from a plain object. Also converts values to their respective internal types.
+     * @function fromObject
+     * @memberof StorageBucketOperatorMetadata
+     * @static
+     * @param {Object.<string,*>} object Plain object
+     * @returns {StorageBucketOperatorMetadata} StorageBucketOperatorMetadata
+     */
+    StorageBucketOperatorMetadata.fromObject = function fromObject(object) {
+        if (object instanceof $root.StorageBucketOperatorMetadata)
+            return object;
+        var message = new $root.StorageBucketOperatorMetadata();
+        if (object.endpoint != null)
+            message.endpoint = String(object.endpoint);
+        if (object.location != null) {
+            if (typeof object.location !== "object")
+                throw TypeError(".StorageBucketOperatorMetadata.location: object expected");
+            message.location = $root.NodeLocationMetadata.fromObject(object.location);
+        }
+        if (object.extra != null)
+            message.extra = String(object.extra);
+        return message;
+    };
+
+    /**
+     * Creates a plain object from a StorageBucketOperatorMetadata message. Also converts values to other types if specified.
+     * @function toObject
+     * @memberof StorageBucketOperatorMetadata
+     * @static
+     * @param {StorageBucketOperatorMetadata} message StorageBucketOperatorMetadata
+     * @param {$protobuf.IConversionOptions} [options] Conversion options
+     * @returns {Object.<string,*>} Plain object
+     */
+    StorageBucketOperatorMetadata.toObject = function toObject(message, options) {
+        if (!options)
+            options = {};
+        var object = {};
+        if (options.defaults) {
+            object.endpoint = "";
+            object.location = null;
+            object.extra = "";
+        }
+        if (message.endpoint != null && message.hasOwnProperty("endpoint"))
+            object.endpoint = message.endpoint;
+        if (message.location != null && message.hasOwnProperty("location"))
+            object.location = $root.NodeLocationMetadata.toObject(message.location, options);
+        if (message.extra != null && message.hasOwnProperty("extra"))
+            object.extra = message.extra;
+        return object;
+    };
+
+    /**
+     * Converts this StorageBucketOperatorMetadata to JSON.
+     * @function toJSON
+     * @memberof StorageBucketOperatorMetadata
+     * @instance
+     * @returns {Object.<string,*>} JSON object
+     */
+    StorageBucketOperatorMetadata.prototype.toJSON = function toJSON() {
+        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+    };
+
+    return StorageBucketOperatorMetadata;
+})();
+
+$root.DistributionBucketOperatorMetadata = (function() {
+
+    /**
+     * Properties of a DistributionBucketOperatorMetadata.
+     * @exports IDistributionBucketOperatorMetadata
+     * @interface IDistributionBucketOperatorMetadata
+     * @property {string|null} [endpoint] DistributionBucketOperatorMetadata endpoint
+     * @property {INodeLocationMetadata|null} [location] DistributionBucketOperatorMetadata location
+     * @property {string|null} [extra] DistributionBucketOperatorMetadata extra
+     */
+
+    /**
+     * Constructs a new DistributionBucketOperatorMetadata.
+     * @exports DistributionBucketOperatorMetadata
+     * @classdesc Represents a DistributionBucketOperatorMetadata.
+     * @implements IDistributionBucketOperatorMetadata
+     * @constructor
+     * @param {IDistributionBucketOperatorMetadata=} [properties] Properties to set
+     */
+    function DistributionBucketOperatorMetadata(properties) {
+        if (properties)
+            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+                if (properties[keys[i]] != null)
+                    this[keys[i]] = properties[keys[i]];
+    }
+
+    /**
+     * DistributionBucketOperatorMetadata endpoint.
+     * @member {string} endpoint
+     * @memberof DistributionBucketOperatorMetadata
+     * @instance
+     */
+    DistributionBucketOperatorMetadata.prototype.endpoint = "";
+
+    /**
+     * DistributionBucketOperatorMetadata location.
+     * @member {INodeLocationMetadata|null|undefined} location
+     * @memberof DistributionBucketOperatorMetadata
+     * @instance
+     */
+    DistributionBucketOperatorMetadata.prototype.location = null;
+
+    /**
+     * DistributionBucketOperatorMetadata extra.
+     * @member {string} extra
+     * @memberof DistributionBucketOperatorMetadata
+     * @instance
+     */
+    DistributionBucketOperatorMetadata.prototype.extra = "";
+
+    /**
+     * Creates a new DistributionBucketOperatorMetadata instance using the specified properties.
+     * @function create
+     * @memberof DistributionBucketOperatorMetadata
+     * @static
+     * @param {IDistributionBucketOperatorMetadata=} [properties] Properties to set
+     * @returns {DistributionBucketOperatorMetadata} DistributionBucketOperatorMetadata instance
+     */
+    DistributionBucketOperatorMetadata.create = function create(properties) {
+        return new DistributionBucketOperatorMetadata(properties);
+    };
+
+    /**
+     * Encodes the specified DistributionBucketOperatorMetadata message. Does not implicitly {@link DistributionBucketOperatorMetadata.verify|verify} messages.
+     * @function encode
+     * @memberof DistributionBucketOperatorMetadata
+     * @static
+     * @param {IDistributionBucketOperatorMetadata} message DistributionBucketOperatorMetadata message or plain object to encode
+     * @param {$protobuf.Writer} [writer] Writer to encode to
+     * @returns {$protobuf.Writer} Writer
+     */
+    DistributionBucketOperatorMetadata.encode = function encode(message, writer) {
+        if (!writer)
+            writer = $Writer.create();
+        if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint"))
+            writer.uint32(/* id 1, wireType 2 =*/10).string(message.endpoint);
+        if (message.location != null && Object.hasOwnProperty.call(message, "location"))
+            $root.NodeLocationMetadata.encode(message.location, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+        if (message.extra != null && Object.hasOwnProperty.call(message, "extra"))
+            writer.uint32(/* id 3, wireType 2 =*/26).string(message.extra);
+        return writer;
+    };
+
+    /**
+     * Encodes the specified DistributionBucketOperatorMetadata message, length delimited. Does not implicitly {@link DistributionBucketOperatorMetadata.verify|verify} messages.
+     * @function encodeDelimited
+     * @memberof DistributionBucketOperatorMetadata
+     * @static
+     * @param {IDistributionBucketOperatorMetadata} message DistributionBucketOperatorMetadata message or plain object to encode
+     * @param {$protobuf.Writer} [writer] Writer to encode to
+     * @returns {$protobuf.Writer} Writer
+     */
+    DistributionBucketOperatorMetadata.encodeDelimited = function encodeDelimited(message, writer) {
+        return this.encode(message, writer).ldelim();
+    };
+
+    /**
+     * Decodes a DistributionBucketOperatorMetadata message from the specified reader or buffer.
+     * @function decode
+     * @memberof DistributionBucketOperatorMetadata
+     * @static
+     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+     * @param {number} [length] Message length if known beforehand
+     * @returns {DistributionBucketOperatorMetadata} DistributionBucketOperatorMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    DistributionBucketOperatorMetadata.decode = function decode(reader, length) {
+        if (!(reader instanceof $Reader))
+            reader = $Reader.create(reader);
+        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DistributionBucketOperatorMetadata();
+        while (reader.pos < end) {
+            var tag = reader.uint32();
+            switch (tag >>> 3) {
+            case 1:
+                message.endpoint = reader.string();
+                break;
+            case 2:
+                message.location = $root.NodeLocationMetadata.decode(reader, reader.uint32());
+                break;
+            case 3:
+                message.extra = reader.string();
+                break;
+            default:
+                reader.skipType(tag & 7);
+                break;
+            }
+        }
+        return message;
+    };
+
+    /**
+     * Decodes a DistributionBucketOperatorMetadata message from the specified reader or buffer, length delimited.
+     * @function decodeDelimited
+     * @memberof DistributionBucketOperatorMetadata
+     * @static
+     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+     * @returns {DistributionBucketOperatorMetadata} DistributionBucketOperatorMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    DistributionBucketOperatorMetadata.decodeDelimited = function decodeDelimited(reader) {
+        if (!(reader instanceof $Reader))
+            reader = new $Reader(reader);
+        return this.decode(reader, reader.uint32());
+    };
+
+    /**
+     * Verifies a DistributionBucketOperatorMetadata message.
+     * @function verify
+     * @memberof DistributionBucketOperatorMetadata
+     * @static
+     * @param {Object.<string,*>} message Plain object to verify
+     * @returns {string|null} `null` if valid, otherwise the reason why it is not
+     */
+    DistributionBucketOperatorMetadata.verify = function verify(message) {
+        if (typeof message !== "object" || message === null)
+            return "object expected";
+        if (message.endpoint != null && message.hasOwnProperty("endpoint"))
+            if (!$util.isString(message.endpoint))
+                return "endpoint: string expected";
+        if (message.location != null && message.hasOwnProperty("location")) {
+            var error = $root.NodeLocationMetadata.verify(message.location);
+            if (error)
+                return "location." + error;
+        }
+        if (message.extra != null && message.hasOwnProperty("extra"))
+            if (!$util.isString(message.extra))
+                return "extra: string expected";
+        return null;
+    };
+
+    /**
+     * Creates a DistributionBucketOperatorMetadata message from a plain object. Also converts values to their respective internal types.
+     * @function fromObject
+     * @memberof DistributionBucketOperatorMetadata
+     * @static
+     * @param {Object.<string,*>} object Plain object
+     * @returns {DistributionBucketOperatorMetadata} DistributionBucketOperatorMetadata
+     */
+    DistributionBucketOperatorMetadata.fromObject = function fromObject(object) {
+        if (object instanceof $root.DistributionBucketOperatorMetadata)
+            return object;
+        var message = new $root.DistributionBucketOperatorMetadata();
+        if (object.endpoint != null)
+            message.endpoint = String(object.endpoint);
+        if (object.location != null) {
+            if (typeof object.location !== "object")
+                throw TypeError(".DistributionBucketOperatorMetadata.location: object expected");
+            message.location = $root.NodeLocationMetadata.fromObject(object.location);
+        }
+        if (object.extra != null)
+            message.extra = String(object.extra);
+        return message;
+    };
+
+    /**
+     * Creates a plain object from a DistributionBucketOperatorMetadata message. Also converts values to other types if specified.
+     * @function toObject
+     * @memberof DistributionBucketOperatorMetadata
+     * @static
+     * @param {DistributionBucketOperatorMetadata} message DistributionBucketOperatorMetadata
+     * @param {$protobuf.IConversionOptions} [options] Conversion options
+     * @returns {Object.<string,*>} Plain object
+     */
+    DistributionBucketOperatorMetadata.toObject = function toObject(message, options) {
+        if (!options)
+            options = {};
+        var object = {};
+        if (options.defaults) {
+            object.endpoint = "";
+            object.location = null;
+            object.extra = "";
+        }
+        if (message.endpoint != null && message.hasOwnProperty("endpoint"))
+            object.endpoint = message.endpoint;
+        if (message.location != null && message.hasOwnProperty("location"))
+            object.location = $root.NodeLocationMetadata.toObject(message.location, options);
+        if (message.extra != null && message.hasOwnProperty("extra"))
+            object.extra = message.extra;
+        return object;
+    };
+
+    /**
+     * Converts this DistributionBucketOperatorMetadata to JSON.
+     * @function toJSON
+     * @memberof DistributionBucketOperatorMetadata
+     * @instance
+     * @returns {Object.<string,*>} JSON object
+     */
+    DistributionBucketOperatorMetadata.prototype.toJSON = function toJSON() {
+        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+    };
+
+    return DistributionBucketOperatorMetadata;
+})();
+
+$root.DistributionBucketFamilyMetadata = (function() {
+
+    /**
+     * Properties of a DistributionBucketFamilyMetadata.
+     * @exports IDistributionBucketFamilyMetadata
+     * @interface IDistributionBucketFamilyMetadata
+     * @property {string|null} [region] DistributionBucketFamilyMetadata region
+     * @property {string|null} [description] DistributionBucketFamilyMetadata description
+     * @property {Array.<IGeoCoordiantes>|null} [boundary] DistributionBucketFamilyMetadata boundary
+     */
+
+    /**
+     * Constructs a new DistributionBucketFamilyMetadata.
+     * @exports DistributionBucketFamilyMetadata
+     * @classdesc Represents a DistributionBucketFamilyMetadata.
+     * @implements IDistributionBucketFamilyMetadata
+     * @constructor
+     * @param {IDistributionBucketFamilyMetadata=} [properties] Properties to set
+     */
+    function DistributionBucketFamilyMetadata(properties) {
+        this.boundary = [];
+        if (properties)
+            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+                if (properties[keys[i]] != null)
+                    this[keys[i]] = properties[keys[i]];
+    }
+
+    /**
+     * DistributionBucketFamilyMetadata region.
+     * @member {string} region
+     * @memberof DistributionBucketFamilyMetadata
+     * @instance
+     */
+    DistributionBucketFamilyMetadata.prototype.region = "";
+
+    /**
+     * DistributionBucketFamilyMetadata description.
+     * @member {string} description
+     * @memberof DistributionBucketFamilyMetadata
+     * @instance
+     */
+    DistributionBucketFamilyMetadata.prototype.description = "";
+
+    /**
+     * DistributionBucketFamilyMetadata boundary.
+     * @member {Array.<IGeoCoordiantes>} boundary
+     * @memberof DistributionBucketFamilyMetadata
+     * @instance
+     */
+    DistributionBucketFamilyMetadata.prototype.boundary = $util.emptyArray;
+
+    /**
+     * Creates a new DistributionBucketFamilyMetadata instance using the specified properties.
+     * @function create
+     * @memberof DistributionBucketFamilyMetadata
+     * @static
+     * @param {IDistributionBucketFamilyMetadata=} [properties] Properties to set
+     * @returns {DistributionBucketFamilyMetadata} DistributionBucketFamilyMetadata instance
+     */
+    DistributionBucketFamilyMetadata.create = function create(properties) {
+        return new DistributionBucketFamilyMetadata(properties);
+    };
+
+    /**
+     * Encodes the specified DistributionBucketFamilyMetadata message. Does not implicitly {@link DistributionBucketFamilyMetadata.verify|verify} messages.
+     * @function encode
+     * @memberof DistributionBucketFamilyMetadata
+     * @static
+     * @param {IDistributionBucketFamilyMetadata} message DistributionBucketFamilyMetadata message or plain object to encode
+     * @param {$protobuf.Writer} [writer] Writer to encode to
+     * @returns {$protobuf.Writer} Writer
+     */
+    DistributionBucketFamilyMetadata.encode = function encode(message, writer) {
+        if (!writer)
+            writer = $Writer.create();
+        if (message.region != null && Object.hasOwnProperty.call(message, "region"))
+            writer.uint32(/* id 1, wireType 2 =*/10).string(message.region);
+        if (message.description != null && Object.hasOwnProperty.call(message, "description"))
+            writer.uint32(/* id 2, wireType 2 =*/18).string(message.description);
+        if (message.boundary != null && message.boundary.length)
+            for (var i = 0; i < message.boundary.length; ++i)
+                $root.GeoCoordiantes.encode(message.boundary[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+        return writer;
+    };
+
+    /**
+     * Encodes the specified DistributionBucketFamilyMetadata message, length delimited. Does not implicitly {@link DistributionBucketFamilyMetadata.verify|verify} messages.
+     * @function encodeDelimited
+     * @memberof DistributionBucketFamilyMetadata
+     * @static
+     * @param {IDistributionBucketFamilyMetadata} message DistributionBucketFamilyMetadata message or plain object to encode
+     * @param {$protobuf.Writer} [writer] Writer to encode to
+     * @returns {$protobuf.Writer} Writer
+     */
+    DistributionBucketFamilyMetadata.encodeDelimited = function encodeDelimited(message, writer) {
+        return this.encode(message, writer).ldelim();
+    };
+
+    /**
+     * Decodes a DistributionBucketFamilyMetadata message from the specified reader or buffer.
+     * @function decode
+     * @memberof DistributionBucketFamilyMetadata
+     * @static
+     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+     * @param {number} [length] Message length if known beforehand
+     * @returns {DistributionBucketFamilyMetadata} DistributionBucketFamilyMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    DistributionBucketFamilyMetadata.decode = function decode(reader, length) {
+        if (!(reader instanceof $Reader))
+            reader = $Reader.create(reader);
+        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DistributionBucketFamilyMetadata();
+        while (reader.pos < end) {
+            var tag = reader.uint32();
+            switch (tag >>> 3) {
+            case 1:
+                message.region = reader.string();
+                break;
+            case 2:
+                message.description = reader.string();
+                break;
+            case 3:
+                if (!(message.boundary && message.boundary.length))
+                    message.boundary = [];
+                message.boundary.push($root.GeoCoordiantes.decode(reader, reader.uint32()));
+                break;
+            default:
+                reader.skipType(tag & 7);
+                break;
+            }
+        }
+        return message;
+    };
+
+    /**
+     * Decodes a DistributionBucketFamilyMetadata message from the specified reader or buffer, length delimited.
+     * @function decodeDelimited
+     * @memberof DistributionBucketFamilyMetadata
+     * @static
+     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+     * @returns {DistributionBucketFamilyMetadata} DistributionBucketFamilyMetadata
+     * @throws {Error} If the payload is not a reader or valid buffer
+     * @throws {$protobuf.util.ProtocolError} If required fields are missing
+     */
+    DistributionBucketFamilyMetadata.decodeDelimited = function decodeDelimited(reader) {
+        if (!(reader instanceof $Reader))
+            reader = new $Reader(reader);
+        return this.decode(reader, reader.uint32());
+    };
+
+    /**
+     * Verifies a DistributionBucketFamilyMetadata message.
+     * @function verify
+     * @memberof DistributionBucketFamilyMetadata
+     * @static
+     * @param {Object.<string,*>} message Plain object to verify
+     * @returns {string|null} `null` if valid, otherwise the reason why it is not
+     */
+    DistributionBucketFamilyMetadata.verify = function verify(message) {
+        if (typeof message !== "object" || message === null)
+            return "object expected";
+        if (message.region != null && message.hasOwnProperty("region"))
+            if (!$util.isString(message.region))
+                return "region: string expected";
+        if (message.description != null && message.hasOwnProperty("description"))
+            if (!$util.isString(message.description))
+                return "description: string expected";
+        if (message.boundary != null && message.hasOwnProperty("boundary")) {
+            if (!Array.isArray(message.boundary))
+                return "boundary: array expected";
+            for (var i = 0; i < message.boundary.length; ++i) {
+                var error = $root.GeoCoordiantes.verify(message.boundary[i]);
+                if (error)
+                    return "boundary." + error;
+            }
+        }
+        return null;
+    };
+
+    /**
+     * Creates a DistributionBucketFamilyMetadata message from a plain object. Also converts values to their respective internal types.
+     * @function fromObject
+     * @memberof DistributionBucketFamilyMetadata
+     * @static
+     * @param {Object.<string,*>} object Plain object
+     * @returns {DistributionBucketFamilyMetadata} DistributionBucketFamilyMetadata
+     */
+    DistributionBucketFamilyMetadata.fromObject = function fromObject(object) {
+        if (object instanceof $root.DistributionBucketFamilyMetadata)
+            return object;
+        var message = new $root.DistributionBucketFamilyMetadata();
+        if (object.region != null)
+            message.region = String(object.region);
+        if (object.description != null)
+            message.description = String(object.description);
+        if (object.boundary) {
+            if (!Array.isArray(object.boundary))
+                throw TypeError(".DistributionBucketFamilyMetadata.boundary: array expected");
+            message.boundary = [];
+            for (var i = 0; i < object.boundary.length; ++i) {
+                if (typeof object.boundary[i] !== "object")
+                    throw TypeError(".DistributionBucketFamilyMetadata.boundary: object expected");
+                message.boundary[i] = $root.GeoCoordiantes.fromObject(object.boundary[i]);
+            }
+        }
+        return message;
+    };
+
+    /**
+     * Creates a plain object from a DistributionBucketFamilyMetadata message. Also converts values to other types if specified.
+     * @function toObject
+     * @memberof DistributionBucketFamilyMetadata
+     * @static
+     * @param {DistributionBucketFamilyMetadata} message DistributionBucketFamilyMetadata
+     * @param {$protobuf.IConversionOptions} [options] Conversion options
+     * @returns {Object.<string,*>} Plain object
+     */
+    DistributionBucketFamilyMetadata.toObject = function toObject(message, options) {
+        if (!options)
+            options = {};
+        var object = {};
+        if (options.arrays || options.defaults)
+            object.boundary = [];
+        if (options.defaults) {
+            object.region = "";
+            object.description = "";
+        }
+        if (message.region != null && message.hasOwnProperty("region"))
+            object.region = message.region;
+        if (message.description != null && message.hasOwnProperty("description"))
+            object.description = message.description;
+        if (message.boundary && message.boundary.length) {
+            object.boundary = [];
+            for (var j = 0; j < message.boundary.length; ++j)
+                object.boundary[j] = $root.GeoCoordiantes.toObject(message.boundary[j], options);
+        }
+        return object;
+    };
+
+    /**
+     * Converts this DistributionBucketFamilyMetadata to JSON.
+     * @function toJSON
+     * @memberof DistributionBucketFamilyMetadata
+     * @instance
+     * @returns {Object.<string,*>} JSON object
+     */
+    DistributionBucketFamilyMetadata.prototype.toJSON = function toJSON() {
+        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+    };
+
+    return DistributionBucketFamilyMetadata;
+})();
+
+module.exports = $root;

+ 136 - 0
metadata-protobuf/doc/index.md

@@ -0,0 +1,136 @@
+# Protocol Documentation
+<a name="top"></a>
+
+## Table of Contents
+
+- [proto/Storage.proto](#proto/Storage.proto)
+    - [DistributionBucketFamilyMetadata](#.DistributionBucketFamilyMetadata)
+    - [DistributionBucketOperatorMetadata](#.DistributionBucketOperatorMetadata)
+    - [GeoCoordiantes](#.GeoCoordiantes)
+    - [NodeLocationMetadata](#.NodeLocationMetadata)
+    - [StorageBucketOperatorMetadata](#.StorageBucketOperatorMetadata)
+  
+- [Scalar Value Types](#scalar-value-types)
+
+
+
+<a name="proto/Storage.proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## proto/Storage.proto
+
+
+
+<a name=".DistributionBucketFamilyMetadata"></a>
+
+### DistributionBucketFamilyMetadata
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| region | [string](#string) | optional | ID / name of the region covered by the distribution family (ie. us-east-1). Should be unique. |
+| description | [string](#string) | optional | Additional, more specific description of the region |
+| boundary | [GeoCoordiantes](#GeoCoordiantes) | repeated | Geographical boundary of the region, defined as polygon through array of coordinates |
+
+
+
+
+
+
+<a name=".DistributionBucketOperatorMetadata"></a>
+
+### DistributionBucketOperatorMetadata
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| endpoint | [string](#string) | optional | Root distribution node endpoint (ie. https://example.com/distribution) |
+| location | [NodeLocationMetadata](#NodeLocationMetadata) | optional | Information about node&#39;s phisical location |
+| extra | [string](#string) | optional | Additional information about the node / node operator |
+
+
+
+
+
+
+<a name=".GeoCoordiantes"></a>
+
+### GeoCoordiantes
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| latitude | [float](#float) | required |  |
+| longitude | [float](#float) | required |  |
+
+
+
+
+
+
+<a name=".NodeLocationMetadata"></a>
+
+### NodeLocationMetadata
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| country_code | [string](#string) | optional | ISO 3166-1 alpha-2 country code (2 letters) |
+| city | [string](#string) | optional | City name |
+| coordinates | [GeoCoordiantes](#GeoCoordiantes) | optional | Geographic coordinates |
+
+
+
+
+
+
+<a name=".StorageBucketOperatorMetadata"></a>
+
+### StorageBucketOperatorMetadata
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| endpoint | [string](#string) | optional | Root storage node endpoint (ie. https://example.com/storage) |
+| location | [NodeLocationMetadata](#NodeLocationMetadata) | optional | Information about node&#39;s phisical location |
+| extra | [string](#string) | optional | Additional information about the node / node operator |
+
+
+
+
+
+ 
+
+ 
+
+ 
+
+ 
+
+
+
+## Scalar Value Types
+
+| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
+| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
+| <a name="double" /> double |  | double | double | float | float64 | double | float | Float |
+| <a name="float" /> float |  | float | float | float | float32 | float | float | Float |
+| <a name="int32" /> int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| <a name="int64" /> int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
+| <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
+| <a name="sint32" /> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| <a name="sint64" /> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| <a name="fixed32" /> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
+| <a name="fixed64" /> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
+| <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| <a name="bool" /> bool |  | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
+| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
+| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |
+

+ 10 - 0
metadata-protobuf/generate-md-doc.sh

@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+# Directory to write generated documentation to
+OUT_DIR_DOC="./doc"
+mkdir -p ${OUT_DIR_DOC}
+
+# Gernerate Markdown docs
+protoc \
+    --doc_out="${OUT_DIR_DOC}" --doc_opt=markdown,index.md \
+    proto/*.proto

+ 55 - 0
metadata-protobuf/package.json

@@ -0,0 +1,55 @@
+{
+  "name": "@joystream/metadata-protobuf",
+  "version": "1.0.0",
+  "description": "Joystream Metadata Protobuf Library ",
+  "main": "lib/index.js",
+  "types": "lib/index.d.ts",
+  "exports": {
+    ".": "./lib/index.js",
+    "./utils": "./lib/utils.js",
+    "./licenses": "./lib/licenses.js"
+  },
+  "typesVersions": {
+    "*": {
+      "lib/index.d.ts": ["lib/index.d.ts"],
+      "*": [ "lib/*" ]
+    }
+  },
+  "repository": "https://github.com/joystream/joystream",
+  "author": "Joystream Contributors",
+  "license": "MIT",
+  "private": false,
+  "scripts": {
+    "build": "yarn compile && tsc",
+    "compile": "yarn ts-node ./scripts/compile.ts",
+    "generate-doc": "./generate-md-doc.sh",
+    "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha --inline-diffs -r ts-node/register 'test/**/*.ts'",
+    "lint": "eslint ./src --ext .ts",
+    "checks": "tsc --noEmit --pretty && prettier ./ --check && yarn lint",
+    "format": "prettier ./ --write"
+  },
+  "files": [
+    "lib/**/*",
+    "doc/**",
+    "proto/**",
+    "compiled/**/*",
+    "README.md"
+  ],
+  "dependencies": {
+    "google-protobuf": "^3.14.0",
+    "long": "^4.0.0",
+    "@types/long": "^4.0.1",
+    "i18n-iso-countries": "^6.8.0"
+  },
+  "devDependencies": {
+    "@types/chai": "^4.2.11",
+    "@types/mocha": "^8.2.0",
+    "chai": "^4.2.0",
+    "eslint": "^7.6.0",
+    "mocha": "^8.2.1",
+    "prettier": "2.0.2",
+    "ts-node": "^8.8.1",
+    "typescript": "^4.1.3",
+    "protobufjs": "^6.11.2"
+  }
+}

+ 30 - 0
metadata-protobuf/proto/Storage.proto

@@ -0,0 +1,30 @@
+syntax = "proto2";
+
+message GeoCoordiantes {
+  optional float latitude = 3;
+  optional float longitude = 4;
+}
+
+message NodeLocationMetadata {
+  optional string country_code = 1; // ISO 3166-1 alpha-2 country code (2 letters)
+  optional string city = 2; // City name
+  optional GeoCoordiantes coordinates = 3; // Geographic coordinates (providing {} will unset current value)
+}
+
+message StorageBucketOperatorMetadata {
+  optional string endpoint = 1; // Root storage node endpoint (ie. https://example.com/storage)
+  optional NodeLocationMetadata location = 2; // Information about node's phisical location (providing {} will unset current value)
+  optional string extra = 3; // Additional information about the node / node operator
+}
+
+message DistributionBucketOperatorMetadata {
+  optional string endpoint = 1; // Root distribution node endpoint (ie. https://example.com/distribution)
+  optional NodeLocationMetadata location = 2; // Information about node's phisical location (providing {} will unset current value)
+  optional string extra = 3; // Additional information about the node / node operator
+}
+
+message DistributionBucketFamilyMetadata {
+  optional string region = 1; // ID / name of the region covered by the distribution family (ie. us-east-1). Should be unique.
+  optional string description = 2; // Additional, more specific description of the region
+  repeated GeoCoordiantes boundary = 3; // Geographical boundary of the region, defined as polygon through array of coordinates (providing [{}] will unset the current value)
+}

+ 28 - 0
metadata-protobuf/scripts/compile.ts

@@ -0,0 +1,28 @@
+import { main as pbjs } from 'protobufjs/cli/pbjs'
+import { main as pbts } from 'protobufjs/cli/pbts'
+import path from 'path'
+import fs from 'fs'
+
+const OUT_DIR = path.resolve(__dirname, '../compiled')
+
+pbjs(
+  ['--target', 'static-module', '-w', 'commonjs', '-o', `${OUT_DIR}/index.js`, '--force-long', 'proto/*.proto'],
+  function (err) {
+    if (err) {
+      throw err
+    }
+    console.log(`${OUT_DIR}/index.js updated`)
+  }
+)
+
+pbts([`${OUT_DIR}/*.js`], function (err, output) {
+  if (err) {
+    throw err
+  }
+  // Fix missing Long import
+  output = `import { Long } from 'long'\n${output}`
+
+  fs.writeFileSync(`${OUT_DIR}/index.d.ts`, output)
+
+  console.log(`${OUT_DIR}/index.d.ts updated`)
+})

+ 11 - 0
metadata-protobuf/scripts/tsconfig.json

@@ -0,0 +1,11 @@
+{
+  "compilerOptions": {
+    "noEmit": true,
+    "strict": true,
+    "esModuleInterop": true,
+    "forceConsistentCasingInFileNames": true,
+    "skipLibCheck": true,
+    "resolveJsonModule": true
+  },
+  "include": ["./*.ts"]
+}

+ 2 - 0
metadata-protobuf/src/index.ts

@@ -0,0 +1,2 @@
+// protobuf message constructors
+export * from '../compiled'

+ 25 - 0
metadata-protobuf/src/types.ts

@@ -0,0 +1,25 @@
+import { Long } from 'long'
+import { IConversionOptions } from 'protobufjs'
+
+export type AnyMessage<T> = T & {
+  toJSON(): Record<string, unknown>
+}
+
+export type AnyMetadataClass<T> = {
+  name: string
+  decode(binary: Uint8Array): AnyMessage<T>
+  encode(obj: T): { finish(): Uint8Array }
+  toObject(obj: AnyMessage<T>, options?: IConversionOptions): Record<string, unknown>
+  verify(message: { [k: string]: unknown }): null | string
+  fromObject(object: { [k: string]: unknown }): AnyMessage<T>
+}
+
+export type DecodedMetadataObject<T> = {
+  [K in keyof T]: T[K] extends Long | null | undefined
+    ? Exclude<T[K], Long> | string
+    : T[K] extends string | number | boolean | null | undefined
+    ? T[K]
+    : T[K] extends Array<infer S>
+    ? DecodedMetadataObject<S>[]
+    : DecodedMetadataObject<T[K]>
+}

+ 38 - 0
metadata-protobuf/src/utils.ts

@@ -0,0 +1,38 @@
+import { AnyMessage, AnyMetadataClass, DecodedMetadataObject } from './types'
+import countries from 'i18n-iso-countries'
+
+export function isSet<T>(v: T | null | undefined): v is T {
+  return v !== null && v !== undefined
+}
+
+export function isEmptyObject(object: Record<string, unknown>): boolean {
+  return Object.keys(object).length === 0
+}
+
+export function integrateMeta<
+  T,
+  Props extends readonly (keyof T & keyof M & string)[],
+  M extends { [K in Props[number]]?: T[K] | null }
+>(object: T, meta: M, props: Props): void {
+  props.forEach((prop) => {
+    const metaPropVal = meta[prop] as T[Props[number]] | null | undefined
+    if (isSet(metaPropVal)) {
+      object[prop] = metaPropVal
+    }
+  })
+}
+
+export function encodeDecode<T>(metaClass: AnyMetadataClass<T>, value: T): DecodedMetadataObject<T> {
+  const encoded = metaClass.encode(value).finish()
+  return metaToObject(metaClass, metaClass.decode(encoded))
+}
+
+export function metaToObject<T>(metaClass: AnyMetadataClass<T>, value: AnyMessage<T>): DecodedMetadataObject<T> {
+  // Default conversion options - use Strings for "Long" values and ignore unset "repeated" fields
+  return metaClass.toObject(value, { arrays: false, longs: String }) as DecodedMetadataObject<T>
+}
+
+// According to ISO 3166-1 alpha-2 standard
+export function isValidCountryCode(code: string): boolean {
+  return countries.getAlpha2Codes()[code] !== undefined
+}

+ 14 - 0
metadata-protobuf/test/tsconfig.json

@@ -0,0 +1,14 @@
+{
+  "compilerOptions": {
+    "target": "esnext",
+    "module": "commonjs",
+    "noEmit": true,
+    "strict": true,
+    "declaration": true,
+    "esModuleInterop": true,
+    "forceConsistentCasingInFileNames": true,
+    "skipLibCheck": true,
+    "resolveJsonModule": true
+  },
+  "include": ["./*", "../src/*"]
+}

+ 15 - 0
metadata-protobuf/tsconfig.json

@@ -0,0 +1,15 @@
+{
+  "compilerOptions": {
+    "target": "esnext",
+    "module": "commonjs",
+    "outDir": "lib",
+    "strict": true,
+    "declaration": true,
+    "esModuleInterop": true,
+    "forceConsistentCasingInFileNames": true,
+    "skipLibCheck": true,
+    "resolveJsonModule": true,
+  },
+  "include": ["src"],
+  "exclude": ["node_modules", "test"]
+}

+ 5 - 5
package.json

@@ -27,18 +27,18 @@
     "query-node",
     "query-node/mappings",
     "query-node/generated/*",
-    "content-metadata-protobuf"
+    "content-metadata-protobuf",
+    "metadata-protobuf"
   ],
   "resolutions": {
     "@polkadot/api": "4.2.1",
     "@polkadot/api-contract": "4.2.1",
-    "@polkadot/keyring": "^6.0.5",
+    "@polkadot/keyring": "6.0.5",
     "@polkadot/metadata": "4.2.1",
     "@polkadot/types": "4.2.1",
-    "@polkadot/util": "^6.0.5",
-    "@polkadot/util-crypto": "^6.0.5",
+    "@polkadot/util": "6.0.5",
+    "@polkadot/util-crypto": "6.0.5",
     "@polkadot/wasm-crypto": "^4.0.2",
-    "warthog": "https://github.com/Joystream/warthog/releases/download/v2.37.2-sumer/joystream-warthog-v2.37.2-sumer.tgz",
     "babel-core": "^7.0.0-bridge.0",
     "typescript": "^3.9.7",
     "bn.js": "^5.1.2",

BIN
pioneer/test/test.contract.wasm


+ 1 - 2
query-node/.gitignore

@@ -1,3 +1,2 @@
 lib
-dist
-.env
+generated

+ 10 - 6
query-node/build.sh

@@ -10,13 +10,17 @@ set -a
 set +a
 
 # only use this when new Hydra releases and contents of `generated/` folder needs to be refreshed
-#yarn clean
-#yarn codegen:noinstall
-#yarn codegen:typegen # if this fails try to run this command outside of yarn workspaces
-
-yarn query-node:build
-yarn mappings:build
+yarn clean
+yarn codegen:noinstall
+yarn typegen # if this fails try to run this command outside of yarn workspaces
 
 # We run yarn again to ensure graphql-server dependencies are installed
 # and are inline with root workspace resolutions
 yarn
+
+yarn workspace query-node codegen
+yarn workspace query-node build
+
+yarn workspace query-node-mappings build
+
+

+ 0 - 21
query-node/generated/graphql-server/.env

@@ -1,21 +0,0 @@
-WARTHOG_INTROSPECTION=true
-WARTHOG_SUBSCRIPTIONS=true
-WARTHOG_PLAYGROUND=true
-WARTHOG_DB_SYNCHRONIZE=false
-WARTHOG_DB_OVERRIDE=false
-WARTHOG_DB_DATABASE=query_node_processor
-WARTHOG_DB_USERNAME=postgres
-WARTHOG_DB_PASSWORD=postgres
-WARTHOG_DB_HOST=localhost
-WARTHOG_DB_PORT=5432
-WARTHOG_APP_PORT=4002
-WARTHOG_APP_HOST=localhost
-GRAPHQL_SERVER_PORT=4002
-GRAPHQL_SERVER_HOST=localhost
-PGDATABASE=query_node_processor
-PGUSER=postgres
-PGPASSWORD=postgres
-PGHOST=localhost
-PGPORT=5432
-DEBUG=qnode-cli:*
-NODE_ENV=development

+ 0 - 6
query-node/generated/graphql-server/.gitignore

@@ -1,6 +0,0 @@
-# Dependencies
-node_modules
-
-# OS metadata
-.DS_Store
-Thumbs.db

+ 0 - 46
query-node/generated/graphql-server/db/migrations/channelCategoriesByName.migration.ts

@@ -1,46 +0,0 @@
-import { MigrationInterface, QueryRunner } from "typeorm";
-
-export class ChannelCategoriesByNameMigration1617981663820 implements MigrationInterface {
-    name = 'channelCategoriesByNameMigration1617981663820'
-
-    public async up(queryRunner: QueryRunner): Promise<void> {
-        // TODO: escape 
-        await queryRunner.query(`
-            ALTER TABLE channel_category 
-            ADD COLUMN channel_categories_by_name_tsv tsvector 
-            GENERATED ALWAYS AS (  
-                    setweight(to_tsvector('english', coalesce("name", '')), 'A') 
-                ) 
-            STORED;
-        `);
-        await queryRunner.query(`
-            ALTER TABLE channel_category 
-            ADD COLUMN channel_categories_by_name_doc text 
-            GENERATED ALWAYS AS (  
-                    coalesce("name", '') 
-                ) 
-            STORED;
-        `);
-        await queryRunner.query(`CREATE INDEX channel_categories_by_name_channel_category_idx ON channel_category USING GIN (channel_categories_by_name_tsv)`);
-        await queryRunner.query(`CREATE INDEX channel_category_id_idx ON channel_category (('channel_category' || '_' || id))`);
-
-        await queryRunner.query(`
-            CREATE VIEW channel_categories_by_name_view AS
-            SELECT 
-                text 'channel_category' AS origin_table, 'channel_category' || '_' || id AS unique_id, id, channel_categories_by_name_tsv AS tsv, channel_categories_by_name_doc AS document 
-            FROM
-                channel_category
-        `);
-
-    }
-
-    public async down(queryRunner: QueryRunner): Promise<void> {
-        await queryRunner.query(`DROP VIEW channel_categories_by_name_view`);
-        await queryRunner.query(`DROP INDEX channel_categories_by_name_channel_category_idx`);
-        await queryRunner.query(`DROP INDEX channel_category_id_idx`);
-        await queryRunner.query(`ALTER TABLE channel_category DROP COLUMN channel_categories_by_name_tsv`);
-        await queryRunner.query(`ALTER TABLE channel_category DROP COLUMN channel_categories_by_name_doc`);
-    }
-
-
-}

+ 0 - 46
query-node/generated/graphql-server/db/migrations/membersByHandle.migration.ts

@@ -1,46 +0,0 @@
-import { MigrationInterface, QueryRunner } from "typeorm";
-
-export class MembersByHandleMigration1617981663821 implements MigrationInterface {
-    name = 'membersByHandleMigration1617981663821'
-
-    public async up(queryRunner: QueryRunner): Promise<void> {
-        // TODO: escape 
-        await queryRunner.query(`
-            ALTER TABLE membership 
-            ADD COLUMN members_by_handle_tsv tsvector 
-            GENERATED ALWAYS AS (  
-                    setweight(to_tsvector('english', coalesce("handle", '')), 'A') 
-                ) 
-            STORED;
-        `);
-        await queryRunner.query(`
-            ALTER TABLE membership 
-            ADD COLUMN members_by_handle_doc text 
-            GENERATED ALWAYS AS (  
-                    coalesce("handle", '') 
-                ) 
-            STORED;
-        `);
-        await queryRunner.query(`CREATE INDEX members_by_handle_membership_idx ON membership USING GIN (members_by_handle_tsv)`);
-        await queryRunner.query(`CREATE INDEX membership_id_idx ON membership (('membership' || '_' || id))`);
-
-        await queryRunner.query(`
-            CREATE VIEW members_by_handle_view AS
-            SELECT 
-                text 'membership' AS origin_table, 'membership' || '_' || id AS unique_id, id, members_by_handle_tsv AS tsv, members_by_handle_doc AS document 
-            FROM
-                membership
-        `);
-
-    }
-
-    public async down(queryRunner: QueryRunner): Promise<void> {
-        await queryRunner.query(`DROP VIEW members_by_handle_view`);
-        await queryRunner.query(`DROP INDEX members_by_handle_membership_idx`);
-        await queryRunner.query(`DROP INDEX membership_id_idx`);
-        await queryRunner.query(`ALTER TABLE membership DROP COLUMN members_by_handle_tsv`);
-        await queryRunner.query(`ALTER TABLE membership DROP COLUMN members_by_handle_doc`);
-    }
-
-
-}

+ 0 - 73
query-node/generated/graphql-server/db/migrations/search.migration.ts

@@ -1,73 +0,0 @@
-import { MigrationInterface, QueryRunner } from "typeorm";
-
-export class SearchMigration1617981663819 implements MigrationInterface {
-    name = 'searchMigration1617981663819'
-
-    public async up(queryRunner: QueryRunner): Promise<void> {
-        // TODO: escape 
-        await queryRunner.query(`
-            ALTER TABLE channel 
-            ADD COLUMN search_tsv tsvector 
-            GENERATED ALWAYS AS (  
-                    setweight(to_tsvector('english', coalesce("title", '')), 'A') 
-                ) 
-            STORED;
-        `);
-        await queryRunner.query(`
-            ALTER TABLE channel 
-            ADD COLUMN search_doc text 
-            GENERATED ALWAYS AS (  
-                    coalesce("title", '') 
-                ) 
-            STORED;
-        `);
-        await queryRunner.query(`CREATE INDEX search_channel_idx ON channel USING GIN (search_tsv)`);
-        await queryRunner.query(`CREATE INDEX channel_id_idx ON channel (('channel' || '_' || id))`);
-        await queryRunner.query(`
-            ALTER TABLE video 
-            ADD COLUMN search_tsv tsvector 
-            GENERATED ALWAYS AS (  
-                    setweight(to_tsvector('english', coalesce("title", '')), 'A') 
-                ) 
-            STORED;
-        `);
-        await queryRunner.query(`
-            ALTER TABLE video 
-            ADD COLUMN search_doc text 
-            GENERATED ALWAYS AS (  
-                    coalesce("title", '') 
-                ) 
-            STORED;
-        `);
-        await queryRunner.query(`CREATE INDEX search_video_idx ON video USING GIN (search_tsv)`);
-        await queryRunner.query(`CREATE INDEX video_id_idx ON video (('video' || '_' || id))`);
-
-        await queryRunner.query(`
-            CREATE VIEW search_view AS
-            SELECT 
-                text 'channel' AS origin_table, 'channel' || '_' || id AS unique_id, id, search_tsv AS tsv, search_doc AS document 
-            FROM
-                channel
-            UNION ALL
-            SELECT 
-                text 'video' AS origin_table, 'video' || '_' || id AS unique_id, id, search_tsv AS tsv, search_doc AS document 
-            FROM
-                video
-        `);
-
-    }
-
-    public async down(queryRunner: QueryRunner): Promise<void> {
-        await queryRunner.query(`DROP VIEW search_view`);
-        await queryRunner.query(`DROP INDEX search_channel_idx`);
-        await queryRunner.query(`DROP INDEX channel_id_idx`);
-        await queryRunner.query(`ALTER TABLE channel DROP COLUMN search_tsv`);
-        await queryRunner.query(`ALTER TABLE channel DROP COLUMN search_doc`);
-        await queryRunner.query(`DROP INDEX search_video_idx`);
-        await queryRunner.query(`DROP INDEX video_id_idx`);
-        await queryRunner.query(`ALTER TABLE video DROP COLUMN search_tsv`);
-        await queryRunner.query(`ALTER TABLE video DROP COLUMN search_doc`);
-    }
-
-
-}

+ 0 - 46
query-node/generated/graphql-server/db/migrations/videoCategoriesByName.migration.ts

@@ -1,46 +0,0 @@
-import { MigrationInterface, QueryRunner } from "typeorm";
-
-export class VideoCategoriesByNameMigration1617981663821 implements MigrationInterface {
-    name = 'videoCategoriesByNameMigration1617981663821'
-
-    public async up(queryRunner: QueryRunner): Promise<void> {
-        // TODO: escape 
-        await queryRunner.query(`
-            ALTER TABLE video_category 
-            ADD COLUMN video_categories_by_name_tsv tsvector 
-            GENERATED ALWAYS AS (  
-                    setweight(to_tsvector('english', coalesce("name", '')), 'A') 
-                ) 
-            STORED;
-        `);
-        await queryRunner.query(`
-            ALTER TABLE video_category 
-            ADD COLUMN video_categories_by_name_doc text 
-            GENERATED ALWAYS AS (  
-                    coalesce("name", '') 
-                ) 
-            STORED;
-        `);
-        await queryRunner.query(`CREATE INDEX video_categories_by_name_video_category_idx ON video_category USING GIN (video_categories_by_name_tsv)`);
-        await queryRunner.query(`CREATE INDEX video_category_id_idx ON video_category (('video_category' || '_' || id))`);
-
-        await queryRunner.query(`
-            CREATE VIEW video_categories_by_name_view AS
-            SELECT 
-                text 'video_category' AS origin_table, 'video_category' || '_' || id AS unique_id, id, video_categories_by_name_tsv AS tsv, video_categories_by_name_doc AS document 
-            FROM
-                video_category
-        `);
-
-    }
-
-    public async down(queryRunner: QueryRunner): Promise<void> {
-        await queryRunner.query(`DROP VIEW video_categories_by_name_view`);
-        await queryRunner.query(`DROP INDEX video_categories_by_name_video_category_idx`);
-        await queryRunner.query(`DROP INDEX video_category_id_idx`);
-        await queryRunner.query(`ALTER TABLE video_category DROP COLUMN video_categories_by_name_tsv`);
-        await queryRunner.query(`ALTER TABLE video_category DROP COLUMN video_categories_by_name_doc`);
-    }
-
-
-}

+ 0 - 42
query-node/generated/graphql-server/env.yml

@@ -1,42 +0,0 @@
-default_env: &default_env
-    WARTHOG_INTROSPECTION: true
-    WARTHOG_SUBSCRIPTIONS: true
-    WARTHOG_PLAYGROUND: true
-    WARTHOG_DB_SYNCHRONIZE: false  
-    ## if the DB is synced, the new columns 
-    ## created by migrations are dropped, no good
-    ## one should run `WARTHOG_DB_SYNCHRONIZE=true yarn sync` manually instead
-    WARTHOG_DB_OVERRIDE: false
-    WARTHOG_DB_DATABASE: ${env:DB_NAME}
-    WARTHOG_DB_USERNAME: ${env:DB_USER}
-    WARTHOG_DB_PASSWORD: ${env:DB_PASS}
-    WARTHOG_DB_HOST: ${env:DB_HOST}
-    WARTHOG_DB_PORT: ${env:DB_PORT}
-    WARTHOG_APP_PORT: ${env:GRAPHQL_SERVER_PORT}
-    WARTHOG_APP_HOST: ${env:GRAPHQL_SERVER_HOST}
-    GRAPHQL_SERVER_PORT: ${env:GRAPHQL_SERVER_PORT}
-    GRAPHQL_SERVER_HOST: ${env:GRAPHQL_SERVER_HOST}
-    
-    PGDATABASE: ${env:DB_NAME}
-    PGUSER: ${env:DB_USER}
-    PGPASSWORD: ${env:DB_PASS}
-    PGHOST: ${env:DB_HOST}
-    PGPORT: ${env:DB_PORT}
-
-development:
-    <<: *default_env
-    DEBUG: 'qnode-cli:*'
-    NODE_ENV: development
-
-staging:
-    <<: *default_env
-
-production:
-    NODE_ENV: production
-    WARTHOG_DB_ENTITIES: dist/src/**/*.model.js  
-    WARTHOG_DB_SUBSCRIBERS: dist/src/**/*.model.js
-    WARTHOG_RESOLVERS_PATH: dist/src/**/*.resolver.js
-    WARTHOG_DB_MIGRATIONS: dist/db/migrations/**/*.js
-    DEBUG: 'qnode-cli:*'
-    <<: *default_env
-  

+ 0 - 2246
query-node/generated/graphql-server/generated/binding.ts

@@ -1,2246 +0,0 @@
-import 'graphql-import-node'; // Needed so you can import *.graphql files 
-
-import { makeBindingClass, Options } from 'graphql-binding'
-import { GraphQLResolveInfo, GraphQLSchema } from 'graphql'
-import { IResolvers } from 'graphql-tools/dist/Interfaces'
-import * as schema from  './schema.graphql'
-
-export interface Query {
-    curatorGroups: <T = Array<CuratorGroup>>(args: { offset?: Int | null, limit?: Int | null, where?: CuratorGroupWhereInput | null, orderBy?: Array<CuratorGroupOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    curatorGroupByUniqueInput: <T = CuratorGroup | null>(args: { where: CuratorGroupWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    curatorGroupsConnection: <T = CuratorGroupConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: CuratorGroupWhereInput | null, orderBy?: Array<CuratorGroupOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    dataObjects: <T = Array<DataObject>>(args: { offset?: Int | null, limit?: Int | null, where?: DataObjectWhereInput | null, orderBy?: Array<DataObjectOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    dataObjectByUniqueInput: <T = DataObject | null>(args: { where: DataObjectWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    dataObjectsConnection: <T = DataObjectConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: DataObjectWhereInput | null, orderBy?: Array<DataObjectOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    channelCategories: <T = Array<ChannelCategory>>(args: { offset?: Int | null, limit?: Int | null, where?: ChannelCategoryWhereInput | null, orderBy?: Array<ChannelCategoryOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    channelCategoryByUniqueInput: <T = ChannelCategory | null>(args: { where: ChannelCategoryWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    channelCategoriesConnection: <T = ChannelCategoryConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: ChannelCategoryWhereInput | null, orderBy?: Array<ChannelCategoryOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    channels: <T = Array<Channel>>(args: { offset?: Int | null, limit?: Int | null, where?: ChannelWhereInput | null, orderBy?: Array<ChannelOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    channelByUniqueInput: <T = Channel | null>(args: { where: ChannelWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    channelsConnection: <T = ChannelConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: ChannelWhereInput | null, orderBy?: Array<ChannelOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    languages: <T = Array<Language>>(args: { offset?: Int | null, limit?: Int | null, where?: LanguageWhereInput | null, orderBy?: Array<LanguageOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    languageByUniqueInput: <T = Language | null>(args: { where: LanguageWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    languagesConnection: <T = LanguageConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: LanguageWhereInput | null, orderBy?: Array<LanguageOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    licenses: <T = Array<License>>(args: { offset?: Int | null, limit?: Int | null, where?: LicenseWhereInput | null, orderBy?: Array<LicenseOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    licenseByUniqueInput: <T = License | null>(args: { where: LicenseWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    licensesConnection: <T = LicenseConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: LicenseWhereInput | null, orderBy?: Array<LicenseOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    memberships: <T = Array<Membership>>(args: { offset?: Int | null, limit?: Int | null, where?: MembershipWhereInput | null, orderBy?: Array<MembershipOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    membershipByUniqueInput: <T = Membership | null>(args: { where: MembershipWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    membershipsConnection: <T = MembershipConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: MembershipWhereInput | null, orderBy?: Array<MembershipOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    nextEntityIds: <T = Array<NextEntityId>>(args: { offset?: Int | null, limit?: Int | null, where?: NextEntityIdWhereInput | null, orderBy?: Array<NextEntityIdOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    nextEntityIdByUniqueInput: <T = NextEntityId | null>(args: { where: NextEntityIdWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    nextEntityIdsConnection: <T = NextEntityIdConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: NextEntityIdWhereInput | null, orderBy?: Array<NextEntityIdOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    channelCategoriesByName: <T = Array<ChannelCategoriesByNameFTSOutput>>(args: { whereChannelCategory?: ChannelCategoryWhereInput | null, skip?: Int | null, limit?: Int | null, text: String }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    membersByHandle: <T = Array<MembersByHandleFTSOutput>>(args: { whereMembership?: MembershipWhereInput | null, skip?: Int | null, limit?: Int | null, text: String }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    search: <T = Array<SearchFTSOutput>>(args: { whereVideo?: VideoWhereInput | null, whereChannel?: ChannelWhereInput | null, skip?: Int | null, limit?: Int | null, text: String }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    videoCategoriesByName: <T = Array<VideoCategoriesByNameFTSOutput>>(args: { whereVideoCategory?: VideoCategoryWhereInput | null, skip?: Int | null, limit?: Int | null, text: String }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    videoCategories: <T = Array<VideoCategory>>(args: { offset?: Int | null, limit?: Int | null, where?: VideoCategoryWhereInput | null, orderBy?: Array<VideoCategoryOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    videoCategoryByUniqueInput: <T = VideoCategory | null>(args: { where: VideoCategoryWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    videoCategoriesConnection: <T = VideoCategoryConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: VideoCategoryWhereInput | null, orderBy?: Array<VideoCategoryOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    videoMediaEncodings: <T = Array<VideoMediaEncoding>>(args: { offset?: Int | null, limit?: Int | null, where?: VideoMediaEncodingWhereInput | null, orderBy?: Array<VideoMediaEncodingOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    videoMediaEncodingByUniqueInput: <T = VideoMediaEncoding | null>(args: { where: VideoMediaEncodingWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    videoMediaEncodingsConnection: <T = VideoMediaEncodingConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: VideoMediaEncodingWhereInput | null, orderBy?: Array<VideoMediaEncodingOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    videoMediaMetadata: <T = Array<VideoMediaMetadata>>(args: { offset?: Int | null, limit?: Int | null, where?: VideoMediaMetadataWhereInput | null, orderBy?: Array<VideoMediaMetadataOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    videoMediaMetadataByUniqueInput: <T = VideoMediaMetadata | null>(args: { where: VideoMediaMetadataWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    videoMediaMetadataConnection: <T = VideoMediaMetadataConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: VideoMediaMetadataWhereInput | null, orderBy?: Array<VideoMediaMetadataOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    videos: <T = Array<Video>>(args: { offset?: Int | null, limit?: Int | null, where?: VideoWhereInput | null, orderBy?: Array<VideoOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    videoByUniqueInput: <T = Video | null>(args: { where: VideoWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    videosConnection: <T = VideoConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: VideoWhereInput | null, orderBy?: Array<VideoOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    workers: <T = Array<Worker>>(args: { offset?: Int | null, limit?: Int | null, where?: WorkerWhereInput | null, orderBy?: Array<WorkerOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    workerByUniqueInput: <T = Worker | null>(args: { where: WorkerWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    workersConnection: <T = WorkerConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: WorkerWhereInput | null, orderBy?: Array<WorkerOrderByInput> | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> 
-  }
-
-export interface Mutation {}
-
-export interface Subscription {
-    stateSubscription: <T = ProcessorState>(args?: {}, info?: GraphQLResolveInfo | string, options?: Options) => Promise<AsyncIterator<T>> 
-  }
-
-export interface Binding {
-  query: Query
-  mutation: Mutation
-  subscription: Subscription
-  request: <T = any>(query: string, variables?: {[key: string]: any}) => Promise<T>
-  delegate(operation: 'query' | 'mutation', fieldName: string, args: {
-      [key: string]: any;
-  }, infoOrQuery?: GraphQLResolveInfo | string, options?: Options): Promise<any>;
-  delegateSubscription(fieldName: string, args?: {
-      [key: string]: any;
-  }, infoOrQuery?: GraphQLResolveInfo | string, options?: Options): Promise<AsyncIterator<any>>;
-  getAbstractResolvers(filterSchema?: GraphQLSchema | string): IResolvers;
-}
-
-export interface BindingConstructor<T> {
-  new(...args: any[]): T
-}
-
-export const Binding = makeBindingClass<BindingConstructor<Binding>>({ schema: schema as any })
-
-/**
- * Types
-*/
-
-export type AssetAvailability =   'ACCEPTED' |
-  'PENDING' |
-  'INVALID'
-
-export type CuratorGroupOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'isActive_ASC' |
-  'isActive_DESC'
-
-export type DataObjectOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'createdInBlock_ASC' |
-  'createdInBlock_DESC' |
-  'typeId_ASC' |
-  'typeId_DESC' |
-  'size_ASC' |
-  'size_DESC' |
-  'liaison_ASC' |
-  'liaison_DESC' |
-  'liaisonId_ASC' |
-  'liaisonId_DESC' |
-  'liaisonJudgement_ASC' |
-  'liaisonJudgement_DESC' |
-  'ipfsContentId_ASC' |
-  'ipfsContentId_DESC' |
-  'joystreamContentId_ASC' |
-  'joystreamContentId_DESC'
-
-export type ChannelCategoryOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'name_ASC' |
-  'name_DESC' |
-  'createdInBlock_ASC' |
-  'createdInBlock_DESC'
-
-export type ChannelOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'ownerMember_ASC' |
-  'ownerMember_DESC' |
-  'ownerMemberId_ASC' |
-  'ownerMemberId_DESC' |
-  'ownerCuratorGroup_ASC' |
-  'ownerCuratorGroup_DESC' |
-  'ownerCuratorGroupId_ASC' |
-  'ownerCuratorGroupId_DESC' |
-  'category_ASC' |
-  'category_DESC' |
-  'categoryId_ASC' |
-  'categoryId_DESC' |
-  'rewardAccount_ASC' |
-  'rewardAccount_DESC' |
-  'title_ASC' |
-  'title_DESC' |
-  'description_ASC' |
-  'description_DESC' |
-  'coverPhotoDataObject_ASC' |
-  'coverPhotoDataObject_DESC' |
-  'coverPhotoDataObjectId_ASC' |
-  'coverPhotoDataObjectId_DESC' |
-  'coverPhotoAvailability_ASC' |
-  'coverPhotoAvailability_DESC' |
-  'avatarPhotoDataObject_ASC' |
-  'avatarPhotoDataObject_DESC' |
-  'avatarPhotoDataObjectId_ASC' |
-  'avatarPhotoDataObjectId_DESC' |
-  'avatarPhotoAvailability_ASC' |
-  'avatarPhotoAvailability_DESC' |
-  'isPublic_ASC' |
-  'isPublic_DESC' |
-  'isCensored_ASC' |
-  'isCensored_DESC' |
-  'language_ASC' |
-  'language_DESC' |
-  'languageId_ASC' |
-  'languageId_DESC' |
-  'createdInBlock_ASC' |
-  'createdInBlock_DESC'
-
-export type LanguageOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'iso_ASC' |
-  'iso_DESC' |
-  'createdInBlock_ASC' |
-  'createdInBlock_DESC'
-
-export type LiaisonJudgement =   'PENDING' |
-  'ACCEPTED'
-
-export type LicenseOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'code_ASC' |
-  'code_DESC' |
-  'attribution_ASC' |
-  'attribution_DESC' |
-  'customText_ASC' |
-  'customText_DESC'
-
-export type MembershipEntryMethod =   'PAID' |
-  'SCREENING' |
-  'GENESIS'
-
-export type MembershipOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'handle_ASC' |
-  'handle_DESC' |
-  'avatarUri_ASC' |
-  'avatarUri_DESC' |
-  'about_ASC' |
-  'about_DESC' |
-  'controllerAccount_ASC' |
-  'controllerAccount_DESC' |
-  'rootAccount_ASC' |
-  'rootAccount_DESC' |
-  'createdInBlock_ASC' |
-  'createdInBlock_DESC' |
-  'entry_ASC' |
-  'entry_DESC' |
-  'subscription_ASC' |
-  'subscription_DESC'
-
-export type NextEntityIdOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'nextId_ASC' |
-  'nextId_DESC'
-
-export type VideoCategoryOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'name_ASC' |
-  'name_DESC' |
-  'createdInBlock_ASC' |
-  'createdInBlock_DESC'
-
-export type VideoMediaEncodingOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'codecName_ASC' |
-  'codecName_DESC' |
-  'container_ASC' |
-  'container_DESC' |
-  'mimeMediaType_ASC' |
-  'mimeMediaType_DESC'
-
-export type VideoMediaMetadataOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'encoding_ASC' |
-  'encoding_DESC' |
-  'encodingId_ASC' |
-  'encodingId_DESC' |
-  'pixelWidth_ASC' |
-  'pixelWidth_DESC' |
-  'pixelHeight_ASC' |
-  'pixelHeight_DESC' |
-  'size_ASC' |
-  'size_DESC' |
-  'createdInBlock_ASC' |
-  'createdInBlock_DESC'
-
-export type VideoOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'channel_ASC' |
-  'channel_DESC' |
-  'channelId_ASC' |
-  'channelId_DESC' |
-  'category_ASC' |
-  'category_DESC' |
-  'categoryId_ASC' |
-  'categoryId_DESC' |
-  'title_ASC' |
-  'title_DESC' |
-  'description_ASC' |
-  'description_DESC' |
-  'duration_ASC' |
-  'duration_DESC' |
-  'thumbnailPhotoDataObject_ASC' |
-  'thumbnailPhotoDataObject_DESC' |
-  'thumbnailPhotoDataObjectId_ASC' |
-  'thumbnailPhotoDataObjectId_DESC' |
-  'thumbnailPhotoAvailability_ASC' |
-  'thumbnailPhotoAvailability_DESC' |
-  'language_ASC' |
-  'language_DESC' |
-  'languageId_ASC' |
-  'languageId_DESC' |
-  'hasMarketing_ASC' |
-  'hasMarketing_DESC' |
-  'publishedBeforeJoystream_ASC' |
-  'publishedBeforeJoystream_DESC' |
-  'isPublic_ASC' |
-  'isPublic_DESC' |
-  'isCensored_ASC' |
-  'isCensored_DESC' |
-  'isExplicit_ASC' |
-  'isExplicit_DESC' |
-  'license_ASC' |
-  'license_DESC' |
-  'licenseId_ASC' |
-  'licenseId_DESC' |
-  'mediaDataObject_ASC' |
-  'mediaDataObject_DESC' |
-  'mediaDataObjectId_ASC' |
-  'mediaDataObjectId_DESC' |
-  'mediaAvailability_ASC' |
-  'mediaAvailability_DESC' |
-  'mediaMetadata_ASC' |
-  'mediaMetadata_DESC' |
-  'mediaMetadataId_ASC' |
-  'mediaMetadataId_DESC' |
-  'createdInBlock_ASC' |
-  'createdInBlock_DESC' |
-  'isFeatured_ASC' |
-  'isFeatured_DESC'
-
-export type WorkerOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'isActive_ASC' |
-  'isActive_DESC' |
-  'workerId_ASC' |
-  'workerId_DESC' |
-  'type_ASC' |
-  'type_DESC' |
-  'metadata_ASC' |
-  'metadata_DESC'
-
-export type WorkerType =   'GATEWAY' |
-  'STORAGE'
-
-export interface BaseWhereInput {
-  id_eq?: String | null
-  id_in?: String[] | String | null
-  createdAt_eq?: String | null
-  createdAt_lt?: String | null
-  createdAt_lte?: String | null
-  createdAt_gt?: String | null
-  createdAt_gte?: String | null
-  createdById_eq?: String | null
-  updatedAt_eq?: String | null
-  updatedAt_lt?: String | null
-  updatedAt_lte?: String | null
-  updatedAt_gt?: String | null
-  updatedAt_gte?: String | null
-  updatedById_eq?: String | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: String | null
-  deletedAt_lt?: String | null
-  deletedAt_lte?: String | null
-  deletedAt_gt?: String | null
-  deletedAt_gte?: String | null
-  deletedById_eq?: String | null
-}
-
-export interface CuratorGroupCreateInput {
-  curatorIds: Array<Int>
-  isActive: Boolean
-}
-
-export interface CuratorGroupUpdateInput {
-  curatorIds?: Int[] | Int | null
-  isActive?: Boolean | null
-}
-
-export interface CuratorGroupWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  curatorIds_containsAll?: Int[] | Int | null
-  curatorIds_containsNone?: Int[] | Int | null
-  curatorIds_containsAny?: Int[] | Int | null
-  isActive_eq?: Boolean | null
-  isActive_in?: Boolean[] | Boolean | null
-  channels_none?: ChannelWhereInput | null
-  channels_some?: ChannelWhereInput | null
-  channels_every?: ChannelWhereInput | null
-  AND?: CuratorGroupWhereInput[] | CuratorGroupWhereInput | null
-  OR?: CuratorGroupWhereInput[] | CuratorGroupWhereInput | null
-}
-
-export interface CuratorGroupWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface DataObjectCreateInput {
-  owner: JSONObject
-  createdInBlock: Float
-  typeId: Float
-  size: Float
-  liaison?: ID_Input | null
-  liaisonId?: ID_Input | null
-  liaisonJudgement: LiaisonJudgement
-  ipfsContentId: String
-  joystreamContentId: String
-}
-
-export interface DataObjectOwnerCouncilCreateInput {
-  dummy?: Float | null
-}
-
-export interface DataObjectOwnerCouncilUpdateInput {
-  dummy?: Float | null
-}
-
-export interface DataObjectOwnerCouncilWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  dummy_eq?: Int | null
-  dummy_gt?: Int | null
-  dummy_gte?: Int | null
-  dummy_lt?: Int | null
-  dummy_lte?: Int | null
-  dummy_in?: Int[] | Int | null
-  AND?: DataObjectOwnerCouncilWhereInput[] | DataObjectOwnerCouncilWhereInput | null
-  OR?: DataObjectOwnerCouncilWhereInput[] | DataObjectOwnerCouncilWhereInput | null
-}
-
-export interface DataObjectOwnerCouncilWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface DataObjectOwnerDaoCreateInput {
-  dao: Float
-}
-
-export interface DataObjectOwnerDaoUpdateInput {
-  dao?: Float | null
-}
-
-export interface DataObjectOwnerDaoWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  dao_eq?: Int | null
-  dao_gt?: Int | null
-  dao_gte?: Int | null
-  dao_lt?: Int | null
-  dao_lte?: Int | null
-  dao_in?: Int[] | Int | null
-  AND?: DataObjectOwnerDaoWhereInput[] | DataObjectOwnerDaoWhereInput | null
-  OR?: DataObjectOwnerDaoWhereInput[] | DataObjectOwnerDaoWhereInput | null
-}
-
-export interface DataObjectOwnerDaoWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface DataObjectOwnerChannelCreateInput {
-  channel: Float
-  dummy?: Float | null
-}
-
-export interface DataObjectOwnerChannelUpdateInput {
-  channel?: Float | null
-  dummy?: Float | null
-}
-
-export interface DataObjectOwnerChannelWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  channel_eq?: Int | null
-  channel_gt?: Int | null
-  channel_gte?: Int | null
-  channel_lt?: Int | null
-  channel_lte?: Int | null
-  channel_in?: Int[] | Int | null
-  dummy_eq?: Int | null
-  dummy_gt?: Int | null
-  dummy_gte?: Int | null
-  dummy_lt?: Int | null
-  dummy_lte?: Int | null
-  dummy_in?: Int[] | Int | null
-  AND?: DataObjectOwnerChannelWhereInput[] | DataObjectOwnerChannelWhereInput | null
-  OR?: DataObjectOwnerChannelWhereInput[] | DataObjectOwnerChannelWhereInput | null
-}
-
-export interface DataObjectOwnerChannelWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface DataObjectOwnerMemberCreateInput {
-  member: Float
-  dummy?: Float | null
-}
-
-export interface DataObjectOwnerMemberUpdateInput {
-  member?: Float | null
-  dummy?: Float | null
-}
-
-export interface DataObjectOwnerMemberWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  member_eq?: Int | null
-  member_gt?: Int | null
-  member_gte?: Int | null
-  member_lt?: Int | null
-  member_lte?: Int | null
-  member_in?: Int[] | Int | null
-  dummy_eq?: Int | null
-  dummy_gt?: Int | null
-  dummy_gte?: Int | null
-  dummy_lt?: Int | null
-  dummy_lte?: Int | null
-  dummy_in?: Int[] | Int | null
-  AND?: DataObjectOwnerMemberWhereInput[] | DataObjectOwnerMemberWhereInput | null
-  OR?: DataObjectOwnerMemberWhereInput[] | DataObjectOwnerMemberWhereInput | null
-}
-
-export interface DataObjectOwnerMemberWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface DataObjectOwnerWorkingGroupCreateInput {
-  workingGroup: Float
-}
-
-export interface DataObjectOwnerWorkingGroupUpdateInput {
-  workingGroup?: Float | null
-}
-
-export interface DataObjectOwnerWorkingGroupWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  workingGroup_eq?: Int | null
-  workingGroup_gt?: Int | null
-  workingGroup_gte?: Int | null
-  workingGroup_lt?: Int | null
-  workingGroup_lte?: Int | null
-  workingGroup_in?: Int[] | Int | null
-  AND?: DataObjectOwnerWorkingGroupWhereInput[] | DataObjectOwnerWorkingGroupWhereInput | null
-  OR?: DataObjectOwnerWorkingGroupWhereInput[] | DataObjectOwnerWorkingGroupWhereInput | null
-}
-
-export interface DataObjectOwnerWorkingGroupWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface DataObjectUpdateInput {
-  owner?: JSONObject | null
-  createdInBlock?: Float | null
-  typeId?: Float | null
-  size?: Float | null
-  liaison?: ID_Input | null
-  liaisonId?: ID_Input | null
-  liaisonJudgement?: LiaisonJudgement | null
-  ipfsContentId?: String | null
-  joystreamContentId?: String | null
-}
-
-export interface DataObjectWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  owner_json?: JSONObject | null
-  createdInBlock_eq?: Int | null
-  createdInBlock_gt?: Int | null
-  createdInBlock_gte?: Int | null
-  createdInBlock_lt?: Int | null
-  createdInBlock_lte?: Int | null
-  createdInBlock_in?: Int[] | Int | null
-  typeId_eq?: Int | null
-  typeId_gt?: Int | null
-  typeId_gte?: Int | null
-  typeId_lt?: Int | null
-  typeId_lte?: Int | null
-  typeId_in?: Int[] | Int | null
-  size_eq?: Float | null
-  size_gt?: Float | null
-  size_gte?: Float | null
-  size_lt?: Float | null
-  size_lte?: Float | null
-  size_in?: Float[] | Float | null
-  liaisonId_eq?: ID_Input | null
-  liaisonId_in?: ID_Output[] | ID_Output | null
-  liaisonJudgement_eq?: LiaisonJudgement | null
-  liaisonJudgement_in?: LiaisonJudgement[] | LiaisonJudgement | null
-  ipfsContentId_eq?: String | null
-  ipfsContentId_contains?: String | null
-  ipfsContentId_startsWith?: String | null
-  ipfsContentId_endsWith?: String | null
-  ipfsContentId_in?: String[] | String | null
-  joystreamContentId_eq?: String | null
-  joystreamContentId_contains?: String | null
-  joystreamContentId_startsWith?: String | null
-  joystreamContentId_endsWith?: String | null
-  joystreamContentId_in?: String[] | String | null
-  liaison?: WorkerWhereInput | null
-  channelcoverPhotoDataObject_none?: ChannelWhereInput | null
-  channelcoverPhotoDataObject_some?: ChannelWhereInput | null
-  channelcoverPhotoDataObject_every?: ChannelWhereInput | null
-  channelavatarPhotoDataObject_none?: ChannelWhereInput | null
-  channelavatarPhotoDataObject_some?: ChannelWhereInput | null
-  channelavatarPhotoDataObject_every?: ChannelWhereInput | null
-  videothumbnailPhotoDataObject_none?: VideoMediaMetadataWhereInput | null
-  videothumbnailPhotoDataObject_some?: VideoMediaMetadataWhereInput | null
-  videothumbnailPhotoDataObject_every?: VideoMediaMetadataWhereInput | null
-  videomediaDataObject_none?: VideoMediaMetadataWhereInput | null
-  videomediaDataObject_some?: VideoMediaMetadataWhereInput | null
-  videomediaDataObject_every?: VideoMediaMetadataWhereInput | null
-  AND?: DataObjectWhereInput[] | DataObjectWhereInput | null
-  OR?: DataObjectWhereInput[] | DataObjectWhereInput | null
-}
-
-export interface DataObjectWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface ChannelCategoryCreateInput {
-  name?: String | null
-  createdInBlock: Float
-}
-
-export interface ChannelCategoryUpdateInput {
-  name?: String | null
-  createdInBlock?: Float | null
-}
-
-export interface ChannelCategoryWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  name_eq?: String | null
-  name_contains?: String | null
-  name_startsWith?: String | null
-  name_endsWith?: String | null
-  name_in?: String[] | String | null
-  createdInBlock_eq?: Int | null
-  createdInBlock_gt?: Int | null
-  createdInBlock_gte?: Int | null
-  createdInBlock_lt?: Int | null
-  createdInBlock_lte?: Int | null
-  createdInBlock_in?: Int[] | Int | null
-  channels_none?: ChannelWhereInput | null
-  channels_some?: ChannelWhereInput | null
-  channels_every?: ChannelWhereInput | null
-  AND?: ChannelCategoryWhereInput[] | ChannelCategoryWhereInput | null
-  OR?: ChannelCategoryWhereInput[] | ChannelCategoryWhereInput | null
-}
-
-export interface ChannelCategoryWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface ChannelCreateInput {
-  ownerMember?: ID_Input | null
-  ownerMemberId?: ID_Input | null
-  ownerCuratorGroup?: ID_Input | null
-  ownerCuratorGroupId?: ID_Input | null
-  category?: ID_Input | null
-  categoryId?: ID_Input | null
-  rewardAccount?: String | null
-  title?: String | null
-  description?: String | null
-  coverPhotoDataObject?: ID_Input | null
-  coverPhotoDataObjectId?: ID_Input | null
-  coverPhotoUrls: Array<String>
-  coverPhotoAvailability: AssetAvailability
-  avatarPhotoDataObject?: ID_Input | null
-  avatarPhotoDataObjectId?: ID_Input | null
-  avatarPhotoUrls: Array<String>
-  avatarPhotoAvailability: AssetAvailability
-  isPublic?: Boolean | null
-  isCensored: Boolean
-  language?: ID_Input | null
-  languageId?: ID_Input | null
-  createdInBlock: Float
-}
-
-export interface ChannelUpdateInput {
-  ownerMember?: ID_Input | null
-  ownerMemberId?: ID_Input | null
-  ownerCuratorGroup?: ID_Input | null
-  ownerCuratorGroupId?: ID_Input | null
-  category?: ID_Input | null
-  categoryId?: ID_Input | null
-  rewardAccount?: String | null
-  title?: String | null
-  description?: String | null
-  coverPhotoDataObject?: ID_Input | null
-  coverPhotoDataObjectId?: ID_Input | null
-  coverPhotoUrls?: String[] | String | null
-  coverPhotoAvailability?: AssetAvailability | null
-  avatarPhotoDataObject?: ID_Input | null
-  avatarPhotoDataObjectId?: ID_Input | null
-  avatarPhotoUrls?: String[] | String | null
-  avatarPhotoAvailability?: AssetAvailability | null
-  isPublic?: Boolean | null
-  isCensored?: Boolean | null
-  language?: ID_Input | null
-  languageId?: ID_Input | null
-  createdInBlock?: Float | null
-}
-
-export interface ChannelWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  ownerMemberId_eq?: ID_Input | null
-  ownerMemberId_in?: ID_Output[] | ID_Output | null
-  ownerCuratorGroupId_eq?: ID_Input | null
-  ownerCuratorGroupId_in?: ID_Output[] | ID_Output | null
-  categoryId_eq?: ID_Input | null
-  categoryId_in?: ID_Output[] | ID_Output | null
-  rewardAccount_eq?: String | null
-  rewardAccount_contains?: String | null
-  rewardAccount_startsWith?: String | null
-  rewardAccount_endsWith?: String | null
-  rewardAccount_in?: String[] | String | null
-  title_eq?: String | null
-  title_contains?: String | null
-  title_startsWith?: String | null
-  title_endsWith?: String | null
-  title_in?: String[] | String | null
-  description_eq?: String | null
-  description_contains?: String | null
-  description_startsWith?: String | null
-  description_endsWith?: String | null
-  description_in?: String[] | String | null
-  coverPhotoDataObjectId_eq?: ID_Input | null
-  coverPhotoDataObjectId_in?: ID_Output[] | ID_Output | null
-  coverPhotoUrls_containsAll?: String[] | String | null
-  coverPhotoUrls_containsNone?: String[] | String | null
-  coverPhotoUrls_containsAny?: String[] | String | null
-  coverPhotoAvailability_eq?: AssetAvailability | null
-  coverPhotoAvailability_in?: AssetAvailability[] | AssetAvailability | null
-  avatarPhotoDataObjectId_eq?: ID_Input | null
-  avatarPhotoDataObjectId_in?: ID_Output[] | ID_Output | null
-  avatarPhotoUrls_containsAll?: String[] | String | null
-  avatarPhotoUrls_containsNone?: String[] | String | null
-  avatarPhotoUrls_containsAny?: String[] | String | null
-  avatarPhotoAvailability_eq?: AssetAvailability | null
-  avatarPhotoAvailability_in?: AssetAvailability[] | AssetAvailability | null
-  isPublic_eq?: Boolean | null
-  isPublic_in?: Boolean[] | Boolean | null
-  isCensored_eq?: Boolean | null
-  isCensored_in?: Boolean[] | Boolean | null
-  languageId_eq?: ID_Input | null
-  languageId_in?: ID_Output[] | ID_Output | null
-  createdInBlock_eq?: Int | null
-  createdInBlock_gt?: Int | null
-  createdInBlock_gte?: Int | null
-  createdInBlock_lt?: Int | null
-  createdInBlock_lte?: Int | null
-  createdInBlock_in?: Int[] | Int | null
-  ownerMember?: MembershipWhereInput | null
-  ownerCuratorGroup?: CuratorGroupWhereInput | null
-  category?: ChannelCategoryWhereInput | null
-  coverPhotoDataObject?: DataObjectWhereInput | null
-  avatarPhotoDataObject?: DataObjectWhereInput | null
-  language?: LanguageWhereInput | null
-  videos_none?: VideoWhereInput | null
-  videos_some?: VideoWhereInput | null
-  videos_every?: VideoWhereInput | null
-  AND?: ChannelWhereInput[] | ChannelWhereInput | null
-  OR?: ChannelWhereInput[] | ChannelWhereInput | null
-}
-
-export interface ChannelWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface LanguageCreateInput {
-  iso: String
-  createdInBlock: Float
-}
-
-export interface LanguageUpdateInput {
-  iso?: String | null
-  createdInBlock?: Float | null
-}
-
-export interface LanguageWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  iso_eq?: String | null
-  iso_contains?: String | null
-  iso_startsWith?: String | null
-  iso_endsWith?: String | null
-  iso_in?: String[] | String | null
-  createdInBlock_eq?: Int | null
-  createdInBlock_gt?: Int | null
-  createdInBlock_gte?: Int | null
-  createdInBlock_lt?: Int | null
-  createdInBlock_lte?: Int | null
-  createdInBlock_in?: Int[] | Int | null
-  channellanguage_none?: ChannelWhereInput | null
-  channellanguage_some?: ChannelWhereInput | null
-  channellanguage_every?: ChannelWhereInput | null
-  videolanguage_none?: VideoWhereInput | null
-  videolanguage_some?: VideoWhereInput | null
-  videolanguage_every?: VideoWhereInput | null
-  AND?: LanguageWhereInput[] | LanguageWhereInput | null
-  OR?: LanguageWhereInput[] | LanguageWhereInput | null
-}
-
-export interface LanguageWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface LicenseCreateInput {
-  code?: Float | null
-  attribution?: String | null
-  customText?: String | null
-}
-
-export interface LicenseUpdateInput {
-  code?: Float | null
-  attribution?: String | null
-  customText?: String | null
-}
-
-export interface LicenseWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  code_eq?: Int | null
-  code_gt?: Int | null
-  code_gte?: Int | null
-  code_lt?: Int | null
-  code_lte?: Int | null
-  code_in?: Int[] | Int | null
-  attribution_eq?: String | null
-  attribution_contains?: String | null
-  attribution_startsWith?: String | null
-  attribution_endsWith?: String | null
-  attribution_in?: String[] | String | null
-  customText_eq?: String | null
-  customText_contains?: String | null
-  customText_startsWith?: String | null
-  customText_endsWith?: String | null
-  customText_in?: String[] | String | null
-  videolanguage_none?: VideoWhereInput | null
-  videolanguage_some?: VideoWhereInput | null
-  videolanguage_every?: VideoWhereInput | null
-  AND?: LicenseWhereInput[] | LicenseWhereInput | null
-  OR?: LicenseWhereInput[] | LicenseWhereInput | null
-}
-
-export interface LicenseWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface MembershipCreateInput {
-  handle: String
-  avatarUri?: String | null
-  about?: String | null
-  controllerAccount: String
-  rootAccount: String
-  createdInBlock: Float
-  entry: MembershipEntryMethod
-  subscription?: Float | null
-}
-
-export interface MembershipUpdateInput {
-  handle?: String | null
-  avatarUri?: String | null
-  about?: String | null
-  controllerAccount?: String | null
-  rootAccount?: String | null
-  createdInBlock?: Float | null
-  entry?: MembershipEntryMethod | null
-  subscription?: Float | null
-}
-
-export interface MembershipWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  handle_eq?: String | null
-  handle_contains?: String | null
-  handle_startsWith?: String | null
-  handle_endsWith?: String | null
-  handle_in?: String[] | String | null
-  avatarUri_eq?: String | null
-  avatarUri_contains?: String | null
-  avatarUri_startsWith?: String | null
-  avatarUri_endsWith?: String | null
-  avatarUri_in?: String[] | String | null
-  about_eq?: String | null
-  about_contains?: String | null
-  about_startsWith?: String | null
-  about_endsWith?: String | null
-  about_in?: String[] | String | null
-  controllerAccount_eq?: String | null
-  controllerAccount_contains?: String | null
-  controllerAccount_startsWith?: String | null
-  controllerAccount_endsWith?: String | null
-  controllerAccount_in?: String[] | String | null
-  rootAccount_eq?: String | null
-  rootAccount_contains?: String | null
-  rootAccount_startsWith?: String | null
-  rootAccount_endsWith?: String | null
-  rootAccount_in?: String[] | String | null
-  createdInBlock_eq?: Int | null
-  createdInBlock_gt?: Int | null
-  createdInBlock_gte?: Int | null
-  createdInBlock_lt?: Int | null
-  createdInBlock_lte?: Int | null
-  createdInBlock_in?: Int[] | Int | null
-  entry_eq?: MembershipEntryMethod | null
-  entry_in?: MembershipEntryMethod[] | MembershipEntryMethod | null
-  subscription_eq?: Int | null
-  subscription_gt?: Int | null
-  subscription_gte?: Int | null
-  subscription_lt?: Int | null
-  subscription_lte?: Int | null
-  subscription_in?: Int[] | Int | null
-  channels_none?: ChannelWhereInput | null
-  channels_some?: ChannelWhereInput | null
-  channels_every?: ChannelWhereInput | null
-  AND?: MembershipWhereInput[] | MembershipWhereInput | null
-  OR?: MembershipWhereInput[] | MembershipWhereInput | null
-}
-
-export interface MembershipWhereUniqueInput {
-  id?: ID_Input | null
-  handle?: String | null
-}
-
-export interface NextEntityIdCreateInput {
-  nextId: Float
-}
-
-export interface NextEntityIdUpdateInput {
-  nextId?: Float | null
-}
-
-export interface NextEntityIdWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  nextId_eq?: Float | null
-  nextId_gt?: Float | null
-  nextId_gte?: Float | null
-  nextId_lt?: Float | null
-  nextId_lte?: Float | null
-  nextId_in?: Float[] | Float | null
-  AND?: NextEntityIdWhereInput[] | NextEntityIdWhereInput | null
-  OR?: NextEntityIdWhereInput[] | NextEntityIdWhereInput | null
-}
-
-export interface NextEntityIdWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface VideoCategoryCreateInput {
-  name?: String | null
-  createdInBlock: Float
-}
-
-export interface VideoCategoryUpdateInput {
-  name?: String | null
-  createdInBlock?: Float | null
-}
-
-export interface VideoCategoryWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  name_eq?: String | null
-  name_contains?: String | null
-  name_startsWith?: String | null
-  name_endsWith?: String | null
-  name_in?: String[] | String | null
-  createdInBlock_eq?: Int | null
-  createdInBlock_gt?: Int | null
-  createdInBlock_gte?: Int | null
-  createdInBlock_lt?: Int | null
-  createdInBlock_lte?: Int | null
-  createdInBlock_in?: Int[] | Int | null
-  videos_none?: VideoWhereInput | null
-  videos_some?: VideoWhereInput | null
-  videos_every?: VideoWhereInput | null
-  AND?: VideoCategoryWhereInput[] | VideoCategoryWhereInput | null
-  OR?: VideoCategoryWhereInput[] | VideoCategoryWhereInput | null
-}
-
-export interface VideoCategoryWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface VideoCreateInput {
-  channel?: ID_Input | null
-  channelId?: ID_Input | null
-  category?: ID_Input | null
-  categoryId?: ID_Input | null
-  title?: String | null
-  description?: String | null
-  duration?: Float | null
-  thumbnailPhotoDataObject?: ID_Input | null
-  thumbnailPhotoDataObjectId?: ID_Input | null
-  thumbnailPhotoUrls: Array<String>
-  thumbnailPhotoAvailability: AssetAvailability
-  language?: ID_Input | null
-  languageId?: ID_Input | null
-  hasMarketing?: Boolean | null
-  publishedBeforeJoystream?: DateTime | null
-  isPublic?: Boolean | null
-  isCensored: Boolean
-  isExplicit?: Boolean | null
-  license?: ID_Input | null
-  licenseId?: ID_Input | null
-  mediaDataObject?: ID_Input | null
-  mediaDataObjectId?: ID_Input | null
-  mediaUrls: Array<String>
-  mediaAvailability: AssetAvailability
-  mediaMetadata?: ID_Input | null
-  mediaMetadataId?: ID_Input | null
-  createdInBlock: Float
-  isFeatured: Boolean
-}
-
-export interface VideoMediaEncodingCreateInput {
-  codecName?: String | null
-  container?: String | null
-  mimeMediaType?: String | null
-}
-
-export interface VideoMediaEncodingUpdateInput {
-  codecName?: String | null
-  container?: String | null
-  mimeMediaType?: String | null
-}
-
-export interface VideoMediaEncodingWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  codecName_eq?: String | null
-  codecName_contains?: String | null
-  codecName_startsWith?: String | null
-  codecName_endsWith?: String | null
-  codecName_in?: String[] | String | null
-  container_eq?: String | null
-  container_contains?: String | null
-  container_startsWith?: String | null
-  container_endsWith?: String | null
-  container_in?: String[] | String | null
-  mimeMediaType_eq?: String | null
-  mimeMediaType_contains?: String | null
-  mimeMediaType_startsWith?: String | null
-  mimeMediaType_endsWith?: String | null
-  mimeMediaType_in?: String[] | String | null
-  videomediametadataencoding_none?: VideoMediaMetadataWhereInput | null
-  videomediametadataencoding_some?: VideoMediaMetadataWhereInput | null
-  videomediametadataencoding_every?: VideoMediaMetadataWhereInput | null
-  AND?: VideoMediaEncodingWhereInput[] | VideoMediaEncodingWhereInput | null
-  OR?: VideoMediaEncodingWhereInput[] | VideoMediaEncodingWhereInput | null
-}
-
-export interface VideoMediaEncodingWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface VideoMediaMetadataCreateInput {
-  encoding?: ID_Input | null
-  encodingId?: ID_Input | null
-  pixelWidth?: Float | null
-  pixelHeight?: Float | null
-  size?: Float | null
-  createdInBlock: Float
-}
-
-export interface VideoMediaMetadataUpdateInput {
-  encoding?: ID_Input | null
-  encodingId?: ID_Input | null
-  pixelWidth?: Float | null
-  pixelHeight?: Float | null
-  size?: Float | null
-  createdInBlock?: Float | null
-}
-
-export interface VideoMediaMetadataWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  encodingId_eq?: ID_Input | null
-  encodingId_in?: ID_Output[] | ID_Output | null
-  pixelWidth_eq?: Int | null
-  pixelWidth_gt?: Int | null
-  pixelWidth_gte?: Int | null
-  pixelWidth_lt?: Int | null
-  pixelWidth_lte?: Int | null
-  pixelWidth_in?: Int[] | Int | null
-  pixelHeight_eq?: Int | null
-  pixelHeight_gt?: Int | null
-  pixelHeight_gte?: Int | null
-  pixelHeight_lt?: Int | null
-  pixelHeight_lte?: Int | null
-  pixelHeight_in?: Int[] | Int | null
-  size_eq?: Float | null
-  size_gt?: Float | null
-  size_gte?: Float | null
-  size_lt?: Float | null
-  size_lte?: Float | null
-  size_in?: Float[] | Float | null
-  createdInBlock_eq?: Int | null
-  createdInBlock_gt?: Int | null
-  createdInBlock_gte?: Int | null
-  createdInBlock_lt?: Int | null
-  createdInBlock_lte?: Int | null
-  createdInBlock_in?: Int[] | Int | null
-  encoding?: VideoMediaEncodingWhereInput | null
-  video?: VideoWhereInput | null
-  AND?: VideoMediaMetadataWhereInput[] | VideoMediaMetadataWhereInput | null
-  OR?: VideoMediaMetadataWhereInput[] | VideoMediaMetadataWhereInput | null
-}
-
-export interface VideoMediaMetadataWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface VideoUpdateInput {
-  channel?: ID_Input | null
-  channelId?: ID_Input | null
-  category?: ID_Input | null
-  categoryId?: ID_Input | null
-  title?: String | null
-  description?: String | null
-  duration?: Float | null
-  thumbnailPhotoDataObject?: ID_Input | null
-  thumbnailPhotoDataObjectId?: ID_Input | null
-  thumbnailPhotoUrls?: String[] | String | null
-  thumbnailPhotoAvailability?: AssetAvailability | null
-  language?: ID_Input | null
-  languageId?: ID_Input | null
-  hasMarketing?: Boolean | null
-  publishedBeforeJoystream?: DateTime | null
-  isPublic?: Boolean | null
-  isCensored?: Boolean | null
-  isExplicit?: Boolean | null
-  license?: ID_Input | null
-  licenseId?: ID_Input | null
-  mediaDataObject?: ID_Input | null
-  mediaDataObjectId?: ID_Input | null
-  mediaUrls?: String[] | String | null
-  mediaAvailability?: AssetAvailability | null
-  mediaMetadata?: ID_Input | null
-  mediaMetadataId?: ID_Input | null
-  createdInBlock?: Float | null
-  isFeatured?: Boolean | null
-}
-
-export interface VideoWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  channelId_eq?: ID_Input | null
-  channelId_in?: ID_Output[] | ID_Output | null
-  categoryId_eq?: ID_Input | null
-  categoryId_in?: ID_Output[] | ID_Output | null
-  title_eq?: String | null
-  title_contains?: String | null
-  title_startsWith?: String | null
-  title_endsWith?: String | null
-  title_in?: String[] | String | null
-  description_eq?: String | null
-  description_contains?: String | null
-  description_startsWith?: String | null
-  description_endsWith?: String | null
-  description_in?: String[] | String | null
-  duration_eq?: Int | null
-  duration_gt?: Int | null
-  duration_gte?: Int | null
-  duration_lt?: Int | null
-  duration_lte?: Int | null
-  duration_in?: Int[] | Int | null
-  thumbnailPhotoDataObjectId_eq?: ID_Input | null
-  thumbnailPhotoDataObjectId_in?: ID_Output[] | ID_Output | null
-  thumbnailPhotoUrls_containsAll?: String[] | String | null
-  thumbnailPhotoUrls_containsNone?: String[] | String | null
-  thumbnailPhotoUrls_containsAny?: String[] | String | null
-  thumbnailPhotoAvailability_eq?: AssetAvailability | null
-  thumbnailPhotoAvailability_in?: AssetAvailability[] | AssetAvailability | null
-  languageId_eq?: ID_Input | null
-  languageId_in?: ID_Output[] | ID_Output | null
-  hasMarketing_eq?: Boolean | null
-  hasMarketing_in?: Boolean[] | Boolean | null
-  publishedBeforeJoystream_eq?: DateTime | null
-  publishedBeforeJoystream_lt?: DateTime | null
-  publishedBeforeJoystream_lte?: DateTime | null
-  publishedBeforeJoystream_gt?: DateTime | null
-  publishedBeforeJoystream_gte?: DateTime | null
-  isPublic_eq?: Boolean | null
-  isPublic_in?: Boolean[] | Boolean | null
-  isCensored_eq?: Boolean | null
-  isCensored_in?: Boolean[] | Boolean | null
-  isExplicit_eq?: Boolean | null
-  isExplicit_in?: Boolean[] | Boolean | null
-  licenseId_eq?: ID_Input | null
-  licenseId_in?: ID_Output[] | ID_Output | null
-  mediaDataObjectId_eq?: ID_Input | null
-  mediaDataObjectId_in?: ID_Output[] | ID_Output | null
-  mediaUrls_containsAll?: String[] | String | null
-  mediaUrls_containsNone?: String[] | String | null
-  mediaUrls_containsAny?: String[] | String | null
-  mediaAvailability_eq?: AssetAvailability | null
-  mediaAvailability_in?: AssetAvailability[] | AssetAvailability | null
-  mediaMetadataId_eq?: ID_Input | null
-  mediaMetadataId_in?: ID_Output[] | ID_Output | null
-  createdInBlock_eq?: Int | null
-  createdInBlock_gt?: Int | null
-  createdInBlock_gte?: Int | null
-  createdInBlock_lt?: Int | null
-  createdInBlock_lte?: Int | null
-  createdInBlock_in?: Int[] | Int | null
-  isFeatured_eq?: Boolean | null
-  isFeatured_in?: Boolean[] | Boolean | null
-  channel?: ChannelWhereInput | null
-  category?: VideoCategoryWhereInput | null
-  thumbnailPhotoDataObject?: DataObjectWhereInput | null
-  language?: LanguageWhereInput | null
-  license?: LicenseWhereInput | null
-  mediaDataObject?: DataObjectWhereInput | null
-  mediaMetadata?: VideoMediaMetadataWhereInput | null
-  AND?: VideoWhereInput[] | VideoWhereInput | null
-  OR?: VideoWhereInput[] | VideoWhereInput | null
-}
-
-export interface VideoWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface WorkerCreateInput {
-  isActive: Boolean
-  workerId: String
-  type: WorkerType
-  metadata?: String | null
-}
-
-export interface WorkerUpdateInput {
-  isActive?: Boolean | null
-  workerId?: String | null
-  type?: WorkerType | null
-  metadata?: String | null
-}
-
-export interface WorkerWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  isActive_eq?: Boolean | null
-  isActive_in?: Boolean[] | Boolean | null
-  workerId_eq?: String | null
-  workerId_contains?: String | null
-  workerId_startsWith?: String | null
-  workerId_endsWith?: String | null
-  workerId_in?: String[] | String | null
-  type_eq?: WorkerType | null
-  type_in?: WorkerType[] | WorkerType | null
-  metadata_eq?: String | null
-  metadata_contains?: String | null
-  metadata_startsWith?: String | null
-  metadata_endsWith?: String | null
-  metadata_in?: String[] | String | null
-  dataObjects_none?: DataObjectWhereInput | null
-  dataObjects_some?: DataObjectWhereInput | null
-  dataObjects_every?: DataObjectWhereInput | null
-  AND?: WorkerWhereInput[] | WorkerWhereInput | null
-  OR?: WorkerWhereInput[] | WorkerWhereInput | null
-}
-
-export interface WorkerWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-}
-
-export interface DeleteResponse {
-  id: ID_Output
-}
-
-export interface BaseModel extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-}
-
-export interface BaseModelUUID extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-}
-
-export interface CuratorGroup extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  curatorIds: Array<Int>
-  isActive: Boolean
-  channels: Array<Channel>
-}
-
-export interface CuratorGroupConnection {
-  totalCount: Int
-  edges: Array<CuratorGroupEdge>
-  pageInfo: PageInfo
-}
-
-export interface CuratorGroupEdge {
-  node: CuratorGroup
-  cursor: String
-}
-
-/*
- * Manages content ids, type and storage provider decision about it
-
- */
-export interface DataObject extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  owner: DataObjectOwner
-  createdInBlock: Int
-  typeId: Int
-  size: Float
-  liaison?: Worker | null
-  liaisonId?: String | null
-  liaisonJudgement: LiaisonJudgement
-  ipfsContentId: String
-  joystreamContentId: String
-  channelcoverPhotoDataObject?: Array<Channel> | null
-  channelavatarPhotoDataObject?: Array<Channel> | null
-  videothumbnailPhotoDataObject?: Array<Video> | null
-  videomediaDataObject?: Array<Video> | null
-}
-
-export interface DataObjectConnection {
-  totalCount: Int
-  edges: Array<DataObjectEdge>
-  pageInfo: PageInfo
-}
-
-export interface DataObjectEdge {
-  node: DataObject
-  cursor: String
-}
-
-export interface DataObjectOwnerCouncil {
-  dummy?: Int | null
-}
-
-export interface DataObjectOwnerDao {
-  dao: Int
-}
-
-export interface DataObjectOwnerChannel {
-  channel: Int
-  dummy?: Int | null
-}
-
-export interface DataObjectOwnerMember {
-  member: Int
-  dummy?: Int | null
-}
-
-export interface DataObjectOwnerWorkingGroup {
-  workingGroup: Int
-}
-
-export interface Channel extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  ownerMember?: Membership | null
-  ownerMemberId?: String | null
-  ownerCuratorGroup?: CuratorGroup | null
-  ownerCuratorGroupId?: String | null
-  category?: ChannelCategory | null
-  categoryId?: String | null
-  rewardAccount?: String | null
-  title?: String | null
-  description?: String | null
-  coverPhotoDataObject?: DataObject | null
-  coverPhotoDataObjectId?: String | null
-  coverPhotoUrls: Array<String>
-  coverPhotoAvailability: AssetAvailability
-  avatarPhotoDataObject?: DataObject | null
-  avatarPhotoDataObjectId?: String | null
-  avatarPhotoUrls: Array<String>
-  avatarPhotoAvailability: AssetAvailability
-  isPublic?: Boolean | null
-  isCensored: Boolean
-  language?: Language | null
-  languageId?: String | null
-  videos: Array<Video>
-  createdInBlock: Int
-}
-
-export interface ChannelCategoriesByNameFTSOutput {
-  item: ChannelCategoriesByNameSearchResult
-  rank: Float
-  isTypeOf: String
-  highlight: String
-}
-
-/*
- * Category of media channel
-
- */
-export interface ChannelCategory extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  name?: String | null
-  channels: Array<Channel>
-  createdInBlock: Int
-}
-
-export interface ChannelCategoryConnection {
-  totalCount: Int
-  edges: Array<ChannelCategoryEdge>
-  pageInfo: PageInfo
-}
-
-export interface ChannelCategoryEdge {
-  node: ChannelCategory
-  cursor: String
-}
-
-export interface ChannelConnection {
-  totalCount: Int
-  edges: Array<ChannelEdge>
-  pageInfo: PageInfo
-}
-
-export interface ChannelEdge {
-  node: Channel
-  cursor: String
-}
-
-export interface Language extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  iso: String
-  createdInBlock: Int
-  channellanguage?: Array<Channel> | null
-  videolanguage?: Array<Video> | null
-}
-
-export interface LanguageConnection {
-  totalCount: Int
-  edges: Array<LanguageEdge>
-  pageInfo: PageInfo
-}
-
-export interface LanguageEdge {
-  node: Language
-  cursor: String
-}
-
-export interface License extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  code?: Int | null
-  attribution?: String | null
-  customText?: String | null
-  videolicense?: Array<Video> | null
-}
-
-export interface LicenseConnection {
-  totalCount: Int
-  edges: Array<LicenseEdge>
-  pageInfo: PageInfo
-}
-
-export interface LicenseEdge {
-  node: License
-  cursor: String
-}
-
-export interface MembersByHandleFTSOutput {
-  item: MembersByHandleSearchResult
-  rank: Float
-  isTypeOf: String
-  highlight: String
-}
-
-/*
- * Stored information about a registered user
-
- */
-export interface Membership extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  handle: String
-  avatarUri?: String | null
-  about?: String | null
-  controllerAccount: String
-  rootAccount: String
-  createdInBlock: Int
-  entry: MembershipEntryMethod
-  subscription?: Int | null
-  channels: Array<Channel>
-}
-
-export interface MembershipConnection {
-  totalCount: Int
-  edges: Array<MembershipEdge>
-  pageInfo: PageInfo
-}
-
-export interface MembershipEdge {
-  node: Membership
-  cursor: String
-}
-
-export interface NextEntityId extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  nextId: Float
-}
-
-export interface NextEntityIdConnection {
-  totalCount: Int
-  edges: Array<NextEntityIdEdge>
-  pageInfo: PageInfo
-}
-
-export interface NextEntityIdEdge {
-  node: NextEntityId
-  cursor: String
-}
-
-export interface PageInfo {
-  hasNextPage: Boolean
-  hasPreviousPage: Boolean
-  startCursor?: String | null
-  endCursor?: String | null
-}
-
-export interface ProcessorState {
-  lastCompleteBlock: Float
-  lastProcessedEvent: String
-  indexerHead: Float
-  chainHead: Float
-}
-
-export interface SearchFTSOutput {
-  item: SearchSearchResult
-  rank: Float
-  isTypeOf: String
-  highlight: String
-}
-
-export interface StandardDeleteResponse {
-  id: ID_Output
-}
-
-export interface Video extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  channel?: Channel | null
-  channelId?: String | null
-  category?: VideoCategory | null
-  categoryId?: String | null
-  title?: String | null
-  description?: String | null
-  duration?: Int | null
-  thumbnailPhotoDataObject?: DataObject | null
-  thumbnailPhotoDataObjectId?: String | null
-  thumbnailPhotoUrls: Array<String>
-  thumbnailPhotoAvailability: AssetAvailability
-  language?: Language | null
-  languageId?: String | null
-  hasMarketing?: Boolean | null
-  publishedBeforeJoystream?: DateTime | null
-  isPublic?: Boolean | null
-  isCensored: Boolean
-  isExplicit?: Boolean | null
-  license?: License | null
-  licenseId?: String | null
-  mediaDataObject?: DataObject | null
-  mediaDataObjectId?: String | null
-  mediaUrls: Array<String>
-  mediaAvailability: AssetAvailability
-  mediaMetadata?: VideoMediaMetadata | null
-  mediaMetadataId?: String | null
-  createdInBlock: Int
-  isFeatured: Boolean
-}
-
-export interface VideoCategoriesByNameFTSOutput {
-  item: VideoCategoriesByNameSearchResult
-  rank: Float
-  isTypeOf: String
-  highlight: String
-}
-
-export interface VideoCategory extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  name?: String | null
-  videos: Array<Video>
-  createdInBlock: Int
-}
-
-export interface VideoCategoryConnection {
-  totalCount: Int
-  edges: Array<VideoCategoryEdge>
-  pageInfo: PageInfo
-}
-
-export interface VideoCategoryEdge {
-  node: VideoCategory
-  cursor: String
-}
-
-export interface VideoConnection {
-  totalCount: Int
-  edges: Array<VideoEdge>
-  pageInfo: PageInfo
-}
-
-export interface VideoEdge {
-  node: Video
-  cursor: String
-}
-
-export interface VideoMediaEncoding extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  codecName?: String | null
-  container?: String | null
-  mimeMediaType?: String | null
-  videomediametadataencoding?: Array<VideoMediaMetadata> | null
-}
-
-export interface VideoMediaEncodingConnection {
-  totalCount: Int
-  edges: Array<VideoMediaEncodingEdge>
-  pageInfo: PageInfo
-}
-
-export interface VideoMediaEncodingEdge {
-  node: VideoMediaEncoding
-  cursor: String
-}
-
-export interface VideoMediaMetadata extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  encoding?: VideoMediaEncoding | null
-  encodingId?: String | null
-  pixelWidth?: Int | null
-  pixelHeight?: Int | null
-  size?: Float | null
-  video?: Video | null
-  createdInBlock: Int
-}
-
-export interface VideoMediaMetadataConnection {
-  totalCount: Int
-  edges: Array<VideoMediaMetadataEdge>
-  pageInfo: PageInfo
-}
-
-export interface VideoMediaMetadataEdge {
-  node: VideoMediaMetadata
-  cursor: String
-}
-
-export interface Worker extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  isActive: Boolean
-  workerId: String
-  type: WorkerType
-  metadata?: String | null
-  dataObjects: Array<DataObject>
-}
-
-export interface WorkerConnection {
-  totalCount: Int
-  edges: Array<WorkerEdge>
-  pageInfo: PageInfo
-}
-
-export interface WorkerEdge {
-  node: Worker
-  cursor: String
-}
-
-/*
-The `Boolean` scalar type represents `true` or `false`.
-*/
-export type Boolean = boolean
-
-/*
-The javascript `Date` as string. Type represents date and time as the ISO Date string.
-*/
-export type DateTime = Date | string
-
-/*
-The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).
-*/
-export type Float = number
-
-/*
-The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.
-*/
-export type ID_Input = string | number
-export type ID_Output = string
-
-/*
-The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
-*/
-export type Int = number
-
-/*
-The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
-*/
-
-    export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
-
-    export type JsonPrimitive = string | number | boolean | null | {};
-    
-        // eslint-disable-next-line @typescript-eslint/no-empty-interface
-    export interface JsonArray extends Array<JsonValue> {}
-    
-    export type JsonObject = { [member: string]: JsonValue };
-
-    export type JSONObject = JsonObject;
-  
-
-/*
-The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
-*/
-export type String = string
-
-export type DataObjectOwner = DataObjectOwnerMember | DataObjectOwnerChannel | DataObjectOwnerDao | DataObjectOwnerCouncil | DataObjectOwnerWorkingGroup
-
-export type ChannelCategoriesByNameSearchResult = ChannelCategory
-
-export type MembersByHandleSearchResult = Membership
-
-export type SearchSearchResult = Channel | Video
-
-export type VideoCategoriesByNameSearchResult = VideoCategory

+ 0 - 4447
query-node/generated/graphql-server/generated/classes.ts

@@ -1,4447 +0,0 @@
-// This file has been auto-generated by Warthog.  Do not update directly as it
-// will be re-written.  If you need to change this file, update models or add
-// new TypeGraphQL objects
-// prettier-ignore
-// @ts-ignore
-import { DateResolver as Date } from 'graphql-scalars';
-// prettier-ignore
-// @ts-ignore
-import { GraphQLID as ID } from 'graphql';
-// prettier-ignore
-// @ts-ignore
-import { ArgsType, Field as TypeGraphQLField, Float, InputType as TypeGraphQLInputType, Int } from 'type-graphql';
-// prettier-ignore
-// @ts-ignore
-import { registerEnumType, GraphQLISODateTime as DateTime } from "type-graphql";
-
-import * as BN from "bn.js";
-
-// prettier-ignore
-// @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires
-const { GraphQLJSONObject } = require('graphql-type-json');
-// prettier-ignore
-// @ts-ignore
-import { BaseWhereInput, JsonObject, PaginationArgs, DateOnlyString, DateTimeString, BigInt, Bytes } from 'warthog';
-
-import { WorkerType } from "../src/modules/worker/worker.model";
-import { AssetAvailability } from "../src/modules/video/video.model";
-import { LiaisonJudgement } from "../src/modules/data-object/data-object.model";
-import { MembershipEntryMethod } from "../src/modules/membership/membership.model";
-
-// @ts-ignore
-import { CuratorGroup } from "../src/modules/curator-group/curator-group.model";
-// @ts-ignore
-import { ChannelCategory } from "../src/modules/channel-category/channel-category.model";
-// @ts-ignore
-import { Worker } from "../src/modules/worker/worker.model";
-// @ts-ignore
-import { VideoCategory } from "../src/modules/video-category/video-category.model";
-// @ts-ignore
-import { Language } from "../src/modules/language/language.model";
-// @ts-ignore
-import { License } from "../src/modules/license/license.model";
-// @ts-ignore
-import { VideoMediaEncoding } from "../src/modules/video-media-encoding/video-media-encoding.model";
-// @ts-ignore
-import { VideoMediaMetadata } from "../src/modules/video-media-metadata/video-media-metadata.model";
-// @ts-ignore
-import { Video } from "../src/modules/video/video.model";
-// @ts-ignore
-import { DataObject } from "../src/modules/data-object/data-object.model";
-// @ts-ignore
-import { Channel } from "../src/modules/channel/channel.model";
-// @ts-ignore
-import { Membership } from "../src/modules/membership/membership.model";
-// @ts-ignore
-import { NextEntityId } from "../src/modules/next-entity-id/next-entity-id.model";
-
-export enum CuratorGroupOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  isActive_ASC = "isActive_ASC",
-  isActive_DESC = "isActive_DESC"
-}
-
-registerEnumType(CuratorGroupOrderByEnum, {
-  name: "CuratorGroupOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class CuratorGroupWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  curatorIds_containsAll?: [number];
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  curatorIds_containsNone?: [number];
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  curatorIds_containsAny?: [number];
-
-  @TypeGraphQLField(() => Boolean, { nullable: true })
-  isActive_eq?: Boolean;
-
-  @TypeGraphQLField(() => [Boolean], { nullable: true })
-  isActive_in?: Boolean[];
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channels_none?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channels_some?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channels_every?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => CuratorGroupWhereInput, { nullable: true })
-  AND?: [CuratorGroupWhereInput];
-
-  @TypeGraphQLField(() => CuratorGroupWhereInput, { nullable: true })
-  OR?: [CuratorGroupWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class CuratorGroupWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class CuratorGroupCreateInput {
-  @TypeGraphQLField(() => [Int])
-  curatorIds!: number[];
-
-  @TypeGraphQLField()
-  isActive!: boolean;
-}
-
-@TypeGraphQLInputType()
-export class CuratorGroupUpdateInput {
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  curatorIds?: number[];
-
-  @TypeGraphQLField({ nullable: true })
-  isActive?: boolean;
-}
-
-@ArgsType()
-export class CuratorGroupWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => CuratorGroupWhereInput, { nullable: true })
-  where?: CuratorGroupWhereInput;
-
-  @TypeGraphQLField(() => CuratorGroupOrderByEnum, { nullable: true })
-  orderBy?: CuratorGroupOrderByEnum[];
-}
-
-@ArgsType()
-export class CuratorGroupCreateManyArgs {
-  @TypeGraphQLField(() => [CuratorGroupCreateInput])
-  data!: CuratorGroupCreateInput[];
-}
-
-@ArgsType()
-export class CuratorGroupUpdateArgs {
-  @TypeGraphQLField() data!: CuratorGroupUpdateInput;
-  @TypeGraphQLField() where!: CuratorGroupWhereUniqueInput;
-}
-
-export enum ChannelCategoryOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  name_ASC = "name_ASC",
-  name_DESC = "name_DESC",
-
-  createdInBlock_ASC = "createdInBlock_ASC",
-  createdInBlock_DESC = "createdInBlock_DESC"
-}
-
-registerEnumType(ChannelCategoryOrderByEnum, {
-  name: "ChannelCategoryOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class ChannelCategoryWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  name_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  name_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  name_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  name_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  name_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  createdInBlock_in?: number[];
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channels_none?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channels_some?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channels_every?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelCategoryWhereInput, { nullable: true })
-  AND?: [ChannelCategoryWhereInput];
-
-  @TypeGraphQLField(() => ChannelCategoryWhereInput, { nullable: true })
-  OR?: [ChannelCategoryWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class ChannelCategoryWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class ChannelCategoryCreateInput {
-  @TypeGraphQLField({ nullable: true })
-  name?: string;
-
-  @TypeGraphQLField()
-  createdInBlock!: number;
-}
-
-@TypeGraphQLInputType()
-export class ChannelCategoryUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  name?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  createdInBlock?: number;
-}
-
-@ArgsType()
-export class ChannelCategoryWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => ChannelCategoryWhereInput, { nullable: true })
-  where?: ChannelCategoryWhereInput;
-
-  @TypeGraphQLField(() => ChannelCategoryOrderByEnum, { nullable: true })
-  orderBy?: ChannelCategoryOrderByEnum[];
-}
-
-@ArgsType()
-export class ChannelCategoryCreateManyArgs {
-  @TypeGraphQLField(() => [ChannelCategoryCreateInput])
-  data!: ChannelCategoryCreateInput[];
-}
-
-@ArgsType()
-export class ChannelCategoryUpdateArgs {
-  @TypeGraphQLField() data!: ChannelCategoryUpdateInput;
-  @TypeGraphQLField() where!: ChannelCategoryWhereUniqueInput;
-}
-
-export enum DataObjectOwnerChannelOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  channel_ASC = "channel_ASC",
-  channel_DESC = "channel_DESC",
-
-  dummy_ASC = "dummy_ASC",
-  dummy_DESC = "dummy_DESC"
-}
-
-registerEnumType(DataObjectOwnerChannelOrderByEnum, {
-  name: "DataObjectOwnerChannelOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerChannelWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  channel_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  channel_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  channel_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  channel_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  channel_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  channel_in?: number[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  dummy_in?: number[];
-
-  @TypeGraphQLField(() => DataObjectOwnerChannelWhereInput, { nullable: true })
-  AND?: [DataObjectOwnerChannelWhereInput];
-
-  @TypeGraphQLField(() => DataObjectOwnerChannelWhereInput, { nullable: true })
-  OR?: [DataObjectOwnerChannelWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerChannelWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerChannelCreateInput {
-  @TypeGraphQLField()
-  channel!: number;
-
-  @TypeGraphQLField({ nullable: true })
-  dummy?: number;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerChannelUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  channel?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  dummy?: number;
-}
-
-@ArgsType()
-export class DataObjectOwnerChannelWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => DataObjectOwnerChannelWhereInput, { nullable: true })
-  where?: DataObjectOwnerChannelWhereInput;
-
-  @TypeGraphQLField(() => DataObjectOwnerChannelOrderByEnum, { nullable: true })
-  orderBy?: DataObjectOwnerChannelOrderByEnum[];
-}
-
-@ArgsType()
-export class DataObjectOwnerChannelCreateManyArgs {
-  @TypeGraphQLField(() => [DataObjectOwnerChannelCreateInput])
-  data!: DataObjectOwnerChannelCreateInput[];
-}
-
-@ArgsType()
-export class DataObjectOwnerChannelUpdateArgs {
-  @TypeGraphQLField() data!: DataObjectOwnerChannelUpdateInput;
-  @TypeGraphQLField() where!: DataObjectOwnerChannelWhereUniqueInput;
-}
-
-export enum DataObjectOwnerCouncilOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  dummy_ASC = "dummy_ASC",
-  dummy_DESC = "dummy_DESC"
-}
-
-registerEnumType(DataObjectOwnerCouncilOrderByEnum, {
-  name: "DataObjectOwnerCouncilOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerCouncilWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  dummy_in?: number[];
-
-  @TypeGraphQLField(() => DataObjectOwnerCouncilWhereInput, { nullable: true })
-  AND?: [DataObjectOwnerCouncilWhereInput];
-
-  @TypeGraphQLField(() => DataObjectOwnerCouncilWhereInput, { nullable: true })
-  OR?: [DataObjectOwnerCouncilWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerCouncilWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerCouncilCreateInput {
-  @TypeGraphQLField({ nullable: true })
-  dummy?: number;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerCouncilUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  dummy?: number;
-}
-
-@ArgsType()
-export class DataObjectOwnerCouncilWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => DataObjectOwnerCouncilWhereInput, { nullable: true })
-  where?: DataObjectOwnerCouncilWhereInput;
-
-  @TypeGraphQLField(() => DataObjectOwnerCouncilOrderByEnum, { nullable: true })
-  orderBy?: DataObjectOwnerCouncilOrderByEnum[];
-}
-
-@ArgsType()
-export class DataObjectOwnerCouncilCreateManyArgs {
-  @TypeGraphQLField(() => [DataObjectOwnerCouncilCreateInput])
-  data!: DataObjectOwnerCouncilCreateInput[];
-}
-
-@ArgsType()
-export class DataObjectOwnerCouncilUpdateArgs {
-  @TypeGraphQLField() data!: DataObjectOwnerCouncilUpdateInput;
-  @TypeGraphQLField() where!: DataObjectOwnerCouncilWhereUniqueInput;
-}
-
-export enum DataObjectOwnerDaoOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  dao_ASC = "dao_ASC",
-  dao_DESC = "dao_DESC"
-}
-
-registerEnumType(DataObjectOwnerDaoOrderByEnum, {
-  name: "DataObjectOwnerDaoOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerDaoWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dao_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dao_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dao_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dao_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dao_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  dao_in?: number[];
-
-  @TypeGraphQLField(() => DataObjectOwnerDaoWhereInput, { nullable: true })
-  AND?: [DataObjectOwnerDaoWhereInput];
-
-  @TypeGraphQLField(() => DataObjectOwnerDaoWhereInput, { nullable: true })
-  OR?: [DataObjectOwnerDaoWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerDaoWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerDaoCreateInput {
-  @TypeGraphQLField()
-  dao!: number;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerDaoUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  dao?: number;
-}
-
-@ArgsType()
-export class DataObjectOwnerDaoWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => DataObjectOwnerDaoWhereInput, { nullable: true })
-  where?: DataObjectOwnerDaoWhereInput;
-
-  @TypeGraphQLField(() => DataObjectOwnerDaoOrderByEnum, { nullable: true })
-  orderBy?: DataObjectOwnerDaoOrderByEnum[];
-}
-
-@ArgsType()
-export class DataObjectOwnerDaoCreateManyArgs {
-  @TypeGraphQLField(() => [DataObjectOwnerDaoCreateInput])
-  data!: DataObjectOwnerDaoCreateInput[];
-}
-
-@ArgsType()
-export class DataObjectOwnerDaoUpdateArgs {
-  @TypeGraphQLField() data!: DataObjectOwnerDaoUpdateInput;
-  @TypeGraphQLField() where!: DataObjectOwnerDaoWhereUniqueInput;
-}
-
-export enum DataObjectOwnerMemberOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  member_ASC = "member_ASC",
-  member_DESC = "member_DESC",
-
-  dummy_ASC = "dummy_ASC",
-  dummy_DESC = "dummy_DESC"
-}
-
-registerEnumType(DataObjectOwnerMemberOrderByEnum, {
-  name: "DataObjectOwnerMemberOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerMemberWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  member_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  member_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  member_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  member_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  member_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  member_in?: number[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  dummy_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  dummy_in?: number[];
-
-  @TypeGraphQLField(() => DataObjectOwnerMemberWhereInput, { nullable: true })
-  AND?: [DataObjectOwnerMemberWhereInput];
-
-  @TypeGraphQLField(() => DataObjectOwnerMemberWhereInput, { nullable: true })
-  OR?: [DataObjectOwnerMemberWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerMemberWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerMemberCreateInput {
-  @TypeGraphQLField()
-  member!: number;
-
-  @TypeGraphQLField({ nullable: true })
-  dummy?: number;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerMemberUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  member?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  dummy?: number;
-}
-
-@ArgsType()
-export class DataObjectOwnerMemberWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => DataObjectOwnerMemberWhereInput, { nullable: true })
-  where?: DataObjectOwnerMemberWhereInput;
-
-  @TypeGraphQLField(() => DataObjectOwnerMemberOrderByEnum, { nullable: true })
-  orderBy?: DataObjectOwnerMemberOrderByEnum[];
-}
-
-@ArgsType()
-export class DataObjectOwnerMemberCreateManyArgs {
-  @TypeGraphQLField(() => [DataObjectOwnerMemberCreateInput])
-  data!: DataObjectOwnerMemberCreateInput[];
-}
-
-@ArgsType()
-export class DataObjectOwnerMemberUpdateArgs {
-  @TypeGraphQLField() data!: DataObjectOwnerMemberUpdateInput;
-  @TypeGraphQLField() where!: DataObjectOwnerMemberWhereUniqueInput;
-}
-
-export enum DataObjectOwnerWorkingGroupOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  workingGroup_ASC = "workingGroup_ASC",
-  workingGroup_DESC = "workingGroup_DESC"
-}
-
-registerEnumType(DataObjectOwnerWorkingGroupOrderByEnum, {
-  name: "DataObjectOwnerWorkingGroupOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerWorkingGroupWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  workingGroup_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  workingGroup_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  workingGroup_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  workingGroup_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  workingGroup_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  workingGroup_in?: number[];
-
-  @TypeGraphQLField(() => DataObjectOwnerWorkingGroupWhereInput, {
-    nullable: true
-  })
-  AND?: [DataObjectOwnerWorkingGroupWhereInput];
-
-  @TypeGraphQLField(() => DataObjectOwnerWorkingGroupWhereInput, {
-    nullable: true
-  })
-  OR?: [DataObjectOwnerWorkingGroupWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerWorkingGroupWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerWorkingGroupCreateInput {
-  @TypeGraphQLField()
-  workingGroup!: number;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectOwnerWorkingGroupUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  workingGroup?: number;
-}
-
-@ArgsType()
-export class DataObjectOwnerWorkingGroupWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => DataObjectOwnerWorkingGroupWhereInput, {
-    nullable: true
-  })
-  where?: DataObjectOwnerWorkingGroupWhereInput;
-
-  @TypeGraphQLField(() => DataObjectOwnerWorkingGroupOrderByEnum, {
-    nullable: true
-  })
-  orderBy?: DataObjectOwnerWorkingGroupOrderByEnum[];
-}
-
-@ArgsType()
-export class DataObjectOwnerWorkingGroupCreateManyArgs {
-  @TypeGraphQLField(() => [DataObjectOwnerWorkingGroupCreateInput])
-  data!: DataObjectOwnerWorkingGroupCreateInput[];
-}
-
-@ArgsType()
-export class DataObjectOwnerWorkingGroupUpdateArgs {
-  @TypeGraphQLField() data!: DataObjectOwnerWorkingGroupUpdateInput;
-  @TypeGraphQLField() where!: DataObjectOwnerWorkingGroupWhereUniqueInput;
-}
-
-export enum WorkerOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  isActive_ASC = "isActive_ASC",
-  isActive_DESC = "isActive_DESC",
-
-  workerId_ASC = "workerId_ASC",
-  workerId_DESC = "workerId_DESC",
-
-  type_ASC = "type_ASC",
-  type_DESC = "type_DESC",
-
-  metadata_ASC = "metadata_ASC",
-  metadata_DESC = "metadata_DESC"
-}
-
-registerEnumType(WorkerOrderByEnum, {
-  name: "WorkerOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class WorkerWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => Boolean, { nullable: true })
-  isActive_eq?: Boolean;
-
-  @TypeGraphQLField(() => [Boolean], { nullable: true })
-  isActive_in?: Boolean[];
-
-  @TypeGraphQLField({ nullable: true })
-  workerId_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  workerId_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  workerId_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  workerId_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  workerId_in?: string[];
-
-  @TypeGraphQLField(() => WorkerType, { nullable: true })
-  type_eq?: WorkerType;
-
-  @TypeGraphQLField(() => [WorkerType], { nullable: true })
-  type_in?: WorkerType[];
-
-  @TypeGraphQLField({ nullable: true })
-  metadata_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  metadata_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  metadata_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  metadata_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  metadata_in?: string[];
-
-  @TypeGraphQLField(() => DataObjectWhereInput, { nullable: true })
-  dataObjects_none?: DataObjectWhereInput;
-
-  @TypeGraphQLField(() => DataObjectWhereInput, { nullable: true })
-  dataObjects_some?: DataObjectWhereInput;
-
-  @TypeGraphQLField(() => DataObjectWhereInput, { nullable: true })
-  dataObjects_every?: DataObjectWhereInput;
-
-  @TypeGraphQLField(() => WorkerWhereInput, { nullable: true })
-  AND?: [WorkerWhereInput];
-
-  @TypeGraphQLField(() => WorkerWhereInput, { nullable: true })
-  OR?: [WorkerWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class WorkerWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class WorkerCreateInput {
-  @TypeGraphQLField()
-  isActive!: boolean;
-
-  @TypeGraphQLField()
-  workerId!: string;
-
-  @TypeGraphQLField(() => WorkerType)
-  type!: WorkerType;
-
-  @TypeGraphQLField({ nullable: true })
-  metadata?: string;
-}
-
-@TypeGraphQLInputType()
-export class WorkerUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  isActive?: boolean;
-
-  @TypeGraphQLField({ nullable: true })
-  workerId?: string;
-
-  @TypeGraphQLField(() => WorkerType, { nullable: true })
-  type?: WorkerType;
-
-  @TypeGraphQLField({ nullable: true })
-  metadata?: string;
-}
-
-@ArgsType()
-export class WorkerWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => WorkerWhereInput, { nullable: true })
-  where?: WorkerWhereInput;
-
-  @TypeGraphQLField(() => WorkerOrderByEnum, { nullable: true })
-  orderBy?: WorkerOrderByEnum[];
-}
-
-@ArgsType()
-export class WorkerCreateManyArgs {
-  @TypeGraphQLField(() => [WorkerCreateInput])
-  data!: WorkerCreateInput[];
-}
-
-@ArgsType()
-export class WorkerUpdateArgs {
-  @TypeGraphQLField() data!: WorkerUpdateInput;
-  @TypeGraphQLField() where!: WorkerWhereUniqueInput;
-}
-
-export enum VideoCategoryOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  name_ASC = "name_ASC",
-  name_DESC = "name_DESC",
-
-  createdInBlock_ASC = "createdInBlock_ASC",
-  createdInBlock_DESC = "createdInBlock_DESC"
-}
-
-registerEnumType(VideoCategoryOrderByEnum, {
-  name: "VideoCategoryOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class VideoCategoryWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  name_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  name_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  name_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  name_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  name_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  createdInBlock_in?: number[];
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videos_none?: VideoWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videos_some?: VideoWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videos_every?: VideoWhereInput;
-
-  @TypeGraphQLField(() => VideoCategoryWhereInput, { nullable: true })
-  AND?: [VideoCategoryWhereInput];
-
-  @TypeGraphQLField(() => VideoCategoryWhereInput, { nullable: true })
-  OR?: [VideoCategoryWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class VideoCategoryWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class VideoCategoryCreateInput {
-  @TypeGraphQLField({ nullable: true })
-  name?: string;
-
-  @TypeGraphQLField()
-  createdInBlock!: number;
-}
-
-@TypeGraphQLInputType()
-export class VideoCategoryUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  name?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  createdInBlock?: number;
-}
-
-@ArgsType()
-export class VideoCategoryWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => VideoCategoryWhereInput, { nullable: true })
-  where?: VideoCategoryWhereInput;
-
-  @TypeGraphQLField(() => VideoCategoryOrderByEnum, { nullable: true })
-  orderBy?: VideoCategoryOrderByEnum[];
-}
-
-@ArgsType()
-export class VideoCategoryCreateManyArgs {
-  @TypeGraphQLField(() => [VideoCategoryCreateInput])
-  data!: VideoCategoryCreateInput[];
-}
-
-@ArgsType()
-export class VideoCategoryUpdateArgs {
-  @TypeGraphQLField() data!: VideoCategoryUpdateInput;
-  @TypeGraphQLField() where!: VideoCategoryWhereUniqueInput;
-}
-
-export enum LanguageOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  iso_ASC = "iso_ASC",
-  iso_DESC = "iso_DESC",
-
-  createdInBlock_ASC = "createdInBlock_ASC",
-  createdInBlock_DESC = "createdInBlock_DESC"
-}
-
-registerEnumType(LanguageOrderByEnum, {
-  name: "LanguageOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class LanguageWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  iso_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  iso_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  iso_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  iso_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  iso_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  createdInBlock_in?: number[];
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channellanguage_none?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channellanguage_some?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channellanguage_every?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videolanguage_none?: VideoWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videolanguage_some?: VideoWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videolanguage_every?: VideoWhereInput;
-
-  @TypeGraphQLField(() => LanguageWhereInput, { nullable: true })
-  AND?: [LanguageWhereInput];
-
-  @TypeGraphQLField(() => LanguageWhereInput, { nullable: true })
-  OR?: [LanguageWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class LanguageWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class LanguageCreateInput {
-  @TypeGraphQLField()
-  iso!: string;
-
-  @TypeGraphQLField()
-  createdInBlock!: number;
-}
-
-@TypeGraphQLInputType()
-export class LanguageUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  iso?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  createdInBlock?: number;
-}
-
-@ArgsType()
-export class LanguageWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => LanguageWhereInput, { nullable: true })
-  where?: LanguageWhereInput;
-
-  @TypeGraphQLField(() => LanguageOrderByEnum, { nullable: true })
-  orderBy?: LanguageOrderByEnum[];
-}
-
-@ArgsType()
-export class LanguageCreateManyArgs {
-  @TypeGraphQLField(() => [LanguageCreateInput])
-  data!: LanguageCreateInput[];
-}
-
-@ArgsType()
-export class LanguageUpdateArgs {
-  @TypeGraphQLField() data!: LanguageUpdateInput;
-  @TypeGraphQLField() where!: LanguageWhereUniqueInput;
-}
-
-export enum LicenseOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  code_ASC = "code_ASC",
-  code_DESC = "code_DESC",
-
-  attribution_ASC = "attribution_ASC",
-  attribution_DESC = "attribution_DESC",
-
-  customText_ASC = "customText_ASC",
-  customText_DESC = "customText_DESC"
-}
-
-registerEnumType(LicenseOrderByEnum, {
-  name: "LicenseOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class LicenseWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  code_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  code_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  code_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  code_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  code_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  code_in?: number[];
-
-  @TypeGraphQLField({ nullable: true })
-  attribution_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  attribution_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  attribution_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  attribution_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  attribution_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  customText_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  customText_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  customText_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  customText_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  customText_in?: string[];
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videolanguage_none?: VideoWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videolanguage_some?: VideoWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videolanguage_every?: VideoWhereInput;
-
-  @TypeGraphQLField(() => LicenseWhereInput, { nullable: true })
-  AND?: [LicenseWhereInput];
-
-  @TypeGraphQLField(() => LicenseWhereInput, { nullable: true })
-  OR?: [LicenseWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class LicenseWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class LicenseCreateInput {
-  @TypeGraphQLField({ nullable: true })
-  code?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  attribution?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  customText?: string;
-}
-
-@TypeGraphQLInputType()
-export class LicenseUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  code?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  attribution?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  customText?: string;
-}
-
-@ArgsType()
-export class LicenseWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => LicenseWhereInput, { nullable: true })
-  where?: LicenseWhereInput;
-
-  @TypeGraphQLField(() => LicenseOrderByEnum, { nullable: true })
-  orderBy?: LicenseOrderByEnum[];
-}
-
-@ArgsType()
-export class LicenseCreateManyArgs {
-  @TypeGraphQLField(() => [LicenseCreateInput])
-  data!: LicenseCreateInput[];
-}
-
-@ArgsType()
-export class LicenseUpdateArgs {
-  @TypeGraphQLField() data!: LicenseUpdateInput;
-  @TypeGraphQLField() where!: LicenseWhereUniqueInput;
-}
-
-export enum VideoMediaEncodingOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  codecName_ASC = "codecName_ASC",
-  codecName_DESC = "codecName_DESC",
-
-  container_ASC = "container_ASC",
-  container_DESC = "container_DESC",
-
-  mimeMediaType_ASC = "mimeMediaType_ASC",
-  mimeMediaType_DESC = "mimeMediaType_DESC"
-}
-
-registerEnumType(VideoMediaEncodingOrderByEnum, {
-  name: "VideoMediaEncodingOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class VideoMediaEncodingWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  codecName_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  codecName_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  codecName_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  codecName_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  codecName_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  container_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  container_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  container_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  container_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  container_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  mimeMediaType_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  mimeMediaType_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  mimeMediaType_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  mimeMediaType_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  mimeMediaType_in?: string[];
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  videomediametadataencoding_none?: VideoMediaMetadataWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  videomediametadataencoding_some?: VideoMediaMetadataWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  videomediametadataencoding_every?: VideoMediaMetadataWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaEncodingWhereInput, { nullable: true })
-  AND?: [VideoMediaEncodingWhereInput];
-
-  @TypeGraphQLField(() => VideoMediaEncodingWhereInput, { nullable: true })
-  OR?: [VideoMediaEncodingWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class VideoMediaEncodingWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class VideoMediaEncodingCreateInput {
-  @TypeGraphQLField({ nullable: true })
-  codecName?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  container?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  mimeMediaType?: string;
-}
-
-@TypeGraphQLInputType()
-export class VideoMediaEncodingUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  codecName?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  container?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  mimeMediaType?: string;
-}
-
-@ArgsType()
-export class VideoMediaEncodingWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => VideoMediaEncodingWhereInput, { nullable: true })
-  where?: VideoMediaEncodingWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaEncodingOrderByEnum, { nullable: true })
-  orderBy?: VideoMediaEncodingOrderByEnum[];
-}
-
-@ArgsType()
-export class VideoMediaEncodingCreateManyArgs {
-  @TypeGraphQLField(() => [VideoMediaEncodingCreateInput])
-  data!: VideoMediaEncodingCreateInput[];
-}
-
-@ArgsType()
-export class VideoMediaEncodingUpdateArgs {
-  @TypeGraphQLField() data!: VideoMediaEncodingUpdateInput;
-  @TypeGraphQLField() where!: VideoMediaEncodingWhereUniqueInput;
-}
-
-export enum VideoMediaMetadataOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  encoding_ASC = "encoding_ASC",
-  encoding_DESC = "encoding_DESC",
-
-  encodingId_ASC = "encodingId_ASC",
-  encodingId_DESC = "encodingId_DESC",
-
-  pixelWidth_ASC = "pixelWidth_ASC",
-  pixelWidth_DESC = "pixelWidth_DESC",
-
-  pixelHeight_ASC = "pixelHeight_ASC",
-  pixelHeight_DESC = "pixelHeight_DESC",
-
-  size_ASC = "size_ASC",
-  size_DESC = "size_DESC",
-
-  createdInBlock_ASC = "createdInBlock_ASC",
-  createdInBlock_DESC = "createdInBlock_DESC"
-}
-
-registerEnumType(VideoMediaMetadataOrderByEnum, {
-  name: "VideoMediaMetadataOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class VideoMediaMetadataWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  encodingId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  encodingId_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  pixelWidth_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  pixelWidth_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  pixelWidth_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  pixelWidth_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  pixelWidth_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  pixelWidth_in?: number[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  pixelHeight_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  pixelHeight_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  pixelHeight_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  pixelHeight_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  pixelHeight_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  pixelHeight_in?: number[];
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  size_eq?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  size_gt?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  size_gte?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  size_lt?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  size_lte?: number;
-
-  @TypeGraphQLField(() => [Float], { nullable: true })
-  size_in?: number[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  createdInBlock_in?: number[];
-
-  @TypeGraphQLField(() => VideoMediaEncodingWhereInput, { nullable: true })
-  encoding?: VideoMediaEncodingWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  video?: VideoWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  AND?: [VideoMediaMetadataWhereInput];
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  OR?: [VideoMediaMetadataWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class VideoMediaMetadataWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class VideoMediaMetadataCreateInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  encoding?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  encodingId?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  pixelWidth?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  pixelHeight?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  size?: number;
-
-  @TypeGraphQLField()
-  createdInBlock!: number;
-}
-
-@TypeGraphQLInputType()
-export class VideoMediaMetadataUpdateInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  encoding?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  encodingId?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  pixelWidth?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  pixelHeight?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  size?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  createdInBlock?: number;
-}
-
-@ArgsType()
-export class VideoMediaMetadataWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  where?: VideoMediaMetadataWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaMetadataOrderByEnum, { nullable: true })
-  orderBy?: VideoMediaMetadataOrderByEnum[];
-}
-
-@ArgsType()
-export class VideoMediaMetadataCreateManyArgs {
-  @TypeGraphQLField(() => [VideoMediaMetadataCreateInput])
-  data!: VideoMediaMetadataCreateInput[];
-}
-
-@ArgsType()
-export class VideoMediaMetadataUpdateArgs {
-  @TypeGraphQLField() data!: VideoMediaMetadataUpdateInput;
-  @TypeGraphQLField() where!: VideoMediaMetadataWhereUniqueInput;
-}
-
-export enum VideoOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  channel_ASC = "channel_ASC",
-  channel_DESC = "channel_DESC",
-
-  channelId_ASC = "channelId_ASC",
-  channelId_DESC = "channelId_DESC",
-
-  category_ASC = "category_ASC",
-  category_DESC = "category_DESC",
-
-  categoryId_ASC = "categoryId_ASC",
-  categoryId_DESC = "categoryId_DESC",
-
-  title_ASC = "title_ASC",
-  title_DESC = "title_DESC",
-
-  description_ASC = "description_ASC",
-  description_DESC = "description_DESC",
-
-  duration_ASC = "duration_ASC",
-  duration_DESC = "duration_DESC",
-
-  thumbnailPhotoDataObject_ASC = "thumbnailPhotoDataObject_ASC",
-  thumbnailPhotoDataObject_DESC = "thumbnailPhotoDataObject_DESC",
-
-  thumbnailPhotoDataObjectId_ASC = "thumbnailPhotoDataObjectId_ASC",
-  thumbnailPhotoDataObjectId_DESC = "thumbnailPhotoDataObjectId_DESC",
-
-  thumbnailPhotoAvailability_ASC = "thumbnailPhotoAvailability_ASC",
-  thumbnailPhotoAvailability_DESC = "thumbnailPhotoAvailability_DESC",
-
-  language_ASC = "language_ASC",
-  language_DESC = "language_DESC",
-
-  languageId_ASC = "languageId_ASC",
-  languageId_DESC = "languageId_DESC",
-
-  hasMarketing_ASC = "hasMarketing_ASC",
-  hasMarketing_DESC = "hasMarketing_DESC",
-
-  publishedBeforeJoystream_ASC = "publishedBeforeJoystream_ASC",
-  publishedBeforeJoystream_DESC = "publishedBeforeJoystream_DESC",
-
-  isPublic_ASC = "isPublic_ASC",
-  isPublic_DESC = "isPublic_DESC",
-
-  isCensored_ASC = "isCensored_ASC",
-  isCensored_DESC = "isCensored_DESC",
-
-  isExplicit_ASC = "isExplicit_ASC",
-  isExplicit_DESC = "isExplicit_DESC",
-
-  license_ASC = "license_ASC",
-  license_DESC = "license_DESC",
-
-  licenseId_ASC = "licenseId_ASC",
-  licenseId_DESC = "licenseId_DESC",
-
-  mediaDataObject_ASC = "mediaDataObject_ASC",
-  mediaDataObject_DESC = "mediaDataObject_DESC",
-
-  mediaDataObjectId_ASC = "mediaDataObjectId_ASC",
-  mediaDataObjectId_DESC = "mediaDataObjectId_DESC",
-
-  mediaAvailability_ASC = "mediaAvailability_ASC",
-  mediaAvailability_DESC = "mediaAvailability_DESC",
-
-  mediaMetadata_ASC = "mediaMetadata_ASC",
-  mediaMetadata_DESC = "mediaMetadata_DESC",
-
-  mediaMetadataId_ASC = "mediaMetadataId_ASC",
-  mediaMetadataId_DESC = "mediaMetadataId_DESC",
-
-  createdInBlock_ASC = "createdInBlock_ASC",
-  createdInBlock_DESC = "createdInBlock_DESC",
-
-  isFeatured_ASC = "isFeatured_ASC",
-  isFeatured_DESC = "isFeatured_DESC"
-}
-
-registerEnumType(VideoOrderByEnum, {
-  name: "VideoOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class VideoWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  channelId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  channelId_in?: string[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  categoryId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  categoryId_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  title_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  title_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  title_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  title_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  title_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  description_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  description_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  description_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  description_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  description_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  duration_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  duration_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  duration_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  duration_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  duration_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  duration_in?: number[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  thumbnailPhotoDataObjectId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  thumbnailPhotoDataObjectId_in?: string[];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  thumbnailPhotoUrls_containsAll?: [string];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  thumbnailPhotoUrls_containsNone?: [string];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  thumbnailPhotoUrls_containsAny?: [string];
-
-  @TypeGraphQLField(() => AssetAvailability, { nullable: true })
-  thumbnailPhotoAvailability_eq?: AssetAvailability;
-
-  @TypeGraphQLField(() => [AssetAvailability], { nullable: true })
-  thumbnailPhotoAvailability_in?: AssetAvailability[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  languageId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  languageId_in?: string[];
-
-  @TypeGraphQLField(() => Boolean, { nullable: true })
-  hasMarketing_eq?: Boolean;
-
-  @TypeGraphQLField(() => [Boolean], { nullable: true })
-  hasMarketing_in?: Boolean[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  publishedBeforeJoystream_eq?: DateTimeString;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  publishedBeforeJoystream_lt?: DateTimeString;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  publishedBeforeJoystream_lte?: DateTimeString;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  publishedBeforeJoystream_gt?: DateTimeString;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  publishedBeforeJoystream_gte?: DateTimeString;
-
-  @TypeGraphQLField(() => Boolean, { nullable: true })
-  isPublic_eq?: Boolean;
-
-  @TypeGraphQLField(() => [Boolean], { nullable: true })
-  isPublic_in?: Boolean[];
-
-  @TypeGraphQLField(() => Boolean, { nullable: true })
-  isCensored_eq?: Boolean;
-
-  @TypeGraphQLField(() => [Boolean], { nullable: true })
-  isCensored_in?: Boolean[];
-
-  @TypeGraphQLField(() => Boolean, { nullable: true })
-  isExplicit_eq?: Boolean;
-
-  @TypeGraphQLField(() => [Boolean], { nullable: true })
-  isExplicit_in?: Boolean[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  licenseId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  licenseId_in?: string[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  mediaDataObjectId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  mediaDataObjectId_in?: string[];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  mediaUrls_containsAll?: [string];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  mediaUrls_containsNone?: [string];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  mediaUrls_containsAny?: [string];
-
-  @TypeGraphQLField(() => AssetAvailability, { nullable: true })
-  mediaAvailability_eq?: AssetAvailability;
-
-  @TypeGraphQLField(() => [AssetAvailability], { nullable: true })
-  mediaAvailability_in?: AssetAvailability[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  mediaMetadataId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  mediaMetadataId_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  createdInBlock_in?: number[];
-
-  @TypeGraphQLField(() => Boolean, { nullable: true })
-  isFeatured_eq?: Boolean;
-
-  @TypeGraphQLField(() => [Boolean], { nullable: true })
-  isFeatured_in?: Boolean[];
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channel?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => VideoCategoryWhereInput, { nullable: true })
-  category?: VideoCategoryWhereInput;
-
-  @TypeGraphQLField(() => DataObjectWhereInput, { nullable: true })
-  thumbnailPhotoDataObject?: DataObjectWhereInput;
-
-  @TypeGraphQLField(() => LanguageWhereInput, { nullable: true })
-  language?: LanguageWhereInput;
-
-  @TypeGraphQLField(() => LicenseWhereInput, { nullable: true })
-  license?: LicenseWhereInput;
-
-  @TypeGraphQLField(() => DataObjectWhereInput, { nullable: true })
-  mediaDataObject?: DataObjectWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  mediaMetadata?: VideoMediaMetadataWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  AND?: [VideoWhereInput];
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  OR?: [VideoWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class VideoWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class VideoCreateInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  channel?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  channelId?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  category?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  categoryId?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  title?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  description?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  duration?: number;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  thumbnailPhotoDataObject?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  thumbnailPhotoDataObjectId?: string;
-
-  @TypeGraphQLField(() => [String])
-  thumbnailPhotoUrls!: string[];
-
-  @TypeGraphQLField(() => AssetAvailability)
-  thumbnailPhotoAvailability!: AssetAvailability;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  language?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  languageId?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  hasMarketing?: boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  publishedBeforeJoystream?: DateTimeString;
-
-  @TypeGraphQLField({ nullable: true })
-  isPublic?: boolean;
-
-  @TypeGraphQLField()
-  isCensored!: boolean;
-
-  @TypeGraphQLField({ nullable: true })
-  isExplicit?: boolean;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  license?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  licenseId?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  mediaDataObject?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  mediaDataObjectId?: string;
-
-  @TypeGraphQLField(() => [String])
-  mediaUrls!: string[];
-
-  @TypeGraphQLField(() => AssetAvailability)
-  mediaAvailability!: AssetAvailability;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  mediaMetadata?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  mediaMetadataId?: string;
-
-  @TypeGraphQLField()
-  createdInBlock!: number;
-
-  @TypeGraphQLField()
-  isFeatured!: boolean;
-}
-
-@TypeGraphQLInputType()
-export class VideoUpdateInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  channel?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  channelId?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  category?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  categoryId?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  title?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  description?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  duration?: number;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  thumbnailPhotoDataObject?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  thumbnailPhotoDataObjectId?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  thumbnailPhotoUrls?: string[];
-
-  @TypeGraphQLField(() => AssetAvailability, { nullable: true })
-  thumbnailPhotoAvailability?: AssetAvailability;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  language?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  languageId?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  hasMarketing?: boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  publishedBeforeJoystream?: DateTimeString;
-
-  @TypeGraphQLField({ nullable: true })
-  isPublic?: boolean;
-
-  @TypeGraphQLField({ nullable: true })
-  isCensored?: boolean;
-
-  @TypeGraphQLField({ nullable: true })
-  isExplicit?: boolean;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  license?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  licenseId?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  mediaDataObject?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  mediaDataObjectId?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  mediaUrls?: string[];
-
-  @TypeGraphQLField(() => AssetAvailability, { nullable: true })
-  mediaAvailability?: AssetAvailability;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  mediaMetadata?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  mediaMetadataId?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  createdInBlock?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  isFeatured?: boolean;
-}
-
-@ArgsType()
-export class VideoWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  where?: VideoWhereInput;
-
-  @TypeGraphQLField(() => VideoOrderByEnum, { nullable: true })
-  orderBy?: VideoOrderByEnum[];
-}
-
-@ArgsType()
-export class VideoCreateManyArgs {
-  @TypeGraphQLField(() => [VideoCreateInput])
-  data!: VideoCreateInput[];
-}
-
-@ArgsType()
-export class VideoUpdateArgs {
-  @TypeGraphQLField() data!: VideoUpdateInput;
-  @TypeGraphQLField() where!: VideoWhereUniqueInput;
-}
-
-export enum DataObjectOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  createdInBlock_ASC = "createdInBlock_ASC",
-  createdInBlock_DESC = "createdInBlock_DESC",
-
-  typeId_ASC = "typeId_ASC",
-  typeId_DESC = "typeId_DESC",
-
-  size_ASC = "size_ASC",
-  size_DESC = "size_DESC",
-
-  liaison_ASC = "liaison_ASC",
-  liaison_DESC = "liaison_DESC",
-
-  liaisonId_ASC = "liaisonId_ASC",
-  liaisonId_DESC = "liaisonId_DESC",
-
-  liaisonJudgement_ASC = "liaisonJudgement_ASC",
-  liaisonJudgement_DESC = "liaisonJudgement_DESC",
-
-  ipfsContentId_ASC = "ipfsContentId_ASC",
-  ipfsContentId_DESC = "ipfsContentId_DESC",
-
-  joystreamContentId_ASC = "joystreamContentId_ASC",
-  joystreamContentId_DESC = "joystreamContentId_DESC"
-}
-
-registerEnumType(DataObjectOrderByEnum, {
-  name: "DataObjectOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class DataObjectWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => GraphQLJSONObject, { nullable: true })
-  owner_json?: JsonObject;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  createdInBlock_in?: number[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  typeId_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  typeId_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  typeId_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  typeId_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  typeId_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  typeId_in?: number[];
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  size_eq?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  size_gt?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  size_gte?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  size_lt?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  size_lte?: number;
-
-  @TypeGraphQLField(() => [Float], { nullable: true })
-  size_in?: number[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  liaisonId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  liaisonId_in?: string[];
-
-  @TypeGraphQLField(() => LiaisonJudgement, { nullable: true })
-  liaisonJudgement_eq?: LiaisonJudgement;
-
-  @TypeGraphQLField(() => [LiaisonJudgement], { nullable: true })
-  liaisonJudgement_in?: LiaisonJudgement[];
-
-  @TypeGraphQLField({ nullable: true })
-  ipfsContentId_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  ipfsContentId_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  ipfsContentId_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  ipfsContentId_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  ipfsContentId_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  joystreamContentId_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  joystreamContentId_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  joystreamContentId_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  joystreamContentId_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  joystreamContentId_in?: string[];
-
-  @TypeGraphQLField(() => WorkerWhereInput, { nullable: true })
-  liaison?: WorkerWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channelcoverPhotoDataObject_none?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channelcoverPhotoDataObject_some?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channelcoverPhotoDataObject_every?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channelavatarPhotoDataObject_none?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channelavatarPhotoDataObject_some?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channelavatarPhotoDataObject_every?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  videothumbnailPhotoDataObject_none?: VideoMediaMetadataWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  videothumbnailPhotoDataObject_some?: VideoMediaMetadataWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  videothumbnailPhotoDataObject_every?: VideoMediaMetadataWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  videomediaDataObject_none?: VideoMediaMetadataWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  videomediaDataObject_some?: VideoMediaMetadataWhereInput;
-
-  @TypeGraphQLField(() => VideoMediaMetadataWhereInput, { nullable: true })
-  videomediaDataObject_every?: VideoMediaMetadataWhereInput;
-
-  @TypeGraphQLField(() => DataObjectWhereInput, { nullable: true })
-  AND?: [DataObjectWhereInput];
-
-  @TypeGraphQLField(() => DataObjectWhereInput, { nullable: true })
-  OR?: [DataObjectWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class DataObjectWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectCreateInput {
-  @TypeGraphQLField(() => GraphQLJSONObject)
-  owner!: JsonObject;
-
-  @TypeGraphQLField()
-  createdInBlock!: number;
-
-  @TypeGraphQLField()
-  typeId!: number;
-
-  @TypeGraphQLField()
-  size!: number;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  liaison?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  liaisonId?: string;
-
-  @TypeGraphQLField(() => LiaisonJudgement)
-  liaisonJudgement!: LiaisonJudgement;
-
-  @TypeGraphQLField()
-  ipfsContentId!: string;
-
-  @TypeGraphQLField()
-  joystreamContentId!: string;
-}
-
-@TypeGraphQLInputType()
-export class DataObjectUpdateInput {
-  @TypeGraphQLField(() => GraphQLJSONObject, { nullable: true })
-  owner?: JsonObject;
-
-  @TypeGraphQLField({ nullable: true })
-  createdInBlock?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  typeId?: number;
-
-  @TypeGraphQLField({ nullable: true })
-  size?: number;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  liaison?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  liaisonId?: string;
-
-  @TypeGraphQLField(() => LiaisonJudgement, { nullable: true })
-  liaisonJudgement?: LiaisonJudgement;
-
-  @TypeGraphQLField({ nullable: true })
-  ipfsContentId?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  joystreamContentId?: string;
-}
-
-@ArgsType()
-export class DataObjectWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => DataObjectWhereInput, { nullable: true })
-  where?: DataObjectWhereInput;
-
-  @TypeGraphQLField(() => DataObjectOrderByEnum, { nullable: true })
-  orderBy?: DataObjectOrderByEnum[];
-}
-
-@ArgsType()
-export class DataObjectCreateManyArgs {
-  @TypeGraphQLField(() => [DataObjectCreateInput])
-  data!: DataObjectCreateInput[];
-}
-
-@ArgsType()
-export class DataObjectUpdateArgs {
-  @TypeGraphQLField() data!: DataObjectUpdateInput;
-  @TypeGraphQLField() where!: DataObjectWhereUniqueInput;
-}
-
-export enum ChannelOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  ownerMember_ASC = "ownerMember_ASC",
-  ownerMember_DESC = "ownerMember_DESC",
-
-  ownerMemberId_ASC = "ownerMemberId_ASC",
-  ownerMemberId_DESC = "ownerMemberId_DESC",
-
-  ownerCuratorGroup_ASC = "ownerCuratorGroup_ASC",
-  ownerCuratorGroup_DESC = "ownerCuratorGroup_DESC",
-
-  ownerCuratorGroupId_ASC = "ownerCuratorGroupId_ASC",
-  ownerCuratorGroupId_DESC = "ownerCuratorGroupId_DESC",
-
-  category_ASC = "category_ASC",
-  category_DESC = "category_DESC",
-
-  categoryId_ASC = "categoryId_ASC",
-  categoryId_DESC = "categoryId_DESC",
-
-  rewardAccount_ASC = "rewardAccount_ASC",
-  rewardAccount_DESC = "rewardAccount_DESC",
-
-  title_ASC = "title_ASC",
-  title_DESC = "title_DESC",
-
-  description_ASC = "description_ASC",
-  description_DESC = "description_DESC",
-
-  coverPhotoDataObject_ASC = "coverPhotoDataObject_ASC",
-  coverPhotoDataObject_DESC = "coverPhotoDataObject_DESC",
-
-  coverPhotoDataObjectId_ASC = "coverPhotoDataObjectId_ASC",
-  coverPhotoDataObjectId_DESC = "coverPhotoDataObjectId_DESC",
-
-  coverPhotoAvailability_ASC = "coverPhotoAvailability_ASC",
-  coverPhotoAvailability_DESC = "coverPhotoAvailability_DESC",
-
-  avatarPhotoDataObject_ASC = "avatarPhotoDataObject_ASC",
-  avatarPhotoDataObject_DESC = "avatarPhotoDataObject_DESC",
-
-  avatarPhotoDataObjectId_ASC = "avatarPhotoDataObjectId_ASC",
-  avatarPhotoDataObjectId_DESC = "avatarPhotoDataObjectId_DESC",
-
-  avatarPhotoAvailability_ASC = "avatarPhotoAvailability_ASC",
-  avatarPhotoAvailability_DESC = "avatarPhotoAvailability_DESC",
-
-  isPublic_ASC = "isPublic_ASC",
-  isPublic_DESC = "isPublic_DESC",
-
-  isCensored_ASC = "isCensored_ASC",
-  isCensored_DESC = "isCensored_DESC",
-
-  language_ASC = "language_ASC",
-  language_DESC = "language_DESC",
-
-  languageId_ASC = "languageId_ASC",
-  languageId_DESC = "languageId_DESC",
-
-  createdInBlock_ASC = "createdInBlock_ASC",
-  createdInBlock_DESC = "createdInBlock_DESC"
-}
-
-registerEnumType(ChannelOrderByEnum, {
-  name: "ChannelOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class ChannelWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  ownerMemberId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  ownerMemberId_in?: string[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  ownerCuratorGroupId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  ownerCuratorGroupId_in?: string[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  categoryId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  categoryId_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  rewardAccount_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rewardAccount_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rewardAccount_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rewardAccount_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  rewardAccount_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  title_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  title_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  title_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  title_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  title_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  description_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  description_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  description_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  description_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  description_in?: string[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  coverPhotoDataObjectId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  coverPhotoDataObjectId_in?: string[];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  coverPhotoUrls_containsAll?: [string];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  coverPhotoUrls_containsNone?: [string];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  coverPhotoUrls_containsAny?: [string];
-
-  @TypeGraphQLField(() => AssetAvailability, { nullable: true })
-  coverPhotoAvailability_eq?: AssetAvailability;
-
-  @TypeGraphQLField(() => [AssetAvailability], { nullable: true })
-  coverPhotoAvailability_in?: AssetAvailability[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  avatarPhotoDataObjectId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  avatarPhotoDataObjectId_in?: string[];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  avatarPhotoUrls_containsAll?: [string];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  avatarPhotoUrls_containsNone?: [string];
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  avatarPhotoUrls_containsAny?: [string];
-
-  @TypeGraphQLField(() => AssetAvailability, { nullable: true })
-  avatarPhotoAvailability_eq?: AssetAvailability;
-
-  @TypeGraphQLField(() => [AssetAvailability], { nullable: true })
-  avatarPhotoAvailability_in?: AssetAvailability[];
-
-  @TypeGraphQLField(() => Boolean, { nullable: true })
-  isPublic_eq?: Boolean;
-
-  @TypeGraphQLField(() => [Boolean], { nullable: true })
-  isPublic_in?: Boolean[];
-
-  @TypeGraphQLField(() => Boolean, { nullable: true })
-  isCensored_eq?: Boolean;
-
-  @TypeGraphQLField(() => [Boolean], { nullable: true })
-  isCensored_in?: Boolean[];
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  languageId_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  languageId_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  createdInBlock_in?: number[];
-
-  @TypeGraphQLField(() => MembershipWhereInput, { nullable: true })
-  ownerMember?: MembershipWhereInput;
-
-  @TypeGraphQLField(() => CuratorGroupWhereInput, { nullable: true })
-  ownerCuratorGroup?: CuratorGroupWhereInput;
-
-  @TypeGraphQLField(() => ChannelCategoryWhereInput, { nullable: true })
-  category?: ChannelCategoryWhereInput;
-
-  @TypeGraphQLField(() => DataObjectWhereInput, { nullable: true })
-  coverPhotoDataObject?: DataObjectWhereInput;
-
-  @TypeGraphQLField(() => DataObjectWhereInput, { nullable: true })
-  avatarPhotoDataObject?: DataObjectWhereInput;
-
-  @TypeGraphQLField(() => LanguageWhereInput, { nullable: true })
-  language?: LanguageWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videos_none?: VideoWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videos_some?: VideoWhereInput;
-
-  @TypeGraphQLField(() => VideoWhereInput, { nullable: true })
-  videos_every?: VideoWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  AND?: [ChannelWhereInput];
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  OR?: [ChannelWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class ChannelWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class ChannelCreateInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  ownerMember?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  ownerMemberId?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  ownerCuratorGroup?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  ownerCuratorGroupId?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  category?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  categoryId?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rewardAccount?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  title?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  description?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  coverPhotoDataObject?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  coverPhotoDataObjectId?: string;
-
-  @TypeGraphQLField(() => [String])
-  coverPhotoUrls!: string[];
-
-  @TypeGraphQLField(() => AssetAvailability)
-  coverPhotoAvailability!: AssetAvailability;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  avatarPhotoDataObject?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  avatarPhotoDataObjectId?: string;
-
-  @TypeGraphQLField(() => [String])
-  avatarPhotoUrls!: string[];
-
-  @TypeGraphQLField(() => AssetAvailability)
-  avatarPhotoAvailability!: AssetAvailability;
-
-  @TypeGraphQLField({ nullable: true })
-  isPublic?: boolean;
-
-  @TypeGraphQLField()
-  isCensored!: boolean;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  language?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  languageId?: string;
-
-  @TypeGraphQLField()
-  createdInBlock!: number;
-}
-
-@TypeGraphQLInputType()
-export class ChannelUpdateInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  ownerMember?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  ownerMemberId?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  ownerCuratorGroup?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  ownerCuratorGroupId?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  category?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  categoryId?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rewardAccount?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  title?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  description?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  coverPhotoDataObject?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  coverPhotoDataObjectId?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  coverPhotoUrls?: string[];
-
-  @TypeGraphQLField(() => AssetAvailability, { nullable: true })
-  coverPhotoAvailability?: AssetAvailability;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  avatarPhotoDataObject?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  avatarPhotoDataObjectId?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  avatarPhotoUrls?: string[];
-
-  @TypeGraphQLField(() => AssetAvailability, { nullable: true })
-  avatarPhotoAvailability?: AssetAvailability;
-
-  @TypeGraphQLField({ nullable: true })
-  isPublic?: boolean;
-
-  @TypeGraphQLField({ nullable: true })
-  isCensored?: boolean;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  language?: string;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  languageId?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  createdInBlock?: number;
-}
-
-@ArgsType()
-export class ChannelWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  where?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelOrderByEnum, { nullable: true })
-  orderBy?: ChannelOrderByEnum[];
-}
-
-@ArgsType()
-export class ChannelCreateManyArgs {
-  @TypeGraphQLField(() => [ChannelCreateInput])
-  data!: ChannelCreateInput[];
-}
-
-@ArgsType()
-export class ChannelUpdateArgs {
-  @TypeGraphQLField() data!: ChannelUpdateInput;
-  @TypeGraphQLField() where!: ChannelWhereUniqueInput;
-}
-
-export enum MembershipOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  handle_ASC = "handle_ASC",
-  handle_DESC = "handle_DESC",
-
-  avatarUri_ASC = "avatarUri_ASC",
-  avatarUri_DESC = "avatarUri_DESC",
-
-  about_ASC = "about_ASC",
-  about_DESC = "about_DESC",
-
-  controllerAccount_ASC = "controllerAccount_ASC",
-  controllerAccount_DESC = "controllerAccount_DESC",
-
-  rootAccount_ASC = "rootAccount_ASC",
-  rootAccount_DESC = "rootAccount_DESC",
-
-  createdInBlock_ASC = "createdInBlock_ASC",
-  createdInBlock_DESC = "createdInBlock_DESC",
-
-  entry_ASC = "entry_ASC",
-  entry_DESC = "entry_DESC",
-
-  subscription_ASC = "subscription_ASC",
-  subscription_DESC = "subscription_DESC"
-}
-
-registerEnumType(MembershipOrderByEnum, {
-  name: "MembershipOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class MembershipWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  handle_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  handle_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  handle_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  handle_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  handle_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  avatarUri_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  avatarUri_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  avatarUri_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  avatarUri_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  avatarUri_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  about_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  about_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  about_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  about_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  about_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  controllerAccount_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  controllerAccount_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  controllerAccount_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  controllerAccount_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  controllerAccount_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  rootAccount_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rootAccount_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rootAccount_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rootAccount_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  rootAccount_in?: string[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  createdInBlock_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  createdInBlock_in?: number[];
-
-  @TypeGraphQLField(() => MembershipEntryMethod, { nullable: true })
-  entry_eq?: MembershipEntryMethod;
-
-  @TypeGraphQLField(() => [MembershipEntryMethod], { nullable: true })
-  entry_in?: MembershipEntryMethod[];
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  subscription_eq?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  subscription_gt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  subscription_gte?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  subscription_lt?: number;
-
-  @TypeGraphQLField(() => Int, { nullable: true })
-  subscription_lte?: number;
-
-  @TypeGraphQLField(() => [Int], { nullable: true })
-  subscription_in?: number[];
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channels_none?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channels_some?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => ChannelWhereInput, { nullable: true })
-  channels_every?: ChannelWhereInput;
-
-  @TypeGraphQLField(() => MembershipWhereInput, { nullable: true })
-  AND?: [MembershipWhereInput];
-
-  @TypeGraphQLField(() => MembershipWhereInput, { nullable: true })
-  OR?: [MembershipWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class MembershipWhereUniqueInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id?: string;
-
-  @TypeGraphQLField(() => String, { nullable: true })
-  handle?: string;
-}
-
-@TypeGraphQLInputType()
-export class MembershipCreateInput {
-  @TypeGraphQLField()
-  handle!: string;
-
-  @TypeGraphQLField({ nullable: true })
-  avatarUri?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  about?: string;
-
-  @TypeGraphQLField()
-  controllerAccount!: string;
-
-  @TypeGraphQLField()
-  rootAccount!: string;
-
-  @TypeGraphQLField()
-  createdInBlock!: number;
-
-  @TypeGraphQLField(() => MembershipEntryMethod)
-  entry!: MembershipEntryMethod;
-
-  @TypeGraphQLField({ nullable: true })
-  subscription?: number;
-}
-
-@TypeGraphQLInputType()
-export class MembershipUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  handle?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  avatarUri?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  about?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  controllerAccount?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rootAccount?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  createdInBlock?: number;
-
-  @TypeGraphQLField(() => MembershipEntryMethod, { nullable: true })
-  entry?: MembershipEntryMethod;
-
-  @TypeGraphQLField({ nullable: true })
-  subscription?: number;
-}
-
-@ArgsType()
-export class MembershipWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => MembershipWhereInput, { nullable: true })
-  where?: MembershipWhereInput;
-
-  @TypeGraphQLField(() => MembershipOrderByEnum, { nullable: true })
-  orderBy?: MembershipOrderByEnum[];
-}
-
-@ArgsType()
-export class MembershipCreateManyArgs {
-  @TypeGraphQLField(() => [MembershipCreateInput])
-  data!: MembershipCreateInput[];
-}
-
-@ArgsType()
-export class MembershipUpdateArgs {
-  @TypeGraphQLField() data!: MembershipUpdateInput;
-  @TypeGraphQLField() where!: MembershipWhereUniqueInput;
-}
-
-export enum NextEntityIdOrderByEnum {
-  createdAt_ASC = "createdAt_ASC",
-  createdAt_DESC = "createdAt_DESC",
-
-  updatedAt_ASC = "updatedAt_ASC",
-  updatedAt_DESC = "updatedAt_DESC",
-
-  deletedAt_ASC = "deletedAt_ASC",
-  deletedAt_DESC = "deletedAt_DESC",
-
-  nextId_ASC = "nextId_ASC",
-  nextId_DESC = "nextId_DESC"
-}
-
-registerEnumType(NextEntityIdOrderByEnum, {
-  name: "NextEntityIdOrderByInput"
-});
-
-@TypeGraphQLInputType()
-export class NextEntityIdWhereInput {
-  @TypeGraphQLField(() => ID, { nullable: true })
-  id_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  id_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  createdAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  createdById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  createdById_in?: string[];
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  updatedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  updatedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  updatedById_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  deletedAt_all?: Boolean;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_eq?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_lte?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gt?: Date;
-
-  @TypeGraphQLField(() => DateTime, { nullable: true })
-  deletedAt_gte?: Date;
-
-  @TypeGraphQLField(() => ID, { nullable: true })
-  deletedById_eq?: string;
-
-  @TypeGraphQLField(() => [ID], { nullable: true })
-  deletedById_in?: string[];
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  nextId_eq?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  nextId_gt?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  nextId_gte?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  nextId_lt?: number;
-
-  @TypeGraphQLField(() => Float, { nullable: true })
-  nextId_lte?: number;
-
-  @TypeGraphQLField(() => [Float], { nullable: true })
-  nextId_in?: number[];
-
-  @TypeGraphQLField(() => NextEntityIdWhereInput, { nullable: true })
-  AND?: [NextEntityIdWhereInput];
-
-  @TypeGraphQLField(() => NextEntityIdWhereInput, { nullable: true })
-  OR?: [NextEntityIdWhereInput];
-}
-
-@TypeGraphQLInputType()
-export class NextEntityIdWhereUniqueInput {
-  @TypeGraphQLField(() => ID)
-  id?: string;
-}
-
-@TypeGraphQLInputType()
-export class NextEntityIdCreateInput {
-  @TypeGraphQLField()
-  nextId!: number;
-}
-
-@TypeGraphQLInputType()
-export class NextEntityIdUpdateInput {
-  @TypeGraphQLField({ nullable: true })
-  nextId?: number;
-}
-
-@ArgsType()
-export class NextEntityIdWhereArgs extends PaginationArgs {
-  @TypeGraphQLField(() => NextEntityIdWhereInput, { nullable: true })
-  where?: NextEntityIdWhereInput;
-
-  @TypeGraphQLField(() => NextEntityIdOrderByEnum, { nullable: true })
-  orderBy?: NextEntityIdOrderByEnum[];
-}
-
-@ArgsType()
-export class NextEntityIdCreateManyArgs {
-  @TypeGraphQLField(() => [NextEntityIdCreateInput])
-  data!: NextEntityIdCreateInput[];
-}
-
-@ArgsType()
-export class NextEntityIdUpdateArgs {
-  @TypeGraphQLField() data!: NextEntityIdUpdateInput;
-  @TypeGraphQLField() where!: NextEntityIdWhereUniqueInput;
-}

+ 0 - 1
query-node/generated/graphql-server/generated/index.ts

@@ -1 +0,0 @@
-export * from './classes';

+ 0 - 3
query-node/generated/graphql-server/generated/ormconfig.ts

@@ -1,3 +0,0 @@
-import { getBaseConfig } from 'warthog';
-
-module.exports = getBaseConfig();

+ 0 - 2324
query-node/generated/graphql-server/generated/schema.graphql

@@ -1,2324 +0,0 @@
-enum AssetAvailability {
-  ACCEPTED
-  PENDING
-  INVALID
-}
-
-interface BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-}
-
-type BaseModel implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-}
-
-type BaseModelUUID implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-}
-
-input BaseWhereInput {
-  id_eq: String
-  id_in: [String!]
-  createdAt_eq: String
-  createdAt_lt: String
-  createdAt_lte: String
-  createdAt_gt: String
-  createdAt_gte: String
-  createdById_eq: String
-  updatedAt_eq: String
-  updatedAt_lt: String
-  updatedAt_lte: String
-  updatedAt_gt: String
-  updatedAt_gte: String
-  updatedById_eq: String
-  deletedAt_all: Boolean
-  deletedAt_eq: String
-  deletedAt_lt: String
-  deletedAt_lte: String
-  deletedAt_gt: String
-  deletedAt_gte: String
-  deletedById_eq: String
-}
-
-type CuratorGroup implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """Curators belonging to this group"""
-  curatorIds: [Int!]!
-
-  """Is group active or not"""
-  isActive: Boolean!
-  channels: [Channel!]!
-}
-
-type CuratorGroupConnection {
-  totalCount: Int!
-  edges: [CuratorGroupEdge!]!
-  pageInfo: PageInfo!
-}
-
-input CuratorGroupCreateInput {
-  curatorIds: [Int!]!
-  isActive: Boolean!
-}
-
-type CuratorGroupEdge {
-  node: CuratorGroup!
-  cursor: String!
-}
-
-enum CuratorGroupOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  isActive_ASC
-  isActive_DESC
-}
-
-input CuratorGroupUpdateInput {
-  curatorIds: [Int!]
-  isActive: Boolean
-}
-
-input CuratorGroupWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  curatorIds_containsAll: [Int!]
-  curatorIds_containsNone: [Int!]
-  curatorIds_containsAny: [Int!]
-  isActive_eq: Boolean
-  isActive_in: [Boolean!]
-  channels_none: ChannelWhereInput
-  channels_some: ChannelWhereInput
-  channels_every: ChannelWhereInput
-  AND: [CuratorGroupWhereInput!]
-  OR: [CuratorGroupWhereInput!]
-}
-
-input CuratorGroupWhereUniqueInput {
-  id: ID!
-}
-
-"""Manages content ids, type and storage provider decision about it"""
-type DataObject implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """Content owner"""
-  owner: DataObjectOwner!
-
-  """Content added at"""
-  createdInBlock: Int!
-
-  """Content type id"""
-  typeId: Int!
-
-  """Content size in bytes"""
-  size: Float!
-  liaison: Worker
-  liaisonId: String
-
-  """Storage provider as liaison judgment"""
-  liaisonJudgement: LiaisonJudgement!
-
-  """IPFS content id"""
-  ipfsContentId: String!
-
-  """Joystream runtime content"""
-  joystreamContentId: String!
-  channelcoverPhotoDataObject: [Channel!]
-  channelavatarPhotoDataObject: [Channel!]
-  videothumbnailPhotoDataObject: [Video!]
-  videomediaDataObject: [Video!]
-}
-
-type DataObjectConnection {
-  totalCount: Int!
-  edges: [DataObjectEdge!]!
-  pageInfo: PageInfo!
-}
-
-input DataObjectCreateInput {
-  owner: JSONObject!
-  createdInBlock: Float!
-  typeId: Float!
-  size: Float!
-  liaison: ID
-  liaisonId: ID
-  liaisonJudgement: LiaisonJudgement!
-  ipfsContentId: String!
-  joystreamContentId: String!
-}
-
-type DataObjectEdge {
-  node: DataObject!
-  cursor: String!
-}
-
-enum DataObjectOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  createdInBlock_ASC
-  createdInBlock_DESC
-  typeId_ASC
-  typeId_DESC
-  size_ASC
-  size_DESC
-  liaison_ASC
-  liaison_DESC
-  liaisonId_ASC
-  liaisonId_DESC
-  liaisonJudgement_ASC
-  liaisonJudgement_DESC
-  ipfsContentId_ASC
-  ipfsContentId_DESC
-  joystreamContentId_ASC
-  joystreamContentId_DESC
-}
-
-union DataObjectOwner = DataObjectOwnerMember | DataObjectOwnerChannel | DataObjectOwnerDao | DataObjectOwnerCouncil | DataObjectOwnerWorkingGroup
-
-type DataObjectOwnerCouncil {
-  """Variant needs to have at least one property. This value is not used."""
-  dummy: Int
-}
-
-input DataObjectOwnerCouncilCreateInput {
-  dummy: Float
-}
-
-input DataObjectOwnerCouncilUpdateInput {
-  dummy: Float
-}
-
-input DataObjectOwnerCouncilWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  dummy_eq: Int
-  dummy_gt: Int
-  dummy_gte: Int
-  dummy_lt: Int
-  dummy_lte: Int
-  dummy_in: [Int!]
-  AND: [DataObjectOwnerCouncilWhereInput!]
-  OR: [DataObjectOwnerCouncilWhereInput!]
-}
-
-input DataObjectOwnerCouncilWhereUniqueInput {
-  id: ID!
-}
-
-type DataObjectOwnerDao {
-  """DAO identifier"""
-  dao: Int!
-}
-
-input DataObjectOwnerDaoCreateInput {
-  dao: Float!
-}
-
-input DataObjectOwnerDaoUpdateInput {
-  dao: Float
-}
-
-input DataObjectOwnerDaoWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  dao_eq: Int
-  dao_gt: Int
-  dao_gte: Int
-  dao_lt: Int
-  dao_lte: Int
-  dao_in: [Int!]
-  AND: [DataObjectOwnerDaoWhereInput!]
-  OR: [DataObjectOwnerDaoWhereInput!]
-}
-
-input DataObjectOwnerDaoWhereUniqueInput {
-  id: ID!
-}
-
-type DataObjectOwnerChannel {
-  """Channel identifier"""
-  channel: Int!
-
-  """Variant needs to have at least one property. This value is not used."""
-  dummy: Int
-}
-
-input DataObjectOwnerChannelCreateInput {
-  channel: Float!
-  dummy: Float
-}
-
-input DataObjectOwnerChannelUpdateInput {
-  channel: Float
-  dummy: Float
-}
-
-input DataObjectOwnerChannelWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  channel_eq: Int
-  channel_gt: Int
-  channel_gte: Int
-  channel_lt: Int
-  channel_lte: Int
-  channel_in: [Int!]
-  dummy_eq: Int
-  dummy_gt: Int
-  dummy_gte: Int
-  dummy_lt: Int
-  dummy_lte: Int
-  dummy_in: [Int!]
-  AND: [DataObjectOwnerChannelWhereInput!]
-  OR: [DataObjectOwnerChannelWhereInput!]
-}
-
-input DataObjectOwnerChannelWhereUniqueInput {
-  id: ID!
-}
-
-type DataObjectOwnerMember {
-  """Member identifier"""
-  member: Int!
-
-  """Variant needs to have at least one property. This value is not used."""
-  dummy: Int
-}
-
-input DataObjectOwnerMemberCreateInput {
-  member: Float!
-  dummy: Float
-}
-
-input DataObjectOwnerMemberUpdateInput {
-  member: Float
-  dummy: Float
-}
-
-input DataObjectOwnerMemberWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  member_eq: Int
-  member_gt: Int
-  member_gte: Int
-  member_lt: Int
-  member_lte: Int
-  member_in: [Int!]
-  dummy_eq: Int
-  dummy_gt: Int
-  dummy_gte: Int
-  dummy_lt: Int
-  dummy_lte: Int
-  dummy_in: [Int!]
-  AND: [DataObjectOwnerMemberWhereInput!]
-  OR: [DataObjectOwnerMemberWhereInput!]
-}
-
-input DataObjectOwnerMemberWhereUniqueInput {
-  id: ID!
-}
-
-type DataObjectOwnerWorkingGroup {
-  """Working group identifier"""
-  workingGroup: Int!
-}
-
-input DataObjectOwnerWorkingGroupCreateInput {
-  workingGroup: Float!
-}
-
-input DataObjectOwnerWorkingGroupUpdateInput {
-  workingGroup: Float
-}
-
-input DataObjectOwnerWorkingGroupWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  workingGroup_eq: Int
-  workingGroup_gt: Int
-  workingGroup_gte: Int
-  workingGroup_lt: Int
-  workingGroup_lte: Int
-  workingGroup_in: [Int!]
-  AND: [DataObjectOwnerWorkingGroupWhereInput!]
-  OR: [DataObjectOwnerWorkingGroupWhereInput!]
-}
-
-input DataObjectOwnerWorkingGroupWhereUniqueInput {
-  id: ID!
-}
-
-input DataObjectUpdateInput {
-  owner: JSONObject
-  createdInBlock: Float
-  typeId: Float
-  size: Float
-  liaison: ID
-  liaisonId: ID
-  liaisonJudgement: LiaisonJudgement
-  ipfsContentId: String
-  joystreamContentId: String
-}
-
-input DataObjectWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  owner_json: JSONObject
-  createdInBlock_eq: Int
-  createdInBlock_gt: Int
-  createdInBlock_gte: Int
-  createdInBlock_lt: Int
-  createdInBlock_lte: Int
-  createdInBlock_in: [Int!]
-  typeId_eq: Int
-  typeId_gt: Int
-  typeId_gte: Int
-  typeId_lt: Int
-  typeId_lte: Int
-  typeId_in: [Int!]
-  size_eq: Float
-  size_gt: Float
-  size_gte: Float
-  size_lt: Float
-  size_lte: Float
-  size_in: [Float!]
-  liaisonId_eq: ID
-  liaisonId_in: [ID!]
-  liaisonJudgement_eq: LiaisonJudgement
-  liaisonJudgement_in: [LiaisonJudgement!]
-  ipfsContentId_eq: String
-  ipfsContentId_contains: String
-  ipfsContentId_startsWith: String
-  ipfsContentId_endsWith: String
-  ipfsContentId_in: [String!]
-  joystreamContentId_eq: String
-  joystreamContentId_contains: String
-  joystreamContentId_startsWith: String
-  joystreamContentId_endsWith: String
-  joystreamContentId_in: [String!]
-  liaison: WorkerWhereInput
-  channelcoverPhotoDataObject_none: ChannelWhereInput
-  channelcoverPhotoDataObject_some: ChannelWhereInput
-  channelcoverPhotoDataObject_every: ChannelWhereInput
-  channelavatarPhotoDataObject_none: ChannelWhereInput
-  channelavatarPhotoDataObject_some: ChannelWhereInput
-  channelavatarPhotoDataObject_every: ChannelWhereInput
-  videothumbnailPhotoDataObject_none: VideoMediaMetadataWhereInput
-  videothumbnailPhotoDataObject_some: VideoMediaMetadataWhereInput
-  videothumbnailPhotoDataObject_every: VideoMediaMetadataWhereInput
-  videomediaDataObject_none: VideoMediaMetadataWhereInput
-  videomediaDataObject_some: VideoMediaMetadataWhereInput
-  videomediaDataObject_every: VideoMediaMetadataWhereInput
-  AND: [DataObjectWhereInput!]
-  OR: [DataObjectWhereInput!]
-}
-
-input DataObjectWhereUniqueInput {
-  id: ID!
-}
-
-"""
-The javascript `Date` as string. Type represents date and time as the ISO Date string.
-"""
-scalar DateTime
-
-interface DeleteResponse {
-  id: ID!
-}
-
-type Channel implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-  ownerMember: Membership
-  ownerMemberId: String
-  ownerCuratorGroup: CuratorGroup
-  ownerCuratorGroupId: String
-  category: ChannelCategory
-  categoryId: String
-
-  """Reward account where revenue is sent if set."""
-  rewardAccount: String
-
-  """The title of the Channel"""
-  title: String
-
-  """The description of a Channel"""
-  description: String
-  coverPhotoDataObject: DataObject
-  coverPhotoDataObjectId: String
-
-  """URLs where the asset content can be accessed (if any)"""
-  coverPhotoUrls: [String!]!
-
-  """Availability meta information"""
-  coverPhotoAvailability: AssetAvailability!
-  avatarPhotoDataObject: DataObject
-  avatarPhotoDataObjectId: String
-
-  """URLs where the asset content can be accessed (if any)"""
-  avatarPhotoUrls: [String!]!
-
-  """Availability meta information"""
-  avatarPhotoAvailability: AssetAvailability!
-
-  """Flag signaling whether a channel is public."""
-  isPublic: Boolean
-
-  """Flag signaling whether a channel is censored."""
-  isCensored: Boolean!
-  language: Language
-  languageId: String
-  videos: [Video!]!
-  createdInBlock: Int!
-}
-
-type ChannelCategoriesByNameFTSOutput {
-  item: ChannelCategoriesByNameSearchResult!
-  rank: Float!
-  isTypeOf: String!
-  highlight: String!
-}
-
-union ChannelCategoriesByNameSearchResult = ChannelCategory
-
-"""Category of media channel"""
-type ChannelCategory implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """The name of the category"""
-  name: String
-  channels: [Channel!]!
-  createdInBlock: Int!
-}
-
-type ChannelCategoryConnection {
-  totalCount: Int!
-  edges: [ChannelCategoryEdge!]!
-  pageInfo: PageInfo!
-}
-
-input ChannelCategoryCreateInput {
-  name: String
-  createdInBlock: Float!
-}
-
-type ChannelCategoryEdge {
-  node: ChannelCategory!
-  cursor: String!
-}
-
-enum ChannelCategoryOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  name_ASC
-  name_DESC
-  createdInBlock_ASC
-  createdInBlock_DESC
-}
-
-input ChannelCategoryUpdateInput {
-  name: String
-  createdInBlock: Float
-}
-
-input ChannelCategoryWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  name_eq: String
-  name_contains: String
-  name_startsWith: String
-  name_endsWith: String
-  name_in: [String!]
-  createdInBlock_eq: Int
-  createdInBlock_gt: Int
-  createdInBlock_gte: Int
-  createdInBlock_lt: Int
-  createdInBlock_lte: Int
-  createdInBlock_in: [Int!]
-  channels_none: ChannelWhereInput
-  channels_some: ChannelWhereInput
-  channels_every: ChannelWhereInput
-  AND: [ChannelCategoryWhereInput!]
-  OR: [ChannelCategoryWhereInput!]
-}
-
-input ChannelCategoryWhereUniqueInput {
-  id: ID!
-}
-
-type ChannelConnection {
-  totalCount: Int!
-  edges: [ChannelEdge!]!
-  pageInfo: PageInfo!
-}
-
-input ChannelCreateInput {
-  ownerMember: ID
-  ownerMemberId: ID
-  ownerCuratorGroup: ID
-  ownerCuratorGroupId: ID
-  category: ID
-  categoryId: ID
-  rewardAccount: String
-  title: String
-  description: String
-  coverPhotoDataObject: ID
-  coverPhotoDataObjectId: ID
-  coverPhotoUrls: [String!]!
-  coverPhotoAvailability: AssetAvailability!
-  avatarPhotoDataObject: ID
-  avatarPhotoDataObjectId: ID
-  avatarPhotoUrls: [String!]!
-  avatarPhotoAvailability: AssetAvailability!
-  isPublic: Boolean
-  isCensored: Boolean!
-  language: ID
-  languageId: ID
-  createdInBlock: Float!
-}
-
-type ChannelEdge {
-  node: Channel!
-  cursor: String!
-}
-
-enum ChannelOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  ownerMember_ASC
-  ownerMember_DESC
-  ownerMemberId_ASC
-  ownerMemberId_DESC
-  ownerCuratorGroup_ASC
-  ownerCuratorGroup_DESC
-  ownerCuratorGroupId_ASC
-  ownerCuratorGroupId_DESC
-  category_ASC
-  category_DESC
-  categoryId_ASC
-  categoryId_DESC
-  rewardAccount_ASC
-  rewardAccount_DESC
-  title_ASC
-  title_DESC
-  description_ASC
-  description_DESC
-  coverPhotoDataObject_ASC
-  coverPhotoDataObject_DESC
-  coverPhotoDataObjectId_ASC
-  coverPhotoDataObjectId_DESC
-  coverPhotoAvailability_ASC
-  coverPhotoAvailability_DESC
-  avatarPhotoDataObject_ASC
-  avatarPhotoDataObject_DESC
-  avatarPhotoDataObjectId_ASC
-  avatarPhotoDataObjectId_DESC
-  avatarPhotoAvailability_ASC
-  avatarPhotoAvailability_DESC
-  isPublic_ASC
-  isPublic_DESC
-  isCensored_ASC
-  isCensored_DESC
-  language_ASC
-  language_DESC
-  languageId_ASC
-  languageId_DESC
-  createdInBlock_ASC
-  createdInBlock_DESC
-}
-
-input ChannelUpdateInput {
-  ownerMember: ID
-  ownerMemberId: ID
-  ownerCuratorGroup: ID
-  ownerCuratorGroupId: ID
-  category: ID
-  categoryId: ID
-  rewardAccount: String
-  title: String
-  description: String
-  coverPhotoDataObject: ID
-  coverPhotoDataObjectId: ID
-  coverPhotoUrls: [String!]
-  coverPhotoAvailability: AssetAvailability
-  avatarPhotoDataObject: ID
-  avatarPhotoDataObjectId: ID
-  avatarPhotoUrls: [String!]
-  avatarPhotoAvailability: AssetAvailability
-  isPublic: Boolean
-  isCensored: Boolean
-  language: ID
-  languageId: ID
-  createdInBlock: Float
-}
-
-input ChannelWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  ownerMemberId_eq: ID
-  ownerMemberId_in: [ID!]
-  ownerCuratorGroupId_eq: ID
-  ownerCuratorGroupId_in: [ID!]
-  categoryId_eq: ID
-  categoryId_in: [ID!]
-  rewardAccount_eq: String
-  rewardAccount_contains: String
-  rewardAccount_startsWith: String
-  rewardAccount_endsWith: String
-  rewardAccount_in: [String!]
-  title_eq: String
-  title_contains: String
-  title_startsWith: String
-  title_endsWith: String
-  title_in: [String!]
-  description_eq: String
-  description_contains: String
-  description_startsWith: String
-  description_endsWith: String
-  description_in: [String!]
-  coverPhotoDataObjectId_eq: ID
-  coverPhotoDataObjectId_in: [ID!]
-  coverPhotoUrls_containsAll: [String!]
-  coverPhotoUrls_containsNone: [String!]
-  coverPhotoUrls_containsAny: [String!]
-  coverPhotoAvailability_eq: AssetAvailability
-  coverPhotoAvailability_in: [AssetAvailability!]
-  avatarPhotoDataObjectId_eq: ID
-  avatarPhotoDataObjectId_in: [ID!]
-  avatarPhotoUrls_containsAll: [String!]
-  avatarPhotoUrls_containsNone: [String!]
-  avatarPhotoUrls_containsAny: [String!]
-  avatarPhotoAvailability_eq: AssetAvailability
-  avatarPhotoAvailability_in: [AssetAvailability!]
-  isPublic_eq: Boolean
-  isPublic_in: [Boolean!]
-  isCensored_eq: Boolean
-  isCensored_in: [Boolean!]
-  languageId_eq: ID
-  languageId_in: [ID!]
-  createdInBlock_eq: Int
-  createdInBlock_gt: Int
-  createdInBlock_gte: Int
-  createdInBlock_lt: Int
-  createdInBlock_lte: Int
-  createdInBlock_in: [Int!]
-  ownerMember: MembershipWhereInput
-  ownerCuratorGroup: CuratorGroupWhereInput
-  category: ChannelCategoryWhereInput
-  coverPhotoDataObject: DataObjectWhereInput
-  avatarPhotoDataObject: DataObjectWhereInput
-  language: LanguageWhereInput
-  videos_none: VideoWhereInput
-  videos_some: VideoWhereInput
-  videos_every: VideoWhereInput
-  AND: [ChannelWhereInput!]
-  OR: [ChannelWhereInput!]
-}
-
-input ChannelWhereUniqueInput {
-  id: ID!
-}
-
-"""
-The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
-"""
-scalar JSONObject
-
-type Language implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """Language identifier ISO 639-1"""
-  iso: String!
-  createdInBlock: Int!
-  channellanguage: [Channel!]
-  videolanguage: [Video!]
-}
-
-type LanguageConnection {
-  totalCount: Int!
-  edges: [LanguageEdge!]!
-  pageInfo: PageInfo!
-}
-
-input LanguageCreateInput {
-  iso: String!
-  createdInBlock: Float!
-}
-
-type LanguageEdge {
-  node: Language!
-  cursor: String!
-}
-
-enum LanguageOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  iso_ASC
-  iso_DESC
-  createdInBlock_ASC
-  createdInBlock_DESC
-}
-
-input LanguageUpdateInput {
-  iso: String
-  createdInBlock: Float
-}
-
-input LanguageWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  iso_eq: String
-  iso_contains: String
-  iso_startsWith: String
-  iso_endsWith: String
-  iso_in: [String!]
-  createdInBlock_eq: Int
-  createdInBlock_gt: Int
-  createdInBlock_gte: Int
-  createdInBlock_lt: Int
-  createdInBlock_lte: Int
-  createdInBlock_in: [Int!]
-  channellanguage_none: ChannelWhereInput
-  channellanguage_some: ChannelWhereInput
-  channellanguage_every: ChannelWhereInput
-  videolanguage_none: VideoWhereInput
-  videolanguage_some: VideoWhereInput
-  videolanguage_every: VideoWhereInput
-  AND: [LanguageWhereInput!]
-  OR: [LanguageWhereInput!]
-}
-
-input LanguageWhereUniqueInput {
-  id: ID!
-}
-
-enum LiaisonJudgement {
-  PENDING
-  ACCEPTED
-}
-
-type License implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """License code defined by Joystream"""
-  code: Int
-
-  """Attribution (if required by the license)"""
-  attribution: String
-
-  """Custom license content"""
-  customText: String
-  videolicense: [Video!]
-}
-
-type LicenseConnection {
-  totalCount: Int!
-  edges: [LicenseEdge!]!
-  pageInfo: PageInfo!
-}
-
-input LicenseCreateInput {
-  code: Float
-  attribution: String
-  customText: String
-}
-
-type LicenseEdge {
-  node: License!
-  cursor: String!
-}
-
-enum LicenseOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  code_ASC
-  code_DESC
-  attribution_ASC
-  attribution_DESC
-  customText_ASC
-  customText_DESC
-}
-
-input LicenseUpdateInput {
-  code: Float
-  attribution: String
-  customText: String
-}
-
-input LicenseWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  code_eq: Int
-  code_gt: Int
-  code_gte: Int
-  code_lt: Int
-  code_lte: Int
-  code_in: [Int!]
-  attribution_eq: String
-  attribution_contains: String
-  attribution_startsWith: String
-  attribution_endsWith: String
-  attribution_in: [String!]
-  customText_eq: String
-  customText_contains: String
-  customText_startsWith: String
-  customText_endsWith: String
-  customText_in: [String!]
-  videolanguage_none: VideoWhereInput
-  videolanguage_some: VideoWhereInput
-  videolanguage_every: VideoWhereInput
-  AND: [LicenseWhereInput!]
-  OR: [LicenseWhereInput!]
-}
-
-input LicenseWhereUniqueInput {
-  id: ID!
-}
-
-type MembersByHandleFTSOutput {
-  item: MembersByHandleSearchResult!
-  rank: Float!
-  isTypeOf: String!
-  highlight: String!
-}
-
-union MembersByHandleSearchResult = Membership
-
-"""Stored information about a registered user"""
-type Membership implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """The unique handle chosen by member"""
-  handle: String!
-
-  """A Url to member's Avatar image"""
-  avatarUri: String
-
-  """Short text chosen by member to share information about themselves"""
-  about: String
-
-  """Member's controller account id"""
-  controllerAccount: String!
-
-  """Member's root account id"""
-  rootAccount: String!
-
-  """Blocknumber when member was registered"""
-  createdInBlock: Int!
-
-  """How the member was registered"""
-  entry: MembershipEntryMethod!
-
-  """The type of subscription the member has purchased if any."""
-  subscription: Int
-  channels: [Channel!]!
-}
-
-type MembershipConnection {
-  totalCount: Int!
-  edges: [MembershipEdge!]!
-  pageInfo: PageInfo!
-}
-
-input MembershipCreateInput {
-  handle: String!
-  avatarUri: String
-  about: String
-  controllerAccount: String!
-  rootAccount: String!
-  createdInBlock: Float!
-  entry: MembershipEntryMethod!
-  subscription: Float
-}
-
-type MembershipEdge {
-  node: Membership!
-  cursor: String!
-}
-
-enum MembershipEntryMethod {
-  PAID
-  SCREENING
-  GENESIS
-}
-
-enum MembershipOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  handle_ASC
-  handle_DESC
-  avatarUri_ASC
-  avatarUri_DESC
-  about_ASC
-  about_DESC
-  controllerAccount_ASC
-  controllerAccount_DESC
-  rootAccount_ASC
-  rootAccount_DESC
-  createdInBlock_ASC
-  createdInBlock_DESC
-  entry_ASC
-  entry_DESC
-  subscription_ASC
-  subscription_DESC
-}
-
-input MembershipUpdateInput {
-  handle: String
-  avatarUri: String
-  about: String
-  controllerAccount: String
-  rootAccount: String
-  createdInBlock: Float
-  entry: MembershipEntryMethod
-  subscription: Float
-}
-
-input MembershipWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  handle_eq: String
-  handle_contains: String
-  handle_startsWith: String
-  handle_endsWith: String
-  handle_in: [String!]
-  avatarUri_eq: String
-  avatarUri_contains: String
-  avatarUri_startsWith: String
-  avatarUri_endsWith: String
-  avatarUri_in: [String!]
-  about_eq: String
-  about_contains: String
-  about_startsWith: String
-  about_endsWith: String
-  about_in: [String!]
-  controllerAccount_eq: String
-  controllerAccount_contains: String
-  controllerAccount_startsWith: String
-  controllerAccount_endsWith: String
-  controllerAccount_in: [String!]
-  rootAccount_eq: String
-  rootAccount_contains: String
-  rootAccount_startsWith: String
-  rootAccount_endsWith: String
-  rootAccount_in: [String!]
-  createdInBlock_eq: Int
-  createdInBlock_gt: Int
-  createdInBlock_gte: Int
-  createdInBlock_lt: Int
-  createdInBlock_lte: Int
-  createdInBlock_in: [Int!]
-  entry_eq: MembershipEntryMethod
-  entry_in: [MembershipEntryMethod!]
-  subscription_eq: Int
-  subscription_gt: Int
-  subscription_gte: Int
-  subscription_lt: Int
-  subscription_lte: Int
-  subscription_in: [Int!]
-  channels_none: ChannelWhereInput
-  channels_some: ChannelWhereInput
-  channels_every: ChannelWhereInput
-  AND: [MembershipWhereInput!]
-  OR: [MembershipWhereInput!]
-}
-
-input MembershipWhereUniqueInput {
-  id: ID
-  handle: String
-}
-
-type NextEntityId implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """Next deterministic id for entities without custom id"""
-  nextId: Float!
-}
-
-type NextEntityIdConnection {
-  totalCount: Int!
-  edges: [NextEntityIdEdge!]!
-  pageInfo: PageInfo!
-}
-
-input NextEntityIdCreateInput {
-  nextId: Float!
-}
-
-type NextEntityIdEdge {
-  node: NextEntityId!
-  cursor: String!
-}
-
-enum NextEntityIdOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  nextId_ASC
-  nextId_DESC
-}
-
-input NextEntityIdUpdateInput {
-  nextId: Float
-}
-
-input NextEntityIdWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  nextId_eq: Float
-  nextId_gt: Float
-  nextId_gte: Float
-  nextId_lt: Float
-  nextId_lte: Float
-  nextId_in: [Float!]
-  AND: [NextEntityIdWhereInput!]
-  OR: [NextEntityIdWhereInput!]
-}
-
-input NextEntityIdWhereUniqueInput {
-  id: ID!
-}
-
-type PageInfo {
-  hasNextPage: Boolean!
-  hasPreviousPage: Boolean!
-  startCursor: String
-  endCursor: String
-}
-
-type ProcessorState {
-  lastCompleteBlock: Float!
-  lastProcessedEvent: String!
-  indexerHead: Float!
-  chainHead: Float!
-}
-
-type Query {
-  curatorGroups(offset: Int, limit: Int = 50, where: CuratorGroupWhereInput, orderBy: [CuratorGroupOrderByInput!]): [CuratorGroup!]!
-  curatorGroupByUniqueInput(where: CuratorGroupWhereUniqueInput!): CuratorGroup
-  curatorGroupsConnection(first: Int, after: String, last: Int, before: String, where: CuratorGroupWhereInput, orderBy: [CuratorGroupOrderByInput!]): CuratorGroupConnection!
-  dataObjects(offset: Int, limit: Int = 50, where: DataObjectWhereInput, orderBy: [DataObjectOrderByInput!]): [DataObject!]!
-  dataObjectByUniqueInput(where: DataObjectWhereUniqueInput!): DataObject
-  dataObjectsConnection(first: Int, after: String, last: Int, before: String, where: DataObjectWhereInput, orderBy: [DataObjectOrderByInput!]): DataObjectConnection!
-  channelCategories(offset: Int, limit: Int = 50, where: ChannelCategoryWhereInput, orderBy: [ChannelCategoryOrderByInput!]): [ChannelCategory!]!
-  channelCategoryByUniqueInput(where: ChannelCategoryWhereUniqueInput!): ChannelCategory
-  channelCategoriesConnection(first: Int, after: String, last: Int, before: String, where: ChannelCategoryWhereInput, orderBy: [ChannelCategoryOrderByInput!]): ChannelCategoryConnection!
-  channels(offset: Int, limit: Int = 50, where: ChannelWhereInput, orderBy: [ChannelOrderByInput!]): [Channel!]!
-  channelByUniqueInput(where: ChannelWhereUniqueInput!): Channel
-  channelsConnection(first: Int, after: String, last: Int, before: String, where: ChannelWhereInput, orderBy: [ChannelOrderByInput!]): ChannelConnection!
-  languages(offset: Int, limit: Int = 50, where: LanguageWhereInput, orderBy: [LanguageOrderByInput!]): [Language!]!
-  languageByUniqueInput(where: LanguageWhereUniqueInput!): Language
-  languagesConnection(first: Int, after: String, last: Int, before: String, where: LanguageWhereInput, orderBy: [LanguageOrderByInput!]): LanguageConnection!
-  licenses(offset: Int, limit: Int = 50, where: LicenseWhereInput, orderBy: [LicenseOrderByInput!]): [License!]!
-  licenseByUniqueInput(where: LicenseWhereUniqueInput!): License
-  licensesConnection(first: Int, after: String, last: Int, before: String, where: LicenseWhereInput, orderBy: [LicenseOrderByInput!]): LicenseConnection!
-  memberships(offset: Int, limit: Int = 50, where: MembershipWhereInput, orderBy: [MembershipOrderByInput!]): [Membership!]!
-  membershipByUniqueInput(where: MembershipWhereUniqueInput!): Membership
-  membershipsConnection(first: Int, after: String, last: Int, before: String, where: MembershipWhereInput, orderBy: [MembershipOrderByInput!]): MembershipConnection!
-  nextEntityIds(offset: Int, limit: Int = 50, where: NextEntityIdWhereInput, orderBy: [NextEntityIdOrderByInput!]): [NextEntityId!]!
-  nextEntityIdByUniqueInput(where: NextEntityIdWhereUniqueInput!): NextEntityId
-  nextEntityIdsConnection(first: Int, after: String, last: Int, before: String, where: NextEntityIdWhereInput, orderBy: [NextEntityIdOrderByInput!]): NextEntityIdConnection!
-  channelCategoriesByName(whereChannelCategory: ChannelCategoryWhereInput, skip: Int = 0, limit: Int = 5, text: String!): [ChannelCategoriesByNameFTSOutput!]!
-  membersByHandle(whereMembership: MembershipWhereInput, skip: Int = 0, limit: Int = 5, text: String!): [MembersByHandleFTSOutput!]!
-  search(whereVideo: VideoWhereInput, whereChannel: ChannelWhereInput, skip: Int = 0, limit: Int = 5, text: String!): [SearchFTSOutput!]!
-  videoCategoriesByName(whereVideoCategory: VideoCategoryWhereInput, skip: Int = 0, limit: Int = 5, text: String!): [VideoCategoriesByNameFTSOutput!]!
-  videoCategories(offset: Int, limit: Int = 50, where: VideoCategoryWhereInput, orderBy: [VideoCategoryOrderByInput!]): [VideoCategory!]!
-  videoCategoryByUniqueInput(where: VideoCategoryWhereUniqueInput!): VideoCategory
-  videoCategoriesConnection(first: Int, after: String, last: Int, before: String, where: VideoCategoryWhereInput, orderBy: [VideoCategoryOrderByInput!]): VideoCategoryConnection!
-  videoMediaEncodings(offset: Int, limit: Int = 50, where: VideoMediaEncodingWhereInput, orderBy: [VideoMediaEncodingOrderByInput!]): [VideoMediaEncoding!]!
-  videoMediaEncodingByUniqueInput(where: VideoMediaEncodingWhereUniqueInput!): VideoMediaEncoding
-  videoMediaEncodingsConnection(first: Int, after: String, last: Int, before: String, where: VideoMediaEncodingWhereInput, orderBy: [VideoMediaEncodingOrderByInput!]): VideoMediaEncodingConnection!
-  videoMediaMetadata(offset: Int, limit: Int = 50, where: VideoMediaMetadataWhereInput, orderBy: [VideoMediaMetadataOrderByInput!]): [VideoMediaMetadata!]!
-  videoMediaMetadataByUniqueInput(where: VideoMediaMetadataWhereUniqueInput!): VideoMediaMetadata
-  videoMediaMetadataConnection(first: Int, after: String, last: Int, before: String, where: VideoMediaMetadataWhereInput, orderBy: [VideoMediaMetadataOrderByInput!]): VideoMediaMetadataConnection!
-  videos(offset: Int, limit: Int = 50, where: VideoWhereInput, orderBy: [VideoOrderByInput!]): [Video!]!
-  videoByUniqueInput(where: VideoWhereUniqueInput!): Video
-  videosConnection(first: Int, after: String, last: Int, before: String, where: VideoWhereInput, orderBy: [VideoOrderByInput!]): VideoConnection!
-  workers(offset: Int, limit: Int = 50, where: WorkerWhereInput, orderBy: [WorkerOrderByInput!]): [Worker!]!
-  workerByUniqueInput(where: WorkerWhereUniqueInput!): Worker
-  workersConnection(first: Int, after: String, last: Int, before: String, where: WorkerWhereInput, orderBy: [WorkerOrderByInput!]): WorkerConnection!
-}
-
-type SearchFTSOutput {
-  item: SearchSearchResult!
-  rank: Float!
-  isTypeOf: String!
-  highlight: String!
-}
-
-union SearchSearchResult = Channel | Video
-
-type StandardDeleteResponse {
-  id: ID!
-}
-
-type Subscription {
-  stateSubscription: ProcessorState!
-}
-
-type Video implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-  channel: Channel
-  channelId: String
-  category: VideoCategory
-  categoryId: String
-
-  """The title of the video"""
-  title: String
-
-  """The description of the Video"""
-  description: String
-
-  """Video duration in seconds"""
-  duration: Int
-  thumbnailPhotoDataObject: DataObject
-  thumbnailPhotoDataObjectId: String
-
-  """URLs where the asset content can be accessed (if any)"""
-  thumbnailPhotoUrls: [String!]!
-
-  """Availability meta information"""
-  thumbnailPhotoAvailability: AssetAvailability!
-  language: Language
-  languageId: String
-
-  """Whether or not Video contains marketing"""
-  hasMarketing: Boolean
-
-  """
-  If the Video was published on other platform before beeing published on Joystream - the original publication date
-  """
-  publishedBeforeJoystream: DateTime
-
-  """Whether the Video is supposed to be publically displayed"""
-  isPublic: Boolean
-
-  """Flag signaling whether a video is censored."""
-  isCensored: Boolean!
-
-  """Whether the Video contains explicit material."""
-  isExplicit: Boolean
-  license: License
-  licenseId: String
-  mediaDataObject: DataObject
-  mediaDataObjectId: String
-
-  """URLs where the asset content can be accessed (if any)"""
-  mediaUrls: [String!]!
-
-  """Availability meta information"""
-  mediaAvailability: AssetAvailability!
-  mediaMetadata: VideoMediaMetadata
-  mediaMetadataId: String
-  createdInBlock: Int!
-
-  """Is video featured or not"""
-  isFeatured: Boolean!
-}
-
-type VideoCategoriesByNameFTSOutput {
-  item: VideoCategoriesByNameSearchResult!
-  rank: Float!
-  isTypeOf: String!
-  highlight: String!
-}
-
-union VideoCategoriesByNameSearchResult = VideoCategory
-
-type VideoCategory implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """The name of the category"""
-  name: String
-  videos: [Video!]!
-  createdInBlock: Int!
-}
-
-type VideoCategoryConnection {
-  totalCount: Int!
-  edges: [VideoCategoryEdge!]!
-  pageInfo: PageInfo!
-}
-
-input VideoCategoryCreateInput {
-  name: String
-  createdInBlock: Float!
-}
-
-type VideoCategoryEdge {
-  node: VideoCategory!
-  cursor: String!
-}
-
-enum VideoCategoryOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  name_ASC
-  name_DESC
-  createdInBlock_ASC
-  createdInBlock_DESC
-}
-
-input VideoCategoryUpdateInput {
-  name: String
-  createdInBlock: Float
-}
-
-input VideoCategoryWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  name_eq: String
-  name_contains: String
-  name_startsWith: String
-  name_endsWith: String
-  name_in: [String!]
-  createdInBlock_eq: Int
-  createdInBlock_gt: Int
-  createdInBlock_gte: Int
-  createdInBlock_lt: Int
-  createdInBlock_lte: Int
-  createdInBlock_in: [Int!]
-  videos_none: VideoWhereInput
-  videos_some: VideoWhereInput
-  videos_every: VideoWhereInput
-  AND: [VideoCategoryWhereInput!]
-  OR: [VideoCategoryWhereInput!]
-}
-
-input VideoCategoryWhereUniqueInput {
-  id: ID!
-}
-
-type VideoConnection {
-  totalCount: Int!
-  edges: [VideoEdge!]!
-  pageInfo: PageInfo!
-}
-
-input VideoCreateInput {
-  channel: ID
-  channelId: ID
-  category: ID
-  categoryId: ID
-  title: String
-  description: String
-  duration: Float
-  thumbnailPhotoDataObject: ID
-  thumbnailPhotoDataObjectId: ID
-  thumbnailPhotoUrls: [String!]!
-  thumbnailPhotoAvailability: AssetAvailability!
-  language: ID
-  languageId: ID
-  hasMarketing: Boolean
-  publishedBeforeJoystream: DateTime
-  isPublic: Boolean
-  isCensored: Boolean!
-  isExplicit: Boolean
-  license: ID
-  licenseId: ID
-  mediaDataObject: ID
-  mediaDataObjectId: ID
-  mediaUrls: [String!]!
-  mediaAvailability: AssetAvailability!
-  mediaMetadata: ID
-  mediaMetadataId: ID
-  createdInBlock: Float!
-  isFeatured: Boolean!
-}
-
-type VideoEdge {
-  node: Video!
-  cursor: String!
-}
-
-type VideoMediaEncoding implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """Encoding of the video media object"""
-  codecName: String
-
-  """Media container format"""
-  container: String
-
-  """Content MIME type"""
-  mimeMediaType: String
-  videomediametadataencoding: [VideoMediaMetadata!]
-}
-
-type VideoMediaEncodingConnection {
-  totalCount: Int!
-  edges: [VideoMediaEncodingEdge!]!
-  pageInfo: PageInfo!
-}
-
-input VideoMediaEncodingCreateInput {
-  codecName: String
-  container: String
-  mimeMediaType: String
-}
-
-type VideoMediaEncodingEdge {
-  node: VideoMediaEncoding!
-  cursor: String!
-}
-
-enum VideoMediaEncodingOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  codecName_ASC
-  codecName_DESC
-  container_ASC
-  container_DESC
-  mimeMediaType_ASC
-  mimeMediaType_DESC
-}
-
-input VideoMediaEncodingUpdateInput {
-  codecName: String
-  container: String
-  mimeMediaType: String
-}
-
-input VideoMediaEncodingWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  codecName_eq: String
-  codecName_contains: String
-  codecName_startsWith: String
-  codecName_endsWith: String
-  codecName_in: [String!]
-  container_eq: String
-  container_contains: String
-  container_startsWith: String
-  container_endsWith: String
-  container_in: [String!]
-  mimeMediaType_eq: String
-  mimeMediaType_contains: String
-  mimeMediaType_startsWith: String
-  mimeMediaType_endsWith: String
-  mimeMediaType_in: [String!]
-  videomediametadataencoding_none: VideoMediaMetadataWhereInput
-  videomediametadataencoding_some: VideoMediaMetadataWhereInput
-  videomediametadataencoding_every: VideoMediaMetadataWhereInput
-  AND: [VideoMediaEncodingWhereInput!]
-  OR: [VideoMediaEncodingWhereInput!]
-}
-
-input VideoMediaEncodingWhereUniqueInput {
-  id: ID!
-}
-
-type VideoMediaMetadata implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-  encoding: VideoMediaEncoding
-  encodingId: String
-
-  """Video media width in pixels"""
-  pixelWidth: Int
-
-  """Video media height in pixels"""
-  pixelHeight: Int
-
-  """Video media size in bytes"""
-  size: Float
-  video: Video
-  createdInBlock: Int!
-}
-
-type VideoMediaMetadataConnection {
-  totalCount: Int!
-  edges: [VideoMediaMetadataEdge!]!
-  pageInfo: PageInfo!
-}
-
-input VideoMediaMetadataCreateInput {
-  encoding: ID
-  encodingId: ID
-  pixelWidth: Float
-  pixelHeight: Float
-  size: Float
-  createdInBlock: Float!
-}
-
-type VideoMediaMetadataEdge {
-  node: VideoMediaMetadata!
-  cursor: String!
-}
-
-enum VideoMediaMetadataOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  encoding_ASC
-  encoding_DESC
-  encodingId_ASC
-  encodingId_DESC
-  pixelWidth_ASC
-  pixelWidth_DESC
-  pixelHeight_ASC
-  pixelHeight_DESC
-  size_ASC
-  size_DESC
-  createdInBlock_ASC
-  createdInBlock_DESC
-}
-
-input VideoMediaMetadataUpdateInput {
-  encoding: ID
-  encodingId: ID
-  pixelWidth: Float
-  pixelHeight: Float
-  size: Float
-  createdInBlock: Float
-}
-
-input VideoMediaMetadataWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  encodingId_eq: ID
-  encodingId_in: [ID!]
-  pixelWidth_eq: Int
-  pixelWidth_gt: Int
-  pixelWidth_gte: Int
-  pixelWidth_lt: Int
-  pixelWidth_lte: Int
-  pixelWidth_in: [Int!]
-  pixelHeight_eq: Int
-  pixelHeight_gt: Int
-  pixelHeight_gte: Int
-  pixelHeight_lt: Int
-  pixelHeight_lte: Int
-  pixelHeight_in: [Int!]
-  size_eq: Float
-  size_gt: Float
-  size_gte: Float
-  size_lt: Float
-  size_lte: Float
-  size_in: [Float!]
-  createdInBlock_eq: Int
-  createdInBlock_gt: Int
-  createdInBlock_gte: Int
-  createdInBlock_lt: Int
-  createdInBlock_lte: Int
-  createdInBlock_in: [Int!]
-  encoding: VideoMediaEncodingWhereInput
-  video: VideoWhereInput
-  AND: [VideoMediaMetadataWhereInput!]
-  OR: [VideoMediaMetadataWhereInput!]
-}
-
-input VideoMediaMetadataWhereUniqueInput {
-  id: ID!
-}
-
-enum VideoOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  channel_ASC
-  channel_DESC
-  channelId_ASC
-  channelId_DESC
-  category_ASC
-  category_DESC
-  categoryId_ASC
-  categoryId_DESC
-  title_ASC
-  title_DESC
-  description_ASC
-  description_DESC
-  duration_ASC
-  duration_DESC
-  thumbnailPhotoDataObject_ASC
-  thumbnailPhotoDataObject_DESC
-  thumbnailPhotoDataObjectId_ASC
-  thumbnailPhotoDataObjectId_DESC
-  thumbnailPhotoAvailability_ASC
-  thumbnailPhotoAvailability_DESC
-  language_ASC
-  language_DESC
-  languageId_ASC
-  languageId_DESC
-  hasMarketing_ASC
-  hasMarketing_DESC
-  publishedBeforeJoystream_ASC
-  publishedBeforeJoystream_DESC
-  isPublic_ASC
-  isPublic_DESC
-  isCensored_ASC
-  isCensored_DESC
-  isExplicit_ASC
-  isExplicit_DESC
-  license_ASC
-  license_DESC
-  licenseId_ASC
-  licenseId_DESC
-  mediaDataObject_ASC
-  mediaDataObject_DESC
-  mediaDataObjectId_ASC
-  mediaDataObjectId_DESC
-  mediaAvailability_ASC
-  mediaAvailability_DESC
-  mediaMetadata_ASC
-  mediaMetadata_DESC
-  mediaMetadataId_ASC
-  mediaMetadataId_DESC
-  createdInBlock_ASC
-  createdInBlock_DESC
-  isFeatured_ASC
-  isFeatured_DESC
-}
-
-input VideoUpdateInput {
-  channel: ID
-  channelId: ID
-  category: ID
-  categoryId: ID
-  title: String
-  description: String
-  duration: Float
-  thumbnailPhotoDataObject: ID
-  thumbnailPhotoDataObjectId: ID
-  thumbnailPhotoUrls: [String!]
-  thumbnailPhotoAvailability: AssetAvailability
-  language: ID
-  languageId: ID
-  hasMarketing: Boolean
-  publishedBeforeJoystream: DateTime
-  isPublic: Boolean
-  isCensored: Boolean
-  isExplicit: Boolean
-  license: ID
-  licenseId: ID
-  mediaDataObject: ID
-  mediaDataObjectId: ID
-  mediaUrls: [String!]
-  mediaAvailability: AssetAvailability
-  mediaMetadata: ID
-  mediaMetadataId: ID
-  createdInBlock: Float
-  isFeatured: Boolean
-}
-
-input VideoWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  channelId_eq: ID
-  channelId_in: [ID!]
-  categoryId_eq: ID
-  categoryId_in: [ID!]
-  title_eq: String
-  title_contains: String
-  title_startsWith: String
-  title_endsWith: String
-  title_in: [String!]
-  description_eq: String
-  description_contains: String
-  description_startsWith: String
-  description_endsWith: String
-  description_in: [String!]
-  duration_eq: Int
-  duration_gt: Int
-  duration_gte: Int
-  duration_lt: Int
-  duration_lte: Int
-  duration_in: [Int!]
-  thumbnailPhotoDataObjectId_eq: ID
-  thumbnailPhotoDataObjectId_in: [ID!]
-  thumbnailPhotoUrls_containsAll: [String!]
-  thumbnailPhotoUrls_containsNone: [String!]
-  thumbnailPhotoUrls_containsAny: [String!]
-  thumbnailPhotoAvailability_eq: AssetAvailability
-  thumbnailPhotoAvailability_in: [AssetAvailability!]
-  languageId_eq: ID
-  languageId_in: [ID!]
-  hasMarketing_eq: Boolean
-  hasMarketing_in: [Boolean!]
-  publishedBeforeJoystream_eq: DateTime
-  publishedBeforeJoystream_lt: DateTime
-  publishedBeforeJoystream_lte: DateTime
-  publishedBeforeJoystream_gt: DateTime
-  publishedBeforeJoystream_gte: DateTime
-  isPublic_eq: Boolean
-  isPublic_in: [Boolean!]
-  isCensored_eq: Boolean
-  isCensored_in: [Boolean!]
-  isExplicit_eq: Boolean
-  isExplicit_in: [Boolean!]
-  licenseId_eq: ID
-  licenseId_in: [ID!]
-  mediaDataObjectId_eq: ID
-  mediaDataObjectId_in: [ID!]
-  mediaUrls_containsAll: [String!]
-  mediaUrls_containsNone: [String!]
-  mediaUrls_containsAny: [String!]
-  mediaAvailability_eq: AssetAvailability
-  mediaAvailability_in: [AssetAvailability!]
-  mediaMetadataId_eq: ID
-  mediaMetadataId_in: [ID!]
-  createdInBlock_eq: Int
-  createdInBlock_gt: Int
-  createdInBlock_gte: Int
-  createdInBlock_lt: Int
-  createdInBlock_lte: Int
-  createdInBlock_in: [Int!]
-  isFeatured_eq: Boolean
-  isFeatured_in: [Boolean!]
-  channel: ChannelWhereInput
-  category: VideoCategoryWhereInput
-  thumbnailPhotoDataObject: DataObjectWhereInput
-  language: LanguageWhereInput
-  license: LicenseWhereInput
-  mediaDataObject: DataObjectWhereInput
-  mediaMetadata: VideoMediaMetadataWhereInput
-  AND: [VideoWhereInput!]
-  OR: [VideoWhereInput!]
-}
-
-input VideoWhereUniqueInput {
-  id: ID!
-}
-
-type Worker implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """Sign of worker still being active"""
-  isActive: Boolean!
-
-  """Runtime identifier"""
-  workerId: String!
-
-  """Associated working group"""
-  type: WorkerType!
-
-  """Custom metadata set by provider"""
-  metadata: String
-  dataObjects: [DataObject!]!
-}
-
-type WorkerConnection {
-  totalCount: Int!
-  edges: [WorkerEdge!]!
-  pageInfo: PageInfo!
-}
-
-input WorkerCreateInput {
-  isActive: Boolean!
-  workerId: String!
-  type: WorkerType!
-  metadata: String
-}
-
-type WorkerEdge {
-  node: Worker!
-  cursor: String!
-}
-
-enum WorkerOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  isActive_ASC
-  isActive_DESC
-  workerId_ASC
-  workerId_DESC
-  type_ASC
-  type_DESC
-  metadata_ASC
-  metadata_DESC
-}
-
-enum WorkerType {
-  GATEWAY
-  STORAGE
-}
-
-input WorkerUpdateInput {
-  isActive: Boolean
-  workerId: String
-  type: WorkerType
-  metadata: String
-}
-
-input WorkerWhereInput {
-  id_eq: ID
-  id_in: [ID!]
-  createdAt_eq: DateTime
-  createdAt_lt: DateTime
-  createdAt_lte: DateTime
-  createdAt_gt: DateTime
-  createdAt_gte: DateTime
-  createdById_eq: ID
-  createdById_in: [ID!]
-  updatedAt_eq: DateTime
-  updatedAt_lt: DateTime
-  updatedAt_lte: DateTime
-  updatedAt_gt: DateTime
-  updatedAt_gte: DateTime
-  updatedById_eq: ID
-  updatedById_in: [ID!]
-  deletedAt_all: Boolean
-  deletedAt_eq: DateTime
-  deletedAt_lt: DateTime
-  deletedAt_lte: DateTime
-  deletedAt_gt: DateTime
-  deletedAt_gte: DateTime
-  deletedById_eq: ID
-  deletedById_in: [ID!]
-  isActive_eq: Boolean
-  isActive_in: [Boolean!]
-  workerId_eq: String
-  workerId_contains: String
-  workerId_startsWith: String
-  workerId_endsWith: String
-  workerId_in: [String!]
-  type_eq: WorkerType
-  type_in: [WorkerType!]
-  metadata_eq: String
-  metadata_contains: String
-  metadata_startsWith: String
-  metadata_endsWith: String
-  metadata_in: [String!]
-  dataObjects_none: DataObjectWhereInput
-  dataObjects_some: DataObjectWhereInput
-  dataObjects_every: DataObjectWhereInput
-  AND: [WorkerWhereInput!]
-  OR: [WorkerWhereInput!]
-}
-
-input WorkerWhereUniqueInput {
-  id: ID!
-}

+ 0 - 51
query-node/generated/graphql-server/model/index.ts

@@ -1,51 +0,0 @@
-import { Channel } from '../src/modules/channel/channel.model';
-export { Channel };
-import { ChannelCategory } from '../src/modules/channel-category/channel-category.model';
-export { ChannelCategory };
-import { CuratorGroup } from '../src/modules/curator-group/curator-group.model';
-export { CuratorGroup };
-import { DataObject } from '../src/modules/data-object/data-object.model';
-export { DataObject };
-import { Language } from '../src/modules/language/language.model';
-export { Language };
-import { License } from '../src/modules/license/license.model';
-export { License };
-import { Membership } from '../src/modules/membership/membership.model';
-export { Membership };
-import { NextEntityId } from '../src/modules/next-entity-id/next-entity-id.model';
-export { NextEntityId };
-import { Video } from '../src/modules/video/video.model';
-export { Video };
-import { VideoCategory } from '../src/modules/video-category/video-category.model';
-export { VideoCategory };
-import { VideoMediaEncoding } from '../src/modules/video-media-encoding/video-media-encoding.model';
-export { VideoMediaEncoding };
-import { VideoMediaMetadata } from '../src/modules/video-media-metadata/video-media-metadata.model';
-export { VideoMediaMetadata };
-import { Worker } from '../src/modules/worker/worker.model';
-export { Worker };
-
-import { Network } from '../src/modules/enums/enums';
-export { Network };
-import { MembershipEntryMethod } from '../src/modules/enums/enums';
-export { MembershipEntryMethod };
-import { AssetAvailability } from '../src/modules/enums/enums';
-export { AssetAvailability };
-import { LiaisonJudgement } from '../src/modules/enums/enums';
-export { LiaisonJudgement };
-import { WorkerType } from '../src/modules/enums/enums';
-export { WorkerType };
-
-import { DataObjectOwnerChannel } from '../src/modules/variants/variants.model';
-export { DataObjectOwnerChannel };
-import { DataObjectOwnerCouncil } from '../src/modules/variants/variants.model';
-export { DataObjectOwnerCouncil };
-import { DataObjectOwnerDao } from '../src/modules/variants/variants.model';
-export { DataObjectOwnerDao };
-import { DataObjectOwnerMember } from '../src/modules/variants/variants.model';
-export { DataObjectOwnerMember };
-import { DataObjectOwnerWorkingGroup } from '../src/modules/variants/variants.model';
-export { DataObjectOwnerWorkingGroup };
-
-import { DataObjectOwner } from '../src/modules/variants/variants.model';
-export { DataObjectOwner };

+ 0 - 105
query-node/generated/graphql-server/package.json

@@ -1,105 +0,0 @@
-{
-  "name": "query-node",
-  "version": "0.1.0",
-  "description": "Generated Warthog Project",
-  "license": "MIT",
-  "main": "dist/model/index.js",
-  "types": "dist/model/index.d.ts",
-  "scripts": {
-    "bootstrap": "yarn bootstrap:dev",
-    "bootstrap:dev": "yarn && yarn build:dev && yarn db:drop && yarn db:create && yarn db:migrate && yarn db:seed",
-    "bootstrap:prod": "yarn && yarn build:prod && yarn start:prod",
-    "//": "This is the default command run in CI, so it should point to Prod and also create Prod config",
-    "build": "yarn build:prod",
-    "build:prod": "WARTHOG_ENV=production yarn run config && yarn compile",
-    "build:dev": "yarn run config:dev && yarn codegen && yarn compile",
-    "check:code": "tsc --noEmit && yarn lint && prettier ./{src,test,tools}/**/*.ts --write",
-    "clean": "yarn db:drop && rm -rf ./node_modules ./generated ./dist",
-    "codegen": "warthog codegen",
-    "config": "WARTHOG_ENV=$NODE_ENV yarn dotenv:generate",
-    "config:dev": "WARTHOG_ENV=development yarn dotenv:generate",
-    "compile": "rm -rf ./dist && yarn tsc",
-    "deploy": "heroku git:remote -a warthog-starter && git push heroku main && WARTHOG_ENV=production yarn dotenv:generate && warthog db:migrate",
-    "dotenv:generate": "dotenvi -s ${WARTHOG_ENV:-development}",
-    "db:create": "warthog db:create",
-    "db:drop": "warthog db:drop",
-    "db:migrate:generate": "warthog db:migrate:generate --name",
-    "db:migrate": "warthog db:migrate",
-    "db:seed": "ts-node tools/seed.ts",
-    "lint": "eslint './+(src|test|tools)/**/*.{js,ts}' --fix",
-    "list:users": "ts-node ./tools/list-users.ts",
-    "playground": "warthog playground",
-    "prettier": "prettier ./{src,test,tools}/**/*.ts --write",
-    "start": "yarn start:prod",
-    "start:dev": "ts-node --type-check src/index.ts",
-    "start:dev:watch": "nodemon -e ts,graphql -x ts-node --type-check src/index.ts",
-    "start:prod": "WARTHOG_ENV=production yarn dotenv:generate && node dist/src/index.js",
-    "test": "DEBUG= jest --verbose --coverage",
-    "test:watch": "DEBUG= jest --watch",
-    "db:sync": "SYNC=true WARTHOG_DB_SYNCHRONIZE=true ts-node --type-check src/index.ts"
-  },
-  "husky": {
-    "hooks": {
-      "pre-commit": "yarn run config:dev && lint-staged && tsc -p ./tsconfig.json && yarn test"
-    }
-  },
-  "lint-staged": {
-    "linters": {
-      "*.ts": [
-        "eslint --fix",
-        "prettier --write",
-        "git add"
-      ],
-      "*.{js,json}": [
-        "prettier --write",
-        "git add"
-      ]
-    },
-    "ignore": [
-      "**/generated/*"
-    ]
-  },
-  "hydra": "https://github.com/Joystream/warthog/releases/download/v2.37.0/joystream-warthog-v2.37.0.tgz",
-  "dependencies": {
-    "dotenv": "^8.2.0",
-    "reflect-metadata": "^0.1.13",
-    "warthog": "https://github.com/Joystream/warthog/releases/download/v2.37.0/joystream-warthog-v2.37.0.tgz",
-    "@types/bn.js": "^4.11.6",
-    "bn.js": "^5.1.3",
-    "lodash": "^4.17.15",
-    "pg-listen": "^1.7.0",
-    "typeorm": "^0.2.31"
-  },
-  "devDependencies": {
-    "@types/jest": "^24.0.23",
-    "dotenvi": "^0.9.0",
-    "jest": "^24.9.0",
-    "ts-jest": "^24.1.0",
-    "ts-node": "^8.10",
-    "ts-node-dev": "^1.0.0-pre.60",
-    "typescript": "^3.9.7"
-  },
-  "jest": {
-    "globals": {
-      "ts-jest": {
-        "tsConfig": "tsconfig.test.json"
-      }
-    },
-    "transform": {
-      ".ts": "ts-jest"
-    },
-    "testRegex": "\\.test\\.ts$",
-    "moduleFileExtensions": [
-      "js",
-      "ts"
-    ],
-    "coveragePathIgnorePatterns": [
-      "/node_modules/",
-      "\\.test\\.ts$"
-    ]
-  },
-  "prettier": {
-    "printWidth": 100,
-    "singleQuote": true
-  }
-}

+ 0 - 7
query-node/generated/graphql-server/src/config.ts

@@ -1,7 +0,0 @@
-import * as dotenv from 'dotenv';
-import * as path from 'path';
-
-export function loadConfig() {
-  delete process.env.NODE_ENV;
-  dotenv.config({ path: path.join(__dirname, '../.env') });
-}

+ 0 - 53
query-node/generated/graphql-server/src/index.ts

@@ -1,53 +0,0 @@
-import 'reflect-metadata';
-
-import { SnakeNamingStrategy } from 'warthog';
-import { snakeCase } from 'typeorm/util/StringUtils';
-
-import { loadConfig } from '../src/config';
-import { Logger } from '../src/logger';
-
-import { buildServerSchema, getServer } from './server';
-import { startPgSubsribers } from './pubsub';
-import { queryTemplates } from './queryTemplates'
-
-
-class CustomNamingStrategy extends SnakeNamingStrategy {
-  constructor() {
-    super();
-  }
-  tableName(className: string, customName?: string): string {
-    return customName ? customName : `${snakeCase(className)}`;
-  }
-}
-
-async function bootstrap() {
-  await loadConfig();
-
-  const appOptions = {
-    playgroundConfig: {
-      queryTemplates,
-      cdnUrl: process.env.GRAPHQL_PLAYGROUND_CDN || '',
-    }
-  }
-
-  const server = getServer(appOptions, { namingStrategy: new CustomNamingStrategy() });
-
-  // Create database tables. Warthog migrate command does not support CustomNamingStrategy thats why
-  // we have this code
-  const syncDatabase: string | undefined = process.env.SYNC;
-  if (syncDatabase === 'true') {
-    await server.establishDBConnection();
-    process.exit(0);
-  }
-  await buildServerSchema(server);
-  await startPgSubsribers();
-  await server.start();
-}
-
-bootstrap().catch((error: Error) => {
-  Logger.error(error);
-  if (error.stack) {
-    Logger.error(error.stack.split('\n'));
-  }
-  process.exit(1);
-});

+ 0 - 35
query-node/generated/graphql-server/src/logger.ts

@@ -1,35 +0,0 @@
-/* eslint-disable no-console */
-
-import * as util from 'util';
-
-import { getBindingError } from 'warthog';
-
-export class Logger {
-  static info(...args: any[]) {
-    args = args.length === 1 ? args[0] : args;
-    console.log(util.inspect(args, { showHidden: false, depth: null }));
-  }
-
-  static error(...args: any[]) {
-    args = args.length === 1 ? args[0] : args;
-    console.error(util.inspect(args, { showHidden: false, depth: null }));
-  }
-
-  // static debug(...args: any[]) {
-  //   console.debug(args);
-  // }
-
-  static log(...args: any[]) {
-    console.log(args);
-  }
-
-  static warn(...args: any[]) {
-    console.warn(args);
-  }
-
-  // This takes a raw GraphQL error and pulls out the relevant info
-  static logGraphQLError(error: Error) {
-    console.error(util.inspect(getBindingError(error), { showHidden: false, depth: null }));
-  }
-}
-/* eslint-enable no-console */

+ 0 - 27
query-node/generated/graphql-server/src/modules/channel-category/channel-category.model.ts

@@ -1,27 +0,0 @@
-import { BaseModel, IntField, Model, OneToMany, StringField } from 'warthog';
-
-import { Channel } from '../channel/channel.model';
-
-@Model({ api: { description: `Category of media channel` } })
-export class ChannelCategory extends BaseModel {
-  @StringField({
-    nullable: true,
-    description: `The name of the category`,
-  })
-  name?: string;
-
-  @OneToMany(() => Channel, (param: Channel) => param.category, {
-    modelName: 'ChannelCategory',
-    relModelName: 'Channel',
-    propertyName: 'channels',
-  })
-  channels?: Channel[];
-
-  @IntField({})
-  createdInBlock!: number;
-
-  constructor(init?: Partial<ChannelCategory>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 142
query-node/generated/graphql-server/src/modules/channel-category/channel-category.resolver.ts

@@ -1,142 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  ChannelCategoryCreateInput,
-  ChannelCategoryCreateManyArgs,
-  ChannelCategoryUpdateArgs,
-  ChannelCategoryWhereArgs,
-  ChannelCategoryWhereInput,
-  ChannelCategoryWhereUniqueInput,
-  ChannelCategoryOrderByEnum,
-} from '../../../generated';
-
-import { ChannelCategory } from './channel-category.model';
-import { ChannelCategoryService } from './channel-category.service';
-
-import { Channel } from '../channel/channel.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class ChannelCategoryEdge {
-  @Field(() => ChannelCategory, { nullable: false })
-  node!: ChannelCategory;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class ChannelCategoryConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [ChannelCategoryEdge], { nullable: false })
-  edges!: ChannelCategoryEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class ChannelCategoryConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => ChannelCategoryWhereInput, { nullable: true })
-  where?: ChannelCategoryWhereInput;
-
-  @Field(() => ChannelCategoryOrderByEnum, { nullable: true })
-  orderBy?: [ChannelCategoryOrderByEnum];
-}
-
-@Resolver(ChannelCategory)
-export class ChannelCategoryResolver {
-  constructor(@Inject('ChannelCategoryService') public readonly service: ChannelCategoryService) {}
-
-  @Query(() => [ChannelCategory])
-  async channelCategories(
-    @Args() { where, orderBy, limit, offset }: ChannelCategoryWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<ChannelCategory[]> {
-    return this.service.find<ChannelCategoryWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => ChannelCategory, { nullable: true })
-  async channelCategoryByUniqueInput(
-    @Arg('where') where: ChannelCategoryWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<ChannelCategory | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => ChannelCategoryConnection)
-  async channelCategoriesConnection(
-    @Args() { where, orderBy, ...pageOptions }: ChannelCategoryConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<ChannelCategoryConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<ChannelCategoryWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<ChannelCategoryConnection>;
-  }
-
-  @FieldResolver(() => Channel)
-  async channels(@Root() r: ChannelCategory): Promise<Channel[] | null> {
-    const result = await getConnection()
-      .getRepository(ChannelCategory)
-      .findOne(r.id, { relations: ['channels'] });
-    if (result && result.channels !== undefined) {
-      return result.channels;
-    }
-    return null;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/channel-category/channel-category.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { ChannelCategory } from './channel-category.model';
-
-@Service('ChannelCategoryService')
-export class ChannelCategoryService extends BaseService<ChannelCategory> {
-  constructor(@InjectRepository(ChannelCategory) protected readonly repository: Repository<ChannelCategory>) {
-    super(ChannelCategory, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<ChannelCategory[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 151
query-node/generated/graphql-server/src/modules/channel/channel.model.ts

@@ -1,151 +0,0 @@
-import {
-  BaseModel,
-  BooleanField,
-  IntField,
-  Model,
-  ManyToOne,
-  OneToMany,
-  CustomField,
-  EnumField,
-  StringField,
-} from 'warthog';
-
-import { Membership } from '../membership/membership.model';
-import { CuratorGroup } from '../curator-group/curator-group.model';
-import { ChannelCategory } from '../channel-category/channel-category.model';
-import { DataObject } from '../data-object/data-object.model';
-import { Language } from '../language/language.model';
-import { Video } from '../video/video.model';
-
-import { AssetAvailability } from '../enums/enums';
-export { AssetAvailability };
-
-@Model({ api: {} })
-export class Channel extends BaseModel {
-  @ManyToOne(() => Membership, (param: Membership) => param.channels, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Channel',
-    relModelName: 'Membership',
-    propertyName: 'ownerMember',
-  })
-  ownerMember?: Membership;
-
-  @ManyToOne(() => CuratorGroup, (param: CuratorGroup) => param.channels, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Channel',
-    relModelName: 'CuratorGroup',
-    propertyName: 'ownerCuratorGroup',
-  })
-  ownerCuratorGroup?: CuratorGroup;
-
-  @ManyToOne(() => ChannelCategory, (param: ChannelCategory) => param.channels, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Channel',
-    relModelName: 'ChannelCategory',
-    propertyName: 'category',
-  })
-  category?: ChannelCategory;
-
-  @StringField({
-    nullable: true,
-    description: `Reward account where revenue is sent if set.`,
-  })
-  rewardAccount?: string;
-
-  @StringField({
-    nullable: true,
-    description: `The title of the Channel`,
-  })
-  title?: string;
-
-  @StringField({
-    nullable: true,
-    description: `The description of a Channel`,
-  })
-  description?: string;
-
-  @ManyToOne(() => DataObject, (param: DataObject) => param.channelcoverPhotoDataObject, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Channel',
-    relModelName: 'DataObject',
-    propertyName: 'coverPhotoDataObject',
-  })
-  coverPhotoDataObject?: DataObject;
-
-  @CustomField({
-    db: { type: 'text', array: true },
-    api: { type: 'string', description: `URLs where the asset content can be accessed (if any)` },
-  })
-  coverPhotoUrls!: string[];
-
-  @EnumField('AssetAvailability', AssetAvailability, {
-    description: `Availability meta information`,
-  })
-  coverPhotoAvailability!: AssetAvailability;
-
-  @ManyToOne(() => DataObject, (param: DataObject) => param.channelavatarPhotoDataObject, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Channel',
-    relModelName: 'DataObject',
-    propertyName: 'avatarPhotoDataObject',
-  })
-  avatarPhotoDataObject?: DataObject;
-
-  @CustomField({
-    db: { type: 'text', array: true },
-    api: { type: 'string', description: `URLs where the asset content can be accessed (if any)` },
-  })
-  avatarPhotoUrls!: string[];
-
-  @EnumField('AssetAvailability', AssetAvailability, {
-    description: `Availability meta information`,
-  })
-  avatarPhotoAvailability!: AssetAvailability;
-
-  @BooleanField({
-    nullable: true,
-    description: `Flag signaling whether a channel is public.`,
-  })
-  isPublic?: boolean;
-
-  @BooleanField({
-    description: `Flag signaling whether a channel is censored.`,
-  })
-  isCensored!: boolean;
-
-  @ManyToOne(() => Language, (param: Language) => param.channellanguage, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Channel',
-    relModelName: 'Language',
-    propertyName: 'language',
-  })
-  language?: Language;
-
-  @OneToMany(() => Video, (param: Video) => param.channel, {
-    cascade: ["insert", "update"],
-    modelName: 'Channel',
-    relModelName: 'Video',
-    propertyName: 'videos',
-  })
-  videos?: Video[];
-
-  @IntField({})
-  createdInBlock!: number;
-
-  constructor(init?: Partial<Channel>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 213
query-node/generated/graphql-server/src/modules/channel/channel.resolver.ts

@@ -1,213 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  ChannelCreateInput,
-  ChannelCreateManyArgs,
-  ChannelUpdateArgs,
-  ChannelWhereArgs,
-  ChannelWhereInput,
-  ChannelWhereUniqueInput,
-  ChannelOrderByEnum,
-} from '../../../generated';
-
-import { Channel } from './channel.model';
-import { ChannelService } from './channel.service';
-
-import { Membership } from '../membership/membership.model';
-import { CuratorGroup } from '../curator-group/curator-group.model';
-import { ChannelCategory } from '../channel-category/channel-category.model';
-import { DataObject } from '../data-object/data-object.model';
-import { Language } from '../language/language.model';
-import { Video } from '../video/video.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class ChannelEdge {
-  @Field(() => Channel, { nullable: false })
-  node!: Channel;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class ChannelConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [ChannelEdge], { nullable: false })
-  edges!: ChannelEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class ChannelConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => ChannelWhereInput, { nullable: true })
-  where?: ChannelWhereInput;
-
-  @Field(() => ChannelOrderByEnum, { nullable: true })
-  orderBy?: [ChannelOrderByEnum];
-}
-
-@Resolver(Channel)
-export class ChannelResolver {
-  constructor(@Inject('ChannelService') public readonly service: ChannelService) {}
-
-  @Query(() => [Channel])
-  async channels(
-    @Args() { where, orderBy, limit, offset }: ChannelWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<Channel[]> {
-    return this.service.find<ChannelWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => Channel, { nullable: true })
-  async channelByUniqueInput(
-    @Arg('where') where: ChannelWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<Channel | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => ChannelConnection)
-  async channelsConnection(
-    @Args() { where, orderBy, ...pageOptions }: ChannelConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<ChannelConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<ChannelWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<ChannelConnection>;
-  }
-
-  @FieldResolver(() => Membership)
-  async ownerMember(@Root() r: Channel): Promise<Membership | null> {
-    const result = await getConnection()
-      .getRepository(Channel)
-      .findOne(r.id, { relations: ['ownerMember'] });
-    if (result && result.ownerMember !== undefined) {
-      return result.ownerMember;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => CuratorGroup)
-  async ownerCuratorGroup(@Root() r: Channel): Promise<CuratorGroup | null> {
-    const result = await getConnection()
-      .getRepository(Channel)
-      .findOne(r.id, { relations: ['ownerCuratorGroup'] });
-    if (result && result.ownerCuratorGroup !== undefined) {
-      return result.ownerCuratorGroup;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => ChannelCategory)
-  async category(@Root() r: Channel): Promise<ChannelCategory | null> {
-    const result = await getConnection()
-      .getRepository(Channel)
-      .findOne(r.id, { relations: ['category'] });
-    if (result && result.category !== undefined) {
-      return result.category;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => DataObject)
-  async coverPhotoDataObject(@Root() r: Channel): Promise<DataObject | null> {
-    const result = await getConnection()
-      .getRepository(Channel)
-      .findOne(r.id, { relations: ['coverPhotoDataObject'] });
-    if (result && result.coverPhotoDataObject !== undefined) {
-      return result.coverPhotoDataObject;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => DataObject)
-  async avatarPhotoDataObject(@Root() r: Channel): Promise<DataObject | null> {
-    const result = await getConnection()
-      .getRepository(Channel)
-      .findOne(r.id, { relations: ['avatarPhotoDataObject'] });
-    if (result && result.avatarPhotoDataObject !== undefined) {
-      return result.avatarPhotoDataObject;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => Language)
-  async language(@Root() r: Channel): Promise<Language | null> {
-    const result = await getConnection()
-      .getRepository(Channel)
-      .findOne(r.id, { relations: ['language'] });
-    if (result && result.language !== undefined) {
-      return result.language;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => Video)
-  async videos(@Root() r: Channel): Promise<Video[] | null> {
-    const result = await getConnection()
-      .getRepository(Channel)
-      .findOne(r.id, { relations: ['videos'] });
-    if (result && result.videos !== undefined) {
-      return result.videos;
-    }
-    return null;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/channel/channel.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { Channel } from './channel.model';
-
-@Service('ChannelService')
-export class ChannelService extends BaseService<Channel> {
-  constructor(@InjectRepository(Channel) protected readonly repository: Repository<Channel>) {
-    super(Channel, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<Channel[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 30
query-node/generated/graphql-server/src/modules/curator-group/curator-group.model.ts

@@ -1,30 +0,0 @@
-import { BaseModel, BooleanField, IntField, Model, OneToMany, CustomField, StringField } from 'warthog';
-
-import { Channel } from '../channel/channel.model';
-
-@Model({ api: {} })
-export class CuratorGroup extends BaseModel {
-  @CustomField({
-    db: { type: 'integer', array: true },
-    api: { type: 'integer', description: `Curators belonging to this group` },
-  })
-  curatorIds!: number[];
-
-  @BooleanField({
-    description: `Is group active or not`,
-  })
-  isActive!: boolean;
-
-  @OneToMany(() => Channel, (param: Channel) => param.ownerCuratorGroup, { 
-    cascade: ["insert", "update"],
-    modelName: 'CuratorGroup',
-    relModelName: 'Channel',
-    propertyName: 'channels',
-  })
-  channels?: Channel[];
-
-  constructor(init?: Partial<CuratorGroup>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 142
query-node/generated/graphql-server/src/modules/curator-group/curator-group.resolver.ts

@@ -1,142 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  CuratorGroupCreateInput,
-  CuratorGroupCreateManyArgs,
-  CuratorGroupUpdateArgs,
-  CuratorGroupWhereArgs,
-  CuratorGroupWhereInput,
-  CuratorGroupWhereUniqueInput,
-  CuratorGroupOrderByEnum,
-} from '../../../generated';
-
-import { CuratorGroup } from './curator-group.model';
-import { CuratorGroupService } from './curator-group.service';
-
-import { Channel } from '../channel/channel.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class CuratorGroupEdge {
-  @Field(() => CuratorGroup, { nullable: false })
-  node!: CuratorGroup;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class CuratorGroupConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [CuratorGroupEdge], { nullable: false })
-  edges!: CuratorGroupEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class CuratorGroupConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => CuratorGroupWhereInput, { nullable: true })
-  where?: CuratorGroupWhereInput;
-
-  @Field(() => CuratorGroupOrderByEnum, { nullable: true })
-  orderBy?: [CuratorGroupOrderByEnum];
-}
-
-@Resolver(CuratorGroup)
-export class CuratorGroupResolver {
-  constructor(@Inject('CuratorGroupService') public readonly service: CuratorGroupService) {}
-
-  @Query(() => [CuratorGroup])
-  async curatorGroups(
-    @Args() { where, orderBy, limit, offset }: CuratorGroupWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<CuratorGroup[]> {
-    return this.service.find<CuratorGroupWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => CuratorGroup, { nullable: true })
-  async curatorGroupByUniqueInput(
-    @Arg('where') where: CuratorGroupWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<CuratorGroup | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => CuratorGroupConnection)
-  async curatorGroupsConnection(
-    @Args() { where, orderBy, ...pageOptions }: CuratorGroupConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<CuratorGroupConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<CuratorGroupWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<CuratorGroupConnection>;
-  }
-
-  @FieldResolver(() => Channel)
-  async channels(@Root() r: CuratorGroup): Promise<Channel[] | null> {
-    const result = await getConnection()
-      .getRepository(CuratorGroup)
-      .findOne(r.id, { relations: ['channels'] });
-    if (result && result.channels !== undefined) {
-      return result.channels;
-    }
-    return null;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/curator-group/curator-group.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { CuratorGroup } from './curator-group.model';
-
-@Service('CuratorGroupService')
-export class CuratorGroupService extends BaseService<CuratorGroup> {
-  constructor(@InjectRepository(CuratorGroup) protected readonly repository: Repository<CuratorGroup>) {
-    super(CuratorGroup, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<CuratorGroup[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 108
query-node/generated/graphql-server/src/modules/data-object/data-object.model.ts

@@ -1,108 +0,0 @@
-import { BaseModel, FloatField, IntField, Model, ManyToOne, OneToMany, EnumField, StringField } from 'warthog';
-
-import { Column } from 'typeorm';
-import { Field } from 'type-graphql';
-import { WarthogField } from 'warthog';
-
-import { DataObjectOwner } from '../variants/variants.model';
-
-import { Worker } from '../worker/worker.model';
-import { Channel } from '../channel/channel.model';
-import { Video } from '../video/video.model';
-
-import { LiaisonJudgement } from '../enums/enums';
-export { LiaisonJudgement };
-
-@Model({ api: { description: `Manages content ids, type and storage provider decision about it` } })
-export class DataObject extends BaseModel {
-  @Column('jsonb')
-  @WarthogField('json')
-  @Field((type) => DataObjectOwner, {
-    description: `Content owner`,
-  })
-  owner!: typeof DataObjectOwner;
-
-  @IntField({
-    description: `Content added at`,
-  })
-  createdInBlock!: number;
-
-  @IntField({
-    description: `Content type id`,
-  })
-  typeId!: number;
-
-  // Size is meant to be integer, but since `IntField` represents only 4-bytes long number
-  // (sadly, `dataType: bigint` settings only fixes DB, but GraphQL server still uses 4-bytes)
-  // `NumericField` seems to always return string (when using transform directive number<->string)
-  // `FloatField` field fixes this issue.
-  @FloatField({
-    description: `Content size in bytes`,
-  })
-  size!: number;
-
-  @ManyToOne(() => Worker, (param: Worker) => param.dataObjects, {
-    skipGraphQLField: true,
-    nullable: true,
-    modelName: 'DataObject',
-    relModelName: 'Worker',
-    propertyName: 'liaison',
-  })
-  liaison?: Worker;
-
-  @EnumField('LiaisonJudgement', LiaisonJudgement, {
-    description: `Storage provider as liaison judgment`,
-  })
-  liaisonJudgement!: LiaisonJudgement;
-
-  @StringField({
-    description: `IPFS content id`,
-  })
-  ipfsContentId!: string;
-
-  @StringField({
-    description: `Joystream runtime content`,
-  })
-  joystreamContentId!: string;
-
-  @OneToMany(() => Channel, (param: Channel) => param.coverPhotoDataObject, {
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'DataObject',
-    relModelName: 'Channel',
-    propertyName: 'channelcoverPhotoDataObject',
-  })
-  channelcoverPhotoDataObject?: Channel[];
-
-  @OneToMany(() => Channel, (param: Channel) => param.avatarPhotoDataObject, {
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'DataObject',
-    relModelName: 'Channel',
-    propertyName: 'channelavatarPhotoDataObject',
-  })
-  channelavatarPhotoDataObject?: Channel[];
-
-  @OneToMany(() => Video, (param: Video) => param.thumbnailPhotoDataObject, {
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'DataObject',
-    relModelName: 'VideoMediaMetadata',
-    propertyName: 'videothumbnailPhotoDataObject',
-  })
-  videothumbnailPhotoDataObject?: Video[];
-
-  @OneToMany(() => Video, (param: Video) => param.mediaDataObject, {
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'DataObject',
-    relModelName: 'VideoMediaMetadata',
-    propertyName: 'videomediaDataObject',
-  })
-  videomediaDataObject?: Video[];
-
-  constructor(init?: Partial<DataObject>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 188
query-node/generated/graphql-server/src/modules/data-object/data-object.resolver.ts

@@ -1,188 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  DataObjectCreateInput,
-  DataObjectCreateManyArgs,
-  DataObjectUpdateArgs,
-  DataObjectWhereArgs,
-  DataObjectWhereInput,
-  DataObjectWhereUniqueInput,
-  DataObjectOrderByEnum,
-} from '../../../generated';
-
-import { DataObject } from './data-object.model';
-import { DataObjectService } from './data-object.service';
-
-import { Worker } from '../worker/worker.model';
-import { Channel } from '../channel/channel.model';
-import { Video } from '../video/video.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class DataObjectEdge {
-  @Field(() => DataObject, { nullable: false })
-  node!: DataObject;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class DataObjectConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [DataObjectEdge], { nullable: false })
-  edges!: DataObjectEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class DataObjectConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => DataObjectWhereInput, { nullable: true })
-  where?: DataObjectWhereInput;
-
-  @Field(() => DataObjectOrderByEnum, { nullable: true })
-  orderBy?: [DataObjectOrderByEnum];
-}
-
-@Resolver(DataObject)
-export class DataObjectResolver {
-  constructor(@Inject('DataObjectService') public readonly service: DataObjectService) {}
-
-  @Query(() => [DataObject])
-  async dataObjects(
-    @Args() { where, orderBy, limit, offset }: DataObjectWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<DataObject[]> {
-    return this.service.find<DataObjectWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => DataObject, { nullable: true })
-  async dataObjectByUniqueInput(
-    @Arg('where') where: DataObjectWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<DataObject | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => DataObjectConnection)
-  async dataObjectsConnection(
-    @Args() { where, orderBy, ...pageOptions }: DataObjectConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<DataObjectConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<DataObjectWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<DataObjectConnection>;
-  }
-
-  @FieldResolver(() => Worker)
-  async liaison(@Root() r: DataObject): Promise<Worker | null> {
-    const result = await getConnection()
-      .getRepository(DataObject)
-      .findOne(r.id, { relations: ['liaison'] });
-    if (result && result.liaison !== undefined) {
-      return result.liaison;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => Channel)
-  async channelcoverPhotoDataObject(@Root() r: DataObject): Promise<Channel[] | null> {
-    const result = await getConnection()
-      .getRepository(DataObject)
-      .findOne(r.id, { relations: ['channelcoverPhotoDataObject'] });
-    if (result && result.channelcoverPhotoDataObject !== undefined) {
-      return result.channelcoverPhotoDataObject;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => Channel)
-  async channelavatarPhotoDataObject(@Root() r: DataObject): Promise<Channel[] | null> {
-    const result = await getConnection()
-      .getRepository(DataObject)
-      .findOne(r.id, { relations: ['channelavatarPhotoDataObject'] });
-    if (result && result.channelavatarPhotoDataObject !== undefined) {
-      return result.channelavatarPhotoDataObject;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => Video)
-  async videothumbnailPhotoDataObject(@Root() r: DataObject): Promise<Video[] | null> {
-    const result = await getConnection()
-      .getRepository(DataObject)
-      .findOne(r.id, { relations: ['videothumbnailPhotoDataObject'] });
-    if (result && result.videothumbnailPhotoDataObject !== undefined) {
-      return result.videothumbnailPhotoDataObject;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => Video)
-  async videomediaDataObject(@Root() r: DataObject): Promise<Video[] | null> {
-    const result = await getConnection()
-      .getRepository(DataObject)
-      .findOne(r.id, { relations: ['videomediaDataObject'] });
-    if (result && result.videomediaDataObject !== undefined) {
-      return result.videomediaDataObject;
-    }
-    return null;
-  }
-}

+ 0 - 31
query-node/generated/graphql-server/src/modules/data-object/data-object.service.ts

@@ -1,31 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { DataObject } from './data-object.model';
-
-@Service('DataObjectService')
-export class DataObjectService extends BaseService<DataObject> {
-  constructor(@InjectRepository(DataObject) protected readonly repository: Repository<DataObject>) {
-    super(DataObject, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<DataObject[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-    if (!f.includes('owner')) {
-      f = [...f, 'owner'];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 23
query-node/generated/graphql-server/src/modules/enums/enums.ts

@@ -1,23 +0,0 @@
-export enum Network {
-  BABYLON = 'BABYLON',
-  ALEXANDRIA = 'ALEXANDRIA',
-  ROME = 'ROME',
-}
-export enum MembershipEntryMethod {
-  PAID = 'PAID',
-  SCREENING = 'SCREENING',
-  GENESIS = 'GENESIS',
-}
-export enum AssetAvailability {
-  ACCEPTED = 'ACCEPTED',
-  PENDING = 'PENDING',
-  INVALID = 'INVALID',
-}
-export enum LiaisonJudgement {
-  PENDING = 'PENDING',
-  ACCEPTED = 'ACCEPTED',
-}
-export enum WorkerType {
-  GATEWAY = 'GATEWAY',
-  STORAGE = 'STORAGE',
-}

+ 0 - 36
query-node/generated/graphql-server/src/modules/language/language.model.ts

@@ -1,36 +0,0 @@
-import { BaseModel, IntField, Model, OneToMany, StringField } from 'warthog';
-
-import { Channel } from '../channel/channel.model';
-import { Video } from '../video/video.model';
-
-@Model({ api: {} })
-export class Language extends BaseModel {
-  @StringField({
-    description: `Language identifier ISO 639-1`,
-  })
-  iso!: string;
-
-  @IntField({})
-  createdInBlock!: number;
-
-  @OneToMany(() => Channel, (param: Channel) => param.language, {
-    nullable: true, cascade: ["insert", "update"],
-    modelName: 'Language',
-    relModelName: 'Channel',
-    propertyName: 'channellanguage',
-  })
-  channellanguage?: Channel[];
-
-  @OneToMany(() => Video, (param: Video) => param.language, {
-    nullable: true, cascade: ["insert", "update"],
-    modelName: 'Language',
-    relModelName: 'Video',
-    propertyName: 'videolanguage',
-  })
-  videolanguage?: Video[];
-
-  constructor(init?: Partial<Language>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 154
query-node/generated/graphql-server/src/modules/language/language.resolver.ts

@@ -1,154 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  LanguageCreateInput,
-  LanguageCreateManyArgs,
-  LanguageUpdateArgs,
-  LanguageWhereArgs,
-  LanguageWhereInput,
-  LanguageWhereUniqueInput,
-  LanguageOrderByEnum,
-} from '../../../generated';
-
-import { Language } from './language.model';
-import { LanguageService } from './language.service';
-
-import { Channel } from '../channel/channel.model';
-import { Video } from '../video/video.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class LanguageEdge {
-  @Field(() => Language, { nullable: false })
-  node!: Language;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class LanguageConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [LanguageEdge], { nullable: false })
-  edges!: LanguageEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class LanguageConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => LanguageWhereInput, { nullable: true })
-  where?: LanguageWhereInput;
-
-  @Field(() => LanguageOrderByEnum, { nullable: true })
-  orderBy?: [LanguageOrderByEnum];
-}
-
-@Resolver(Language)
-export class LanguageResolver {
-  constructor(@Inject('LanguageService') public readonly service: LanguageService) {}
-
-  @Query(() => [Language])
-  async languages(
-    @Args() { where, orderBy, limit, offset }: LanguageWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<Language[]> {
-    return this.service.find<LanguageWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => Language, { nullable: true })
-  async languageByUniqueInput(
-    @Arg('where') where: LanguageWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<Language | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => LanguageConnection)
-  async languagesConnection(
-    @Args() { where, orderBy, ...pageOptions }: LanguageConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<LanguageConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<LanguageWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<LanguageConnection>;
-  }
-
-  @FieldResolver(() => Channel)
-  async channellanguage(@Root() r: Language): Promise<Channel[] | null> {
-    const result = await getConnection()
-      .getRepository(Language)
-      .findOne(r.id, { relations: ['channellanguage'] });
-    if (result && result.channellanguage !== undefined) {
-      return result.channellanguage;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => Video)
-  async videolanguage(@Root() r: Language): Promise<Video[] | null> {
-    const result = await getConnection()
-      .getRepository(Language)
-      .findOne(r.id, { relations: ['videolanguage'] });
-    if (result && result.videolanguage !== undefined) {
-      return result.videolanguage;
-    }
-    return null;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/language/language.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { Language } from './language.model';
-
-@Service('LanguageService')
-export class LanguageService extends BaseService<Language> {
-  constructor(@InjectRepository(Language) protected readonly repository: Repository<Language>) {
-    super(Language, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<Language[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 38
query-node/generated/graphql-server/src/modules/license/license.model.ts

@@ -1,38 +0,0 @@
-import { BaseModel, IntField, Model, OneToMany, StringField } from 'warthog';
-
-import { Video } from '../video/video.model';
-
-@Model({ api: {} })
-export class License extends BaseModel {
-  @IntField({
-    nullable: true,
-    description: `License code defined by Joystream`,
-  })
-  code?: number;
-
-  @StringField({
-    nullable: true,
-    description: `Attribution (if required by the license)`,
-  })
-  attribution?: string;
-
-  @StringField({
-    nullable: true,
-    description: `Custom license content`,
-  })
-  customText?: string;
-
-  @OneToMany(() => Video, (param: Video) => param.license, { 
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'License',
-    relModelName: 'Video',
-    propertyName: 'videolanguage',
-  })
-  videolicense?: Video[];
-
-  constructor(init?: Partial<License>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 142
query-node/generated/graphql-server/src/modules/license/license.resolver.ts

@@ -1,142 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  LicenseCreateInput,
-  LicenseCreateManyArgs,
-  LicenseUpdateArgs,
-  LicenseWhereArgs,
-  LicenseWhereInput,
-  LicenseWhereUniqueInput,
-  LicenseOrderByEnum,
-} from '../../../generated';
-
-import { License } from './license.model';
-import { LicenseService } from './license.service';
-
-import { Video } from '../video/video.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class LicenseEdge {
-  @Field(() => License, { nullable: false })
-  node!: License;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class LicenseConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [LicenseEdge], { nullable: false })
-  edges!: LicenseEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class LicenseConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => LicenseWhereInput, { nullable: true })
-  where?: LicenseWhereInput;
-
-  @Field(() => LicenseOrderByEnum, { nullable: true })
-  orderBy?: [LicenseOrderByEnum];
-}
-
-@Resolver(License)
-export class LicenseResolver {
-  constructor(@Inject('LicenseService') public readonly service: LicenseService) {}
-
-  @Query(() => [License])
-  async licenses(
-    @Args() { where, orderBy, limit, offset }: LicenseWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<License[]> {
-    return this.service.find<LicenseWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => License, { nullable: true })
-  async licenseByUniqueInput(
-    @Arg('where') where: LicenseWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<License | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => LicenseConnection)
-  async licensesConnection(
-    @Args() { where, orderBy, ...pageOptions }: LicenseConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<LicenseConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<LicenseWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<LicenseConnection>;
-  }
-
-  @FieldResolver(() => Video)
-  async videolicense(@Root() r: License): Promise<Video[] | null> {
-    const result = await getConnection()
-      .getRepository(License)
-      .findOne(r.id, { relations: ['videolicense'] });
-    if (result && result.videolicense !== undefined) {
-      return result.videolicense;
-    }
-    return null;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/license/license.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { License } from './license.model';
-
-@Service('LicenseService')
-export class LicenseService extends BaseService<License> {
-  constructor(@InjectRepository(License) protected readonly repository: Repository<License>) {
-    super(License, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<License[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 66
query-node/generated/graphql-server/src/modules/membership/membership.model.ts

@@ -1,66 +0,0 @@
-import { BaseModel, IntField, Model, OneToMany, EnumField, StringField } from 'warthog';
-
-import { Channel } from '../channel/channel.model';
-
-import { MembershipEntryMethod } from '../enums/enums';
-export { MembershipEntryMethod };
-
-@Model({ api: { description: `Stored information about a registered user` } })
-export class Membership extends BaseModel {
-  @StringField({
-    description: `The unique handle chosen by member`,
-    unique: true,
-  })
-  handle!: string;
-
-  @StringField({
-    nullable: true,
-    description: `A Url to member's Avatar image`,
-  })
-  avatarUri?: string;
-
-  @StringField({
-    nullable: true,
-    description: `Short text chosen by member to share information about themselves`,
-  })
-  about?: string;
-
-  @StringField({
-    description: `Member's controller account id`,
-  })
-  controllerAccount!: string;
-
-  @StringField({
-    description: `Member's root account id`,
-  })
-  rootAccount!: string;
-
-  @IntField({
-    description: `Blocknumber when member was registered`,
-  })
-  createdInBlock!: number;
-
-  @EnumField('MembershipEntryMethod', MembershipEntryMethod, {
-    description: `How the member was registered`,
-  })
-  entry!: MembershipEntryMethod;
-
-  @IntField({
-    nullable: true,
-    description: `The type of subscription the member has purchased if any.`,
-  })
-  subscription?: number;
-
-  @OneToMany(() => Channel, (param: Channel) => param.ownerMember, {
-    cascade: ["insert", "update"],
-    modelName: 'Membership',
-    relModelName: 'Channel',
-    propertyName: 'channels',
-  })
-  channels?: Channel[];
-
-  constructor(init?: Partial<Membership>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 142
query-node/generated/graphql-server/src/modules/membership/membership.resolver.ts

@@ -1,142 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  MembershipCreateInput,
-  MembershipCreateManyArgs,
-  MembershipUpdateArgs,
-  MembershipWhereArgs,
-  MembershipWhereInput,
-  MembershipWhereUniqueInput,
-  MembershipOrderByEnum,
-} from '../../../generated';
-
-import { Membership } from './membership.model';
-import { MembershipService } from './membership.service';
-
-import { Channel } from '../channel/channel.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class MembershipEdge {
-  @Field(() => Membership, { nullable: false })
-  node!: Membership;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class MembershipConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [MembershipEdge], { nullable: false })
-  edges!: MembershipEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class MembershipConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => MembershipWhereInput, { nullable: true })
-  where?: MembershipWhereInput;
-
-  @Field(() => MembershipOrderByEnum, { nullable: true })
-  orderBy?: [MembershipOrderByEnum];
-}
-
-@Resolver(Membership)
-export class MembershipResolver {
-  constructor(@Inject('MembershipService') public readonly service: MembershipService) {}
-
-  @Query(() => [Membership])
-  async memberships(
-    @Args() { where, orderBy, limit, offset }: MembershipWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<Membership[]> {
-    return this.service.find<MembershipWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => Membership, { nullable: true })
-  async membershipByUniqueInput(
-    @Arg('where') where: MembershipWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<Membership | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => MembershipConnection)
-  async membershipsConnection(
-    @Args() { where, orderBy, ...pageOptions }: MembershipConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<MembershipConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<MembershipWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<MembershipConnection>;
-  }
-
-  @FieldResolver(() => Channel)
-  async channels(@Root() r: Membership): Promise<Channel[] | null> {
-    const result = await getConnection()
-      .getRepository(Membership)
-      .findOne(r.id, { relations: ['channels'] });
-    if (result && result.channels !== undefined) {
-      return result.channels;
-    }
-    return null;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/membership/membership.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { Membership } from './membership.model';
-
-@Service('MembershipService')
-export class MembershipService extends BaseService<Membership> {
-  constructor(@InjectRepository(Membership) protected readonly repository: Repository<Membership>) {
-    super(Membership, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<Membership[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 14
query-node/generated/graphql-server/src/modules/next-entity-id/next-entity-id.model.ts

@@ -1,14 +0,0 @@
-import { BaseModel, FloatField, Model, StringField } from 'warthog';
-
-@Model({ api: {} })
-export class NextEntityId extends BaseModel {
-  @FloatField({
-    description: `Next deterministic id for entities without custom id`,
-  })
-  nextId!: number;
-
-  constructor(init?: Partial<NextEntityId>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 128
query-node/generated/graphql-server/src/modules/next-entity-id/next-entity-id.resolver.ts

@@ -1,128 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  NextEntityIdCreateInput,
-  NextEntityIdCreateManyArgs,
-  NextEntityIdUpdateArgs,
-  NextEntityIdWhereArgs,
-  NextEntityIdWhereInput,
-  NextEntityIdWhereUniqueInput,
-  NextEntityIdOrderByEnum,
-} from '../../../generated';
-
-import { NextEntityId } from './next-entity-id.model';
-import { NextEntityIdService } from './next-entity-id.service';
-
-@ObjectType()
-export class NextEntityIdEdge {
-  @Field(() => NextEntityId, { nullable: false })
-  node!: NextEntityId;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class NextEntityIdConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [NextEntityIdEdge], { nullable: false })
-  edges!: NextEntityIdEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class NextEntityIdConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => NextEntityIdWhereInput, { nullable: true })
-  where?: NextEntityIdWhereInput;
-
-  @Field(() => NextEntityIdOrderByEnum, { nullable: true })
-  orderBy?: [NextEntityIdOrderByEnum];
-}
-
-@Resolver(NextEntityId)
-export class NextEntityIdResolver {
-  constructor(@Inject('NextEntityIdService') public readonly service: NextEntityIdService) {}
-
-  @Query(() => [NextEntityId])
-  async nextEntityIds(
-    @Args() { where, orderBy, limit, offset }: NextEntityIdWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<NextEntityId[]> {
-    return this.service.find<NextEntityIdWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => NextEntityId, { nullable: true })
-  async nextEntityIdByUniqueInput(
-    @Arg('where') where: NextEntityIdWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<NextEntityId | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => NextEntityIdConnection)
-  async nextEntityIdsConnection(
-    @Args() { where, orderBy, ...pageOptions }: NextEntityIdConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<NextEntityIdConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<NextEntityIdWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<NextEntityIdConnection>;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/next-entity-id/next-entity-id.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { NextEntityId } from './next-entity-id.model';
-
-@Service('NextEntityIdService')
-export class NextEntityIdService extends BaseService<NextEntityId> {
-  constructor(@InjectRepository(NextEntityId) protected readonly repository: Repository<NextEntityId>) {
-    super(NextEntityId, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<NextEntityId[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 46
query-node/generated/graphql-server/src/modules/queries/channelCategoriesByName.resolver.ts

@@ -1,46 +0,0 @@
-import { ObjectType, Field, Float, Int, Arg, Query, Resolver, createUnionType } from 'type-graphql';
-import { Inject } from 'typedi';
-import { ChannelCategory } from '../channel-category/channel-category.model';
-import { ChannelCategoriesByNameFTSService } from './channelCategoriesByName.service';
-
-import {  ChannelCategoryWhereInput,  } from '../../../generated';
-
-@ObjectType()
-export class ChannelCategoriesByNameFTSOutput {
-    @Field(type => ChannelCategoriesByNameSearchItem)
-    item!: typeof ChannelCategoriesByNameSearchItem
-
-    @Field(type => Float)
-    rank!: number
-
-    @Field(type => String)
-    isTypeOf!: string
-
-    @Field(type => String)
-    highlight!: string
-}
-
-export const ChannelCategoriesByNameSearchItem = createUnionType({
-    name: "ChannelCategoriesByNameSearchResult",
-    types: () => [
-        ChannelCategory,
-    ],
-});
-
-
-@Resolver()
-export default class ChannelCategoriesByNameFTSResolver {
-
-    constructor(@Inject('ChannelCategoriesByNameFTSService') readonly service: ChannelCategoriesByNameFTSService) {}
-
-    @Query(() => [ChannelCategoriesByNameFTSOutput])
-    async channelCategoriesByName(
-      @Arg('text') query: string, 
-      @Arg('limit', () => Int, { defaultValue: 5 }) limit: number,
-      @Arg('skip', () => Int, { defaultValue: 0 }) skip: number,
-      @Arg('whereChannelCategory', { nullable: true }) whereChannelCategory?: ChannelCategoryWhereInput,
-    ):Promise<Array<ChannelCategoriesByNameFTSOutput>>{
-      return this.service.search(query, limit, skip, whereChannelCategory,);
-    }
-
-}

+ 0 - 170
query-node/generated/graphql-server/src/modules/queries/channelCategoriesByName.service.ts

@@ -1,170 +0,0 @@
-import { Service, Inject } from 'typedi';
-import { ChannelCategory } from '../channel-category/channel-category.model';
-import { ChannelCategoryService } from '../channel-category/channel-category.service';
-
-import {  ChannelCategoryWhereInput,  } from '../../../generated';
-
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { Repository, getConnection, EntityManager } from 'typeorm';
-
-import { ChannelCategoriesByNameFTSOutput } from './channelCategoriesByName.resolver';
-
-interface RawSQLResult {
-    origin_table: string,
-    id: string,
-    rank: number,
-    highlight: string
-}
-
-@Service('ChannelCategoriesByNameFTSService')
-export class ChannelCategoriesByNameFTSService {
-    readonly channelCategoryRepository: Repository<ChannelCategory>;
-
-    constructor(
-      @InjectRepository(ChannelCategory) channelCategoryRepository: Repository<ChannelCategory>
-      ,@Inject('ChannelCategoryService') public readonly channelCategoryService: ChannelCategoryService 
-    ) {
-       this.channelCategoryRepository = channelCategoryRepository;  
-    }
-
-    /**
-    * It takes available where inputs for the full text search(fts), generates sql queries
-    * to be run with fts query.
-    * @param wheres WhereInput[]
-    */
-    private async processWheres(wheres: any[]): Promise<[string, any[], number]> {
-      const services: any[] = [this.channelCategoryService, ]
-      const repositories = [this.channelCategoryRepository, ]
-      let [queries, parameters, parameterCounter]: [string, any[], number] = [``, [], 0];
-
-      const generateSqlQuery = (table: string, where: string) =>
-        `
-  SELECT '${table}_' || id AS unique_id FROM "${table}" ` + where;
-
-      wheres.map((w, index) => {
-        if (w) {
-          let WHERE = `WHERE `;
-          // Combine queries
-          if (queries !== ``) {
-            queries = queries.concat(`
-  UNION ALL`);
-          }
-
-          const qb = services[index].buildFindQuery(w as any, undefined, undefined, ['id']);
-          // Add query parameters to the parameters list
-          parameters.push(...qb.getQueryAndParameters()[1]);
-
-          // Remove the last item which is "table_name"."deleted_at" IS NULL
-          qb.expressionMap.wheres.pop();
-
-          // Combine conditions
-          qb.expressionMap.wheres.map((w: any, index: number) => {
-            let c = ``;
-
-            if (w.condition.includes(`IN (:...`)) {
-              // IN condition parameters
-              const params: any[] = qb.expressionMap.parameters[`param${index}`];
-
-              // Do nothing when IN condition has an empty list of values
-              if (params.length !== 0) {
-                const paramsAsString = params
-                  .map((_: any) => {
-                    parameterCounter += 1;
-                    return `$${parameterCounter}`;
-                  })
-                  .join(`, `);
-                c = w.condition.replace(`(:...param${index})`, `(${paramsAsString})`);
-              }
-            } else if (w.condition.includes(`->>`)) {
-              parameterCounter += 1;
-              const m = w.condition.match(/->>.*\s=\s:.*/g);
-              if (m === null)
-                throw Error(`Failed to construct where condition for json field: ${w.condition}`);
-              c = w.condition.replace(/=\s:.*/g, `= $${parameterCounter}`);
-            } else {
-              parameterCounter += 1;
-              c = w.condition.replace(`:param${index}`, `$${parameterCounter}`);
-            }
-            WHERE = WHERE.concat(c, ` `, w.type.toUpperCase(), ` `);
-          });
-
-          // Remove unnecessary AND at the end.
-          WHERE = WHERE.slice(0, -4);
-
-          // Add new query to queryString
-          queries = queries.concat(generateSqlQuery(repositories[index].metadata.tableName, WHERE));
-        }
-      });
-
-      queries = `
-  WITH selected_ids AS (`.concat(
-        queries,
-        `
-  )`
-      );
-      return [queries, parameters, parameterCounter];
-    }
-
-    async search(
-      text: string,
-      limit = 5,
-      skip = 0,
-      whereChannelCategory?: ChannelCategoryWhereInput,
-    ): Promise<ChannelCategoriesByNameFTSOutput[]> {
-        const wheres = [whereChannelCategory, ]
-        let [queries, parameters, parameterCounter]: [string, any[], number] = [``, [], 0];
-
-        if (wheres.some(f => f !== undefined)) {
-          [queries, parameters, parameterCounter] = await this.processWheres(wheres);
-        }
-        parameters.push(...[text, limit, skip]);
-
-        return getConnection().transaction<ChannelCategoriesByNameFTSOutput[]>(
-          'REPEATABLE READ',
-          async (em: EntityManager) => {
-            const query = `
-              ${queries}
-              SELECT origin_table, id, 
-                  ts_rank(tsv, phraseto_tsquery('english', $${parameterCounter + 1})) as rank,
-                  ts_headline(document, phraseto_tsquery('english', $${parameterCounter +
-                    1})) as highlight
-              FROM channel_categories_by_name_view
-              WHERE phraseto_tsquery('english', $${parameterCounter + 1}) @@ tsv
-              ${
-                queries !== ``
-                  ? `AND unique_id IN (SELECT unique_id FROM selected_ids)`
-                  : ``
-              } 
-              ORDER BY rank DESC
-              LIMIT $${parameterCounter + 2}
-              OFFSET $${parameterCounter + 3}`;
-            const results = (await em.query(query, parameters)) as RawSQLResult[];
-
-            if (results.length === 0) {
-                return [];
-            }
-
-            const idMap:{ [id:string]: RawSQLResult } = {};
-            results.forEach(item => idMap[item.id] = item);
-            const ids: string[] = results.map(item => item.id);
-            
-            const channelCategorys: ChannelCategory[] = await em.createQueryBuilder<ChannelCategory>(ChannelCategory, 'ChannelCategory')
-                        .where("id IN (:...ids)", { ids }).getMany();
-
-            const enhancedEntities = [...channelCategorys ].map((e) => {
-                return { item: e, 
-                    rank: idMap[e.id].rank, 
-                    highlight: idMap[e.id].highlight,
-                    isTypeOf: idMap[e.id].origin_table } as ChannelCategoriesByNameFTSOutput;
-            });
-
-            return enhancedEntities.reduce((accum: ChannelCategoriesByNameFTSOutput[], entity) => {
-                if (entity.rank > 0) {
-                    accum.push(entity);
-                }
-                return accum;
-            }, []).sort((a,b) => b.rank - a.rank);
-
-        })
-    }
-}

+ 0 - 46
query-node/generated/graphql-server/src/modules/queries/membersByHandle.resolver.ts

@@ -1,46 +0,0 @@
-import { ObjectType, Field, Float, Int, Arg, Query, Resolver, createUnionType } from 'type-graphql';
-import { Inject } from 'typedi';
-import { Membership } from '../membership/membership.model';
-import { MembersByHandleFTSService } from './membersByHandle.service';
-
-import {  MembershipWhereInput,  } from '../../../generated';
-
-@ObjectType()
-export class MembersByHandleFTSOutput {
-    @Field(type => MembersByHandleSearchItem)
-    item!: typeof MembersByHandleSearchItem
-
-    @Field(type => Float)
-    rank!: number
-
-    @Field(type => String)
-    isTypeOf!: string
-
-    @Field(type => String)
-    highlight!: string
-}
-
-export const MembersByHandleSearchItem = createUnionType({
-    name: "MembersByHandleSearchResult",
-    types: () => [
-        Membership,
-    ],
-});
-
-
-@Resolver()
-export default class MembersByHandleFTSResolver {
-
-    constructor(@Inject('MembersByHandleFTSService') readonly service: MembersByHandleFTSService) {}
-
-    @Query(() => [MembersByHandleFTSOutput])
-    async membersByHandle(
-      @Arg('text') query: string, 
-      @Arg('limit', () => Int, { defaultValue: 5 }) limit: number,
-      @Arg('skip', () => Int, { defaultValue: 0 }) skip: number,
-      @Arg('whereMembership', { nullable: true }) whereMembership?: MembershipWhereInput,
-    ):Promise<Array<MembersByHandleFTSOutput>>{
-      return this.service.search(query, limit, skip, whereMembership,);
-    }
-
-}

+ 0 - 170
query-node/generated/graphql-server/src/modules/queries/membersByHandle.service.ts

@@ -1,170 +0,0 @@
-import { Service, Inject } from 'typedi';
-import { Membership } from '../membership/membership.model';
-import { MembershipService } from '../membership/membership.service';
-
-import {  MembershipWhereInput,  } from '../../../generated';
-
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { Repository, getConnection, EntityManager } from 'typeorm';
-
-import { MembersByHandleFTSOutput } from './membersByHandle.resolver';
-
-interface RawSQLResult {
-    origin_table: string,
-    id: string,
-    rank: number,
-    highlight: string
-}
-
-@Service('MembersByHandleFTSService')
-export class MembersByHandleFTSService {
-    readonly membershipRepository: Repository<Membership>;
-
-    constructor(
-      @InjectRepository(Membership) membershipRepository: Repository<Membership>
-      ,@Inject('MembershipService') public readonly membershipService: MembershipService 
-    ) {
-       this.membershipRepository = membershipRepository;  
-    }
-
-    /**
-    * It takes available where inputs for the full text search(fts), generates sql queries
-    * to be run with fts query.
-    * @param wheres WhereInput[]
-    */
-    private async processWheres(wheres: any[]): Promise<[string, any[], number]> {
-      const services: any[] = [this.membershipService, ]
-      const repositories = [this.membershipRepository, ]
-      let [queries, parameters, parameterCounter]: [string, any[], number] = [``, [], 0];
-
-      const generateSqlQuery = (table: string, where: string) =>
-        `
-  SELECT '${table}_' || id AS unique_id FROM "${table}" ` + where;
-
-      wheres.map((w, index) => {
-        if (w) {
-          let WHERE = `WHERE `;
-          // Combine queries
-          if (queries !== ``) {
-            queries = queries.concat(`
-  UNION ALL`);
-          }
-
-          const qb = services[index].buildFindQuery(w as any, undefined, undefined, ['id']);
-          // Add query parameters to the parameters list
-          parameters.push(...qb.getQueryAndParameters()[1]);
-
-          // Remove the last item which is "table_name"."deleted_at" IS NULL
-          qb.expressionMap.wheres.pop();
-
-          // Combine conditions
-          qb.expressionMap.wheres.map((w: any, index: number) => {
-            let c = ``;
-
-            if (w.condition.includes(`IN (:...`)) {
-              // IN condition parameters
-              const params: any[] = qb.expressionMap.parameters[`param${index}`];
-
-              // Do nothing when IN condition has an empty list of values
-              if (params.length !== 0) {
-                const paramsAsString = params
-                  .map((_: any) => {
-                    parameterCounter += 1;
-                    return `$${parameterCounter}`;
-                  })
-                  .join(`, `);
-                c = w.condition.replace(`(:...param${index})`, `(${paramsAsString})`);
-              }
-            } else if (w.condition.includes(`->>`)) {
-              parameterCounter += 1;
-              const m = w.condition.match(/->>.*\s=\s:.*/g);
-              if (m === null)
-                throw Error(`Failed to construct where condition for json field: ${w.condition}`);
-              c = w.condition.replace(/=\s:.*/g, `= $${parameterCounter}`);
-            } else {
-              parameterCounter += 1;
-              c = w.condition.replace(`:param${index}`, `$${parameterCounter}`);
-            }
-            WHERE = WHERE.concat(c, ` `, w.type.toUpperCase(), ` `);
-          });
-
-          // Remove unnecessary AND at the end.
-          WHERE = WHERE.slice(0, -4);
-
-          // Add new query to queryString
-          queries = queries.concat(generateSqlQuery(repositories[index].metadata.tableName, WHERE));
-        }
-      });
-
-      queries = `
-  WITH selected_ids AS (`.concat(
-        queries,
-        `
-  )`
-      );
-      return [queries, parameters, parameterCounter];
-    }
-
-    async search(
-      text: string,
-      limit = 5,
-      skip = 0,
-      whereMembership?: MembershipWhereInput,
-    ): Promise<MembersByHandleFTSOutput[]> {
-        const wheres = [whereMembership, ]
-        let [queries, parameters, parameterCounter]: [string, any[], number] = [``, [], 0];
-
-        if (wheres.some(f => f !== undefined)) {
-          [queries, parameters, parameterCounter] = await this.processWheres(wheres);
-        }
-        parameters.push(...[text, limit, skip]);
-
-        return getConnection().transaction<MembersByHandleFTSOutput[]>(
-          'REPEATABLE READ',
-          async (em: EntityManager) => {
-            const query = `
-              ${queries}
-              SELECT origin_table, id, 
-                  ts_rank(tsv, phraseto_tsquery('english', $${parameterCounter + 1})) as rank,
-                  ts_headline(document, phraseto_tsquery('english', $${parameterCounter +
-                    1})) as highlight
-              FROM members_by_handle_view
-              WHERE phraseto_tsquery('english', $${parameterCounter + 1}) @@ tsv
-              ${
-                queries !== ``
-                  ? `AND unique_id IN (SELECT unique_id FROM selected_ids)`
-                  : ``
-              } 
-              ORDER BY rank DESC
-              LIMIT $${parameterCounter + 2}
-              OFFSET $${parameterCounter + 3}`;
-            const results = (await em.query(query, parameters)) as RawSQLResult[];
-
-            if (results.length === 0) {
-                return [];
-            }
-
-            const idMap:{ [id:string]: RawSQLResult } = {};
-            results.forEach(item => idMap[item.id] = item);
-            const ids: string[] = results.map(item => item.id);
-            
-            const memberships: Membership[] = await em.createQueryBuilder<Membership>(Membership, 'Membership')
-                        .where("id IN (:...ids)", { ids }).getMany();
-
-            const enhancedEntities = [...memberships ].map((e) => {
-                return { item: e, 
-                    rank: idMap[e.id].rank, 
-                    highlight: idMap[e.id].highlight,
-                    isTypeOf: idMap[e.id].origin_table } as MembersByHandleFTSOutput;
-            });
-
-            return enhancedEntities.reduce((accum: MembersByHandleFTSOutput[], entity) => {
-                if (entity.rank > 0) {
-                    accum.push(entity);
-                }
-                return accum;
-            }, []).sort((a,b) => b.rank - a.rank);
-
-        })
-    }
-}

+ 0 - 49
query-node/generated/graphql-server/src/modules/queries/search.resolver.ts

@@ -1,49 +0,0 @@
-import { ObjectType, Field, Float, Int, Arg, Query, Resolver, createUnionType } from 'type-graphql';
-import { Inject } from 'typedi';
-import { Channel } from '../channel/channel.model';
-import { Video } from '../video/video.model';
-import { SearchFTSService } from './search.service';
-
-import {  ChannelWhereInput,  VideoWhereInput,  } from '../../../generated';
-
-@ObjectType()
-export class SearchFTSOutput {
-    @Field(type => SearchSearchItem)
-    item!: typeof SearchSearchItem
-
-    @Field(type => Float)
-    rank!: number
-
-    @Field(type => String)
-    isTypeOf!: string
-
-    @Field(type => String)
-    highlight!: string
-}
-
-export const SearchSearchItem = createUnionType({
-    name: "SearchSearchResult",
-    types: () => [
-        Channel,
-        Video,
-    ],
-});
-
-
-@Resolver()
-export default class SearchFTSResolver {
-
-    constructor(@Inject('SearchFTSService') readonly service: SearchFTSService) {}
-
-    @Query(() => [SearchFTSOutput])
-    async search(
-      @Arg('text') query: string, 
-      @Arg('limit', () => Int, { defaultValue: 5 }) limit: number,
-      @Arg('skip', () => Int, { defaultValue: 0 }) skip: number,
-      @Arg('whereChannel', { nullable: true }) whereChannel?: ChannelWhereInput,
-      @Arg('whereVideo', { nullable: true }) whereVideo?: VideoWhereInput,
-    ):Promise<Array<SearchFTSOutput>>{
-      return this.service.search(query, limit, skip, whereChannel,whereVideo,);
-    }
-
-}

+ 0 - 175
query-node/generated/graphql-server/src/modules/queries/search.service.ts

@@ -1,175 +0,0 @@
-import { Service, Inject } from 'typedi';
-import { Channel } from '../channel/channel.model';
-import { ChannelService } from '../channel/channel.service';
-import { Video } from '../video/video.model';
-import { VideoService } from '../video/video.service';
-
-import {  ChannelWhereInput,  VideoWhereInput,  } from '../../../generated';
-
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { Repository, getConnection, EntityManager } from 'typeorm';
-
-import { SearchFTSOutput } from './search.resolver';
-
-interface RawSQLResult {
-    origin_table: string,
-    id: string,
-    rank: number,
-    highlight: string
-}
-
-@Service('SearchFTSService')
-export class SearchFTSService {
-    readonly channelRepository: Repository<Channel>;
-    readonly videoRepository: Repository<Video>;
-
-    constructor(
-      @InjectRepository(Channel) channelRepository: Repository<Channel>,@InjectRepository(Video) videoRepository: Repository<Video>
-      ,@Inject('ChannelService') public readonly channelService: ChannelService ,@Inject('VideoService') public readonly videoService: VideoService 
-    ) {
-       this.channelRepository = channelRepository;  this.videoRepository = videoRepository;  
-    }
-
-    /**
-    * It takes available where inputs for the full text search(fts), generates sql queries
-    * to be run with fts query.
-    * @param wheres WhereInput[]
-    */
-    private async processWheres(wheres: any[]): Promise<[string, any[], number]> {
-      const services: any[] = [this.channelService, this.videoService, ]
-      const repositories = [this.channelRepository, this.videoRepository, ]
-      let [queries, parameters, parameterCounter]: [string, any[], number] = [``, [], 0];
-
-      const generateSqlQuery = (table: string, where: string) =>
-        `
-  SELECT '${table}_' || id AS unique_id FROM "${table}" ` + where;
-
-      wheres.map((w, index) => {
-        if (w) {
-          let WHERE = `WHERE `;
-          // Combine queries
-          if (queries !== ``) {
-            queries = queries.concat(`
-  UNION ALL`);
-          }
-
-          const qb = services[index].buildFindQuery(w as any, undefined, undefined, ['id']);
-          // Add query parameters to the parameters list
-          parameters.push(...qb.getQueryAndParameters()[1]);
-
-          // Remove the last item which is "table_name"."deleted_at" IS NULL
-          qb.expressionMap.wheres.pop();
-
-          // Combine conditions
-          qb.expressionMap.wheres.map((w: any, index: number) => {
-            let c = ``;
-
-            if (w.condition.includes(`IN (:...`)) {
-              // IN condition parameters
-              const params: any[] = qb.expressionMap.parameters[`param${index}`];
-
-              // Do nothing when IN condition has an empty list of values
-              if (params.length !== 0) {
-                const paramsAsString = params
-                  .map((_: any) => {
-                    parameterCounter += 1;
-                    return `$${parameterCounter}`;
-                  })
-                  .join(`, `);
-                c = w.condition.replace(`(:...param${index})`, `(${paramsAsString})`);
-              }
-            } else if (w.condition.includes(`->>`)) {
-              parameterCounter += 1;
-              const m = w.condition.match(/->>.*\s=\s:.*/g);
-              if (m === null)
-                throw Error(`Failed to construct where condition for json field: ${w.condition}`);
-              c = w.condition.replace(/=\s:.*/g, `= $${parameterCounter}`);
-            } else {
-              parameterCounter += 1;
-              c = w.condition.replace(`:param${index}`, `$${parameterCounter}`);
-            }
-            WHERE = WHERE.concat(c, ` `, w.type.toUpperCase(), ` `);
-          });
-
-          // Remove unnecessary AND at the end.
-          WHERE = WHERE.slice(0, -4);
-
-          // Add new query to queryString
-          queries = queries.concat(generateSqlQuery(repositories[index].metadata.tableName, WHERE));
-        }
-      });
-
-      queries = `
-  WITH selected_ids AS (`.concat(
-        queries,
-        `
-  )`
-      );
-      return [queries, parameters, parameterCounter];
-    }
-
-    async search(
-      text: string,
-      limit = 5,
-      skip = 0,
-      whereChannel?: ChannelWhereInput,whereVideo?: VideoWhereInput,
-    ): Promise<SearchFTSOutput[]> {
-        const wheres = [whereChannel, whereVideo, ]
-        let [queries, parameters, parameterCounter]: [string, any[], number] = [``, [], 0];
-
-        if (wheres.some(f => f !== undefined)) {
-          [queries, parameters, parameterCounter] = await this.processWheres(wheres);
-        }
-        parameters.push(...[text, limit, skip]);
-
-        return getConnection().transaction<SearchFTSOutput[]>(
-          'REPEATABLE READ',
-          async (em: EntityManager) => {
-            const query = `
-              ${queries}
-              SELECT origin_table, id, 
-                  ts_rank(tsv, phraseto_tsquery('english', $${parameterCounter + 1})) as rank,
-                  ts_headline(document, phraseto_tsquery('english', $${parameterCounter +
-                    1})) as highlight
-              FROM search_view
-              WHERE phraseto_tsquery('english', $${parameterCounter + 1}) @@ tsv
-              ${
-                queries !== ``
-                  ? `AND unique_id IN (SELECT unique_id FROM selected_ids)`
-                  : ``
-              } 
-              ORDER BY rank DESC
-              LIMIT $${parameterCounter + 2}
-              OFFSET $${parameterCounter + 3}`;
-            const results = (await em.query(query, parameters)) as RawSQLResult[];
-
-            if (results.length === 0) {
-                return [];
-            }
-
-            const idMap:{ [id:string]: RawSQLResult } = {};
-            results.forEach(item => idMap[item.id] = item);
-            const ids: string[] = results.map(item => item.id);
-            
-            const channels: Channel[] = await em.createQueryBuilder<Channel>(Channel, 'Channel')
-                        .where("id IN (:...ids)", { ids }).getMany();
-            const videos: Video[] = await em.createQueryBuilder<Video>(Video, 'Video')
-                        .where("id IN (:...ids)", { ids }).getMany();
-
-            const enhancedEntities = [...channels ,...videos ].map((e) => {
-                return { item: e, 
-                    rank: idMap[e.id].rank, 
-                    highlight: idMap[e.id].highlight,
-                    isTypeOf: idMap[e.id].origin_table } as SearchFTSOutput;
-            });
-
-            return enhancedEntities.reduce((accum: SearchFTSOutput[], entity) => {
-                if (entity.rank > 0) {
-                    accum.push(entity);
-                }
-                return accum;
-            }, []).sort((a,b) => b.rank - a.rank);
-
-        })
-    }
-}

+ 0 - 46
query-node/generated/graphql-server/src/modules/queries/videoCategoriesByName.resolver.ts

@@ -1,46 +0,0 @@
-import { ObjectType, Field, Float, Int, Arg, Query, Resolver, createUnionType } from 'type-graphql';
-import { Inject } from 'typedi';
-import { VideoCategory } from '../video-category/video-category.model';
-import { VideoCategoriesByNameFTSService } from './videoCategoriesByName.service';
-
-import {  VideoCategoryWhereInput,  } from '../../../generated';
-
-@ObjectType()
-export class VideoCategoriesByNameFTSOutput {
-    @Field(type => VideoCategoriesByNameSearchItem)
-    item!: typeof VideoCategoriesByNameSearchItem
-
-    @Field(type => Float)
-    rank!: number
-
-    @Field(type => String)
-    isTypeOf!: string
-
-    @Field(type => String)
-    highlight!: string
-}
-
-export const VideoCategoriesByNameSearchItem = createUnionType({
-    name: "VideoCategoriesByNameSearchResult",
-    types: () => [
-        VideoCategory,
-    ],
-});
-
-
-@Resolver()
-export default class VideoCategoriesByNameFTSResolver {
-
-    constructor(@Inject('VideoCategoriesByNameFTSService') readonly service: VideoCategoriesByNameFTSService) {}
-
-    @Query(() => [VideoCategoriesByNameFTSOutput])
-    async videoCategoriesByName(
-      @Arg('text') query: string, 
-      @Arg('limit', () => Int, { defaultValue: 5 }) limit: number,
-      @Arg('skip', () => Int, { defaultValue: 0 }) skip: number,
-      @Arg('whereVideoCategory', { nullable: true }) whereVideoCategory?: VideoCategoryWhereInput,
-    ):Promise<Array<VideoCategoriesByNameFTSOutput>>{
-      return this.service.search(query, limit, skip, whereVideoCategory,);
-    }
-
-}

+ 0 - 170
query-node/generated/graphql-server/src/modules/queries/videoCategoriesByName.service.ts

@@ -1,170 +0,0 @@
-import { Service, Inject } from 'typedi';
-import { VideoCategory } from '../video-category/video-category.model';
-import { VideoCategoryService } from '../video-category/video-category.service';
-
-import {  VideoCategoryWhereInput,  } from '../../../generated';
-
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { Repository, getConnection, EntityManager } from 'typeorm';
-
-import { VideoCategoriesByNameFTSOutput } from './videoCategoriesByName.resolver';
-
-interface RawSQLResult {
-    origin_table: string,
-    id: string,
-    rank: number,
-    highlight: string
-}
-
-@Service('VideoCategoriesByNameFTSService')
-export class VideoCategoriesByNameFTSService {
-    readonly videoCategoryRepository: Repository<VideoCategory>;
-
-    constructor(
-      @InjectRepository(VideoCategory) videoCategoryRepository: Repository<VideoCategory>
-      ,@Inject('VideoCategoryService') public readonly videoCategoryService: VideoCategoryService 
-    ) {
-       this.videoCategoryRepository = videoCategoryRepository;  
-    }
-
-    /**
-    * It takes available where inputs for the full text search(fts), generates sql queries
-    * to be run with fts query.
-    * @param wheres WhereInput[]
-    */
-    private async processWheres(wheres: any[]): Promise<[string, any[], number]> {
-      const services: any[] = [this.videoCategoryService, ]
-      const repositories = [this.videoCategoryRepository, ]
-      let [queries, parameters, parameterCounter]: [string, any[], number] = [``, [], 0];
-
-      const generateSqlQuery = (table: string, where: string) =>
-        `
-  SELECT '${table}_' || id AS unique_id FROM "${table}" ` + where;
-
-      wheres.map((w, index) => {
-        if (w) {
-          let WHERE = `WHERE `;
-          // Combine queries
-          if (queries !== ``) {
-            queries = queries.concat(`
-  UNION ALL`);
-          }
-
-          const qb = services[index].buildFindQuery(w as any, undefined, undefined, ['id']);
-          // Add query parameters to the parameters list
-          parameters.push(...qb.getQueryAndParameters()[1]);
-
-          // Remove the last item which is "table_name"."deleted_at" IS NULL
-          qb.expressionMap.wheres.pop();
-
-          // Combine conditions
-          qb.expressionMap.wheres.map((w: any, index: number) => {
-            let c = ``;
-
-            if (w.condition.includes(`IN (:...`)) {
-              // IN condition parameters
-              const params: any[] = qb.expressionMap.parameters[`param${index}`];
-
-              // Do nothing when IN condition has an empty list of values
-              if (params.length !== 0) {
-                const paramsAsString = params
-                  .map((_: any) => {
-                    parameterCounter += 1;
-                    return `$${parameterCounter}`;
-                  })
-                  .join(`, `);
-                c = w.condition.replace(`(:...param${index})`, `(${paramsAsString})`);
-              }
-            } else if (w.condition.includes(`->>`)) {
-              parameterCounter += 1;
-              const m = w.condition.match(/->>.*\s=\s:.*/g);
-              if (m === null)
-                throw Error(`Failed to construct where condition for json field: ${w.condition}`);
-              c = w.condition.replace(/=\s:.*/g, `= $${parameterCounter}`);
-            } else {
-              parameterCounter += 1;
-              c = w.condition.replace(`:param${index}`, `$${parameterCounter}`);
-            }
-            WHERE = WHERE.concat(c, ` `, w.type.toUpperCase(), ` `);
-          });
-
-          // Remove unnecessary AND at the end.
-          WHERE = WHERE.slice(0, -4);
-
-          // Add new query to queryString
-          queries = queries.concat(generateSqlQuery(repositories[index].metadata.tableName, WHERE));
-        }
-      });
-
-      queries = `
-  WITH selected_ids AS (`.concat(
-        queries,
-        `
-  )`
-      );
-      return [queries, parameters, parameterCounter];
-    }
-
-    async search(
-      text: string,
-      limit = 5,
-      skip = 0,
-      whereVideoCategory?: VideoCategoryWhereInput,
-    ): Promise<VideoCategoriesByNameFTSOutput[]> {
-        const wheres = [whereVideoCategory, ]
-        let [queries, parameters, parameterCounter]: [string, any[], number] = [``, [], 0];
-
-        if (wheres.some(f => f !== undefined)) {
-          [queries, parameters, parameterCounter] = await this.processWheres(wheres);
-        }
-        parameters.push(...[text, limit, skip]);
-
-        return getConnection().transaction<VideoCategoriesByNameFTSOutput[]>(
-          'REPEATABLE READ',
-          async (em: EntityManager) => {
-            const query = `
-              ${queries}
-              SELECT origin_table, id, 
-                  ts_rank(tsv, phraseto_tsquery('english', $${parameterCounter + 1})) as rank,
-                  ts_headline(document, phraseto_tsquery('english', $${parameterCounter +
-                    1})) as highlight
-              FROM video_categories_by_name_view
-              WHERE phraseto_tsquery('english', $${parameterCounter + 1}) @@ tsv
-              ${
-                queries !== ``
-                  ? `AND unique_id IN (SELECT unique_id FROM selected_ids)`
-                  : ``
-              } 
-              ORDER BY rank DESC
-              LIMIT $${parameterCounter + 2}
-              OFFSET $${parameterCounter + 3}`;
-            const results = (await em.query(query, parameters)) as RawSQLResult[];
-
-            if (results.length === 0) {
-                return [];
-            }
-
-            const idMap:{ [id:string]: RawSQLResult } = {};
-            results.forEach(item => idMap[item.id] = item);
-            const ids: string[] = results.map(item => item.id);
-            
-            const videoCategorys: VideoCategory[] = await em.createQueryBuilder<VideoCategory>(VideoCategory, 'VideoCategory')
-                        .where("id IN (:...ids)", { ids }).getMany();
-
-            const enhancedEntities = [...videoCategorys ].map((e) => {
-                return { item: e, 
-                    rank: idMap[e.id].rank, 
-                    highlight: idMap[e.id].highlight,
-                    isTypeOf: idMap[e.id].origin_table } as VideoCategoriesByNameFTSOutput;
-            });
-
-            return enhancedEntities.reduce((accum: VideoCategoriesByNameFTSOutput[], entity) => {
-                if (entity.rank > 0) {
-                    accum.push(entity);
-                }
-                return accum;
-            }, []).sort((a,b) => b.rank - a.rank);
-
-        })
-    }
-}

+ 0 - 85
query-node/generated/graphql-server/src/modules/variants/variants.model.ts

@@ -1,85 +0,0 @@
-import {
-  BaseModel,
-  BooleanField,
-  DateField,
-  FloatField,
-  IntField,
-  NumericField,
-  JSONField,
-  BytesField,
-  EnumField,
-  StringField,
-} from 'warthog';
-
-import { ObjectType, Field, createUnionType } from 'type-graphql';
-
-@ObjectType()
-export class DataObjectOwnerChannel {
-  public isTypeOf: string = 'DataObjectOwnerChannel';
-
-  @IntField({
-    description: `Channel identifier`,
-  })
-  channel!: number;
-
-  @IntField({
-    nullable: true,
-    description: `Variant needs to have at least one property. This value is not used.`,
-  })
-  dummy?: number;
-}
-@ObjectType()
-export class DataObjectOwnerCouncil {
-  public isTypeOf: string = 'DataObjectOwnerCouncil';
-
-  @IntField({
-    nullable: true,
-    description: `Variant needs to have at least one property. This value is not used.`,
-  })
-  dummy?: number;
-}
-@ObjectType()
-export class DataObjectOwnerDao {
-  public isTypeOf: string = 'DataObjectOwnerDao';
-
-  @IntField({
-    description: `DAO identifier`,
-  })
-  dao!: number;
-}
-@ObjectType()
-export class DataObjectOwnerMember {
-  public isTypeOf: string = 'DataObjectOwnerMember';
-
-  @IntField({
-    description: `Member identifier`,
-  })
-  member!: number;
-
-  @IntField({
-    nullable: true,
-    description: `Variant needs to have at least one property. This value is not used.`,
-  })
-  dummy?: number;
-}
-@ObjectType()
-export class DataObjectOwnerWorkingGroup {
-  public isTypeOf: string = 'DataObjectOwnerWorkingGroup';
-
-  @IntField({
-    description: `Working group identifier`,
-  })
-  workingGroup!: number;
-}
-
-export const DataObjectOwner = createUnionType({
-  name: 'DataObjectOwner',
-  types: () => [
-    DataObjectOwnerMember,
-    DataObjectOwnerChannel,
-    DataObjectOwnerDao,
-    DataObjectOwnerCouncil,
-    DataObjectOwnerWorkingGroup,
-  ],
-  resolveType: (value) => (value.isTypeOf ? value.isTypeOf : undefined),
-});

+ 0 - 28
query-node/generated/graphql-server/src/modules/video-category/video-category.model.ts

@@ -1,28 +0,0 @@
-import { BaseModel, IntField, Model, OneToMany, StringField } from 'warthog';
-
-import { Video } from '../video/video.model';
-
-@Model({ api: {} })
-export class VideoCategory extends BaseModel {
-  @StringField({
-    nullable: true,
-    description: `The name of the category`,
-  })
-  name?: string;
-
-  @OneToMany(() => Video, (param: Video) => param.category, {
-    cascade: ["insert", "update"],
-    modelName: 'VideoCategory',
-    relModelName: 'Video',
-    propertyName: 'videos',
-  })
-  videos?: Video[];
-
-  @IntField({})
-  createdInBlock!: number;
-
-  constructor(init?: Partial<VideoCategory>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 142
query-node/generated/graphql-server/src/modules/video-category/video-category.resolver.ts

@@ -1,142 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  VideoCategoryCreateInput,
-  VideoCategoryCreateManyArgs,
-  VideoCategoryUpdateArgs,
-  VideoCategoryWhereArgs,
-  VideoCategoryWhereInput,
-  VideoCategoryWhereUniqueInput,
-  VideoCategoryOrderByEnum,
-} from '../../../generated';
-
-import { VideoCategory } from './video-category.model';
-import { VideoCategoryService } from './video-category.service';
-
-import { Video } from '../video/video.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class VideoCategoryEdge {
-  @Field(() => VideoCategory, { nullable: false })
-  node!: VideoCategory;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class VideoCategoryConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [VideoCategoryEdge], { nullable: false })
-  edges!: VideoCategoryEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class VideoCategoryConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => VideoCategoryWhereInput, { nullable: true })
-  where?: VideoCategoryWhereInput;
-
-  @Field(() => VideoCategoryOrderByEnum, { nullable: true })
-  orderBy?: [VideoCategoryOrderByEnum];
-}
-
-@Resolver(VideoCategory)
-export class VideoCategoryResolver {
-  constructor(@Inject('VideoCategoryService') public readonly service: VideoCategoryService) {}
-
-  @Query(() => [VideoCategory])
-  async videoCategories(
-    @Args() { where, orderBy, limit, offset }: VideoCategoryWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<VideoCategory[]> {
-    return this.service.find<VideoCategoryWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => VideoCategory, { nullable: true })
-  async videoCategoryByUniqueInput(
-    @Arg('where') where: VideoCategoryWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<VideoCategory | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => VideoCategoryConnection)
-  async videoCategoriesConnection(
-    @Args() { where, orderBy, ...pageOptions }: VideoCategoryConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<VideoCategoryConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<VideoCategoryWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<VideoCategoryConnection>;
-  }
-
-  @FieldResolver(() => Video)
-  async videos(@Root() r: VideoCategory): Promise<Video[] | null> {
-    const result = await getConnection()
-      .getRepository(VideoCategory)
-      .findOne(r.id, { relations: ['videos'] });
-    if (result && result.videos !== undefined) {
-      return result.videos;
-    }
-    return null;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/video-category/video-category.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { VideoCategory } from './video-category.model';
-
-@Service('VideoCategoryService')
-export class VideoCategoryService extends BaseService<VideoCategory> {
-  constructor(@InjectRepository(VideoCategory) protected readonly repository: Repository<VideoCategory>) {
-    super(VideoCategory, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<VideoCategory[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 38
query-node/generated/graphql-server/src/modules/video-media-encoding/video-media-encoding.model.ts

@@ -1,38 +0,0 @@
-import { BaseModel, Model, OneToMany, StringField } from 'warthog';
-
-import { VideoMediaMetadata } from '../video-media-metadata/video-media-metadata.model';
-
-@Model({ api: {} })
-export class VideoMediaEncoding extends BaseModel {
-  @StringField({
-    nullable: true,
-    description: `Encoding of the video media object`,
-  })
-  codecName?: string;
-
-  @StringField({
-    nullable: true,
-    description: `Media container format`,
-  })
-  container?: string;
-
-  @StringField({
-    nullable: true,
-    description: `Content MIME type`,
-  })
-  mimeMediaType?: string;
-
-  @OneToMany(() => VideoMediaMetadata, (param: VideoMediaMetadata) => param.encoding, {
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'VideoMediaEncoding',
-    relModelName: 'VideoMediaMetadata',
-    propertyName: 'videomediametadataencoding',
-  })
-  videomediametadataencoding?: VideoMediaMetadata[];
-
-  constructor(init?: Partial<VideoMediaEncoding>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 142
query-node/generated/graphql-server/src/modules/video-media-encoding/video-media-encoding.resolver.ts

@@ -1,142 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  VideoMediaEncodingCreateInput,
-  VideoMediaEncodingCreateManyArgs,
-  VideoMediaEncodingUpdateArgs,
-  VideoMediaEncodingWhereArgs,
-  VideoMediaEncodingWhereInput,
-  VideoMediaEncodingWhereUniqueInput,
-  VideoMediaEncodingOrderByEnum,
-} from '../../../generated';
-
-import { VideoMediaEncoding } from './video-media-encoding.model';
-import { VideoMediaEncodingService } from './video-media-encoding.service';
-
-import { VideoMediaMetadata } from '../video-media-metadata/video-media-metadata.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class VideoMediaEncodingEdge {
-  @Field(() => VideoMediaEncoding, { nullable: false })
-  node!: VideoMediaEncoding;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class VideoMediaEncodingConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [VideoMediaEncodingEdge], { nullable: false })
-  edges!: VideoMediaEncodingEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class VideoMediaEncodingConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => VideoMediaEncodingWhereInput, { nullable: true })
-  where?: VideoMediaEncodingWhereInput;
-
-  @Field(() => VideoMediaEncodingOrderByEnum, { nullable: true })
-  orderBy?: [VideoMediaEncodingOrderByEnum];
-}
-
-@Resolver(VideoMediaEncoding)
-export class VideoMediaEncodingResolver {
-  constructor(@Inject('VideoMediaEncodingService') public readonly service: VideoMediaEncodingService) {}
-
-  @Query(() => [VideoMediaEncoding])
-  async videoMediaEncodings(
-    @Args() { where, orderBy, limit, offset }: VideoMediaEncodingWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<VideoMediaEncoding[]> {
-    return this.service.find<VideoMediaEncodingWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => VideoMediaEncoding, { nullable: true })
-  async videoMediaEncodingByUniqueInput(
-    @Arg('where') where: VideoMediaEncodingWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<VideoMediaEncoding | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => VideoMediaEncodingConnection)
-  async videoMediaEncodingsConnection(
-    @Args() { where, orderBy, ...pageOptions }: VideoMediaEncodingConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<VideoMediaEncodingConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<VideoMediaEncodingWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<VideoMediaEncodingConnection>;
-  }
-
-  @FieldResolver(() => VideoMediaMetadata)
-  async videomediametadataencoding(@Root() r: VideoMediaEncoding): Promise<VideoMediaMetadata[] | null> {
-    const result = await getConnection()
-      .getRepository(VideoMediaEncoding)
-      .findOne(r.id, { relations: ['videomediametadataencoding'] });
-    if (result && result.videomediametadataencoding !== undefined) {
-      return result.videomediametadataencoding;
-    }
-    return null;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/video-media-encoding/video-media-encoding.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { VideoMediaEncoding } from './video-media-encoding.model';
-
-@Service('VideoMediaEncodingService')
-export class VideoMediaEncodingService extends BaseService<VideoMediaEncoding> {
-  constructor(@InjectRepository(VideoMediaEncoding) protected readonly repository: Repository<VideoMediaEncoding>) {
-    super(VideoMediaEncoding, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<VideoMediaEncoding[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 55
query-node/generated/graphql-server/src/modules/video-media-metadata/video-media-metadata.model.ts

@@ -1,55 +0,0 @@
-import { BaseModel, IntField, FloatField, Model, ManyToOne, OneToOne, OneToOneJoin, StringField } from 'warthog';
-
-import { VideoMediaEncoding } from '../video-media-encoding/video-media-encoding.model';
-import { Video } from '../video/video.model';
-
-@Model({ api: {} })
-export class VideoMediaMetadata extends BaseModel {
-  @ManyToOne(() => VideoMediaEncoding, (param: VideoMediaEncoding) => param.videomediametadataencoding, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'VideoMediaMetadata',
-    relModelName: 'VideoMediaEncoding',
-    propertyName: 'encoding',
-  })
-  encoding?: VideoMediaEncoding;
-
-  @IntField({
-    nullable: true,
-    description: `Video media width in pixels`,
-  })
-  pixelWidth?: number;
-
-  @IntField({
-    nullable: true,
-    description: `Video media height in pixels`,
-  })
-  pixelHeight?: number;
-
-  // Size is meant to be integer, but since `IntField` represents only 4-bytes long number
-  // (sadly, `dataType: bigint` settings only fixes DB, but GraphQL server still uses 4-bytes)
-  // `NumericField` seems to always return string (when using transform directive number<->string)
-  // `FloatField` field fixes this issue.
-  @FloatField({
-    nullable: true,
-    description: `Video media size in bytes`,
-  })
-  size?: number;
-
-  @OneToOne(() => Video, (param: Video) => param.mediaMetadata, { 
-    nullable: true, cascade: ["insert", "update"],
-    modelName: 'VideoMediaMetadata',
-    relModelName: 'Video',
-    propertyName: 'video',
-  })
-  video?: Video;
-
-  @IntField({})
-  createdInBlock!: number;
-
-  constructor(init?: Partial<VideoMediaMetadata>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 154
query-node/generated/graphql-server/src/modules/video-media-metadata/video-media-metadata.resolver.ts

@@ -1,154 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  VideoMediaMetadataCreateInput,
-  VideoMediaMetadataCreateManyArgs,
-  VideoMediaMetadataUpdateArgs,
-  VideoMediaMetadataWhereArgs,
-  VideoMediaMetadataWhereInput,
-  VideoMediaMetadataWhereUniqueInput,
-  VideoMediaMetadataOrderByEnum,
-} from '../../../generated';
-
-import { VideoMediaMetadata } from './video-media-metadata.model';
-import { VideoMediaMetadataService } from './video-media-metadata.service';
-
-import { VideoMediaEncoding } from '../video-media-encoding/video-media-encoding.model';
-import { Video } from '../video/video.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class VideoMediaMetadataEdge {
-  @Field(() => VideoMediaMetadata, { nullable: false })
-  node!: VideoMediaMetadata;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class VideoMediaMetadataConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [VideoMediaMetadataEdge], { nullable: false })
-  edges!: VideoMediaMetadataEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class VideoMediaMetadataConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => VideoMediaMetadataWhereInput, { nullable: true })
-  where?: VideoMediaMetadataWhereInput;
-
-  @Field(() => VideoMediaMetadataOrderByEnum, { nullable: true })
-  orderBy?: [VideoMediaMetadataOrderByEnum];
-}
-
-@Resolver(VideoMediaMetadata)
-export class VideoMediaMetadataResolver {
-  constructor(@Inject('VideoMediaMetadataService') public readonly service: VideoMediaMetadataService) {}
-
-  @Query(() => [VideoMediaMetadata])
-  async videoMediaMetadata(
-    @Args() { where, orderBy, limit, offset }: VideoMediaMetadataWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<VideoMediaMetadata[]> {
-    return this.service.find<VideoMediaMetadataWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => VideoMediaMetadata, { nullable: true })
-  async videoMediaMetadataByUniqueInput(
-    @Arg('where') where: VideoMediaMetadataWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<VideoMediaMetadata | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => VideoMediaMetadataConnection)
-  async videoMediaMetadataConnection(
-    @Args() { where, orderBy, ...pageOptions }: VideoMediaMetadataConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<VideoMediaMetadataConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<VideoMediaMetadataWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<VideoMediaMetadataConnection>;
-  }
-
-  @FieldResolver(() => VideoMediaEncoding)
-  async encoding(@Root() r: VideoMediaMetadata): Promise<VideoMediaEncoding | null> {
-    const result = await getConnection()
-      .getRepository(VideoMediaMetadata)
-      .findOne(r.id, { relations: ['encoding'] });
-    if (result && result.encoding !== undefined) {
-      return result.encoding;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => Video)
-  async video(@Root() r: VideoMediaMetadata): Promise<Video | null> {
-    const result = await getConnection()
-      .getRepository(VideoMediaMetadata)
-      .findOne(r.id, { relations: ['video'] });
-    if (result && result.video !== undefined) {
-      return result.video;
-    }
-    return null;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/video-media-metadata/video-media-metadata.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { VideoMediaMetadata } from './video-media-metadata.model';
-
-@Service('VideoMediaMetadataService')
-export class VideoMediaMetadataService extends BaseService<VideoMediaMetadata> {
-  constructor(@InjectRepository(VideoMediaMetadata) protected readonly repository: Repository<VideoMediaMetadata>) {
-    super(VideoMediaMetadata, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<VideoMediaMetadata[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 177
query-node/generated/graphql-server/src/modules/video/video.model.ts

@@ -1,177 +0,0 @@
-import {
-  BaseModel,
-  BooleanField,
-  IntField,
-  DateTimeField,
-  Model,
-  ManyToOne,
-  OneToOne,
-  OneToOneJoin,
-  CustomField,
-  EnumField,
-  StringField,
-} from 'warthog';
-
-import { Channel } from '../channel/channel.model';
-import { VideoCategory } from '../video-category/video-category.model';
-import { DataObject } from '../data-object/data-object.model';
-import { Language } from '../language/language.model';
-import { License } from '../license/license.model';
-import { VideoMediaMetadata } from '../video-media-metadata/video-media-metadata.model';
-
-import { AssetAvailability } from '../enums/enums';
-export { AssetAvailability };
-
-@Model({ api: {} })
-export class Video extends BaseModel {
-  @ManyToOne(() => Channel, (param: Channel) => param.videos, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Video',
-    relModelName: 'Channel',
-    propertyName: 'channel',
-  })
-  channel!: Channel;
-
-  @ManyToOne(() => VideoCategory, (param: VideoCategory) => param.videos, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Video',
-    relModelName: 'VideoCategory',
-    propertyName: 'category',
-  })
-  category?: VideoCategory;
-
-  @StringField({
-    nullable: true,
-    description: `The title of the video`,
-  })
-  title?: string;
-
-  @StringField({
-    nullable: true,
-    description: `The description of the Video`,
-  })
-  description?: string;
-
-  @IntField({
-    nullable: true,
-    description: `Video duration in seconds`,
-  })
-  duration?: number;
-
-  @ManyToOne(() => DataObject, (param: DataObject) => param.videothumbnailPhotoDataObject, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Video',
-    relModelName: 'DataObject',
-    propertyName: 'thumbnailPhotoDataObject',
-  })
-  thumbnailPhotoDataObject?: DataObject;
-
-  @CustomField({
-    db: { type: 'text', array: true },
-    api: { type: 'string', description: `URLs where the asset content can be accessed (if any)` },
-  })
-  thumbnailPhotoUrls!: string[];
-
-  @EnumField('AssetAvailability', AssetAvailability, {
-    description: `Availability meta information`,
-  })
-  thumbnailPhotoAvailability!: AssetAvailability;
-
-  @ManyToOne(() => Language, (param: Language) => param.videolanguage, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Video',
-    relModelName: 'Language',
-    propertyName: 'language',
-  })
-  language?: Language;
-
-  @BooleanField({
-    nullable: true,
-    description: `Whether or not Video contains marketing`,
-  })
-  hasMarketing?: boolean;
-
-  @DateTimeField({
-    nullable: true,
-    description: `If the Video was published on other platform before beeing published on Joystream - the original publication date`,
-  })
-  publishedBeforeJoystream?: Date;
-
-  @BooleanField({
-    nullable: true,
-    description: `Whether the Video is supposed to be publically displayed`,
-  })
-  isPublic?: boolean;
-
-  @BooleanField({
-    description: `Flag signaling whether a video is censored.`,
-  })
-  isCensored!: boolean;
-
-  @BooleanField({
-    nullable: true,
-    description: `Whether the Video contains explicit material.`,
-  })
-  isExplicit?: boolean;
-
-  @ManyToOne(() => License, (param: License) => param.videolicense, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Video',
-    relModelName: 'License',
-    propertyName: 'license',
-  })
-  license?: License;
-
-  @ManyToOne(() => DataObject, (param: DataObject) => param.videomediaDataObject, {
-    skipGraphQLField: true,
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Video',
-    relModelName: 'DataObject',
-    propertyName: 'mediaDataObject',
-  })
-  mediaDataObject?: DataObject;
-
-  @CustomField({
-    db: { type: 'text', array: true },
-    api: { type: 'string', description: `URLs where the asset content can be accessed (if any)` },
-  })
-  mediaUrls!: string[];
-
-  @EnumField('AssetAvailability', AssetAvailability, {
-    description: `Availability meta information`,
-  })
-  mediaAvailability!: AssetAvailability;
-
-  @OneToOneJoin(() => VideoMediaMetadata, (param: VideoMediaMetadata) => param.video, {
-    nullable: true,
-    cascade: ["insert", "update"],
-    modelName: 'Video',
-    relModelName: 'VideoMediaMetadata',
-    propertyName: 'mediaMetadata',
-  })
-  mediaMetadata?: VideoMediaMetadata;
-
-  @IntField({})
-  createdInBlock!: number;
-
-  @BooleanField({
-    description: `Is video featured or not`,
-  })
-  isFeatured!: boolean;
-
-  constructor(init?: Partial<Video>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 213
query-node/generated/graphql-server/src/modules/video/video.resolver.ts

@@ -1,213 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  VideoCreateInput,
-  VideoCreateManyArgs,
-  VideoUpdateArgs,
-  VideoWhereArgs,
-  VideoWhereInput,
-  VideoWhereUniqueInput,
-  VideoOrderByEnum,
-} from '../../../generated';
-
-import { Video } from './video.model';
-import { VideoService } from './video.service';
-
-import { Channel } from '../channel/channel.model';
-import { VideoCategory } from '../video-category/video-category.model';
-import { DataObject } from '../data-object/data-object.model';
-import { Language } from '../language/language.model';
-import { License } from '../license/license.model';
-import { VideoMediaMetadata } from '../video-media-metadata/video-media-metadata.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class VideoEdge {
-  @Field(() => Video, { nullable: false })
-  node!: Video;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class VideoConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [VideoEdge], { nullable: false })
-  edges!: VideoEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class VideoConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => VideoWhereInput, { nullable: true })
-  where?: VideoWhereInput;
-
-  @Field(() => VideoOrderByEnum, { nullable: true })
-  orderBy?: [VideoOrderByEnum];
-}
-
-@Resolver(Video)
-export class VideoResolver {
-  constructor(@Inject('VideoService') public readonly service: VideoService) {}
-
-  @Query(() => [Video])
-  async videos(
-    @Args() { where, orderBy, limit, offset }: VideoWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<Video[]> {
-    return this.service.find<VideoWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => Video, { nullable: true })
-  async videoByUniqueInput(
-    @Arg('where') where: VideoWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<Video | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => VideoConnection)
-  async videosConnection(
-    @Args() { where, orderBy, ...pageOptions }: VideoConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<VideoConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<VideoWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<VideoConnection>;
-  }
-
-  @FieldResolver(() => Channel)
-  async channel(@Root() r: Video): Promise<Channel | null> {
-    const result = await getConnection()
-      .getRepository(Video)
-      .findOne(r.id, { relations: ['channel'] });
-    if (result && result.channel !== undefined) {
-      return result.channel;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => VideoCategory)
-  async category(@Root() r: Video): Promise<VideoCategory | null> {
-    const result = await getConnection()
-      .getRepository(Video)
-      .findOne(r.id, { relations: ['category'] });
-    if (result && result.category !== undefined) {
-      return result.category;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => DataObject)
-  async thumbnailPhotoDataObject(@Root() r: Video): Promise<DataObject | null> {
-    const result = await getConnection()
-      .getRepository(Video)
-      .findOne(r.id, { relations: ['thumbnailPhotoDataObject'] });
-    if (result && result.thumbnailPhotoDataObject !== undefined) {
-      return result.thumbnailPhotoDataObject;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => Language)
-  async language(@Root() r: Video): Promise<Language | null> {
-    const result = await getConnection()
-      .getRepository(Video)
-      .findOne(r.id, { relations: ['language'] });
-    if (result && result.language !== undefined) {
-      return result.language;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => License)
-  async license(@Root() r: Video): Promise<License | null> {
-    const result = await getConnection()
-      .getRepository(Video)
-      .findOne(r.id, { relations: ['license'] });
-    if (result && result.license !== undefined) {
-      return result.license;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => DataObject)
-  async mediaDataObject(@Root() r: Video): Promise<DataObject | null> {
-    const result = await getConnection()
-      .getRepository(Video)
-      .findOne(r.id, { relations: ['mediaDataObject'] });
-    if (result && result.mediaDataObject !== undefined) {
-      return result.mediaDataObject;
-    }
-    return null;
-  }
-
-  @FieldResolver(() => VideoMediaMetadata)
-  async mediaMetadata(@Root() r: Video): Promise<VideoMediaMetadata | null> {
-    const result = await getConnection()
-      .getRepository(Video)
-      .findOne(r.id, { relations: ['mediaMetadata'] });
-    if (result && result.mediaMetadata !== undefined) {
-      return result.mediaMetadata;
-    }
-    return null;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/video/video.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { Video } from './video.model';
-
-@Service('VideoService')
-export class VideoService extends BaseService<Video> {
-  constructor(@InjectRepository(Video) protected readonly repository: Repository<Video>) {
-    super(Video, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<Video[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 42
query-node/generated/graphql-server/src/modules/worker/worker.model.ts

@@ -1,42 +0,0 @@
-import { BaseModel, BooleanField, Model, OneToMany, EnumField, StringField } from 'warthog';
-
-import { DataObject } from '../data-object/data-object.model';
-
-import { WorkerType } from '../enums/enums';
-export { WorkerType };
-
-@Model({ api: {} })
-export class Worker extends BaseModel {
-  @BooleanField({
-    description: `Sign of worker still being active`,
-  })
-  isActive!: boolean;
-
-  @StringField({
-    description: `Runtime identifier`,
-  })
-  workerId!: string;
-
-  @EnumField('WorkerType', WorkerType, {
-    description: `Associated working group`,
-  })
-  type!: WorkerType;
-
-  @StringField({
-    nullable: true,
-    description: `Custom metadata set by provider`,
-  })
-  metadata?: string;
-
-  @OneToMany(() => DataObject, (param: DataObject) => param.liaison, {
-    modelName: 'Worker',
-    relModelName: 'DataObject',
-    propertyName: 'dataObjects',
-  })
-  dataObjects?: DataObject[];
-
-  constructor(init?: Partial<Worker>) {
-    super();
-    Object.assign(this, init);
-  }
-}

+ 0 - 142
query-node/generated/graphql-server/src/modules/worker/worker.resolver.ts

@@ -1,142 +0,0 @@
-import {
-  Arg,
-  Args,
-  Mutation,
-  Query,
-  Root,
-  Resolver,
-  FieldResolver,
-  ObjectType,
-  Field,
-  Int,
-  ArgsType,
-  Info,
-} from 'type-graphql';
-import graphqlFields from 'graphql-fields';
-import { Inject } from 'typedi';
-import { Min } from 'class-validator';
-import { Fields, StandardDeleteResponse, UserId, PageInfo, RawFields } from 'warthog';
-
-import {
-  WorkerCreateInput,
-  WorkerCreateManyArgs,
-  WorkerUpdateArgs,
-  WorkerWhereArgs,
-  WorkerWhereInput,
-  WorkerWhereUniqueInput,
-  WorkerOrderByEnum,
-} from '../../../generated';
-
-import { Worker } from './worker.model';
-import { WorkerService } from './worker.service';
-
-import { DataObject } from '../data-object/data-object.model';
-import { getConnection } from 'typeorm';
-
-@ObjectType()
-export class WorkerEdge {
-  @Field(() => Worker, { nullable: false })
-  node!: Worker;
-
-  @Field(() => String, { nullable: false })
-  cursor!: string;
-}
-
-@ObjectType()
-export class WorkerConnection {
-  @Field(() => Int, { nullable: false })
-  totalCount!: number;
-
-  @Field(() => [WorkerEdge], { nullable: false })
-  edges!: WorkerEdge[];
-
-  @Field(() => PageInfo, { nullable: false })
-  pageInfo!: PageInfo;
-}
-
-@ArgsType()
-export class ConnectionPageInputOptions {
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  first?: number;
-
-  @Field(() => String, { nullable: true })
-  after?: string; // V3: TODO: should we make a RelayCursor scalar?
-
-  @Field(() => Int, { nullable: true })
-  @Min(0)
-  last?: number;
-
-  @Field(() => String, { nullable: true })
-  before?: string;
-}
-
-@ArgsType()
-export class WorkerConnectionWhereArgs extends ConnectionPageInputOptions {
-  @Field(() => WorkerWhereInput, { nullable: true })
-  where?: WorkerWhereInput;
-
-  @Field(() => WorkerOrderByEnum, { nullable: true })
-  orderBy?: [WorkerOrderByEnum];
-}
-
-@Resolver(Worker)
-export class WorkerResolver {
-  constructor(@Inject('WorkerService') public readonly service: WorkerService) {}
-
-  @Query(() => [Worker])
-  async workers(
-    @Args() { where, orderBy, limit, offset }: WorkerWhereArgs,
-    @Fields() fields: string[]
-  ): Promise<Worker[]> {
-    return this.service.find<WorkerWhereInput>(where, orderBy, limit, offset, fields);
-  }
-
-  @Query(() => Worker, { nullable: true })
-  async workerByUniqueInput(
-    @Arg('where') where: WorkerWhereUniqueInput,
-    @Fields() fields: string[]
-  ): Promise<Worker | null> {
-    const result = await this.service.find(where, undefined, 1, 0, fields);
-    return result && result.length >= 1 ? result[0] : null;
-  }
-
-  @Query(() => WorkerConnection)
-  async workersConnection(
-    @Args() { where, orderBy, ...pageOptions }: WorkerConnectionWhereArgs,
-    @Info() info: any
-  ): Promise<WorkerConnection> {
-    const rawFields = graphqlFields(info, {}, { excludedFields: ['__typename'] });
-
-    let result: any = {
-      totalCount: 0,
-      edges: [],
-      pageInfo: {
-        hasNextPage: false,
-        hasPreviousPage: false,
-      },
-    };
-    // If the related database table does not have any records then an error is thrown to the client
-    // by warthog
-    try {
-      result = await this.service.findConnection<WorkerWhereInput>(where, orderBy, pageOptions, rawFields);
-    } catch (err) {
-      console.log(err);
-      // TODO: should continue to return this on `Error: Items is empty` or throw the error
-      if (!(err.message as string).includes('Items is empty')) throw err;
-    }
-
-    return result as Promise<WorkerConnection>;
-  }
-
-  @FieldResolver(() => DataObject)
-  async dataObjects(@Root() r: Worker): Promise<DataObject[] | null> {
-    const result = await getConnection()
-      .getRepository(Worker)
-      .findOne(r.id, { relations: ['dataObjects'] });
-    if (result && result.dataObjects !== undefined) {
-      return result.dataObjects;
-    }
-    return null;
-  }
-}

+ 0 - 28
query-node/generated/graphql-server/src/modules/worker/worker.service.ts

@@ -1,28 +0,0 @@
-import { Service } from 'typedi';
-import { Repository } from 'typeorm';
-import { InjectRepository } from 'typeorm-typedi-extensions';
-import { BaseService, WhereInput } from 'warthog';
-
-import { Worker } from './worker.model';
-
-@Service('WorkerService')
-export class WorkerService extends BaseService<Worker> {
-  constructor(@InjectRepository(Worker) protected readonly repository: Repository<Worker>) {
-    super(Worker, repository);
-  }
-
-  async find<W extends WhereInput>(
-    where?: any,
-    orderBy?: string | string[],
-    limit?: number,
-    offset?: number,
-    fields?: string[]
-  ): Promise<Worker[]> {
-    let f = fields;
-    if (f == undefined) {
-      f = [];
-    }
-
-    return super.find<W>(where, orderBy, limit, offset, f);
-  }
-}

+ 0 - 38
query-node/generated/graphql-server/src/processor.resolver.ts

@@ -1,38 +0,0 @@
-import { Resolver, ObjectType, Field, Subscription, Root } from 'type-graphql'
-import { TOPICS } from './pubsub'
-
-@ObjectType()
-export class ProcessorState {
-  @Field()
-  lastCompleteBlock!: number
-
-  @Field()
-  lastProcessedEvent!: string
-
-  @Field()
-  indexerHead!: number
-
-  @Field()
-  chainHead!: number
-}
-
-@Resolver()
-export class ProcessorStateResolver {
-  @Subscription({ topics: TOPICS.processorState })
-  stateSubscription(
-    @Root()
-    state: {
-      lastScannedBlock?: number
-      lastProcessedEvent?: string
-      indexerHead?: number
-      chainHead?: number
-    }
-  ): ProcessorState {
-    return {
-      lastCompleteBlock: state.lastScannedBlock || -1,
-      lastProcessedEvent: state.lastProcessedEvent || 'NO_EVENTS',
-      indexerHead: state.indexerHead || -1,
-      chainHead: state.chainHead || -1,
-    }
-  }
-}

+ 0 - 52
query-node/generated/graphql-server/src/pubsub.ts

@@ -1,52 +0,0 @@
-import { PubSubEngine, PubSub } from 'graphql-subscriptions'
-
-import createSubscriber from 'pg-listen'
-import { Logger } from './logger'
-
-const pubSub: PubSubEngine = new PubSub()
-
-export enum TOPICS {
-  processorState = 'PROCESSOR_STATE',
-}
-
-export function getPubSub(): PubSubEngine {
-  return pubSub
-}
-
-export async function startPgSubsribers() {
-  // use PG_** env variables to connect
-  const subscriber = createSubscriber()
-  const channel = 'processed_events_log_update'
-
-  subscriber.notifications.on(channel, (payload: unknown) => {
-    const { data } = payload as {
-      data: {
-        event_id: string
-        last_scanned_block: number
-        indexer_head: number
-        chain_head: number
-      }
-    }
-
-    // Payload as passed to subscriber.notify() (see below)
-    pubSub.publish(TOPICS.processorState, {
-      lastProcessedEvent: data.event_id,
-      lastScannedBlock: data.last_scanned_block,
-      chainHead: data.chain_head,
-      indexerHead: data.indexer_head,
-    })
-  })
-
-  subscriber.events.on('error', (error) => {
-    Logger.error('Fatal database connection error:', error)
-    process.exit(1)
-  })
-
-  process.on('exit', () => {
-    Logger.log(`Closing the subscriber`)
-    subscriber.close()
-  })
-
-  await subscriber.connect()
-  await subscriber.listenTo(channel)
-}

+ 0 - 72
query-node/generated/graphql-server/src/queryTemplates.ts

@@ -1,72 +0,0 @@
-import { IQueryTemplate, queryTemplateUtils } from '@apollographql/graphql-playground-react/lib/components/Playground/QueryTemplates/templateUtils'
-
-// fields that will be ignored by autofill
-const commonIgnoredFields = [
-  'deletedAt',
-  'createdById',
-  'updatedById',
-  'deletedById',
-  'version',
-]
-
-const dataObjectIgnoredFields = [
-  ...commonIgnoredFields,
-
-  // dataObject's `owner` is problematic because it's variant and will need some special handling
-  'owner',
-]
-
-const exampleDate = `"2018-01-31 23:59"`
-
-export const queryTemplates: IQueryTemplate[] = [
-  ...queryTemplateUtils.getOneGetAllTemplates('video', 'videos', 'videos', dataObjectIgnoredFields),
-  {
-    title: 'Featured videos',
-    description: 'Get all featured videos.',
-    ignoredFields: commonIgnoredFields,
-    query: `query {
-      ${queryTemplateUtils.descriptionMarker}
-      videos(where: { isFeatured_eq: true }) { ${queryTemplateUtils.allPropsMarker} }
-    }`,
-  }, {
-    title: 'All recent videos',
-    description: 'Get all videos after created or updated after the given date.',
-    ignoredFields: commonIgnoredFields,
-    query: `query {
-      ${queryTemplateUtils.descriptionMarker}
-      videos(where: {
-        createdAt_gt: ${exampleDate},
-        updatedAt_gt: ${exampleDate},
-      }) { ${queryTemplateUtils.allPropsMarker} }
-    }`,
-  },
-
-  ...queryTemplateUtils.getOneGetAllTemplates('video category', 'video categories', 'videoCategories', commonIgnoredFields),
-  {
-    title: `All videos in category`,
-    description: `Get all videos associated with the given video category.`,
-    ignoredFields: commonIgnoredFields,
-    query: `query {
-      ${queryTemplateUtils.descriptionMarker}
-      videos(where: { categoryId_eq: 1 }) { ${queryTemplateUtils.allPropsMarker} }
-    }`,
-  },
-  ...queryTemplateUtils.getOneGetAllTemplates('channel', 'channels', 'channels', dataObjectIgnoredFields),
-  ...queryTemplateUtils.getOneGetAllTemplates('channel category', 'channels categories', 'channelCategories', commonIgnoredFields),
-
-  {
-    title: `Channel's videos`,
-    description: `Get all videos associated with the given channel.`,
-    ignoredFields: commonIgnoredFields,
-    query: `query {
-      ${queryTemplateUtils.descriptionMarker}
-      videos(where: { channelId_eq: 1 }) { ${queryTemplateUtils.allPropsMarker} }
-    }`,
-  },
-
-  ...queryTemplateUtils.getOneGetAllTemplates('asset', 'assets', 'dataObjects', dataObjectIgnoredFields),
-  ...queryTemplateUtils.getOneGetAllTemplates('membership', 'memberships', 'memberships', commonIgnoredFields),
-
-  ...queryTemplateUtils.getOneGetAllTemplates('curator group', 'curator groups', 'curatorGroups', commonIgnoredFields),
-  ...queryTemplateUtils.getOneGetAllTemplates('worker', 'workers', 'workers', dataObjectIgnoredFields),
-].map(queryTemplateUtils.formatQuery)

+ 0 - 53
query-node/generated/graphql-server/src/server.ts

@@ -1,53 +0,0 @@
-import 'reflect-metadata';
-import { GraphQLID } from 'graphql';
-import { BaseContext, DataLoaderMiddleware, Server, ServerOptions } from 'warthog';
-import { DateResolver } from 'graphql-scalars';
-import { buildSchema } from 'type-graphql';
-
-import { Logger } from './logger';
-import { getPubSub } from './pubsub';
-
-interface Context extends BaseContext {
-  user: {
-    email: string;
-    id: string;
-    permissions: string;
-  };
-}
-
-export function getServer(AppOptions = {}, dbOptions = {}) {
-  return new Server<Context>(
-    {
-      introspection: true,
-      logger: Logger,
-      ...AppOptions,
-    },
-    dbOptions
-  );
-}
-
-export async function buildServerSchema<C extends BaseContext>(
-  server: Server<C>,
-  appOptions: ServerOptions<C> = {}
-): Promise<void> {
-  server.schema = await buildSchema({
-    authChecker: server.authChecker,
-    scalarsMap: [
-      {
-        type: 'ID' as any,
-        scalar: GraphQLID,
-      },
-      // Note: DateTime already included in type-graphql
-      {
-        type: 'DateOnlyString' as any,
-        scalar: DateResolver,
-      },
-    ],
-    container: server.container as any,
-    globalMiddlewares: [DataLoaderMiddleware, ...(appOptions.middlewares || [])],
-    resolvers: server.config.get('RESOLVERS_PATH'),
-    pubSub: getPubSub(),
-    // TODO: scalarsMap: [{ type: GraphQLDate, scalar: GraphQLDate }]
-    validate: server.config.get('VALIDATE_RESOLVERS') === 'true',
-  });
-}

+ 0 - 26
query-node/generated/graphql-server/tsconfig.json

@@ -1,26 +0,0 @@
-{
-  "compilerOptions": {
-    "allowSyntheticDefaultImports": true,
-    "skipLibCheck": true,
-    "outDir": "./dist",
-    "lib": ["dom", "es5", "es6", "es7", "esnext"],
-    "target": "es5",
-    "module": "commonjs",
-    "moduleResolution": "node",
-    "emitDecoratorMetadata": true,
-    "experimentalDecorators": true,
-    "sourceMap": true,
-    "keyofStringsOnly": true,
-    "noImplicitAny": true,
-    "noImplicitReturns": true,
-    "noImplicitThis": true,
-    "noUnusedLocals": false,
-    "strict": true,
-    "strictNullChecks": true,
-    "types": ["isomorphic-fetch", "node"],
-    "esModuleInterop": true,
-    "declaration": true
-  },
-  "include": ["src/**/*", "db/**/*", "model/**/*"],
-  "exclude": ["node_modules/**/*", "generated/**/*", "tools/**/*"]
-}

+ 0 - 3
query-node/generated/graphql-server/warthog.config.js

@@ -1,3 +0,0 @@
-module.exports = {
-  cliGeneratePath: './src/modules/${kebabName}'
-};

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