Skip to content

Commit

Permalink
[VC] Knowledge base instead of Subspace BoK in Written Knowledge step (
Browse files Browse the repository at this point in the history
…#7381)

* added new tabs to user + org admin pages; refactored how admin pages for users + orgs + vcs are managed; moved some global admin functionality out of domain down to platform admin; ...

* updated generation to match api tidy ups related to set of preference types + ID passing for org mutations

* fix compile errors related to dropping of separate UserPreferenceType enum

* Synchronize icons, remove comments, make sure there are no redundant settings calls.

* Links & Docs to BoK on VC creation (#7365)

* VC documents and links BoK - refactor the AddContent

* VC documents and links implementation without validation;

* resolve rabbit comments

---------

Co-authored-by: Petar Kolev <[email protected]>
Co-authored-by: reactoholic <[email protected]>

* Links and Docs - forgotten commit with Validation  (#7377)

* CalloutsSet entity (#7376)

* codegen passing with updated api

* fixed api + codegen passes

* code compiling

* pick up create callout privilege from the CalloutsSet

* callouts showing up after creation

* retrieving of callouts using only calloutsSet ID

* moved code around to have notion of calloutsSet in tree

* fix array dep breaking tool creation; small code optimizations;

---------

Co-authored-by: bobbykolev <[email protected]>

* VC knowledge base instead of subspace init

* Space creation after VC creation, loading, code opt & reorganization

* Fix docs uploading, code organization and documentation;

* fix uploading of docs in case there's no space under the acc; remove misleading createdSpaceId usage;

* useLoadingState instead of a new React State

* Fix - set properly the persona type depending on the 3 steps;

* Ability to select SpaceLevel2 on create VC (#7386)

* VC Knowledge Base callouts dialog (#7388)

* VC Knowledge Base callouts dialog - init.
* Filter available callout types.
* disable rich media on VC callout creation.
* Description component with update functionality.
* Update the Create Written Knowledge UI and initial state; Fix dialog titles in VC flow.
* Reingest logic in the Knowledge dialog.
* Remove the icon logic for CalloutVisibilityChangeDialog.
* Use the account hostname for space created in the VC flow.

* fix VC dialog not opening; remove outdated copy;

* storage config for KnowledgeBase description

---------

Co-authored-by: Neil Smyth <[email protected]>
Co-authored-by: Petar Kolev <[email protected]>
Co-authored-by: reactoholic <[email protected]>
Co-authored-by: Neil Smyth <[email protected]>
Co-authored-by: Carlos Cano <[email protected]>
  • Loading branch information
6 people authored Jan 13, 2025
1 parent 4e82ec3 commit 26e8f4e
Show file tree
Hide file tree
Showing 43 changed files with 1,199 additions and 689 deletions.
144 changes: 117 additions & 27 deletions src/core/apollo/generated/apollo-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3732,6 +3732,27 @@ export const ShortAccountItemFragmentDoc = gql`
}
${VisualUriFragmentDoc}
`;
export const VcSelectableSpaceFragmentDoc = gql`
fragment VCSelectableSpace on Space {
id
type
profile {
id
displayName
url
}
community {
id
roleSet {
id
authorization {
id
myPrivileges
}
}
}
}
`;
export const RecentSpaceProfileFragmentDoc = gql`
fragment RecentSpaceProfile on Profile {
id
Expand Down Expand Up @@ -14707,6 +14728,81 @@ export type RefreshBodyOfKnowledgeMutationOptions = Apollo.BaseMutationOptions<
SchemaTypes.RefreshBodyOfKnowledgeMutation,
SchemaTypes.RefreshBodyOfKnowledgeMutationVariables
>;
export const VirtualContributorKnowledgeBaseDocument = gql`
query VirtualContributorKnowledgeBase($id: UUID_NAMEID!) {
virtualContributor(ID: $id) {
id
knowledgeBase {
id
profile {
id
displayName
description
}
calloutsSet {
id
}
}
}
}
`;

/**
* __useVirtualContributorKnowledgeBaseQuery__
*
* To run a query within a React component, call `useVirtualContributorKnowledgeBaseQuery` and pass it any options that fit your needs.
* When your component renders, `useVirtualContributorKnowledgeBaseQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useVirtualContributorKnowledgeBaseQuery({
* variables: {
* id: // value for 'id'
* },
* });
*/
export function useVirtualContributorKnowledgeBaseQuery(
baseOptions: Apollo.QueryHookOptions<
SchemaTypes.VirtualContributorKnowledgeBaseQuery,
SchemaTypes.VirtualContributorKnowledgeBaseQueryVariables
>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
SchemaTypes.VirtualContributorKnowledgeBaseQuery,
SchemaTypes.VirtualContributorKnowledgeBaseQueryVariables
>(VirtualContributorKnowledgeBaseDocument, options);
}

export function useVirtualContributorKnowledgeBaseLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
SchemaTypes.VirtualContributorKnowledgeBaseQuery,
SchemaTypes.VirtualContributorKnowledgeBaseQueryVariables
>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
SchemaTypes.VirtualContributorKnowledgeBaseQuery,
SchemaTypes.VirtualContributorKnowledgeBaseQueryVariables
>(VirtualContributorKnowledgeBaseDocument, options);
}

export type VirtualContributorKnowledgeBaseQueryHookResult = ReturnType<typeof useVirtualContributorKnowledgeBaseQuery>;
export type VirtualContributorKnowledgeBaseLazyQueryHookResult = ReturnType<
typeof useVirtualContributorKnowledgeBaseLazyQuery
>;
export type VirtualContributorKnowledgeBaseQueryResult = Apollo.QueryResult<
SchemaTypes.VirtualContributorKnowledgeBaseQuery,
SchemaTypes.VirtualContributorKnowledgeBaseQueryVariables
>;
export function refetchVirtualContributorKnowledgeBaseQuery(
variables: SchemaTypes.VirtualContributorKnowledgeBaseQueryVariables
) {
return { query: VirtualContributorKnowledgeBaseDocument, variables: variables };
}

export const VcMembershipsDocument = gql`
query VCMemberships($virtualContributorId: UUID_NAMEID!) {
virtualContributor(ID: $virtualContributorId) {
Expand Down Expand Up @@ -17768,6 +17864,22 @@ export const CreateVirtualContributorOnAccountDocument = gql`
id
url
}
knowledgeBase {
id
calloutsSet {
id
callouts {
id
framing {
id
profile {
id
displayName
}
}
}
}
}
}
}
`;
Expand Down Expand Up @@ -24269,45 +24381,23 @@ export const NewVirtualContributorMySpacesDocument = gql`
id
availableEntitlements
}
community {
id
roleSet {
id
authorization {
id
myPrivileges
}
}
}
profile {
id
displayName
url
}
authorization {
id
myPrivileges
}
...VCSelectableSpace
subspaces {
id
type
profile {
id
displayName
url
}
community {
id
roleSet {
id
}
...VCSelectableSpace
subspaces {
...VCSelectableSpace
}
}
}
}
}
}
}
${VcSelectableSpaceFragmentDoc}
`;

/**
Expand Down
130 changes: 113 additions & 17 deletions src/core/apollo/generated/graphql-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6734,6 +6734,11 @@ export type UpdateInnovationPackInput = {
searchVisibility?: InputMaybe<SearchVisibility>;
};

export type UpdateKnowledgeBaseInput = {
/** The Profile of the Template. */
profile?: InputMaybe<UpdateProfileInput>;
};

export type UpdateLicensePlanInput = {
ID: Scalars['UUID'];
/** Assign this plan to all new Organization accounts */
Expand Down Expand Up @@ -7014,6 +7019,8 @@ export type UpdateUserSettingsPrivacyInput = {
export type UpdateVirtualContributorInput = {
/** The ID of the Virtual Contributor to update. */
ID: Scalars['UUID'];
/** The KnowledgeBase to use for this Collaboration. */
knowledgeBaseData?: InputMaybe<UpdateKnowledgeBaseInput>;
/** Flag to control the visibility of the VC in the platform store. */
listedInStore?: InputMaybe<Scalars['Boolean']>;
/** A display identifier, unique within the containing scope. Note: updating the nameID will affect URL on the client. */
Expand Down Expand Up @@ -19409,6 +19416,26 @@ export type RefreshBodyOfKnowledgeMutation = {
refreshVirtualContributorBodyOfKnowledge: boolean;
};

export type VirtualContributorKnowledgeBaseQueryVariables = Exact<{
id: Scalars['UUID_NAMEID'];
}>;

export type VirtualContributorKnowledgeBaseQuery = {
__typename?: 'Query';
virtualContributor: {
__typename?: 'VirtualContributor';
id: string;
knowledgeBase?:
| {
__typename?: 'KnowledgeBase';
id: string;
profile: { __typename?: 'Profile'; id: string; displayName: string; description?: string | undefined };
calloutsSet: { __typename?: 'CalloutsSet'; id: string };
}
| undefined;
};
};

export type VcMembershipsQueryVariables = Exact<{
virtualContributorId: Scalars['UUID_NAMEID'];
}>;
Expand Down Expand Up @@ -23316,6 +23343,25 @@ export type CreateVirtualContributorOnAccountMutation = {
id: string;
nameID: string;
profile: { __typename?: 'Profile'; id: string; url: string };
knowledgeBase?:
| {
__typename?: 'KnowledgeBase';
id: string;
calloutsSet: {
__typename?: 'CalloutsSet';
id: string;
callouts: Array<{
__typename?: 'Callout';
id: string;
framing: {
__typename?: 'CalloutFraming';
id: string;
profile: { __typename?: 'Profile'; id: string; displayName: string };
};
}>;
};
}
| undefined;
};
};

Expand Down Expand Up @@ -31530,27 +31576,12 @@ export type NewVirtualContributorMySpacesQuery = {
spaces: Array<{
__typename?: 'Space';
id: string;
type: SpaceType;
license: {
__typename?: 'License';
id: string;
availableEntitlements?: Array<LicenseEntitlementType> | undefined;
};
community: {
__typename?: 'Community';
id: string;
roleSet: {
__typename?: 'RoleSet';
id: string;
authorization?:
| {
__typename?: 'Authorization';
id: string;
myPrivileges?: Array<AuthorizationPrivilege> | undefined;
}
| undefined;
};
};
profile: { __typename?: 'Profile'; id: string; displayName: string; url: string };
authorization?:
| {
__typename?: 'Authorization';
Expand All @@ -31562,13 +31593,60 @@ export type NewVirtualContributorMySpacesQuery = {
__typename?: 'Space';
id: string;
type: SpaceType;
subspaces: Array<{
__typename?: 'Space';
id: string;
type: SpaceType;
profile: { __typename?: 'Profile'; id: string; displayName: string; url: string };
community: {
__typename?: 'Community';
id: string;
roleSet: {
__typename?: 'RoleSet';
id: string;
authorization?:
| {
__typename?: 'Authorization';
id: string;
myPrivileges?: Array<AuthorizationPrivilege> | undefined;
}
| undefined;
};
};
}>;
profile: { __typename?: 'Profile'; id: string; displayName: string; url: string };
community: {
__typename?: 'Community';
id: string;
roleSet: { __typename?: 'RoleSet'; id: string };
roleSet: {
__typename?: 'RoleSet';
id: string;
authorization?:
| {
__typename?: 'Authorization';
id: string;
myPrivileges?: Array<AuthorizationPrivilege> | undefined;
}
| undefined;
};
};
}>;
profile: { __typename?: 'Profile'; id: string; displayName: string; url: string };
community: {
__typename?: 'Community';
id: string;
roleSet: {
__typename?: 'RoleSet';
id: string;
authorization?:
| {
__typename?: 'Authorization';
id: string;
myPrivileges?: Array<AuthorizationPrivilege> | undefined;
}
| undefined;
};
};
}>;
}
| undefined;
Expand All @@ -31577,6 +31655,24 @@ export type NewVirtualContributorMySpacesQuery = {
};
};

export type VcSelectableSpaceFragment = {
__typename?: 'Space';
id: string;
type: SpaceType;
profile: { __typename?: 'Profile'; id: string; displayName: string; url: string };
community: {
__typename?: 'Community';
id: string;
roleSet: {
__typename?: 'RoleSet';
id: string;
authorization?:
| { __typename?: 'Authorization'; id: string; myPrivileges?: Array<AuthorizationPrivilege> | undefined }
| undefined;
};
};
};

export type RecentSpacesQueryVariables = Exact<{
limit?: InputMaybe<Scalars['Float']>;
}>;
Expand Down
Loading

0 comments on commit 26e8f4e

Please sign in to comment.