diff --git a/client/react-native/Makefile b/client/react-native/Makefile index dcdbbd1805..1eded658c7 100644 --- a/client/react-native/Makefile +++ b/client/react-native/Makefile @@ -188,7 +188,7 @@ webapp.list: | sed 's/\(0\.\)\{3\}0:1\([0-9]\)\{3\}->1\([0-9]\)\{3\}\/tcp\, \(0\.\)\{3\}0://g' | sed 's/->.*$$//g' webapp.logs: - @docker-compose logs -f $(SERV) + @docker-compose logs --tail=100 -f $(SERV) webapp.open: @GQL_PORTS=`docker ps -f name=react-native_core-service --format "{{.Ports}}" | \ diff --git a/client/react-native/common/components/Screens/Chats/Detail.js b/client/react-native/common/components/Screens/Chats/Detail.js index ca7becafb6..f591841eb6 100644 --- a/client/react-native/common/components/Screens/Chats/Detail.js +++ b/client/react-native/common/components/Screens/Chats/Detail.js @@ -27,6 +27,9 @@ class Message extends React.PureComponent { await this.props.screenProps.context.mutations.eventSeen({ id: this.props.data.id, }) + await this.props.screenProps.context.mutations.conversationRead({ + id: conversation.id, + }) } async componentDidUpdate (prevProps) { @@ -114,6 +117,7 @@ class Input extends PureComponent { this.setState({ input: '' }, async () => { try { const conversation = this.props.navigation.getParam('conversation') + console.log('conversation', conversation) await this.props.screenProps.context.mutations.conversationAddMessage({ conversation: { id: conversation.id, diff --git a/client/react-native/common/components/Screens/Chats/List.js b/client/react-native/common/components/Screens/Chats/List.js index 39592e31f2..7caab834a7 100644 --- a/client/react-native/common/components/Screens/Chats/List.js +++ b/client/react-native/common/components/Screens/Chats/List.js @@ -10,8 +10,8 @@ import { conversation as utils } from '../../../utils' const Item = fragments.Conversation(({ data, navigation }) => { const { id, updatedAt, readAt } = data - const isInvite = new Date(updatedAt).getTime() > 0 const isRead = new Date(readAt).getTime() > 0 + const isInvite = new Date(updatedAt).getTime() > 0 && !isRead return ( { {utils.getTitle(data)} - {isRead - ? 'No new message' - : isInvite - ? 'New conversation' + {isInvite + ? 'New conversation' + : isRead + ? 'No new message' : 'You have a new message'} @@ -81,10 +81,7 @@ export default class ListScreen extends PureComponent { variables={queries.ConversationList.defaultVariables} fragment={fragments.ConversationList} alias='ConversationList' - subscriptions={[ - subscriptions.conversationInvite, - subscriptions.conversationNewMessage, - ]} + subscriptions={[subscriptions.conversationInvite]} renderItem={props => } /> diff --git a/client/react-native/common/graphql/subscriptions/ConversationInvite.js b/client/react-native/common/graphql/subscriptions/ConversationInvite.js index b1de8747f7..96003a6fb5 100644 --- a/client/react-native/common/graphql/subscriptions/ConversationInvite.js +++ b/client/react-native/common/graphql/subscriptions/ConversationInvite.js @@ -14,7 +14,6 @@ export default context => ({ 'conversation:' + attributes.conversation.id ) updater(store, attributes.conversation) - console.log('ConversationInvite', attributes) await context.queries.Conversation.fetch({ id: attributes.conversation.id, }) diff --git a/client/react-native/common/graphql/subscriptions/ConversationNewMessage.js b/client/react-native/common/graphql/subscriptions/ConversationNewMessage.js index e7086167d8..e92421aca6 100644 --- a/client/react-native/common/graphql/subscriptions/ConversationNewMessage.js +++ b/client/react-native/common/graphql/subscriptions/ConversationNewMessage.js @@ -8,12 +8,10 @@ export default context => ({ updater && (async (store, data) => { if (data.EventStream.kind === 302) { - console.log('new message', data.EventStream) - const conversation = await context.queries.Conversation.fetch({ + updater(store, data.EventStream) + await context.queries.Conversation.fetch({ id: data.EventStream.conversationId, }) - console.log('ConversationNewMessage: conversation:', conversation) - return updater(store, conversation) } }), }), diff --git a/client/react-native/common/graphql/subscriptions/EventStream.js b/client/react-native/common/graphql/subscriptions/EventStream.js index 3477559f90..a7b553dfb7 100644 --- a/client/react-native/common/graphql/subscriptions/EventStream.js +++ b/client/react-native/common/graphql/subscriptions/EventStream.js @@ -1,4 +1,6 @@ import { graphql } from 'react-relay' + +import { enums } from '..' import { subscriber } from '../../relay' const EventStream = graphql` @@ -28,10 +30,15 @@ let _subscriber = null export default context => { if (subscriber === null || context !== _context) { - return (_subscriber = subscriber({ + _subscriber = subscriber({ environment: context.environment, subscription: EventStream, - })) + }) + _subscriber.subscribe({ + updater: (store, data) => { + console.log(enums.ValueBertyP2pKindInputKind[data.EventStream.kind]) + }, + }) } return _subscriber } diff --git a/client/react-native/common/relay/genericUpdater.js b/client/react-native/common/relay/genericUpdater.js index 865f1904a8..34f6d63ba3 100644 --- a/client/react-native/common/relay/genericUpdater.js +++ b/client/react-native/common/relay/genericUpdater.js @@ -31,9 +31,9 @@ const deepFilterEqual = (a, b) => { // export default (fragment, alias, args) => { return (store, data, deletion) => { - console.log(data, args) const helper = new FragmentHelper(fragment) const connectionHelper = helper.getConnection(alias) + console.log(alias, data, args) const root = store.getRoot() @@ -60,17 +60,19 @@ export default (fragment, alias, args) => { const edges = connection.getLinkedRecords('edges') - const field = args.orderBy || args.sortBy || 'id' + let field = args.orderBy || args.sortBy || 'id' + field = data[field] ? field : Case.camel(field) const node = store.get(data.id) || store.create(data.id, connectionHelper.getEdgeNodeType()) node.setValue(data.id, 'id') + node.setValue(data[field], 'field') const cursor = field === 'id' ? atob(data.id).split(/:(.+)/)[1] - : data[Case.camel(field)] || data[field] + : atob(data.id).split(/:(.+)/)[1] + ':' + data[field] if ( edges.length > 0 && diff --git a/client/react-native/common/schema.graphql b/client/react-native/common/schema.graphql index 293d195a6c..b5887972ea 100644 --- a/client/react-native/common/schema.graphql +++ b/client/react-native/common/schema.graphql @@ -26,31 +26,31 @@ type GoogleProtobufFileDescriptorSet { file: [GoogleProtobufFileDescriptorProto] } type GoogleProtobufFileDescriptorProto { - name: String! - package: String! - dependency: [String!] - publicDependency: [Int32!] - weakDependency: [Int32!] + name: String! + package: String! + dependency: [String!] + publicDependency: [Int32!] + weakDependency: [Int32!] messageType: [GoogleProtobufDescriptorProto] enumType: [GoogleProtobufEnumDescriptorProto] service: [GoogleProtobufServiceDescriptorProto] extension: [GoogleProtobufFieldDescriptorProto] options: GoogleProtobufFileOptions sourceCodeInfo: GoogleProtobufSourceCodeInfo - syntax: String! + syntax: String! } type GoogleProtobufDescriptorProtoExtensionRange { - start: Int32! - end: Int32! + start: Int32! + end: Int32! options: GoogleProtobufExtensionRangeOptions } type GoogleProtobufDescriptorProtoReservedRange { - start: Int32! - end: Int32! + start: Int32! + end: Int32! } type GoogleProtobufDescriptorProto { - name: String! + name: String! field: [GoogleProtobufFieldDescriptorProto] extension: [GoogleProtobufFieldDescriptorProto] nestedType: [GoogleProtobufDescriptorProto] @@ -59,7 +59,7 @@ type GoogleProtobufDescriptorProto { oneofDecl: [GoogleProtobufOneofDescriptorProto] options: GoogleProtobufMessageOptions reservedRange: [GoogleProtobufDescriptorProtoReservedRange] - reservedName: [String!] + reservedName: [String!] } type GoogleProtobufExtensionRangeOptions { uninterpretedOption: [GoogleProtobufUninterpretedOption] @@ -67,146 +67,146 @@ type GoogleProtobufExtensionRangeOptions { type GoogleProtobufFieldDescriptorProto { - name: String! - number: Int32! + name: String! + number: Int32! label: Enum type: Enum - typeName: String! - extendee: String! - defaultValue: String! - oneofIndex: Int32! - jsonName: String! + typeName: String! + extendee: String! + defaultValue: String! + oneofIndex: Int32! + jsonName: String! options: GoogleProtobufFieldOptions } type GoogleProtobufOneofDescriptorProto { - name: String! + name: String! options: GoogleProtobufOneofOptions } type GoogleProtobufEnumDescriptorProtoEnumReservedRange { - start: Int32! - end: Int32! + start: Int32! + end: Int32! } type GoogleProtobufEnumDescriptorProto { - name: String! + name: String! value: [GoogleProtobufEnumValueDescriptorProto] options: GoogleProtobufEnumOptions reservedRange: [GoogleProtobufEnumDescriptorProtoEnumReservedRange] - reservedName: [String!] + reservedName: [String!] } type GoogleProtobufEnumValueDescriptorProto { - name: String! - number: Int32! + name: String! + number: Int32! options: GoogleProtobufEnumValueOptions } type GoogleProtobufServiceDescriptorProto { - name: String! + name: String! method: [GoogleProtobufMethodDescriptorProto] options: GoogleProtobufServiceOptions } type GoogleProtobufMethodDescriptorProto { - name: String! - inputType: String! - outputType: String! + name: String! + inputType: String! + outputType: String! options: GoogleProtobufMethodOptions - clientStreaming: Bool! - serverStreaming: Bool! + clientStreaming: Bool! + serverStreaming: Bool! } type GoogleProtobufFileOptions { - javaPackage: String! - javaOuterClassname: String! - javaMultipleFiles: Bool! - javaGenerateEqualsAndHash: Bool! - javaStringCheckUtf8: Bool! + javaPackage: String! + javaOuterClassname: String! + javaMultipleFiles: Bool! + javaGenerateEqualsAndHash: Bool! + javaStringCheckUtf8: Bool! optimizeFor: Enum - goPackage: String! - ccGenericServices: Bool! - javaGenericServices: Bool! - pyGenericServices: Bool! - phpGenericServices: Bool! - deprecated: Bool! - ccEnableArenas: Bool! - objcClassPrefix: String! - csharpNamespace: String! - swiftPrefix: String! - phpClassPrefix: String! - phpNamespace: String! - phpMetadataNamespace: String! - rubyPackage: String! + goPackage: String! + ccGenericServices: Bool! + javaGenericServices: Bool! + pyGenericServices: Bool! + phpGenericServices: Bool! + deprecated: Bool! + ccEnableArenas: Bool! + objcClassPrefix: String! + csharpNamespace: String! + swiftPrefix: String! + phpClassPrefix: String! + phpNamespace: String! + phpMetadataNamespace: String! + rubyPackage: String! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufMessageOptions { - messageSetWireFormat: Bool! - noStandardDescriptorAccessor: Bool! - deprecated: Bool! - mapEntry: Bool! + messageSetWireFormat: Bool! + noStandardDescriptorAccessor: Bool! + deprecated: Bool! + mapEntry: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufFieldOptions { ctype: Enum - packed: Bool! + packed: Bool! jstype: Enum - lazy: Bool! - deprecated: Bool! - weak: Bool! + lazy: Bool! + deprecated: Bool! + weak: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufOneofOptions { uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufEnumOptions { - allowAlias: Bool! - deprecated: Bool! + allowAlias: Bool! + deprecated: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufEnumValueOptions { - deprecated: Bool! + deprecated: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufServiceOptions { - deprecated: Bool! + deprecated: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufMethodOptions { - deprecated: Bool! + deprecated: Bool! idempotencyLevel: Enum uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufUninterpretedOptionNamePart { - namePart: String! - isExtension: Bool! + namePart: String! + isExtension: Bool! } type GoogleProtobufUninterpretedOption { name: [GoogleProtobufUninterpretedOptionNamePart] - identifierValue: String! - positiveIntValue: Uint64! - negativeIntValue: Int64! - doubleValue: Double! - stringValue: [Byte!], - aggregateValue: String! + identifierValue: String! + positiveIntValue: Uint64! + negativeIntValue: Int64! + doubleValue: Double! + stringValue: [Byte!] + aggregateValue: String! } type GoogleProtobufSourceCodeInfoLocation { - path: [Int32!] - span: [Int32!] - leadingComments: String! - trailingComments: String! - leadingDetachedComments: [String!] + path: [Int32!] + span: [Int32!] + leadingComments: String! + trailingComments: String! + leadingDetachedComments: [String!] } type GoogleProtobufSourceCodeInfo { location: [GoogleProtobufSourceCodeInfoLocation] } type GoogleProtobufGeneratedCodeInfoAnnotation { - path: [Int32!] - sourceFile: String! - begin: Int32! - end: Int32! + path: [Int32!] + sourceFile: String! + begin: Int32! + end: Int32! } type GoogleProtobufGeneratedCodeInfo { annotation: [GoogleProtobufGeneratedCodeInfoAnnotation] @@ -273,10 +273,10 @@ type BertyEntityDevice implements Node { id: ID! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp - name: String! + name: String! status: Enum - apiVersion: Uint32! - contactId: String! + apiVersion: Uint32! + contactId: String! } @@ -287,13 +287,13 @@ type BertyEntityContact implements Node { id: ID! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDevice] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! } @@ -304,8 +304,8 @@ type BertyEntityConversation implements Node { createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp readAt: GoogleProtobufTimestamp - title: String! - topic: String! + title: String! + topic: String! members: [BertyEntityConversationMember] } @@ -315,15 +315,15 @@ type BertyEntityConversationMember implements Node { updatedAt: GoogleProtobufTimestamp status: Enum contact: BertyEntityContact - conversationId: String! - contactId: String! + conversationId: String! + contactId: String! } type BertyEntityMessage { - text: String! + text: String! } @@ -331,15 +331,15 @@ type BertyEntityMessage { type BertyEntitySenderAlias { - id: String! + id: String! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp status: Enum - originDeviceId: String! - contactId: String! - conversationId: String! - aliasIdentifier: String! - used: Bool! + originDeviceId: String! + contactId: String! + conversationId: String! + aliasIdentifier: String! + used: Bool! } @@ -347,21 +347,21 @@ type BertyEntitySenderAlias { type BertyP2pSentAttrs { - ids: [String!] + ids: [String!] } type BertyP2pAckAttrs { - ids: [String!] - errMsg: String! + ids: [String!] + errMsg: String! } type BertyP2pPingAttrs { - T: Bool! + T: Bool! } type BertyP2pContactRequestAttrs { me: BertyEntityContact - introText: String! + introText: String! } type BertyP2pContactRequestAcceptedAttrs { - T: Bool! + T: Bool! } type BertyP2pContactShareMeAttrs { me: BertyEntityContact @@ -376,15 +376,15 @@ type BertyP2pConversationNewMessageAttrs { message: BertyEntityMessage } type BertyP2pDevtoolsMapsetAttrs { - key: String! - val: String! + key: String! + val: String! } type BertyP2pSenderAliasUpdateAttrs { aliases: [BertyEntitySenderAlias] } type BertyP2pNodeAttrs { - kind: Int32! - attributes: [Byte!], + kind: Int32! + attributes: [Byte!] } @@ -393,25 +393,48 @@ type BertyP2pNodeAttrs { type BertyP2pEvent implements Node { id: ID! - senderId: String! + senderId: String! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp sentAt: GoogleProtobufTimestamp receivedAt: GoogleProtobufTimestamp ackedAt: GoogleProtobufTimestamp direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! + senderApiVersion: Uint32! + receiverApiVersion: Uint32! + receiverId: String! kind: Enum - attributes: [Byte!], + attributes: [Byte!] conversationId: ID! seenAt: GoogleProtobufTimestamp metadata: [BertyP2pMetadataKeyValue] } type BertyP2pMetadataKeyValue { - key: String! - values: [String!] + key: String! + values: [String!] +} + + + + + +type BertyNodeNodeStartedAttrs { + T: Bool! +} +type BertyNodeNodeStoppedAttrs { + errMsg: String! +} +type BertyNodeNodeIsAliveAttrs { + T: Bool! +} +type BertyNodeBackgroundErrorAttrs { + errMsg: String! +} +type BertyNodeBackgroundWarnAttrs { + errMsg: String! +} +type BertyNodeDebugAttrs { + msg: String! } @@ -448,12 +471,18 @@ type BertyPkgDeviceinfoDeviceInfo { +type BertyNodeProtocolsOutput { + protocols: [String!] +} +type BertyNodeAppVersionOutput { + version: String! +} type BertyNodePingDestination { - destination: String! + destination: String! } type BertyNodeEventEdge { node: BertyP2pEvent - cursor: String! + cursor: String! } type BertyNodeEventListConnection { edges: [BertyNodeEventEdge] @@ -461,7 +490,7 @@ type BertyNodeEventListConnection { } type BertyNodeContactEdge { node: BertyEntityContact - cursor: String! + cursor: String! } type BertyNodeContactListConnection { edges: [BertyNodeContactEdge] @@ -469,36 +498,43 @@ type BertyNodeContactListConnection { } type BertyNodeConversationEdge { node: BertyEntityConversation - cursor: String! + cursor: String! } type BertyNodeConversationListConnection { edges: [BertyNodeConversationEdge] pageInfo: BertyNodePageInfo! } type BertyNodePagination { - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String } type BertyNodePageInfo { - startCursor: String! - endCursor: String! - hasNextPage: Bool! - hasPreviousPage: Bool! - count: Uint32! + startCursor: String! + endCursor: String! + hasNextPage: Bool! + hasPreviousPage: Bool! + count: Uint32! +} +type BertyNodeIntegrationTestOutput { + name: String! + success: Bool! + verbose: String! + startedAt: GoogleProtobufTimestamp + finishedAt: GoogleProtobufTimestamp } type BertyNodeVoid { - T: Bool! + T: Bool! } type BertyNodeLogEntry { - line: String! + line: String! } type BertyNodeLogfileEntry { - path: String! - filesize: Int32! + path: String! + filesize: Int32! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp } @@ -512,94 +548,55 @@ type BertyNetworkPeerPayload { connection: Enum } input BertyP2pMetadataKeyValueInput { - key: String! - values: [String!] + key: String! + values: [String!] } input BertyP2pEventInput { id: ID! - senderId: String! + senderId: String! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput sentAt: GoogleProtobufTimestampInput receivedAt: GoogleProtobufTimestampInput ackedAt: GoogleProtobufTimestampInput direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! + senderApiVersion: Uint32! + receiverApiVersion: Uint32! + receiverId: String! kind: Enum - attributes: [Byte!], + attributes: [Byte!] conversationId: ID! seenAt: GoogleProtobufTimestampInput metadata: [BertyP2pMetadataKeyValueInput] } -type BertyP2pEventPayload { - id: ID! - senderId: String! - createdAt: GoogleProtobufTimestamp - updatedAt: GoogleProtobufTimestamp - sentAt: GoogleProtobufTimestamp - receivedAt: GoogleProtobufTimestamp - ackedAt: GoogleProtobufTimestamp - direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! - kind: Enum - attributes: [Byte!], - conversationId: ID! - seenAt: GoogleProtobufTimestamp - metadata: [BertyP2pMetadataKeyValue] -} input BertyNodePaginationInput { - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String } input BertyEntityDeviceInput { id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - name: String! + name: String! status: Enum - apiVersion: Uint32! - contactId: String! + apiVersion: Uint32! + contactId: String! } input BertyEntityContactInput { id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! -} -type BertyEntityContactPayload { - id: ID! - createdAt: GoogleProtobufTimestamp - updatedAt: GoogleProtobufTimestamp - sigchain: [Byte!], - status: Enum - devices: [BertyEntityDevice] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! -} -type BertyEntityConversationPayload { - id: ID! - createdAt: GoogleProtobufTimestamp - updatedAt: GoogleProtobufTimestamp - readAt: GoogleProtobufTimestamp - title: String! - topic: String! - members: [BertyEntityConversationMember] + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! } input BertyEntityConversationMemberInput { id: ID! @@ -607,16 +604,16 @@ input BertyEntityConversationMemberInput { updatedAt: GoogleProtobufTimestampInput status: Enum contact: BertyEntityContactInput - conversationId: String! - contactId: String! + conversationId: String! + contactId: String! } input BertyEntityConversationInput { id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput readAt: GoogleProtobufTimestampInput - title: String! - topic: String! + title: String! + topic: String! members: [BertyEntityConversationMemberInput] } input BertyEntityMessageInput { @@ -679,198 +676,174 @@ type Query { EventList( filter: BertyP2pEventInput onlyWithoutAckedAt: Enum - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String ): BertyNodeEventListConnection GetEvent( id: ID! - senderId: String! - createdAt: GoogleProtobufTimestampInput - updatedAt: GoogleProtobufTimestampInput - sentAt: GoogleProtobufTimestampInput - receivedAt: GoogleProtobufTimestampInput - ackedAt: GoogleProtobufTimestampInput - direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! - kind: Enum - attributes: [Byte!], - conversationId: ID! - seenAt: GoogleProtobufTimestampInput - metadata: [BertyP2pMetadataKeyValueInput] - ): BertyP2pEventPayload + ): BertyP2pEvent ContactList( filter: BertyEntityContactInput - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String ): BertyNodeContactListConnection - GetContact( - id: ID! - createdAt: GoogleProtobufTimestampInput - updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], - status: Enum - devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + Contact( + filter: BertyEntityContactInput + ): BertyEntityContact ConversationList( filter: BertyEntityConversationInput - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String ): BertyNodeConversationListConnection - GetConversation( + Conversation( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput readAt: GoogleProtobufTimestampInput - title: String! - topic: String! + title: String! + topic: String! members: [BertyEntityConversationMemberInput] - ): BertyEntityConversationPayload - GetConversationMember( + ): BertyEntityConversation + ConversationMember( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput status: Enum contact: BertyEntityContactInput - conversationId: String! - contactId: String! - ): BertyEntityConversationMemberPayload + conversationId: String! + contactId: String! + ): BertyEntityConversationMember DeviceInfos( - T: Bool! - ): BertyPkgDeviceinfoDeviceInfosPayload + T: Bool! + ): BertyPkgDeviceinfoDeviceInfos AppVersion( - T: Bool! - ): BertyNodeAppVersionPayload + T: Bool! + ): BertyNodeAppVersionOutput Peers( T: Bool! ): BertyNetworkPeersPayload Protocols( - id: String! - addrs: [String!] + id: String! + addrs: [String!] connection: Enum - ): BertyNodeProtocolsPayload + ): BertyNodeProtocolsOutput LogfileList( - T: Bool! - ): [BertyNodeLogfileEntryPayload] + T: Bool! + ): [BertyNodeLogfileEntry] Panic( - T: Bool! - ): BertyNodeVoidPayload + T: Bool! + ): BertyNodeVoid } type Mutation { EventSeen( id: ID! - ): BertyP2pEventPayload + ): BertyP2pEvent ContactRequest( contact: BertyEntityContactInput - introText: String! - ): BertyEntityContactPayload + introText: String! + ): BertyEntityContact ContactAcceptRequest( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! + ): BertyEntityContact ContactRemove( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! + ): BertyEntityContact ContactUpdate( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! + ): BertyEntityContact ConversationCreate( contacts: [BertyEntityContactInput] - title: String! - topic: String! - ): BertyEntityConversationPayload + title: String! + topic: String! + ): BertyEntityConversation ConversationInvite( conversation: BertyEntityConversationInput members: [BertyEntityConversationMemberInput] - ): BertyEntityConversationPayload + ): BertyEntityConversation ConversationExclude( conversation: BertyEntityConversationInput members: [BertyEntityConversationMemberInput] - ): BertyEntityConversationPayload + ): BertyEntityConversation ConversationAddMessage( conversation: BertyEntityConversationInput message: BertyEntityMessageInput - ): BertyP2pEventPayload + ): BertyP2pEvent ConversationRead( id: ID! - ): BertyEntityConversationPayload + ): BertyEntityConversation GenerateFakeData( - T: Bool! - ): BertyNodeVoidPayload + T: Bool! + ): BertyNodeVoid RunIntegrationTests( - name: String! - ): BertyNodeIntegrationTestPayload + name: String! + ): BertyNodeIntegrationTestOutput DebugRequeueEvent( eventId: ID! - ): BertyP2pEventPayload + ): BertyP2pEvent DebugRequeueAll( - T: Bool! - ): BertyNodeVoidPayload + T: Bool! + ): BertyNodeVoid } type Subscription { EventStream( filter: BertyP2pEventInput - ): BertyP2pEventPayload + ): BertyP2pEvent LogStream( - continues: Bool! - logLevel: String! - namespaces: String! - last: Int32! - ): BertyNodeLogEntryPayload + continues: Bool! + logLevel: String! + namespaces: String! + last: Int32! + ): BertyNodeLogEntry LogfileRead( - path: String! - ): BertyNodeLogEntryPayload + path: String! + ): BertyNodeLogEntry MonitorBandwidth( - id: String - totalIn: Int64 - totalOut: Int64 - rateIn: Double - rateOut: Double + id: String + totalIn: Int64 + totalOut: Int64 + rateIn: Double + rateOut: Double type: Enum ): BertyNetworkBandwidthStatsPayload MonitorPeers( diff --git a/core/api/node/graphql/graph/generated/generated.gen.go b/core/api/node/graphql/graph/generated/generated.gen.go index 4649de35b2..1ab650182d 100644 --- a/core/api/node/graphql/graph/generated/generated.gen.go +++ b/core/api/node/graphql/graph/generated/generated.gen.go @@ -41,14 +41,10 @@ type Config struct { type ResolverRoot interface { BertyEntityContact() BertyEntityContactResolver - BertyEntityContactPayload() BertyEntityContactPayloadResolver BertyEntityConversation() BertyEntityConversationResolver BertyEntityConversationMember() BertyEntityConversationMemberResolver - BertyEntityConversationMemberPayload() BertyEntityConversationMemberPayloadResolver - BertyEntityConversationPayload() BertyEntityConversationPayloadResolver BertyEntityDevice() BertyEntityDeviceResolver BertyP2pEvent() BertyP2pEventResolver - BertyP2pEventPayload() BertyP2pEventPayloadResolver GoogleProtobufFieldDescriptorProto() GoogleProtobufFieldDescriptorProtoResolver GoogleProtobufFieldOptions() GoogleProtobufFieldOptionsResolver GoogleProtobufFileOptions() GoogleProtobufFileOptionsResolver @@ -76,19 +72,6 @@ type ComplexityRoot struct { OverrideDisplayStatus func(childComplexity int) int } - BertyEntityContactPayload struct { - Id func(childComplexity int) int - CreatedAt func(childComplexity int) int - UpdatedAt func(childComplexity int) int - Sigchain func(childComplexity int) int - Status func(childComplexity int) int - Devices func(childComplexity int) int - DisplayName func(childComplexity int) int - DisplayStatus func(childComplexity int) int - OverrideDisplayName func(childComplexity int) int - OverrideDisplayStatus func(childComplexity int) int - } - BertyEntityConversation struct { Id func(childComplexity int) int CreatedAt func(childComplexity int) int @@ -109,26 +92,6 @@ type ComplexityRoot struct { ContactId func(childComplexity int) int } - BertyEntityConversationMemberPayload struct { - Id func(childComplexity int) int - CreatedAt func(childComplexity int) int - UpdatedAt func(childComplexity int) int - Status func(childComplexity int) int - Contact func(childComplexity int) int - ConversationId func(childComplexity int) int - ContactId func(childComplexity int) int - } - - BertyEntityConversationPayload struct { - Id func(childComplexity int) int - CreatedAt func(childComplexity int) int - UpdatedAt func(childComplexity int) int - ReadAt func(childComplexity int) int - Title func(childComplexity int) int - Topic func(childComplexity int) int - Members func(childComplexity int) int - } - BertyEntityDevice struct { Id func(childComplexity int) int CreatedAt func(childComplexity int) int @@ -239,7 +202,7 @@ type ComplexityRoot struct { PageInfo func(childComplexity int) int } - BertyNodeIntegrationTestPayload struct { + BertyNodeIntegrationTestOutput struct { Name func(childComplexity int) int Success func(childComplexity int) int Verbose func(childComplexity int) int @@ -251,10 +214,6 @@ type ComplexityRoot struct { Line func(childComplexity int) int } - BertyNodeLogEntryPayload struct { - Line func(childComplexity int) int - } - BertyNodeLogfileEntry struct { Path func(childComplexity int) int Filesize func(childComplexity int) int @@ -262,13 +221,6 @@ type ComplexityRoot struct { UpdatedAt func(childComplexity int) int } - BertyNodeLogfileEntryPayload struct { - Path func(childComplexity int) int - Filesize func(childComplexity int) int - CreatedAt func(childComplexity int) int - UpdatedAt func(childComplexity int) int - } - BertyNodeNodeEvent struct { Kind func(childComplexity int) int Attributes func(childComplexity int) int @@ -307,7 +259,7 @@ type ComplexityRoot struct { Destination func(childComplexity int) int } - BertyNodeProtocolsPayload struct { + BertyNodeProtocolsOutput struct { Protocols func(childComplexity int) int } @@ -321,10 +273,6 @@ type ComplexityRoot struct { T func(childComplexity int) int } - BertyNodeVoidPayload struct { - T func(childComplexity int) int - } - BertyP2pAckAttrs struct { Ids func(childComplexity int) int ErrMsg func(childComplexity int) int @@ -379,25 +327,6 @@ type ComplexityRoot struct { Metadata func(childComplexity int) int } - BertyP2pEventPayload struct { - Id func(childComplexity int) int - SenderId func(childComplexity int) int - CreatedAt func(childComplexity int) int - UpdatedAt func(childComplexity int) int - SentAt func(childComplexity int) int - ReceivedAt func(childComplexity int) int - AckedAt func(childComplexity int) int - Direction func(childComplexity int) int - SenderApiVersion func(childComplexity int) int - ReceiverApiVersion func(childComplexity int) int - ReceiverId func(childComplexity int) int - Kind func(childComplexity int) int - Attributes func(childComplexity int) int - ConversationId func(childComplexity int) int - SeenAt func(childComplexity int) int - Metadata func(childComplexity int) int - } - BertyP2pMetadataKeyValue struct { Key func(childComplexity int) int Values func(childComplexity int) int @@ -434,10 +363,6 @@ type ComplexityRoot struct { Infos func(childComplexity int) int } - BertyPkgDeviceinfoDeviceInfosPayload struct { - Infos func(childComplexity int) int - } - GoogleProtobufDescriptorProto struct { Name func(childComplexity int) int Field func(childComplexity int) int @@ -665,21 +590,21 @@ type ComplexityRoot struct { } Query struct { - Node func(childComplexity int, id string) int - Id func(childComplexity int, T bool) int - EventList func(childComplexity int, filter *p2p.Event, onlyWithoutAckedAt *int32, orderBy string, orderDesc bool, first *int32, after *string, last *int32, before *string) int - GetEvent func(childComplexity int, id string, senderId string, createdAt *time.Time, updatedAt *time.Time, sentAt *time.Time, receivedAt *time.Time, ackedAt *time.Time, direction *int32, senderApiVersion uint32, receiverApiVersion uint32, receiverId string, kind *int32, attributes []byte, conversationId string, seenAt *time.Time, metadata []*p2p.MetadataKeyValue) int - ContactList func(childComplexity int, filter *entity.Contact, orderBy string, orderDesc bool, first *int32, after *string, last *int32, before *string) int - GetContact func(childComplexity int, id string, createdAt *time.Time, updatedAt *time.Time, sigchain []byte, status *int32, devices []*entity.Device, displayName string, displayStatus string, overrideDisplayName string, overrideDisplayStatus string) int - ConversationList func(childComplexity int, filter *entity.Conversation, orderBy string, orderDesc bool, first *int32, after *string, last *int32, before *string) int - GetConversation func(childComplexity int, id string, createdAt *time.Time, updatedAt *time.Time, readAt *time.Time, title string, topic string, members []*entity.ConversationMember) int - GetConversationMember func(childComplexity int, id string, createdAt *time.Time, updatedAt *time.Time, status *int32, contact *entity.Contact, conversationId string, contactId string) int - DeviceInfos func(childComplexity int, T bool) int - AppVersion func(childComplexity int, T bool) int - Peers func(childComplexity int, T bool) int - Protocols func(childComplexity int, id string, addrs []string, connection *int32) int - LogfileList func(childComplexity int, T bool) int - Panic func(childComplexity int, T bool) int + Node func(childComplexity int, id string) int + Id func(childComplexity int, T bool) int + EventList func(childComplexity int, filter *p2p.Event, onlyWithoutAckedAt *int32, orderBy string, orderDesc bool, first *int32, after *string, last *int32, before *string) int + GetEvent func(childComplexity int, id string) int + ContactList func(childComplexity int, filter *entity.Contact, orderBy string, orderDesc bool, first *int32, after *string, last *int32, before *string) int + Contact func(childComplexity int, filter *entity.Contact) int + ConversationList func(childComplexity int, filter *entity.Conversation, orderBy string, orderDesc bool, first *int32, after *string, last *int32, before *string) int + Conversation func(childComplexity int, id string, createdAt *time.Time, updatedAt *time.Time, readAt *time.Time, title string, topic string, members []*entity.ConversationMember) int + ConversationMember func(childComplexity int, id string, createdAt *time.Time, updatedAt *time.Time, status *int32, contact *entity.Contact, conversationId string, contactId string) int + DeviceInfos func(childComplexity int, T bool) int + AppVersion func(childComplexity int, T bool) int + Peers func(childComplexity int, T bool) int + Protocols func(childComplexity int, id string, addrs []string, connection *int32) int + LogfileList func(childComplexity int, T bool) int + Panic func(childComplexity int, T bool) int } Subscription struct { @@ -694,21 +619,12 @@ type ComplexityRoot struct { type BertyEntityContactResolver interface { ID(ctx context.Context, obj *entity.Contact) (string, error) } -type BertyEntityContactPayloadResolver interface { - ID(ctx context.Context, obj *entity.Contact) (string, error) -} type BertyEntityConversationResolver interface { ID(ctx context.Context, obj *entity.Conversation) (string, error) } type BertyEntityConversationMemberResolver interface { ID(ctx context.Context, obj *entity.ConversationMember) (string, error) } -type BertyEntityConversationMemberPayloadResolver interface { - ID(ctx context.Context, obj *entity.ConversationMember) (string, error) -} -type BertyEntityConversationPayloadResolver interface { - ID(ctx context.Context, obj *entity.Conversation) (string, error) -} type BertyEntityDeviceResolver interface { ID(ctx context.Context, obj *entity.Device) (string, error) } @@ -718,12 +634,6 @@ type BertyP2pEventResolver interface { Attributes(ctx context.Context, obj *p2p.Event) ([]byte, error) ConversationID(ctx context.Context, obj *p2p.Event) (string, error) } -type BertyP2pEventPayloadResolver interface { - ID(ctx context.Context, obj *p2p.Event) (string, error) - - Attributes(ctx context.Context, obj *p2p.Event) ([]byte, error) - ConversationID(ctx context.Context, obj *p2p.Event) (string, error) -} type GoogleProtobufFieldDescriptorProtoResolver interface { Label(ctx context.Context, obj *descriptor.FieldDescriptorProto) (*int32, error) Type(ctx context.Context, obj *descriptor.FieldDescriptorProto) (*int32, error) @@ -765,12 +675,12 @@ type QueryResolver interface { Node(ctx context.Context, id string) (models.Node, error) ID(ctx context.Context, T bool) (*network.Peer, error) EventList(ctx context.Context, filter *p2p.Event, onlyWithoutAckedAt *int32, orderBy string, orderDesc bool, first *int32, after *string, last *int32, before *string) (*node.EventListConnection, error) - GetEvent(ctx context.Context, id string, senderId string, createdAt *time.Time, updatedAt *time.Time, sentAt *time.Time, receivedAt *time.Time, ackedAt *time.Time, direction *int32, senderApiVersion uint32, receiverApiVersion uint32, receiverId string, kind *int32, attributes []byte, conversationId string, seenAt *time.Time, metadata []*p2p.MetadataKeyValue) (*p2p.Event, error) + GetEvent(ctx context.Context, id string) (*p2p.Event, error) ContactList(ctx context.Context, filter *entity.Contact, orderBy string, orderDesc bool, first *int32, after *string, last *int32, before *string) (*node.ContactListConnection, error) - GetContact(ctx context.Context, id string, createdAt *time.Time, updatedAt *time.Time, sigchain []byte, status *int32, devices []*entity.Device, displayName string, displayStatus string, overrideDisplayName string, overrideDisplayStatus string) (*entity.Contact, error) + Contact(ctx context.Context, filter *entity.Contact) (*entity.Contact, error) ConversationList(ctx context.Context, filter *entity.Conversation, orderBy string, orderDesc bool, first *int32, after *string, last *int32, before *string) (*node.ConversationListConnection, error) - GetConversation(ctx context.Context, id string, createdAt *time.Time, updatedAt *time.Time, readAt *time.Time, title string, topic string, members []*entity.ConversationMember) (*entity.Conversation, error) - GetConversationMember(ctx context.Context, id string, createdAt *time.Time, updatedAt *time.Time, status *int32, contact *entity.Contact, conversationId string, contactId string) (*entity.ConversationMember, error) + Conversation(ctx context.Context, id string, createdAt *time.Time, updatedAt *time.Time, readAt *time.Time, title string, topic string, members []*entity.ConversationMember) (*entity.Conversation, error) + ConversationMember(ctx context.Context, id string, createdAt *time.Time, updatedAt *time.Time, status *int32, contact *entity.Contact, conversationId string, contactId string) (*entity.ConversationMember, error) DeviceInfos(ctx context.Context, T bool) (*deviceinfo.DeviceInfos, error) AppVersion(ctx context.Context, T bool) (*node.AppVersionOutput, error) Peers(ctx context.Context, T bool) (*network.Peers, error) @@ -1635,219 +1545,132 @@ func field_Query_GetEvent_args(rawArgs map[string]interface{}) (map[string]inter } } args["id"] = arg0 - var arg1 string - if tmp, ok := rawArgs["senderId"]; ok { - var err error - arg1, err = models.UnmarshalString(tmp) - if err != nil { - return nil, err - } - } - args["senderId"] = arg1 - var arg2 *time.Time - if tmp, ok := rawArgs["createdAt"]; ok { - var err error - var ptr1 time.Time - if tmp != nil { - ptr1, err = models.UnmarshalTime(tmp) - arg2 = &ptr1 - } + return args, nil - if err != nil { - return nil, err - } - } - args["createdAt"] = arg2 - var arg3 *time.Time - if tmp, ok := rawArgs["updatedAt"]; ok { - var err error - var ptr1 time.Time - if tmp != nil { - ptr1, err = models.UnmarshalTime(tmp) - arg3 = &ptr1 - } +} - if err != nil { - return nil, err - } - } - args["updatedAt"] = arg3 - var arg4 *time.Time - if tmp, ok := rawArgs["sentAt"]; ok { +func field_Query_ContactList_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { + args := map[string]interface{}{} + var arg0 *entity.Contact + if tmp, ok := rawArgs["filter"]; ok { var err error - var ptr1 time.Time + var ptr1 entity.Contact if tmp != nil { - ptr1, err = models.UnmarshalTime(tmp) - arg4 = &ptr1 + ptr1, err = UnmarshalBertyEntityContactInput(tmp) + arg0 = &ptr1 } if err != nil { return nil, err } } - args["sentAt"] = arg4 - var arg5 *time.Time - if tmp, ok := rawArgs["receivedAt"]; ok { + args["filter"] = arg0 + var arg1 string + if tmp, ok := rawArgs["orderBy"]; ok { var err error - var ptr1 time.Time - if tmp != nil { - ptr1, err = models.UnmarshalTime(tmp) - arg5 = &ptr1 - } - + arg1, err = models.UnmarshalString(tmp) if err != nil { return nil, err } } - args["receivedAt"] = arg5 - var arg6 *time.Time - if tmp, ok := rawArgs["ackedAt"]; ok { + args["orderBy"] = arg1 + var arg2 bool + if tmp, ok := rawArgs["orderDesc"]; ok { var err error - var ptr1 time.Time - if tmp != nil { - ptr1, err = models.UnmarshalTime(tmp) - arg6 = &ptr1 - } - + arg2, err = models.UnmarshalBool(tmp) if err != nil { return nil, err } } - args["ackedAt"] = arg6 - var arg7 *int32 - if tmp, ok := rawArgs["direction"]; ok { + args["orderDesc"] = arg2 + var arg3 *int32 + if tmp, ok := rawArgs["first"]; ok { var err error var ptr1 int32 if tmp != nil { - ptr1, err = models.UnmarshalEnum(tmp) - arg7 = &ptr1 + ptr1, err = models.UnmarshalInt32(tmp) + arg3 = &ptr1 } if err != nil { return nil, err } } - args["direction"] = arg7 - var arg8 uint32 - if tmp, ok := rawArgs["senderApiVersion"]; ok { - var err error - arg8, err = models.UnmarshalUint32(tmp) - if err != nil { - return nil, err - } - } - args["senderApiVersion"] = arg8 - var arg9 uint32 - if tmp, ok := rawArgs["receiverApiVersion"]; ok { - var err error - arg9, err = models.UnmarshalUint32(tmp) - if err != nil { - return nil, err - } - } - args["receiverApiVersion"] = arg9 - var arg10 string - if tmp, ok := rawArgs["receiverId"]; ok { - var err error - arg10, err = models.UnmarshalString(tmp) - if err != nil { - return nil, err - } - } - args["receiverId"] = arg10 - var arg11 *int32 - if tmp, ok := rawArgs["kind"]; ok { + args["first"] = arg3 + var arg4 *string + if tmp, ok := rawArgs["after"]; ok { var err error - var ptr1 int32 + var ptr1 string if tmp != nil { - ptr1, err = models.UnmarshalEnum(tmp) - arg11 = &ptr1 + ptr1, err = models.UnmarshalString(tmp) + arg4 = &ptr1 } if err != nil { return nil, err } } - args["kind"] = arg11 - var arg12 []byte - if tmp, ok := rawArgs["attributes"]; ok { + args["after"] = arg4 + var arg5 *int32 + if tmp, ok := rawArgs["last"]; ok { var err error - var rawIf1 []interface{} + var ptr1 int32 if tmp != nil { - if tmp1, ok := tmp.([]interface{}); ok { - rawIf1 = tmp1 - } else { - rawIf1 = []interface{}{tmp} - } - } - arg12 = make([]byte, len(rawIf1)) - for idx1 := range rawIf1 { - arg12[idx1], err = models.UnmarshalByte(rawIf1[idx1]) - } - if err != nil { - return nil, err + ptr1, err = models.UnmarshalInt32(tmp) + arg5 = &ptr1 } - } - args["attributes"] = arg12 - var arg13 string - if tmp, ok := rawArgs["conversationId"]; ok { - var err error - arg13, err = models.UnmarshalID(tmp) + if err != nil { return nil, err } } - args["conversationId"] = arg13 - var arg14 *time.Time - if tmp, ok := rawArgs["seenAt"]; ok { + args["last"] = arg5 + var arg6 *string + if tmp, ok := rawArgs["before"]; ok { var err error - var ptr1 time.Time + var ptr1 string if tmp != nil { - ptr1, err = models.UnmarshalTime(tmp) - arg14 = &ptr1 + ptr1, err = models.UnmarshalString(tmp) + arg6 = &ptr1 } if err != nil { return nil, err } } - args["seenAt"] = arg14 - var arg15 []*p2p.MetadataKeyValue - if tmp, ok := rawArgs["metadata"]; ok { + args["before"] = arg6 + return args, nil + +} + +func field_Query_Contact_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { + args := map[string]interface{}{} + var arg0 *entity.Contact + if tmp, ok := rawArgs["filter"]; ok { var err error - var rawIf1 []interface{} + var ptr1 entity.Contact if tmp != nil { - if tmp1, ok := tmp.([]interface{}); ok { - rawIf1 = tmp1 - } else { - rawIf1 = []interface{}{tmp} - } - } - arg15 = make([]*p2p.MetadataKeyValue, len(rawIf1)) - for idx1 := range rawIf1 { - var ptr2 p2p.MetadataKeyValue - if rawIf1[idx1] != nil { - ptr2, err = UnmarshalBertyP2pMetadataKeyValueInput(rawIf1[idx1]) - arg15[idx1] = &ptr2 - } + ptr1, err = UnmarshalBertyEntityContactInput(tmp) + arg0 = &ptr1 } + if err != nil { return nil, err } } - args["metadata"] = arg15 + args["filter"] = arg0 return args, nil } -func field_Query_ContactList_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { +func field_Query_ConversationList_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { args := map[string]interface{}{} - var arg0 *entity.Contact + var arg0 *entity.Conversation if tmp, ok := rawArgs["filter"]; ok { var err error - var ptr1 entity.Contact + var ptr1 entity.Conversation if tmp != nil { - ptr1, err = UnmarshalBertyEntityContactInput(tmp) + ptr1, err = UnmarshalBertyEntityConversationInput(tmp) arg0 = &ptr1 } @@ -1934,7 +1757,7 @@ func field_Query_ContactList_args(rawArgs map[string]interface{}) (map[string]in } -func field_Query_GetContact_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { +func field_Query_Conversation_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { args := map[string]interface{}{} var arg0 string if tmp, ok := rawArgs["id"]; ok { @@ -1973,253 +1796,22 @@ func field_Query_GetContact_args(rawArgs map[string]interface{}) (map[string]int } } args["updatedAt"] = arg2 - var arg3 []byte - if tmp, ok := rawArgs["sigchain"]; ok { + var arg3 *time.Time + if tmp, ok := rawArgs["readAt"]; ok { var err error - var rawIf1 []interface{} + var ptr1 time.Time if tmp != nil { - if tmp1, ok := tmp.([]interface{}); ok { - rawIf1 = tmp1 - } else { - rawIf1 = []interface{}{tmp} - } - } - arg3 = make([]byte, len(rawIf1)) - for idx1 := range rawIf1 { - arg3[idx1], err = models.UnmarshalByte(rawIf1[idx1]) + ptr1, err = models.UnmarshalTime(tmp) + arg3 = &ptr1 } + if err != nil { return nil, err } } - args["sigchain"] = arg3 - var arg4 *int32 - if tmp, ok := rawArgs["status"]; ok { - var err error - var ptr1 int32 - if tmp != nil { - ptr1, err = models.UnmarshalEnum(tmp) - arg4 = &ptr1 - } - - if err != nil { - return nil, err - } - } - args["status"] = arg4 - var arg5 []*entity.Device - if tmp, ok := rawArgs["devices"]; ok { - var err error - var rawIf1 []interface{} - if tmp != nil { - if tmp1, ok := tmp.([]interface{}); ok { - rawIf1 = tmp1 - } else { - rawIf1 = []interface{}{tmp} - } - } - arg5 = make([]*entity.Device, len(rawIf1)) - for idx1 := range rawIf1 { - var ptr2 entity.Device - if rawIf1[idx1] != nil { - ptr2, err = UnmarshalBertyEntityDeviceInput(rawIf1[idx1]) - arg5[idx1] = &ptr2 - } - } - if err != nil { - return nil, err - } - } - args["devices"] = arg5 - var arg6 string - if tmp, ok := rawArgs["displayName"]; ok { - var err error - arg6, err = models.UnmarshalString(tmp) - if err != nil { - return nil, err - } - } - args["displayName"] = arg6 - var arg7 string - if tmp, ok := rawArgs["displayStatus"]; ok { - var err error - arg7, err = models.UnmarshalString(tmp) - if err != nil { - return nil, err - } - } - args["displayStatus"] = arg7 - var arg8 string - if tmp, ok := rawArgs["overrideDisplayName"]; ok { - var err error - arg8, err = models.UnmarshalString(tmp) - if err != nil { - return nil, err - } - } - args["overrideDisplayName"] = arg8 - var arg9 string - if tmp, ok := rawArgs["overrideDisplayStatus"]; ok { - var err error - arg9, err = models.UnmarshalString(tmp) - if err != nil { - return nil, err - } - } - args["overrideDisplayStatus"] = arg9 - return args, nil - -} - -func field_Query_ConversationList_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *entity.Conversation - if tmp, ok := rawArgs["filter"]; ok { - var err error - var ptr1 entity.Conversation - if tmp != nil { - ptr1, err = UnmarshalBertyEntityConversationInput(tmp) - arg0 = &ptr1 - } - - if err != nil { - return nil, err - } - } - args["filter"] = arg0 - var arg1 string - if tmp, ok := rawArgs["orderBy"]; ok { - var err error - arg1, err = models.UnmarshalString(tmp) - if err != nil { - return nil, err - } - } - args["orderBy"] = arg1 - var arg2 bool - if tmp, ok := rawArgs["orderDesc"]; ok { - var err error - arg2, err = models.UnmarshalBool(tmp) - if err != nil { - return nil, err - } - } - args["orderDesc"] = arg2 - var arg3 *int32 - if tmp, ok := rawArgs["first"]; ok { - var err error - var ptr1 int32 - if tmp != nil { - ptr1, err = models.UnmarshalInt32(tmp) - arg3 = &ptr1 - } - - if err != nil { - return nil, err - } - } - args["first"] = arg3 - var arg4 *string - if tmp, ok := rawArgs["after"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = models.UnmarshalString(tmp) - arg4 = &ptr1 - } - - if err != nil { - return nil, err - } - } - args["after"] = arg4 - var arg5 *int32 - if tmp, ok := rawArgs["last"]; ok { - var err error - var ptr1 int32 - if tmp != nil { - ptr1, err = models.UnmarshalInt32(tmp) - arg5 = &ptr1 - } - - if err != nil { - return nil, err - } - } - args["last"] = arg5 - var arg6 *string - if tmp, ok := rawArgs["before"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = models.UnmarshalString(tmp) - arg6 = &ptr1 - } - - if err != nil { - return nil, err - } - } - args["before"] = arg6 - return args, nil - -} - -func field_Query_GetConversation_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["id"]; ok { - var err error - arg0, err = models.UnmarshalID(tmp) - if err != nil { - return nil, err - } - } - args["id"] = arg0 - var arg1 *time.Time - if tmp, ok := rawArgs["createdAt"]; ok { - var err error - var ptr1 time.Time - if tmp != nil { - ptr1, err = models.UnmarshalTime(tmp) - arg1 = &ptr1 - } - - if err != nil { - return nil, err - } - } - args["createdAt"] = arg1 - var arg2 *time.Time - if tmp, ok := rawArgs["updatedAt"]; ok { - var err error - var ptr1 time.Time - if tmp != nil { - ptr1, err = models.UnmarshalTime(tmp) - arg2 = &ptr1 - } - - if err != nil { - return nil, err - } - } - args["updatedAt"] = arg2 - var arg3 *time.Time - if tmp, ok := rawArgs["readAt"]; ok { - var err error - var ptr1 time.Time - if tmp != nil { - ptr1, err = models.UnmarshalTime(tmp) - arg3 = &ptr1 - } - - if err != nil { - return nil, err - } - } - args["readAt"] = arg3 - var arg4 string - if tmp, ok := rawArgs["title"]; ok { + args["readAt"] = arg3 + var arg4 string + if tmp, ok := rawArgs["title"]; ok { var err error arg4, err = models.UnmarshalString(tmp) if err != nil { @@ -2264,7 +1856,7 @@ func field_Query_GetConversation_args(rawArgs map[string]interface{}) (map[strin } -func field_Query_GetConversationMember_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { +func field_Query_ConversationMember_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { args := map[string]interface{}{} var arg0 string if tmp, ok := rawArgs["id"]; ok { @@ -2787,152 +2379,82 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.BertyEntityContact.OverrideDisplayStatus(childComplexity), true - case "BertyEntityContactPayload.id": - if e.complexity.BertyEntityContactPayload.Id == nil { + case "BertyEntityConversation.id": + if e.complexity.BertyEntityConversation.Id == nil { break } - return e.complexity.BertyEntityContactPayload.Id(childComplexity), true + return e.complexity.BertyEntityConversation.Id(childComplexity), true - case "BertyEntityContactPayload.createdAt": - if e.complexity.BertyEntityContactPayload.CreatedAt == nil { + case "BertyEntityConversation.createdAt": + if e.complexity.BertyEntityConversation.CreatedAt == nil { break } - return e.complexity.BertyEntityContactPayload.CreatedAt(childComplexity), true + return e.complexity.BertyEntityConversation.CreatedAt(childComplexity), true - case "BertyEntityContactPayload.updatedAt": - if e.complexity.BertyEntityContactPayload.UpdatedAt == nil { + case "BertyEntityConversation.updatedAt": + if e.complexity.BertyEntityConversation.UpdatedAt == nil { break } - return e.complexity.BertyEntityContactPayload.UpdatedAt(childComplexity), true + return e.complexity.BertyEntityConversation.UpdatedAt(childComplexity), true - case "BertyEntityContactPayload.sigchain": - if e.complexity.BertyEntityContactPayload.Sigchain == nil { + case "BertyEntityConversation.readAt": + if e.complexity.BertyEntityConversation.ReadAt == nil { break } - return e.complexity.BertyEntityContactPayload.Sigchain(childComplexity), true + return e.complexity.BertyEntityConversation.ReadAt(childComplexity), true - case "BertyEntityContactPayload.status": - if e.complexity.BertyEntityContactPayload.Status == nil { + case "BertyEntityConversation.title": + if e.complexity.BertyEntityConversation.Title == nil { break } - return e.complexity.BertyEntityContactPayload.Status(childComplexity), true + return e.complexity.BertyEntityConversation.Title(childComplexity), true - case "BertyEntityContactPayload.devices": - if e.complexity.BertyEntityContactPayload.Devices == nil { + case "BertyEntityConversation.topic": + if e.complexity.BertyEntityConversation.Topic == nil { break } - return e.complexity.BertyEntityContactPayload.Devices(childComplexity), true + return e.complexity.BertyEntityConversation.Topic(childComplexity), true - case "BertyEntityContactPayload.displayName": - if e.complexity.BertyEntityContactPayload.DisplayName == nil { + case "BertyEntityConversation.members": + if e.complexity.BertyEntityConversation.Members == nil { break } - return e.complexity.BertyEntityContactPayload.DisplayName(childComplexity), true + return e.complexity.BertyEntityConversation.Members(childComplexity), true - case "BertyEntityContactPayload.displayStatus": - if e.complexity.BertyEntityContactPayload.DisplayStatus == nil { + case "BertyEntityConversationMember.id": + if e.complexity.BertyEntityConversationMember.Id == nil { break } - return e.complexity.BertyEntityContactPayload.DisplayStatus(childComplexity), true + return e.complexity.BertyEntityConversationMember.Id(childComplexity), true - case "BertyEntityContactPayload.overrideDisplayName": - if e.complexity.BertyEntityContactPayload.OverrideDisplayName == nil { + case "BertyEntityConversationMember.createdAt": + if e.complexity.BertyEntityConversationMember.CreatedAt == nil { break } - return e.complexity.BertyEntityContactPayload.OverrideDisplayName(childComplexity), true + return e.complexity.BertyEntityConversationMember.CreatedAt(childComplexity), true - case "BertyEntityContactPayload.overrideDisplayStatus": - if e.complexity.BertyEntityContactPayload.OverrideDisplayStatus == nil { + case "BertyEntityConversationMember.updatedAt": + if e.complexity.BertyEntityConversationMember.UpdatedAt == nil { break } - return e.complexity.BertyEntityContactPayload.OverrideDisplayStatus(childComplexity), true + return e.complexity.BertyEntityConversationMember.UpdatedAt(childComplexity), true - case "BertyEntityConversation.id": - if e.complexity.BertyEntityConversation.Id == nil { + case "BertyEntityConversationMember.status": + if e.complexity.BertyEntityConversationMember.Status == nil { break } - return e.complexity.BertyEntityConversation.Id(childComplexity), true - - case "BertyEntityConversation.createdAt": - if e.complexity.BertyEntityConversation.CreatedAt == nil { - break - } - - return e.complexity.BertyEntityConversation.CreatedAt(childComplexity), true - - case "BertyEntityConversation.updatedAt": - if e.complexity.BertyEntityConversation.UpdatedAt == nil { - break - } - - return e.complexity.BertyEntityConversation.UpdatedAt(childComplexity), true - - case "BertyEntityConversation.readAt": - if e.complexity.BertyEntityConversation.ReadAt == nil { - break - } - - return e.complexity.BertyEntityConversation.ReadAt(childComplexity), true - - case "BertyEntityConversation.title": - if e.complexity.BertyEntityConversation.Title == nil { - break - } - - return e.complexity.BertyEntityConversation.Title(childComplexity), true - - case "BertyEntityConversation.topic": - if e.complexity.BertyEntityConversation.Topic == nil { - break - } - - return e.complexity.BertyEntityConversation.Topic(childComplexity), true - - case "BertyEntityConversation.members": - if e.complexity.BertyEntityConversation.Members == nil { - break - } - - return e.complexity.BertyEntityConversation.Members(childComplexity), true - - case "BertyEntityConversationMember.id": - if e.complexity.BertyEntityConversationMember.Id == nil { - break - } - - return e.complexity.BertyEntityConversationMember.Id(childComplexity), true - - case "BertyEntityConversationMember.createdAt": - if e.complexity.BertyEntityConversationMember.CreatedAt == nil { - break - } - - return e.complexity.BertyEntityConversationMember.CreatedAt(childComplexity), true - - case "BertyEntityConversationMember.updatedAt": - if e.complexity.BertyEntityConversationMember.UpdatedAt == nil { - break - } - - return e.complexity.BertyEntityConversationMember.UpdatedAt(childComplexity), true - - case "BertyEntityConversationMember.status": - if e.complexity.BertyEntityConversationMember.Status == nil { - break - } - - return e.complexity.BertyEntityConversationMember.Status(childComplexity), true + return e.complexity.BertyEntityConversationMember.Status(childComplexity), true case "BertyEntityConversationMember.contact": if e.complexity.BertyEntityConversationMember.Contact == nil { @@ -2955,104 +2477,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.BertyEntityConversationMember.ContactId(childComplexity), true - case "BertyEntityConversationMemberPayload.id": - if e.complexity.BertyEntityConversationMemberPayload.Id == nil { - break - } - - return e.complexity.BertyEntityConversationMemberPayload.Id(childComplexity), true - - case "BertyEntityConversationMemberPayload.createdAt": - if e.complexity.BertyEntityConversationMemberPayload.CreatedAt == nil { - break - } - - return e.complexity.BertyEntityConversationMemberPayload.CreatedAt(childComplexity), true - - case "BertyEntityConversationMemberPayload.updatedAt": - if e.complexity.BertyEntityConversationMemberPayload.UpdatedAt == nil { - break - } - - return e.complexity.BertyEntityConversationMemberPayload.UpdatedAt(childComplexity), true - - case "BertyEntityConversationMemberPayload.status": - if e.complexity.BertyEntityConversationMemberPayload.Status == nil { - break - } - - return e.complexity.BertyEntityConversationMemberPayload.Status(childComplexity), true - - case "BertyEntityConversationMemberPayload.contact": - if e.complexity.BertyEntityConversationMemberPayload.Contact == nil { - break - } - - return e.complexity.BertyEntityConversationMemberPayload.Contact(childComplexity), true - - case "BertyEntityConversationMemberPayload.conversationId": - if e.complexity.BertyEntityConversationMemberPayload.ConversationId == nil { - break - } - - return e.complexity.BertyEntityConversationMemberPayload.ConversationId(childComplexity), true - - case "BertyEntityConversationMemberPayload.contactId": - if e.complexity.BertyEntityConversationMemberPayload.ContactId == nil { - break - } - - return e.complexity.BertyEntityConversationMemberPayload.ContactId(childComplexity), true - - case "BertyEntityConversationPayload.id": - if e.complexity.BertyEntityConversationPayload.Id == nil { - break - } - - return e.complexity.BertyEntityConversationPayload.Id(childComplexity), true - - case "BertyEntityConversationPayload.createdAt": - if e.complexity.BertyEntityConversationPayload.CreatedAt == nil { - break - } - - return e.complexity.BertyEntityConversationPayload.CreatedAt(childComplexity), true - - case "BertyEntityConversationPayload.updatedAt": - if e.complexity.BertyEntityConversationPayload.UpdatedAt == nil { - break - } - - return e.complexity.BertyEntityConversationPayload.UpdatedAt(childComplexity), true - - case "BertyEntityConversationPayload.readAt": - if e.complexity.BertyEntityConversationPayload.ReadAt == nil { - break - } - - return e.complexity.BertyEntityConversationPayload.ReadAt(childComplexity), true - - case "BertyEntityConversationPayload.title": - if e.complexity.BertyEntityConversationPayload.Title == nil { - break - } - - return e.complexity.BertyEntityConversationPayload.Title(childComplexity), true - - case "BertyEntityConversationPayload.topic": - if e.complexity.BertyEntityConversationPayload.Topic == nil { - break - } - - return e.complexity.BertyEntityConversationPayload.Topic(childComplexity), true - - case "BertyEntityConversationPayload.members": - if e.complexity.BertyEntityConversationPayload.Members == nil { - break - } - - return e.complexity.BertyEntityConversationPayload.Members(childComplexity), true - case "BertyEntityDevice.id": if e.complexity.BertyEntityDevice.Id == nil { break @@ -3317,7 +2741,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in break } - return e.complexity.BertyNodeAppVersionPayload.Version(childComplexity), true + return e.complexity.BertyNodeAppVersionOutput.Version(childComplexity), true case "BertyNodeBackgroundErrorAttrs.errMsg": if e.complexity.BertyNodeBackgroundErrorAttrs.ErrMsg == nil { @@ -3424,40 +2848,40 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.BertyNodeEventListConnection.PageInfo(childComplexity), true - case "BertyNodeIntegrationTestPayload.name": - if e.complexity.BertyNodeIntegrationTestPayload.Name == nil { + case "BertyNodeIntegrationTestOutput.name": + if e.complexity.BertyNodeIntegrationTestOutput.Name == nil { break } - return e.complexity.BertyNodeIntegrationTestPayload.Name(childComplexity), true + return e.complexity.BertyNodeIntegrationTestOutput.Name(childComplexity), true - case "BertyNodeIntegrationTestPayload.success": - if e.complexity.BertyNodeIntegrationTestPayload.Success == nil { + case "BertyNodeIntegrationTestOutput.success": + if e.complexity.BertyNodeIntegrationTestOutput.Success == nil { break } - return e.complexity.BertyNodeIntegrationTestPayload.Success(childComplexity), true + return e.complexity.BertyNodeIntegrationTestOutput.Success(childComplexity), true - case "BertyNodeIntegrationTestPayload.verbose": - if e.complexity.BertyNodeIntegrationTestPayload.Verbose == nil { + case "BertyNodeIntegrationTestOutput.verbose": + if e.complexity.BertyNodeIntegrationTestOutput.Verbose == nil { break } - return e.complexity.BertyNodeIntegrationTestPayload.Verbose(childComplexity), true + return e.complexity.BertyNodeIntegrationTestOutput.Verbose(childComplexity), true - case "BertyNodeIntegrationTestPayload.startedAt": - if e.complexity.BertyNodeIntegrationTestPayload.StartedAt == nil { + case "BertyNodeIntegrationTestOutput.startedAt": + if e.complexity.BertyNodeIntegrationTestOutput.StartedAt == nil { break } - return e.complexity.BertyNodeIntegrationTestPayload.StartedAt(childComplexity), true + return e.complexity.BertyNodeIntegrationTestOutput.StartedAt(childComplexity), true - case "BertyNodeIntegrationTestPayload.finishedAt": - if e.complexity.BertyNodeIntegrationTestPayload.FinishedAt == nil { + case "BertyNodeIntegrationTestOutput.finishedAt": + if e.complexity.BertyNodeIntegrationTestOutput.FinishedAt == nil { break } - return e.complexity.BertyNodeIntegrationTestPayload.FinishedAt(childComplexity), true + return e.complexity.BertyNodeIntegrationTestOutput.FinishedAt(childComplexity), true case "BertyNodeLogEntry.line": if e.complexity.BertyNodeLogEntry.Line == nil { @@ -3466,13 +2890,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.BertyNodeLogEntry.Line(childComplexity), true - case "BertyNodeLogEntryPayload.line": - if e.complexity.BertyNodeLogEntryPayload.Line == nil { - break - } - - return e.complexity.BertyNodeLogEntryPayload.Line(childComplexity), true - case "BertyNodeLogfileEntry.path": if e.complexity.BertyNodeLogfileEntry.Path == nil { break @@ -3501,34 +2918,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.BertyNodeLogfileEntry.UpdatedAt(childComplexity), true - case "BertyNodeLogfileEntryPayload.path": - if e.complexity.BertyNodeLogfileEntryPayload.Path == nil { - break - } - - return e.complexity.BertyNodeLogfileEntryPayload.Path(childComplexity), true - - case "BertyNodeLogfileEntryPayload.filesize": - if e.complexity.BertyNodeLogfileEntryPayload.Filesize == nil { - break - } - - return e.complexity.BertyNodeLogfileEntryPayload.Filesize(childComplexity), true - - case "BertyNodeLogfileEntryPayload.createdAt": - if e.complexity.BertyNodeLogfileEntryPayload.CreatedAt == nil { - break - } - - return e.complexity.BertyNodeLogfileEntryPayload.CreatedAt(childComplexity), true - - case "BertyNodeLogfileEntryPayload.updatedAt": - if e.complexity.BertyNodeLogfileEntryPayload.UpdatedAt == nil { - break - } - - return e.complexity.BertyNodeLogfileEntryPayload.UpdatedAt(childComplexity), true - case "BertyNodeNodeEvent.kind": if e.complexity.BertyNodeNodeEvent.Kind == nil { break @@ -3648,12 +3037,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.BertyNodePingDestination.Destination(childComplexity), true - case "BertyNodeProtocolsPayload.protocols": - if e.complexity.BertyNodeProtocolsPayload.Protocols == nil { + case "BertyNodeProtocolsOutput.protocols": + if e.complexity.BertyNodeProtocolsOutput.Protocols == nil { break } - return e.complexity.BertyNodeProtocolsPayload.Protocols(childComplexity), true + return e.complexity.BertyNodeProtocolsOutput.Protocols(childComplexity), true case "BertyNodeStatisticsAttrs.errMsg": if e.complexity.BertyNodeStatisticsAttrs.ErrMsg == nil { @@ -3879,118 +3268,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.BertyP2pEvent.Metadata(childComplexity), true - case "BertyP2pEventPayload.id": - if e.complexity.BertyP2pEventPayload.Id == nil { - break - } - - return e.complexity.BertyP2pEventPayload.Id(childComplexity), true - - case "BertyP2pEventPayload.senderId": - if e.complexity.BertyP2pEventPayload.SenderId == nil { - break - } - - return e.complexity.BertyP2pEventPayload.SenderId(childComplexity), true - - case "BertyP2pEventPayload.createdAt": - if e.complexity.BertyP2pEventPayload.CreatedAt == nil { - break - } - - return e.complexity.BertyP2pEventPayload.CreatedAt(childComplexity), true - - case "BertyP2pEventPayload.updatedAt": - if e.complexity.BertyP2pEventPayload.UpdatedAt == nil { - break - } - - return e.complexity.BertyP2pEventPayload.UpdatedAt(childComplexity), true - - case "BertyP2pEventPayload.sentAt": - if e.complexity.BertyP2pEventPayload.SentAt == nil { - break - } - - return e.complexity.BertyP2pEventPayload.SentAt(childComplexity), true - - case "BertyP2pEventPayload.receivedAt": - if e.complexity.BertyP2pEventPayload.ReceivedAt == nil { - break - } - - return e.complexity.BertyP2pEventPayload.ReceivedAt(childComplexity), true - - case "BertyP2pEventPayload.ackedAt": - if e.complexity.BertyP2pEventPayload.AckedAt == nil { - break - } - - return e.complexity.BertyP2pEventPayload.AckedAt(childComplexity), true - - case "BertyP2pEventPayload.direction": - if e.complexity.BertyP2pEventPayload.Direction == nil { - break - } - - return e.complexity.BertyP2pEventPayload.Direction(childComplexity), true - - case "BertyP2pEventPayload.senderApiVersion": - if e.complexity.BertyP2pEventPayload.SenderApiVersion == nil { - break - } - - return e.complexity.BertyP2pEventPayload.SenderApiVersion(childComplexity), true - - case "BertyP2pEventPayload.receiverApiVersion": - if e.complexity.BertyP2pEventPayload.ReceiverApiVersion == nil { - break - } - - return e.complexity.BertyP2pEventPayload.ReceiverApiVersion(childComplexity), true - - case "BertyP2pEventPayload.receiverId": - if e.complexity.BertyP2pEventPayload.ReceiverId == nil { - break - } - - return e.complexity.BertyP2pEventPayload.ReceiverId(childComplexity), true - - case "BertyP2pEventPayload.kind": - if e.complexity.BertyP2pEventPayload.Kind == nil { - break - } - - return e.complexity.BertyP2pEventPayload.Kind(childComplexity), true - - case "BertyP2pEventPayload.attributes": - if e.complexity.BertyP2pEventPayload.Attributes == nil { - break - } - - return e.complexity.BertyP2pEventPayload.Attributes(childComplexity), true - - case "BertyP2pEventPayload.conversationId": - if e.complexity.BertyP2pEventPayload.ConversationId == nil { - break - } - - return e.complexity.BertyP2pEventPayload.ConversationId(childComplexity), true - - case "BertyP2pEventPayload.seenAt": - if e.complexity.BertyP2pEventPayload.SeenAt == nil { - break - } - - return e.complexity.BertyP2pEventPayload.SeenAt(childComplexity), true - - case "BertyP2pEventPayload.metadata": - if e.complexity.BertyP2pEventPayload.Metadata == nil { - break - } - - return e.complexity.BertyP2pEventPayload.Metadata(childComplexity), true - case "BertyP2pMetadataKeyValue.key": if e.complexity.BertyP2pMetadataKeyValue.Key == nil { break @@ -4096,13 +3373,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.BertyPkgDeviceinfoDeviceInfos.Infos(childComplexity), true - case "BertyPkgDeviceinfoDeviceInfosPayload.infos": - if e.complexity.BertyPkgDeviceinfoDeviceInfosPayload.Infos == nil { - break - } - - return e.complexity.BertyPkgDeviceinfoDeviceInfosPayload.Infos(childComplexity), true - case "GoogleProtobufDescriptorProto.name": if e.complexity.GoogleProtobufDescriptorProto.Name == nil { break @@ -5192,7 +4462,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return 0, false } - return e.complexity.Query.GetEvent(childComplexity, args["id"].(string), args["senderId"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["sentAt"].(*time.Time), args["receivedAt"].(*time.Time), args["ackedAt"].(*time.Time), args["direction"].(*int32), args["senderApiVersion"].(uint32), args["receiverApiVersion"].(uint32), args["receiverId"].(string), args["kind"].(*int32), args["attributes"].([]byte), args["conversationId"].(string), args["seenAt"].(*time.Time), args["metadata"].([]*p2p.MetadataKeyValue)), true + return e.complexity.Query.GetEvent(childComplexity, args["id"].(string)), true case "Query.ContactList": if e.complexity.Query.ContactList == nil { @@ -5206,17 +4476,17 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.ContactList(childComplexity, args["filter"].(*entity.Contact), args["orderBy"].(string), args["orderDesc"].(bool), args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true - case "Query.GetContact": - if e.complexity.Query.GetContact == nil { + case "Query.Contact": + if e.complexity.Query.Contact == nil { break } - args, err := field_Query_GetContact_args(rawArgs) + args, err := field_Query_Contact_args(rawArgs) if err != nil { return 0, false } - return e.complexity.Query.GetContact(childComplexity, args["id"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["sigchain"].([]byte), args["status"].(*int32), args["devices"].([]*entity.Device), args["displayName"].(string), args["displayStatus"].(string), args["overrideDisplayName"].(string), args["overrideDisplayStatus"].(string)), true + return e.complexity.Query.Contact(childComplexity, args["filter"].(*entity.Contact)), true case "Query.ConversationList": if e.complexity.Query.ConversationList == nil { @@ -5230,29 +4500,29 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.ConversationList(childComplexity, args["filter"].(*entity.Conversation), args["orderBy"].(string), args["orderDesc"].(bool), args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true - case "Query.GetConversation": - if e.complexity.Query.GetConversation == nil { + case "Query.Conversation": + if e.complexity.Query.Conversation == nil { break } - args, err := field_Query_GetConversation_args(rawArgs) + args, err := field_Query_Conversation_args(rawArgs) if err != nil { return 0, false } - return e.complexity.Query.GetConversation(childComplexity, args["id"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["readAt"].(*time.Time), args["title"].(string), args["topic"].(string), args["members"].([]*entity.ConversationMember)), true + return e.complexity.Query.Conversation(childComplexity, args["id"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["readAt"].(*time.Time), args["title"].(string), args["topic"].(string), args["members"].([]*entity.ConversationMember)), true - case "Query.GetConversationMember": - if e.complexity.Query.GetConversationMember == nil { + case "Query.ConversationMember": + if e.complexity.Query.ConversationMember == nil { break } - args, err := field_Query_GetConversationMember_args(rawArgs) + args, err := field_Query_ConversationMember_args(rawArgs) if err != nil { return 0, false } - return e.complexity.Query.GetConversationMember(childComplexity, args["id"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["status"].(*int32), args["contact"].(*entity.Contact), args["conversationId"].(string), args["contactId"].(string)), true + return e.complexity.Query.ConversationMember(childComplexity, args["id"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["status"].(*int32), args["contact"].(*entity.Contact), args["conversationId"].(string), args["contactId"].(string)), true case "Query.DeviceInfos": if e.complexity.Query.DeviceInfos == nil { @@ -5787,11 +5057,11 @@ func (ec *executionContext) _BertyEntityContact_overrideDisplayStatus(ctx contex return models.MarshalString(res) } -var bertyEntityContactPayloadImplementors = []string{"BertyEntityContactPayload"} +var bertyEntityConversationImplementors = []string{"BertyEntityConversation", "Node"} // nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _BertyEntityContactPayload(ctx context.Context, sel ast.SelectionSet, obj *entity.Contact) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, bertyEntityContactPayloadImplementors) +func (ec *executionContext) _BertyEntityConversation(ctx context.Context, sel ast.SelectionSet, obj *entity.Conversation) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyEntityConversationImplementors) var wg sync.WaitGroup out := graphql.NewOrderedMap(len(fields)) @@ -5801,46 +5071,34 @@ func (ec *executionContext) _BertyEntityContactPayload(ctx context.Context, sel switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("BertyEntityContactPayload") + out.Values[i] = graphql.MarshalString("BertyEntityConversation") case "id": wg.Add(1) go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._BertyEntityContactPayload_id(ctx, field, obj) + out.Values[i] = ec._BertyEntityConversation_id(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } wg.Done() }(i, field) case "createdAt": - out.Values[i] = ec._BertyEntityContactPayload_createdAt(ctx, field, obj) + out.Values[i] = ec._BertyEntityConversation_createdAt(ctx, field, obj) case "updatedAt": - out.Values[i] = ec._BertyEntityContactPayload_updatedAt(ctx, field, obj) - case "sigchain": - out.Values[i] = ec._BertyEntityContactPayload_sigchain(ctx, field, obj) - case "status": - out.Values[i] = ec._BertyEntityContactPayload_status(ctx, field, obj) - case "devices": - out.Values[i] = ec._BertyEntityContactPayload_devices(ctx, field, obj) - case "displayName": - out.Values[i] = ec._BertyEntityContactPayload_displayName(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "displayStatus": - out.Values[i] = ec._BertyEntityContactPayload_displayStatus(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "overrideDisplayName": - out.Values[i] = ec._BertyEntityContactPayload_overrideDisplayName(ctx, field, obj) + out.Values[i] = ec._BertyEntityConversation_updatedAt(ctx, field, obj) + case "readAt": + out.Values[i] = ec._BertyEntityConversation_readAt(ctx, field, obj) + case "title": + out.Values[i] = ec._BertyEntityConversation_title(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "overrideDisplayStatus": - out.Values[i] = ec._BertyEntityContactPayload_overrideDisplayStatus(ctx, field, obj) + case "topic": + out.Values[i] = ec._BertyEntityConversation_topic(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } + case "members": + out.Values[i] = ec._BertyEntityConversation_members(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -5853,16 +5111,16 @@ func (ec *executionContext) _BertyEntityContactPayload(ctx context.Context, sel } // nolint: vetshadow -func (ec *executionContext) _BertyEntityContactPayload_id(ctx context.Context, field graphql.CollectedField, obj *entity.Contact) graphql.Marshaler { +func (ec *executionContext) _BertyEntityConversation_id(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityContactPayload", + Object: "BertyEntityConversation", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.BertyEntityContactPayload().ID(rctx, obj) + return ec.resolvers.BertyEntityConversation().ID(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5876,9 +5134,9 @@ func (ec *executionContext) _BertyEntityContactPayload_id(ctx context.Context, f } // nolint: vetshadow -func (ec *executionContext) _BertyEntityContactPayload_createdAt(ctx context.Context, field graphql.CollectedField, obj *entity.Contact) graphql.Marshaler { +func (ec *executionContext) _BertyEntityConversation_createdAt(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityContactPayload", + Object: "BertyEntityConversation", Args: nil, Field: field, } @@ -5896,9 +5154,9 @@ func (ec *executionContext) _BertyEntityContactPayload_createdAt(ctx context.Con } // nolint: vetshadow -func (ec *executionContext) _BertyEntityContactPayload_updatedAt(ctx context.Context, field graphql.CollectedField, obj *entity.Contact) graphql.Marshaler { +func (ec *executionContext) _BertyEntityConversation_updatedAt(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityContactPayload", + Object: "BertyEntityConversation", Args: nil, Field: field, } @@ -5916,70 +5174,87 @@ func (ec *executionContext) _BertyEntityContactPayload_updatedAt(ctx context.Con } // nolint: vetshadow -func (ec *executionContext) _BertyEntityContactPayload_sigchain(ctx context.Context, field graphql.CollectedField, obj *entity.Contact) graphql.Marshaler { +func (ec *executionContext) _BertyEntityConversation_readAt(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityContactPayload", + Object: "BertyEntityConversation", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Sigchain, nil + return obj.ReadAt, nil }) if resTmp == nil { return graphql.Null } - res := resTmp.([]byte) + res := resTmp.(time.Time) rctx.Result = res + return models.MarshalTime(res) +} - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return models.MarshalByte(res[idx1]) - }() +// nolint: vetshadow +func (ec *executionContext) _BertyEntityConversation_title(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { + rctx := &graphql.ResolverContext{ + Object: "BertyEntityConversation", + Args: nil, + Field: field, } - - return arr1 + ctx = graphql.WithResolverContext(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Title, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + rctx.Result = res + return models.MarshalString(res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityContactPayload_status(ctx context.Context, field graphql.CollectedField, obj *entity.Contact) graphql.Marshaler { +func (ec *executionContext) _BertyEntityConversation_topic(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityContactPayload", + Object: "BertyEntityConversation", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.Topic, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(entity.Contact_Status) + res := resTmp.(string) rctx.Result = res - return models.MarshalEnum(int32(res)) + return models.MarshalString(res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityContactPayload_devices(ctx context.Context, field graphql.CollectedField, obj *entity.Contact) graphql.Marshaler { +func (ec *executionContext) _BertyEntityConversation_members(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityContactPayload", + Object: "BertyEntityConversation", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Devices, nil + return obj.Members, nil }) if resTmp == nil { return graphql.Null } - res := resTmp.([]*entity.Device) + res := resTmp.([]*entity.ConversationMember) rctx.Result = res arr1 := make(graphql.Array, len(res)) @@ -6007,7 +5282,7 @@ func (ec *executionContext) _BertyEntityContactPayload_devices(ctx context.Conte return graphql.Null } - return ec._BertyEntityDevice(ctx, field.Selections, res[idx1]) + return ec._BertyEntityConversationMember(ctx, field.Selections, res[idx1]) }() } if isLen1 { @@ -6021,17 +5296,70 @@ func (ec *executionContext) _BertyEntityContactPayload_devices(ctx context.Conte return arr1 } +var bertyEntityConversationMemberImplementors = []string{"BertyEntityConversationMember", "Node"} + +// nolint: gocyclo, errcheck, gas, goconst +func (ec *executionContext) _BertyEntityConversationMember(ctx context.Context, sel ast.SelectionSet, obj *entity.ConversationMember) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyEntityConversationMemberImplementors) + + var wg sync.WaitGroup + out := graphql.NewOrderedMap(len(fields)) + invalid := false + for i, field := range fields { + out.Keys[i] = field.Alias + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BertyEntityConversationMember") + case "id": + wg.Add(1) + go func(i int, field graphql.CollectedField) { + out.Values[i] = ec._BertyEntityConversationMember_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + wg.Done() + }(i, field) + case "createdAt": + out.Values[i] = ec._BertyEntityConversationMember_createdAt(ctx, field, obj) + case "updatedAt": + out.Values[i] = ec._BertyEntityConversationMember_updatedAt(ctx, field, obj) + case "status": + out.Values[i] = ec._BertyEntityConversationMember_status(ctx, field, obj) + case "contact": + out.Values[i] = ec._BertyEntityConversationMember_contact(ctx, field, obj) + case "conversationId": + out.Values[i] = ec._BertyEntityConversationMember_conversationId(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "contactId": + out.Values[i] = ec._BertyEntityConversationMember_contactId(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + wg.Wait() + if invalid { + return graphql.Null + } + return out +} + // nolint: vetshadow -func (ec *executionContext) _BertyEntityContactPayload_displayName(ctx context.Context, field graphql.CollectedField, obj *entity.Contact) graphql.Marshaler { +func (ec *executionContext) _BertyEntityConversationMember_id(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityContactPayload", + Object: "BertyEntityConversationMember", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DisplayName, nil + return ec.resolvers.BertyEntityConversationMember().ID(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6041,43 +5369,105 @@ func (ec *executionContext) _BertyEntityContactPayload_displayName(ctx context.C } res := resTmp.(string) rctx.Result = res - return models.MarshalString(res) + return models.MarshalID(res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityContactPayload_displayStatus(ctx context.Context, field graphql.CollectedField, obj *entity.Contact) graphql.Marshaler { +func (ec *executionContext) _BertyEntityConversationMember_createdAt(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityContactPayload", + Object: "BertyEntityConversationMember", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DisplayStatus, nil + return obj.CreatedAt, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(time.Time) rctx.Result = res - return models.MarshalString(res) + return models.MarshalTime(res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityContactPayload_overrideDisplayName(ctx context.Context, field graphql.CollectedField, obj *entity.Contact) graphql.Marshaler { +func (ec *executionContext) _BertyEntityConversationMember_updatedAt(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityContactPayload", + Object: "BertyEntityConversationMember", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OverrideDisplayName, nil + return obj.UpdatedAt, nil + }) + if resTmp == nil { + return graphql.Null + } + res := resTmp.(time.Time) + rctx.Result = res + return models.MarshalTime(res) +} + +// nolint: vetshadow +func (ec *executionContext) _BertyEntityConversationMember_status(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { + rctx := &graphql.ResolverContext{ + Object: "BertyEntityConversationMember", + Args: nil, + Field: field, + } + ctx = graphql.WithResolverContext(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Status, nil + }) + if resTmp == nil { + return graphql.Null + } + res := resTmp.(entity.ConversationMember_Status) + rctx.Result = res + return models.MarshalEnum(int32(res)) +} + +// nolint: vetshadow +func (ec *executionContext) _BertyEntityConversationMember_contact(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { + rctx := &graphql.ResolverContext{ + Object: "BertyEntityConversationMember", + Args: nil, + Field: field, + } + ctx = graphql.WithResolverContext(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Contact, nil + }) + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entity.Contact) + rctx.Result = res + + if res == nil { + return graphql.Null + } + + return ec._BertyEntityContact(ctx, field.Selections, res) +} + +// nolint: vetshadow +func (ec *executionContext) _BertyEntityConversationMember_conversationId(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { + rctx := &graphql.ResolverContext{ + Object: "BertyEntityConversationMember", + Args: nil, + Field: field, + } + ctx = graphql.WithResolverContext(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ConversationID, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6091,16 +5481,16 @@ func (ec *executionContext) _BertyEntityContactPayload_overrideDisplayName(ctx c } // nolint: vetshadow -func (ec *executionContext) _BertyEntityContactPayload_overrideDisplayStatus(ctx context.Context, field graphql.CollectedField, obj *entity.Contact) graphql.Marshaler { +func (ec *executionContext) _BertyEntityConversationMember_contactId(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityContactPayload", + Object: "BertyEntityConversationMember", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OverrideDisplayStatus, nil + return obj.ContactID, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6113,11 +5503,11 @@ func (ec *executionContext) _BertyEntityContactPayload_overrideDisplayStatus(ctx return models.MarshalString(res) } -var bertyEntityConversationImplementors = []string{"BertyEntityConversation", "Node"} +var bertyEntityDeviceImplementors = []string{"BertyEntityDevice", "Node"} // nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _BertyEntityConversation(ctx context.Context, sel ast.SelectionSet, obj *entity.Conversation) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, bertyEntityConversationImplementors) +func (ec *executionContext) _BertyEntityDevice(ctx context.Context, sel ast.SelectionSet, obj *entity.Device) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyEntityDeviceImplementors) var wg sync.WaitGroup out := graphql.NewOrderedMap(len(fields)) @@ -6127,34 +5517,37 @@ func (ec *executionContext) _BertyEntityConversation(ctx context.Context, sel as switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("BertyEntityConversation") + out.Values[i] = graphql.MarshalString("BertyEntityDevice") case "id": wg.Add(1) go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._BertyEntityConversation_id(ctx, field, obj) + out.Values[i] = ec._BertyEntityDevice_id(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } wg.Done() }(i, field) case "createdAt": - out.Values[i] = ec._BertyEntityConversation_createdAt(ctx, field, obj) + out.Values[i] = ec._BertyEntityDevice_createdAt(ctx, field, obj) case "updatedAt": - out.Values[i] = ec._BertyEntityConversation_updatedAt(ctx, field, obj) - case "readAt": - out.Values[i] = ec._BertyEntityConversation_readAt(ctx, field, obj) - case "title": - out.Values[i] = ec._BertyEntityConversation_title(ctx, field, obj) + out.Values[i] = ec._BertyEntityDevice_updatedAt(ctx, field, obj) + case "name": + out.Values[i] = ec._BertyEntityDevice_name(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "topic": - out.Values[i] = ec._BertyEntityConversation_topic(ctx, field, obj) + case "status": + out.Values[i] = ec._BertyEntityDevice_status(ctx, field, obj) + case "apiVersion": + out.Values[i] = ec._BertyEntityDevice_apiVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "contactId": + out.Values[i] = ec._BertyEntityDevice_contactId(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "members": - out.Values[i] = ec._BertyEntityConversation_members(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -6167,16 +5560,16 @@ func (ec *executionContext) _BertyEntityConversation(ctx context.Context, sel as } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversation_id(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { +func (ec *executionContext) _BertyEntityDevice_id(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversation", + Object: "BertyEntityDevice", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.BertyEntityConversation().ID(rctx, obj) + return ec.resolvers.BertyEntityDevice().ID(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6190,9 +5583,9 @@ func (ec *executionContext) _BertyEntityConversation_id(ctx context.Context, fie } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversation_createdAt(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { +func (ec *executionContext) _BertyEntityDevice_createdAt(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversation", + Object: "BertyEntityDevice", Args: nil, Field: field, } @@ -6210,9 +5603,9 @@ func (ec *executionContext) _BertyEntityConversation_createdAt(ctx context.Conte } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversation_updatedAt(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { +func (ec *executionContext) _BertyEntityDevice_updatedAt(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversation", + Object: "BertyEntityDevice", Args: nil, Field: field, } @@ -6230,59 +5623,59 @@ func (ec *executionContext) _BertyEntityConversation_updatedAt(ctx context.Conte } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversation_readAt(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { +func (ec *executionContext) _BertyEntityDevice_name(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversation", + Object: "BertyEntityDevice", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReadAt, nil + return obj.Name, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(string) rctx.Result = res - return models.MarshalTime(res) + return models.MarshalString(res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversation_title(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { +func (ec *executionContext) _BertyEntityDevice_status(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversation", + Object: "BertyEntityDevice", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Title, nil + return obj.Status, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(entity.Device_Status) rctx.Result = res - return models.MarshalString(res) + return models.MarshalEnum(int32(res)) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversation_topic(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { +func (ec *executionContext) _BertyEntityDevice_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversation", + Object: "BertyEntityDevice", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Topic, nil + return obj.ApiVersion, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6290,75 +5683,93 @@ func (ec *executionContext) _BertyEntityConversation_topic(ctx context.Context, } return graphql.Null } - res := resTmp.(string) + res := resTmp.(uint32) rctx.Result = res - return models.MarshalString(res) + return models.MarshalUint32(res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversation_members(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { +func (ec *executionContext) _BertyEntityDevice_contactId(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversation", + Object: "BertyEntityDevice", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Members, nil + return obj.ContactID, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*entity.ConversationMember) + res := resTmp.(string) rctx.Result = res + return models.MarshalString(res) +} - arr1 := make(graphql.Array, len(res)) - var wg sync.WaitGroup +var bertyEntityMessageImplementors = []string{"BertyEntityMessage"} - isLen1 := len(res) == 1 - if !isLen1 { - wg.Add(len(res)) - } +// nolint: gocyclo, errcheck, gas, goconst +func (ec *executionContext) _BertyEntityMessage(ctx context.Context, sel ast.SelectionSet, obj *entity.Message) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyEntityMessageImplementors) - for idx1 := range res { - idx1 := idx1 - rctx := &graphql.ResolverContext{ - Index: &idx1, - Result: res[idx1], - } - ctx := graphql.WithResolverContext(ctx, rctx) - f := func(idx1 int) { - if !isLen1 { - defer wg.Done() + out := graphql.NewOrderedMap(len(fields)) + invalid := false + for i, field := range fields { + out.Keys[i] = field.Alias + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BertyEntityMessage") + case "text": + out.Values[i] = ec._BertyEntityMessage_text(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true } - arr1[idx1] = func() graphql.Marshaler { + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } - if res[idx1] == nil { - return graphql.Null - } + if invalid { + return graphql.Null + } + return out +} - return ec._BertyEntityConversationMember(ctx, field.Selections, res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) +// nolint: vetshadow +func (ec *executionContext) _BertyEntityMessage_text(ctx context.Context, field graphql.CollectedField, obj *entity.Message) graphql.Marshaler { + rctx := &graphql.ResolverContext{ + Object: "BertyEntityMessage", + Args: nil, + Field: field, + } + ctx = graphql.WithResolverContext(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Text, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") } - + return graphql.Null } - wg.Wait() - return arr1 + res := resTmp.(string) + rctx.Result = res + return models.MarshalString(res) } -var bertyEntityConversationMemberImplementors = []string{"BertyEntityConversationMember", "Node"} +var bertyEntitySenderAliasImplementors = []string{"BertyEntitySenderAlias"} // nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _BertyEntityConversationMember(ctx context.Context, sel ast.SelectionSet, obj *entity.ConversationMember) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, bertyEntityConversationMemberImplementors) +func (ec *executionContext) _BertyEntitySenderAlias(ctx context.Context, sel ast.SelectionSet, obj *entity.SenderAlias) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyEntitySenderAliasImplementors) - var wg sync.WaitGroup out := graphql.NewOrderedMap(len(fields)) invalid := false for i, field := range fields { @@ -6366,31 +5777,40 @@ func (ec *executionContext) _BertyEntityConversationMember(ctx context.Context, switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("BertyEntityConversationMember") + out.Values[i] = graphql.MarshalString("BertyEntitySenderAlias") case "id": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._BertyEntityConversationMember_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) + out.Values[i] = ec._BertyEntitySenderAlias_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } case "createdAt": - out.Values[i] = ec._BertyEntityConversationMember_createdAt(ctx, field, obj) + out.Values[i] = ec._BertyEntitySenderAlias_createdAt(ctx, field, obj) case "updatedAt": - out.Values[i] = ec._BertyEntityConversationMember_updatedAt(ctx, field, obj) + out.Values[i] = ec._BertyEntitySenderAlias_updatedAt(ctx, field, obj) case "status": - out.Values[i] = ec._BertyEntityConversationMember_status(ctx, field, obj) - case "contact": - out.Values[i] = ec._BertyEntityConversationMember_contact(ctx, field, obj) - case "conversationId": - out.Values[i] = ec._BertyEntityConversationMember_conversationId(ctx, field, obj) + out.Values[i] = ec._BertyEntitySenderAlias_status(ctx, field, obj) + case "originDeviceId": + out.Values[i] = ec._BertyEntitySenderAlias_originDeviceId(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } case "contactId": - out.Values[i] = ec._BertyEntityConversationMember_contactId(ctx, field, obj) + out.Values[i] = ec._BertyEntitySenderAlias_contactId(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "conversationId": + out.Values[i] = ec._BertyEntitySenderAlias_conversationId(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "aliasIdentifier": + out.Values[i] = ec._BertyEntitySenderAlias_aliasIdentifier(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "used": + out.Values[i] = ec._BertyEntitySenderAlias_used(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } @@ -6398,7 +5818,7 @@ func (ec *executionContext) _BertyEntityConversationMember(ctx context.Context, panic("unknown field " + strconv.Quote(field.Name)) } } - wg.Wait() + if invalid { return graphql.Null } @@ -6406,16 +5826,16 @@ func (ec *executionContext) _BertyEntityConversationMember(ctx context.Context, } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMember_id(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { +func (ec *executionContext) _BertyEntitySenderAlias_id(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMember", + Object: "BertyEntitySenderAlias", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.BertyEntityConversationMember().ID(rctx, obj) + return obj.ID, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6425,13 +5845,13 @@ func (ec *executionContext) _BertyEntityConversationMember_id(ctx context.Contex } res := resTmp.(string) rctx.Result = res - return models.MarshalID(res) + return models.MarshalString(res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMember_createdAt(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { +func (ec *executionContext) _BertyEntitySenderAlias_createdAt(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMember", + Object: "BertyEntitySenderAlias", Args: nil, Field: field, } @@ -6449,9 +5869,9 @@ func (ec *executionContext) _BertyEntityConversationMember_createdAt(ctx context } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMember_updatedAt(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { +func (ec *executionContext) _BertyEntitySenderAlias_updatedAt(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMember", + Object: "BertyEntitySenderAlias", Args: nil, Field: field, } @@ -6469,9 +5889,9 @@ func (ec *executionContext) _BertyEntityConversationMember_updatedAt(ctx context } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMember_status(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { +func (ec *executionContext) _BertyEntitySenderAlias_status(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMember", + Object: "BertyEntitySenderAlias", Args: nil, Field: field, } @@ -6483,47 +5903,45 @@ func (ec *executionContext) _BertyEntityConversationMember_status(ctx context.Co if resTmp == nil { return graphql.Null } - res := resTmp.(entity.ConversationMember_Status) + res := resTmp.(entity.SenderAlias_Status) rctx.Result = res return models.MarshalEnum(int32(res)) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMember_contact(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { +func (ec *executionContext) _BertyEntitySenderAlias_originDeviceId(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMember", + Object: "BertyEntitySenderAlias", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Contact, nil + return obj.OriginDeviceID, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*entity.Contact) + res := resTmp.(string) rctx.Result = res - - if res == nil { - return graphql.Null - } - - return ec._BertyEntityContact(ctx, field.Selections, res) + return models.MarshalString(res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMember_conversationId(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { +func (ec *executionContext) _BertyEntitySenderAlias_contactId(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMember", + Object: "BertyEntitySenderAlias", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ConversationID, nil + return obj.ContactID, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6537,16 +5955,16 @@ func (ec *executionContext) _BertyEntityConversationMember_conversationId(ctx co } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMember_contactId(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { +func (ec *executionContext) _BertyEntitySenderAlias_conversationId(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMember", + Object: "BertyEntitySenderAlias", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ContactID, nil + return obj.ConversationID, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6559,70 +5977,17 @@ func (ec *executionContext) _BertyEntityConversationMember_contactId(ctx context return models.MarshalString(res) } -var bertyEntityConversationMemberPayloadImplementors = []string{"BertyEntityConversationMemberPayload"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _BertyEntityConversationMemberPayload(ctx context.Context, sel ast.SelectionSet, obj *entity.ConversationMember) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, bertyEntityConversationMemberPayloadImplementors) - - var wg sync.WaitGroup - out := graphql.NewOrderedMap(len(fields)) - invalid := false - for i, field := range fields { - out.Keys[i] = field.Alias - - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("BertyEntityConversationMemberPayload") - case "id": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._BertyEntityConversationMemberPayload_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "createdAt": - out.Values[i] = ec._BertyEntityConversationMemberPayload_createdAt(ctx, field, obj) - case "updatedAt": - out.Values[i] = ec._BertyEntityConversationMemberPayload_updatedAt(ctx, field, obj) - case "status": - out.Values[i] = ec._BertyEntityConversationMemberPayload_status(ctx, field, obj) - case "contact": - out.Values[i] = ec._BertyEntityConversationMemberPayload_contact(ctx, field, obj) - case "conversationId": - out.Values[i] = ec._BertyEntityConversationMemberPayload_conversationId(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "contactId": - out.Values[i] = ec._BertyEntityConversationMemberPayload_contactId(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - wg.Wait() - if invalid { - return graphql.Null - } - return out -} - // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMemberPayload_id(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { +func (ec *executionContext) _BertyEntitySenderAlias_aliasIdentifier(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMemberPayload", + Object: "BertyEntitySenderAlias", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.BertyEntityConversationMemberPayload().ID(rctx, obj) + return obj.AliasIdentifier, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6632,105 +5997,73 @@ func (ec *executionContext) _BertyEntityConversationMemberPayload_id(ctx context } res := resTmp.(string) rctx.Result = res - return models.MarshalID(res) + return models.MarshalString(res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMemberPayload_createdAt(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { +func (ec *executionContext) _BertyEntitySenderAlias_used(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMemberPayload", + Object: "BertyEntitySenderAlias", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil + return obj.Used, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(bool) rctx.Result = res - return models.MarshalTime(res) + return models.MarshalBool(res) } -// nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMemberPayload_updatedAt(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { - rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMemberPayload", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(time.Time) - rctx.Result = res - return models.MarshalTime(res) -} +var bertyNodeAppVersionOutputImplementors = []string{"BertyNodeAppVersionOutput"} -// nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMemberPayload_status(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { - rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMemberPayload", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Status, nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(entity.ConversationMember_Status) - rctx.Result = res - return models.MarshalEnum(int32(res)) -} +// nolint: gocyclo, errcheck, gas, goconst +func (ec *executionContext) _BertyNodeAppVersionOutput(ctx context.Context, sel ast.SelectionSet, obj *node.AppVersionOutput) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyNodeAppVersionOutputImplementors) -// nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMemberPayload_contact(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { - rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMemberPayload", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Contact, nil - }) - if resTmp == nil { - return graphql.Null + out := graphql.NewOrderedMap(len(fields)) + invalid := false + for i, field := range fields { + out.Keys[i] = field.Alias + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BertyNodeAppVersionOutput") + case "version": + out.Values[i] = ec._BertyNodeAppVersionOutput_version(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } } - res := resTmp.(*entity.Contact) - rctx.Result = res - if res == nil { + if invalid { return graphql.Null } - - return ec._BertyEntityContact(ctx, field.Selections, res) + return out } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMemberPayload_conversationId(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { +func (ec *executionContext) _BertyNodeAppVersionOutput_version(ctx context.Context, field graphql.CollectedField, obj *node.AppVersionOutput) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMemberPayload", + Object: "BertyNodeAppVersionOutput", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ConversationID, nil + return obj.Version, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6743,17 +6076,47 @@ func (ec *executionContext) _BertyEntityConversationMemberPayload_conversationId return models.MarshalString(res) } +var bertyNodeBackgroundErrorAttrsImplementors = []string{"BertyNodeBackgroundErrorAttrs"} + +// nolint: gocyclo, errcheck, gas, goconst +func (ec *executionContext) _BertyNodeBackgroundErrorAttrs(ctx context.Context, sel ast.SelectionSet, obj *node.BackgroundErrorAttrs) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyNodeBackgroundErrorAttrsImplementors) + + out := graphql.NewOrderedMap(len(fields)) + invalid := false + for i, field := range fields { + out.Keys[i] = field.Alias + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BertyNodeBackgroundErrorAttrs") + case "errMsg": + out.Values[i] = ec._BertyNodeBackgroundErrorAttrs_errMsg(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + + if invalid { + return graphql.Null + } + return out +} + // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationMemberPayload_contactId(ctx context.Context, field graphql.CollectedField, obj *entity.ConversationMember) graphql.Marshaler { +func (ec *executionContext) _BertyNodeBackgroundErrorAttrs_errMsg(ctx context.Context, field graphql.CollectedField, obj *node.BackgroundErrorAttrs) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationMemberPayload", + Object: "BertyNodeBackgroundErrorAttrs", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ContactID, nil + return obj.ErrMsg, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6766,13 +6129,12 @@ func (ec *executionContext) _BertyEntityConversationMemberPayload_contactId(ctx return models.MarshalString(res) } -var bertyEntityConversationPayloadImplementors = []string{"BertyEntityConversationPayload"} +var bertyNodeBackgroundWarnAttrsImplementors = []string{"BertyNodeBackgroundWarnAttrs"} // nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _BertyEntityConversationPayload(ctx context.Context, sel ast.SelectionSet, obj *entity.Conversation) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, bertyEntityConversationPayloadImplementors) +func (ec *executionContext) _BertyNodeBackgroundWarnAttrs(ctx context.Context, sel ast.SelectionSet, obj *node.BackgroundWarnAttrs) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyNodeBackgroundWarnAttrsImplementors) - var wg sync.WaitGroup out := graphql.NewOrderedMap(len(fields)) invalid := false for i, field := range fields { @@ -6780,39 +6142,17 @@ func (ec *executionContext) _BertyEntityConversationPayload(ctx context.Context, switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("BertyEntityConversationPayload") - case "id": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._BertyEntityConversationPayload_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "createdAt": - out.Values[i] = ec._BertyEntityConversationPayload_createdAt(ctx, field, obj) - case "updatedAt": - out.Values[i] = ec._BertyEntityConversationPayload_updatedAt(ctx, field, obj) - case "readAt": - out.Values[i] = ec._BertyEntityConversationPayload_readAt(ctx, field, obj) - case "title": - out.Values[i] = ec._BertyEntityConversationPayload_title(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "topic": - out.Values[i] = ec._BertyEntityConversationPayload_topic(ctx, field, obj) + out.Values[i] = graphql.MarshalString("BertyNodeBackgroundWarnAttrs") + case "errMsg": + out.Values[i] = ec._BertyNodeBackgroundWarnAttrs_errMsg(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "members": - out.Values[i] = ec._BertyEntityConversationPayload_members(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } } - wg.Wait() + if invalid { return graphql.Null } @@ -6820,16 +6160,16 @@ func (ec *executionContext) _BertyEntityConversationPayload(ctx context.Context, } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationPayload_id(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { +func (ec *executionContext) _BertyNodeBackgroundWarnAttrs_errMsg(ctx context.Context, field graphql.CollectedField, obj *node.BackgroundWarnAttrs) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationPayload", + Object: "BertyNodeBackgroundWarnAttrs", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.BertyEntityConversationPayload().ID(rctx, obj) + return obj.ErrMsg, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6839,80 +6179,77 @@ func (ec *executionContext) _BertyEntityConversationPayload_id(ctx context.Conte } res := resTmp.(string) rctx.Result = res - return models.MarshalID(res) + return models.MarshalString(res) } -// nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationPayload_createdAt(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { - rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationPayload", - Args: nil, - Field: field, +var bertyNodeContactEdgeImplementors = []string{"BertyNodeContactEdge"} + +// nolint: gocyclo, errcheck, gas, goconst +func (ec *executionContext) _BertyNodeContactEdge(ctx context.Context, sel ast.SelectionSet, obj *node.ContactEdge) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyNodeContactEdgeImplementors) + + out := graphql.NewOrderedMap(len(fields)) + invalid := false + for i, field := range fields { + out.Keys[i] = field.Alias + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BertyNodeContactEdge") + case "node": + out.Values[i] = ec._BertyNodeContactEdge_node(ctx, field, obj) + case "cursor": + out.Values[i] = ec._BertyNodeContactEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } } - ctx = graphql.WithResolverContext(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil - }) - if resTmp == nil { + + if invalid { return graphql.Null } - res := resTmp.(time.Time) - rctx.Result = res - return models.MarshalTime(res) + return out } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationPayload_updatedAt(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { +func (ec *executionContext) _BertyNodeContactEdge_node(ctx context.Context, field graphql.CollectedField, obj *node.ContactEdge) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationPayload", + Object: "BertyNodeContactEdge", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil + return obj.Node, nil }) if resTmp == nil { return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*entity.Contact) rctx.Result = res - return models.MarshalTime(res) -} -// nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationPayload_readAt(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { - rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationPayload", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.ReadAt, nil - }) - if resTmp == nil { + if res == nil { return graphql.Null } - res := resTmp.(time.Time) - rctx.Result = res - return models.MarshalTime(res) + + return ec._BertyEntityContact(ctx, field.Selections, res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationPayload_title(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { +func (ec *executionContext) _BertyNodeContactEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *node.ContactEdge) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationPayload", + Object: "BertyNodeContactEdge", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Title, nil + return obj.Cursor, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6925,45 +6262,54 @@ func (ec *executionContext) _BertyEntityConversationPayload_title(ctx context.Co return models.MarshalString(res) } +var bertyNodeContactListConnectionImplementors = []string{"BertyNodeContactListConnection"} + +// nolint: gocyclo, errcheck, gas, goconst +func (ec *executionContext) _BertyNodeContactListConnection(ctx context.Context, sel ast.SelectionSet, obj *node.ContactListConnection) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyNodeContactListConnectionImplementors) + + out := graphql.NewOrderedMap(len(fields)) + invalid := false + for i, field := range fields { + out.Keys[i] = field.Alias + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BertyNodeContactListConnection") + case "edges": + out.Values[i] = ec._BertyNodeContactListConnection_edges(ctx, field, obj) + case "pageInfo": + out.Values[i] = ec._BertyNodeContactListConnection_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + + if invalid { + return graphql.Null + } + return out +} + // nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationPayload_topic(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { +func (ec *executionContext) _BertyNodeContactListConnection_edges(ctx context.Context, field graphql.CollectedField, obj *node.ContactListConnection) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationPayload", + Object: "BertyNodeContactListConnection", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Topic, nil + return obj.Edges, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) - rctx.Result = res - return models.MarshalString(res) -} - -// nolint: vetshadow -func (ec *executionContext) _BertyEntityConversationPayload_members(ctx context.Context, field graphql.CollectedField, obj *entity.Conversation) graphql.Marshaler { - rctx := &graphql.ResolverContext{ - Object: "BertyEntityConversationPayload", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Members, nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]*entity.ConversationMember) + res := resTmp.([]*node.ContactEdge) rctx.Result = res arr1 := make(graphql.Array, len(res)) @@ -6991,7 +6337,7 @@ func (ec *executionContext) _BertyEntityConversationPayload_members(ctx context. return graphql.Null } - return ec._BertyEntityConversationMember(ctx, field.Selections, res[idx1]) + return ec._BertyNodeContactEdge(ctx, field.Selections, res[idx1]) }() } if isLen1 { @@ -7005,13 +6351,43 @@ func (ec *executionContext) _BertyEntityConversationPayload_members(ctx context. return arr1 } -var bertyEntityDeviceImplementors = []string{"BertyEntityDevice", "Node"} +// nolint: vetshadow +func (ec *executionContext) _BertyNodeContactListConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *node.ContactListConnection) graphql.Marshaler { + rctx := &graphql.ResolverContext{ + Object: "BertyNodeContactListConnection", + Args: nil, + Field: field, + } + ctx = graphql.WithResolverContext(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*node.PageInfo) + rctx.Result = res + + if res == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + + return ec._BertyNodePageInfo(ctx, field.Selections, res) +} + +var bertyNodeConversationEdgeImplementors = []string{"BertyNodeConversationEdge"} // nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _BertyEntityDevice(ctx context.Context, sel ast.SelectionSet, obj *entity.Device) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, bertyEntityDeviceImplementors) +func (ec *executionContext) _BertyNodeConversationEdge(ctx context.Context, sel ast.SelectionSet, obj *node.ConversationEdge) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyNodeConversationEdgeImplementors) - var wg sync.WaitGroup out := graphql.NewOrderedMap(len(fields)) invalid := false for i, field := range fields { @@ -7019,34 +6395,11 @@ func (ec *executionContext) _BertyEntityDevice(ctx context.Context, sel ast.Sele switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("BertyEntityDevice") - case "id": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._BertyEntityDevice_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "createdAt": - out.Values[i] = ec._BertyEntityDevice_createdAt(ctx, field, obj) - case "updatedAt": - out.Values[i] = ec._BertyEntityDevice_updatedAt(ctx, field, obj) - case "name": - out.Values[i] = ec._BertyEntityDevice_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "status": - out.Values[i] = ec._BertyEntityDevice_status(ctx, field, obj) - case "apiVersion": - out.Values[i] = ec._BertyEntityDevice_apiVersion(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "contactId": - out.Values[i] = ec._BertyEntityDevice_contactId(ctx, field, obj) + out.Values[i] = graphql.MarshalString("BertyNodeConversationEdge") + case "node": + out.Values[i] = ec._BertyNodeConversationEdge_node(ctx, field, obj) + case "cursor": + out.Values[i] = ec._BertyNodeConversationEdge_cursor(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } @@ -7054,7 +6407,7 @@ func (ec *executionContext) _BertyEntityDevice(ctx context.Context, sel ast.Sele panic("unknown field " + strconv.Quote(field.Name)) } } - wg.Wait() + if invalid { return graphql.Null } @@ -7062,79 +6415,41 @@ func (ec *executionContext) _BertyEntityDevice(ctx context.Context, sel ast.Sele } // nolint: vetshadow -func (ec *executionContext) _BertyEntityDevice_id(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { +func (ec *executionContext) _BertyNodeConversationEdge_node(ctx context.Context, field graphql.CollectedField, obj *node.ConversationEdge) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityDevice", + Object: "BertyNodeConversationEdge", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.BertyEntityDevice().ID(rctx, obj) + return obj.Node, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*entity.Conversation) rctx.Result = res - return models.MarshalID(res) -} -// nolint: vetshadow -func (ec *executionContext) _BertyEntityDevice_createdAt(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { - rctx := &graphql.ResolverContext{ - Object: "BertyEntityDevice", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil - }) - if resTmp == nil { + if res == nil { return graphql.Null } - res := resTmp.(time.Time) - rctx.Result = res - return models.MarshalTime(res) -} -// nolint: vetshadow -func (ec *executionContext) _BertyEntityDevice_updatedAt(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { - rctx := &graphql.ResolverContext{ - Object: "BertyEntityDevice", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(time.Time) - rctx.Result = res - return models.MarshalTime(res) + return ec._BertyEntityConversation(ctx, field.Selections, res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntityDevice_name(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { +func (ec *executionContext) _BertyNodeConversationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *node.ConversationEdge) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityDevice", + Object: "BertyNodeConversationEdge", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.Cursor, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -7147,37 +6462,106 @@ func (ec *executionContext) _BertyEntityDevice_name(ctx context.Context, field g return models.MarshalString(res) } +var bertyNodeConversationListConnectionImplementors = []string{"BertyNodeConversationListConnection"} + +// nolint: gocyclo, errcheck, gas, goconst +func (ec *executionContext) _BertyNodeConversationListConnection(ctx context.Context, sel ast.SelectionSet, obj *node.ConversationListConnection) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyNodeConversationListConnectionImplementors) + + out := graphql.NewOrderedMap(len(fields)) + invalid := false + for i, field := range fields { + out.Keys[i] = field.Alias + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BertyNodeConversationListConnection") + case "edges": + out.Values[i] = ec._BertyNodeConversationListConnection_edges(ctx, field, obj) + case "pageInfo": + out.Values[i] = ec._BertyNodeConversationListConnection_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + + if invalid { + return graphql.Null + } + return out +} + // nolint: vetshadow -func (ec *executionContext) _BertyEntityDevice_status(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { +func (ec *executionContext) _BertyNodeConversationListConnection_edges(ctx context.Context, field graphql.CollectedField, obj *node.ConversationListConnection) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityDevice", + Object: "BertyNodeConversationListConnection", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.Edges, nil }) if resTmp == nil { return graphql.Null } - res := resTmp.(entity.Device_Status) + res := resTmp.([]*node.ConversationEdge) rctx.Result = res - return models.MarshalEnum(int32(res)) + + arr1 := make(graphql.Array, len(res)) + var wg sync.WaitGroup + + isLen1 := len(res) == 1 + if !isLen1 { + wg.Add(len(res)) + } + + for idx1 := range res { + idx1 := idx1 + rctx := &graphql.ResolverContext{ + Index: &idx1, + Result: res[idx1], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(idx1 int) { + if !isLen1 { + defer wg.Done() + } + arr1[idx1] = func() graphql.Marshaler { + + if res[idx1] == nil { + return graphql.Null + } + + return ec._BertyNodeConversationEdge(ctx, field.Selections, res[idx1]) + }() + } + if isLen1 { + f(idx1) + } else { + go f(idx1) + } + + } + wg.Wait() + return arr1 } // nolint: vetshadow -func (ec *executionContext) _BertyEntityDevice_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { +func (ec *executionContext) _BertyNodeConversationListConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *node.ConversationListConnection) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityDevice", + Object: "BertyNodeConversationListConnection", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ApiVersion, nil + return obj.PageInfo, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -7185,39 +6569,24 @@ func (ec *executionContext) _BertyEntityDevice_apiVersion(ctx context.Context, f } return graphql.Null } - res := resTmp.(uint32) + res := resTmp.(*node.PageInfo) rctx.Result = res - return models.MarshalUint32(res) -} -// nolint: vetshadow -func (ec *executionContext) _BertyEntityDevice_contactId(ctx context.Context, field graphql.CollectedField, obj *entity.Device) graphql.Marshaler { - rctx := &graphql.ResolverContext{ - Object: "BertyEntityDevice", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.ContactID, nil - }) - if resTmp == nil { + if res == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(string) - rctx.Result = res - return models.MarshalString(res) + + return ec._BertyNodePageInfo(ctx, field.Selections, res) } -var bertyEntityMessageImplementors = []string{"BertyEntityMessage"} +var bertyNodeDebugAttrsImplementors = []string{"BertyNodeDebugAttrs"} // nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _BertyEntityMessage(ctx context.Context, sel ast.SelectionSet, obj *entity.Message) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, bertyEntityMessageImplementors) +func (ec *executionContext) _BertyNodeDebugAttrs(ctx context.Context, sel ast.SelectionSet, obj *node.DebugAttrs) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyNodeDebugAttrsImplementors) out := graphql.NewOrderedMap(len(fields)) invalid := false @@ -7226,9 +6595,9 @@ func (ec *executionContext) _BertyEntityMessage(ctx context.Context, sel ast.Sel switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("BertyEntityMessage") - case "text": - out.Values[i] = ec._BertyEntityMessage_text(ctx, field, obj) + out.Values[i] = graphql.MarshalString("BertyNodeDebugAttrs") + case "msg": + out.Values[i] = ec._BertyNodeDebugAttrs_msg(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } @@ -7244,16 +6613,16 @@ func (ec *executionContext) _BertyEntityMessage(ctx context.Context, sel ast.Sel } // nolint: vetshadow -func (ec *executionContext) _BertyEntityMessage_text(ctx context.Context, field graphql.CollectedField, obj *entity.Message) graphql.Marshaler { +func (ec *executionContext) _BertyNodeDebugAttrs_msg(ctx context.Context, field graphql.CollectedField, obj *node.DebugAttrs) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntityMessage", + Object: "BertyNodeDebugAttrs", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Text, nil + return obj.Msg, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -7266,53 +6635,24 @@ func (ec *executionContext) _BertyEntityMessage_text(ctx context.Context, field return models.MarshalString(res) } -var bertyEntitySenderAliasImplementors = []string{"BertyEntitySenderAlias"} +var bertyNodeEventEdgeImplementors = []string{"BertyNodeEventEdge"} // nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _BertyEntitySenderAlias(ctx context.Context, sel ast.SelectionSet, obj *entity.SenderAlias) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, bertyEntitySenderAliasImplementors) +func (ec *executionContext) _BertyNodeEventEdge(ctx context.Context, sel ast.SelectionSet, obj *node.EventEdge) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyNodeEventEdgeImplementors) out := graphql.NewOrderedMap(len(fields)) invalid := false for i, field := range fields { out.Keys[i] = field.Alias - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("BertyEntitySenderAlias") - case "id": - out.Values[i] = ec._BertyEntitySenderAlias_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "createdAt": - out.Values[i] = ec._BertyEntitySenderAlias_createdAt(ctx, field, obj) - case "updatedAt": - out.Values[i] = ec._BertyEntitySenderAlias_updatedAt(ctx, field, obj) - case "status": - out.Values[i] = ec._BertyEntitySenderAlias_status(ctx, field, obj) - case "originDeviceId": - out.Values[i] = ec._BertyEntitySenderAlias_originDeviceId(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "contactId": - out.Values[i] = ec._BertyEntitySenderAlias_contactId(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "conversationId": - out.Values[i] = ec._BertyEntitySenderAlias_conversationId(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "aliasIdentifier": - out.Values[i] = ec._BertyEntitySenderAlias_aliasIdentifier(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "used": - out.Values[i] = ec._BertyEntitySenderAlias_used(ctx, field, obj) + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BertyNodeEventEdge") + case "node": + out.Values[i] = ec._BertyNodeEventEdge_node(ctx, field, obj) + case "cursor": + out.Values[i] = ec._BertyNodeEventEdge_cursor(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } @@ -7328,99 +6668,228 @@ func (ec *executionContext) _BertyEntitySenderAlias(ctx context.Context, sel ast } // nolint: vetshadow -func (ec *executionContext) _BertyEntitySenderAlias_id(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { +func (ec *executionContext) _BertyNodeEventEdge_node(ctx context.Context, field graphql.CollectedField, obj *node.EventEdge) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntitySenderAlias", + Object: "BertyNodeEventEdge", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.Node, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*p2p.Event) rctx.Result = res - return models.MarshalString(res) + + if res == nil { + return graphql.Null + } + + return ec._BertyP2pEvent(ctx, field.Selections, res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntitySenderAlias_createdAt(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { +func (ec *executionContext) _BertyNodeEventEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *node.EventEdge) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntitySenderAlias", + Object: "BertyNodeEventEdge", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil + return obj.Cursor, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(string) rctx.Result = res - return models.MarshalTime(res) + return models.MarshalString(res) +} + +var bertyNodeEventListConnectionImplementors = []string{"BertyNodeEventListConnection"} + +// nolint: gocyclo, errcheck, gas, goconst +func (ec *executionContext) _BertyNodeEventListConnection(ctx context.Context, sel ast.SelectionSet, obj *node.EventListConnection) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyNodeEventListConnectionImplementors) + + out := graphql.NewOrderedMap(len(fields)) + invalid := false + for i, field := range fields { + out.Keys[i] = field.Alias + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BertyNodeEventListConnection") + case "edges": + out.Values[i] = ec._BertyNodeEventListConnection_edges(ctx, field, obj) + case "pageInfo": + out.Values[i] = ec._BertyNodeEventListConnection_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + + if invalid { + return graphql.Null + } + return out } // nolint: vetshadow -func (ec *executionContext) _BertyEntitySenderAlias_updatedAt(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { +func (ec *executionContext) _BertyNodeEventListConnection_edges(ctx context.Context, field graphql.CollectedField, obj *node.EventListConnection) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntitySenderAlias", + Object: "BertyNodeEventListConnection", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil + return obj.Edges, nil }) if resTmp == nil { return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.([]*node.EventEdge) rctx.Result = res - return models.MarshalTime(res) + + arr1 := make(graphql.Array, len(res)) + var wg sync.WaitGroup + + isLen1 := len(res) == 1 + if !isLen1 { + wg.Add(len(res)) + } + + for idx1 := range res { + idx1 := idx1 + rctx := &graphql.ResolverContext{ + Index: &idx1, + Result: res[idx1], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(idx1 int) { + if !isLen1 { + defer wg.Done() + } + arr1[idx1] = func() graphql.Marshaler { + + if res[idx1] == nil { + return graphql.Null + } + + return ec._BertyNodeEventEdge(ctx, field.Selections, res[idx1]) + }() + } + if isLen1 { + f(idx1) + } else { + go f(idx1) + } + + } + wg.Wait() + return arr1 } // nolint: vetshadow -func (ec *executionContext) _BertyEntitySenderAlias_status(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { +func (ec *executionContext) _BertyNodeEventListConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *node.EventListConnection) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntitySenderAlias", + Object: "BertyNodeEventListConnection", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.PageInfo, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(entity.SenderAlias_Status) + res := resTmp.(*node.PageInfo) rctx.Result = res - return models.MarshalEnum(int32(res)) + + if res == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + + return ec._BertyNodePageInfo(ctx, field.Selections, res) +} + +var bertyNodeIntegrationTestOutputImplementors = []string{"BertyNodeIntegrationTestOutput"} + +// nolint: gocyclo, errcheck, gas, goconst +func (ec *executionContext) _BertyNodeIntegrationTestOutput(ctx context.Context, sel ast.SelectionSet, obj *node.IntegrationTestOutput) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bertyNodeIntegrationTestOutputImplementors) + + out := graphql.NewOrderedMap(len(fields)) + invalid := false + for i, field := range fields { + out.Keys[i] = field.Alias + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BertyNodeIntegrationTestOutput") + case "name": + out.Values[i] = ec._BertyNodeIntegrationTestOutput_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "success": + out.Values[i] = ec._BertyNodeIntegrationTestOutput_success(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "verbose": + out.Values[i] = ec._BertyNodeIntegrationTestOutput_verbose(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "startedAt": + out.Values[i] = ec._BertyNodeIntegrationTestOutput_startedAt(ctx, field, obj) + case "finishedAt": + out.Values[i] = ec._BertyNodeIntegrationTestOutput_finishedAt(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + + if invalid { + return graphql.Null + } + return out } // nolint: vetshadow -func (ec *executionContext) _BertyEntitySenderAlias_originDeviceId(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { +func (ec *executionContext) _BertyNodeIntegrationTestOutput_name(ctx context.Context, field graphql.CollectedField, obj *node.IntegrationTestOutput) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntitySenderAlias", + Object: "BertyNodeIntegrationTestOutput", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OriginDeviceID, nil + return obj.Name, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -7434,16 +6903,16 @@ func (ec *executionContext) _BertyEntitySenderAlias_originDeviceId(ctx context.C } // nolint: vetshadow -func (ec *executionContext) _BertyEntitySenderAlias_contactId(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { +func (ec *executionContext) _BertyNodeIntegrationTestOutput_success(ctx context.Context, field graphql.CollectedField, obj *node.IntegrationTestOutput) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntitySenderAlias", + Object: "BertyNodeIntegrationTestOutput", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ContactID, nil + return obj.Success, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -7451,22 +6920,22 @@ func (ec *executionContext) _BertyEntitySenderAlias_contactId(ctx context.Contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) rctx.Result = res - return models.MarshalString(res) + return models.MarshalBool(res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntitySenderAlias_conversationId(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { +func (ec *executionContext) _BertyNodeIntegrationTestOutput_verbose(ctx context.Context, field graphql.CollectedField, obj *node.IntegrationTestOutput) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntitySenderAlias", + Object: "BertyNodeIntegrationTestOutput", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ConversationID, nil + return obj.Verbose, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -7480,49 +6949,43 @@ func (ec *executionContext) _BertyEntitySenderAlias_conversationId(ctx context.C } // nolint: vetshadow -func (ec *executionContext) _BertyEntitySenderAlias_aliasIdentifier(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { +func (ec *executionContext) _BertyNodeIntegrationTestOutput_startedAt(ctx context.Context, field graphql.CollectedField, obj *node.IntegrationTestOutput) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntitySenderAlias", + Object: "BertyNodeIntegrationTestOutput", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AliasIdentifier, nil + return obj.StartedAt, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(time.Time) rctx.Result = res - return models.MarshalString(res) + return models.MarshalTime(res) } // nolint: vetshadow -func (ec *executionContext) _BertyEntitySenderAlias_used(ctx context.Context, field graphql.CollectedField, obj *entity.SenderAlias) graphql.Marshaler { +func (ec *executionContext) _BertyNodeIntegrationTestOutput_finishedAt(ctx context.Context, field graphql.CollectedField, obj *node.IntegrationTestOutput) graphql.Marshaler { rctx := &graphql.ResolverContext{ - Object: "BertyEntitySenderAlias", + Object: "BertyNodeIntegrationTestOutput", Args: nil, Field: field, } ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Used, nil + return obj.FinishedAt, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(time.Time) rctx.Result = res - return models.MarshalBool(res) + return models.MarshalTime(res) } var bertyNetworkBandwidthStatsImplementors = []string{"BertyNetworkBandwidthStats"} @@ -7734,7 +7197,7 @@ func (ec *executionContext) _BertyNetworkBandwidthStatsPayload_id(ctx context.Co if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(int32) rctx.Result = res return models.MarshalString(res) } @@ -8445,7 +7908,7 @@ func (ec *executionContext) _BertyNodeContactEdge_cursor(ctx context.Context, fi ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.EndCursor, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -8483,11 +7946,20 @@ func (ec *executionContext) _BertyNodeContactListConnection(ctx context.Context, panic("unknown field " + strconv.Quote(field.Name)) } } - - if invalid { + ctx = graphql.WithResolverContext(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.HasNextPage, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - return out + res := resTmp.(bool) + rctx.Result = res + return models.MarshalBool(res) } // nolint: vetshadow @@ -8500,13 +7972,18 @@ func (ec *executionContext) _BertyNodeContactListConnection_edges(ctx context.Co ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.HasPreviousPage, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.([]*node.ContactEdge) rctx.Result = res + return models.MarshalBool(res) +} arr1 := make(graphql.Array, len(res)) var wg sync.WaitGroup @@ -8557,7 +8034,7 @@ func (ec *executionContext) _BertyNodeContactListConnection_pageInfo(ctx context ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Count, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -8565,17 +8042,9 @@ func (ec *executionContext) _BertyNodeContactListConnection_pageInfo(ctx context } return graphql.Null } - res := resTmp.(*node.PageInfo) + res := resTmp.(uint32) rctx.Result = res - - if res == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - - return ec._BertyNodePageInfo(ctx, field.Selections, res) + return models.MarshalUint32(res) } var bertyNodeConversationEdgeImplementors = []string{"BertyNodeConversationEdge"} @@ -8646,11 +8115,8 @@ func (ec *executionContext) _BertyNodeConversationEdge_cursor(ctx context.Contex resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Cursor, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } + }) + if resTmp == nil { return graphql.Null } res := resTmp.(string) @@ -8821,14 +8287,20 @@ func (ec *executionContext) _BertyNodeDebugAttrs_msg(ctx context.Context, field return obj.Msg, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]string) rctx.Result = res - return models.MarshalString(res) + + arr1 := make(graphql.Array, len(res)) + + for idx1 := range res { + arr1[idx1] = func() graphql.Marshaler { + return models.MarshalString(res[idx1]) + }() + } + + return arr1 } var bertyNodeEventEdgeImplementors = []string{"BertyNodeEventEdge"} @@ -8904,6 +8376,9 @@ func (ec *executionContext) _BertyNodeEventEdge_cursor(ctx context.Context, fiel if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } + } + + if invalid { return graphql.Null } res := resTmp.(string) @@ -9088,9 +8563,6 @@ func (ec *executionContext) _BertyNodeIntegrationTestPayload_name(ctx context.Co return obj.Name, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) @@ -9111,9 +8583,6 @@ func (ec *executionContext) _BertyNodeIntegrationTestPayload_success(ctx context return obj.Success, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(bool) @@ -9342,14 +8811,16 @@ func (ec *executionContext) _BertyNodeLogfileEntry_path(ctx context.Context, fie return obj.Path, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*entity.Contact) rctx.Result = res - return models.MarshalString(res) + + if res == nil { + return graphql.Null + } + + return ec._BertyEntityContact(ctx, field.Selections, res) } // nolint: vetshadow @@ -9365,9 +8836,6 @@ func (ec *executionContext) _BertyNodeLogfileEntry_filesize(ctx context.Context, return obj.Filesize, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(int32) @@ -9475,15 +8943,10 @@ func (ec *executionContext) _BertyNodeLogfileEntryPayload_path(ctx context.Conte return obj.Path, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*entity.Message) rctx.Result = res - return models.MarshalString(res) -} // nolint: vetshadow func (ec *executionContext) _BertyNodeLogfileEntryPayload_filesize(ctx context.Context, field graphql.CollectedField, obj *node.LogfileEntry) graphql.Marshaler { @@ -11961,7 +11424,8 @@ func (ec *executionContext) _BertyP2pMetadataKeyValue(ctx context.Context, sel a if invalid { return graphql.Null } - return out + + return arr1 } // nolint: vetshadow @@ -12592,90 +12056,6 @@ func (ec *executionContext) _BertyPkgDeviceinfoDeviceInfos_infos(ctx context.Con return arr1 } -var bertyPkgDeviceinfoDeviceInfosPayloadImplementors = []string{"BertyPkgDeviceinfoDeviceInfosPayload"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _BertyPkgDeviceinfoDeviceInfosPayload(ctx context.Context, sel ast.SelectionSet, obj *deviceinfo.DeviceInfos) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, bertyPkgDeviceinfoDeviceInfosPayloadImplementors) - - out := graphql.NewOrderedMap(len(fields)) - invalid := false - for i, field := range fields { - out.Keys[i] = field.Alias - - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("BertyPkgDeviceinfoDeviceInfosPayload") - case "infos": - out.Values[i] = ec._BertyPkgDeviceinfoDeviceInfosPayload_infos(ctx, field, obj) - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - - if invalid { - return graphql.Null - } - return out -} - -// nolint: vetshadow -func (ec *executionContext) _BertyPkgDeviceinfoDeviceInfosPayload_infos(ctx context.Context, field graphql.CollectedField, obj *deviceinfo.DeviceInfos) graphql.Marshaler { - rctx := &graphql.ResolverContext{ - Object: "BertyPkgDeviceinfoDeviceInfosPayload", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Infos, nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]*deviceinfo.DeviceInfo) - rctx.Result = res - - arr1 := make(graphql.Array, len(res)) - var wg sync.WaitGroup - - isLen1 := len(res) == 1 - if !isLen1 { - wg.Add(len(res)) - } - - for idx1 := range res { - idx1 := idx1 - rctx := &graphql.ResolverContext{ - Index: &idx1, - Result: res[idx1], - } - ctx := graphql.WithResolverContext(ctx, rctx) - f := func(idx1 int) { - if !isLen1 { - defer wg.Done() - } - arr1[idx1] = func() graphql.Marshaler { - - if res[idx1] == nil { - return graphql.Null - } - - return ec._BertyPkgDeviceinfoDeviceInfo(ctx, field.Selections, res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 -} - var googleProtobufDescriptorProtoImplementors = []string{"GoogleProtobufDescriptorProto"} // nolint: gocyclo, errcheck, gas, goconst @@ -18330,7 +17710,7 @@ func (ec *executionContext) _Mutation_EventSeen(ctx context.Context, field graph return graphql.Null } - return ec._BertyP2pEventPayload(ctx, field.Selections, res) + return ec._BertyP2pEvent(ctx, field.Selections, res) } // nolint: vetshadow @@ -18361,7 +17741,7 @@ func (ec *executionContext) _Mutation_ContactRequest(ctx context.Context, field return graphql.Null } - return ec._BertyEntityContactPayload(ctx, field.Selections, res) + return ec._BertyEntityContact(ctx, field.Selections, res) } // nolint: vetshadow @@ -18392,7 +17772,7 @@ func (ec *executionContext) _Mutation_ContactAcceptRequest(ctx context.Context, return graphql.Null } - return ec._BertyEntityContactPayload(ctx, field.Selections, res) + return ec._BertyEntityContact(ctx, field.Selections, res) } // nolint: vetshadow @@ -18423,7 +17803,7 @@ func (ec *executionContext) _Mutation_ContactRemove(ctx context.Context, field g return graphql.Null } - return ec._BertyEntityContactPayload(ctx, field.Selections, res) + return ec._BertyEntityContact(ctx, field.Selections, res) } // nolint: vetshadow @@ -18454,7 +17834,7 @@ func (ec *executionContext) _Mutation_ContactUpdate(ctx context.Context, field g return graphql.Null } - return ec._BertyEntityContactPayload(ctx, field.Selections, res) + return ec._BertyEntityContact(ctx, field.Selections, res) } // nolint: vetshadow @@ -18485,7 +17865,7 @@ func (ec *executionContext) _Mutation_ConversationCreate(ctx context.Context, fi return graphql.Null } - return ec._BertyEntityConversationPayload(ctx, field.Selections, res) + return ec._BertyEntityConversation(ctx, field.Selections, res) } // nolint: vetshadow @@ -18516,7 +17896,7 @@ func (ec *executionContext) _Mutation_ConversationInvite(ctx context.Context, fi return graphql.Null } - return ec._BertyEntityConversationPayload(ctx, field.Selections, res) + return ec._BertyEntityConversation(ctx, field.Selections, res) } // nolint: vetshadow @@ -18547,7 +17927,7 @@ func (ec *executionContext) _Mutation_ConversationExclude(ctx context.Context, f return graphql.Null } - return ec._BertyEntityConversationPayload(ctx, field.Selections, res) + return ec._BertyEntityConversation(ctx, field.Selections, res) } // nolint: vetshadow @@ -18578,7 +17958,7 @@ func (ec *executionContext) _Mutation_ConversationAddMessage(ctx context.Context return graphql.Null } - return ec._BertyP2pEventPayload(ctx, field.Selections, res) + return ec._BertyP2pEvent(ctx, field.Selections, res) } // nolint: vetshadow @@ -18609,7 +17989,7 @@ func (ec *executionContext) _Mutation_ConversationRead(ctx context.Context, fiel return graphql.Null } - return ec._BertyEntityConversationPayload(ctx, field.Selections, res) + return ec._BertyEntityConversation(ctx, field.Selections, res) } // nolint: vetshadow @@ -18640,7 +18020,7 @@ func (ec *executionContext) _Mutation_GenerateFakeData(ctx context.Context, fiel return graphql.Null } - return ec._BertyNodeVoidPayload(ctx, field.Selections, res) + return ec._BertyNodeVoid(ctx, field.Selections, res) } // nolint: vetshadow @@ -18671,7 +18051,7 @@ func (ec *executionContext) _Mutation_RunIntegrationTests(ctx context.Context, f return graphql.Null } - return ec._BertyNodeIntegrationTestPayload(ctx, field.Selections, res) + return ec._BertyNodeIntegrationTestOutput(ctx, field.Selections, res) } // nolint: vetshadow @@ -18702,7 +18082,7 @@ func (ec *executionContext) _Mutation_DebugRequeueEvent(ctx context.Context, fie return graphql.Null } - return ec._BertyP2pEventPayload(ctx, field.Selections, res) + return ec._BertyP2pEvent(ctx, field.Selections, res) } // nolint: vetshadow @@ -18733,7 +18113,7 @@ func (ec *executionContext) _Mutation_DebugRequeueAll(ctx context.Context, field return graphql.Null } - return ec._BertyNodeVoidPayload(ctx, field.Selections, res) + return ec._BertyNodeVoid(ctx, field.Selections, res) } var queryImplementors = []string{"Query"} @@ -18785,10 +18165,10 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Values[i] = ec._Query_ContactList(ctx, field) wg.Done() }(i, field) - case "GetContact": + case "Contact": wg.Add(1) go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Query_GetContact(ctx, field) + out.Values[i] = ec._Query_Contact(ctx, field) wg.Done() }(i, field) case "ConversationList": @@ -18797,16 +18177,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Values[i] = ec._Query_ConversationList(ctx, field) wg.Done() }(i, field) - case "GetConversation": + case "Conversation": wg.Add(1) go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Query_GetConversation(ctx, field) + out.Values[i] = ec._Query_Conversation(ctx, field) wg.Done() }(i, field) - case "GetConversationMember": + case "ConversationMember": wg.Add(1) go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Query_GetConversationMember(ctx, field) + out.Values[i] = ec._Query_ConversationMember(ctx, field) wg.Done() }(i, field) case "DeviceInfos": @@ -18965,7 +18345,7 @@ func (ec *executionContext) _Query_GetEvent(ctx context.Context, field graphql.C ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().GetEvent(rctx, args["id"].(string), args["senderId"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["sentAt"].(*time.Time), args["receivedAt"].(*time.Time), args["ackedAt"].(*time.Time), args["direction"].(*int32), args["senderApiVersion"].(uint32), args["receiverApiVersion"].(uint32), args["receiverId"].(string), args["kind"].(*int32), args["attributes"].([]byte), args["conversationId"].(string), args["seenAt"].(*time.Time), args["metadata"].([]*p2p.MetadataKeyValue)) + return ec.resolvers.Query().GetEvent(rctx, args["id"].(string)) }) if resTmp == nil { return graphql.Null @@ -18977,7 +18357,7 @@ func (ec *executionContext) _Query_GetEvent(ctx context.Context, field graphql.C return graphql.Null } - return ec._BertyP2pEventPayload(ctx, field.Selections, res) + return ec._BertyP2pEvent(ctx, field.Selections, res) } // nolint: vetshadow @@ -19012,9 +18392,9 @@ func (ec *executionContext) _Query_ContactList(ctx context.Context, field graphq } // nolint: vetshadow -func (ec *executionContext) _Query_GetContact(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_Contact(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Query_GetContact_args(rawArgs) + args, err := field_Query_Contact_args(rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null @@ -19027,7 +18407,7 @@ func (ec *executionContext) _Query_GetContact(ctx context.Context, field graphql ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().GetContact(rctx, args["id"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["sigchain"].([]byte), args["status"].(*int32), args["devices"].([]*entity.Device), args["displayName"].(string), args["displayStatus"].(string), args["overrideDisplayName"].(string), args["overrideDisplayStatus"].(string)) + return ec.resolvers.Query().Contact(rctx, args["filter"].(*entity.Contact)) }) if resTmp == nil { return graphql.Null @@ -19039,7 +18419,7 @@ func (ec *executionContext) _Query_GetContact(ctx context.Context, field graphql return graphql.Null } - return ec._BertyEntityContactPayload(ctx, field.Selections, res) + return ec._BertyEntityContact(ctx, field.Selections, res) } // nolint: vetshadow @@ -19074,9 +18454,9 @@ func (ec *executionContext) _Query_ConversationList(ctx context.Context, field g } // nolint: vetshadow -func (ec *executionContext) _Query_GetConversation(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_Conversation(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Query_GetConversation_args(rawArgs) + args, err := field_Query_Conversation_args(rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null @@ -19089,7 +18469,7 @@ func (ec *executionContext) _Query_GetConversation(ctx context.Context, field gr ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().GetConversation(rctx, args["id"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["readAt"].(*time.Time), args["title"].(string), args["topic"].(string), args["members"].([]*entity.ConversationMember)) + return ec.resolvers.Query().Conversation(rctx, args["id"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["readAt"].(*time.Time), args["title"].(string), args["topic"].(string), args["members"].([]*entity.ConversationMember)) }) if resTmp == nil { return graphql.Null @@ -19101,13 +18481,13 @@ func (ec *executionContext) _Query_GetConversation(ctx context.Context, field gr return graphql.Null } - return ec._BertyEntityConversationPayload(ctx, field.Selections, res) + return ec._BertyEntityConversation(ctx, field.Selections, res) } // nolint: vetshadow -func (ec *executionContext) _Query_GetConversationMember(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_ConversationMember(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Query_GetConversationMember_args(rawArgs) + args, err := field_Query_ConversationMember_args(rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null @@ -19120,7 +18500,7 @@ func (ec *executionContext) _Query_GetConversationMember(ctx context.Context, fi ctx = graphql.WithResolverContext(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().GetConversationMember(rctx, args["id"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["status"].(*int32), args["contact"].(*entity.Contact), args["conversationId"].(string), args["contactId"].(string)) + return ec.resolvers.Query().ConversationMember(rctx, args["id"].(string), args["createdAt"].(*time.Time), args["updatedAt"].(*time.Time), args["status"].(*int32), args["contact"].(*entity.Contact), args["conversationId"].(string), args["contactId"].(string)) }) if resTmp == nil { return graphql.Null @@ -19132,7 +18512,7 @@ func (ec *executionContext) _Query_GetConversationMember(ctx context.Context, fi return graphql.Null } - return ec._BertyEntityConversationMemberPayload(ctx, field.Selections, res) + return ec._BertyEntityConversationMember(ctx, field.Selections, res) } // nolint: vetshadow @@ -19163,7 +18543,7 @@ func (ec *executionContext) _Query_DeviceInfos(ctx context.Context, field graphq return graphql.Null } - return ec._BertyPkgDeviceinfoDeviceInfosPayload(ctx, field.Selections, res) + return ec._BertyPkgDeviceinfoDeviceInfos(ctx, field.Selections, res) } // nolint: vetshadow @@ -19194,7 +18574,7 @@ func (ec *executionContext) _Query_AppVersion(ctx context.Context, field graphql return graphql.Null } - return ec._BertyNodeAppVersionPayload(ctx, field.Selections, res) + return ec._BertyNodeAppVersionOutput(ctx, field.Selections, res) } // nolint: vetshadow @@ -19256,7 +18636,7 @@ func (ec *executionContext) _Query_Protocols(ctx context.Context, field graphql. return graphql.Null } - return ec._BertyNodeProtocolsPayload(ctx, field.Selections, res) + return ec._BertyNodeProtocolsOutput(ctx, field.Selections, res) } // nolint: vetshadow @@ -19308,7 +18688,7 @@ func (ec *executionContext) _Query_LogfileList(ctx context.Context, field graphq return graphql.Null } - return ec._BertyNodeLogfileEntryPayload(ctx, field.Selections, res[idx1]) + return ec._BertyNodeLogfileEntry(ctx, field.Selections, res[idx1]) }() } if isLen1 { @@ -19350,7 +18730,7 @@ func (ec *executionContext) _Query_Panic(ctx context.Context, field graphql.Coll return graphql.Null } - return ec._BertyNodeVoidPayload(ctx, field.Selections, res) + return ec._BertyNodeVoid(ctx, field.Selections, res) } // nolint: vetshadow @@ -19465,7 +18845,7 @@ func (ec *executionContext) _Subscription_EventStream(ctx context.Context, field return graphql.Null } - return ec._BertyP2pEventPayload(ctx, field.Selections, res) + return ec._BertyP2pEvent(ctx, field.Selections, res) }()) return &out } @@ -19498,7 +18878,7 @@ func (ec *executionContext) _Subscription_LogStream(ctx context.Context, field g return graphql.Null } - return ec._BertyNodeLogEntryPayload(ctx, field.Selections, res) + return ec._BertyNodeLogEntry(ctx, field.Selections, res) }()) return &out } @@ -19531,7 +18911,7 @@ func (ec *executionContext) _Subscription_LogfileRead(ctx context.Context, field return graphql.Null } - return ec._BertyNodeLogEntryPayload(ctx, field.Selections, res) + return ec._BertyNodeLogEntry(ctx, field.Selections, res) }()) return &out } @@ -21545,31 +20925,31 @@ type GoogleProtobufFileDescriptorSet { file: [GoogleProtobufFileDescriptorProto] } type GoogleProtobufFileDescriptorProto { - name: String! - package: String! - dependency: [String!] - publicDependency: [Int32!] - weakDependency: [Int32!] + name: String! + package: String! + dependency: [String!] + publicDependency: [Int32!] + weakDependency: [Int32!] messageType: [GoogleProtobufDescriptorProto] enumType: [GoogleProtobufEnumDescriptorProto] service: [GoogleProtobufServiceDescriptorProto] extension: [GoogleProtobufFieldDescriptorProto] options: GoogleProtobufFileOptions sourceCodeInfo: GoogleProtobufSourceCodeInfo - syntax: String! + syntax: String! } type GoogleProtobufDescriptorProtoExtensionRange { - start: Int32! - end: Int32! + start: Int32! + end: Int32! options: GoogleProtobufExtensionRangeOptions } type GoogleProtobufDescriptorProtoReservedRange { - start: Int32! - end: Int32! + start: Int32! + end: Int32! } type GoogleProtobufDescriptorProto { - name: String! + name: String! field: [GoogleProtobufFieldDescriptorProto] extension: [GoogleProtobufFieldDescriptorProto] nestedType: [GoogleProtobufDescriptorProto] @@ -21578,7 +20958,7 @@ type GoogleProtobufDescriptorProto { oneofDecl: [GoogleProtobufOneofDescriptorProto] options: GoogleProtobufMessageOptions reservedRange: [GoogleProtobufDescriptorProtoReservedRange] - reservedName: [String!] + reservedName: [String!] } type GoogleProtobufExtensionRangeOptions { uninterpretedOption: [GoogleProtobufUninterpretedOption] @@ -21586,146 +20966,146 @@ type GoogleProtobufExtensionRangeOptions { type GoogleProtobufFieldDescriptorProto { - name: String! - number: Int32! + name: String! + number: Int32! label: Enum type: Enum - typeName: String! - extendee: String! - defaultValue: String! - oneofIndex: Int32! - jsonName: String! + typeName: String! + extendee: String! + defaultValue: String! + oneofIndex: Int32! + jsonName: String! options: GoogleProtobufFieldOptions } type GoogleProtobufOneofDescriptorProto { - name: String! + name: String! options: GoogleProtobufOneofOptions } type GoogleProtobufEnumDescriptorProtoEnumReservedRange { - start: Int32! - end: Int32! + start: Int32! + end: Int32! } type GoogleProtobufEnumDescriptorProto { - name: String! + name: String! value: [GoogleProtobufEnumValueDescriptorProto] options: GoogleProtobufEnumOptions reservedRange: [GoogleProtobufEnumDescriptorProtoEnumReservedRange] - reservedName: [String!] + reservedName: [String!] } type GoogleProtobufEnumValueDescriptorProto { - name: String! - number: Int32! + name: String! + number: Int32! options: GoogleProtobufEnumValueOptions } type GoogleProtobufServiceDescriptorProto { - name: String! + name: String! method: [GoogleProtobufMethodDescriptorProto] options: GoogleProtobufServiceOptions } type GoogleProtobufMethodDescriptorProto { - name: String! - inputType: String! - outputType: String! + name: String! + inputType: String! + outputType: String! options: GoogleProtobufMethodOptions - clientStreaming: Bool! - serverStreaming: Bool! + clientStreaming: Bool! + serverStreaming: Bool! } type GoogleProtobufFileOptions { - javaPackage: String! - javaOuterClassname: String! - javaMultipleFiles: Bool! - javaGenerateEqualsAndHash: Bool! - javaStringCheckUtf8: Bool! + javaPackage: String! + javaOuterClassname: String! + javaMultipleFiles: Bool! + javaGenerateEqualsAndHash: Bool! + javaStringCheckUtf8: Bool! optimizeFor: Enum - goPackage: String! - ccGenericServices: Bool! - javaGenericServices: Bool! - pyGenericServices: Bool! - phpGenericServices: Bool! - deprecated: Bool! - ccEnableArenas: Bool! - objcClassPrefix: String! - csharpNamespace: String! - swiftPrefix: String! - phpClassPrefix: String! - phpNamespace: String! - phpMetadataNamespace: String! - rubyPackage: String! + goPackage: String! + ccGenericServices: Bool! + javaGenericServices: Bool! + pyGenericServices: Bool! + phpGenericServices: Bool! + deprecated: Bool! + ccEnableArenas: Bool! + objcClassPrefix: String! + csharpNamespace: String! + swiftPrefix: String! + phpClassPrefix: String! + phpNamespace: String! + phpMetadataNamespace: String! + rubyPackage: String! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufMessageOptions { - messageSetWireFormat: Bool! - noStandardDescriptorAccessor: Bool! - deprecated: Bool! - mapEntry: Bool! + messageSetWireFormat: Bool! + noStandardDescriptorAccessor: Bool! + deprecated: Bool! + mapEntry: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufFieldOptions { ctype: Enum - packed: Bool! + packed: Bool! jstype: Enum - lazy: Bool! - deprecated: Bool! - weak: Bool! + lazy: Bool! + deprecated: Bool! + weak: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufOneofOptions { uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufEnumOptions { - allowAlias: Bool! - deprecated: Bool! + allowAlias: Bool! + deprecated: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufEnumValueOptions { - deprecated: Bool! + deprecated: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufServiceOptions { - deprecated: Bool! + deprecated: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufMethodOptions { - deprecated: Bool! + deprecated: Bool! idempotencyLevel: Enum uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufUninterpretedOptionNamePart { - namePart: String! - isExtension: Bool! + namePart: String! + isExtension: Bool! } type GoogleProtobufUninterpretedOption { name: [GoogleProtobufUninterpretedOptionNamePart] - identifierValue: String! - positiveIntValue: Uint64! - negativeIntValue: Int64! - doubleValue: Double! - stringValue: [Byte!], - aggregateValue: String! + identifierValue: String! + positiveIntValue: Uint64! + negativeIntValue: Int64! + doubleValue: Double! + stringValue: [Byte!] + aggregateValue: String! } type GoogleProtobufSourceCodeInfoLocation { - path: [Int32!] - span: [Int32!] - leadingComments: String! - trailingComments: String! - leadingDetachedComments: [String!] + path: [Int32!] + span: [Int32!] + leadingComments: String! + trailingComments: String! + leadingDetachedComments: [String!] } type GoogleProtobufSourceCodeInfo { location: [GoogleProtobufSourceCodeInfoLocation] } type GoogleProtobufGeneratedCodeInfoAnnotation { - path: [Int32!] - sourceFile: String! - begin: Int32! - end: Int32! + path: [Int32!] + sourceFile: String! + begin: Int32! + end: Int32! } type GoogleProtobufGeneratedCodeInfo { annotation: [GoogleProtobufGeneratedCodeInfoAnnotation] @@ -21792,10 +21172,10 @@ type BertyEntityDevice implements Node { id: ID! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp - name: String! + name: String! status: Enum - apiVersion: Uint32! - contactId: String! + apiVersion: Uint32! + contactId: String! } @@ -21806,13 +21186,13 @@ type BertyEntityContact implements Node { id: ID! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDevice] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! } @@ -21823,8 +21203,8 @@ type BertyEntityConversation implements Node { createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp readAt: GoogleProtobufTimestamp - title: String! - topic: String! + title: String! + topic: String! members: [BertyEntityConversationMember] } @@ -21834,15 +21214,15 @@ type BertyEntityConversationMember implements Node { updatedAt: GoogleProtobufTimestamp status: Enum contact: BertyEntityContact - conversationId: String! - contactId: String! + conversationId: String! + contactId: String! } type BertyEntityMessage { - text: String! + text: String! } @@ -21850,15 +21230,15 @@ type BertyEntityMessage { type BertyEntitySenderAlias { - id: String! + id: String! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp status: Enum - originDeviceId: String! - contactId: String! - conversationId: String! - aliasIdentifier: String! - used: Bool! + originDeviceId: String! + contactId: String! + conversationId: String! + aliasIdentifier: String! + used: Bool! } @@ -21866,21 +21246,21 @@ type BertyEntitySenderAlias { type BertyP2pSentAttrs { - ids: [String!] + ids: [String!] } type BertyP2pAckAttrs { - ids: [String!] - errMsg: String! + ids: [String!] + errMsg: String! } type BertyP2pPingAttrs { - T: Bool! + T: Bool! } type BertyP2pContactRequestAttrs { me: BertyEntityContact - introText: String! + introText: String! } type BertyP2pContactRequestAcceptedAttrs { - T: Bool! + T: Bool! } type BertyP2pContactShareMeAttrs { me: BertyEntityContact @@ -21895,15 +21275,15 @@ type BertyP2pConversationNewMessageAttrs { message: BertyEntityMessage } type BertyP2pDevtoolsMapsetAttrs { - key: String! - val: String! + key: String! + val: String! } type BertyP2pSenderAliasUpdateAttrs { aliases: [BertyEntitySenderAlias] } type BertyP2pNodeAttrs { - kind: Int32! - attributes: [Byte!], + kind: Int32! + attributes: [Byte!] } @@ -21912,25 +21292,48 @@ type BertyP2pNodeAttrs { type BertyP2pEvent implements Node { id: ID! - senderId: String! + senderId: String! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp sentAt: GoogleProtobufTimestamp receivedAt: GoogleProtobufTimestamp ackedAt: GoogleProtobufTimestamp direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! + senderApiVersion: Uint32! + receiverApiVersion: Uint32! + receiverId: String! kind: Enum - attributes: [Byte!], + attributes: [Byte!] conversationId: ID! seenAt: GoogleProtobufTimestamp metadata: [BertyP2pMetadataKeyValue] } type BertyP2pMetadataKeyValue { - key: String! - values: [String!] + key: String! + values: [String!] +} + + + + + +type BertyNodeNodeStartedAttrs { + T: Bool! +} +type BertyNodeNodeStoppedAttrs { + errMsg: String! +} +type BertyNodeNodeIsAliveAttrs { + T: Bool! +} +type BertyNodeBackgroundErrorAttrs { + errMsg: String! +} +type BertyNodeBackgroundWarnAttrs { + errMsg: String! +} +type BertyNodeDebugAttrs { + msg: String! } @@ -21967,12 +21370,18 @@ type BertyPkgDeviceinfoDeviceInfo { +type BertyNodeProtocolsOutput { + protocols: [String!] +} +type BertyNodeAppVersionOutput { + version: String! +} type BertyNodePingDestination { - destination: String! + destination: String! } type BertyNodeEventEdge { node: BertyP2pEvent - cursor: String! + cursor: String! } type BertyNodeEventListConnection { edges: [BertyNodeEventEdge] @@ -21980,7 +21389,7 @@ type BertyNodeEventListConnection { } type BertyNodeContactEdge { node: BertyEntityContact - cursor: String! + cursor: String! } type BertyNodeContactListConnection { edges: [BertyNodeContactEdge] @@ -21988,36 +21397,43 @@ type BertyNodeContactListConnection { } type BertyNodeConversationEdge { node: BertyEntityConversation - cursor: String! + cursor: String! } type BertyNodeConversationListConnection { edges: [BertyNodeConversationEdge] pageInfo: BertyNodePageInfo! } type BertyNodePagination { - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String } type BertyNodePageInfo { - startCursor: String! - endCursor: String! - hasNextPage: Bool! - hasPreviousPage: Bool! - count: Uint32! + startCursor: String! + endCursor: String! + hasNextPage: Bool! + hasPreviousPage: Bool! + count: Uint32! +} +type BertyNodeIntegrationTestOutput { + name: String! + success: Bool! + verbose: String! + startedAt: GoogleProtobufTimestamp + finishedAt: GoogleProtobufTimestamp } type BertyNodeVoid { - T: Bool! + T: Bool! } type BertyNodeLogEntry { - line: String! + line: String! } type BertyNodeLogfileEntry { - path: String! - filesize: Int32! + path: String! + filesize: Int32! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp } @@ -22031,94 +21447,55 @@ type BertyNetworkPeerPayload { connection: Enum } input BertyP2pMetadataKeyValueInput { - key: String! - values: [String!] + key: String! + values: [String!] } input BertyP2pEventInput { id: ID! - senderId: String! + senderId: String! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput sentAt: GoogleProtobufTimestampInput receivedAt: GoogleProtobufTimestampInput ackedAt: GoogleProtobufTimestampInput direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! + senderApiVersion: Uint32! + receiverApiVersion: Uint32! + receiverId: String! kind: Enum - attributes: [Byte!], + attributes: [Byte!] conversationId: ID! seenAt: GoogleProtobufTimestampInput metadata: [BertyP2pMetadataKeyValueInput] } -type BertyP2pEventPayload { - id: ID! - senderId: String! - createdAt: GoogleProtobufTimestamp - updatedAt: GoogleProtobufTimestamp - sentAt: GoogleProtobufTimestamp - receivedAt: GoogleProtobufTimestamp - ackedAt: GoogleProtobufTimestamp - direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! - kind: Enum - attributes: [Byte!], - conversationId: ID! - seenAt: GoogleProtobufTimestamp - metadata: [BertyP2pMetadataKeyValue] -} input BertyNodePaginationInput { - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String } input BertyEntityDeviceInput { id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - name: String! + name: String! status: Enum - apiVersion: Uint32! - contactId: String! + apiVersion: Uint32! + contactId: String! } input BertyEntityContactInput { id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! -} -type BertyEntityContactPayload { - id: ID! - createdAt: GoogleProtobufTimestamp - updatedAt: GoogleProtobufTimestamp - sigchain: [Byte!], - status: Enum - devices: [BertyEntityDevice] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! -} -type BertyEntityConversationPayload { - id: ID! - createdAt: GoogleProtobufTimestamp - updatedAt: GoogleProtobufTimestamp - readAt: GoogleProtobufTimestamp - title: String! - topic: String! - members: [BertyEntityConversationMember] + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! } input BertyEntityConversationMemberInput { id: ID! @@ -22126,16 +21503,16 @@ input BertyEntityConversationMemberInput { updatedAt: GoogleProtobufTimestampInput status: Enum contact: BertyEntityContactInput - conversationId: String! - contactId: String! + conversationId: String! + contactId: String! } input BertyEntityConversationInput { id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput readAt: GoogleProtobufTimestampInput - title: String! - topic: String! + title: String! + topic: String! members: [BertyEntityConversationMemberInput] } input BertyEntityMessageInput { @@ -22198,198 +21575,174 @@ type Query { EventList( filter: BertyP2pEventInput onlyWithoutAckedAt: Enum - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String ): BertyNodeEventListConnection GetEvent( id: ID! - senderId: String! - createdAt: GoogleProtobufTimestampInput - updatedAt: GoogleProtobufTimestampInput - sentAt: GoogleProtobufTimestampInput - receivedAt: GoogleProtobufTimestampInput - ackedAt: GoogleProtobufTimestampInput - direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! - kind: Enum - attributes: [Byte!], - conversationId: ID! - seenAt: GoogleProtobufTimestampInput - metadata: [BertyP2pMetadataKeyValueInput] - ): BertyP2pEventPayload + ): BertyP2pEvent ContactList( filter: BertyEntityContactInput - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String ): BertyNodeContactListConnection - GetContact( - id: ID! - createdAt: GoogleProtobufTimestampInput - updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], - status: Enum - devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + Contact( + filter: BertyEntityContactInput + ): BertyEntityContact ConversationList( filter: BertyEntityConversationInput - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String ): BertyNodeConversationListConnection - GetConversation( + Conversation( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput readAt: GoogleProtobufTimestampInput - title: String! - topic: String! + title: String! + topic: String! members: [BertyEntityConversationMemberInput] - ): BertyEntityConversationPayload - GetConversationMember( + ): BertyEntityConversation + ConversationMember( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput status: Enum contact: BertyEntityContactInput - conversationId: String! - contactId: String! - ): BertyEntityConversationMemberPayload + conversationId: String! + contactId: String! + ): BertyEntityConversationMember DeviceInfos( - T: Bool! - ): BertyPkgDeviceinfoDeviceInfosPayload + T: Bool! + ): BertyPkgDeviceinfoDeviceInfos AppVersion( - T: Bool! - ): BertyNodeAppVersionPayload + T: Bool! + ): BertyNodeAppVersionOutput Peers( T: Bool! ): BertyNetworkPeersPayload Protocols( - id: String! - addrs: [String!] + id: String! + addrs: [String!] connection: Enum - ): BertyNodeProtocolsPayload + ): BertyNodeProtocolsOutput LogfileList( - T: Bool! - ): [BertyNodeLogfileEntryPayload] + T: Bool! + ): [BertyNodeLogfileEntry] Panic( - T: Bool! - ): BertyNodeVoidPayload + T: Bool! + ): BertyNodeVoid } type Mutation { EventSeen( id: ID! - ): BertyP2pEventPayload + ): BertyP2pEvent ContactRequest( contact: BertyEntityContactInput - introText: String! - ): BertyEntityContactPayload + introText: String! + ): BertyEntityContact ContactAcceptRequest( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! + ): BertyEntityContact ContactRemove( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! + ): BertyEntityContact ContactUpdate( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! + ): BertyEntityContact ConversationCreate( contacts: [BertyEntityContactInput] - title: String! - topic: String! - ): BertyEntityConversationPayload + title: String! + topic: String! + ): BertyEntityConversation ConversationInvite( conversation: BertyEntityConversationInput members: [BertyEntityConversationMemberInput] - ): BertyEntityConversationPayload + ): BertyEntityConversation ConversationExclude( conversation: BertyEntityConversationInput members: [BertyEntityConversationMemberInput] - ): BertyEntityConversationPayload + ): BertyEntityConversation ConversationAddMessage( conversation: BertyEntityConversationInput message: BertyEntityMessageInput - ): BertyP2pEventPayload + ): BertyP2pEvent ConversationRead( id: ID! - ): BertyEntityConversationPayload + ): BertyEntityConversation GenerateFakeData( - T: Bool! - ): BertyNodeVoidPayload + T: Bool! + ): BertyNodeVoid RunIntegrationTests( - name: String! - ): BertyNodeIntegrationTestPayload + name: String! + ): BertyNodeIntegrationTestOutput DebugRequeueEvent( eventId: ID! - ): BertyP2pEventPayload + ): BertyP2pEvent DebugRequeueAll( - T: Bool! - ): BertyNodeVoidPayload + T: Bool! + ): BertyNodeVoid } type Subscription { EventStream( filter: BertyP2pEventInput - ): BertyP2pEventPayload + ): BertyP2pEvent LogStream( - continues: Bool! - logLevel: String! - namespaces: String! - last: Int32! - ): BertyNodeLogEntryPayload + continues: Bool! + logLevel: String! + namespaces: String! + last: Int32! + ): BertyNodeLogEntry LogfileRead( - path: String! - ): BertyNodeLogEntryPayload + path: String! + ): BertyNodeLogEntry MonitorBandwidth( - id: String - totalIn: Int64 - totalOut: Int64 - rateIn: Double - rateOut: Double + id: String + totalIn: Int64 + totalOut: Int64 + rateIn: Double + rateOut: Double type: Enum ): BertyNetworkBandwidthStatsPayload MonitorPeers( diff --git a/core/api/node/graphql/service.gen.graphql b/core/api/node/graphql/service.gen.graphql index 293d195a6c..b5887972ea 100644 --- a/core/api/node/graphql/service.gen.graphql +++ b/core/api/node/graphql/service.gen.graphql @@ -26,31 +26,31 @@ type GoogleProtobufFileDescriptorSet { file: [GoogleProtobufFileDescriptorProto] } type GoogleProtobufFileDescriptorProto { - name: String! - package: String! - dependency: [String!] - publicDependency: [Int32!] - weakDependency: [Int32!] + name: String! + package: String! + dependency: [String!] + publicDependency: [Int32!] + weakDependency: [Int32!] messageType: [GoogleProtobufDescriptorProto] enumType: [GoogleProtobufEnumDescriptorProto] service: [GoogleProtobufServiceDescriptorProto] extension: [GoogleProtobufFieldDescriptorProto] options: GoogleProtobufFileOptions sourceCodeInfo: GoogleProtobufSourceCodeInfo - syntax: String! + syntax: String! } type GoogleProtobufDescriptorProtoExtensionRange { - start: Int32! - end: Int32! + start: Int32! + end: Int32! options: GoogleProtobufExtensionRangeOptions } type GoogleProtobufDescriptorProtoReservedRange { - start: Int32! - end: Int32! + start: Int32! + end: Int32! } type GoogleProtobufDescriptorProto { - name: String! + name: String! field: [GoogleProtobufFieldDescriptorProto] extension: [GoogleProtobufFieldDescriptorProto] nestedType: [GoogleProtobufDescriptorProto] @@ -59,7 +59,7 @@ type GoogleProtobufDescriptorProto { oneofDecl: [GoogleProtobufOneofDescriptorProto] options: GoogleProtobufMessageOptions reservedRange: [GoogleProtobufDescriptorProtoReservedRange] - reservedName: [String!] + reservedName: [String!] } type GoogleProtobufExtensionRangeOptions { uninterpretedOption: [GoogleProtobufUninterpretedOption] @@ -67,146 +67,146 @@ type GoogleProtobufExtensionRangeOptions { type GoogleProtobufFieldDescriptorProto { - name: String! - number: Int32! + name: String! + number: Int32! label: Enum type: Enum - typeName: String! - extendee: String! - defaultValue: String! - oneofIndex: Int32! - jsonName: String! + typeName: String! + extendee: String! + defaultValue: String! + oneofIndex: Int32! + jsonName: String! options: GoogleProtobufFieldOptions } type GoogleProtobufOneofDescriptorProto { - name: String! + name: String! options: GoogleProtobufOneofOptions } type GoogleProtobufEnumDescriptorProtoEnumReservedRange { - start: Int32! - end: Int32! + start: Int32! + end: Int32! } type GoogleProtobufEnumDescriptorProto { - name: String! + name: String! value: [GoogleProtobufEnumValueDescriptorProto] options: GoogleProtobufEnumOptions reservedRange: [GoogleProtobufEnumDescriptorProtoEnumReservedRange] - reservedName: [String!] + reservedName: [String!] } type GoogleProtobufEnumValueDescriptorProto { - name: String! - number: Int32! + name: String! + number: Int32! options: GoogleProtobufEnumValueOptions } type GoogleProtobufServiceDescriptorProto { - name: String! + name: String! method: [GoogleProtobufMethodDescriptorProto] options: GoogleProtobufServiceOptions } type GoogleProtobufMethodDescriptorProto { - name: String! - inputType: String! - outputType: String! + name: String! + inputType: String! + outputType: String! options: GoogleProtobufMethodOptions - clientStreaming: Bool! - serverStreaming: Bool! + clientStreaming: Bool! + serverStreaming: Bool! } type GoogleProtobufFileOptions { - javaPackage: String! - javaOuterClassname: String! - javaMultipleFiles: Bool! - javaGenerateEqualsAndHash: Bool! - javaStringCheckUtf8: Bool! + javaPackage: String! + javaOuterClassname: String! + javaMultipleFiles: Bool! + javaGenerateEqualsAndHash: Bool! + javaStringCheckUtf8: Bool! optimizeFor: Enum - goPackage: String! - ccGenericServices: Bool! - javaGenericServices: Bool! - pyGenericServices: Bool! - phpGenericServices: Bool! - deprecated: Bool! - ccEnableArenas: Bool! - objcClassPrefix: String! - csharpNamespace: String! - swiftPrefix: String! - phpClassPrefix: String! - phpNamespace: String! - phpMetadataNamespace: String! - rubyPackage: String! + goPackage: String! + ccGenericServices: Bool! + javaGenericServices: Bool! + pyGenericServices: Bool! + phpGenericServices: Bool! + deprecated: Bool! + ccEnableArenas: Bool! + objcClassPrefix: String! + csharpNamespace: String! + swiftPrefix: String! + phpClassPrefix: String! + phpNamespace: String! + phpMetadataNamespace: String! + rubyPackage: String! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufMessageOptions { - messageSetWireFormat: Bool! - noStandardDescriptorAccessor: Bool! - deprecated: Bool! - mapEntry: Bool! + messageSetWireFormat: Bool! + noStandardDescriptorAccessor: Bool! + deprecated: Bool! + mapEntry: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufFieldOptions { ctype: Enum - packed: Bool! + packed: Bool! jstype: Enum - lazy: Bool! - deprecated: Bool! - weak: Bool! + lazy: Bool! + deprecated: Bool! + weak: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufOneofOptions { uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufEnumOptions { - allowAlias: Bool! - deprecated: Bool! + allowAlias: Bool! + deprecated: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufEnumValueOptions { - deprecated: Bool! + deprecated: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufServiceOptions { - deprecated: Bool! + deprecated: Bool! uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufMethodOptions { - deprecated: Bool! + deprecated: Bool! idempotencyLevel: Enum uninterpretedOption: [GoogleProtobufUninterpretedOption] } type GoogleProtobufUninterpretedOptionNamePart { - namePart: String! - isExtension: Bool! + namePart: String! + isExtension: Bool! } type GoogleProtobufUninterpretedOption { name: [GoogleProtobufUninterpretedOptionNamePart] - identifierValue: String! - positiveIntValue: Uint64! - negativeIntValue: Int64! - doubleValue: Double! - stringValue: [Byte!], - aggregateValue: String! + identifierValue: String! + positiveIntValue: Uint64! + negativeIntValue: Int64! + doubleValue: Double! + stringValue: [Byte!] + aggregateValue: String! } type GoogleProtobufSourceCodeInfoLocation { - path: [Int32!] - span: [Int32!] - leadingComments: String! - trailingComments: String! - leadingDetachedComments: [String!] + path: [Int32!] + span: [Int32!] + leadingComments: String! + trailingComments: String! + leadingDetachedComments: [String!] } type GoogleProtobufSourceCodeInfo { location: [GoogleProtobufSourceCodeInfoLocation] } type GoogleProtobufGeneratedCodeInfoAnnotation { - path: [Int32!] - sourceFile: String! - begin: Int32! - end: Int32! + path: [Int32!] + sourceFile: String! + begin: Int32! + end: Int32! } type GoogleProtobufGeneratedCodeInfo { annotation: [GoogleProtobufGeneratedCodeInfoAnnotation] @@ -273,10 +273,10 @@ type BertyEntityDevice implements Node { id: ID! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp - name: String! + name: String! status: Enum - apiVersion: Uint32! - contactId: String! + apiVersion: Uint32! + contactId: String! } @@ -287,13 +287,13 @@ type BertyEntityContact implements Node { id: ID! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDevice] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! } @@ -304,8 +304,8 @@ type BertyEntityConversation implements Node { createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp readAt: GoogleProtobufTimestamp - title: String! - topic: String! + title: String! + topic: String! members: [BertyEntityConversationMember] } @@ -315,15 +315,15 @@ type BertyEntityConversationMember implements Node { updatedAt: GoogleProtobufTimestamp status: Enum contact: BertyEntityContact - conversationId: String! - contactId: String! + conversationId: String! + contactId: String! } type BertyEntityMessage { - text: String! + text: String! } @@ -331,15 +331,15 @@ type BertyEntityMessage { type BertyEntitySenderAlias { - id: String! + id: String! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp status: Enum - originDeviceId: String! - contactId: String! - conversationId: String! - aliasIdentifier: String! - used: Bool! + originDeviceId: String! + contactId: String! + conversationId: String! + aliasIdentifier: String! + used: Bool! } @@ -347,21 +347,21 @@ type BertyEntitySenderAlias { type BertyP2pSentAttrs { - ids: [String!] + ids: [String!] } type BertyP2pAckAttrs { - ids: [String!] - errMsg: String! + ids: [String!] + errMsg: String! } type BertyP2pPingAttrs { - T: Bool! + T: Bool! } type BertyP2pContactRequestAttrs { me: BertyEntityContact - introText: String! + introText: String! } type BertyP2pContactRequestAcceptedAttrs { - T: Bool! + T: Bool! } type BertyP2pContactShareMeAttrs { me: BertyEntityContact @@ -376,15 +376,15 @@ type BertyP2pConversationNewMessageAttrs { message: BertyEntityMessage } type BertyP2pDevtoolsMapsetAttrs { - key: String! - val: String! + key: String! + val: String! } type BertyP2pSenderAliasUpdateAttrs { aliases: [BertyEntitySenderAlias] } type BertyP2pNodeAttrs { - kind: Int32! - attributes: [Byte!], + kind: Int32! + attributes: [Byte!] } @@ -393,25 +393,48 @@ type BertyP2pNodeAttrs { type BertyP2pEvent implements Node { id: ID! - senderId: String! + senderId: String! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp sentAt: GoogleProtobufTimestamp receivedAt: GoogleProtobufTimestamp ackedAt: GoogleProtobufTimestamp direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! + senderApiVersion: Uint32! + receiverApiVersion: Uint32! + receiverId: String! kind: Enum - attributes: [Byte!], + attributes: [Byte!] conversationId: ID! seenAt: GoogleProtobufTimestamp metadata: [BertyP2pMetadataKeyValue] } type BertyP2pMetadataKeyValue { - key: String! - values: [String!] + key: String! + values: [String!] +} + + + + + +type BertyNodeNodeStartedAttrs { + T: Bool! +} +type BertyNodeNodeStoppedAttrs { + errMsg: String! +} +type BertyNodeNodeIsAliveAttrs { + T: Bool! +} +type BertyNodeBackgroundErrorAttrs { + errMsg: String! +} +type BertyNodeBackgroundWarnAttrs { + errMsg: String! +} +type BertyNodeDebugAttrs { + msg: String! } @@ -448,12 +471,18 @@ type BertyPkgDeviceinfoDeviceInfo { +type BertyNodeProtocolsOutput { + protocols: [String!] +} +type BertyNodeAppVersionOutput { + version: String! +} type BertyNodePingDestination { - destination: String! + destination: String! } type BertyNodeEventEdge { node: BertyP2pEvent - cursor: String! + cursor: String! } type BertyNodeEventListConnection { edges: [BertyNodeEventEdge] @@ -461,7 +490,7 @@ type BertyNodeEventListConnection { } type BertyNodeContactEdge { node: BertyEntityContact - cursor: String! + cursor: String! } type BertyNodeContactListConnection { edges: [BertyNodeContactEdge] @@ -469,36 +498,43 @@ type BertyNodeContactListConnection { } type BertyNodeConversationEdge { node: BertyEntityConversation - cursor: String! + cursor: String! } type BertyNodeConversationListConnection { edges: [BertyNodeConversationEdge] pageInfo: BertyNodePageInfo! } type BertyNodePagination { - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String } type BertyNodePageInfo { - startCursor: String! - endCursor: String! - hasNextPage: Bool! - hasPreviousPage: Bool! - count: Uint32! + startCursor: String! + endCursor: String! + hasNextPage: Bool! + hasPreviousPage: Bool! + count: Uint32! +} +type BertyNodeIntegrationTestOutput { + name: String! + success: Bool! + verbose: String! + startedAt: GoogleProtobufTimestamp + finishedAt: GoogleProtobufTimestamp } type BertyNodeVoid { - T: Bool! + T: Bool! } type BertyNodeLogEntry { - line: String! + line: String! } type BertyNodeLogfileEntry { - path: String! - filesize: Int32! + path: String! + filesize: Int32! createdAt: GoogleProtobufTimestamp updatedAt: GoogleProtobufTimestamp } @@ -512,94 +548,55 @@ type BertyNetworkPeerPayload { connection: Enum } input BertyP2pMetadataKeyValueInput { - key: String! - values: [String!] + key: String! + values: [String!] } input BertyP2pEventInput { id: ID! - senderId: String! + senderId: String! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput sentAt: GoogleProtobufTimestampInput receivedAt: GoogleProtobufTimestampInput ackedAt: GoogleProtobufTimestampInput direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! + senderApiVersion: Uint32! + receiverApiVersion: Uint32! + receiverId: String! kind: Enum - attributes: [Byte!], + attributes: [Byte!] conversationId: ID! seenAt: GoogleProtobufTimestampInput metadata: [BertyP2pMetadataKeyValueInput] } -type BertyP2pEventPayload { - id: ID! - senderId: String! - createdAt: GoogleProtobufTimestamp - updatedAt: GoogleProtobufTimestamp - sentAt: GoogleProtobufTimestamp - receivedAt: GoogleProtobufTimestamp - ackedAt: GoogleProtobufTimestamp - direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! - kind: Enum - attributes: [Byte!], - conversationId: ID! - seenAt: GoogleProtobufTimestamp - metadata: [BertyP2pMetadataKeyValue] -} input BertyNodePaginationInput { - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String } input BertyEntityDeviceInput { id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - name: String! + name: String! status: Enum - apiVersion: Uint32! - contactId: String! + apiVersion: Uint32! + contactId: String! } input BertyEntityContactInput { id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! -} -type BertyEntityContactPayload { - id: ID! - createdAt: GoogleProtobufTimestamp - updatedAt: GoogleProtobufTimestamp - sigchain: [Byte!], - status: Enum - devices: [BertyEntityDevice] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! -} -type BertyEntityConversationPayload { - id: ID! - createdAt: GoogleProtobufTimestamp - updatedAt: GoogleProtobufTimestamp - readAt: GoogleProtobufTimestamp - title: String! - topic: String! - members: [BertyEntityConversationMember] + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! } input BertyEntityConversationMemberInput { id: ID! @@ -607,16 +604,16 @@ input BertyEntityConversationMemberInput { updatedAt: GoogleProtobufTimestampInput status: Enum contact: BertyEntityContactInput - conversationId: String! - contactId: String! + conversationId: String! + contactId: String! } input BertyEntityConversationInput { id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput readAt: GoogleProtobufTimestampInput - title: String! - topic: String! + title: String! + topic: String! members: [BertyEntityConversationMemberInput] } input BertyEntityMessageInput { @@ -679,198 +676,174 @@ type Query { EventList( filter: BertyP2pEventInput onlyWithoutAckedAt: Enum - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String ): BertyNodeEventListConnection GetEvent( id: ID! - senderId: String! - createdAt: GoogleProtobufTimestampInput - updatedAt: GoogleProtobufTimestampInput - sentAt: GoogleProtobufTimestampInput - receivedAt: GoogleProtobufTimestampInput - ackedAt: GoogleProtobufTimestampInput - direction: Enum - senderApiVersion: Uint32! - receiverApiVersion: Uint32! - receiverId: String! - kind: Enum - attributes: [Byte!], - conversationId: ID! - seenAt: GoogleProtobufTimestampInput - metadata: [BertyP2pMetadataKeyValueInput] - ): BertyP2pEventPayload + ): BertyP2pEvent ContactList( filter: BertyEntityContactInput - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String ): BertyNodeContactListConnection - GetContact( - id: ID! - createdAt: GoogleProtobufTimestampInput - updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], - status: Enum - devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + Contact( + filter: BertyEntityContactInput + ): BertyEntityContact ConversationList( filter: BertyEntityConversationInput - orderBy: String! - orderDesc: Bool! - first: Int32 - after: String - last: Int32 - before: String + orderBy: String! + orderDesc: Bool! + first: Int32 + after: String + last: Int32 + before: String ): BertyNodeConversationListConnection - GetConversation( + Conversation( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput readAt: GoogleProtobufTimestampInput - title: String! - topic: String! + title: String! + topic: String! members: [BertyEntityConversationMemberInput] - ): BertyEntityConversationPayload - GetConversationMember( + ): BertyEntityConversation + ConversationMember( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput status: Enum contact: BertyEntityContactInput - conversationId: String! - contactId: String! - ): BertyEntityConversationMemberPayload + conversationId: String! + contactId: String! + ): BertyEntityConversationMember DeviceInfos( - T: Bool! - ): BertyPkgDeviceinfoDeviceInfosPayload + T: Bool! + ): BertyPkgDeviceinfoDeviceInfos AppVersion( - T: Bool! - ): BertyNodeAppVersionPayload + T: Bool! + ): BertyNodeAppVersionOutput Peers( T: Bool! ): BertyNetworkPeersPayload Protocols( - id: String! - addrs: [String!] + id: String! + addrs: [String!] connection: Enum - ): BertyNodeProtocolsPayload + ): BertyNodeProtocolsOutput LogfileList( - T: Bool! - ): [BertyNodeLogfileEntryPayload] + T: Bool! + ): [BertyNodeLogfileEntry] Panic( - T: Bool! - ): BertyNodeVoidPayload + T: Bool! + ): BertyNodeVoid } type Mutation { EventSeen( id: ID! - ): BertyP2pEventPayload + ): BertyP2pEvent ContactRequest( contact: BertyEntityContactInput - introText: String! - ): BertyEntityContactPayload + introText: String! + ): BertyEntityContact ContactAcceptRequest( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! + ): BertyEntityContact ContactRemove( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! + ): BertyEntityContact ContactUpdate( id: ID! createdAt: GoogleProtobufTimestampInput updatedAt: GoogleProtobufTimestampInput - sigchain: [Byte!], + sigchain: [Byte!] status: Enum devices: [BertyEntityDeviceInput] - displayName: String! - displayStatus: String! - overrideDisplayName: String! - overrideDisplayStatus: String! - ): BertyEntityContactPayload + displayName: String! + displayStatus: String! + overrideDisplayName: String! + overrideDisplayStatus: String! + ): BertyEntityContact ConversationCreate( contacts: [BertyEntityContactInput] - title: String! - topic: String! - ): BertyEntityConversationPayload + title: String! + topic: String! + ): BertyEntityConversation ConversationInvite( conversation: BertyEntityConversationInput members: [BertyEntityConversationMemberInput] - ): BertyEntityConversationPayload + ): BertyEntityConversation ConversationExclude( conversation: BertyEntityConversationInput members: [BertyEntityConversationMemberInput] - ): BertyEntityConversationPayload + ): BertyEntityConversation ConversationAddMessage( conversation: BertyEntityConversationInput message: BertyEntityMessageInput - ): BertyP2pEventPayload + ): BertyP2pEvent ConversationRead( id: ID! - ): BertyEntityConversationPayload + ): BertyEntityConversation GenerateFakeData( - T: Bool! - ): BertyNodeVoidPayload + T: Bool! + ): BertyNodeVoid RunIntegrationTests( - name: String! - ): BertyNodeIntegrationTestPayload + name: String! + ): BertyNodeIntegrationTestOutput DebugRequeueEvent( eventId: ID! - ): BertyP2pEventPayload + ): BertyP2pEvent DebugRequeueAll( - T: Bool! - ): BertyNodeVoidPayload + T: Bool! + ): BertyNodeVoid } type Subscription { EventStream( filter: BertyP2pEventInput - ): BertyP2pEventPayload + ): BertyP2pEvent LogStream( - continues: Bool! - logLevel: String! - namespaces: String! - last: Int32! - ): BertyNodeLogEntryPayload + continues: Bool! + logLevel: String! + namespaces: String! + last: Int32! + ): BertyNodeLogEntry LogfileRead( - path: String! - ): BertyNodeLogEntryPayload + path: String! + ): BertyNodeLogEntry MonitorBandwidth( - id: String - totalIn: Int64 - totalOut: Int64 - rateIn: Double - rateOut: Double + id: String + totalIn: Int64 + totalOut: Int64 + rateIn: Double + rateOut: Double type: Enum ): BertyNetworkBandwidthStatsPayload MonitorPeers( diff --git a/core/api/node/service.pb.go b/core/api/node/service.pb.go index 535d75d4d2..2335dcc8dd 100644 --- a/core/api/node/service.pb.go +++ b/core/api/node/service.pb.go @@ -7,7 +7,7 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import p2p "berty.tech/core/api/p2p" -import _ "berty.tech/core/api/protobuf/graphql" +import graphql "berty.tech/core/api/protobuf/graphql" import entity "berty.tech/core/entity" import network "berty.tech/core/network" import deviceinfo "berty.tech/core/pkg/deviceinfo" @@ -702,6 +702,53 @@ func (m *ContactListConnection) GetPageInfo() *PageInfo { return nil } +type ContactInput struct { + Filter *entity.Contact `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContactInput) Reset() { *m = ContactInput{} } +func (m *ContactInput) String() string { return proto.CompactTextString(m) } +func (*ContactInput) ProtoMessage() {} +func (*ContactInput) Descriptor() ([]byte, []int) { + return fileDescriptor_service_92eef75d9f02db36, []int{12} +} +func (m *ContactInput) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContactInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContactInput.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ContactInput) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContactInput.Merge(dst, src) +} +func (m *ContactInput) XXX_Size() int { + return m.Size() +} +func (m *ContactInput) XXX_DiscardUnknown() { + xxx_messageInfo_ContactInput.DiscardUnknown(m) +} + +var xxx_messageInfo_ContactInput proto.InternalMessageInfo + +func (m *ContactInput) GetFilter() *entity.Contact { + if m != nil { + return m.Filter + } + return nil +} + type ConversationListInput struct { Filter *entity.Conversation `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` Paginate *Pagination `protobuf:"bytes,99,opt,name=paginate" json:"paginate,omitempty"` @@ -1683,6 +1730,7 @@ func init() { proto.RegisterType((*ContactListInput)(nil), "berty.node.ContactListInput") proto.RegisterType((*ContactEdge)(nil), "berty.node.ContactEdge") proto.RegisterType((*ContactListConnection)(nil), "berty.node.ContactListConnection") + proto.RegisterType((*ContactInput)(nil), "berty.node.ContactInput") proto.RegisterType((*ConversationListInput)(nil), "berty.node.ConversationListInput") proto.RegisterType((*ConversationEdge)(nil), "berty.node.ConversationEdge") proto.RegisterType((*ConversationListConnection)(nil), "berty.node.ConversationListConnection") @@ -1720,21 +1768,22 @@ type ServiceClient interface { EventStream(ctx context.Context, in *EventStreamInput, opts ...grpc.CallOption) (Service_EventStreamClient, error) // list old events EventList(ctx context.Context, in *EventListInput, opts ...grpc.CallOption) (Service_EventListClient, error) - GetEvent(ctx context.Context, in *p2p.Event, opts ...grpc.CallOption) (*p2p.Event, error) - EventSeen(ctx context.Context, in *EventIDInput, opts ...grpc.CallOption) (*p2p.Event, error) + GetEvent(ctx context.Context, in *graphql.Node, opts ...grpc.CallOption) (*p2p.Event, error) + EventSeen(ctx context.Context, in *graphql.Node, opts ...grpc.CallOption) (*p2p.Event, error) ContactRequest(ctx context.Context, in *ContactRequestInput, opts ...grpc.CallOption) (*entity.Contact, error) ContactAcceptRequest(ctx context.Context, in *entity.Contact, opts ...grpc.CallOption) (*entity.Contact, error) ContactRemove(ctx context.Context, in *entity.Contact, opts ...grpc.CallOption) (*entity.Contact, error) ContactUpdate(ctx context.Context, in *entity.Contact, opts ...grpc.CallOption) (*entity.Contact, error) ContactList(ctx context.Context, in *ContactListInput, opts ...grpc.CallOption) (Service_ContactListClient, error) - GetContact(ctx context.Context, in *entity.Contact, opts ...grpc.CallOption) (*entity.Contact, error) + Contact(ctx context.Context, in *ContactInput, opts ...grpc.CallOption) (*entity.Contact, error) ConversationCreate(ctx context.Context, in *ConversationCreateInput, opts ...grpc.CallOption) (*entity.Conversation, error) ConversationList(ctx context.Context, in *ConversationListInput, opts ...grpc.CallOption) (Service_ConversationListClient, error) ConversationInvite(ctx context.Context, in *ConversationManageMembersInput, opts ...grpc.CallOption) (*entity.Conversation, error) ConversationExclude(ctx context.Context, in *ConversationManageMembersInput, opts ...grpc.CallOption) (*entity.Conversation, error) ConversationAddMessage(ctx context.Context, in *ConversationAddMessageInput, opts ...grpc.CallOption) (*p2p.Event, error) - GetConversation(ctx context.Context, in *entity.Conversation, opts ...grpc.CallOption) (*entity.Conversation, error) - GetConversationMember(ctx context.Context, in *entity.ConversationMember, opts ...grpc.CallOption) (*entity.ConversationMember, error) + Conversation(ctx context.Context, in *entity.Conversation, opts ...grpc.CallOption) (*entity.Conversation, error) + ConversationMember(ctx context.Context, in *entity.ConversationMember, opts ...grpc.CallOption) (*entity.ConversationMember, error) + ConversationRead(ctx context.Context, in *graphql.Node, opts ...grpc.CallOption) (*entity.Conversation, error) // HandleEvent is the unencrypted (and unsafe) version of HandleEnvelope. // it's only exposed over the node API, it should be completely deactivated in public releases HandleEvent(ctx context.Context, in *p2p.Event, opts ...grpc.CallOption) (*Void, error) @@ -1838,7 +1887,7 @@ func (x *serviceEventListClient) Recv() (*p2p.Event, error) { return m, nil } -func (c *serviceClient) GetEvent(ctx context.Context, in *p2p.Event, opts ...grpc.CallOption) (*p2p.Event, error) { +func (c *serviceClient) GetEvent(ctx context.Context, in *graphql.Node, opts ...grpc.CallOption) (*p2p.Event, error) { out := new(p2p.Event) err := c.cc.Invoke(ctx, "/berty.node.Service/GetEvent", in, out, opts...) if err != nil { @@ -1847,7 +1896,7 @@ func (c *serviceClient) GetEvent(ctx context.Context, in *p2p.Event, opts ...grp return out, nil } -func (c *serviceClient) EventSeen(ctx context.Context, in *EventIDInput, opts ...grpc.CallOption) (*p2p.Event, error) { +func (c *serviceClient) EventSeen(ctx context.Context, in *graphql.Node, opts ...grpc.CallOption) (*p2p.Event, error) { out := new(p2p.Event) err := c.cc.Invoke(ctx, "/berty.node.Service/EventSeen", in, out, opts...) if err != nil { @@ -1924,9 +1973,9 @@ func (x *serviceContactListClient) Recv() (*entity.Contact, error) { return m, nil } -func (c *serviceClient) GetContact(ctx context.Context, in *entity.Contact, opts ...grpc.CallOption) (*entity.Contact, error) { +func (c *serviceClient) Contact(ctx context.Context, in *ContactInput, opts ...grpc.CallOption) (*entity.Contact, error) { out := new(entity.Contact) - err := c.cc.Invoke(ctx, "/berty.node.Service/GetContact", in, out, opts...) + err := c.cc.Invoke(ctx, "/berty.node.Service/Contact", in, out, opts...) if err != nil { return nil, err } @@ -2001,18 +2050,27 @@ func (c *serviceClient) ConversationAddMessage(ctx context.Context, in *Conversa return out, nil } -func (c *serviceClient) GetConversation(ctx context.Context, in *entity.Conversation, opts ...grpc.CallOption) (*entity.Conversation, error) { +func (c *serviceClient) Conversation(ctx context.Context, in *entity.Conversation, opts ...grpc.CallOption) (*entity.Conversation, error) { out := new(entity.Conversation) - err := c.cc.Invoke(ctx, "/berty.node.Service/GetConversation", in, out, opts...) + err := c.cc.Invoke(ctx, "/berty.node.Service/Conversation", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *serviceClient) GetConversationMember(ctx context.Context, in *entity.ConversationMember, opts ...grpc.CallOption) (*entity.ConversationMember, error) { +func (c *serviceClient) ConversationMember(ctx context.Context, in *entity.ConversationMember, opts ...grpc.CallOption) (*entity.ConversationMember, error) { out := new(entity.ConversationMember) - err := c.cc.Invoke(ctx, "/berty.node.Service/GetConversationMember", in, out, opts...) + err := c.cc.Invoke(ctx, "/berty.node.Service/ConversationMember", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) ConversationRead(ctx context.Context, in *graphql.Node, opts ...grpc.CallOption) (*entity.Conversation, error) { + out := new(entity.Conversation) + err := c.cc.Invoke(ctx, "/berty.node.Service/ConversationRead", in, out, opts...) if err != nil { return nil, err } @@ -2286,21 +2344,22 @@ type ServiceServer interface { EventStream(*EventStreamInput, Service_EventStreamServer) error // list old events EventList(*EventListInput, Service_EventListServer) error - GetEvent(context.Context, *p2p.Event) (*p2p.Event, error) - EventSeen(context.Context, *EventIDInput) (*p2p.Event, error) + GetEvent(context.Context, *graphql.Node) (*p2p.Event, error) + EventSeen(context.Context, *graphql.Node) (*p2p.Event, error) ContactRequest(context.Context, *ContactRequestInput) (*entity.Contact, error) ContactAcceptRequest(context.Context, *entity.Contact) (*entity.Contact, error) ContactRemove(context.Context, *entity.Contact) (*entity.Contact, error) ContactUpdate(context.Context, *entity.Contact) (*entity.Contact, error) ContactList(*ContactListInput, Service_ContactListServer) error - GetContact(context.Context, *entity.Contact) (*entity.Contact, error) + Contact(context.Context, *ContactInput) (*entity.Contact, error) ConversationCreate(context.Context, *ConversationCreateInput) (*entity.Conversation, error) ConversationList(*ConversationListInput, Service_ConversationListServer) error ConversationInvite(context.Context, *ConversationManageMembersInput) (*entity.Conversation, error) ConversationExclude(context.Context, *ConversationManageMembersInput) (*entity.Conversation, error) ConversationAddMessage(context.Context, *ConversationAddMessageInput) (*p2p.Event, error) - GetConversation(context.Context, *entity.Conversation) (*entity.Conversation, error) - GetConversationMember(context.Context, *entity.ConversationMember) (*entity.ConversationMember, error) + Conversation(context.Context, *entity.Conversation) (*entity.Conversation, error) + ConversationMember(context.Context, *entity.ConversationMember) (*entity.ConversationMember, error) + ConversationRead(context.Context, *graphql.Node) (*entity.Conversation, error) // HandleEvent is the unencrypted (and unsafe) version of HandleEnvelope. // it's only exposed over the node API, it should be completely deactivated in public releases HandleEvent(context.Context, *p2p.Event) (*Void, error) @@ -2388,7 +2447,7 @@ func (x *serviceEventListServer) Send(m *p2p.Event) error { } func _Service_GetEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(p2p.Event) + in := new(graphql.Node) if err := dec(in); err != nil { return nil, err } @@ -2400,13 +2459,13 @@ func _Service_GetEvent_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: "/berty.node.Service/GetEvent", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetEvent(ctx, req.(*p2p.Event)) + return srv.(ServiceServer).GetEvent(ctx, req.(*graphql.Node)) } return interceptor(ctx, in, info, handler) } func _Service_EventSeen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EventIDInput) + in := new(graphql.Node) if err := dec(in); err != nil { return nil, err } @@ -2418,7 +2477,7 @@ func _Service_EventSeen_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: "/berty.node.Service/EventSeen", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).EventSeen(ctx, req.(*EventIDInput)) + return srv.(ServiceServer).EventSeen(ctx, req.(*graphql.Node)) } return interceptor(ctx, in, info, handler) } @@ -2516,20 +2575,20 @@ func (x *serviceContactListServer) Send(m *entity.Contact) error { return x.ServerStream.SendMsg(m) } -func _Service_GetContact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(entity.Contact) +func _Service_Contact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContactInput) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ServiceServer).GetContact(ctx, in) + return srv.(ServiceServer).Contact(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/berty.node.Service/GetContact", + FullMethod: "/berty.node.Service/Contact", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetContact(ctx, req.(*entity.Contact)) + return srv.(ServiceServer).Contact(ctx, req.(*ContactInput)) } return interceptor(ctx, in, info, handler) } @@ -2627,38 +2686,56 @@ func _Service_ConversationAddMessage_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -func _Service_GetConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Service_Conversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(entity.Conversation) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ServiceServer).GetConversation(ctx, in) + return srv.(ServiceServer).Conversation(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/berty.node.Service/GetConversation", + FullMethod: "/berty.node.Service/Conversation", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetConversation(ctx, req.(*entity.Conversation)) + return srv.(ServiceServer).Conversation(ctx, req.(*entity.Conversation)) } return interceptor(ctx, in, info, handler) } -func _Service_GetConversationMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Service_ConversationMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(entity.ConversationMember) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ServiceServer).GetConversationMember(ctx, in) + return srv.(ServiceServer).ConversationMember(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.node.Service/ConversationMember", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).ConversationMember(ctx, req.(*entity.ConversationMember)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_ConversationRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(graphql.Node) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).ConversationRead(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/berty.node.Service/GetConversationMember", + FullMethod: "/berty.node.Service/ConversationRead", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetConversationMember(ctx, req.(*entity.ConversationMember)) + return srv.(ServiceServer).ConversationRead(ctx, req.(*graphql.Node)) } return interceptor(ctx, in, info, handler) } @@ -2999,8 +3076,8 @@ var _Service_serviceDesc = grpc.ServiceDesc{ Handler: _Service_ContactUpdate_Handler, }, { - MethodName: "GetContact", - Handler: _Service_GetContact_Handler, + MethodName: "Contact", + Handler: _Service_Contact_Handler, }, { MethodName: "ConversationCreate", @@ -3019,12 +3096,16 @@ var _Service_serviceDesc = grpc.ServiceDesc{ Handler: _Service_ConversationAddMessage_Handler, }, { - MethodName: "GetConversation", - Handler: _Service_GetConversation_Handler, + MethodName: "Conversation", + Handler: _Service_Conversation_Handler, + }, + { + MethodName: "ConversationMember", + Handler: _Service_ConversationMember_Handler, }, { - MethodName: "GetConversationMember", - Handler: _Service_GetConversationMember_Handler, + MethodName: "ConversationRead", + Handler: _Service_ConversationRead_Handler, }, { MethodName: "HandleEvent", @@ -3575,7 +3656,7 @@ func (m *ContactListConnection) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ConversationListInput) Marshal() (dAtA []byte, err error) { +func (m *ContactInput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -3585,7 +3666,7 @@ func (m *ConversationListInput) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ConversationListInput) MarshalTo(dAtA []byte) (int, error) { +func (m *ContactInput) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -3600,17 +3681,48 @@ func (m *ConversationListInput) MarshalTo(dAtA []byte) (int, error) { } i += n13 } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ConversationListInput) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConversationListInput) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Filter != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintService(dAtA, i, uint64(m.Filter.Size())) + n14, err := m.Filter.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } if m.Paginate != nil { dAtA[i] = 0x9a i++ dAtA[i] = 0x6 i++ i = encodeVarintService(dAtA, i, uint64(m.Paginate.Size())) - n14, err := m.Paginate.MarshalTo(dAtA[i:]) + n15, err := m.Paginate.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n15 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -3637,11 +3749,11 @@ func (m *ConversationEdge) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintService(dAtA, i, uint64(m.Node.Size())) - n15, err := m.Node.MarshalTo(dAtA[i:]) + n16, err := m.Node.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n16 } if len(m.Cursor) > 0 { dAtA[i] = 0x12 @@ -3688,11 +3800,11 @@ func (m *ConversationListConnection) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x6 i++ i = encodeVarintService(dAtA, i, uint64(m.PageInfo.Size())) - n16, err := m.PageInfo.MarshalTo(dAtA[i:]) + n17, err := m.PageInfo.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n17 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -3764,11 +3876,11 @@ func (m *ConversationManageMembersInput) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintService(dAtA, i, uint64(m.Conversation.Size())) - n17, err := m.Conversation.MarshalTo(dAtA[i:]) + n18, err := m.Conversation.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n18 } if len(m.Members) > 0 { for _, msg := range m.Members { @@ -3972,19 +4084,19 @@ func (m *IntegrationTestOutput) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintService(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt))) - n18, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i:]) + n19, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n19 dAtA[i] = 0x2a i++ i = encodeVarintService(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.FinishedAt))) - n19, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.FinishedAt, dAtA[i:]) + n20, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.FinishedAt, dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n20 if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -4154,21 +4266,21 @@ func (m *LogfileEntry) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintService(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt))) - n20, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i:]) + n21, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n21 } if m.UpdatedAt != nil { dAtA[i] = 0x22 i++ i = encodeVarintService(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt))) - n21, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdatedAt, dAtA[i:]) + n22, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdatedAt, dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n22 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -4477,6 +4589,22 @@ func (m *ContactListConnection) Size() (n int) { return n } +func (m *ContactInput) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Filter != nil { + l = m.Filter.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *ConversationListInput) Size() (n int) { if m == nil { return 0 @@ -6103,6 +6231,90 @@ func (m *ContactListConnection) Unmarshal(dAtA []byte) error { } return nil } +func (m *ContactInput) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContactInput: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContactInput: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Filter == nil { + m.Filter = &entity.Contact{} + } + if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ConversationListInput) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/core/crypto/keypair/keypair.pb.go b/core/crypto/keypair/keypair.pb.go index 3c0f5c452c..1e223643ca 100644 --- a/core/crypto/keypair/keypair.pb.go +++ b/core/crypto/keypair/keypair.pb.go @@ -67,9 +67,9 @@ var PublicKeyAlgorithm_name = map[int32]string{ } var PublicKeyAlgorithm_value = map[string]int32{ "UNKNOWN_PUBLIC_KEY_ALGORITHM": 0, - "RSA": 1, - "DSA": 2, - "ECDSA": 3, + "RSA": 1, + "DSA": 2, + "ECDSA": 3, } func (x PublicKeyAlgorithm) String() string {