Browse Source

Update with new mappings, fix distribution bucket operator status check, uncomment tmp workaround

Leszek Wiesner 3 years ago
parent
commit
5b8c788614

+ 17 - 10
distributor-node/src/services/networking/NetworkingService.ts

@@ -16,6 +16,7 @@ import {
 } from '../../types'
 import queue from 'queue'
 import _ from 'lodash'
+import { DistributionBucketOperatorStatus } from './query-node/generated/schema'
 
 // TODO: Adjust limits and intervals
 const MAX_CONCURRENT_RESPONSE_TIME_CHECKS = 10
@@ -82,13 +83,15 @@ export class NetworkingService {
   }
 
   private prepareStorageNodeEndpoints(details: DataObjectDetailsFragment) {
-    const endpointsData = details.storageBag.storedBy
+    const endpointsData = details.storageBag.storageAssignments
       .filter(
-        (b) => b.operatorStatus.__typename === 'StorageBucketOperatorStatusActive' && b.operatorMetadata?.nodeEndpoint
+        (a) =>
+          a.storageBucket.operatorStatus.__typename === 'StorageBucketOperatorStatusActive' &&
+          a.storageBucket.operatorMetadata?.nodeEndpoint
       )
-      .map((b) => ({
-        bucketId: b.id,
-        endpoint: b.operatorMetadata!.nodeEndpoint!,
+      .map((a) => ({
+        bucketId: a.storageBucket.id,
+        endpoint: a.storageBucket.operatorMetadata!.nodeEndpoint!,
       }))
 
     return this.filterStorageNodeEndpoints(endpointsData)
@@ -109,12 +112,16 @@ export class NetworkingService {
       exists: !!details,
       isSupported:
         (this.config.buckets === 'all' &&
-          details?.storageBag.distributedBy.some((d) =>
-            d.operators.some((o) => o.workerId === this.config.workerId)
+          details?.storageBag.distirbutionAssignments.some((d) =>
+            d.distributionBucket.operators.some(
+              (o) => o.workerId === this.config.workerId && o.status === DistributionBucketOperatorStatus.Active
+            )
           )) ||
         (Array.isArray(this.config.buckets) &&
           this.config.buckets.some((bucketId) =>
-            details?.storageBag.distributedBy.map((b) => b.id).includes(bucketId.toString())
+            details?.storageBag.distirbutionAssignments
+              .map((a) => a.distributionBucket.id)
+              .includes(bucketId.toString())
           )),
       data: details
         ? {
@@ -263,8 +270,8 @@ export class NetworkingService {
         : await this.queryNodeApi.getDistributionBucketsWithObjectsByIds(this.config.buckets.map((id) => id.toString()))
     const objectsData: DataObjectData[] = []
     data.forEach((bucket) => {
-      bucket.distributedBags.forEach((bag) => {
-        bag.objects.forEach((object) => {
+      bucket.bagAssignments.forEach((a) => {
+        a.storageBag.objects.forEach((object) => {
           const { ipfsHash, id, size } = object
           objectsData.push({ contentHash: ipfsHash, objectId: id, size: parseInt(size) })
         })

+ 3 - 3
distributor-node/src/services/networking/query-node/api.ts

@@ -5,7 +5,7 @@ import {
   GetDataObjectDetails,
   GetDataObjectDetailsQuery,
   GetDataObjectDetailsQueryVariables,
-  DistirubtionBucketsWithObjectsFragment,
+  DistirubtionBucketWithObjectsFragment,
   GetDistributionBucketsWithObjectsByIdsQuery,
   GetDistributionBucketsWithObjectsByIdsQueryVariables,
   GetDistributionBucketsWithObjectsByIds,
@@ -66,7 +66,7 @@ export class QueryNodeApi {
     )
   }
 
-  public getDistributionBucketsWithObjectsByIds(ids: string[]): Promise<DistirubtionBucketsWithObjectsFragment[]> {
+  public getDistributionBucketsWithObjectsByIds(ids: string[]): Promise<DistirubtionBucketWithObjectsFragment[]> {
     return this.multipleEntitiesQuery<
       GetDistributionBucketsWithObjectsByIdsQuery,
       GetDistributionBucketsWithObjectsByIdsQueryVariables
@@ -75,7 +75,7 @@ export class QueryNodeApi {
 
   public getDistributionBucketsWithObjectsByWorkerId(
     workerId: number
-  ): Promise<DistirubtionBucketsWithObjectsFragment[]> {
+  ): Promise<DistirubtionBucketWithObjectsFragment[]> {
     return this.multipleEntitiesQuery<
       GetDistributionBucketsWithObjectsByWorkerIdQuery,
       GetDistributionBucketsWithObjectsByWorkerIdQueryVariables

+ 1 - 2
distributor-node/src/services/networking/query-node/codegen.yml

@@ -1,8 +1,7 @@
 # Paths are relative to root distribution-node directory
 overwrite: true
 
-# schema: '../../../../../query-node/generated/graphql-server/generated/schema.graphql'
-schema: 'src/services/networking/query-node/mock.graphql'
+schema: '../query-node/generated/graphql-server/generated/schema.graphql'
 
 documents:
   - 'src/services/networking/query-node/queries/*.graphql'

+ 34 - 27
distributor-node/src/services/networking/query-node/generated/queries.ts

@@ -1,7 +1,7 @@
 import * as Types from './schema';
 
 import gql from 'graphql-tag';
-export type DataObjectDetailsFragment = { id: string, size: any, ipfsHash: string, isAccepted: boolean, storageBag: { storedBy: Array<{ id: string, operatorMetadata?: Types.Maybe<{ nodeEndpoint?: Types.Maybe<string> }>, operatorStatus: { __typename: 'StorageBucketOperatorStatusMissing' } | { __typename: 'StorageBucketOperatorStatusInvited' } | { __typename: 'StorageBucketOperatorStatusActive' } }>, distributedBy: Array<{ id: string, operators: Array<{ workerId: number }> }> } };
+export type DataObjectDetailsFragment = { id: string, size: any, ipfsHash: string, isAccepted: boolean, storageBag: { storageAssignments: Array<{ storageBucket: { id: string, operatorMetadata?: Types.Maybe<{ nodeEndpoint?: Types.Maybe<string> }>, operatorStatus: { __typename: 'StorageBucketOperatorStatusMissing' } | { __typename: 'StorageBucketOperatorStatusInvited' } | { __typename: 'StorageBucketOperatorStatusActive' } } }>, distirbutionAssignments: Array<{ distributionBucket: { id: string, operators: Array<{ workerId: number, status: Types.DistributionBucketOperatorStatus }> } }> } };
 
 export type GetDataObjectDetailsQueryVariables = Types.Exact<{
   id: Types.Scalars['ID'];
@@ -10,21 +10,21 @@ export type GetDataObjectDetailsQueryVariables = Types.Exact<{
 
 export type GetDataObjectDetailsQuery = { storageDataObjectByUniqueInput?: Types.Maybe<DataObjectDetailsFragment> };
 
-export type DistirubtionBucketsWithObjectsFragment = { id: string, distributedBags: Array<{ objects: Array<{ id: string, size: any, ipfsHash: string }> }> };
+export type DistirubtionBucketWithObjectsFragment = { id: string, bagAssignments: Array<{ storageBag: { objects: Array<{ id: string, size: any, ipfsHash: string }> } }> };
 
 export type GetDistributionBucketsWithObjectsByIdsQueryVariables = Types.Exact<{
   ids?: Types.Maybe<Array<Types.Scalars['ID']> | Types.Scalars['ID']>;
 }>;
 
 
-export type GetDistributionBucketsWithObjectsByIdsQuery = { distributionBuckets: Array<DistirubtionBucketsWithObjectsFragment> };
+export type GetDistributionBucketsWithObjectsByIdsQuery = { distributionBuckets: Array<DistirubtionBucketWithObjectsFragment> };
 
 export type GetDistributionBucketsWithObjectsByWorkerIdQueryVariables = Types.Exact<{
   workerId: Types.Scalars['Int'];
 }>;
 
 
-export type GetDistributionBucketsWithObjectsByWorkerIdQuery = { distributionBuckets: Array<DistirubtionBucketsWithObjectsFragment> };
+export type GetDistributionBucketsWithObjectsByWorkerIdQuery = { distributionBuckets: Array<DistirubtionBucketWithObjectsFragment> };
 
 export type StorageBucketOperatorFieldsFragment = { id: string, operatorMetadata?: Types.Maybe<{ nodeEndpoint?: Types.Maybe<string> }> };
 
@@ -40,32 +40,39 @@ export const DataObjectDetails = gql`
   ipfsHash
   isAccepted
   storageBag {
-    storedBy {
-      id
-      operatorMetadata {
-        nodeEndpoint
-      }
-      operatorStatus {
-        __typename
+    storageAssignments {
+      storageBucket {
+        id
+        operatorMetadata {
+          nodeEndpoint
+        }
+        operatorStatus {
+          __typename
+        }
       }
     }
-    distributedBy {
-      id
-      operators {
-        workerId
+    distirbutionAssignments {
+      distributionBucket {
+        id
+        operators {
+          workerId
+          status
+        }
       }
     }
   }
 }
     `;
-export const DistirubtionBucketsWithObjects = gql`
-    fragment DistirubtionBucketsWithObjects on DistributionBucket {
+export const DistirubtionBucketWithObjects = gql`
+    fragment DistirubtionBucketWithObjects on DistributionBucket {
   id
-  distributedBags {
-    objects {
-      id
-      size
-      ipfsHash
+  bagAssignments {
+    storageBag {
+      objects {
+        id
+        size
+        ipfsHash
+      }
     }
   }
 }
@@ -88,17 +95,17 @@ export const GetDataObjectDetails = gql`
 export const GetDistributionBucketsWithObjectsByIds = gql`
     query getDistributionBucketsWithObjectsByIds($ids: [ID!]) {
   distributionBuckets(where: {id_in: $ids}) {
-    ...DistirubtionBucketsWithObjects
+    ...DistirubtionBucketWithObjects
   }
 }
-    ${DistirubtionBucketsWithObjects}`;
+    ${DistirubtionBucketWithObjects}`;
 export const GetDistributionBucketsWithObjectsByWorkerId = gql`
     query getDistributionBucketsWithObjectsByWorkerId($workerId: Int!) {
-  distributionBuckets(where: {operators_some: {workerId_eq: $workerId}}) {
-    ...DistirubtionBucketsWithObjects
+  distributionBuckets(where: {operators_some: {workerId_eq: $workerId, status_eq: ACTIVE}}) {
+    ...DistirubtionBucketWithObjects
   }
 }
-    ${DistirubtionBucketsWithObjects}`;
+    ${DistirubtionBucketWithObjects}`;
 export const GetActiveStorageBucketOperatorsData = gql`
     query getActiveStorageBucketOperatorsData {
   storageBuckets(where: {operatorStatus_json: {isTypeOf_eq: "StorageBucketOperatorStatusActive"}, operatorMetadata: {nodeEndpoint_contains: "http"}}, limit: 9999) {

File diff suppressed because it is too large
+ 497 - 389
distributor-node/src/services/networking/query-node/generated/schema.ts


+ 0 - 1797
distributor-node/src/services/networking/query-node/mock.graphql

@@ -1,1797 +0,0 @@
-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
-}
-
-"""GraphQL representation of BigInt"""
-scalar BigInt
-
-"""
-The javascript `Date` as string. Type represents date and time as the ISO Date string.
-"""
-scalar DateTime
-
-interface DeleteResponse {
-  id: ID!
-}
-
-type DistributionBucket implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-  family: DistributionBucketFamily!
-  familyId: String!
-  operators: [DistributionBucketOperator!]!
-
-  """Whether the bucket is accepting any new bags"""
-  acceptingNewBags: Boolean!
-
-  """Whether the bucket is currently distributing content"""
-  distributing: Boolean!
-  distributedBags: [StorageBag!]!
-}
-
-type DistributionBucketConnection {
-  totalCount: Int!
-  edges: [DistributionBucketEdge!]!
-  pageInfo: PageInfo!
-}
-
-input DistributionBucketCreateInput {
-  family: ID!
-  acceptingNewBags: Boolean!
-  distributing: Boolean!
-}
-
-type DistributionBucketEdge {
-  node: DistributionBucket!
-  cursor: String!
-}
-
-type DistributionBucketFamily implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-  metadata: DistributionBucketFamilyMetadata
-  metadataId: String
-  buckets: [DistributionBucket!]!
-}
-
-type DistributionBucketFamilyConnection {
-  totalCount: Int!
-  edges: [DistributionBucketFamilyEdge!]!
-  pageInfo: PageInfo!
-}
-
-input DistributionBucketFamilyCreateInput {
-  metadata: ID
-}
-
-type DistributionBucketFamilyEdge {
-  node: DistributionBucketFamily!
-  cursor: String!
-}
-
-type DistributionBucketFamilyMetadata implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """Name of the geographical region covered by the family (ie.: us-east-1)"""
-  region: String
-
-  """
-  Optional, more specific description of the region covered by the family
-  """
-  description: String
-  boundary: [GeoCoordinates!]!
-  distributionbucketfamilymetadata: [DistributionBucketFamily!]
-}
-
-type DistributionBucketFamilyMetadataConnection {
-  totalCount: Int!
-  edges: [DistributionBucketFamilyMetadataEdge!]!
-  pageInfo: PageInfo!
-}
-
-input DistributionBucketFamilyMetadataCreateInput {
-  region: String
-  description: String
-}
-
-type DistributionBucketFamilyMetadataEdge {
-  node: DistributionBucketFamilyMetadata!
-  cursor: String!
-}
-
-enum DistributionBucketFamilyMetadataOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  region_ASC
-  region_DESC
-  description_ASC
-  description_DESC
-}
-
-input DistributionBucketFamilyMetadataUpdateInput {
-  region: String
-  description: String
-}
-
-input DistributionBucketFamilyMetadataWhereInput {
-  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!]
-  region_eq: String
-  region_contains: String
-  region_startsWith: String
-  region_endsWith: String
-  region_in: [String!]
-  description_eq: String
-  description_contains: String
-  description_startsWith: String
-  description_endsWith: String
-  description_in: [String!]
-  boundary_none: GeoCoordinatesWhereInput
-  boundary_some: GeoCoordinatesWhereInput
-  boundary_every: GeoCoordinatesWhereInput
-  distributionbucketfamilymetadata_none: DistributionBucketFamilyWhereInput
-  distributionbucketfamilymetadata_some: DistributionBucketFamilyWhereInput
-  distributionbucketfamilymetadata_every: DistributionBucketFamilyWhereInput
-  AND: [DistributionBucketFamilyMetadataWhereInput!]
-  OR: [DistributionBucketFamilyMetadataWhereInput!]
-}
-
-input DistributionBucketFamilyMetadataWhereUniqueInput {
-  id: ID!
-}
-
-enum DistributionBucketFamilyOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  metadata_ASC
-  metadata_DESC
-}
-
-input DistributionBucketFamilyUpdateInput {
-  metadata: ID
-}
-
-input DistributionBucketFamilyWhereInput {
-  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!]
-  metadata_eq: ID
-  metadata_in: [ID!]
-  metadata: DistributionBucketFamilyMetadataWhereInput
-  buckets_none: DistributionBucketWhereInput
-  buckets_some: DistributionBucketWhereInput
-  buckets_every: DistributionBucketWhereInput
-  AND: [DistributionBucketFamilyWhereInput!]
-  OR: [DistributionBucketFamilyWhereInput!]
-}
-
-input DistributionBucketFamilyWhereUniqueInput {
-  id: ID!
-}
-
-type DistributionBucketOperator implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-  distributionBucket: DistributionBucket!
-  distributionBucketId: String!
-
-  """ID of the distribution group worker"""
-  workerId: Int!
-
-  """Current operator status"""
-  status: DistributionBucketOperatorStatus!
-  metadata: DistributionBucketOperatorMetadata
-  metadataId: String
-}
-
-type DistributionBucketOperatorConnection {
-  totalCount: Int!
-  edges: [DistributionBucketOperatorEdge!]!
-  pageInfo: PageInfo!
-}
-
-input DistributionBucketOperatorCreateInput {
-  distributionBucket: ID!
-  workerId: Float!
-  status: DistributionBucketOperatorStatus!
-  metadata: ID
-}
-
-type DistributionBucketOperatorEdge {
-  node: DistributionBucketOperator!
-  cursor: String!
-}
-
-type DistributionBucketOperatorMetadata implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """Root distributor node api endpoint"""
-  nodeEndpoint: String
-  nodeLocation: NodeLocationMetadata
-  nodeLocationId: String
-
-  """Additional information about the node/operator"""
-  extra: String
-  distributionbucketoperatormetadata: [DistributionBucketOperator!]
-}
-
-type DistributionBucketOperatorMetadataConnection {
-  totalCount: Int!
-  edges: [DistributionBucketOperatorMetadataEdge!]!
-  pageInfo: PageInfo!
-}
-
-input DistributionBucketOperatorMetadataCreateInput {
-  nodeEndpoint: String
-  nodeLocation: ID
-  extra: String
-}
-
-type DistributionBucketOperatorMetadataEdge {
-  node: DistributionBucketOperatorMetadata!
-  cursor: String!
-}
-
-enum DistributionBucketOperatorMetadataOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  nodeEndpoint_ASC
-  nodeEndpoint_DESC
-  nodeLocation_ASC
-  nodeLocation_DESC
-  extra_ASC
-  extra_DESC
-}
-
-input DistributionBucketOperatorMetadataUpdateInput {
-  nodeEndpoint: String
-  nodeLocation: ID
-  extra: String
-}
-
-input DistributionBucketOperatorMetadataWhereInput {
-  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!]
-  nodeEndpoint_eq: String
-  nodeEndpoint_contains: String
-  nodeEndpoint_startsWith: String
-  nodeEndpoint_endsWith: String
-  nodeEndpoint_in: [String!]
-  nodeLocation_eq: ID
-  nodeLocation_in: [ID!]
-  extra_eq: String
-  extra_contains: String
-  extra_startsWith: String
-  extra_endsWith: String
-  extra_in: [String!]
-  nodeLocation: NodeLocationMetadataWhereInput
-  distributionbucketoperatormetadata_none: DistributionBucketOperatorWhereInput
-  distributionbucketoperatormetadata_some: DistributionBucketOperatorWhereInput
-  distributionbucketoperatormetadata_every: DistributionBucketOperatorWhereInput
-  AND: [DistributionBucketOperatorMetadataWhereInput!]
-  OR: [DistributionBucketOperatorMetadataWhereInput!]
-}
-
-input DistributionBucketOperatorMetadataWhereUniqueInput {
-  id: ID!
-}
-
-enum DistributionBucketOperatorOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  distributionBucket_ASC
-  distributionBucket_DESC
-  workerId_ASC
-  workerId_DESC
-  status_ASC
-  status_DESC
-  metadata_ASC
-  metadata_DESC
-}
-
-enum DistributionBucketOperatorStatus {
-  INVITED
-  ACTIVE
-}
-
-input DistributionBucketOperatorUpdateInput {
-  distributionBucket: ID
-  workerId: Float
-  status: DistributionBucketOperatorStatus
-  metadata: ID
-}
-
-input DistributionBucketOperatorWhereInput {
-  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!]
-  distributionBucket_eq: ID
-  distributionBucket_in: [ID!]
-  workerId_eq: Int
-  workerId_gt: Int
-  workerId_gte: Int
-  workerId_lt: Int
-  workerId_lte: Int
-  workerId_in: [Int!]
-  status_eq: DistributionBucketOperatorStatus
-  status_in: [DistributionBucketOperatorStatus!]
-  metadata_eq: ID
-  metadata_in: [ID!]
-  distributionBucket: DistributionBucketWhereInput
-  metadata: DistributionBucketOperatorMetadataWhereInput
-  AND: [DistributionBucketOperatorWhereInput!]
-  OR: [DistributionBucketOperatorWhereInput!]
-}
-
-input DistributionBucketOperatorWhereUniqueInput {
-  id: ID!
-}
-
-enum DistributionBucketOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  family_ASC
-  family_DESC
-  acceptingNewBags_ASC
-  acceptingNewBags_DESC
-  distributing_ASC
-  distributing_DESC
-}
-
-input DistributionBucketUpdateInput {
-  family: ID
-  acceptingNewBags: Boolean
-  distributing: Boolean
-}
-
-input DistributionBucketWhereInput {
-  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!]
-  family_eq: ID
-  family_in: [ID!]
-  acceptingNewBags_eq: Boolean
-  acceptingNewBags_in: [Boolean!]
-  distributing_eq: Boolean
-  distributing_in: [Boolean!]
-  family: DistributionBucketFamilyWhereInput
-  operators_none: DistributionBucketOperatorWhereInput
-  operators_some: DistributionBucketOperatorWhereInput
-  operators_every: DistributionBucketOperatorWhereInput
-  distributedBags_none: StorageBagWhereInput
-  distributedBags_some: StorageBagWhereInput
-  distributedBags_every: StorageBagWhereInput
-  AND: [DistributionBucketWhereInput!]
-  OR: [DistributionBucketWhereInput!]
-}
-
-input DistributionBucketWhereUniqueInput {
-  id: ID!
-}
-
-type GeoCoordinates implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-  latitude: Float!
-  longitude: Float!
-  boundarySourceBucketFamilyMeta: DistributionBucketFamilyMetadata
-  boundarySourceBucketFamilyMetaId: String
-  nodelocationmetadatacoordinates: [NodeLocationMetadata!]
-}
-
-type GeoCoordinatesConnection {
-  totalCount: Int!
-  edges: [GeoCoordinatesEdge!]!
-  pageInfo: PageInfo!
-}
-
-input GeoCoordinatesCreateInput {
-  latitude: Float!
-  longitude: Float!
-  boundarySourceBucketFamilyMeta: ID
-}
-
-type GeoCoordinatesEdge {
-  node: GeoCoordinates!
-  cursor: String!
-}
-
-enum GeoCoordinatesOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  latitude_ASC
-  latitude_DESC
-  longitude_ASC
-  longitude_DESC
-  boundarySourceBucketFamilyMeta_ASC
-  boundarySourceBucketFamilyMeta_DESC
-}
-
-input GeoCoordinatesUpdateInput {
-  latitude: Float
-  longitude: Float
-  boundarySourceBucketFamilyMeta: ID
-}
-
-input GeoCoordinatesWhereInput {
-  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!]
-  latitude_eq: Float
-  latitude_gt: Float
-  latitude_gte: Float
-  latitude_lt: Float
-  latitude_lte: Float
-  latitude_in: [Float!]
-  longitude_eq: Float
-  longitude_gt: Float
-  longitude_gte: Float
-  longitude_lt: Float
-  longitude_lte: Float
-  longitude_in: [Float!]
-  boundarySourceBucketFamilyMeta_eq: ID
-  boundarySourceBucketFamilyMeta_in: [ID!]
-  boundarySourceBucketFamilyMeta: DistributionBucketFamilyMetadataWhereInput
-  nodelocationmetadatacoordinates_none: NodeLocationMetadataWhereInput
-  nodelocationmetadatacoordinates_some: NodeLocationMetadataWhereInput
-  nodelocationmetadatacoordinates_every: NodeLocationMetadataWhereInput
-  AND: [GeoCoordinatesWhereInput!]
-  OR: [GeoCoordinatesWhereInput!]
-}
-
-input GeoCoordinatesWhereUniqueInput {
-  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 NodeLocationMetadata implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """ISO 3166-1 alpha-2 country code (2 letters)"""
-  countryCode: String
-
-  """City name"""
-  city: String
-  coordinates: GeoCoordinates
-  coordinatesId: String
-  distributionbucketoperatormetadatanodeLocation: [DistributionBucketOperatorMetadata!]
-  storagebucketoperatormetadatanodeLocation: [StorageBucketOperatorMetadata!]
-}
-
-type NodeLocationMetadataConnection {
-  totalCount: Int!
-  edges: [NodeLocationMetadataEdge!]!
-  pageInfo: PageInfo!
-}
-
-input NodeLocationMetadataCreateInput {
-  countryCode: String
-  city: String
-  coordinates: ID
-}
-
-type NodeLocationMetadataEdge {
-  node: NodeLocationMetadata!
-  cursor: String!
-}
-
-enum NodeLocationMetadataOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  countryCode_ASC
-  countryCode_DESC
-  city_ASC
-  city_DESC
-  coordinates_ASC
-  coordinates_DESC
-}
-
-input NodeLocationMetadataUpdateInput {
-  countryCode: String
-  city: String
-  coordinates: ID
-}
-
-input NodeLocationMetadataWhereInput {
-  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!]
-  countryCode_eq: String
-  countryCode_contains: String
-  countryCode_startsWith: String
-  countryCode_endsWith: String
-  countryCode_in: [String!]
-  city_eq: String
-  city_contains: String
-  city_startsWith: String
-  city_endsWith: String
-  city_in: [String!]
-  coordinates_eq: ID
-  coordinates_in: [ID!]
-  coordinates: GeoCoordinatesWhereInput
-  distributionbucketoperatormetadatanodeLocation_none: DistributionBucketOperatorMetadataWhereInput
-  distributionbucketoperatormetadatanodeLocation_some: DistributionBucketOperatorMetadataWhereInput
-  distributionbucketoperatormetadatanodeLocation_every: DistributionBucketOperatorMetadataWhereInput
-  storagebucketoperatormetadatanodeLocation_none: StorageBucketOperatorMetadataWhereInput
-  storagebucketoperatormetadatanodeLocation_some: StorageBucketOperatorMetadataWhereInput
-  storagebucketoperatormetadatanodeLocation_every: StorageBucketOperatorMetadataWhereInput
-  AND: [NodeLocationMetadataWhereInput!]
-  OR: [NodeLocationMetadataWhereInput!]
-}
-
-input NodeLocationMetadataWhereUniqueInput {
-  id: ID!
-}
-
-type PageInfo {
-  hasNextPage: Boolean!
-  hasPreviousPage: Boolean!
-  startCursor: String
-  endCursor: String
-}
-
-type ProcessorState {
-  lastCompleteBlock: Float!
-  lastProcessedEvent: String!
-  indexerHead: Float!
-  chainHead: Float!
-}
-
-type Query {
-  distributionBucketFamilyMetadata(offset: Int, limit: Int = 50, where: DistributionBucketFamilyMetadataWhereInput, orderBy: [DistributionBucketFamilyMetadataOrderByInput!]): [DistributionBucketFamilyMetadata!]!
-  distributionBucketFamilyMetadataByUniqueInput(where: DistributionBucketFamilyMetadataWhereUniqueInput!): DistributionBucketFamilyMetadata
-  distributionBucketFamilyMetadataConnection(first: Int, after: String, last: Int, before: String, where: DistributionBucketFamilyMetadataWhereInput, orderBy: [DistributionBucketFamilyMetadataOrderByInput!]): DistributionBucketFamilyMetadataConnection!
-  distributionBucketFamilies(offset: Int, limit: Int = 50, where: DistributionBucketFamilyWhereInput, orderBy: [DistributionBucketFamilyOrderByInput!]): [DistributionBucketFamily!]!
-  distributionBucketFamilyByUniqueInput(where: DistributionBucketFamilyWhereUniqueInput!): DistributionBucketFamily
-  distributionBucketFamiliesConnection(first: Int, after: String, last: Int, before: String, where: DistributionBucketFamilyWhereInput, orderBy: [DistributionBucketFamilyOrderByInput!]): DistributionBucketFamilyConnection!
-  distributionBucketOperatorMetadata(offset: Int, limit: Int = 50, where: DistributionBucketOperatorMetadataWhereInput, orderBy: [DistributionBucketOperatorMetadataOrderByInput!]): [DistributionBucketOperatorMetadata!]!
-  distributionBucketOperatorMetadataByUniqueInput(where: DistributionBucketOperatorMetadataWhereUniqueInput!): DistributionBucketOperatorMetadata
-  distributionBucketOperatorMetadataConnection(first: Int, after: String, last: Int, before: String, where: DistributionBucketOperatorMetadataWhereInput, orderBy: [DistributionBucketOperatorMetadataOrderByInput!]): DistributionBucketOperatorMetadataConnection!
-  distributionBucketOperators(offset: Int, limit: Int = 50, where: DistributionBucketOperatorWhereInput, orderBy: [DistributionBucketOperatorOrderByInput!]): [DistributionBucketOperator!]!
-  distributionBucketOperatorByUniqueInput(where: DistributionBucketOperatorWhereUniqueInput!): DistributionBucketOperator
-  distributionBucketOperatorsConnection(first: Int, after: String, last: Int, before: String, where: DistributionBucketOperatorWhereInput, orderBy: [DistributionBucketOperatorOrderByInput!]): DistributionBucketOperatorConnection!
-  distributionBuckets(offset: Int, limit: Int = 50, where: DistributionBucketWhereInput, orderBy: [DistributionBucketOrderByInput!]): [DistributionBucket!]!
-  distributionBucketByUniqueInput(where: DistributionBucketWhereUniqueInput!): DistributionBucket
-  distributionBucketsConnection(first: Int, after: String, last: Int, before: String, where: DistributionBucketWhereInput, orderBy: [DistributionBucketOrderByInput!]): DistributionBucketConnection!
-  geoCoordinates(offset: Int, limit: Int = 50, where: GeoCoordinatesWhereInput, orderBy: [GeoCoordinatesOrderByInput!]): [GeoCoordinates!]!
-  geoCoordinatesByUniqueInput(where: GeoCoordinatesWhereUniqueInput!): GeoCoordinates
-  geoCoordinatesConnection(first: Int, after: String, last: Int, before: String, where: GeoCoordinatesWhereInput, orderBy: [GeoCoordinatesOrderByInput!]): GeoCoordinatesConnection!
-  nodeLocationMetadata(offset: Int, limit: Int = 50, where: NodeLocationMetadataWhereInput, orderBy: [NodeLocationMetadataOrderByInput!]): [NodeLocationMetadata!]!
-  nodeLocationMetadataByUniqueInput(where: NodeLocationMetadataWhereUniqueInput!): NodeLocationMetadata
-  nodeLocationMetadataConnection(first: Int, after: String, last: Int, before: String, where: NodeLocationMetadataWhereInput, orderBy: [NodeLocationMetadataOrderByInput!]): NodeLocationMetadataConnection!
-  storageBags(offset: Int, limit: Int = 50, where: StorageBagWhereInput, orderBy: [StorageBagOrderByInput!]): [StorageBag!]!
-  storageBagByUniqueInput(where: StorageBagWhereUniqueInput!): StorageBag
-  storageBagsConnection(first: Int, after: String, last: Int, before: String, where: StorageBagWhereInput, orderBy: [StorageBagOrderByInput!]): StorageBagConnection!
-  storageBucketOperatorMetadata(offset: Int, limit: Int = 50, where: StorageBucketOperatorMetadataWhereInput, orderBy: [StorageBucketOperatorMetadataOrderByInput!]): [StorageBucketOperatorMetadata!]!
-  storageBucketOperatorMetadataByUniqueInput(where: StorageBucketOperatorMetadataWhereUniqueInput!): StorageBucketOperatorMetadata
-  storageBucketOperatorMetadataConnection(first: Int, after: String, last: Int, before: String, where: StorageBucketOperatorMetadataWhereInput, orderBy: [StorageBucketOperatorMetadataOrderByInput!]): StorageBucketOperatorMetadataConnection!
-  storageBuckets(offset: Int, limit: Int = 50, where: StorageBucketWhereInput, orderBy: [StorageBucketOrderByInput!]): [StorageBucket!]!
-  storageBucketByUniqueInput(where: StorageBucketWhereUniqueInput!): StorageBucket
-  storageBucketsConnection(first: Int, after: String, last: Int, before: String, where: StorageBucketWhereInput, orderBy: [StorageBucketOrderByInput!]): StorageBucketConnection!
-  storageDataObjects(offset: Int, limit: Int = 50, where: StorageDataObjectWhereInput, orderBy: [StorageDataObjectOrderByInput!]): [StorageDataObject!]!
-  storageDataObjectByUniqueInput(where: StorageDataObjectWhereUniqueInput!): StorageDataObject
-  storageDataObjectsConnection(first: Int, after: String, last: Int, before: String, where: StorageDataObjectWhereInput, orderBy: [StorageDataObjectOrderByInput!]): StorageDataObjectConnection!
-  storageSystemParameters(offset: Int, limit: Int = 50, where: StorageSystemParametersWhereInput, orderBy: [StorageSystemParametersOrderByInput!]): [StorageSystemParameters!]!
-  storageSystemParametersByUniqueInput(where: StorageSystemParametersWhereUniqueInput!): StorageSystemParameters
-  storageSystemParametersConnection(first: Int, after: String, last: Int, before: String, where: StorageSystemParametersWhereInput, orderBy: [StorageSystemParametersOrderByInput!]): StorageSystemParametersConnection!
-}
-
-type StandardDeleteResponse {
-  id: ID!
-}
-
-type StorageBag implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-  objects: [StorageDataObject!]!
-  storedBy: [StorageBucket!]!
-  distributedBy: [DistributionBucket!]!
-
-  """Owner of the storage bag"""
-  owner: StorageBagOwner!
-}
-
-type StorageBagConnection {
-  totalCount: Int!
-  edges: [StorageBagEdge!]!
-  pageInfo: PageInfo!
-}
-
-input StorageBagCreateInput {
-  owner: JSONObject!
-}
-
-type StorageBagEdge {
-  node: StorageBag!
-  cursor: String!
-}
-
-enum StorageBagOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-}
-
-union StorageBagOwner = StorageBagOwnerCouncil | StorageBagOwnerWorkingGroup | StorageBagOwnerMember | StorageBagOwnerChannel | StorageBagOwnerDAO
-
-type StorageBagOwnerChannel {
-  channelId: Int
-}
-
-input StorageBagOwnerChannelCreateInput {
-  channelId: Float
-}
-
-input StorageBagOwnerChannelUpdateInput {
-  channelId: Float
-}
-
-input StorageBagOwnerChannelWhereInput {
-  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: Int
-  channelId_gt: Int
-  channelId_gte: Int
-  channelId_lt: Int
-  channelId_lte: Int
-  channelId_in: [Int!]
-  AND: [StorageBagOwnerChannelWhereInput!]
-  OR: [StorageBagOwnerChannelWhereInput!]
-}
-
-input StorageBagOwnerChannelWhereUniqueInput {
-  id: ID!
-}
-
-type StorageBagOwnerCouncil {
-  phantom: Int
-}
-
-input StorageBagOwnerCouncilCreateInput {
-  phantom: Float
-}
-
-input StorageBagOwnerCouncilUpdateInput {
-  phantom: Float
-}
-
-input StorageBagOwnerCouncilWhereInput {
-  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!]
-  phantom_eq: Int
-  phantom_gt: Int
-  phantom_gte: Int
-  phantom_lt: Int
-  phantom_lte: Int
-  phantom_in: [Int!]
-  AND: [StorageBagOwnerCouncilWhereInput!]
-  OR: [StorageBagOwnerCouncilWhereInput!]
-}
-
-input StorageBagOwnerCouncilWhereUniqueInput {
-  id: ID!
-}
-
-type StorageBagOwnerDAO {
-  daoId: Int
-}
-
-input StorageBagOwnerDAOCreateInput {
-  daoId: Float
-}
-
-input StorageBagOwnerDAOUpdateInput {
-  daoId: Float
-}
-
-input StorageBagOwnerDAOWhereInput {
-  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!]
-  daoId_eq: Int
-  daoId_gt: Int
-  daoId_gte: Int
-  daoId_lt: Int
-  daoId_lte: Int
-  daoId_in: [Int!]
-  AND: [StorageBagOwnerDAOWhereInput!]
-  OR: [StorageBagOwnerDAOWhereInput!]
-}
-
-input StorageBagOwnerDAOWhereUniqueInput {
-  id: ID!
-}
-
-type StorageBagOwnerMember {
-  memberId: Int
-}
-
-input StorageBagOwnerMemberCreateInput {
-  memberId: Float
-}
-
-input StorageBagOwnerMemberUpdateInput {
-  memberId: Float
-}
-
-input StorageBagOwnerMemberWhereInput {
-  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!]
-  memberId_eq: Int
-  memberId_gt: Int
-  memberId_gte: Int
-  memberId_lt: Int
-  memberId_lte: Int
-  memberId_in: [Int!]
-  AND: [StorageBagOwnerMemberWhereInput!]
-  OR: [StorageBagOwnerMemberWhereInput!]
-}
-
-input StorageBagOwnerMemberWhereUniqueInput {
-  id: ID!
-}
-
-type StorageBagOwnerWorkingGroup {
-  workingGroupId: String
-}
-
-input StorageBagOwnerWorkingGroupCreateInput {
-  workingGroupId: String
-}
-
-input StorageBagOwnerWorkingGroupUpdateInput {
-  workingGroupId: String
-}
-
-input StorageBagOwnerWorkingGroupWhereInput {
-  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!]
-  workingGroupId_eq: String
-  workingGroupId_contains: String
-  workingGroupId_startsWith: String
-  workingGroupId_endsWith: String
-  workingGroupId_in: [String!]
-  AND: [StorageBagOwnerWorkingGroupWhereInput!]
-  OR: [StorageBagOwnerWorkingGroupWhereInput!]
-}
-
-input StorageBagOwnerWorkingGroupWhereUniqueInput {
-  id: ID!
-}
-
-input StorageBagUpdateInput {
-  owner: JSONObject
-}
-
-input StorageBagWhereInput {
-  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
-  objects_none: StorageDataObjectWhereInput
-  objects_some: StorageDataObjectWhereInput
-  objects_every: StorageDataObjectWhereInput
-  storedBy_none: StorageBucketWhereInput
-  storedBy_some: StorageBucketWhereInput
-  storedBy_every: StorageBucketWhereInput
-  distributedBy_none: DistributionBucketWhereInput
-  distributedBy_some: DistributionBucketWhereInput
-  distributedBy_every: DistributionBucketWhereInput
-  AND: [StorageBagWhereInput!]
-  OR: [StorageBagWhereInput!]
-}
-
-input StorageBagWhereUniqueInput {
-  id: ID!
-}
-
-type StorageBucket implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """Current bucket operator status"""
-  operatorStatus: StorageBucketOperatorStatus!
-  operatorMetadata: StorageBucketOperatorMetadata
-  operatorMetadataId: String
-
-  """Whether the bucket is accepting any new storage bags"""
-  acceptingNewBags: Boolean!
-  storedBags: [StorageBag!]!
-
-  """Bucket's data object size limit in bytes"""
-  dataObjectsSizeLimit: BigInt!
-
-  """Bucket's data object count limit"""
-  dataObjectCountLimit: BigInt!
-}
-
-type StorageBucketConnection {
-  totalCount: Int!
-  edges: [StorageBucketEdge!]!
-  pageInfo: PageInfo!
-}
-
-input StorageBucketCreateInput {
-  operatorStatus: JSONObject!
-  operatorMetadata: ID
-  acceptingNewBags: Boolean!
-  dataObjectsSizeLimit: BigInt!
-  dataObjectCountLimit: BigInt!
-}
-
-type StorageBucketEdge {
-  node: StorageBucket!
-  cursor: String!
-}
-
-type StorageBucketOperatorMetadata implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """Root node endpoint"""
-  nodeEndpoint: String
-  nodeLocation: NodeLocationMetadata
-  nodeLocationId: String
-
-  """Additional information about the node/operator"""
-  extra: String
-  storagebucketoperatorMetadata: [StorageBucket!]
-}
-
-type StorageBucketOperatorMetadataConnection {
-  totalCount: Int!
-  edges: [StorageBucketOperatorMetadataEdge!]!
-  pageInfo: PageInfo!
-}
-
-input StorageBucketOperatorMetadataCreateInput {
-  nodeEndpoint: String
-  nodeLocation: ID
-  extra: String
-}
-
-type StorageBucketOperatorMetadataEdge {
-  node: StorageBucketOperatorMetadata!
-  cursor: String!
-}
-
-enum StorageBucketOperatorMetadataOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  nodeEndpoint_ASC
-  nodeEndpoint_DESC
-  nodeLocation_ASC
-  nodeLocation_DESC
-  extra_ASC
-  extra_DESC
-}
-
-input StorageBucketOperatorMetadataUpdateInput {
-  nodeEndpoint: String
-  nodeLocation: ID
-  extra: String
-}
-
-input StorageBucketOperatorMetadataWhereInput {
-  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!]
-  nodeEndpoint_eq: String
-  nodeEndpoint_contains: String
-  nodeEndpoint_startsWith: String
-  nodeEndpoint_endsWith: String
-  nodeEndpoint_in: [String!]
-  nodeLocation_eq: ID
-  nodeLocation_in: [ID!]
-  extra_eq: String
-  extra_contains: String
-  extra_startsWith: String
-  extra_endsWith: String
-  extra_in: [String!]
-  nodeLocation: NodeLocationMetadataWhereInput
-  storagebucketoperatorMetadata_none: StorageBucketWhereInput
-  storagebucketoperatorMetadata_some: StorageBucketWhereInput
-  storagebucketoperatorMetadata_every: StorageBucketWhereInput
-  AND: [StorageBucketOperatorMetadataWhereInput!]
-  OR: [StorageBucketOperatorMetadataWhereInput!]
-}
-
-input StorageBucketOperatorMetadataWhereUniqueInput {
-  id: ID!
-}
-
-union StorageBucketOperatorStatus = StorageBucketOperatorStatusMissing | StorageBucketOperatorStatusInvited | StorageBucketOperatorStatusActive
-
-type StorageBucketOperatorStatusActive {
-  workerId: Int!
-}
-
-input StorageBucketOperatorStatusActiveCreateInput {
-  workerId: Float!
-}
-
-input StorageBucketOperatorStatusActiveUpdateInput {
-  workerId: Float
-}
-
-input StorageBucketOperatorStatusActiveWhereInput {
-  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!]
-  workerId_eq: Int
-  workerId_gt: Int
-  workerId_gte: Int
-  workerId_lt: Int
-  workerId_lte: Int
-  workerId_in: [Int!]
-  AND: [StorageBucketOperatorStatusActiveWhereInput!]
-  OR: [StorageBucketOperatorStatusActiveWhereInput!]
-}
-
-input StorageBucketOperatorStatusActiveWhereUniqueInput {
-  id: ID!
-}
-
-type StorageBucketOperatorStatusInvited {
-  workerId: Int!
-}
-
-input StorageBucketOperatorStatusInvitedCreateInput {
-  workerId: Float!
-}
-
-input StorageBucketOperatorStatusInvitedUpdateInput {
-  workerId: Float
-}
-
-input StorageBucketOperatorStatusInvitedWhereInput {
-  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!]
-  workerId_eq: Int
-  workerId_gt: Int
-  workerId_gte: Int
-  workerId_lt: Int
-  workerId_lte: Int
-  workerId_in: [Int!]
-  AND: [StorageBucketOperatorStatusInvitedWhereInput!]
-  OR: [StorageBucketOperatorStatusInvitedWhereInput!]
-}
-
-input StorageBucketOperatorStatusInvitedWhereUniqueInput {
-  id: ID!
-}
-
-type StorageBucketOperatorStatusMissing {
-  phantom: Int
-}
-
-input StorageBucketOperatorStatusMissingCreateInput {
-  phantom: Float
-}
-
-input StorageBucketOperatorStatusMissingUpdateInput {
-  phantom: Float
-}
-
-input StorageBucketOperatorStatusMissingWhereInput {
-  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!]
-  phantom_eq: Int
-  phantom_gt: Int
-  phantom_gte: Int
-  phantom_lt: Int
-  phantom_lte: Int
-  phantom_in: [Int!]
-  AND: [StorageBucketOperatorStatusMissingWhereInput!]
-  OR: [StorageBucketOperatorStatusMissingWhereInput!]
-}
-
-input StorageBucketOperatorStatusMissingWhereUniqueInput {
-  id: ID!
-}
-
-enum StorageBucketOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  operatorMetadata_ASC
-  operatorMetadata_DESC
-  acceptingNewBags_ASC
-  acceptingNewBags_DESC
-  dataObjectsSizeLimit_ASC
-  dataObjectsSizeLimit_DESC
-  dataObjectCountLimit_ASC
-  dataObjectCountLimit_DESC
-}
-
-input StorageBucketUpdateInput {
-  operatorStatus: JSONObject
-  operatorMetadata: ID
-  acceptingNewBags: Boolean
-  dataObjectsSizeLimit: BigInt
-  dataObjectCountLimit: BigInt
-}
-
-input StorageBucketWhereInput {
-  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!]
-  operatorStatus_json: JSONObject
-  operatorMetadata_eq: ID
-  operatorMetadata_in: [ID!]
-  acceptingNewBags_eq: Boolean
-  acceptingNewBags_in: [Boolean!]
-  dataObjectsSizeLimit_eq: BigInt
-  dataObjectsSizeLimit_gt: BigInt
-  dataObjectsSizeLimit_gte: BigInt
-  dataObjectsSizeLimit_lt: BigInt
-  dataObjectsSizeLimit_lte: BigInt
-  dataObjectsSizeLimit_in: [BigInt!]
-  dataObjectCountLimit_eq: BigInt
-  dataObjectCountLimit_gt: BigInt
-  dataObjectCountLimit_gte: BigInt
-  dataObjectCountLimit_lt: BigInt
-  dataObjectCountLimit_lte: BigInt
-  dataObjectCountLimit_in: [BigInt!]
-  operatorMetadata: StorageBucketOperatorMetadataWhereInput
-  storedBags_none: StorageBagWhereInput
-  storedBags_some: StorageBagWhereInput
-  storedBags_every: StorageBagWhereInput
-  AND: [StorageBucketWhereInput!]
-  OR: [StorageBucketWhereInput!]
-}
-
-input StorageBucketWhereUniqueInput {
-  id: ID!
-}
-
-type StorageDataObject implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """
-  Whether the data object was uploaded and accepted by the storage provider
-  """
-  isAccepted: Boolean!
-
-  """Data object size in bytes"""
-  size: BigInt!
-  storageBag: StorageBag!
-  storageBagId: String!
-
-  """IPFS content hash"""
-  ipfsHash: String!
-
-  """Public key used to authenticate the uploader by the storage provider"""
-  authenticationKey: String
-}
-
-type StorageDataObjectConnection {
-  totalCount: Int!
-  edges: [StorageDataObjectEdge!]!
-  pageInfo: PageInfo!
-}
-
-input StorageDataObjectCreateInput {
-  isAccepted: Boolean!
-  size: BigInt!
-  storageBag: ID!
-  ipfsHash: String!
-  authenticationKey: String
-}
-
-type StorageDataObjectEdge {
-  node: StorageDataObject!
-  cursor: String!
-}
-
-enum StorageDataObjectOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-  isAccepted_ASC
-  isAccepted_DESC
-  size_ASC
-  size_DESC
-  storageBag_ASC
-  storageBag_DESC
-  ipfsHash_ASC
-  ipfsHash_DESC
-  authenticationKey_ASC
-  authenticationKey_DESC
-}
-
-input StorageDataObjectUpdateInput {
-  isAccepted: Boolean
-  size: BigInt
-  storageBag: ID
-  ipfsHash: String
-  authenticationKey: String
-}
-
-input StorageDataObjectWhereInput {
-  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!]
-  isAccepted_eq: Boolean
-  isAccepted_in: [Boolean!]
-  size_eq: BigInt
-  size_gt: BigInt
-  size_gte: BigInt
-  size_lt: BigInt
-  size_lte: BigInt
-  size_in: [BigInt!]
-  storageBag_eq: ID
-  storageBag_in: [ID!]
-  ipfsHash_eq: String
-  ipfsHash_contains: String
-  ipfsHash_startsWith: String
-  ipfsHash_endsWith: String
-  ipfsHash_in: [String!]
-  authenticationKey_eq: String
-  authenticationKey_contains: String
-  authenticationKey_startsWith: String
-  authenticationKey_endsWith: String
-  authenticationKey_in: [String!]
-  storageBag: StorageBagWhereInput
-  AND: [StorageDataObjectWhereInput!]
-  OR: [StorageDataObjectWhereInput!]
-}
-
-input StorageDataObjectWhereUniqueInput {
-  id: ID!
-}
-
-"""Global storage system parameters"""
-type StorageSystemParameters implements BaseGraphQLObject {
-  id: ID!
-  createdAt: DateTime!
-  createdById: String!
-  updatedAt: DateTime
-  updatedById: String
-  deletedAt: DateTime
-  deletedById: String
-  version: Int!
-
-  """Blacklisted content hashes"""
-  blacklist: [String!]!
-}
-
-type StorageSystemParametersConnection {
-  totalCount: Int!
-  edges: [StorageSystemParametersEdge!]!
-  pageInfo: PageInfo!
-}
-
-input StorageSystemParametersCreateInput {
-  blacklist: [String!]!
-}
-
-type StorageSystemParametersEdge {
-  node: StorageSystemParameters!
-  cursor: String!
-}
-
-enum StorageSystemParametersOrderByInput {
-  createdAt_ASC
-  createdAt_DESC
-  updatedAt_ASC
-  updatedAt_DESC
-  deletedAt_ASC
-  deletedAt_DESC
-}
-
-input StorageSystemParametersUpdateInput {
-  blacklist: [String!]
-}
-
-input StorageSystemParametersWhereInput {
-  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!]
-  AND: [StorageSystemParametersWhereInput!]
-  OR: [StorageSystemParametersWhereInput!]
-}
-
-input StorageSystemParametersWhereUniqueInput {
-  id: ID!
-}
-
-type Subscription {
-  stateSubscription: ProcessorState!
-}

+ 27 - 20
distributor-node/src/services/networking/query-node/queries/queries.graphql

@@ -4,19 +4,24 @@ fragment DataObjectDetails on StorageDataObject {
   ipfsHash
   isAccepted
   storageBag {
-    storedBy {
-      id
-      operatorMetadata {
-        nodeEndpoint
-      }
-      operatorStatus {
-        __typename
+    storageAssignments {
+      storageBucket {
+        id
+        operatorMetadata {
+          nodeEndpoint
+        }
+        operatorStatus {
+          __typename
+        }
       }
     }
-    distributedBy {
-      id
-      operators {
-        workerId
+    distirbutionAssignments {
+      distributionBucket {
+        id
+        operators {
+          workerId
+          status
+        }
       }
     }
   }
@@ -28,26 +33,28 @@ query getDataObjectDetails($id: ID!) {
   }
 }
 
-fragment DistirubtionBucketsWithObjects on DistributionBucket {
+fragment DistirubtionBucketWithObjects on DistributionBucket {
   id
-  distributedBags {
-    objects {
-      id
-      size
-      ipfsHash
+  bagAssignments {
+    storageBag {
+      objects {
+        id
+        size
+        ipfsHash
+      }
     }
   }
 }
 
 query getDistributionBucketsWithObjectsByIds($ids: [ID!]) {
   distributionBuckets(where: { id_in: $ids }) {
-    ...DistirubtionBucketsWithObjects
+    ...DistirubtionBucketWithObjects
   }
 }
 
 query getDistributionBucketsWithObjectsByWorkerId($workerId: Int!) {
-  distributionBuckets(where: { operators_some: { workerId_eq: $workerId } }) {
-    ...DistirubtionBucketsWithObjects
+  distributionBuckets(where: { operators_some: { workerId_eq: $workerId, status_eq: ACTIVE } }) {
+    ...DistirubtionBucketWithObjects
   }
 }
 

+ 6 - 8
distributor-node/src/services/server/controllers/public.ts

@@ -87,7 +87,6 @@ export class PublicApiController {
     const { promise, objectSize } = pendingDownload
     const response = await promise
     const source = new URL(response.config.url!)
-    // TODO: FIXME: This may not be available soon! (may be removed from storage node)
     const contentType = response.headers['content-type'] || DEFAULT_CONTENT_TYPE
     res.setHeader('content-type', contentType)
     // Allow caching pendingDownload reponse only for very short period of time and requite revalidation,
@@ -211,13 +210,12 @@ export class PublicApiController {
           message: 'Data object does not exist',
         }
         res.status(404).json(errorRes)
-        // TODO: FIXME: UNCOMMENT!
-        // } else if (!objectInfo.isSupported) {
-        //   const errorRes: ErrorResponse = {
-        //     message: 'Data object not served by this node',
-        //   }
-        //   res.status(421).json(errorRes)
-        //   // TODO: Redirect to other node that supports it?
+      } else if (!objectInfo.isSupported) {
+        const errorRes: ErrorResponse = {
+          message: 'Data object not served by this node',
+        }
+        res.status(421).json(errorRes)
+        // TODO: Try to direct to a node that supports it?
       } else {
         const { data: objectData } = objectInfo
         if (!objectData) {

+ 1 - 2
package.json

@@ -45,8 +45,7 @@
     "bn.js": "^5.1.2",
     "rxjs": "^6.6.2",
     "typeorm": "^0.2.31",
-    "pg": "^8.4.0",
-    "chalk": "^4.0.0"
+    "pg": "^8.4.0"
   },
   "devDependencies": {
     "eslint": "^7.25.0",

File diff suppressed because it is too large
+ 492 - 80
yarn.lock


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