diff --git a/graphql/fragments/profile.graphql b/graphql/fragments/profile.graphql new file mode 100644 index 0000000..07053a0 --- /dev/null +++ b/graphql/fragments/profile.graphql @@ -0,0 +1,21 @@ +fragment ProfileFields on Profile { + id + description + displayName + tagline + url + type + tagset { + tags + } + references { + description + name + uri + } + visuals { + uri + name + } +} + diff --git a/graphql/fragments/space-ingest.graphql b/graphql/fragments/space-ingest.graphql index fe0bd9b..1c7ee64 100644 --- a/graphql/fragments/space-ingest.graphql +++ b/graphql/fragments/space-ingest.graphql @@ -36,6 +36,7 @@ fragment SpaceIngest on Space { id nameID type + visibility comments { messagesCount messages { @@ -58,43 +59,26 @@ fragment SpaceIngest on Space { } } framing { + id profile { - description - displayName - tagline - url - tagset { - tags - } - references { - description - name - uri - } - visuals { - uri - name - } + ...ProfileFields } } contributions { + post { + id + nameID + profile { + ...ProfileFields + } + } link { + id uri profile { - description - displayName - url - type - references { - description - name - uri - } - visuals { - uri - name - } + ...ProfileFields } + } } } diff --git a/src/callout.handlers/base.ts b/src/callout.handlers/base.ts index 01316c0..7e26501 100644 --- a/src/callout.handlers/base.ts +++ b/src/callout.handlers/base.ts @@ -1,4 +1,4 @@ -import { Callout } from '../generated/graphql'; +import { Callout, CalloutContribution } from '../generated/graphql'; import { Document } from 'langchain/document'; import generateDocument from '../generate.document'; @@ -6,24 +6,11 @@ export const baseHandler = async ( callout: Partial ): Promise => { const { id: documentId, type } = callout; + const generated = generateDocument(callout.framing); const { title, source } = generated; let pageContent = generated.pageContent; - // extra loop but will do for now - const contributions = callout.contributions - ?.filter((article: any) => !!article.link) - .map((contribution: any) => { - const { pageContent: contribArticle } = generateDocument( - contribution.link - ); - return contribArticle; - }) - .join('\n'); - - if (contributions) - pageContent = `${pageContent}\nContributions:\n${contributions}`; - const messages = callout.comments?.messages || []; const processedMessages: string[] = []; for (let i = 0; i < messages.length; i++) { @@ -44,7 +31,7 @@ export const baseHandler = async ( if (processedMessages.length) pageContent = `${pageContent}\nMessages:\n${processedMessages.join('\n')}`; - return [ + const result: Document[] = [ new Document({ pageContent, metadata: { @@ -55,4 +42,31 @@ export const baseHandler = async ( }, }), ]; + + // extra loop but will do for now + callout.contributions + ?.map((contribution: Partial) => { + let docLike; + if (!!contribution.link) { + docLike = contribution.link; + } else if (!!contribution.post) { + docLike = contribution.post; + } + const { pageContent, documentId, source, type, title } = + generateDocument(docLike); + result.push( + new Document({ + pageContent, + metadata: { + documentId, + source, + type, + title, + }, + }) + ); + }) + .join('\n'); + + return result; }; diff --git a/src/generate.document.ts b/src/generate.document.ts index f01abc4..571c936 100644 --- a/src/generate.document.ts +++ b/src/generate.document.ts @@ -1,3 +1,4 @@ +import { Reference, Visual } from './generated/graphql'; import { DocumentType, mapType } from './document.type'; interface GeneratedDocument { @@ -8,6 +9,7 @@ interface GeneratedDocument { title: string; } +//TODO type this pls export default (docLike: any): GeneratedDocument => { const { id: documentId, @@ -21,9 +23,11 @@ export default (docLike: any): GeneratedDocument => { displayName, location, visuals, + type: profileType, }, context, } = docLike; + const { vision, impact, who } = context || {}; const { city, country, postalCode } = location || {}; @@ -37,7 +41,7 @@ export default (docLike: any): GeneratedDocument => { if (who) pageContent = `${pageContent}\nWho: ${who}`; const processedVisuals = visuals - .map((visual: any) => `\t${visual.name}: ${visual.uri}`) + .map((visual: Visual) => `\t${visual.name}: ${visual.uri}`) .join('\n'); if (processedVisuals) pageContent = `${pageContent}\nVisuals: ${processedVisuals}`; @@ -46,7 +50,7 @@ export default (docLike: any): GeneratedDocument => { pageContent = `${pageContent}\nLocation: ${postalCode} ${city} ${country}`; const processedRefs = references.map( - ({ description, name, uri }: any) => + ({ description, name, uri }: Reference) => `\tReference name: ${name}\n\tReference description: ${description}\n\tUri: ${uri}\n` ); if (processedRefs) @@ -56,7 +60,7 @@ export default (docLike: any): GeneratedDocument => { return { documentId, source, - type: mapType(type), + type: mapType(type ?? profileType), pageContent, title: displayName, }; diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index 8595b7c..0ab7d85 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -419,8 +419,10 @@ export type ActivityLogEntryMemberJoined = ActivityLogEntry & { collaborationID: Scalars['UUID']; /** The community that was joined. */ community: Community; - /** The type of the the Community. */ - communityType: Scalars['String']; + /** The Contributor that joined the Community. */ + contributor: Contributor; + /** The type of the Contributor that joined the Community. */ + contributorType: CommunityContributorType; /** The timestamp for the Activity. */ createdDate: Scalars['DateTime']; /** The text details for this Activity. */ @@ -436,8 +438,6 @@ export type ActivityLogEntryMemberJoined = ActivityLogEntry & { triggeredBy: User; /** The event type for this Activity. */ type: ActivityEventType; - /** The User that joined the Community. */ - user: User; }; export type ActivityLogEntryOpportunityCreated = ActivityLogEntry & { @@ -559,8 +559,12 @@ export type AgentBeginVerifiedCredentialRequestOutput = { export type AiPersona = { /** The authorization rules for the entity */ authorization?: Maybe; - /** The type of knowledge provided by this AI Persona. */ - bodyOfKnowledgeType: AiPersonaBodyOfKnowledgeType; + /** A overview of knowledge provided by this AI Persona. */ + bodyOfKnowledge: Scalars['Markdown']; + /** The body of knowledge ID used for the AI Persona. */ + bodyOfKnowledgeID?: Maybe; + /** The body of knowledge type used for the AI Persona. */ + bodyOfKnowledgeType?: Maybe; /** The type of context sharing that are supported by this AI Persona when used. */ dataAccessMode: AiPersonaDataAccessMode; /** The description for this AI Persona. */ @@ -592,24 +596,6 @@ export enum AiPersonaInteractionMode { DiscussionTagging = 'DISCUSSION_TAGGING', } -export type AiPersonaQuestionInput = { - /** Virtual Persona Type. */ - aiPersonaID: Scalars['UUID']; - /** The question that is being asked. */ - question: Scalars['String']; -}; - -export type AiPersonaResult = { - /** The answer to the question */ - answer: Scalars['String']; - /** The id of the answer; null if an error was returned */ - id?: Maybe; - /** The original question */ - question: Scalars['String']; - /** The sources used to answer the question */ - sources?: Maybe>; -}; - export type AiPersonaService = { /** The authorization rules for the entity */ authorization?: Maybe; @@ -638,24 +624,13 @@ export type AiPersonaServiceQuestionInput = { question: Scalars['String']; }; -export type AiPersonaServiceResult = { - /** The answer to the question */ - answer: Scalars['String']; - /** The id of the answer; null if an error was returned */ - id?: Maybe; - /** The original question */ - question: Scalars['String']; - /** The sources used to answer the question */ - sources?: Maybe>; -}; - export type AiServer = { /** A particular AiPersonaService */ aiPersonaService: AiPersonaService; /** The AiPersonaServices on this aiServer */ aiPersonaServices: Array; /** Ask the virtual persona engine for guidance. */ - askAiPersonaServiceQuestion: AiPersonaServiceResult; + askAiPersonaServiceQuestion: MessageAnswerQuestion; /** The authorization rules for the entity */ authorization?: Maybe; /** The default AiPersonaService in use on the aiServer. */ @@ -672,8 +647,6 @@ export type AiServerAskAiPersonaServiceQuestionArgs = { chatData: AiPersonaServiceQuestionInput; }; -export type AnyInvitation = Invitation | InvitationExternal; - export type Application = { /** The authorization rules for the entity */ authorization?: Maybe; @@ -791,6 +764,7 @@ export enum AuthorizationCredential { SpaceSubspaceAdmin = 'SPACE_SUBSPACE_ADMIN', UserGroupMember = 'USER_GROUP_MEMBER', UserSelfManagement = 'USER_SELF_MANAGEMENT', + VcCampaign = 'VC_CAMPAIGN', } export type AuthorizationPolicyRuleCredential = { @@ -1085,17 +1059,6 @@ export type ChatGuidanceInput = { question: Scalars['String']; }; -export type ChatGuidanceResult = { - /** The answer to the question */ - answer: Scalars['String']; - /** The id of the answer; null if an error was returned */ - id?: Maybe; - /** The original question */ - question: Scalars['String']; - /** The sources used to answer the question */ - sources?: Maybe>; -}; - export type Collaboration = { /** The authorization rules for the entity */ authorization?: Maybe; @@ -1242,8 +1205,6 @@ export type Community = Groupable & { id: Scalars['UUID']; /** Invitations for this community. */ invitations: Array; - /** Invitations to join this Community for users not yet on the Alkemio platform. */ - invitationsExternal: Array; /** All users that are contributing to this Community. */ memberUsers: Array; /** The membership status of the currently logged in user. */ @@ -1254,6 +1215,8 @@ export type Community = Groupable & { myRolesImplicit: Array; /** All Organizations that have the specified Role in this Community. */ organizationsInRole: Array; + /** Invitations to join this Community for users not yet on the Alkemio platform. */ + platformInvitations: Array; /** The policy that defines the roles for this Community. */ policy: CommunityPolicy; /** All users that have the specified Role in this Community. */ @@ -1558,6 +1521,7 @@ export type CreateActorInput = { export type CreateAiPersonaInput = { aiPersonaService?: InputMaybe; aiPersonaServiceID?: InputMaybe; + bodyOfKnowledge?: InputMaybe; description?: InputMaybe; }; @@ -1716,14 +1680,6 @@ export type CreateInvitationForContributorsOnCommunityInput = { welcomeMessage?: InputMaybe; }; -export type CreateInvitationUserByEmailOnCommunityInput = { - communityID: Scalars['UUID']; - email: Scalars['String']; - firstName?: InputMaybe; - lastName?: InputMaybe; - welcomeMessage?: InputMaybe; -}; - export type CreateLicensePlanOnLicensingInput = { /** Assign this plan to all new Organization accounts */ assignToNewOrganizationAccounts: Scalars['Boolean']; @@ -1782,6 +1738,22 @@ export type CreateOrganizationInput = { website?: InputMaybe; }; +export type CreatePlatformInvitationForRoleInput = { + email: Scalars['String']; + firstName?: InputMaybe; + lastName?: InputMaybe; + platformRole: PlatformRole; + welcomeMessage?: InputMaybe; +}; + +export type CreatePlatformInvitationOnCommunityInput = { + communityID: Scalars['UUID']; + email: Scalars['String']; + firstName?: InputMaybe; + lastName?: InputMaybe; + welcomeMessage?: InputMaybe; +}; + export type CreatePostInput = { /** A readable identifier, unique within the containing scope. */ nameID?: InputMaybe; @@ -1975,6 +1947,7 @@ export enum CredentialType { SpaceSubspaceAdmin = 'SPACE_SUBSPACE_ADMIN', UserGroupMember = 'USER_GROUP_MEMBER', UserSelfManagement = 'USER_SELF_MANAGEMENT', + VcCampaign = 'VC_CAMPAIGN', } export type DeleteActorGroupInput = { @@ -2033,10 +2006,6 @@ export type DeleteInnovationPackInput = { ID: Scalars['UUID_NAMEID']; }; -export type DeleteInvitationExternalInput = { - ID: Scalars['UUID']; -}; - export type DeleteInvitationInput = { ID: Scalars['UUID']; }; @@ -2053,6 +2022,10 @@ export type DeleteOrganizationInput = { ID: Scalars['UUID_NAMEID']; }; +export type DeletePlatformInvitationInput = { + ID: Scalars['UUID']; +}; + export type DeletePostInput = { ID: Scalars['UUID']; }; @@ -2293,13 +2266,6 @@ export type ISearchResults = { journeyResultsCount: Scalars['Float']; }; -export type IngestSpaceInput = { - /** The purpose of the ingestions - either knowledge or context. */ - purpose: SpaceIngestionPurpose; - /** The identifier for the Space to be ingested. */ - spaceID: Scalars['UUID']; -}; - export type InnovationFlow = { /** The authorization rules for the entity */ authorization?: Maybe; @@ -2408,25 +2374,6 @@ export type InvitationEventInput = { invitationID: Scalars['UUID']; }; -export type InvitationExternal = { - /** The authorization rules for the entity */ - authorization?: Maybe; - /** The User who triggered the invitationExternal. */ - createdBy: User; - createdDate: Scalars['DateTime']; - /** The email address of the external user being invited */ - email: Scalars['String']; - firstName: Scalars['String']; - /** The ID of the entity */ - id: Scalars['UUID']; - /** Whether to also add the invited user to the parent community. */ - invitedToParent: Scalars['Boolean']; - lastName: Scalars['String']; - /** Whether a new user profile has been created. */ - profileCreated: Scalars['Boolean']; - welcomeMessage?: Maybe; -}; - export type LatestReleaseDiscussion = { /** Id of the latest release discussion. */ id: Scalars['String']; @@ -2777,6 +2724,26 @@ export type Message = { timestamp: Scalars['Float']; }; +/** A detailed answer to a question, typically from an AI service. */ +export type MessageAnswerQuestion = { + /** The answer to the question */ + answer: Scalars['String']; + /** The id of the answer; null if an error was returned */ + id?: Maybe; + /** The original question */ + question: Scalars['String']; + /** The sources used to answer the question */ + sources?: Maybe>; +}; + +/** A source used in a detailed answer to a question. */ +export type MessageAnswerToQuestionSource = { + /** The title of the source */ + title?: Maybe; + /** The URI of the source */ + uri?: Maybe; +}; + export type Metadata = { /** Collection of metadata about Alkemio services. */ services: Array; @@ -2874,8 +2841,6 @@ export type Mutation = { convertChallengeToSpace: Space; /** Creates a new Challenge by converting an existing Opportunity. */ convertOpportunityToChallenge: Space; - /** Copies collections nameID-... into UUID-... */ - copyCollections: MigrateEmbeddings; /** Creates a new Account with a single root Space. */ createAccount: Account; /** Creates a new Actor in the specified ActorGroup. */ @@ -2952,14 +2917,14 @@ export type Mutation = { deleteInnovationPack: InnovationPack; /** Removes the specified User invitation. */ deleteInvitation: Invitation; - /** Removes the specified User invitationExternal. */ - deleteInvitationExternal: InvitationExternal; /** Deletes the specified LicensePlan. */ deleteLicensePlan: LicensePlan; /** Deletes the specified Link. */ deleteLink: Link; /** Deletes the specified Organization. */ deleteOrganization: Organization; + /** Removes the specified User platformInvitation. */ + deletePlatformInvitation: PlatformInvitation; /** Deletes the specified Post. */ deletePost: Post; /** Deletes the specified PostTemplate. */ @@ -2996,18 +2961,20 @@ export type Mutation = { grantCredentialToUser: User; /** Resets the interaction with the chat engine. */ ingest: Scalars['Boolean']; - /** Triggers space ingestion. */ - ingestSpace: Space; /** Invite an existing Contriburor to join the specified Community as a member. */ inviteContributorsForCommunityMembership: Array; - /** Invite an external User to join the specified Community as a member. */ - inviteForCommunityMembershipByEmail: AnyInvitation; + /** Invite a User to join the platform and the specified Community as a member. */ + inviteUserToPlatformAndCommunity: PlatformInvitation; + /** Invite a User to join the platform in a particular Platform role e.g. BetaTester */ + inviteUserToPlatformWithRole: PlatformInvitation; /** Join the specified Community as a member, without going through an approval process. */ joinCommunity: Community; /** Sends a message on the specified User`s behalf and returns the room id */ messageUser: Scalars['String']; /** Moves the specified Contribution to another Callout. */ moveContributionToCallout: CalloutContribution; + /** Triggers a request to the backing AI Service to refresh the knowledge that is available to it. */ + refreshVirtualContributorBodyOfKnowledge: Scalars['Boolean']; /** Removes an Organization from a Role in the specified Community. */ removeCommunityRoleFromOrganization: Organization; /** Removes a User from a Role in the specified Community. */ @@ -3393,10 +3360,6 @@ export type MutationDeleteInvitationArgs = { deleteData: DeleteInvitationInput; }; -export type MutationDeleteInvitationExternalArgs = { - deleteData: DeleteInvitationExternalInput; -}; - export type MutationDeleteLicensePlanArgs = { deleteData: DeleteLicensePlanInput; }; @@ -3409,6 +3372,10 @@ export type MutationDeleteOrganizationArgs = { deleteData: DeleteOrganizationInput; }; +export type MutationDeletePlatformInvitationArgs = { + deleteData: DeletePlatformInvitationInput; +}; + export type MutationDeletePostArgs = { deleteData: DeletePostInput; }; @@ -3477,16 +3444,16 @@ export type MutationGrantCredentialToUserArgs = { grantCredentialData: GrantAuthorizationCredentialInput; }; -export type MutationIngestSpaceArgs = { - ingestSpaceData: IngestSpaceInput; -}; - export type MutationInviteContributorsForCommunityMembershipArgs = { invitationData: CreateInvitationForContributorsOnCommunityInput; }; -export type MutationInviteForCommunityMembershipByEmailArgs = { - invitationData: CreateInvitationUserByEmailOnCommunityInput; +export type MutationInviteUserToPlatformAndCommunityArgs = { + invitationData: CreatePlatformInvitationOnCommunityInput; +}; + +export type MutationInviteUserToPlatformWithRoleArgs = { + invitationData: CreatePlatformInvitationForRoleInput; }; export type MutationJoinCommunityArgs = { @@ -3501,6 +3468,10 @@ export type MutationMoveContributionToCalloutArgs = { moveContributionData: MoveCalloutContributionInput; }; +export type MutationRefreshVirtualContributorBodyOfKnowledgeArgs = { + refreshData: RefreshVirtualContributorBodyOfKnowledgeInput; +}; + export type MutationRemoveCommunityRoleFromOrganizationArgs = { roleData: RemoveCommunityRoleFromOrganizationInput; }; @@ -3942,6 +3913,8 @@ export type Platform = { licensing: Licensing; /** Alkemio Services Metadata. */ metadata: Metadata; + /** Invitations to join roles for users not yet on the Alkemio platform. */ + platformInvitations: Array; /** The StorageAggregator with documents in use by Users + Organizations on the Platform. */ storageAggregator: StorageAggregator; }; @@ -3969,6 +3942,27 @@ export enum PlatformFeatureFlagName { Whiteboards = 'WHITEBOARDS', } +export type PlatformInvitation = { + /** The authorization rules for the entity */ + authorization?: Maybe; + /** Whether to also add the invited user to the parent community. */ + communityInvitedToParent: Scalars['Boolean']; + /** The User who triggered the platformInvitation. */ + createdBy: User; + createdDate: Scalars['DateTime']; + /** The email address of the external user being invited */ + email: Scalars['String']; + firstName: Scalars['String']; + /** The ID of the entity */ + id: Scalars['UUID']; + lastName: Scalars['String']; + /** The platform role the user will receive when they sign up */ + platformRole?: Maybe; + /** Whether a new user profile has been created. */ + profileCreated: Scalars['Boolean']; + welcomeMessage?: Maybe; +}; + export type PlatformLocations = { /** URL to a page about the platform */ about: Scalars['String']; @@ -4027,6 +4021,7 @@ export enum PlatformRole { LicenseManager = 'LICENSE_MANAGER', SpacesReader = 'SPACES_READER', Support = 'SUPPORT', + VcCampaign = 'VC_CAMPAIGN', } export type Post = { @@ -4214,10 +4209,10 @@ export type Query = { adminCommunicationOrphanedUsage: CommunicationAdminOrphanedUsageResult; /** Alkemio AiServer */ aiServer: AiServer; - /** Ask the virtual persona engine for guidance. */ - askAiPersonaQuestion: AiPersonaResult; /** Ask the chat engine for guidance. */ - askChatGuidanceQuestion: ChatGuidanceResult; + askChatGuidanceQuestion: MessageAnswerQuestion; + /** Ask the virtual contributor a question directly. */ + askVirtualContributorQuestion: MessageAnswerQuestion; /** Get supported credential metadata */ getSupportedVerifiedCredentialMetadata: Array; /** Allow direct lookup of entities from the domain model */ @@ -4290,14 +4285,14 @@ export type QueryAdminCommunicationMembershipArgs = { communicationData: CommunicationAdminMembershipInput; }; -export type QueryAskAiPersonaQuestionArgs = { - chatData: AiPersonaQuestionInput; -}; - export type QueryAskChatGuidanceQuestionArgs = { chatData: ChatGuidanceInput; }; +export type QueryAskVirtualContributorQuestionArgs = { + chatData: VirtualContributorQuestionInput; +}; + export type QueryOrganizationArgs = { ID: Scalars['UUID_NAMEID']; }; @@ -4426,6 +4421,11 @@ export type Reference = { uri: Scalars['String']; }; +export type RefreshVirtualContributorBodyOfKnowledgeInput = { + /** The ID of the Virtual Contributor to update. */ + virtualContributorID: Scalars['UUID']; +}; + export type Relation = { actorName: Scalars['String']; actorRole: Scalars['String']; @@ -4582,6 +4582,8 @@ export type RolesResultCommunity = { displayName: Scalars['String']; /** A unique identifier for this membership result. */ id: Scalars['String']; + /** The level of the Space e.g. space/challenge/opportunity. */ + level: Scalars['Float']; /** Name Identifier of the entity */ nameID: Scalars['NameID']; /** The roles held by the contributor */ @@ -4610,6 +4612,8 @@ export type RolesResultSpace = { displayName: Scalars['String']; /** A unique identifier for this membership result. */ id: Scalars['String']; + /** The level of the Space e.g. space/challenge/opportunity. */ + level: Scalars['Float']; /** Name Identifier of the entity */ nameID: Scalars['NameID']; /** The roles held by the contributor */ @@ -4848,13 +4852,6 @@ export type ServiceMetadata = { version?: Maybe; }; -export type Source = { - /** The title of the source */ - title?: Maybe; - /** The URI of the source */ - uri?: Maybe; -}; - export type Space = { /** The Account that this Space is part of. */ account: Account; @@ -4916,11 +4913,6 @@ export type SpaceFilterInput = { visibilities?: InputMaybe>; }; -export enum SpaceIngestionPurpose { - Context = 'CONTEXT', - Knowledge = 'KNOWLEDGE', -} - export enum SpaceLevel { Challenge = 'CHALLENGE', Opportunity = 'OPPORTUNITY', @@ -5917,7 +5909,7 @@ export type VirtualContributor = Contributor & { /** The Agent representing this User. */ agent: Agent; /** The AI persona being used by this virtual contributor */ - aiPersona: AiPersona; + aiPersona?: Maybe; /** The authorization rules for the Contributor */ authorization?: Maybe; /** The ID of the Contributor */ @@ -5934,6 +5926,13 @@ export type VirtualContributor = Contributor & { storageAggregator?: Maybe; }; +export type VirtualContributorQuestionInput = { + /** The question that is being asked. */ + question: Scalars['String']; + /** Virtual Contributor to be asked. */ + virtualContributorID: Scalars['UUID']; +}; + export type Visual = { allowedTypes: Array; alternativeText?: Maybe; @@ -6163,16 +6162,10 @@ export type ResolversTypes = { AiPersonaDataAccessMode: AiPersonaDataAccessMode; AiPersonaEngine: AiPersonaEngine; AiPersonaInteractionMode: AiPersonaInteractionMode; - AiPersonaQuestionInput: AiPersonaQuestionInput; - AiPersonaResult: ResolverTypeWrapper; AiPersonaService: ResolverTypeWrapper; AiPersonaServiceIngestInput: AiPersonaServiceIngestInput; AiPersonaServiceQuestionInput: AiPersonaServiceQuestionInput; - AiPersonaServiceResult: ResolverTypeWrapper; AiServer: ResolverTypeWrapper; - AnyInvitation: - | ResolversTypes['Invitation'] - | ResolversTypes['InvitationExternal']; Application: ResolverTypeWrapper; ApplicationEventInput: ApplicationEventInput; AssignCommunityRoleToOrganizationInput: AssignCommunityRoleToOrganizationInput; @@ -6216,7 +6209,6 @@ export type ResolversTypes = { CalloutVisibility: CalloutVisibility; ChatGuidanceAnswerRelevanceInput: ChatGuidanceAnswerRelevanceInput; ChatGuidanceInput: ChatGuidanceInput; - ChatGuidanceResult: ResolverTypeWrapper; Collaboration: ResolverTypeWrapper; Communication: ResolverTypeWrapper; CommunicationAdminEnsureAccessInput: CommunicationAdminEnsureAccessInput; @@ -6278,12 +6270,13 @@ export type ResolversTypes = { CreateInnovationHubInput: CreateInnovationHubInput; CreateInnovationPackOnLibraryInput: CreateInnovationPackOnLibraryInput; CreateInvitationForContributorsOnCommunityInput: CreateInvitationForContributorsOnCommunityInput; - CreateInvitationUserByEmailOnCommunityInput: CreateInvitationUserByEmailOnCommunityInput; CreateLicensePlanOnLicensingInput: CreateLicensePlanOnLicensingInput; CreateLinkInput: CreateLinkInput; CreateLocationInput: CreateLocationInput; CreateNVPInput: CreateNvpInput; CreateOrganizationInput: CreateOrganizationInput; + CreatePlatformInvitationForRoleInput: CreatePlatformInvitationForRoleInput; + CreatePlatformInvitationOnCommunityInput: CreatePlatformInvitationOnCommunityInput; CreatePostInput: CreatePostInput; CreatePostTemplateOnTemplatesSetInput: CreatePostTemplateOnTemplatesSetInput; CreateProfileInput: CreateProfileInput; @@ -6319,11 +6312,11 @@ export type ResolversTypes = { DeleteInnovationFlowTemplateInput: DeleteInnovationFlowTemplateInput; DeleteInnovationHubInput: DeleteInnovationHubInput; DeleteInnovationPackInput: DeleteInnovationPackInput; - DeleteInvitationExternalInput: DeleteInvitationExternalInput; DeleteInvitationInput: DeleteInvitationInput; DeleteLicensePlanInput: DeleteLicensePlanInput; DeleteLinkInput: DeleteLinkInput; DeleteOrganizationInput: DeleteOrganizationInput; + DeletePlatformInvitationInput: DeletePlatformInvitationInput; DeletePostInput: DeletePostInput; DeletePostTemplateInput: DeletePostTemplateInput; DeleteReferenceInput: DeleteReferenceInput; @@ -6355,7 +6348,6 @@ export type ResolversTypes = { GrantOrganizationAuthorizationCredentialInput: GrantOrganizationAuthorizationCredentialInput; Groupable: ResolversTypes['Community'] | ResolversTypes['Organization']; ISearchResults: ResolverTypeWrapper; - IngestSpaceInput: IngestSpaceInput; InnovationFlow: ResolverTypeWrapper; InnovationFlowState: ResolverTypeWrapper; InnovationFlowTemplate: ResolverTypeWrapper; @@ -6367,7 +6359,6 @@ export type ResolversTypes = { Int: ResolverTypeWrapper; Invitation: ResolverTypeWrapper; InvitationEventInput: InvitationEventInput; - InvitationExternal: ResolverTypeWrapper; JSON: ResolverTypeWrapper; LatestReleaseDiscussion: ResolverTypeWrapper; Library: ResolverTypeWrapper; @@ -6387,6 +6378,8 @@ export type ResolversTypes = { Markdown: ResolverTypeWrapper; MeQueryResults: ResolverTypeWrapper; Message: ResolverTypeWrapper; + MessageAnswerQuestion: ResolverTypeWrapper; + MessageAnswerToQuestionSource: ResolverTypeWrapper; MessageID: ResolverTypeWrapper; Metadata: ResolverTypeWrapper; MigrateEmbeddings: ResolverTypeWrapper; @@ -6413,6 +6406,7 @@ export type ResolversTypes = { Platform: ResolverTypeWrapper; PlatformFeatureFlag: ResolverTypeWrapper; PlatformFeatureFlagName: PlatformFeatureFlagName; + PlatformInvitation: ResolverTypeWrapper; PlatformLocations: ResolverTypeWrapper; PlatformRole: PlatformRole; Post: ResolverTypeWrapper; @@ -6428,6 +6422,7 @@ export type ResolversTypes = { Question: ResolverTypeWrapper; Reaction: ResolverTypeWrapper; Reference: ResolverTypeWrapper; + RefreshVirtualContributorBodyOfKnowledgeInput: RefreshVirtualContributorBodyOfKnowledgeInput; Relation: ResolverTypeWrapper; RelayPaginatedSpace: ResolverTypeWrapper; RelayPaginatedSpaceEdge: ResolverTypeWrapper; @@ -6475,11 +6470,9 @@ export type ResolversTypes = { SearchVisibility: SearchVisibility; Sentry: ResolverTypeWrapper; ServiceMetadata: ResolverTypeWrapper; - Source: ResolverTypeWrapper; Space: ResolverTypeWrapper; SpaceDefaults: ResolverTypeWrapper; SpaceFilterInput: SpaceFilterInput; - SpaceIngestionPurpose: SpaceIngestionPurpose; SpaceLevel: SpaceLevel; SpacePrivacyMode: SpacePrivacyMode; SpaceSettings: ResolverTypeWrapper; @@ -6586,6 +6579,7 @@ export type ResolversTypes = { VerifiedCredential: ResolverTypeWrapper; VerifiedCredentialClaim: ResolverTypeWrapper; VirtualContributor: ResolverTypeWrapper; + VirtualContributorQuestionInput: VirtualContributorQuestionInput; Visual: ResolverTypeWrapper; VisualType: VisualType; VisualUploadImageInput: VisualUploadImageInput; @@ -6638,16 +6632,10 @@ export type ResolversParentTypes = { AgentBeginVerifiedCredentialOfferOutput: AgentBeginVerifiedCredentialOfferOutput; AgentBeginVerifiedCredentialRequestOutput: AgentBeginVerifiedCredentialRequestOutput; AiPersona: AiPersona; - AiPersonaQuestionInput: AiPersonaQuestionInput; - AiPersonaResult: AiPersonaResult; AiPersonaService: AiPersonaService; AiPersonaServiceIngestInput: AiPersonaServiceIngestInput; AiPersonaServiceQuestionInput: AiPersonaServiceQuestionInput; - AiPersonaServiceResult: AiPersonaServiceResult; AiServer: AiServer; - AnyInvitation: - | ResolversParentTypes['Invitation'] - | ResolversParentTypes['InvitationExternal']; Application: Application; ApplicationEventInput: ApplicationEventInput; AssignCommunityRoleToOrganizationInput: AssignCommunityRoleToOrganizationInput; @@ -6681,7 +6669,6 @@ export type ResolversParentTypes = { CalloutTemplate: CalloutTemplate; ChatGuidanceAnswerRelevanceInput: ChatGuidanceAnswerRelevanceInput; ChatGuidanceInput: ChatGuidanceInput; - ChatGuidanceResult: ChatGuidanceResult; Collaboration: Collaboration; Communication: Communication; CommunicationAdminEnsureAccessInput: CommunicationAdminEnsureAccessInput; @@ -6737,12 +6724,13 @@ export type ResolversParentTypes = { CreateInnovationHubInput: CreateInnovationHubInput; CreateInnovationPackOnLibraryInput: CreateInnovationPackOnLibraryInput; CreateInvitationForContributorsOnCommunityInput: CreateInvitationForContributorsOnCommunityInput; - CreateInvitationUserByEmailOnCommunityInput: CreateInvitationUserByEmailOnCommunityInput; CreateLicensePlanOnLicensingInput: CreateLicensePlanOnLicensingInput; CreateLinkInput: CreateLinkInput; CreateLocationInput: CreateLocationInput; CreateNVPInput: CreateNvpInput; CreateOrganizationInput: CreateOrganizationInput; + CreatePlatformInvitationForRoleInput: CreatePlatformInvitationForRoleInput; + CreatePlatformInvitationOnCommunityInput: CreatePlatformInvitationOnCommunityInput; CreatePostInput: CreatePostInput; CreatePostTemplateOnTemplatesSetInput: CreatePostTemplateOnTemplatesSetInput; CreateProfileInput: CreateProfileInput; @@ -6777,11 +6765,11 @@ export type ResolversParentTypes = { DeleteInnovationFlowTemplateInput: DeleteInnovationFlowTemplateInput; DeleteInnovationHubInput: DeleteInnovationHubInput; DeleteInnovationPackInput: DeleteInnovationPackInput; - DeleteInvitationExternalInput: DeleteInvitationExternalInput; DeleteInvitationInput: DeleteInvitationInput; DeleteLicensePlanInput: DeleteLicensePlanInput; DeleteLinkInput: DeleteLinkInput; DeleteOrganizationInput: DeleteOrganizationInput; + DeletePlatformInvitationInput: DeletePlatformInvitationInput; DeletePostInput: DeletePostInput; DeletePostTemplateInput: DeletePostTemplateInput; DeleteReferenceInput: DeleteReferenceInput; @@ -6812,7 +6800,6 @@ export type ResolversParentTypes = { | ResolversParentTypes['Community'] | ResolversParentTypes['Organization']; ISearchResults: ISearchResults; - IngestSpaceInput: IngestSpaceInput; InnovationFlow: InnovationFlow; InnovationFlowState: InnovationFlowState; InnovationFlowTemplate: InnovationFlowTemplate; @@ -6822,7 +6809,6 @@ export type ResolversParentTypes = { Int: Scalars['Int']; Invitation: Invitation; InvitationEventInput: InvitationEventInput; - InvitationExternal: InvitationExternal; JSON: Scalars['JSON']; LatestReleaseDiscussion: LatestReleaseDiscussion; Library: Library; @@ -6839,6 +6825,8 @@ export type ResolversParentTypes = { Markdown: Scalars['Markdown']; MeQueryResults: MeQueryResults; Message: Message; + MessageAnswerQuestion: MessageAnswerQuestion; + MessageAnswerToQuestionSource: MessageAnswerToQuestionSource; MessageID: Scalars['MessageID']; Metadata: Metadata; MigrateEmbeddings: MigrateEmbeddings; @@ -6859,6 +6847,7 @@ export type ResolversParentTypes = { PaginatedUsers: PaginatedUsers; Platform: Platform; PlatformFeatureFlag: PlatformFeatureFlag; + PlatformInvitation: PlatformInvitation; PlatformLocations: PlatformLocations; Post: Post; PostTemplate: PostTemplate; @@ -6870,6 +6859,7 @@ export type ResolversParentTypes = { Question: Question; Reaction: Reaction; Reference: Reference; + RefreshVirtualContributorBodyOfKnowledgeInput: RefreshVirtualContributorBodyOfKnowledgeInput; Relation: Relation; RelayPaginatedSpace: RelayPaginatedSpace; RelayPaginatedSpaceEdge: RelayPaginatedSpaceEdge; @@ -6915,7 +6905,6 @@ export type ResolversParentTypes = { SearchResultUserGroup: SearchResultUserGroup; Sentry: Sentry; ServiceMetadata: ServiceMetadata; - Source: Source; Space: Space; SpaceDefaults: SpaceDefaults; SpaceFilterInput: SpaceFilterInput; @@ -7017,6 +7006,7 @@ export type ResolversParentTypes = { VerifiedCredential: VerifiedCredential; VerifiedCredentialClaim: VerifiedCredentialClaim; VirtualContributor: VirtualContributor; + VirtualContributorQuestionInput: VirtualContributorQuestionInput; Visual: Visual; VisualUploadImageInput: VisualUploadImageInput; Whiteboard: Whiteboard; @@ -7375,7 +7365,16 @@ export type ActivityLogEntryMemberJoinedResolvers< child?: Resolver; collaborationID?: Resolver; community?: Resolver; - communityType?: Resolver; + contributor?: Resolver< + ResolversTypes['Contributor'], + ParentType, + ContextType + >; + contributorType?: Resolver< + ResolversTypes['CommunityContributorType'], + ParentType, + ContextType + >; createdDate?: Resolver; description?: Resolver; id?: Resolver; @@ -7388,7 +7387,6 @@ export type ActivityLogEntryMemberJoinedResolvers< space?: Resolver, ParentType, ContextType>; triggeredBy?: Resolver; type?: Resolver; - user?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; @@ -7534,8 +7532,18 @@ export type AiPersonaResolvers< ParentType, ContextType >; + bodyOfKnowledge?: Resolver< + ResolversTypes['Markdown'], + ParentType, + ContextType + >; + bodyOfKnowledgeID?: Resolver< + Maybe, + ParentType, + ContextType + >; bodyOfKnowledgeType?: Resolver< - ResolversTypes['AiPersonaBodyOfKnowledgeType'], + Maybe, ParentType, ContextType >; @@ -7554,21 +7562,6 @@ export type AiPersonaResolvers< __isTypeOf?: IsTypeOfResolverFn; }; -export type AiPersonaResultResolvers< - ContextType = any, - ParentType extends ResolversParentTypes['AiPersonaResult'] = ResolversParentTypes['AiPersonaResult'] -> = { - answer?: Resolver; - id?: Resolver, ParentType, ContextType>; - question?: Resolver; - sources?: Resolver< - Maybe>, - ParentType, - ContextType - >; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type AiPersonaServiceResolvers< ContextType = any, ParentType extends ResolversParentTypes['AiPersonaService'] = ResolversParentTypes['AiPersonaService'] @@ -7599,21 +7592,6 @@ export type AiPersonaServiceResolvers< __isTypeOf?: IsTypeOfResolverFn; }; -export type AiPersonaServiceResultResolvers< - ContextType = any, - ParentType extends ResolversParentTypes['AiPersonaServiceResult'] = ResolversParentTypes['AiPersonaServiceResult'] -> = { - answer?: Resolver; - id?: Resolver, ParentType, ContextType>; - question?: Resolver; - sources?: Resolver< - Maybe>, - ParentType, - ContextType - >; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type AiServerResolvers< ContextType = any, ParentType extends ResolversParentTypes['AiServer'] = ResolversParentTypes['AiServer'] @@ -7630,7 +7608,7 @@ export type AiServerResolvers< ContextType >; askAiPersonaServiceQuestion?: Resolver< - ResolversTypes['AiPersonaServiceResult'], + ResolversTypes['MessageAnswerQuestion'], ParentType, ContextType, RequireFields @@ -7649,17 +7627,6 @@ export type AiServerResolvers< __isTypeOf?: IsTypeOfResolverFn; }; -export type AnyInvitationResolvers< - ContextType = any, - ParentType extends ResolversParentTypes['AnyInvitation'] = ResolversParentTypes['AnyInvitation'] -> = { - __resolveType: TypeResolveFn< - 'Invitation' | 'InvitationExternal', - ParentType, - ContextType - >; -}; - export type ApplicationResolvers< ContextType = any, ParentType extends ResolversParentTypes['Application'] = ResolversParentTypes['Application'] @@ -8043,21 +8010,6 @@ export type CalloutTemplateResolvers< __isTypeOf?: IsTypeOfResolverFn; }; -export type ChatGuidanceResultResolvers< - ContextType = any, - ParentType extends ResolversParentTypes['ChatGuidanceResult'] = ResolversParentTypes['ChatGuidanceResult'] -> = { - answer?: Resolver; - id?: Resolver, ParentType, ContextType>; - question?: Resolver; - sources?: Resolver< - Maybe>, - ParentType, - ContextType - >; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type CollaborationResolvers< ContextType = any, ParentType extends ResolversParentTypes['Collaboration'] = ResolversParentTypes['Collaboration'] @@ -8238,11 +8190,6 @@ export type CommunityResolvers< ParentType, ContextType >; - invitationsExternal?: Resolver< - Array, - ParentType, - ContextType - >; memberUsers?: Resolver< Array, ParentType, @@ -8270,6 +8217,11 @@ export type CommunityResolvers< ContextType, RequireFields >; + platformInvitations?: Resolver< + Array, + ParentType, + ContextType + >; policy?: Resolver; usersInRole?: Resolver< Array, @@ -8952,35 +8904,6 @@ export type InvitationResolvers< __isTypeOf?: IsTypeOfResolverFn; }; -export type InvitationExternalResolvers< - ContextType = any, - ParentType extends ResolversParentTypes['InvitationExternal'] = ResolversParentTypes['InvitationExternal'] -> = { - authorization?: Resolver< - Maybe, - ParentType, - ContextType - >; - createdBy?: Resolver; - createdDate?: Resolver; - email?: Resolver; - firstName?: Resolver; - id?: Resolver; - invitedToParent?: Resolver< - ResolversTypes['Boolean'], - ParentType, - ContextType - >; - lastName?: Resolver; - profileCreated?: Resolver; - welcomeMessage?: Resolver< - Maybe, - ParentType, - ContextType - >; - __isTypeOf?: IsTypeOfResolverFn; -}; - export interface JsonScalarConfig extends GraphQLScalarTypeConfig { name: 'JSON'; @@ -9424,6 +9347,30 @@ export type MessageResolvers< __isTypeOf?: IsTypeOfResolverFn; }; +export type MessageAnswerQuestionResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['MessageAnswerQuestion'] = ResolversParentTypes['MessageAnswerQuestion'] +> = { + answer?: Resolver; + id?: Resolver, ParentType, ContextType>; + question?: Resolver; + sources?: Resolver< + Maybe>, + ParentType, + ContextType + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type MessageAnswerToQuestionSourceResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['MessageAnswerToQuestionSource'] = ResolversParentTypes['MessageAnswerToQuestionSource'] +> = { + title?: Resolver, ParentType, ContextType>; + uri?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + export interface MessageIdScalarConfig extends GraphQLScalarTypeConfig { name: 'MessageID'; @@ -9660,11 +9607,6 @@ export type MutationResolvers< ContextType, RequireFields >; - copyCollections?: Resolver< - ResolversTypes['MigrateEmbeddings'], - ParentType, - ContextType - >; createAccount?: Resolver< ResolversTypes['Account'], ParentType, @@ -9904,12 +9846,6 @@ export type MutationResolvers< ContextType, RequireFields >; - deleteInvitationExternal?: Resolver< - ResolversTypes['InvitationExternal'], - ParentType, - ContextType, - RequireFields - >; deleteLicensePlan?: Resolver< ResolversTypes['LicensePlan'], ParentType, @@ -9928,6 +9864,12 @@ export type MutationResolvers< ContextType, RequireFields >; + deletePlatformInvitation?: Resolver< + ResolversTypes['PlatformInvitation'], + ParentType, + ContextType, + RequireFields + >; deletePost?: Resolver< ResolversTypes['Post'], ParentType, @@ -10037,12 +9979,6 @@ export type MutationResolvers< RequireFields >; ingest?: Resolver; - ingestSpace?: Resolver< - ResolversTypes['Space'], - ParentType, - ContextType, - RequireFields - >; inviteContributorsForCommunityMembership?: Resolver< Array, ParentType, @@ -10052,15 +9988,21 @@ export type MutationResolvers< 'invitationData' > >; - inviteForCommunityMembershipByEmail?: Resolver< - ResolversTypes['AnyInvitation'], + inviteUserToPlatformAndCommunity?: Resolver< + ResolversTypes['PlatformInvitation'], ParentType, ContextType, RequireFields< - MutationInviteForCommunityMembershipByEmailArgs, + MutationInviteUserToPlatformAndCommunityArgs, 'invitationData' > >; + inviteUserToPlatformWithRole?: Resolver< + ResolversTypes['PlatformInvitation'], + ParentType, + ContextType, + RequireFields + >; joinCommunity?: Resolver< ResolversTypes['Community'], ParentType, @@ -10079,6 +10021,15 @@ export type MutationResolvers< ContextType, RequireFields >; + refreshVirtualContributorBodyOfKnowledge?: Resolver< + ResolversTypes['Boolean'], + ParentType, + ContextType, + RequireFields< + MutationRefreshVirtualContributorBodyOfKnowledgeArgs, + 'refreshData' + > + >; removeCommunityRoleFromOrganization?: Resolver< ResolversTypes['Organization'], ParentType, @@ -10762,6 +10713,11 @@ export type PlatformResolvers< library?: Resolver; licensing?: Resolver; metadata?: Resolver; + platformInvitations?: Resolver< + Array, + ParentType, + ContextType + >; storageAggregator?: Resolver< ResolversTypes['StorageAggregator'], ParentType, @@ -10783,6 +10739,40 @@ export type PlatformFeatureFlagResolvers< __isTypeOf?: IsTypeOfResolverFn; }; +export type PlatformInvitationResolvers< + ContextType = any, + ParentType extends ResolversParentTypes['PlatformInvitation'] = ResolversParentTypes['PlatformInvitation'] +> = { + authorization?: Resolver< + Maybe, + ParentType, + ContextType + >; + communityInvitedToParent?: Resolver< + ResolversTypes['Boolean'], + ParentType, + ContextType + >; + createdBy?: Resolver; + createdDate?: Resolver; + email?: Resolver; + firstName?: Resolver; + id?: Resolver; + lastName?: Resolver; + platformRole?: Resolver< + Maybe, + ParentType, + ContextType + >; + profileCreated?: Resolver; + welcomeMessage?: Resolver< + Maybe, + ParentType, + ContextType + >; + __isTypeOf?: IsTypeOfResolverFn; +}; + export type PlatformLocationsResolvers< ContextType = any, ParentType extends ResolversParentTypes['PlatformLocations'] = ResolversParentTypes['PlatformLocations'] @@ -11006,17 +10996,17 @@ export type QueryResolvers< ContextType >; aiServer?: Resolver; - askAiPersonaQuestion?: Resolver< - ResolversTypes['AiPersonaResult'], + askChatGuidanceQuestion?: Resolver< + ResolversTypes['MessageAnswerQuestion'], ParentType, ContextType, - RequireFields + RequireFields >; - askChatGuidanceQuestion?: Resolver< - ResolversTypes['ChatGuidanceResult'], + askVirtualContributorQuestion?: Resolver< + ResolversTypes['MessageAnswerQuestion'], ParentType, ContextType, - RequireFields + RequireFields >; getSupportedVerifiedCredentialMetadata?: Resolver< Array, @@ -11317,6 +11307,7 @@ export type RolesResultCommunityResolvers< > = { displayName?: Resolver; id?: Resolver; + level?: Resolver; nameID?: Resolver; roles?: Resolver, ParentType, ContextType>; type?: Resolver; @@ -11346,6 +11337,7 @@ export type RolesResultSpaceResolvers< > = { displayName?: Resolver; id?: Resolver; + level?: Resolver; nameID?: Resolver; roles?: Resolver, ParentType, ContextType>; spaceID?: Resolver; @@ -11546,15 +11538,6 @@ export type ServiceMetadataResolvers< __isTypeOf?: IsTypeOfResolverFn; }; -export type SourceResolvers< - ContextType = any, - ParentType extends ResolversParentTypes['Source'] = ResolversParentTypes['Source'] -> = { - title?: Resolver, ParentType, ContextType>; - uri?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type SpaceResolvers< ContextType = any, ParentType extends ResolversParentTypes['Space'] = ResolversParentTypes['Space'] @@ -12167,7 +12150,11 @@ export type VirtualContributorResolvers< > = { account?: Resolver, ParentType, ContextType>; agent?: Resolver; - aiPersona?: Resolver; + aiPersona?: Resolver< + Maybe, + ParentType, + ContextType + >; authorization?: Resolver< Maybe, ParentType, @@ -12315,11 +12302,8 @@ export type Resolvers = { AgentBeginVerifiedCredentialOfferOutput?: AgentBeginVerifiedCredentialOfferOutputResolvers; AgentBeginVerifiedCredentialRequestOutput?: AgentBeginVerifiedCredentialRequestOutputResolvers; AiPersona?: AiPersonaResolvers; - AiPersonaResult?: AiPersonaResultResolvers; AiPersonaService?: AiPersonaServiceResolvers; - AiPersonaServiceResult?: AiPersonaServiceResultResolvers; AiServer?: AiServerResolvers; - AnyInvitation?: AnyInvitationResolvers; Application?: ApplicationResolvers; AuthenticationConfig?: AuthenticationConfigResolvers; AuthenticationProviderConfig?: AuthenticationProviderConfigResolvers; @@ -12339,7 +12323,6 @@ export type Resolvers = { CalloutGroup?: CalloutGroupResolvers; CalloutPostCreated?: CalloutPostCreatedResolvers; CalloutTemplate?: CalloutTemplateResolvers; - ChatGuidanceResult?: ChatGuidanceResultResolvers; Collaboration?: CollaborationResolvers; Communication?: CommunicationResolvers; CommunicationAdminMembershipResult?: CommunicationAdminMembershipResultResolvers; @@ -12383,7 +12366,6 @@ export type Resolvers = { InnovationHub?: InnovationHubResolvers; InnovationPack?: InnovationPackResolvers; Invitation?: InvitationResolvers; - InvitationExternal?: InvitationExternalResolvers; JSON?: GraphQLScalarType; LatestReleaseDiscussion?: LatestReleaseDiscussionResolvers; Library?: LibraryResolvers; @@ -12400,6 +12382,8 @@ export type Resolvers = { Markdown?: GraphQLScalarType; MeQueryResults?: MeQueryResultsResolvers; Message?: MessageResolvers; + MessageAnswerQuestion?: MessageAnswerQuestionResolvers; + MessageAnswerToQuestionSource?: MessageAnswerToQuestionSourceResolvers; MessageID?: GraphQLScalarType; Metadata?: MetadataResolvers; MigrateEmbeddings?: MigrateEmbeddingsResolvers; @@ -12416,6 +12400,7 @@ export type Resolvers = { PaginatedUsers?: PaginatedUsersResolvers; Platform?: PlatformResolvers; PlatformFeatureFlag?: PlatformFeatureFlagResolvers; + PlatformInvitation?: PlatformInvitationResolvers; PlatformLocations?: PlatformLocationsResolvers; Post?: PostResolvers; PostTemplate?: PostTemplateResolvers; @@ -12448,7 +12433,6 @@ export type Resolvers = { SearchResultUserGroup?: SearchResultUserGroupResolvers; Sentry?: SentryResolvers; ServiceMetadata?: ServiceMetadataResolvers; - Source?: SourceResolvers; Space?: SpaceResolvers; SpaceDefaults?: SpaceDefaultsResolvers; SpaceSettings?: SpaceSettingsResolvers; @@ -12495,6 +12479,20 @@ export type DocumentQuery = { }; }; +export type ProfileFieldsFragment = { + id: string; + description?: any | undefined; + displayName: string; + tagline: string; + url: string; + type?: ProfileType | undefined; + tagset?: { tags: Array } | undefined; + references?: + | Array<{ description?: string | undefined; name: string; uri: string }> + | undefined; + visuals: Array<{ uri: string; name: string }>; +}; + export type SpaceDetailsFragment = { id: string; nameID: string; @@ -12535,6 +12533,7 @@ export type SpaceIngestFragment = { id: string; nameID: string; type: CalloutType; + visibility: CalloutVisibility; comments?: | { messagesCount: number; @@ -12550,11 +12549,14 @@ export type SpaceIngestFragment = { } | undefined; framing: { + id: string; profile: { + id: string; description?: any | undefined; displayName: string; tagline: string; url: string; + type?: ProfileType | undefined; tagset?: { tags: Array } | undefined; references?: | Array<{ @@ -12567,14 +12569,41 @@ export type SpaceIngestFragment = { }; }; contributions: Array<{ + post?: + | { + id: string; + nameID: string; + profile: { + id: string; + description?: any | undefined; + displayName: string; + tagline: string; + url: string; + type?: ProfileType | undefined; + tagset?: { tags: Array } | undefined; + references?: + | Array<{ + description?: string | undefined; + name: string; + uri: string; + }> + | undefined; + visuals: Array<{ uri: string; name: string }>; + }; + } + | undefined; link?: | { + id: string; uri: string; profile: { + id: string; description?: any | undefined; displayName: string; + tagline: string; url: string; type?: ProfileType | undefined; + tagset?: { tags: Array } | undefined; references?: | Array<{ description?: string | undefined; @@ -12822,6 +12851,7 @@ export type SpaceIngestQuery = { id: string; nameID: string; type: CalloutType; + visibility: CalloutVisibility; comments?: | { messagesCount: number; @@ -12837,11 +12867,14 @@ export type SpaceIngestQuery = { } | undefined; framing: { + id: string; profile: { + id: string; description?: any | undefined; displayName: string; tagline: string; url: string; + type?: ProfileType | undefined; tagset?: { tags: Array } | undefined; references?: | Array<{ @@ -12854,14 +12887,41 @@ export type SpaceIngestQuery = { }; }; contributions: Array<{ + post?: + | { + id: string; + nameID: string; + profile: { + id: string; + description?: any | undefined; + displayName: string; + tagline: string; + url: string; + type?: ProfileType | undefined; + tagset?: { tags: Array } | undefined; + references?: + | Array<{ + description?: string | undefined; + name: string; + uri: string; + }> + | undefined; + visuals: Array<{ uri: string; name: string }>; + }; + } + | undefined; link?: | { + id: string; uri: string; profile: { + id: string; description?: any | undefined; displayName: string; + tagline: string; url: string; type?: ProfileType | undefined; + tagset?: { tags: Array } | undefined; references?: | Array<{ description?: string | undefined; @@ -12905,6 +12965,7 @@ export type SpaceIngestQuery = { id: string; nameID: string; type: CalloutType; + visibility: CalloutVisibility; comments?: | { messagesCount: number; @@ -12920,11 +12981,14 @@ export type SpaceIngestQuery = { } | undefined; framing: { + id: string; profile: { + id: string; description?: any | undefined; displayName: string; tagline: string; url: string; + type?: ProfileType | undefined; tagset?: { tags: Array } | undefined; references?: | Array<{ @@ -12937,14 +13001,41 @@ export type SpaceIngestQuery = { }; }; contributions: Array<{ + post?: + | { + id: string; + nameID: string; + profile: { + id: string; + description?: any | undefined; + displayName: string; + tagline: string; + url: string; + type?: ProfileType | undefined; + tagset?: { tags: Array } | undefined; + references?: + | Array<{ + description?: string | undefined; + name: string; + uri: string; + }> + | undefined; + visuals: Array<{ uri: string; name: string }>; + }; + } + | undefined; link?: | { + id: string; uri: string; profile: { + id: string; description?: any | undefined; displayName: string; + tagline: string; url: string; type?: ProfileType | undefined; + tagset?: { tags: Array } | undefined; references?: | Array<{ description?: string | undefined; @@ -12988,6 +13079,7 @@ export type SpaceIngestQuery = { id: string; nameID: string; type: CalloutType; + visibility: CalloutVisibility; comments?: | { messagesCount: number; @@ -13003,11 +13095,14 @@ export type SpaceIngestQuery = { } | undefined; framing: { + id: string; profile: { + id: string; description?: any | undefined; displayName: string; tagline: string; url: string; + type?: ProfileType | undefined; tagset?: { tags: Array } | undefined; references?: | Array<{ @@ -13020,14 +13115,41 @@ export type SpaceIngestQuery = { }; }; contributions: Array<{ + post?: + | { + id: string; + nameID: string; + profile: { + id: string; + description?: any | undefined; + displayName: string; + tagline: string; + url: string; + type?: ProfileType | undefined; + tagset?: { tags: Array } | undefined; + references?: + | Array<{ + description?: string | undefined; + name: string; + uri: string; + }> + | undefined; + visuals: Array<{ uri: string; name: string }>; + }; + } + | undefined; link?: | { + id: string; uri: string; profile: { + id: string; description?: any | undefined; displayName: string; + tagline: string; url: string; type?: ProfileType | undefined; + tagset?: { tags: Array } | undefined; references?: | Array<{ description?: string | undefined; @@ -13071,6 +13193,28 @@ export const SpaceDetailsFragmentDoc = gql` } } `; +export const ProfileFieldsFragmentDoc = gql` + fragment ProfileFields on Profile { + id + description + displayName + tagline + url + type + tagset { + tags + } + references { + description + name + uri + } + visuals { + uri + name + } + } +`; export const SpaceIngestFragmentDoc = gql` fragment SpaceIngest on Space { id @@ -13109,6 +13253,7 @@ export const SpaceIngestFragmentDoc = gql` id nameID type + visibility comments { messagesCount messages { @@ -13131,48 +13276,31 @@ export const SpaceIngestFragmentDoc = gql` } } framing { + id profile { - description - displayName - tagline - url - tagset { - tags - } - references { - description - name - uri - } - visuals { - uri - name - } + ...ProfileFields } } contributions { + post { + id + nameID + profile { + ...ProfileFields + } + } link { + id uri profile { - description - displayName - url - type - references { - description - name - uri - } - visuals { - uri - name - } + ...ProfileFields } } } } } } + ${ProfileFieldsFragmentDoc} `; export const VisualFullFragmentDoc = gql` fragment VisualFull on Visual { diff --git a/src/index.ts b/src/index.ts index ddb7b33..d380afb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,8 @@ import amqplib from 'amqplib'; import { Document } from 'langchain/document'; -import { Callout, SpaceIngestionPurpose, Space } from './generated/graphql'; +import { SpaceIngestionPurpose } from './space.ingestion.purpose'; +import { CalloutVisibility, Callout, Space } from './generated/graphql'; import logger from './logger'; import ingest from './ingest'; @@ -36,7 +37,7 @@ const processSpaceTree = async ( for (let j = 0; j < (subspace.collaboration?.callouts || []).length; j++) { const callout = (subspace.collaboration?.callouts || [])[j]; - if (callout) { + if (callout && callout.visibility === CalloutVisibility.Published) { const document = await handleCallout( callout as Partial, alkemioClient diff --git a/src/ingest.ts b/src/ingest.ts index 517bb95..f79a8af 100644 --- a/src/ingest.ts +++ b/src/ingest.ts @@ -1,4 +1,4 @@ -import { SpaceIngestionPurpose } from './generated/graphql'; +import { SpaceIngestionPurpose } from './space.ingestion.purpose'; import { Document } from 'langchain/document'; import { RecursiveCharacterTextSplitter } from 'langchain/text_splitter'; import { OpenAIClient, AzureKeyCredential, EmbeddingItem } from '@azure/openai'; diff --git a/src/space.ingestion.purpose.ts b/src/space.ingestion.purpose.ts new file mode 100644 index 0000000..1f9aba4 --- /dev/null +++ b/src/space.ingestion.purpose.ts @@ -0,0 +1,4 @@ +export enum SpaceIngestionPurpose { + KNOWLEDGE = 'knowledge', + CONTEXT = 'context', +}