From 74b59168b2a01995bb16cea4a027b47b9f3c3e56 Mon Sep 17 00:00:00 2001 From: Aleksandar Stojanovic Date: Mon, 15 Apr 2024 13:20:22 +0200 Subject: [PATCH 1/4] Prune orphans v2 with logging. (#55) * Prune orphans v2 with logging. * Fix merge. * Refactor. * Make script loop until all orphans are pruned. * Update info logging. --- package.json | 3 +- .../createDeletedEntitiesReport.ts | 26 ++ ...TableRelationsAndUpdateRelationsNodeMap.ts | 67 ++++ src/prune-orphan-data/prune-orphan-data-v2.ts | 297 ++++++++++++++++++ src/prune-orphan-data/prune-orphan-data.ts | 19 +- src/prune-orphan-data/{ => types}/node.ts | 0 src/prune-orphan-data/utils.ts | 27 ++ 7 files changed, 429 insertions(+), 10 deletions(-) create mode 100644 src/prune-orphan-data/createDeletedEntitiesReport.ts create mode 100644 src/prune-orphan-data/getTableRelationsAndUpdateRelationsNodeMap.ts create mode 100644 src/prune-orphan-data/prune-orphan-data-v2.ts rename src/prune-orphan-data/{ => types}/node.ts (100%) create mode 100644 src/prune-orphan-data/utils.ts diff --git a/package.json b/package.json index d5b309a..8d30742 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "spaces-license-usage-excel": "ts-node-dev src/spaces-license-usage-excel/spaces-license-usage-excel.ts", "prepublishOnly": "npm run build", "codegen": "graphql-codegen --config codegen.yml", - "prune-orphans": "ts-node-dev src/prune-orphan-data/prune-orphan-data.ts", + "prune-orphans-old": "ts-node-dev src/prune-orphan-data/prune-orphan-data.ts", + "prune-orphans-v2": "ts-node-dev src/prune-orphan-data/prune-orphan-data-v2.ts", "search-ingestion": "ts-node-dev src/search-ingestion/search-ingestion.ts" }, "repository": { diff --git a/src/prune-orphan-data/createDeletedEntitiesReport.ts b/src/prune-orphan-data/createDeletedEntitiesReport.ts new file mode 100644 index 0000000..e22a577 --- /dev/null +++ b/src/prune-orphan-data/createDeletedEntitiesReport.ts @@ -0,0 +1,26 @@ +import XLSX from 'xlsx'; + +export type DeletedEntityRecord = { + orphanId: number; + table: string; + id: string; + parentTable?: string; + parentId?: string; + authorizationId?: string; +} & { + [key: string]: any; +}; + +export const createDeletedEntitiesReport = ( + deletedEntities: DeletedEntityRecord[] +) => { + const timestamp = new Date().getTime(); + const worksheetName = 'orphans'; + const workbookName = `./${timestamp}-deleted-orphans.xlsx`; + + const workbook = XLSX.utils.book_new(); + const orphansSheet = XLSX.utils.json_to_sheet(deletedEntities); + XLSX.utils.book_append_sheet(workbook, orphansSheet, worksheetName); + + XLSX.writeFile(workbook, workbookName); +}; diff --git a/src/prune-orphan-data/getTableRelationsAndUpdateRelationsNodeMap.ts b/src/prune-orphan-data/getTableRelationsAndUpdateRelationsNodeMap.ts new file mode 100644 index 0000000..b1ec7e0 --- /dev/null +++ b/src/prune-orphan-data/getTableRelationsAndUpdateRelationsNodeMap.ts @@ -0,0 +1,67 @@ +import { Table } from 'typeorm'; +import { Node, Relation, RelationType } from './types/node'; + +export const getTableRelationsAndUpdateRelationsNodeMap = ( + tables: Table[], + nodeMap: Map +) => { + for (const table of tables) { + for (const foreignKey of table.foreignKeys) { + const parent = nodeMap.get(table.name); + + if (!parent) { + throw new Error(`Node '${table.name}' not found`); + } + + const child = nodeMap.get(foreignKey.referencedTableName); + + if (!child) { + throw new Error(`Node '${foreignKey.referencedTableName}' not found`); + } + + const index = table.indices.find(index => + index.columnNames.includes(foreignKey.columnNames[0]) + ); + if (index?.isUnique) { + child.parents.push( + new Relation( + parent, + foreignKey.columnNames[0], + foreignKey.referencedColumnNames[0], + foreignKey?.name, + RelationType.OneToOne + ) + ); + parent.children.push( + new Relation( + child, + foreignKey.referencedColumnNames[0], + foreignKey.columnNames[0], + foreignKey?.name, + RelationType.OneToOne + ) + ); + } else { + parent.parents.push( + new Relation( + child, + foreignKey.referencedColumnNames[0], + foreignKey.columnNames[0], + foreignKey?.name, + RelationType.ManyToOne + ) + ); + + child.children.push( + new Relation( + parent, + foreignKey.columnNames[0], + foreignKey.referencedColumnNames[0], + foreignKey?.name, + RelationType.OneToMany + ) + ); + } + } + } +}; diff --git a/src/prune-orphan-data/prune-orphan-data-v2.ts b/src/prune-orphan-data/prune-orphan-data-v2.ts new file mode 100644 index 0000000..c639cfb --- /dev/null +++ b/src/prune-orphan-data/prune-orphan-data-v2.ts @@ -0,0 +1,297 @@ +import { QueryRunner } from 'typeorm'; +import { + DeletedEntityRecord, + createDeletedEntitiesReport, +} from './createDeletedEntitiesReport'; +import { datasource } from './migration.config'; +import { Node, RelationType } from './types/node'; +import { addParentRelationsChecks } from './utils'; +import { getTableRelationsAndUpdateRelationsNodeMap } from './getTableRelationsAndUpdateRelationsNodeMap'; + +let totalEntitiesRemoved = 0; +let orphanId = 0; +const entitiesRemovedMap = new Map(); +const DeletedEntities: DeletedEntityRecord[] = []; +let newOrphansPerRun = false; +let scriptRuns = 0; +const maxScriptRuns = 5; + +const reportDeletedEntities = ( + rows: any[], + orphanId: number, + table: string, + parentTable?: string, + parentId?: string +) => { + const deletedEntities: DeletedEntityRecord[] = rows.map(row => ({ + orphanId, + table, + id: row.id, + parentTable, + parentId, + authorizationId: row.authorizationId, + })); + DeletedEntities.push(...deletedEntities); +}; + +const addDeletedEntitiesCount = (table: string, count: number) => { + const currentCount = entitiesRemovedMap.get(table) || 0; + entitiesRemovedMap.set(table, currentCount + count); +}; + +type DeleteRowOptions = { + queryRunner: QueryRunner; + table: string; + row: any; + orphanId: number; +}; + +const deleteRow = async (options: DeleteRowOptions) => { + const { queryRunner, table, row, orphanId } = options; + try { + await queryRunner.query(`DELETE FROM ${table} WHERE id = ?`, [row.id]); + reportDeletedEntities([row], orphanId, table); + } catch (error) { + console.error( + `Failed to delete orphaned data with id ${row.id} from table ${table}.`, + error + ); + } +}; + +type DeleteChildRowOptions = { + queryRunner: QueryRunner; + table: string; + refColumnName: string; + refColumnId: string; + parentTable: string; + parentId: string; + orphanId: number; +}; + +const deleteChildRow = async (options: DeleteChildRowOptions) => { + const { + queryRunner, + table, + refColumnName, + refColumnId, + parentTable, + parentId, + orphanId, + } = options; + try { + const childRowsBeforeDelete: { id: string }[] = await queryRunner.query( + `SELECT * FROM ${table} WHERE ${refColumnName} = ?`, + [refColumnId] + ); + + await queryRunner.query(`DELETE FROM ${table} WHERE ${refColumnName} = ?`, [ + refColumnId, + ]); + + reportDeletedEntities( + childRowsBeforeDelete, + orphanId, + table, + parentTable, + parentId + ); + totalEntitiesRemoved += childRowsBeforeDelete.length; + addDeletedEntitiesCount(table, childRowsBeforeDelete.length); + } catch (error) { + console.error( + `Failed to delete child data from table ${table} where ref column ${refColumnName} is ${parentId}.`, + error + ); + } +}; + +const pruneChildren = async ( + nodeMap: Map, + table: string, + queryRunner: QueryRunner, + row: any, + relationsFilter: RelationType[], + orphanId: number +) => { + const childRelations = nodeMap.get(table)?.children; + if (!childRelations) return; + + for (const rel of childRelations) { + if ( + rel.type === RelationType.OneToOne && + relationsFilter.includes(rel.type) + ) { + const [childOrphan] = await queryRunner.query( + `SELECT * FROM ${rel.node.name} WHERE ${rel.refColumnName} = ?`, + [row[rel.refChildColumnName]] + ); + + if (childOrphan) { + await pruneChildren( + nodeMap, + rel.node.name, + queryRunner, + childOrphan, + [RelationType.OneToMany], + orphanId + ); + await deleteChildRow({ + queryRunner, + table: rel.node.name, + refColumnName: rel.refColumnName, + refColumnId: row[rel.refChildColumnName], + parentTable: table, + parentId: row.id, + orphanId, + }); + await pruneChildren( + nodeMap, + rel.node.name, + queryRunner, + childOrphan, + [RelationType.OneToOne], + orphanId + ); + } + } + + if ( + rel.type === RelationType.OneToMany && + relationsFilter.includes(rel.type) + ) { + const childOrphans = await queryRunner.query( + `SELECT * FROM ${rel.node.name} WHERE ${rel.refColumnName} = ?`, + [row[rel.refChildColumnName]] + ); + + if (childOrphans) { + for (const childOrphan of childOrphans) { + await pruneChildren( + nodeMap, + rel.node.name, + queryRunner, + childOrphan, + [RelationType.OneToMany], + orphanId + ); + } + await deleteChildRow({ + queryRunner, + table: rel.node.name, + refColumnName: rel.refColumnName, + refColumnId: row.id, + parentTable: table, + parentId: row.id, + orphanId, + }); + for (const childOrphan of childOrphans) { + await pruneChildren( + nodeMap, + rel.node.name, + queryRunner, + childOrphan, + [RelationType.OneToOne], + orphanId + ); + } + } + } + } +}; + +(async () => { + await datasource.initialize(); + const queryRunner = datasource.createQueryRunner(); + await queryRunner.connect(); + + const tables = (await queryRunner.getTables()).filter( + table => table.database === 'alkemio' + ); + + const nodeMap: Map = new Map( + tables.map(table => [table.name, new Node(table.name)]) + ); + + getTableRelationsAndUpdateRelationsNodeMap(tables, nodeMap); + + // const tablesToInclude: string[] = ['callout']; + // const fitleredTables = tables.filter(table => + // tablesToInclude.includes(table.name) + // ); + const tablesToSkip: string[] = ['user', 'application_questions', 'document']; + const fitleredTables = tables.filter( + table => !tablesToSkip.includes(table.name) + ); + + totalEntitiesRemoved = 0; + + do { + newOrphansPerRun = false; + scriptRuns++; + console.log( + `Running ${scriptRuns}. script cycle,`, + `current total entities removed: ${totalEntitiesRemoved}` + ); + console.log('Checking for orphaned data...'); + for (const table of fitleredTables) { + // Generate the SQL query to find orphaned data + let orphanedDataQuery = `SELECT * FROM ${table.name} WHERE `; + const parentRelations = nodeMap.get(table.name)?.parents; + + if (!parentRelations || parentRelations.length === 0) continue; + + const parentRelationsChecks: string[] = []; + addParentRelationsChecks(parentRelations, parentRelationsChecks, table); + + if (parentRelationsChecks.length === 0) { + continue; + } + + orphanedDataQuery = orphanedDataQuery.concat( + parentRelationsChecks.join(' AND ') + ); + + // Find any orphaned data + const orphanedData: any[] = await queryRunner.query(orphanedDataQuery); + + if (orphanedData.length) newOrphansPerRun = true; + + // Delete any orphaned data + for (const row of orphanedData) { + orphanId++; + await pruneChildren( + nodeMap, + table.name, + queryRunner, + row, + [RelationType.OneToMany], + orphanId + ); + await deleteRow({ queryRunner, table: table.name, row, orphanId }); + await pruneChildren( + nodeMap, + table.name, + queryRunner, + row, + [RelationType.OneToOne], + orphanId + ); + } + totalEntitiesRemoved += orphanedData.length; + addDeletedEntitiesCount(table.name, orphanedData.length); + } + if (!newOrphansPerRun) { + console.log('No new orphans found.'); + } + if (scriptRuns >= maxScriptRuns) { + console.log('Max script runs reached. Exiting...'); + } + } while (newOrphansPerRun); + + console.log(`Total orphaned entities removed: ${totalEntitiesRemoved}`); + console.log(entitiesRemovedMap); + + createDeletedEntitiesReport(DeletedEntities); + process.exit(0); +})(); diff --git a/src/prune-orphan-data/prune-orphan-data.ts b/src/prune-orphan-data/prune-orphan-data.ts index d11dba3..5435dc1 100644 --- a/src/prune-orphan-data/prune-orphan-data.ts +++ b/src/prune-orphan-data/prune-orphan-data.ts @@ -1,5 +1,6 @@ +import { QueryRunner } from 'typeorm'; import { datasource } from './migration.config'; -import { Node, Relation, RelationType } from './node'; +import { Node, Relation, RelationType } from './types/node'; let totalEntitiesRemoved = 0; const entitiesRemovedMap = new Map(); @@ -20,7 +21,7 @@ function createNotInCheck(table: string, fk: Relation): string { return `${table}.${fk.refChildColumnName} NOT IN (SELECT ${fk.refColumnName} FROM ${fk.node.name})`; } -async function deleteRow(queryRunner: any, table: string, id: string) { +async function deleteRow(queryRunner: QueryRunner, table: string, id: string) { try { await queryRunner.query(`DELETE FROM ${table} WHERE id = ?`, [id]); } catch (error) { @@ -32,7 +33,7 @@ async function deleteRow(queryRunner: any, table: string, id: string) { } async function deleteChildRow( - queryRunner: any, + queryRunner: QueryRunner, table: string, refColumnName: string, id: string @@ -52,7 +53,7 @@ async function deleteChildRow( async function pruneChildren( nodeMap: Map, table: string, - queryRunner: any, + queryRunner: QueryRunner, row: any, relationsFilter: RelationType[] ) { @@ -77,7 +78,7 @@ async function pruneChildren( queryRunner, rel.node.name, rel.refColumnName, - row.id + row[rel.refChildColumnName] ); await pruneChildren(nodeMap, rel.node.name, queryRunner, childOrphan, [ RelationType.OneToOne, @@ -202,10 +203,10 @@ async function pruneChildren( } } - // const tablesToInclude: string[] = ['callout_framing']; - // const fitleredTables = tables.filter((table) => - // tablesToInclude.includes(table.name) - // ); + // const tablesToInclude: string[] = ['callout']; + // const fitleredTables = tables.filter(table => + // tablesToInclude.includes(table.name) + // ); const tablesToSkip: string[] = ['user', 'application_questions']; const fitleredTables = tables.filter( table => !tablesToSkip.includes(table.name) diff --git a/src/prune-orphan-data/node.ts b/src/prune-orphan-data/types/node.ts similarity index 100% rename from src/prune-orphan-data/node.ts rename to src/prune-orphan-data/types/node.ts diff --git a/src/prune-orphan-data/utils.ts b/src/prune-orphan-data/utils.ts new file mode 100644 index 0000000..aa371cc --- /dev/null +++ b/src/prune-orphan-data/utils.ts @@ -0,0 +1,27 @@ +import { Table } from 'typeorm'; +import { Relation } from './types/node'; + +const ColumnsWithAllowedNullValues = ['createdBy']; +export const createIsNullCheck = (str: string): string => { + if (str.endsWith('.id')) return ''; + if (ColumnsWithAllowedNullValues.includes(str)) return ''; + return ` OR ${str} IS NULL`; +}; + +export const createNotInCheck = (table: string, fk: Relation): string => { + return `${table}.${fk.refChildColumnName} NOT IN (SELECT ${fk.refColumnName} FROM ${fk.node.name})`; +}; + +export const addParentRelationsChecks = ( + parentRelations: Relation[], + parentRelationsChecks: string[], + table: Table +) => { + for (const fk of parentRelations) { + parentRelationsChecks.push( + `(${createNotInCheck(table.name, fk)} ${createIsNullCheck( + `${table.name}.${fk.refChildColumnName}` + )})` + ); + } +}; From c20f308d6deb94d1126c0cf54c8bde78dbcca1ef Mon Sep 17 00:00:00 2001 From: Neil Smyth <30729240+techsmyth@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:27:55 +0200 Subject: [PATCH 2/4] initial setup for using digital twin data (#56) Co-authored-by: Valentin Yanakiev --- package.json | 2 + .../digital-twin-demo.graphql | 30 +++++++ src/digital-twin-demo/digital-twin-demo.ts | 32 ++++++++ src/digital-twin-demo/model/spaceMetaInfo.ts | 10 +++ src/generated/graphql.ts | 81 +++++++++++++++++++ 5 files changed, 155 insertions(+) create mode 100644 src/digital-twin-demo/digital-twin-demo.graphql create mode 100644 src/digital-twin-demo/digital-twin-demo.ts create mode 100644 src/digital-twin-demo/model/spaceMetaInfo.ts diff --git a/package.json b/package.json index 8d30742..dbdbf15 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,8 @@ "spaces-license-usage-excel": "ts-node-dev src/spaces-license-usage-excel/spaces-license-usage-excel.ts", "prepublishOnly": "npm run build", "codegen": "graphql-codegen --config codegen.yml", + "prune-orphans": "ts-node-dev src/prune-orphan-data/prune-orphan-data.ts", + "digital-twin-demo": "ts-node-dev src/digital-twin-demo/digital-twin-demo.ts", "prune-orphans-old": "ts-node-dev src/prune-orphan-data/prune-orphan-data.ts", "prune-orphans-v2": "ts-node-dev src/prune-orphan-data/prune-orphan-data-v2.ts", "search-ingestion": "ts-node-dev src/search-ingestion/search-ingestion.ts" diff --git a/src/digital-twin-demo/digital-twin-demo.graphql b/src/digital-twin-demo/digital-twin-demo.graphql new file mode 100644 index 0000000..aa35d19 --- /dev/null +++ b/src/digital-twin-demo/digital-twin-demo.graphql @@ -0,0 +1,30 @@ +query digitalTwinDemo( + $spaceNameID: UUID_NAMEID! +){ + space(ID:$spaceNameID) { + id + challenges { + profile { + displayName + tagline + } + context { + vision + impact + } + collaboration { + callouts { + comments { + messagesCount + } + framing { + profile { + displayName + tagline + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/digital-twin-demo/digital-twin-demo.ts b/src/digital-twin-demo/digital-twin-demo.ts new file mode 100644 index 0000000..4496748 --- /dev/null +++ b/src/digital-twin-demo/digital-twin-demo.ts @@ -0,0 +1,32 @@ +import { createConfigUsingEnvVars } from '../util/create-config-using-envvars'; +import { AlkemioCliClient } from '../client/AlkemioCliClient'; +import { createLogger } from '../util/create-logger'; + +const main = async () => { + await digitalTwinDemo(); +}; + +export const digitalTwinDemo = async () => { + const logger = createLogger(); + const config = createConfigUsingEnvVars(); + + const alkemioCliClient = new AlkemioCliClient(config, logger); + await alkemioCliClient.initialise(); + await alkemioCliClient.logUser(); + await alkemioCliClient.validateConnection(); + + const spacesQueryResult = await alkemioCliClient.sdkClient.digitalTwinDemo({ + spaceNameID: 'digileefomgeving', + }); + + const space = spacesQueryResult.data.space; + + const challenges = space.challenges || []; + + logger.info(`...total number of challeges: ${challenges.length}`); + logger.info(`...${JSON.stringify(space)}`); +}; + +main().catch(error => { + console.error(error); +}); diff --git a/src/digital-twin-demo/model/spaceMetaInfo.ts b/src/digital-twin-demo/model/spaceMetaInfo.ts new file mode 100644 index 0000000..8d47038 --- /dev/null +++ b/src/digital-twin-demo/model/spaceMetaInfo.ts @@ -0,0 +1,10 @@ +export class SpaceMetaInfo { + Name = ''; + ChallengesCount = 0; + MembersCount = 0; + HostOrgName = ''; + HostOrgOwnerName = ''; + Visibility = ''; + FeatureFlagWhiteboard = false; + FeatureFlagCalloutTemplates = false; +} diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index b2fd1b8..36e900a 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -12591,6 +12591,36 @@ export type SpaceChallengesCommunitiesQuery = { }; }; +export type DigitalTwinDemoQueryVariables = Exact<{ + spaceNameID: Scalars['UUID_NAMEID']; +}>; + +export type DigitalTwinDemoQuery = { + space: { + id: string; + challenges?: + | Array<{ + profile: { displayName: string; tagline: string }; + context?: + | { vision?: any | undefined; impact?: any | undefined } + | undefined; + collaboration?: + | { + callouts?: + | Array<{ + comments?: { messagesCount: number } | undefined; + framing: { + profile: { displayName: string; tagline: string }; + }; + }> + | undefined; + } + | undefined; + }> + | undefined; + }; +}; + export type InnovationFlowStatesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13047,6 +13077,36 @@ export const SpaceChallengesCommunitiesDocument = gql` } } `; +export const DigitalTwinDemoDocument = gql` + query digitalTwinDemo($spaceNameID: UUID_NAMEID!) { + space(ID: $spaceNameID) { + id + challenges { + profile { + displayName + tagline + } + context { + vision + impact + } + collaboration { + callouts { + comments { + messagesCount + } + framing { + profile { + displayName + tagline + } + } + } + } + } + } + } +`; export const InnovationFlowStatesDocument = gql` query innovationFlowStates { spaces(filter: { visibilities: [DEMO, ARCHIVED, ACTIVE] }) { @@ -13235,6 +13295,7 @@ const SpaceChallengesCalloutsDocumentString = print( const SpaceChallengesCommunitiesDocumentString = print( SpaceChallengesCommunitiesDocument ); +const DigitalTwinDemoDocumentString = print(DigitalTwinDemoDocument); const InnovationFlowStatesDocumentString = print(InnovationFlowStatesDocument); const RevokeCredentialFromUserDocumentString = print( RevokeCredentialFromUserDocument @@ -13533,6 +13594,26 @@ export function getSdk( 'query' ); }, + digitalTwinDemo( + variables: DigitalTwinDemoQueryVariables, + requestHeaders?: Dom.RequestInit['headers'] + ): Promise<{ + data: DigitalTwinDemoQuery; + extensions?: any; + headers: Dom.Headers; + status: number; + }> { + return withWrapper( + wrappedRequestHeaders => + client.rawRequest( + DigitalTwinDemoDocumentString, + variables, + { ...requestHeaders, ...wrappedRequestHeaders } + ), + 'digitalTwinDemo', + 'query' + ); + }, innovationFlowStates( variables?: InnovationFlowStatesQueryVariables, requestHeaders?: Dom.RequestInit['headers'] From 8f32bf6a7ec8ee9361137cf8936a3fc09e7bdeb1 Mon Sep 17 00:00:00 2001 From: Neil Smyth <30729240+techsmyth@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:25:29 +0200 Subject: [PATCH 3/4] Subspaces api (#57) * initial setup for using digital twin data * subspaces api compiling --------- Co-authored-by: Valentin Yanakiev --- .../authorization-reset-account.graphql | 9 + .../authorization-reset-space.graphql | 9 - .../queries/spaces-all-visibilities.graphql | 3 + ...l => spaces-subspace-subsubspaces.graphql} | 8 +- ...=> spaces-subspaces-collaboration.graphql} | 4 +- ...l => spaces-subspaces-communities.graphql} | 4 +- package-lock.json | 14 +- package.json | 5 +- ...ts => authorization-reset-all-accounts.ts} | 8 +- src/authorization-reset-all.ts | 4 +- src/client/AlkemioCliClient.ts | 8 +- src/delete-space-force.ts | 56 - .../digital-twin-demo.graphql | 2 +- src/generated/graphql.ts | 2096 +++++++---------- .../innovation-flow-states.graphql | 4 +- ...-detect-orphaned-credentials-from-users.ts | 44 +- ...paces-challenges-opportunities-ids.graphql | 4 +- src/scripts/application-form-dutch.ts | 4 +- .../spaces-license-usage-excel.graphql | 11 +- .../spaces-license-usage-excel.ts | 4 +- 20 files changed, 869 insertions(+), 1432 deletions(-) create mode 100644 graphql/mutations/authorization-reset-account.graphql delete mode 100755 graphql/mutations/authorization-reset-space.graphql rename graphql/queries/{spaces-challenge-opportunities.graphql => spaces-subspace-subsubspaces.graphql} (89%) rename graphql/queries/{spaces-challenges-callouts.graphql => spaces-subspaces-collaboration.graphql} (82%) rename graphql/queries/{spaces-challenges-communities.graphql => spaces-subspaces-communities.graphql} (65%) rename src/{authorization-reset-all-spaces.ts => authorization-reset-all-accounts.ts} (84%) delete mode 100644 src/delete-space-force.ts diff --git a/graphql/mutations/authorization-reset-account.graphql b/graphql/mutations/authorization-reset-account.graphql new file mode 100644 index 0000000..2dced3d --- /dev/null +++ b/graphql/mutations/authorization-reset-account.graphql @@ -0,0 +1,9 @@ +mutation authorizationPolicyResetOnAccount( + $authorizationResetData: AccountAuthorizationResetInput! +) { + authorizationPolicyResetOnAccount( + authorizationResetData: $authorizationResetData + ) { + id + } +} diff --git a/graphql/mutations/authorization-reset-space.graphql b/graphql/mutations/authorization-reset-space.graphql deleted file mode 100755 index a548166..0000000 --- a/graphql/mutations/authorization-reset-space.graphql +++ /dev/null @@ -1,9 +0,0 @@ -mutation authorizationPolicyResetOnSpace( - $authorizationResetData: SpaceAuthorizationResetInput! -) { - authorizationPolicyResetOnSpace( - authorizationResetData: $authorizationResetData - ) { - nameID - } -} diff --git a/graphql/queries/spaces-all-visibilities.graphql b/graphql/queries/spaces-all-visibilities.graphql index 901e746..38eb0eb 100644 --- a/graphql/queries/spaces-all-visibilities.graphql +++ b/graphql/queries/spaces-all-visibilities.graphql @@ -2,5 +2,8 @@ query spacesAllVisibilities { spaces(filter: { visibilities: [DEMO, ARCHIVED, ACTIVE] }) { id nameID + account { + id + } } } diff --git a/graphql/queries/spaces-challenge-opportunities.graphql b/graphql/queries/spaces-subspace-subsubspaces.graphql similarity index 89% rename from graphql/queries/spaces-challenge-opportunities.graphql rename to graphql/queries/spaces-subspace-subsubspaces.graphql index c790069..fc727fd 100644 --- a/graphql/queries/spaces-challenge-opportunities.graphql +++ b/graphql/queries/spaces-subspace-subsubspaces.graphql @@ -1,6 +1,6 @@ -query spaceChallengeOpportunities( +query spaceSubspaceSubspaces( $spaceId: UUID_NAMEID! - $challengeId: UUID_NAMEID! + $subspaceId: UUID_NAMEID! ) { space(ID: $spaceId) { id @@ -12,7 +12,7 @@ query spaceChallengeOpportunities( collaboration { id } - challenge(ID: $challengeId) { + subspace(ID: $subspaceId) { id nameID profile { @@ -26,7 +26,7 @@ query spaceChallengeOpportunities( type } } - opportunities { + subspaces { nameID profile { displayName diff --git a/graphql/queries/spaces-challenges-callouts.graphql b/graphql/queries/spaces-subspaces-collaboration.graphql similarity index 82% rename from graphql/queries/spaces-challenges-callouts.graphql rename to graphql/queries/spaces-subspaces-collaboration.graphql index 60a8897..274d467 100644 --- a/graphql/queries/spaces-challenges-callouts.graphql +++ b/graphql/queries/spaces-subspaces-collaboration.graphql @@ -1,4 +1,4 @@ -query spaceChallengesCallouts { +query spaceSubspacesCollaboration { spaces { id nameID @@ -9,7 +9,7 @@ query spaceChallengesCallouts { id } } - challenges { + subspaces { id nameID collaboration { diff --git a/graphql/queries/spaces-challenges-communities.graphql b/graphql/queries/spaces-subspaces-communities.graphql similarity index 65% rename from graphql/queries/spaces-challenges-communities.graphql rename to graphql/queries/spaces-subspaces-communities.graphql index 3a62b92..a7ed1da 100644 --- a/graphql/queries/spaces-challenges-communities.graphql +++ b/graphql/queries/spaces-subspaces-communities.graphql @@ -1,11 +1,11 @@ -query spaceChallengesCommunities($spaceId: UUID_NAMEID!) { +query spaceSubspacesCommunities($spaceId: UUID_NAMEID!) { space(ID: $spaceId) { id nameID community { id } - challenges { + subspaces { id nameID community { diff --git a/package-lock.json b/package-lock.json index 1ae5379..61c61d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.7.0", "license": "EUPL-1.2", "dependencies": { - "@alkemio/client-lib": "^0.27.0", + "@alkemio/client-lib": "^0.29.1", "@graphql-codegen/typescript-graphql-request": "^4.5.3", "@graphql-codegen/typescript-operations": "^2.5.3", "@types/graphql-upload": "^8.0.11", @@ -41,9 +41,9 @@ } }, "node_modules/@alkemio/client-lib": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@alkemio/client-lib/-/client-lib-0.27.0.tgz", - "integrity": "sha512-Gv4Ku6ZVt8+aF1Nsi1GLVzm2fCzTroS6szKs3/qZIqcFLkgFWEKNpPqb3ROU09c2qVD5tJMmsb5Zdetc/abO2Q==", + "version": "0.29.1", + "resolved": "https://registry.npmjs.org/@alkemio/client-lib/-/client-lib-0.29.1.tgz", + "integrity": "sha512-O88UJtpY6kdQ/5qpvpRs7hmCdKpL5/ZUD8CoaNY6TNDz7jX6bQexs58VBW239NI/UajEWRwIb/QwVxskz+ikvg==", "dependencies": { "@graphql-codegen/typescript-graphql-request": "^4.5.3", "@graphql-codegen/typescript-operations": "^2.5.3", @@ -7397,9 +7397,9 @@ }, "dependencies": { "@alkemio/client-lib": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@alkemio/client-lib/-/client-lib-0.27.0.tgz", - "integrity": "sha512-Gv4Ku6ZVt8+aF1Nsi1GLVzm2fCzTroS6szKs3/qZIqcFLkgFWEKNpPqb3ROU09c2qVD5tJMmsb5Zdetc/abO2Q==", + "version": "0.29.1", + "resolved": "https://registry.npmjs.org/@alkemio/client-lib/-/client-lib-0.29.1.tgz", + "integrity": "sha512-O88UJtpY6kdQ/5qpvpRs7hmCdKpL5/ZUD8CoaNY6TNDz7jX6bQexs58VBW239NI/UajEWRwIb/QwVxskz+ikvg==", "requires": { "@graphql-codegen/typescript-graphql-request": "^4.5.3", "@graphql-codegen/typescript-operations": "^2.5.3", diff --git a/package.json b/package.json index dbdbf15..480411b 100644 --- a/package.json +++ b/package.json @@ -19,14 +19,13 @@ "lint": "tsc --noEmit && eslint src/**/*.ts{,x}", "lint:fix": "tsc --noEmit && eslint src/**/*.ts{,x} --fix", "nodemon": "nodemon", - "delete-space-force": "ts-node-dev src/delete-space-force.ts", "delete-organization": "ts-node-dev src/delete-organization.ts", "remove-user-from-organizations": "ts-node-dev src/remove-user-from-organizations.ts", "authorization-reset-platform": "ts-node-dev src/authorization-reset-platform.ts", "authorization-reset-with-config": "ts-node-dev src/authorization-reset-all.ts true", "authorization-reset-all": "ts-node-dev src/authorization-reset-all.ts", "authorization-reset-all-users": "ts-node-dev src/authorization-reset-all-users.ts", - "authorization-reset-all-spaces": "ts-node-dev src/authorization-reset-all-spaces.ts", + "authorization-reset-all-accounts": "ts-node-dev src/authorization-reset-all-accounts.ts", "authorization-reset-all-organizations": "ts-node-dev src/authorization-reset-all-organizations.ts", "authorization-detect-orphaned-credentials-from-users": "ts-node-dev src/orphaned-credentials/authorization-detect-orphaned-credentials-from-users.ts", "migration-add-default-discussion-callouts": "ts-node-dev src/migration/add-default-discussion-callouts.ts", @@ -64,7 +63,7 @@ "ts-node-dev": "^2.0.0" }, "dependencies": { - "@alkemio/client-lib": "^0.27.0", + "@alkemio/client-lib": "^0.29.1", "@graphql-codegen/typescript-graphql-request": "^4.5.3", "@graphql-codegen/typescript-operations": "^2.5.3", "@types/graphql-upload": "^8.0.11", diff --git a/src/authorization-reset-all-spaces.ts b/src/authorization-reset-all-accounts.ts similarity index 84% rename from src/authorization-reset-all-spaces.ts rename to src/authorization-reset-all-accounts.ts index 9e24606..7025a5c 100644 --- a/src/authorization-reset-all-spaces.ts +++ b/src/authorization-reset-all-accounts.ts @@ -5,10 +5,10 @@ import { EntityType, retryFunction, shouldProcessEntity } from './util'; const main = async (useConfig = false) => { if (process.argv[2]) useConfig = process.argv[2] === 'true'; - await resetAllSpaces(useConfig); + await resetAllAccounts(useConfig); }; -export const resetAllSpaces = async (useConfig: boolean) => { +export const resetAllAccounts = async (useConfig: boolean) => { const logger = createLogger(); const config = createConfigUsingEnvVars(); @@ -30,7 +30,9 @@ export const resetAllSpaces = async (useConfig: boolean) => { logger.info(`[${count}] - processing space (${space.nameID})`); await retryFunction( - alkemioCliClient.authorizationResetSpace({ spaceID: space.id }) + alkemioCliClient.authorizationResetAccount({ + accountID: space.account.id, + }) ); } } diff --git a/src/authorization-reset-all.ts b/src/authorization-reset-all.ts index 4fbde9d..2551df4 100644 --- a/src/authorization-reset-all.ts +++ b/src/authorization-reset-all.ts @@ -1,12 +1,12 @@ import { resetAllUsers } from './authorization-reset-all-users'; -import { resetAllSpaces } from './authorization-reset-all-spaces'; +import { resetAllAccounts } from './authorization-reset-all-accounts'; import { resetAllOrganizations } from './authorization-reset-all-organizations'; import { resetPlatform } from './authorization-reset-platform'; const main = async (useConfig = false) => { if (process.argv[2]) useConfig = process.argv[2] === 'true'; await resetAllUsers(useConfig); - await resetAllSpaces(useConfig); + await resetAllAccounts(useConfig); await resetAllOrganizations(useConfig); await resetPlatform(); }; diff --git a/src/client/AlkemioCliClient.ts b/src/client/AlkemioCliClient.ts index 9a899ea..5bdf175 100644 --- a/src/client/AlkemioCliClient.ts +++ b/src/client/AlkemioCliClient.ts @@ -4,8 +4,8 @@ import { Sdk, getSdk, OrganizationAuthorizationResetInput, - SpaceAuthorizationResetInput, UserAuthorizationResetInput, + AccountAuthorizationResetInput, } from '../generated/graphql'; import { Logger } from 'winston'; import { AlkemioClient, AlkemioClientConfig } from '@alkemio/client-lib'; @@ -61,10 +61,10 @@ export class AlkemioCliClient { return result.data; } - public async authorizationResetSpace( - authorizationResetData: SpaceAuthorizationResetInput + public async authorizationResetAccount( + authorizationResetData: AccountAuthorizationResetInput ) { - const result = await this.sdkClient.authorizationPolicyResetOnSpace({ + const result = await this.sdkClient.authorizationPolicyResetOnAccount({ authorizationResetData: authorizationResetData, }); diff --git a/src/delete-space-force.ts b/src/delete-space-force.ts deleted file mode 100644 index 0777016..0000000 --- a/src/delete-space-force.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { createConfigUsingEnvVars } from './util/create-config-using-envvars'; -import { AlkemioCliClient } from './client/AlkemioCliClient'; -import { createLogger } from './util/create-logger'; - -const main = async () => { - const spaceID = process.argv[2]; - await deleteSpace(spaceID); -}; - -export const deleteSpace = async (spaceID: string) => { - const logger = createLogger(); - const config = createConfigUsingEnvVars(); - - const alkemioCliClient = new AlkemioCliClient(config, logger); - await alkemioCliClient.initialise(); - await alkemioCliClient.logUser(); - - await alkemioCliClient.validateConnection(); - - const spaceInfo = await alkemioCliClient.alkemioLibClient.spaceInfo(spaceID); - logger.info(`Space information: ${spaceInfo?.nameID}`); - if (spaceInfo?.nameID) { - const opportunities = await alkemioCliClient.alkemioLibClient.opportunities( - spaceID - ); - if (opportunities) { - for (const opportunity of opportunities) { - logger.info(`==> Opportunity: ${opportunity?.nameID}`); - await alkemioCliClient.alkemioLibClient.privateClient.deleteOpportunity( - { - deleteData: { - ID: opportunity.id, - }, - } - ); - } - } - const challenges = await alkemioCliClient.alkemioLibClient.challenges( - spaceID - ); - if (challenges) { - for (const challenge of challenges) { - logger.info(`==> Challenge: ${challenge?.nameID}`); - await alkemioCliClient.alkemioLibClient.privateClient.deleteChallenge({ - deleteData: { - ID: challenge.id, - }, - }); - } - } - } -}; - -main().catch(error => { - console.error(error); -}); diff --git a/src/digital-twin-demo/digital-twin-demo.graphql b/src/digital-twin-demo/digital-twin-demo.graphql index aa35d19..cf653f7 100644 --- a/src/digital-twin-demo/digital-twin-demo.graphql +++ b/src/digital-twin-demo/digital-twin-demo.graphql @@ -3,7 +3,7 @@ query digitalTwinDemo( ){ space(ID:$spaceNameID) { id - challenges { + subspaces { profile { displayName tagline diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index 36e900a..afbfb84 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -66,10 +66,15 @@ export type Account = { library?: Maybe; /** The License governing platform functionality in use by this Account */ license: License; - /** The ID of the associated root Space. */ + /** The ID for the root space for the Account . */ spaceID: Scalars['String']; }; +export type AccountAuthorizationResetInput = { + /** The identifier of the Account whose Authorization Policy should be reset. */ + accountID: Scalars['UUID_NAMEID']; +}; + export type ActivityCreatedSubscriptionInput = { /** The collaboration on which to subscribe for new activity */ collaborationID: Scalars['UUID']; @@ -149,12 +154,12 @@ export type ActivityLogEntry = { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; + /** The Space where the activity happened */ + space?: Maybe; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -175,12 +180,12 @@ export type ActivityLogEntryCalendarEventCreated = ActivityLogEntry & { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; + /** The Space where the activity happened */ + space?: Maybe; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -199,12 +204,12 @@ export type ActivityLogEntryCalloutDiscussionComment = ActivityLogEntry & { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; + /** The Space where the activity happened */ + space?: Maybe; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -223,14 +228,14 @@ export type ActivityLogEntryCalloutLinkCreated = ActivityLogEntry & { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The Link that was created. */ link: Link; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; + /** The Space where the activity happened */ + space?: Maybe; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -249,14 +254,14 @@ export type ActivityLogEntryCalloutPostComment = ActivityLogEntry & { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; /** The Post that was commented on. */ post: Post; + /** The Space where the activity happened */ + space?: Maybe; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -275,14 +280,14 @@ export type ActivityLogEntryCalloutPostCreated = ActivityLogEntry & { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; /** The Post that was created. */ post: Post; + /** The Space where the activity happened */ + space?: Maybe; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -301,12 +306,12 @@ export type ActivityLogEntryCalloutPublished = ActivityLogEntry & { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; + /** The Space where the activity happened */ + space?: Maybe; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -326,12 +331,12 @@ export type ActivityLogEntryCalloutWhiteboardContentModified = /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; + /** The Space where the activity happened */ + space?: Maybe; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -352,12 +357,12 @@ export type ActivityLogEntryCalloutWhiteboardCreated = ActivityLogEntry & { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; + /** The Space where the activity happened */ + space?: Maybe; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -367,8 +372,6 @@ export type ActivityLogEntryCalloutWhiteboardCreated = ActivityLogEntry & { }; export type ActivityLogEntryChallengeCreated = ActivityLogEntry & { - /** The Challenge that was created. */ - challenge: Challenge; /** Indicates if this Activity happened on a child Collaboration. Child results can be included via the "includeChild" parameter. */ child: Scalars['Boolean']; /** The id of the Collaboration entity within which the Activity was generated. */ @@ -378,12 +381,14 @@ export type ActivityLogEntryChallengeCreated = ActivityLogEntry & { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; + /** The Space where the activity happened */ + space?: Maybe; + /** The Subspace that was created. */ + subspace: Space; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -404,12 +409,12 @@ export type ActivityLogEntryMemberJoined = ActivityLogEntry & { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; + /** The Space where the activity happened */ + space?: Maybe; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -428,14 +433,14 @@ export type ActivityLogEntryOpportunityCreated = ActivityLogEntry & { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; - /** The Opportunity that was created. */ - opportunity: Opportunity; /** The display name of the parent */ parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; + /** The Space where the activity happened */ + space?: Maybe; + /** The Subsubspace that was created. */ + subsubspace: Space; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -452,8 +457,6 @@ export type ActivityLogEntryUpdateSent = ActivityLogEntry & { /** The text details for this Activity. */ description: Scalars['String']; id: Scalars['UUID']; - /** The journey where the activity happened */ - journey?: Maybe; /** The url to the Journey. */ journeyUrl: Scalars['String']; /** The Message that been sent to this Community. */ @@ -462,6 +465,8 @@ export type ActivityLogEntryUpdateSent = ActivityLogEntry & { parentDisplayName: Scalars['String']; /** The nameID of the parent */ parentNameID: Scalars['NameID']; + /** The Space where the activity happened */ + space?: Maybe; /** The user that triggered this Activity. */ triggeredBy: User; /** The event type for this Activity. */ @@ -559,8 +564,6 @@ export type ApplicationEventInput = { }; export type ApplicationForRoleResult = { - /** ID for the Challenge being applied to, if any. Or the Challenge containing the Opportunity being applied to. */ - challengeID?: Maybe; /** ID for the community */ communityID: Scalars['UUID']; /** Date of creation */ @@ -569,12 +572,14 @@ export type ApplicationForRoleResult = { displayName: Scalars['String']; /** ID for the application */ id: Scalars['UUID']; - /** ID for the Opportunity being applied to, if any. */ - opportunityID?: Maybe; /** ID for the ultimate containing Space */ spaceID: Scalars['UUID']; /** The current state of the application. */ state: Scalars['String']; + /** ID for the Challenge being applied to, if any. Or the Challenge containing the Opportunity being applied to. */ + subspaceID?: Maybe; + /** ID for the Opportunity being applied to, if any. */ + subsubspaceID?: Maybe; /** Date of last update */ updatedDate: Scalars['DateTime']; }; @@ -666,27 +671,22 @@ export type Authorization = { }; export enum AuthorizationCredential { + AccountHost = 'ACCOUNT_HOST', BetaTester = 'BETA_TESTER', - ChallengeAdmin = 'CHALLENGE_ADMIN', - ChallengeHost = 'CHALLENGE_HOST', - ChallengeLead = 'CHALLENGE_LEAD', - ChallengeMember = 'CHALLENGE_MEMBER', GlobalAdmin = 'GLOBAL_ADMIN', GlobalAdminCommunity = 'GLOBAL_ADMIN_COMMUNITY', GlobalAdminSpaces = 'GLOBAL_ADMIN_SPACES', GlobalRegistered = 'GLOBAL_REGISTERED', InnovationPackProvider = 'INNOVATION_PACK_PROVIDER', - OpportunityAdmin = 'OPPORTUNITY_ADMIN', - OpportunityHost = 'OPPORTUNITY_HOST', - OpportunityLead = 'OPPORTUNITY_LEAD', - OpportunityMember = 'OPPORTUNITY_MEMBER', OrganizationAdmin = 'ORGANIZATION_ADMIN', OrganizationAssociate = 'ORGANIZATION_ASSOCIATE', OrganizationOwner = 'ORGANIZATION_OWNER', SpaceAdmin = 'SPACE_ADMIN', - SpaceHost = 'SPACE_HOST', SpaceLead = 'SPACE_LEAD', SpaceMember = 'SPACE_MEMBER', + SubspaceAdmin = 'SUBSPACE_ADMIN', + SubspaceLead = 'SUBSPACE_LEAD', + SubspaceMember = 'SUBSPACE_MEMBER', UserGroupMember = 'USER_GROUP_MEMBER', UserSelfManagement = 'USER_SELF_MANAGEMENT', } @@ -718,23 +718,21 @@ export enum AuthorizationPrivilege { AuthorizationReset = 'AUTHORIZATION_RESET', CommunityAddMember = 'COMMUNITY_ADD_MEMBER', CommunityApply = 'COMMUNITY_APPLY', - CommunityContextReview = 'COMMUNITY_CONTEXT_REVIEW', CommunityInvite = 'COMMUNITY_INVITE', CommunityInviteAccept = 'COMMUNITY_INVITE_ACCEPT', CommunityJoin = 'COMMUNITY_JOIN', Contribute = 'CONTRIBUTE', Create = 'CREATE', CreateCallout = 'CREATE_CALLOUT', - CreateChallenge = 'CREATE_CHALLENGE', CreateDiscussion = 'CREATE_DISCUSSION', CreateMessage = 'CREATE_MESSAGE', CreateMessageReaction = 'CREATE_MESSAGE_REACTION', CreateMessageReply = 'CREATE_MESSAGE_REPLY', - CreateOpportunity = 'CREATE_OPPORTUNITY', CreateOrganization = 'CREATE_ORGANIZATION', CreatePost = 'CREATE_POST', CreateRelation = 'CREATE_RELATION', CreateSpace = 'CREATE_SPACE', + CreateSubspace = 'CREATE_SUBSPACE', CreateWhiteboard = 'CREATE_WHITEBOARD', CreateWhiteboardRt = 'CREATE_WHITEBOARD_RT', Delete = 'DELETE', @@ -823,7 +821,7 @@ export type Callout = { /** The ContributionPolicy for this Callout. */ contributionPolicy: CalloutContributionPolicy; /** The Contributions that have been made to this Callout. */ - contributions?: Maybe>; + contributions: Array; /** The user that created this Callout */ createdBy?: Maybe; /** The Callout Framing associated with this Callout. */ @@ -974,65 +972,6 @@ export enum CalloutVisibility { Published = 'PUBLISHED', } -export type Challenge = Journey & { - /** The Account for this Challenge */ - account: Account; - /** The Agent representing this Challenge. */ - agent?: Maybe; - /** The authorization rules for the Journey */ - authorization?: Maybe; - /** Collaboration object for the Journey */ - collaboration?: Maybe; - /** The community for the challenge. */ - community?: Maybe; - /** The context for the challenge. */ - context?: Maybe; - /** The ID of the Journey */ - id: Scalars['UUID']; - /** Metrics about activity within this Challenge. */ - metrics?: Maybe>; - /** A name identifier of the Journey, unique within a given scope. */ - nameID: Scalars['NameID']; - /** The Opportunities for the challenge. */ - opportunities?: Maybe>; - /** The preferences for this Challenge */ - preferences: Array; - /** The Profile for the Challenge. */ - profile: Profile; - /** The StorageAggregator in use by this Challenge */ - storageAggregator?: Maybe; -}; - -export type ChallengeOpportunitiesArgs = { - IDs?: InputMaybe>; - limit?: InputMaybe; - shuffle?: InputMaybe; -}; - -export type ChallengeCreated = { - /** The Challenge that has been created. */ - challenge: Challenge; - /** The identifier for the Space on which the Challenge was created. */ - spaceID: Scalars['UUID_NAMEID']; -}; - -export enum ChallengePreferenceType { - AllowContributorsToCreateCallouts = 'ALLOW_CONTRIBUTORS_TO_CREATE_CALLOUTS', - AllowContributorsToCreateOpportunities = 'ALLOW_CONTRIBUTORS_TO_CREATE_OPPORTUNITIES', - AllowNonMembersReadAccess = 'ALLOW_NON_MEMBERS_READ_ACCESS', - AllowSpaceMembersToContribute = 'ALLOW_SPACE_MEMBERS_TO_CONTRIBUTE', - MembershipApplyChallengeFromSpaceMembers = 'MEMBERSHIP_APPLY_CHALLENGE_FROM_SPACE_MEMBERS', - MembershipFeedbackOnChallengeContext = 'MEMBERSHIP_FEEDBACK_ON_CHALLENGE_CONTEXT', - MembershipJoinChallengeFromSpaceMembers = 'MEMBERSHIP_JOIN_CHALLENGE_FROM_SPACE_MEMBERS', -} - -export type ChallengeTemplate = { - /** Feedback templates. */ - feedback?: Maybe>; - /** Challenge template name. */ - name: Scalars['String']; -}; - export type ChatGuidanceAnswerRelevanceInput = { /** The answer id. */ id: Scalars['UUID']; @@ -1062,19 +1001,19 @@ export type Collaboration = { /** The authorization rules for the entity */ authorization?: Maybe; /** The list of Callouts for this Collaboration object. */ - callouts?: Maybe>; + callouts: Array; /** The set of CalloutGroups in use in this Collaboration. */ groups: Array; /** The ID of the entity */ id: Scalars['UUID']; /** The InnovationFlow for the Collaboration. */ - innovationFlow?: Maybe; + innovationFlow: InnovationFlow; /** List of relations */ relations?: Maybe>; /** The tagset templates on this Collaboration. */ tagsetTemplates?: Maybe>; /** The timeline with events in use by this Space */ - timeline?: Maybe; + timeline: Timeline; }; export type CollaborationCalloutsArgs = { @@ -1205,41 +1144,43 @@ export type CommunicationSendMessageToUserInput = { export type Community = Groupable & { /** The Form used for Applications to this community. */ - applicationForm?: Maybe
; + applicationForm: Form; /** Applications available for this community. */ - applications?: Maybe>; + applications: Array; /** The authorization rules for the entity */ authorization?: Maybe; /** All member users excluding the current lead users in this Community. */ - availableLeadUsers?: Maybe; + availableLeadUsers: PaginatedUsers; /** All available users that are potential Community members. */ - availableMemberUsers?: Maybe; + availableMemberUsers: PaginatedUsers; /** The Communications for this Community. */ - communication?: Maybe; + communication: Communication; + /** The user group with the specified id anywhere in the space */ + group: UserGroup; /** Groups of users related to a Community. */ - groups?: Maybe>; + groups: Array; /** The guidelines for members of this Community. */ - guidelines?: Maybe; + guidelines: CommunityGuidelines; /** The ID of the entity */ id: Scalars['UUID']; /** Invitations for this community. */ - invitations?: Maybe>; + invitations: Array; /** Invitations to join this Community for users not yet on the Alkemio platform. */ - invitationsExternal?: Maybe>; + invitationsExternal: Array; /** All users that are contributing to this Community. */ - memberUsers?: Maybe>; + memberUsers: Array; /** The membership status of the currently logged in user. */ myMembershipStatus?: Maybe; /** The roles on this community for the currently logged in user. */ - myRoles?: Maybe>; + myRoles: Array; /** All Organizations that have the specified Role in this Community. */ - organizationsInRole?: Maybe>; + organizationsInRole: Array; /** The policy that defines the roles for this Community. */ - policy?: Maybe; + policy: CommunityPolicy; /** All users that have the specified Role in this Community. */ - usersInRole?: Maybe>; + usersInRole: Array; /** All virtuals that have the specified Role in this Community. */ - virtualContributorsInRole?: Maybe>; + virtualContributorsInRole: Array; }; export type CommunityAvailableLeadUsersArgs = { @@ -1258,6 +1199,10 @@ export type CommunityAvailableMemberUsersArgs = { last?: InputMaybe; }; +export type CommunityGroupArgs = { + ID: Scalars['UUID']; +}; + export type CommunityMemberUsersArgs = { limit?: InputMaybe; }; @@ -1292,6 +1237,12 @@ export type CommunityJoinInput = { communityID: Scalars['UUID']; }; +export enum CommunityMembershipPolicy { + Applications = 'APPLICATIONS', + Invitations = 'INVITATIONS', + Open = 'OPEN', +} + export enum CommunityMembershipStatus { ApplicationPending = 'APPLICATION_PENDING', InvitationPending = 'INVITATION_PENDING', @@ -1302,8 +1253,6 @@ export enum CommunityMembershipStatus { export type CommunityPolicy = { /** The role policy that defines the Admins for this Community. */ admin: CommunityRolePolicy; - /** The role policy that defines the hosts for this Community. */ - host: CommunityRolePolicy; /** The ID of the entity */ id: Scalars['UUID']; /** The role policy that defines the leads for this Community. */ @@ -1314,7 +1263,6 @@ export type CommunityPolicy = { export enum CommunityRole { Admin = 'ADMIN', - Host = 'HOST', Lead = 'LEAD', Member = 'MEMBER', } @@ -1351,8 +1299,6 @@ export type Config = { sentry: Sentry; /** Configuration for storage providers, e.g. file */ storage: StorageConfig; - /** Alkemio template configuration. */ - template: Template; }; export enum ContentUpdatePolicy { @@ -1364,8 +1310,6 @@ export enum ContentUpdatePolicy { export type Context = { /** The authorization rules for the entity */ authorization?: Maybe; - /** The EcosystemModel for this Context. */ - ecosystemModel?: Maybe; /** The ID of the entity */ id: Scalars['UUID']; /** What is the potential impact? */ @@ -1401,19 +1345,21 @@ export type ContributorRolesInvitationsArgs = { states?: InputMaybe>; }; -export type ConvertChallengeToSpaceInput = { - /** The Challenge to be promoted to be a new Space. Note: the original Challenge will no longer exist after the conversion. */ - challengeID: Scalars['UUID_NAMEID']; +export type ConvertSubspaceToSpaceInput = { + /** The subspace to be promoted to be a new Space. Note: the original Subspace will no longer exist after the conversion. */ + subspaceID: Scalars['UUID_NAMEID']; }; -export type ConvertOpportunityToChallengeInput = { - /** The Opportunity to be promoted to be a new Challenge. Note: the original Opportunity will no longer exist after the conversion. */ - opportunityID: Scalars['UUID_NAMEID']; +export type ConvertSubsubspaceToSubspaceInput = { + /** The subsubspace to be promoted. Note: the original Opportunity will no longer exist after the conversion. */ + subsubspaceID: Scalars['UUID_NAMEID']; }; export type CreateAccountInput = { /** The host Organization for the account */ hostID: Scalars['UUID_NAMEID']; + /** The root Space to be created. */ + spaceData: CreateSpaceInput; }; export type CreateActorGroupInput = { @@ -1497,18 +1443,6 @@ export type CreateCalloutTemplateOnTemplatesSetInput = { visualUri?: InputMaybe; }; -export type CreateChallengeOnSpaceInput = { - collaborationData?: InputMaybe; - context?: InputMaybe; - /** Set lead Organizations for the Challenge. */ - leadOrganizations?: InputMaybe>; - /** A readable identifier, unique within the containing scope. */ - nameID?: InputMaybe; - profileData: CreateProfileInput; - spaceID?: Scalars['UUID_NAMEID']; - tags?: InputMaybe>; -}; - export type CreateCollaborationInput = { /** Add default callouts to the Collaboration; defaults to true. */ addDefaultCallouts?: InputMaybe; @@ -1531,11 +1465,6 @@ export type CreateContributionOnCalloutInput = { whiteboard?: InputMaybe; }; -export type CreateFeedbackOnCommunityContextInput = { - communityID: Scalars['UUID']; - questions: Array; -}; - export type CreateInnovationFlowTemplateOnTemplatesSetInput = { profile: CreateProfileInput; states?: InputMaybe>; @@ -1602,16 +1531,6 @@ export type CreateNvpInput = { value: Scalars['String']; }; -export type CreateOpportunityInput = { - challengeID: Scalars['UUID']; - collaborationData?: InputMaybe; - context?: InputMaybe; - /** A readable identifier, unique within the containing scope. */ - nameID?: InputMaybe; - profileData: CreateProfileInput; - tags?: InputMaybe>; -}; - export type CreateOrganizationInput = { contactEmail?: InputMaybe; domain?: InputMaybe; @@ -1678,11 +1597,21 @@ export type CreateRelationOnCollaborationInput = { }; export type CreateSpaceInput = { - accountData: CreateAccountInput; + collaborationData?: InputMaybe; context?: InputMaybe; - /** A readable identifier, unique within the containing scope. */ - nameID: Scalars['NameID']; + /** A readable identifier, unique within the containing Account. */ + nameID?: InputMaybe; + profileData: CreateProfileInput; + tags?: InputMaybe>; +}; + +export type CreateSubspaceInput = { + collaborationData?: InputMaybe; + context?: InputMaybe; + /** A readable identifier, unique within the containing Account. */ + nameID?: InputMaybe; profileData: CreateProfileInput; + spaceID: Scalars['UUID_NAMEID']; tags?: InputMaybe>; }; @@ -1701,7 +1630,7 @@ export type CreateTagsetOnProfileInput = { export type CreateUserGroupInput = { parentID: Scalars['UUID']; - profileData: CreateProfileInput; + profile: CreateProfileInput; }; export type CreateUserInput = { @@ -1801,10 +1730,6 @@ export type DeleteCalloutTemplateInput = { ID: Scalars['UUID']; }; -export type DeleteChallengeInput = { - ID: Scalars['UUID']; -}; - export type DeleteCollaborationInput = { ID: Scalars['UUID']; }; @@ -1841,10 +1766,6 @@ export type DeleteLinkInput = { ID: Scalars['UUID']; }; -export type DeleteOpportunityInput = { - ID: Scalars['UUID']; -}; - export type DeleteOrganizationInput = { ID: Scalars['UUID_NAMEID']; }; @@ -1984,13 +1905,6 @@ export type EcosystemModel = { id: Scalars['UUID']; }; -export type FeedbackTemplate = { - /** Feedback template name. */ - name: Scalars['String']; - /** Template questions. */ - questions: Array; -}; - export type FileStorageConfig = { /** Max file size, in bytes. */ maxFileSize: Scalars['Float']; @@ -2201,8 +2115,6 @@ export type InvitationExternal = { }; export type InvitationForRoleResult = { - /** ID for the Challenge being invited to, if any. Or the Challenge containing the Opportunity being invited to. */ - challengeID?: Maybe; /** ID for the community */ communityID: Scalars['UUID']; /** ID for the user that created the invitation. */ @@ -2213,29 +2125,20 @@ export type InvitationForRoleResult = { displayName: Scalars['String']; /** ID for the application */ id: Scalars['UUID']; - /** ID for the Opportunity being invited to, if any. */ - opportunityID?: Maybe; /** ID for the ultimate containing Space */ spaceID: Scalars['UUID']; /** The current state of the invitation. */ state: Scalars['String']; + /** ID for the Subspace being invited to, if any. Or the Challenge containing the Opportunity being invited to. */ + subspaceID?: Maybe; + /** ID for the Opportunity being invited to, if any. */ + subsubspaceID?: Maybe; /** Date of last update */ updatedDate: Scalars['DateTime']; /** The welcome message of the invitation */ welcomeMessage?: Maybe; }; -export type Journey = { - /** The authorization rules for the Journey */ - authorization?: Maybe; - /** Collaboration object for the Journey */ - collaboration?: Maybe; - /** The ID of the Journey */ - id: Scalars['UUID']; - /** A name identifier of the Journey, unique within a given scope. */ - nameID: Scalars['NameID']; -}; - export type LatestReleaseDiscussion = { /** Id of the latest release discussion. */ id: Scalars['String']; @@ -2340,8 +2243,6 @@ export type LookupQueryResults = { callout?: Maybe; /** Lookup the specified Callout Template */ calloutTemplate?: Maybe; - /** Lookup the specified Challenge */ - challenge?: Maybe; /** Lookup the specified Collaboration */ collaboration?: Maybe; /** Lookup the specified Community */ @@ -2356,8 +2257,6 @@ export type LookupQueryResults = { innovationFlowTemplate?: Maybe; /** Lookup the specified Invitation */ invitation?: Maybe; - /** Lookup the specified Opportunity */ - opportunity?: Maybe; /** Lookup the specified Post */ post?: Maybe; /** Lookup the specified Profile */ @@ -2401,10 +2300,6 @@ export type LookupQueryResultsCalloutTemplateArgs = { ID: Scalars['UUID']; }; -export type LookupQueryResultsChallengeArgs = { - ID: Scalars['UUID']; -}; - export type LookupQueryResultsCollaborationArgs = { ID: Scalars['UUID']; }; @@ -2433,10 +2328,6 @@ export type LookupQueryResultsInvitationArgs = { ID: Scalars['UUID']; }; -export type LookupQueryResultsOpportunityArgs = { - ID: Scalars['UUID']; -}; - export type LookupQueryResultsPostArgs = { ID: Scalars['UUID']; }; @@ -2468,8 +2359,8 @@ export type MeQueryResults = { id: Scalars['String']; /** The invitations of the current authenticated user */ invitations: Array; - /** The Journeys I am contributing to */ - myJourneys: Array; + /** The Spaces I am contributing to */ + mySpaces: Array; /** The applications of the current authenticated user */ spaceMemberships: Array; /** The current authenticated User; null if not yet registered on the platform */ @@ -2484,7 +2375,7 @@ export type MeQueryResultsInvitationsArgs = { states?: InputMaybe>; }; -export type MeQueryResultsMyJourneysArgs = { +export type MeQueryResultsMySpacesArgs = { limit?: InputMaybe; }; @@ -2570,12 +2461,12 @@ export type Mutation = { assignUserToOrganization: Organization; /** Reset the Authorization Policy on all entities */ authorizationPolicyResetAll: Scalars['String']; + /** Reset the Authorization Policy on the specified Space. */ + authorizationPolicyResetOnAccount: Space; /** Reset the Authorization Policy on the specified Organization. */ authorizationPolicyResetOnOrganization: Organization; /** Reset the Authorization Policy on the specified Platform. */ authorizationPolicyResetOnPlatform: Platform; - /** Reset the Authorization Policy on the specified Space. */ - authorizationPolicyResetOnSpace: Space; /** Reset the Authorization policy on the specified User. */ authorizationPolicyResetOnUser: User; /** Reset the Authorization Policy on the specified VirtualContributor. */ @@ -2593,7 +2484,9 @@ export type Mutation = { /** Creates a new Space by converting an existing Challenge. */ convertChallengeToSpace: Space; /** Creates a new Challenge by converting an existing Opportunity. */ - convertOpportunityToChallenge: Challenge; + convertOpportunityToChallenge: Space; + /** Creates a new Account with a single root Space. */ + createAccount: Account; /** Creates a new Actor in the specified ActorGroup. */ createActor: Actor; /** Create a new Actor Group on the EcosystemModel. */ @@ -2602,16 +2495,12 @@ export type Mutation = { createCalloutOnCollaboration: Callout; /** Creates a new CalloutTemplate on the specified TemplatesSet. */ createCalloutTemplate: CalloutTemplate; - /** Creates a new Challenge within the specified Space. */ - createChallenge: Challenge; /** Create a new Contribution on the Callout. */ createContributionOnCallout: CalloutContribution; /** Creates a new Discussion as part of this Communication. */ createDiscussion: Discussion; /** Create a new CalendarEvent on the Calendar. */ createEventOnCalendar: CalendarEvent; - /** Creates feedback on community context from users having COMMUNITY_CONTEXT_REVIEW privilege */ - createFeedbackOnCommunityContext: Scalars['Boolean']; /** Creates a new User Group in the specified Community. */ createGroupOnCommunity: UserGroup; /** Creates a new User Group for the specified Organization. */ @@ -2622,8 +2511,6 @@ export type Mutation = { createInnovationHub: InnovationHub; /** Create a new InnovatonPack on the Library. */ createInnovationPackOnLibrary: InnovationPack; - /** Creates a new Opportunity within the parent Challenge. */ - createOpportunity: Opportunity; /** Creates a new Organization on the platform. */ createOrganization: Organization; /** Creates a new PostTemplate on the specified TemplatesSet. */ @@ -2632,8 +2519,8 @@ export type Mutation = { createReferenceOnProfile: Reference; /** Create a new Relation on the Collaboration. */ createRelationOnCollaboration: Relation; - /** Creates a new Space. */ - createSpace: Space; + /** Creates a new Subspace within the specified Space. */ + createSubspace: Space; /** Creates a new Tagset on the specified Profile */ createTagsetOnProfile: Tagset; /** Creates a new User on the platform. */ @@ -2656,8 +2543,6 @@ export type Mutation = { deleteCallout: Callout; /** Deletes the specified CalloutTemplate. */ deleteCalloutTemplate: CalloutTemplate; - /** Deletes the specified Challenge. */ - deleteChallenge: Challenge; /** Delete Collaboration. */ deleteCollaboration: Collaboration; /** Deletes the specified Discussion. */ @@ -2676,8 +2561,6 @@ export type Mutation = { deleteInvitationExternal: InvitationExternal; /** Deletes the specified Link. */ deleteLink: Link; - /** Deletes the specified Opportunity. */ - deleteOpportunity: Opportunity; /** Deletes the specified Organization. */ deleteOrganization: Organization; /** Deletes the specified Post. */ @@ -2770,6 +2653,8 @@ export type Mutation = { sendMessageToRoom: Message; /** Send message to a User. */ sendMessageToUser: Scalars['Boolean']; + /** Update the platform settings, such as license, of the specified Account. */ + updateAccountPlatformSettings: Account; /** Updates the specified Actor. */ updateActor: Actor; /** User vote if a specific answer is relevant. */ @@ -2786,8 +2671,6 @@ export type Mutation = { updateCalloutVisibility: Callout; /** Update the sortOrder field of the supplied Callouts to increase as per the order that they are provided in. */ updateCalloutsSortOrder: Array; - /** Updates the specified Challenge. */ - updateChallenge: Challenge; /** Update the Application Form used by this Community. */ updateCommunityApplicationForm: Community; /** Updates the CommunityGuidelines. */ @@ -2814,21 +2697,15 @@ export type Mutation = { updateInnovationPack: InnovationPack; /** Updates the specified Link. */ updateLink: Link; - /** Updates the specified Opportunity. */ - updateOpportunity: Opportunity; /** Updates the specified Organization. */ updateOrganization: Organization; /** Updates the specified Post. */ updatePost: Post; /** Updates the specified PostTemplate. */ updatePostTemplate: PostTemplate; - /** Updates one of the Preferences on a Challenge */ - updatePreferenceOnChallenge: Preference; /** Updates one of the Preferences on an Organization */ updatePreferenceOnOrganization: Preference; /** Updates one of the Preferences on a Space */ - updatePreferenceOnSpace: Preference; - /** Updates one of the Preferences on a Space */ updatePreferenceOnUser: Preference; /** Updates the specified Profile. */ updateProfile: Profile; @@ -2838,8 +2715,12 @@ export type Mutation = { updateSpace: Space; /** Updates the specified SpaceDefaults. */ updateSpaceDefaults: SpaceDefaults; - /** Update the platform settings, such as license, of the specified Space. */ + /** Update the platform settings, such as nameID, of the specified Space. */ updateSpacePlatformSettings: Space; + /** Updates one of the Setting on a Space */ + updateSpaceSettings: Space; + /** Updates one of the settings on a Space */ + updateSubspaceSettings: Space; /** Updates the specified Tagset. */ updateTagset: Tagset; /** Updates the User. */ @@ -2930,12 +2811,12 @@ export type MutationAssignUserToOrganizationArgs = { membershipData: AssignOrganizationAssociateInput; }; -export type MutationAuthorizationPolicyResetOnOrganizationArgs = { - authorizationResetData: OrganizationAuthorizationResetInput; +export type MutationAuthorizationPolicyResetOnAccountArgs = { + authorizationResetData: AccountAuthorizationResetInput; }; -export type MutationAuthorizationPolicyResetOnSpaceArgs = { - authorizationResetData: SpaceAuthorizationResetInput; +export type MutationAuthorizationPolicyResetOnOrganizationArgs = { + authorizationResetData: OrganizationAuthorizationResetInput; }; export type MutationAuthorizationPolicyResetOnUserArgs = { @@ -2964,11 +2845,15 @@ export type MutationBeginVerifiedCredentialRequestInteractionArgs = { }; export type MutationConvertChallengeToSpaceArgs = { - convertData: ConvertChallengeToSpaceInput; + convertData: ConvertSubspaceToSpaceInput; }; export type MutationConvertOpportunityToChallengeArgs = { - convertData: ConvertOpportunityToChallengeInput; + convertData: ConvertSubsubspaceToSubspaceInput; +}; + +export type MutationCreateAccountArgs = { + accountData: CreateAccountInput; }; export type MutationCreateActorArgs = { @@ -2987,10 +2872,6 @@ export type MutationCreateCalloutTemplateArgs = { calloutTemplateInput: CreateCalloutTemplateOnTemplatesSetInput; }; -export type MutationCreateChallengeArgs = { - challengeData: CreateChallengeOnSpaceInput; -}; - export type MutationCreateContributionOnCalloutArgs = { contributionData: CreateContributionOnCalloutInput; }; @@ -3003,10 +2884,6 @@ export type MutationCreateEventOnCalendarArgs = { eventData: CreateCalendarEventOnCalendarInput; }; -export type MutationCreateFeedbackOnCommunityContextArgs = { - feedbackData: CreateFeedbackOnCommunityContextInput; -}; - export type MutationCreateGroupOnCommunityArgs = { groupData: CreateUserGroupInput; }; @@ -3027,10 +2904,6 @@ export type MutationCreateInnovationPackOnLibraryArgs = { packData: CreateInnovationPackOnLibraryInput; }; -export type MutationCreateOpportunityArgs = { - opportunityData: CreateOpportunityInput; -}; - export type MutationCreateOrganizationArgs = { organizationData: CreateOrganizationInput; }; @@ -3047,8 +2920,8 @@ export type MutationCreateRelationOnCollaborationArgs = { relationData: CreateRelationOnCollaborationInput; }; -export type MutationCreateSpaceArgs = { - spaceData: CreateSpaceInput; +export type MutationCreateSubspaceArgs = { + subspaceData: CreateSubspaceInput; }; export type MutationCreateTagsetOnProfileArgs = { @@ -3091,10 +2964,6 @@ export type MutationDeleteCalloutTemplateArgs = { deleteData: DeleteCalloutTemplateInput; }; -export type MutationDeleteChallengeArgs = { - deleteData: DeleteChallengeInput; -}; - export type MutationDeleteCollaborationArgs = { deleteData: DeleteCollaborationInput; }; @@ -3131,10 +3000,6 @@ export type MutationDeleteLinkArgs = { deleteData: DeleteLinkInput; }; -export type MutationDeleteOpportunityArgs = { - deleteData: DeleteOpportunityInput; -}; - export type MutationDeleteOrganizationArgs = { deleteData: DeleteOrganizationInput; }; @@ -3307,6 +3172,10 @@ export type MutationSendMessageToUserArgs = { messageData: CommunicationSendMessageToUserInput; }; +export type MutationUpdateAccountPlatformSettingsArgs = { + updateData: UpdateAccountPlatformSettingsInput; +}; + export type MutationUpdateActorArgs = { actorData: UpdateActorInput; }; @@ -3339,10 +3208,6 @@ export type MutationUpdateCalloutsSortOrderArgs = { sortOrderData: UpdateCollaborationCalloutsSortOrderInput; }; -export type MutationUpdateChallengeArgs = { - challengeData: UpdateChallengeInput; -}; - export type MutationUpdateCommunityApplicationFormArgs = { applicationFormData: UpdateCommunityApplicationFormInput; }; @@ -3395,10 +3260,6 @@ export type MutationUpdateLinkArgs = { linkData: UpdateLinkInput; }; -export type MutationUpdateOpportunityArgs = { - opportunityData: UpdateOpportunityInput; -}; - export type MutationUpdateOrganizationArgs = { organizationData: UpdateOrganizationInput; }; @@ -3411,18 +3272,10 @@ export type MutationUpdatePostTemplateArgs = { postTemplateInput: UpdatePostTemplateInput; }; -export type MutationUpdatePreferenceOnChallengeArgs = { - preferenceData: UpdateChallengePreferenceInput; -}; - export type MutationUpdatePreferenceOnOrganizationArgs = { preferenceData: UpdateOrganizationPreferenceInput; }; -export type MutationUpdatePreferenceOnSpaceArgs = { - preferenceData: UpdateSpacePreferenceInput; -}; - export type MutationUpdatePreferenceOnUserArgs = { preferenceData: UpdateUserPreferenceInput; }; @@ -3447,6 +3300,14 @@ export type MutationUpdateSpacePlatformSettingsArgs = { updateData: UpdateSpacePlatformSettingsInput; }; +export type MutationUpdateSpaceSettingsArgs = { + settingsData: UpdateSpaceSettingsOnSpaceInput; +}; + +export type MutationUpdateSubspaceSettingsArgs = { + settingsData: UpdateSubspaceSettingsInput; +}; + export type MutationUpdateTagsetArgs = { updateData: UpdateTagsetInput; }; @@ -3513,9 +3374,9 @@ export enum MutationType { Update = 'UPDATE', } -export type MyJourneyResults = { - journey: Journey; +export type MySpaceResults = { latestActivity?: Maybe; + space: Space; }; export type Nvp = { @@ -3525,38 +3386,6 @@ export type Nvp = { value: Scalars['String']; }; -export type Opportunity = Journey & { - /** The Account for this Opportunity */ - account: Account; - /** The authorization rules for the Journey */ - authorization?: Maybe; - /** Collaboration object for the Journey */ - collaboration?: Maybe; - /** The community for the Opportunity. */ - community?: Maybe; - /** The context for the Opportunity. */ - context?: Maybe; - /** The ID of the Journey */ - id: Scalars['UUID']; - /** Metrics about the activity within this Opportunity. */ - metrics?: Maybe>; - /** A name identifier of the Journey, unique within a given scope. */ - nameID: Scalars['NameID']; - /** The parent entity name (challenge) ID. */ - parentNameID?: Maybe; - /** The Profile for the Opportunity. */ - profile: Profile; - /** The StorageAggregator in use by this Opportunity */ - storageAggregator?: Maybe; -}; - -export type OpportunityCreated = { - /** The identifier for the Challenge on which the Opportunity was created. */ - challengeID: Scalars['UUID']; - /** The Opportunity that has been created. */ - opportunity: Opportunity; -}; - export type Organization = Groupable & { /** All Users that are admins of this Organization. */ admins?: Maybe>; @@ -3831,20 +3660,7 @@ export type PreferenceDefinition = { }; export enum PreferenceType { - AllowContributorsToCreateCallouts = 'ALLOW_CONTRIBUTORS_TO_CREATE_CALLOUTS', - AllowContributorsToCreateOpportunities = 'ALLOW_CONTRIBUTORS_TO_CREATE_OPPORTUNITIES', - AllowMembersToCreateCallouts = 'ALLOW_MEMBERS_TO_CREATE_CALLOUTS', - AllowMembersToCreateChallenges = 'ALLOW_MEMBERS_TO_CREATE_CHALLENGES', - AllowNonMembersReadAccess = 'ALLOW_NON_MEMBERS_READ_ACCESS', - AllowSpaceMembersToContribute = 'ALLOW_SPACE_MEMBERS_TO_CONTRIBUTE', - AuthorizationAnonymousReadAccess = 'AUTHORIZATION_ANONYMOUS_READ_ACCESS', AuthorizationOrganizationMatchDomain = 'AUTHORIZATION_ORGANIZATION_MATCH_DOMAIN', - MembershipApplicationsFromAnyone = 'MEMBERSHIP_APPLICATIONS_FROM_ANYONE', - MembershipApplyChallengeFromSpaceMembers = 'MEMBERSHIP_APPLY_CHALLENGE_FROM_SPACE_MEMBERS', - MembershipFeedbackOnChallengeContext = 'MEMBERSHIP_FEEDBACK_ON_CHALLENGE_CONTEXT', - MembershipJoinChallengeFromSpaceMembers = 'MEMBERSHIP_JOIN_CHALLENGE_FROM_SPACE_MEMBERS', - MembershipJoinSpaceFromAnyone = 'MEMBERSHIP_JOIN_SPACE_FROM_ANYONE', - MembershipJoinSpaceFromHostOrganizationMembers = 'MEMBERSHIP_JOIN_SPACE_FROM_HOST_ORGANIZATION_MEMBERS', NotificationApplicationReceived = 'NOTIFICATION_APPLICATION_RECEIVED', NotificationApplicationSubmitted = 'NOTIFICATION_APPLICATION_SUBMITTED', NotificationCalloutPublished = 'NOTIFICATION_CALLOUT_PUBLISHED', @@ -3954,6 +3770,10 @@ export enum ProfileType { } export type Query = { + /** An account. If no ID is specified then the first Account is returned. */ + account: Account; + /** The Accounts on this platform; If accessed through an Innovation Hub will return ONLY the Accounts defined in it. */ + accounts: Array; /** Activity events related to the current user. */ activityFeed: ActivityFeed; /** Activity events related to the current user grouped by Activity type and resource. */ @@ -4018,6 +3838,10 @@ export type Query = { virtualPersonas: Array; }; +export type QueryAccountArgs = { + ID: Scalars['UUID_NAMEID']; +}; + export type QueryActivityFeedArgs = { after?: InputMaybe; args?: InputMaybe; @@ -4149,15 +3973,6 @@ export type Question = { value: Scalars['String']; }; -export type QuestionTemplate = { - /** Question template. */ - question: Scalars['String']; - /** Is question required? */ - required: Scalars['Boolean']; - /** Sorting order for the question. Lower is first. */ - sortOrder?: Maybe; -}; - /** A reaction to a message. */ export type Reaction = { /** The reaction Emoji */ @@ -4195,65 +4010,53 @@ export type Relation = { type: Scalars['String']; }; -export type RelayPaginatedSpace = Journey & { - /** The Account for this space */ +export type RelayPaginatedSpace = { + /** The Account that this Space is part of. */ account: Account; /** The Agent representing this Space. */ - agent?: Maybe; - /** The authorization rules for the Journey */ + agent: Agent; + /** The authorization rules for the entity */ authorization?: Maybe; - /** A particular Challenge, either by its ID or nameID */ - challenge: Challenge; - /** The challenges for the space. */ - challenges?: Maybe>; - /** Collaboration object for the Journey */ - collaboration?: Maybe; + /** The collaboration for the Space. */ + collaboration: Collaboration; /** Get the Community for the Space. */ - community?: Maybe; + community: Community; /** The context for the space. */ - context?: Maybe; + context: Context; /** The date for the creation of this Space. */ createdDate?: Maybe; - /** The user group with the specified id anywhere in the space */ - group: UserGroup; - /** The User Groups on this Space */ - groups: Array; - /** The Space host. */ - host?: Maybe; - /** The ID of the Journey */ + /** The ID of the entity */ id: Scalars['UUID']; + /** The level of this Space, representing the number of Spaces above this one. */ + level: Scalars['Float']; /** Metrics about activity within this Space. */ metrics?: Maybe>; - /** A name identifier of the Journey, unique within a given scope. */ + /** A name identifier of the entity, unique within a given scope. */ nameID: Scalars['NameID']; - /** A particular Opportunity, either by its ID or nameID */ - opportunity: Opportunity; - /** The preferences for this Space */ - preferences?: Maybe>; /** The Profile for the Space. */ profile: Profile; + /** The settings for this Space. */ + settings: SpaceSettings; /** The StorageAggregator in use by this Space */ - storageAggregator?: Maybe; + storageAggregator: StorageAggregator; + /** A particular subspace, either by its ID or nameID */ + subspace: Space; + /** The subspaces for the space. */ + subspaces: Array; + /** The Type of the Space e.g. space/challenge/opportunity. */ + type: SpaceType; }; -export type RelayPaginatedSpaceChallengeArgs = { +export type RelayPaginatedSpaceSubspaceArgs = { ID: Scalars['UUID_NAMEID']; }; -export type RelayPaginatedSpaceChallengesArgs = { +export type RelayPaginatedSpaceSubspacesArgs = { IDs?: InputMaybe>; limit?: InputMaybe; shuffle?: InputMaybe; }; -export type RelayPaginatedSpaceGroupArgs = { - ID: Scalars['UUID']; -}; - -export type RelayPaginatedSpaceOpportunityArgs = { - ID: Scalars['UUID_NAMEID']; -}; - export type RelayPaginatedSpaceEdge = { node: RelayPaginatedSpace; }; @@ -4429,20 +4232,20 @@ export type RolesResultOrganization = { }; export type RolesResultSpace = { - /** Details of the Challenges the user is a member of */ - challenges: Array; /** Display name of the entity */ displayName: Scalars['String']; /** A unique identifier for this membership result. */ id: Scalars['String']; /** Name Identifier of the entity */ nameID: Scalars['NameID']; - /** Details of the Opportunities the Contributor is a member of */ - opportunities: Array; /** The roles held by the contributor */ roles: Array; /** The Space ID */ spaceID: Scalars['String']; + /** Details of the Challenges the user is a member of */ + subspaces: Array; + /** Details of the Opportunities the Contributor is a member of */ + subsubspaces: Array; /** Details of the Groups in the Organizations the user is a member of */ userGroups: Array; /** Visibility of the Space. */ @@ -4568,13 +4371,13 @@ export type SearchResultCallout = SearchResult & { }; export type SearchResultChallenge = SearchResult & { - /** The Challenge that was found. */ - challenge: Challenge; id: Scalars['UUID']; /** The score for this search result; more matches means a higher score. */ score: Scalars['Float']; /** The Space that the Challenge is in. */ space: Space; + /** The Challenge that was found. */ + subspace: Space; /** The terms that were matched for this result */ terms: Array; /** The type of returned result for this search. */ @@ -4582,15 +4385,15 @@ export type SearchResultChallenge = SearchResult & { }; export type SearchResultOpportunity = SearchResult & { - /** The Challenge that the Opportunity is in. */ - challenge: Challenge; id: Scalars['UUID']; - /** The Opportunity that was found. */ - opportunity: Opportunity; /** The score for this search result; more matches means a higher score. */ score: Scalars['Float']; /** The Space that the Opportunity is in. */ space: Space; + /** The Challenge that the Opportunity is in. */ + subspace: Space; + /** The Opportunity that was found. */ + subsubspace: Space; /** The terms that were matched for this result */ terms: Array; /** The type of returned result for this search. */ @@ -4612,17 +4415,17 @@ export type SearchResultOrganization = SearchResult & { export type SearchResultPost = SearchResult & { /** The Callout of the Post. */ callout: Callout; - /** The Challenge of the Post. Applicable for Callouts on Opportunities and Challenges. */ - challenge?: Maybe; id: Scalars['UUID']; - /** The Opportunity of the Post. Applicable only for Callouts on Opportunities. */ - opportunity?: Maybe; /** The Post that was found. */ post: Post; /** The score for this search result; more matches means a higher score. */ score: Scalars['Float']; /** The Space of the Post. */ space: Space; + /** The Challenge of the Post. Applicable for Callouts on Opportunities and Challenges. */ + subspace?: Maybe; + /** The Opportunity of the Post. Applicable only for Callouts on Opportunities. */ + subsubspace?: Maybe; /** The terms that were matched for this result */ terms: Array; /** The type of returned result for this search. */ @@ -4699,70 +4502,53 @@ export type Source = { uri?: Maybe; }; -export type Space = Journey & { - /** The Account for this space */ +export type Space = { + /** The Account that this Space is part of. */ account: Account; /** The Agent representing this Space. */ - agent?: Maybe; - /** The authorization rules for the Journey */ + agent: Agent; + /** The authorization rules for the entity */ authorization?: Maybe; - /** A particular Challenge, either by its ID or nameID */ - challenge: Challenge; - /** The challenges for the space. */ - challenges?: Maybe>; - /** Collaboration object for the Journey */ - collaboration?: Maybe; + /** The collaboration for the Space. */ + collaboration: Collaboration; /** Get the Community for the Space. */ - community?: Maybe; + community: Community; /** The context for the space. */ - context?: Maybe; + context: Context; /** The date for the creation of this Space. */ createdDate?: Maybe; - /** The user group with the specified id anywhere in the space */ - group: UserGroup; - /** The User Groups on this Space */ - groups: Array; - /** The Space host. */ - host?: Maybe; - /** The ID of the Journey */ + /** The ID of the entity */ id: Scalars['UUID']; + /** The level of this Space, representing the number of Spaces above this one. */ + level: Scalars['Float']; /** Metrics about activity within this Space. */ metrics?: Maybe>; - /** A name identifier of the Journey, unique within a given scope. */ + /** A name identifier of the entity, unique within a given scope. */ nameID: Scalars['NameID']; - /** A particular Opportunity, either by its ID or nameID */ - opportunity: Opportunity; - /** The preferences for this Space */ - preferences?: Maybe>; /** The Profile for the Space. */ profile: Profile; + /** The settings for this Space. */ + settings: SpaceSettings; /** The StorageAggregator in use by this Space */ - storageAggregator?: Maybe; + storageAggregator: StorageAggregator; + /** A particular subspace, either by its ID or nameID */ + subspace: Space; + /** The subspaces for the space. */ + subspaces: Array; + /** The Type of the Space e.g. space/challenge/opportunity. */ + type: SpaceType; }; -export type SpaceChallengeArgs = { +export type SpaceSubspaceArgs = { ID: Scalars['UUID_NAMEID']; }; -export type SpaceChallengesArgs = { +export type SpaceSubspacesArgs = { IDs?: InputMaybe>; limit?: InputMaybe; shuffle?: InputMaybe; }; -export type SpaceGroupArgs = { - ID: Scalars['UUID']; -}; - -export type SpaceOpportunityArgs = { - ID: Scalars['UUID_NAMEID']; -}; - -export type SpaceAuthorizationResetInput = { - /** The identifier of the Space whose Authorization Policy should be reset. */ - spaceID: Scalars['UUID_NAMEID']; -}; - export type SpaceDefaults = { /** The authorization rules for the entity */ authorization?: Maybe; @@ -4777,13 +4563,45 @@ export type SpaceFilterInput = { visibilities?: InputMaybe>; }; -export enum SpacePreferenceType { - AllowMembersToCreateCallouts = 'ALLOW_MEMBERS_TO_CREATE_CALLOUTS', - AllowMembersToCreateChallenges = 'ALLOW_MEMBERS_TO_CREATE_CHALLENGES', - AuthorizationAnonymousReadAccess = 'AUTHORIZATION_ANONYMOUS_READ_ACCESS', - MembershipApplicationsFromAnyone = 'MEMBERSHIP_APPLICATIONS_FROM_ANYONE', - MembershipJoinSpaceFromAnyone = 'MEMBERSHIP_JOIN_SPACE_FROM_ANYONE', - MembershipJoinSpaceFromHostOrganizationMembers = 'MEMBERSHIP_JOIN_SPACE_FROM_HOST_ORGANIZATION_MEMBERS', +export enum SpacePrivacyMode { + Private = 'PRIVATE', + Public = 'PUBLIC', +} + +export type SpaceSettings = { + /** The collaboration settings for this Space. */ + collaboration: SpaceSettingsCollaboration; + /** The membership settings for this Space. */ + membership: SpaceSettingsMembership; + /** The privacy settings for this Space */ + privacy: SpaceSettingsPrivacy; +}; + +export type SpaceSettingsCollaboration = { + /** Flag to control if members can create callouts. */ + allowMembersToCreateCallouts: Scalars['Boolean']; + /** Flag to control if members can create subspaces. */ + allowMembersToCreateSubspaces: Scalars['Boolean']; + /** Flag to control if ability to contribute is inherited from parent Space. */ + inheritMembershipRights: Scalars['Boolean']; +}; + +export type SpaceSettingsMembership = { + /** The membership policy in usage for this Space */ + policy: CommunityMembershipPolicy; + /** The organizations that are trusted to Join as members for this Space */ + trustedOrganizations: Array; +}; + +export type SpaceSettingsPrivacy = { + /** The privacy mode for this Space */ + mode: SpacePrivacyMode; +}; + +export enum SpaceType { + Challenge = 'CHALLENGE', + Opportunity = 'OPPORTUNITY', + Space = 'SPACE', } export enum SpaceVisibility { @@ -4814,18 +4632,12 @@ export type StorageAggregatorParent = { displayName: Scalars['String']; /** The UUID of the parent entity. */ id: Scalars['UUID']; - /** The Type of the parent Entity, space/challenge/opportunity. */ - type: StorageAggregatorParentType; + /** The Type of the parent Entity. */ + type: SpaceType; /** The URL that can be used to access the parent entity. */ url: Scalars['String']; }; -export enum StorageAggregatorParentType { - Challenge = 'CHALLENGE', - Opportunity = 'OPPORTUNITY', - Space = 'SPACE', -} - export type StorageBucket = { /** Mime types allowed to be stored on this StorageBucket. */ allowedMimeTypes: Array; @@ -4886,16 +4698,14 @@ export type Subscription = { activityCreated: ActivityCreatedSubscriptionResult; /** Receive new Update messages on Communities the currently authenticated User is a member of. */ calloutPostCreated: CalloutPostCreated; - /** Receive new Challenges created on the Space. */ - challengeCreated: ChallengeCreated; /** Receive updates on Discussions */ communicationDiscussionUpdated: Discussion; - /** Receive new Opportunities created on the Challenge. */ - opportunityCreated: OpportunityCreated; /** Received on verified credentials change */ profileVerifiedCredential: ProfileCredentialVerified; /** Receive Room event */ roomEvents: RoomEventSubscriptionResult; + /** Receive new Subspaces created on the Space. */ + subspaceCreated: SubspaceCreated; }; export type SubscriptionActivityCreatedArgs = { @@ -4906,22 +4716,25 @@ export type SubscriptionCalloutPostCreatedArgs = { calloutID: Scalars['UUID']; }; -export type SubscriptionChallengeCreatedArgs = { - spaceID: Scalars['UUID_NAMEID']; -}; - export type SubscriptionCommunicationDiscussionUpdatedArgs = { communicationID: Scalars['UUID']; }; -export type SubscriptionOpportunityCreatedArgs = { - challengeID: Scalars['UUID']; -}; - export type SubscriptionRoomEventsArgs = { roomID: Scalars['UUID']; }; +export type SubscriptionSubspaceCreatedArgs = { + spaceID: Scalars['UUID']; +}; + +export type SubspaceCreated = { + /** The identifier for the Space on which the subspace was created. */ + spaceID: Scalars['UUID']; + /** The subspace that has been created. */ + subspace: Space; +}; + export type Tagset = { /** The allowed values for this Tagset. */ allowedValues: Array; @@ -4998,15 +4811,6 @@ export enum TaskStatus { InProgress = 'IN_PROGRESS', } -export type Template = { - /** Challenge templates. */ - challenges: Array; - /** Template description. */ - description: Scalars['String']; - /** Template name. */ - name: Scalars['String']; -}; - export type TemplatesSet = { /** The authorization rules for the entity */ authorization?: Maybe; @@ -5055,7 +4859,9 @@ export type Timeline = { id: Scalars['UUID']; }; -export type UpdateAccountInput = { +export type UpdateAccountPlatformSettingsInput = { + /** The identifier for the Account whose license etc is to be updated. */ + accountID: Scalars['UUID']; /** Update the host Organization for the Account. */ hostID?: InputMaybe; /** Update the license settings for the Account. */ @@ -5147,26 +4953,6 @@ export type UpdateCalloutVisibilityInput = { visibility: CalloutVisibility; }; -export type UpdateChallengeInput = { - ID: Scalars['UUID']; - /** Update the contained Context entity. */ - context?: InputMaybe; - /** The Profile of the InnovationFlow of this entity. */ - innovationFlowData?: InputMaybe; - /** A display identifier, unique within the containing scope. Note: updating the nameID will affect URL on the client. */ - nameID?: InputMaybe; - /** The Profile of this entity. */ - profileData?: InputMaybe; -}; - -export type UpdateChallengePreferenceInput = { - /** ID of the Challenge */ - challengeID: Scalars['UUID']; - /** Type of the challenge preference */ - type: ChallengePreferenceType; - value: Scalars['String']; -}; - export type UpdateCollaborationCalloutsSortOrderInput = { /** The IDs of the callouts to update the sort order on */ calloutIDs: Array; @@ -5270,7 +5056,7 @@ export type UpdateInnovationFlowSingleStateInput = { export type UpdateInnovationFlowStateInput = { /** The explation text to clarify the State. */ - description: Scalars['Markdown']; + description?: InputMaybe; /** The display name for the State */ displayName: Scalars['String']; }; @@ -5328,16 +5114,6 @@ export type UpdateLocationInput = { stateOrProvince?: InputMaybe; }; -export type UpdateOpportunityInput = { - ID: Scalars['UUID']; - /** Update the contained Context entity. */ - context?: InputMaybe; - /** A display identifier, unique within the containing scope. Note: updating the nameID will affect URL on the client. */ - nameID?: InputMaybe; - /** The Profile of this entity. */ - profileData?: InputMaybe; -}; - export type UpdateOrganizationInput = { /** The ID or NameID of the Organization to update. */ ID: Scalars['UUID_NAMEID']; @@ -5409,35 +5185,69 @@ export type UpdateReferenceInput = { }; export type UpdateSpaceDefaultsInput = { - /** The ID for the InnovationFlowtemplate to use for new Challenges and Opportunities. */ + /** The ID for the InnovationFlowtemplate to use for new Subspaces. */ flowTemplateID: Scalars['UUID']; /** The identifier for the Space whose Defaaults are to be updated. */ spaceID: Scalars['UUID']; }; export type UpdateSpaceInput = { - /** The ID or NameID of the Space. */ - ID: Scalars['UUID_NAMEID']; + ID: Scalars['UUID']; /** Update the contained Context entity. */ context?: InputMaybe; + /** The Profile of the InnovationFlow of this entity. */ + innovationFlowData?: InputMaybe; + /** A display identifier, unique within the containing scope. Note: updating the nameID will affect URL on the client. */ + nameID?: InputMaybe; /** The Profile of this entity. */ profileData?: InputMaybe; }; export type UpdateSpacePlatformSettingsInput = { - account?: InputMaybe; /** Upate the URL path for the Space. */ - nameID?: InputMaybe; + nameID: Scalars['NameID']; /** The identifier for the Space whose license etc is to be updated. */ + spaceID: Scalars['UUID']; +}; + +export type UpdateSpaceSettingsCollaborationInput = { + /** Flag to control if members can create callouts. */ + allowMembersToCreateCallouts: Scalars['Boolean']; + /** Flag to control if members can create subspaces. */ + allowMembersToCreateSubspaces: Scalars['Boolean']; + /** Flag to control if ability to contribute is inherited from parent Space. */ + inheritMembershipRights: Scalars['Boolean']; +}; + +export type UpdateSpaceSettingsInput = { + collaboration?: InputMaybe; + membership?: InputMaybe; + privacy?: InputMaybe; +}; + +export type UpdateSpaceSettingsMembershipInput = { + /** The membership policy in usage for this Space */ + policy: CommunityMembershipPolicy; + /** The organizations that are trusted to Join as members for this Space */ + trustedOrganizations: Array; +}; + +export type UpdateSpaceSettingsOnSpaceInput = { + /** Update the settings for the Space. */ + settings: UpdateSpaceSettingsInput; + /** The identifier for the Space whose settings are to be updated. */ spaceID: Scalars['String']; }; -export type UpdateSpacePreferenceInput = { - /** ID of the Space */ - spaceID: Scalars['UUID_NAMEID']; - /** Type of the user preference */ - type: SpacePreferenceType; - value: Scalars['String']; +export type UpdateSpaceSettingsPrivacyInput = { + mode: SpacePrivacyMode; +}; + +export type UpdateSubspaceSettingsInput = { + /** Update the settings for the Subspace. */ + settings: UpdateSpaceSettingsInput; + /** The identifier for the Subspace whose settings are to be updated. */ + subspaceID: Scalars['String']; }; export type UpdateTagsetInput = { @@ -5591,7 +5401,6 @@ export type UserGroup = { id: Scalars['UUID']; /** The Users that are members of this User Group. */ members?: Maybe>; - name: Scalars['String']; /** Containing entity for this UserGroup. */ parent?: Maybe; /** The profile for the user group */ @@ -5910,6 +5719,7 @@ export type DirectiveResolverFn< export type ResolversTypes = { APM: ResolverTypeWrapper; Account: ResolverTypeWrapper; + AccountAuthorizationResetInput: AccountAuthorizationResetInput; ActivityCreatedSubscriptionInput: ActivityCreatedSubscriptionInput; ActivityCreatedSubscriptionResult: ResolverTypeWrapper; ActivityEventType: ActivityEventType; @@ -5994,10 +5804,6 @@ export type ResolversTypes = { CalloutTemplate: ResolverTypeWrapper; CalloutType: CalloutType; CalloutVisibility: CalloutVisibility; - Challenge: ResolverTypeWrapper; - ChallengeCreated: ResolverTypeWrapper; - ChallengePreferenceType: ChallengePreferenceType; - ChallengeTemplate: ResolverTypeWrapper; ChatGuidanceAnswerRelevanceInput: ChatGuidanceAnswerRelevanceInput; ChatGuidanceInput: ChatGuidanceInput; ChatGuidanceResult: ResolverTypeWrapper; @@ -6020,6 +5826,7 @@ export type ResolversTypes = { CommunityApplyInput: CommunityApplyInput; CommunityGuidelines: ResolverTypeWrapper; CommunityJoinInput: CommunityJoinInput; + CommunityMembershipPolicy: CommunityMembershipPolicy; CommunityMembershipStatus: CommunityMembershipStatus; CommunityPolicy: ResolverTypeWrapper; CommunityRole: CommunityRole; @@ -6029,8 +5836,8 @@ export type ResolversTypes = { Context: ResolverTypeWrapper; ContributorFilterInput: ContributorFilterInput; ContributorRoles: ResolverTypeWrapper; - ConvertChallengeToSpaceInput: ConvertChallengeToSpaceInput; - ConvertOpportunityToChallengeInput: ConvertOpportunityToChallengeInput; + ConvertSubspaceToSpaceInput: ConvertSubspaceToSpaceInput; + ConvertSubsubspaceToSubspaceInput: ConvertSubsubspaceToSubspaceInput; CreateAccountInput: CreateAccountInput; CreateActorGroupInput: CreateActorGroupInput; CreateActorInput: CreateActorInput; @@ -6040,11 +5847,9 @@ export type ResolversTypes = { CreateCalloutFramingInput: CreateCalloutFramingInput; CreateCalloutOnCollaborationInput: CreateCalloutOnCollaborationInput; CreateCalloutTemplateOnTemplatesSetInput: CreateCalloutTemplateOnTemplatesSetInput; - CreateChallengeOnSpaceInput: CreateChallengeOnSpaceInput; CreateCollaborationInput: CreateCollaborationInput; CreateContextInput: CreateContextInput; CreateContributionOnCalloutInput: CreateContributionOnCalloutInput; - CreateFeedbackOnCommunityContextInput: CreateFeedbackOnCommunityContextInput; CreateInnovationFlowTemplateOnTemplatesSetInput: CreateInnovationFlowTemplateOnTemplatesSetInput; CreateInnovationHubInput: CreateInnovationHubInput; CreateInnovationPackOnLibraryInput: CreateInnovationPackOnLibraryInput; @@ -6053,7 +5858,6 @@ export type ResolversTypes = { CreateLinkInput: CreateLinkInput; CreateLocationInput: CreateLocationInput; CreateNVPInput: CreateNvpInput; - CreateOpportunityInput: CreateOpportunityInput; CreateOrganizationInput: CreateOrganizationInput; CreatePostInput: CreatePostInput; CreatePostTemplateOnTemplatesSetInput: CreatePostTemplateOnTemplatesSetInput; @@ -6062,6 +5866,7 @@ export type ResolversTypes = { CreateReferenceOnProfileInput: CreateReferenceOnProfileInput; CreateRelationOnCollaborationInput: CreateRelationOnCollaborationInput; CreateSpaceInput: CreateSpaceInput; + CreateSubspaceInput: CreateSubspaceInput; CreateTagsetInput: CreateTagsetInput; CreateTagsetOnProfileInput: CreateTagsetOnProfileInput; CreateUserGroupInput: CreateUserGroupInput; @@ -6081,7 +5886,6 @@ export type ResolversTypes = { DeleteCalendarEventInput: DeleteCalendarEventInput; DeleteCalloutInput: DeleteCalloutInput; DeleteCalloutTemplateInput: DeleteCalloutTemplateInput; - DeleteChallengeInput: DeleteChallengeInput; DeleteCollaborationInput: DeleteCollaborationInput; DeleteDiscussionInput: DeleteDiscussionInput; DeleteDocumentInput: DeleteDocumentInput; @@ -6091,7 +5895,6 @@ export type ResolversTypes = { DeleteInvitationExternalInput: DeleteInvitationExternalInput; DeleteInvitationInput: DeleteInvitationInput; DeleteLinkInput: DeleteLinkInput; - DeleteOpportunityInput: DeleteOpportunityInput; DeleteOrganizationInput: DeleteOrganizationInput; DeletePostInput: DeletePostInput; DeletePostTemplateInput: DeletePostTemplateInput; @@ -6113,7 +5916,6 @@ export type ResolversTypes = { Document: ResolverTypeWrapper; EcosystemModel: ResolverTypeWrapper; Emoji: ResolverTypeWrapper; - FeedbackTemplate: ResolverTypeWrapper; FileStorageConfig: ResolverTypeWrapper; Float: ResolverTypeWrapper; Form: ResolverTypeWrapper; @@ -6139,11 +5941,6 @@ export type ResolversTypes = { InvitationExternal: ResolverTypeWrapper; InvitationForRoleResult: ResolverTypeWrapper; JSON: ResolverTypeWrapper; - Journey: - | ResolversTypes['Challenge'] - | ResolversTypes['Opportunity'] - | ResolversTypes['RelayPaginatedSpace'] - | ResolversTypes['Space']; LatestReleaseDiscussion: ResolverTypeWrapper; Library: ResolverTypeWrapper; License: ResolverTypeWrapper; @@ -6168,11 +5965,9 @@ export type ResolversTypes = { MoveCalloutContributionInput: MoveCalloutContributionInput; Mutation: ResolverTypeWrapper<{}>; MutationType: MutationType; - MyJourneyResults: ResolverTypeWrapper; + MySpaceResults: ResolverTypeWrapper; NVP: ResolverTypeWrapper; NameID: ResolverTypeWrapper; - Opportunity: ResolverTypeWrapper; - OpportunityCreated: ResolverTypeWrapper; Organization: ResolverTypeWrapper; OrganizationAuthorizationResetInput: OrganizationAuthorizationResetInput; OrganizationFilterInput: OrganizationFilterInput; @@ -6201,7 +5996,6 @@ export type ResolversTypes = { ProfileType: ProfileType; Query: ResolverTypeWrapper<{}>; Question: ResolverTypeWrapper; - QuestionTemplate: ResolverTypeWrapper; Reaction: ResolverTypeWrapper; Reference: ResolverTypeWrapper; Relation: ResolverTypeWrapper; @@ -6261,14 +6055,17 @@ export type ResolversTypes = { ServiceMetadata: ResolverTypeWrapper; Source: ResolverTypeWrapper; Space: ResolverTypeWrapper; - SpaceAuthorizationResetInput: SpaceAuthorizationResetInput; SpaceDefaults: ResolverTypeWrapper; SpaceFilterInput: SpaceFilterInput; - SpacePreferenceType: SpacePreferenceType; + SpacePrivacyMode: SpacePrivacyMode; + SpaceSettings: ResolverTypeWrapper; + SpaceSettingsCollaboration: ResolverTypeWrapper; + SpaceSettingsMembership: ResolverTypeWrapper; + SpaceSettingsPrivacy: ResolverTypeWrapper; + SpaceType: SpaceType; SpaceVisibility: SpaceVisibility; StorageAggregator: ResolverTypeWrapper; StorageAggregatorParent: ResolverTypeWrapper; - StorageAggregatorParentType: StorageAggregatorParentType; StorageBucket: ResolverTypeWrapper; StorageBucketParent: ResolverTypeWrapper; StorageBucketUploadFileInput: StorageBucketUploadFileInput; @@ -6277,6 +6074,7 @@ export type ResolversTypes = { StorageConfig: ResolverTypeWrapper; String: ResolverTypeWrapper; Subscription: ResolverTypeWrapper<{}>; + SubspaceCreated: ResolverTypeWrapper; Tagset: ResolverTypeWrapper; TagsetArgs: TagsetArgs; TagsetReservedName: TagsetReservedName; @@ -6284,13 +6082,12 @@ export type ResolversTypes = { TagsetType: TagsetType; Task: ResolverTypeWrapper; TaskStatus: TaskStatus; - Template: ResolverTypeWrapper