Skip to content

Commit

Permalink
Merge pull request #4134 from alkem-io/develop
Browse files Browse the repository at this point in the history
Release: AI Services, Forum, Invitations
  • Loading branch information
valentinyanakiev authored Jun 24, 2024
2 parents 3c889cc + 43fbd25 commit b19e14b
Show file tree
Hide file tree
Showing 311 changed files with 6,218 additions and 2,565 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alkemio-server",
"version": "0.80.0",
"version": "0.81.0",
"description": "Alkemio server, responsible for managing the shared Alkemio platform",
"author": "Alkemio Foundation",
"private": false,
Expand Down
2 changes: 1 addition & 1 deletion quickstart-services-ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ services:
- 'host.docker.internal:host-gateway'
container_name: alkemio_dev_virtual-contributor-ingest-space
hostname: virtual-contributor-ingest-space
image: alkemio/virtual-contributor-ingest-space:v0.4.2
image: alkemio/virtual-contributor-ingest-space:v0.6.0
platform: linux/x86_64
restart: always
volumes:
Expand Down
11 changes: 5 additions & 6 deletions src/common/constants/authorization/policy.rule.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ export const POLICY_RULE_WHITEBOARD_CONTENT_UPDATE =
export const POLICY_RULE_VISUAL_UPDATE = 'policyRule-visualUpdate';
export const POLICY_RULE_ROOM_CONTRIBUTE = 'policyRule-roomContribute';
export const POLICY_RULE_ROOM_ADMINS = 'policyRule-roomAdminsCreate';
export const POLICY_RULE_COMMUNICATION_CONTRIBUTE =
'policyRule-communicateContribute';
export const POLICY_RULE_COMMUNICATION_CREATE =
'policyRule-communicationCreate';
export const POLICY_RULE_FORUM_CONTRIBUTE = 'policyRule-forumContribute';
export const POLICY_RULE_FORUM_CREATE = 'policyRule-forumCreate';
export const POLICY_RULE_PLATFORM_DELETE = 'policyRule-platformDelete';
export const POLICY_RULE_CALLOUT_CREATE = 'policyRule-calloutCreate';
export const POLICY_RULE_CALLOUT_CONTRIBUTE = 'policyRule-calloutContribute';
Expand All @@ -26,5 +24,6 @@ export const PRIVILEGE_RULE_TYPES_INNOVATION_FLOW_UPDATE =
'privilegeRuleTypes-innovationFlowUpdate';
export const PRIVILEGE_RULE_READ_USER_SETTINGS =
'privilegeRule-readUserSettings';
export const POLICY_RULE_VC_ADD_TO_COMMUNITY =
'policyRule-virtualContributorAddToCommunity';
export const POLICY_RULE_COMMUNITY_INVITE_MEMBER = 'policyRule-communityInvite';
export const POLICY_RULE_COMMUNITY_ADD_VC =
'policyRule-communityAddVirtualContributor';
2 changes: 2 additions & 0 deletions src/common/constants/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ export const SUBSCRIPTION_DISCUSSION_UPDATED =
'alkemio-subscriptions-discussion-updated';
export const SUBSCRIPTION_WHITEBOARD_CONTENT =
'alkemio-subscriptions-whiteboard-content';
export const SUBSCRIPTION_WHITEBOARD_SAVED =
'alkemio-subscriptions-whiteboard-saved';
export const SUBSCRIPTION_CALLOUT_POST_CREATED =
'alkemio-subscriptions-callout-post-created';
export const SUBSCRIPTION_PROFILE_VERIFIED_CREDENTIAL =
Expand Down
8 changes: 8 additions & 0 deletions src/common/enums/ai.persona.body.of.knowledge.type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { registerEnumType } from '@nestjs/graphql';
export enum AiPersonaBodyOfKnowledgeType {
ALKEMIO_SPACE = 'space', // TODO: rename to alkemio-space as value
OTHER = 'other',
}
registerEnumType(AiPersonaBodyOfKnowledgeType, {
name: 'AiPersonaBodyOfKnowledgeType',
});
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { registerEnumType } from '@nestjs/graphql';

export enum VirtualPersonaAccessMode {
export enum AiPersonaDataAccessMode {
NONE = 'none',
SPACE_PROFILE = 'space_profile',
SPACE_PROFILE_AND_CONTENTS = 'space_profile_and_contents',
}

registerEnumType(VirtualPersonaAccessMode, {
name: 'VirtualPersonaAccessMode',
registerEnumType(AiPersonaDataAccessMode, {
name: 'AiPersonaDataAccessMode',
});
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { registerEnumType } from '@nestjs/graphql';

export enum VirtualContributorEngine {
export enum AiPersonaEngine {
GUIDANCE = 'guidance',
EXPERT = 'expert',
COMMUNITY_MANAGER = 'community-manager',
}

registerEnumType(VirtualContributorEngine, {
name: 'VirtualContributorEngine',
registerEnumType(AiPersonaEngine, {
name: 'AiPersonaEngine',
});
9 changes: 9 additions & 0 deletions src/common/enums/ai.persona.interaction.mode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { registerEnumType } from '@nestjs/graphql';

export enum AiPersonaInteractionMode {
DISCUSSION_TAGGING = 'discussion-tagging',
}

registerEnumType(AiPersonaInteractionMode, {
name: 'AiPersonaInteractionMode',
});
9 changes: 9 additions & 0 deletions src/common/enums/ai.server.authorization.privilege.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { registerEnumType } from '@nestjs/graphql';

export enum AiServerAuthorizationPrivilege {
AI_SERVER_ADMIN = 'ai-server-admin',
}

registerEnumType(AiServerAuthorizationPrivilege, {
name: 'AiServerAuthorizationPrivilege',
});
10 changes: 10 additions & 0 deletions src/common/enums/ai.server.role.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { registerEnumType } from '@nestjs/graphql';

export enum AiServerRole {
GLOBAL_ADMIN = 'global-admin',
SUPPORT = 'support',
}

registerEnumType(AiServerRole, {
name: 'AiServerRole',
});
2 changes: 1 addition & 1 deletion src/common/enums/alkemio.error.status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export enum AlkemioErrorStatus {
GEO_SERVICE_ERROR = 'GEO_SERVICE_ERROR',
GEO_SERVICE_REQUEST_LIMIT_EXCEEDED = 'GEO_SERVICE_REQUEST_LIMIT_EXCEEDED',
API_RESTRICTED_ACCESS = 'API_RESTRICTED_ACCESS',
COMMUNICATION_DISCUSSION_CATEGORY = 'COMMUNICATION_DISCUSSION_CATEGORY',
FORUM_DISCUSSION_CATEGORY = 'FORUM_DISCUSSION_CATEGORY',
OPERATION_NOT_ALLOWED = 'OPERATION_NOT_ALLOWED',
NOT_FOUND = 'NOT_FOUND',
IPFS_NOT_FOUND = 'IPFS_NOT_FOUND',
Expand Down
13 changes: 0 additions & 13 deletions src/common/enums/communication.discussion.category.community.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/common/enums/communication.discussion.category.ts

This file was deleted.

6 changes: 6 additions & 0 deletions src/common/enums/community.contributor.type.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { registerEnumType } from '@nestjs/graphql';

export enum CommunityContributorType {
USER = 'user',
ORGANIZATION = 'organization',
VIRTUAL = 'virtual',
}

registerEnumType(CommunityContributorType, {
name: 'CommunityContributorType',
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { registerEnumType } from '@nestjs/graphql';

// Credentials to be added later:
export enum DiscussionCategoryPlatform {
export enum ForumDiscussionCategory {
RELEASES = 'releases',
PLATFORM_FUNCTIONALITIES = 'platform-functionalities',
COMMUNITY_BUILDING = 'community-building',
Expand All @@ -10,6 +10,6 @@ export enum DiscussionCategoryPlatform {
OTHER = 'other',
}

registerEnumType(DiscussionCategoryPlatform, {
name: 'DiscussionCategoryPlatform',
registerEnumType(ForumDiscussionCategory, {
name: 'ForumDiscussionCategory',
});
11 changes: 11 additions & 0 deletions src/common/enums/forum.discussion.privacy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { registerEnumType } from '@nestjs/graphql';

export enum ForumDiscussionPrivacy {
AUTHOR = 'author',
AUTHENTICATED = 'authenticated',
PUBLIC = 'public',
}

registerEnumType(ForumDiscussionPrivacy, {
name: 'ForumDiscussionPrivacy',
});
3 changes: 3 additions & 0 deletions src/common/enums/license.credential.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export enum LicenseCredential {
LICENSE_SPACE_PLUS = 'license-space-plus',
LICENSE_SPACE_PREMIUM = 'license-space-premium',
LICENSE_SPACE_ENTERPRISE = 'license-space-enterprise',
FEATURE_CALLOUT_TO_CALLOUT_TEMPLATE = 'feature-callout-to-callout-template',
FEATURE_VIRTUAL_CONTRIBUTORS = 'feature-virtual-contributors',
FEATURE_WHITEBOARD_MULTI_USER = 'feature-whiteboard-multi-user',
}

registerEnumType(LicenseCredential, {
Expand Down
11 changes: 0 additions & 11 deletions src/common/enums/license.feature.flag.name.ts

This file was deleted.

10 changes: 10 additions & 0 deletions src/common/enums/license.plan.type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { registerEnumType } from '@nestjs/graphql';

export enum LicensePlanType {
SPACE_PLAN = 'space-plan',
SPACE_FEATURE_FLAG = 'space-feature-flag',
}

registerEnumType(LicensePlanType, {
name: 'LicensePlanType',
});
3 changes: 3 additions & 0 deletions src/common/enums/logging.context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export enum LogContext {
COMMUNITY = 'community',
DATA_LOADER = 'data-loader',
COMMUNICATION = 'communication',
PLATFORM_FORUM = 'platform-forum',
COMMUNICATION_EVENTS = 'communication_events',
COLLABORATION = 'collaboration',
AGENT = 'agent',
Expand Down Expand Up @@ -62,4 +63,6 @@ export enum LogContext {
LOCAL_STORAGE = 'local-storage',
INNOVATION_FLOW = 'innovation-flow',
FILE_INTEGRATION = 'file-integration',
AI_SERVER = 'ai-server',
AI_PERSONA_SERVICE = 'ai-persona-service',
}
1 change: 1 addition & 0 deletions src/common/enums/messaging.queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export enum MessagingQueue {
EXCALIDRAW_EVENTS = 'alkemio-excalidraw-events',
//
SUBSCRIPTION_WHITEBOARD_CONTENT = 'alkemio-subscriptions-whiteboard-content',
SUBSCRIPTION_WHITEBOARD_SAVED = 'alkemio-subscriptions-whiteboard-saved',
SUBSCRIPTION_PROFILE_VERIFIED_CREDENTIAL = 'alkemio-subscriptions-profile-verified-credential',
SUBSCRIPTION_CALLOUT_POST_CREATED = 'alkemio-subscriptions-callout-post-created',
SUBSCRIPTION_DISCUSSION_UPDATED = 'alkemio-subscriptions-discussion-updated',
Expand Down
8 changes: 8 additions & 0 deletions src/common/enums/mime.file.type.document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ import { registerEnumType } from '@nestjs/graphql';

export enum MimeTypeDocument {
PDF = 'application/pdf',

XLS = 'application/vnd.ms-excel',
XLSX = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
ODS = 'application/vnd.oasis.opendocument.spreadsheet',

DOC = 'application/msword',
DOCX = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
ODT = 'application/vnd.oasis.opendocument.text',
}

registerEnumType(MimeTypeDocument, {
Expand Down
2 changes: 2 additions & 0 deletions src/common/enums/mime.file.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const MimeFileType = {

export type MimeFileType = MimeTypeVisual | MimeTypeDocument;

export const DEFAULT_ALLOWED_MIME_TYPES = Object.values(MimeFileType);

registerEnumType(MimeFileType, {
name: 'MimeType',
});
11 changes: 11 additions & 0 deletions src/common/enums/search.visibility.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { registerEnumType } from '@nestjs/graphql';

export enum SearchVisibility {
HIDDEN = 'hidden', // only shows up when directly accessed e.g. by provider
ACCOUNT = 'account', // only shows up on searches within the scope of an account
PUBLIC = 'public', // shows up globally
}

registerEnumType(SearchVisibility, {
name: 'SearchVisibility',
});
6 changes: 6 additions & 0 deletions src/common/enums/space.level.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { registerEnumType } from '@nestjs/graphql';

export enum SpaceLevel {
SPACE = 0,
CHALLENGE = 1,
OPPORTUNITY = 2,
}

registerEnumType(SpaceLevel, {
name: 'SpaceLevel',
});
2 changes: 2 additions & 0 deletions src/common/enums/space.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export enum SpaceType {
SPACE = 'space',
CHALLENGE = 'challenge',
OPPORTUNITY = 'opportunity',
VIRTUAL_CONTRIBUTOR = 'vc',
BLANK_SLATE = 'blank-slate',
}

registerEnumType(SpaceType, {
Expand Down
3 changes: 2 additions & 1 deletion src/common/enums/subscription.type.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export enum SubscriptionType {
COMMUNICATION_ROOM_MESSAGE_RECEIVED = 'communicationRoomMessageReceived', // todo remove
COMMUNICATION_DISCUSSION_UPDATED = 'communicationDiscussionUpdated',
FORUM_DISCUSSION_UPDATED = 'forumDiscussionUpdated',
WHITEBOARD_CONTENT_UPDATED = 'whiteboardContentUpdated',
WHITEBOARD_SAVED = 'whiteboardSaved',
PROFILE_VERIFIED_CREDENTIAL = 'profileVerifiedCredential',
CALLOUT_POST_CREATED = 'calloutPostCreated',
SUBSPACE_CREATED = 'subspaceCreated',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import { LogContext, AlkemioErrorStatus } from '@common/enums';
import { BaseException } from './base.exception';

export class CommunicationDiscussionCategoryException extends BaseException {
export class ForumDiscussionCategoryException extends BaseException {
constructor(error: string, context: LogContext, code?: AlkemioErrorStatus) {
super(
error,
context,
code ?? AlkemioErrorStatus.COMMUNICATION_DISCUSSION_CATEGORY
);
super(error, context, code ?? AlkemioErrorStatus.FORUM_DISCUSSION_CATEGORY);
}
}
29 changes: 0 additions & 29 deletions src/common/utils/match.enum.spec.ts

This file was deleted.

Loading

0 comments on commit b19e14b

Please sign in to comment.