diff --git a/src/core/apollo/generated/apollo-helpers.ts b/src/core/apollo/generated/apollo-helpers.ts index 72c082e5dd..7dbdc05488 100644 --- a/src/core/apollo/generated/apollo-helpers.ts +++ b/src/core/apollo/generated/apollo-helpers.ts @@ -617,6 +617,7 @@ export type AuthenticationProviderConfigFieldPolicy = { name?: FieldPolicy | FieldReadFunction; }; export type AuthorizationKeySpecifier = ( + | 'anonymousReadAccess' | 'createdDate' | 'credentialRules' | 'id' @@ -628,6 +629,7 @@ export type AuthorizationKeySpecifier = ( | AuthorizationKeySpecifier )[]; export type AuthorizationFieldPolicy = { + anonymousReadAccess?: FieldPolicy | FieldReadFunction; createdDate?: FieldPolicy | FieldReadFunction; credentialRules?: FieldPolicy | FieldReadFunction; id?: FieldPolicy | FieldReadFunction; @@ -1855,6 +1857,11 @@ export type LicensingCredentialBasedPolicyCredentialRuleFieldPolicy = { grantedEntitlements?: FieldPolicy | FieldReadFunction; name?: FieldPolicy | FieldReadFunction; }; +export type LicensingGrantedEntitlementKeySpecifier = ('limit' | 'type' | LicensingGrantedEntitlementKeySpecifier)[]; +export type LicensingGrantedEntitlementFieldPolicy = { + limit?: FieldPolicy | FieldReadFunction; + type?: FieldPolicy | FieldReadFunction; +}; export type LifecycleKeySpecifier = ('createdDate' | 'id' | 'updatedDate' | LifecycleKeySpecifier)[]; export type LifecycleFieldPolicy = { createdDate?: FieldPolicy | FieldReadFunction; @@ -1910,6 +1917,67 @@ export type LookupByNameQueryResultsFieldPolicy = { innovationPack?: FieldPolicy | FieldReadFunction; template?: FieldPolicy | FieldReadFunction; }; +export type LookupMyPrivilegesQueryResultsKeySpecifier = ( + | 'account' + | 'application' + | 'calendar' + | 'calendarEvent' + | 'callout' + | 'collaboration' + | 'community' + | 'communityGuidelines' + | 'context' + | 'document' + | 'innovationFlow' + | 'innovationHub' + | 'innovationPack' + | 'invitation' + | 'license' + | 'post' + | 'profile' + | 'roleSet' + | 'room' + | 'space' + | 'storageAggregator' + | 'storageBucket' + | 'template' + | 'templatesManager' + | 'templatesSet' + | 'user' + | 'virtualContributor' + | 'whiteboard' + | LookupMyPrivilegesQueryResultsKeySpecifier +)[]; +export type LookupMyPrivilegesQueryResultsFieldPolicy = { + account?: FieldPolicy | FieldReadFunction; + application?: FieldPolicy | FieldReadFunction; + calendar?: FieldPolicy | FieldReadFunction; + calendarEvent?: FieldPolicy | FieldReadFunction; + callout?: FieldPolicy | FieldReadFunction; + collaboration?: FieldPolicy | FieldReadFunction; + community?: FieldPolicy | FieldReadFunction; + communityGuidelines?: FieldPolicy | FieldReadFunction; + context?: FieldPolicy | FieldReadFunction; + document?: FieldPolicy | FieldReadFunction; + innovationFlow?: FieldPolicy | FieldReadFunction; + innovationHub?: FieldPolicy | FieldReadFunction; + innovationPack?: FieldPolicy | FieldReadFunction; + invitation?: FieldPolicy | FieldReadFunction; + license?: FieldPolicy | FieldReadFunction; + post?: FieldPolicy | FieldReadFunction; + profile?: FieldPolicy | FieldReadFunction; + roleSet?: FieldPolicy | FieldReadFunction; + room?: FieldPolicy | FieldReadFunction; + space?: FieldPolicy | FieldReadFunction; + storageAggregator?: FieldPolicy | FieldReadFunction; + storageBucket?: FieldPolicy | FieldReadFunction; + template?: FieldPolicy | FieldReadFunction; + templatesManager?: FieldPolicy | FieldReadFunction; + templatesSet?: FieldPolicy | FieldReadFunction; + user?: FieldPolicy | FieldReadFunction; + virtualContributor?: FieldPolicy | FieldReadFunction; + whiteboard?: FieldPolicy | FieldReadFunction; +}; export type LookupQueryResultsKeySpecifier = ( | 'account' | 'application' @@ -1928,6 +1996,7 @@ export type LookupQueryResultsKeySpecifier = ( | 'innovationPack' | 'invitation' | 'license' + | 'myPrivileges' | 'post' | 'profile' | 'roleSet' @@ -1961,6 +2030,7 @@ export type LookupQueryResultsFieldPolicy = { innovationPack?: FieldPolicy | FieldReadFunction; invitation?: FieldPolicy | FieldReadFunction; license?: FieldPolicy | FieldReadFunction; + myPrivileges?: FieldPolicy | FieldReadFunction; post?: FieldPolicy | FieldReadFunction; profile?: FieldPolicy | FieldReadFunction; roleSet?: FieldPolicy | FieldReadFunction; @@ -2179,8 +2249,8 @@ export type MutationKeySpecifier = ( | 'updateNotificationState' | 'updateOrganization' | 'updateOrganizationPlatformSettings' + | 'updateOrganizationSettings' | 'updatePost' - | 'updatePreferenceOnOrganization' | 'updatePreferenceOnUser' | 'updateProfile' | 'updateReference' @@ -2194,6 +2264,7 @@ export type MutationKeySpecifier = ( | 'updateUser' | 'updateUserGroup' | 'updateUserPlatformSettings' + | 'updateUserSettings' | 'updateVirtualContributor' | 'updateVisual' | 'updateWhiteboard' @@ -2350,8 +2421,8 @@ export type MutationFieldPolicy = { updateNotificationState?: FieldPolicy | FieldReadFunction; updateOrganization?: FieldPolicy | FieldReadFunction; updateOrganizationPlatformSettings?: FieldPolicy | FieldReadFunction; + updateOrganizationSettings?: FieldPolicy | FieldReadFunction; updatePost?: FieldPolicy | FieldReadFunction; - updatePreferenceOnOrganization?: FieldPolicy | FieldReadFunction; updatePreferenceOnUser?: FieldPolicy | FieldReadFunction; updateProfile?: FieldPolicy | FieldReadFunction; updateReference?: FieldPolicy | FieldReadFunction; @@ -2365,6 +2436,7 @@ export type MutationFieldPolicy = { updateUser?: FieldPolicy | FieldReadFunction; updateUserGroup?: FieldPolicy | FieldReadFunction; updateUserPlatformSettings?: FieldPolicy | FieldReadFunction; + updateUserSettings?: FieldPolicy | FieldReadFunction; updateVirtualContributor?: FieldPolicy | FieldReadFunction; updateVisual?: FieldPolicy | FieldReadFunction; updateWhiteboard?: FieldPolicy | FieldReadFunction; @@ -2403,8 +2475,8 @@ export type OrganizationKeySpecifier = ( | 'myRoles' | 'nameID' | 'owners' - | 'preferences' | 'profile' + | 'settings' | 'storageAggregator' | 'updatedDate' | 'verification' @@ -2428,13 +2500,32 @@ export type OrganizationFieldPolicy = { myRoles?: FieldPolicy | FieldReadFunction; nameID?: FieldPolicy | FieldReadFunction; owners?: FieldPolicy | FieldReadFunction; - preferences?: FieldPolicy | FieldReadFunction; profile?: FieldPolicy | FieldReadFunction; + settings?: FieldPolicy | FieldReadFunction; storageAggregator?: FieldPolicy | FieldReadFunction; updatedDate?: FieldPolicy | FieldReadFunction; verification?: FieldPolicy | FieldReadFunction; website?: FieldPolicy | FieldReadFunction; }; +export type OrganizationSettingsKeySpecifier = ('membership' | 'privacy' | OrganizationSettingsKeySpecifier)[]; +export type OrganizationSettingsFieldPolicy = { + membership?: FieldPolicy | FieldReadFunction; + privacy?: FieldPolicy | FieldReadFunction; +}; +export type OrganizationSettingsMembershipKeySpecifier = ( + | 'allowUsersMatchingDomainToJoin' + | OrganizationSettingsMembershipKeySpecifier +)[]; +export type OrganizationSettingsMembershipFieldPolicy = { + allowUsersMatchingDomainToJoin?: FieldPolicy | FieldReadFunction; +}; +export type OrganizationSettingsPrivacyKeySpecifier = ( + | 'contributionRolesPubliclyVisible' + | OrganizationSettingsPrivacyKeySpecifier +)[]; +export type OrganizationSettingsPrivacyFieldPolicy = { + contributionRolesPubliclyVisible?: FieldPolicy | FieldReadFunction; +}; export type OrganizationVerificationKeySpecifier = ( | 'authorization' | 'createdDate' @@ -3638,6 +3729,7 @@ export type UserKeySpecifier = ( | 'phone' | 'preferences' | 'profile' + | 'settings' | 'storageAggregator' | 'updatedDate' | UserKeySpecifier @@ -3661,6 +3753,7 @@ export type UserFieldPolicy = { phone?: FieldPolicy | FieldReadFunction; preferences?: FieldPolicy | FieldReadFunction; profile?: FieldPolicy | FieldReadFunction; + settings?: FieldPolicy | FieldReadFunction; storageAggregator?: FieldPolicy | FieldReadFunction; updatedDate?: FieldPolicy | FieldReadFunction; }; @@ -3688,6 +3781,22 @@ export type UserGroupFieldPolicy = { profile?: FieldPolicy | FieldReadFunction; updatedDate?: FieldPolicy | FieldReadFunction; }; +export type UserSettingsKeySpecifier = ('communication' | 'privacy' | UserSettingsKeySpecifier)[]; +export type UserSettingsFieldPolicy = { + communication?: FieldPolicy | FieldReadFunction; + privacy?: FieldPolicy | FieldReadFunction; +}; +export type UserSettingsCommunicationKeySpecifier = ( + | 'allowOtherUsersToSendMessages' + | UserSettingsCommunicationKeySpecifier +)[]; +export type UserSettingsCommunicationFieldPolicy = { + allowOtherUsersToSendMessages?: FieldPolicy | FieldReadFunction; +}; +export type UserSettingsPrivacyKeySpecifier = ('contributionRolesPubliclyVisible' | UserSettingsPrivacyKeySpecifier)[]; +export type UserSettingsPrivacyFieldPolicy = { + contributionRolesPubliclyVisible?: FieldPolicy | FieldReadFunction; +}; export type VcInteractionKeySpecifier = ( | 'createdDate' | 'id' @@ -4379,6 +4488,13 @@ export type StrictTypedTypePolicies = { | (() => undefined | LicensingCredentialBasedPolicyCredentialRuleKeySpecifier); fields?: LicensingCredentialBasedPolicyCredentialRuleFieldPolicy; }; + LicensingGrantedEntitlement?: Omit & { + keyFields?: + | false + | LicensingGrantedEntitlementKeySpecifier + | (() => undefined | LicensingGrantedEntitlementKeySpecifier); + fields?: LicensingGrantedEntitlementFieldPolicy; + }; Lifecycle?: Omit & { keyFields?: false | LifecycleKeySpecifier | (() => undefined | LifecycleKeySpecifier); fields?: LifecycleFieldPolicy; @@ -4395,6 +4511,13 @@ export type StrictTypedTypePolicies = { keyFields?: false | LookupByNameQueryResultsKeySpecifier | (() => undefined | LookupByNameQueryResultsKeySpecifier); fields?: LookupByNameQueryResultsFieldPolicy; }; + LookupMyPrivilegesQueryResults?: Omit & { + keyFields?: + | false + | LookupMyPrivilegesQueryResultsKeySpecifier + | (() => undefined | LookupMyPrivilegesQueryResultsKeySpecifier); + fields?: LookupMyPrivilegesQueryResultsFieldPolicy; + }; LookupQueryResults?: Omit & { keyFields?: false | LookupQueryResultsKeySpecifier | (() => undefined | LookupQueryResultsKeySpecifier); fields?: LookupQueryResultsFieldPolicy; @@ -4435,6 +4558,24 @@ export type StrictTypedTypePolicies = { keyFields?: false | OrganizationKeySpecifier | (() => undefined | OrganizationKeySpecifier); fields?: OrganizationFieldPolicy; }; + OrganizationSettings?: Omit & { + keyFields?: false | OrganizationSettingsKeySpecifier | (() => undefined | OrganizationSettingsKeySpecifier); + fields?: OrganizationSettingsFieldPolicy; + }; + OrganizationSettingsMembership?: Omit & { + keyFields?: + | false + | OrganizationSettingsMembershipKeySpecifier + | (() => undefined | OrganizationSettingsMembershipKeySpecifier); + fields?: OrganizationSettingsMembershipFieldPolicy; + }; + OrganizationSettingsPrivacy?: Omit & { + keyFields?: + | false + | OrganizationSettingsPrivacyKeySpecifier + | (() => undefined | OrganizationSettingsPrivacyKeySpecifier); + fields?: OrganizationSettingsPrivacyFieldPolicy; + }; OrganizationVerification?: Omit & { keyFields?: false | OrganizationVerificationKeySpecifier | (() => undefined | OrganizationVerificationKeySpecifier); fields?: OrganizationVerificationFieldPolicy; @@ -4724,6 +4865,21 @@ export type StrictTypedTypePolicies = { keyFields?: false | UserGroupKeySpecifier | (() => undefined | UserGroupKeySpecifier); fields?: UserGroupFieldPolicy; }; + UserSettings?: Omit & { + keyFields?: false | UserSettingsKeySpecifier | (() => undefined | UserSettingsKeySpecifier); + fields?: UserSettingsFieldPolicy; + }; + UserSettingsCommunication?: Omit & { + keyFields?: + | false + | UserSettingsCommunicationKeySpecifier + | (() => undefined | UserSettingsCommunicationKeySpecifier); + fields?: UserSettingsCommunicationFieldPolicy; + }; + UserSettingsPrivacy?: Omit & { + keyFields?: false | UserSettingsPrivacyKeySpecifier | (() => undefined | UserSettingsPrivacyKeySpecifier); + fields?: UserSettingsPrivacyFieldPolicy; + }; VcInteraction?: Omit & { keyFields?: false | VcInteractionKeySpecifier | (() => undefined | VcInteractionKeySpecifier); fields?: VcInteractionFieldPolicy; diff --git a/src/core/apollo/generated/apollo-hooks.ts b/src/core/apollo/generated/apollo-hooks.ts index e1836342db..8742ddedbd 100644 --- a/src/core/apollo/generated/apollo-hooks.ts +++ b/src/core/apollo/generated/apollo-hooks.ts @@ -8311,130 +8311,6 @@ export type UpdateWhiteboardContentUpdatePolicyMutationOptions = Apollo.BaseMuta SchemaTypes.UpdateWhiteboardContentUpdatePolicyMutation, SchemaTypes.UpdateWhiteboardContentUpdatePolicyMutationVariables >; -export const OrganizationPreferencesDocument = gql` - query organizationPreferences($orgId: UUID_NAMEID!) { - organization(ID: $orgId) { - id - preferences { - id - value - definition { - id - description - displayName - group - type - valueType - } - } - } - } -`; - -/** - * __useOrganizationPreferencesQuery__ - * - * To run a query within a React component, call `useOrganizationPreferencesQuery` and pass it any options that fit your needs. - * When your component renders, `useOrganizationPreferencesQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useOrganizationPreferencesQuery({ - * variables: { - * orgId: // value for 'orgId' - * }, - * }); - */ -export function useOrganizationPreferencesQuery( - baseOptions: Apollo.QueryHookOptions< - SchemaTypes.OrganizationPreferencesQuery, - SchemaTypes.OrganizationPreferencesQueryVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - OrganizationPreferencesDocument, - options - ); -} - -export function useOrganizationPreferencesLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - SchemaTypes.OrganizationPreferencesQuery, - SchemaTypes.OrganizationPreferencesQueryVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - SchemaTypes.OrganizationPreferencesQuery, - SchemaTypes.OrganizationPreferencesQueryVariables - >(OrganizationPreferencesDocument, options); -} - -export type OrganizationPreferencesQueryHookResult = ReturnType; -export type OrganizationPreferencesLazyQueryHookResult = ReturnType; -export type OrganizationPreferencesQueryResult = Apollo.QueryResult< - SchemaTypes.OrganizationPreferencesQuery, - SchemaTypes.OrganizationPreferencesQueryVariables ->; -export function refetchOrganizationPreferencesQuery(variables: SchemaTypes.OrganizationPreferencesQueryVariables) { - return { query: OrganizationPreferencesDocument, variables: variables }; -} - -export const UpdatePreferenceOnOrganizationDocument = gql` - mutation updatePreferenceOnOrganization($preferenceData: UpdateOrganizationPreferenceInput!) { - updatePreferenceOnOrganization(preferenceData: $preferenceData) { - id - value - } - } -`; -export type UpdatePreferenceOnOrganizationMutationFn = Apollo.MutationFunction< - SchemaTypes.UpdatePreferenceOnOrganizationMutation, - SchemaTypes.UpdatePreferenceOnOrganizationMutationVariables ->; - -/** - * __useUpdatePreferenceOnOrganizationMutation__ - * - * To run a mutation, you first call `useUpdatePreferenceOnOrganizationMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdatePreferenceOnOrganizationMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updatePreferenceOnOrganizationMutation, { data, loading, error }] = useUpdatePreferenceOnOrganizationMutation({ - * variables: { - * preferenceData: // value for 'preferenceData' - * }, - * }); - */ -export function useUpdatePreferenceOnOrganizationMutation( - baseOptions?: Apollo.MutationHookOptions< - SchemaTypes.UpdatePreferenceOnOrganizationMutation, - SchemaTypes.UpdatePreferenceOnOrganizationMutationVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation< - SchemaTypes.UpdatePreferenceOnOrganizationMutation, - SchemaTypes.UpdatePreferenceOnOrganizationMutationVariables - >(UpdatePreferenceOnOrganizationDocument, options); -} - -export type UpdatePreferenceOnOrganizationMutationHookResult = ReturnType< - typeof useUpdatePreferenceOnOrganizationMutation ->; -export type UpdatePreferenceOnOrganizationMutationResult = - Apollo.MutationResult; -export type UpdatePreferenceOnOrganizationMutationOptions = Apollo.BaseMutationOptions< - SchemaTypes.UpdatePreferenceOnOrganizationMutation, - SchemaTypes.UpdatePreferenceOnOrganizationMutationVariables ->; export const CreateReferenceOnProfileDocument = gql` mutation createReferenceOnProfile($input: CreateReferenceOnProfileInput!) { createReferenceOnProfile(referenceInput: $input) { @@ -11253,395 +11129,148 @@ export function refetchRolesOrganizationQuery(variables: SchemaTypes.RolesOrgani return { query: RolesOrganizationDocument, variables: variables }; } -export const AssignLicensePlanToAccountDocument = gql` - mutation AssignLicensePlanToAccount($licensePlanId: UUID!, $accountId: UUID!, $licensingId: UUID!) { - assignLicensePlanToAccount( - planData: { accountID: $accountId, licensePlanID: $licensePlanId, licensingID: $licensingId } - ) { - id +export const OrganizationInfoDocument = gql` + query organizationInfo($organizationId: UUID_NAMEID!, $includeAssociates: Boolean = false) { + organization(ID: $organizationId) { + ...OrganizationInfo } } + ${OrganizationInfoFragmentDoc} `; -export type AssignLicensePlanToAccountMutationFn = Apollo.MutationFunction< - SchemaTypes.AssignLicensePlanToAccountMutation, - SchemaTypes.AssignLicensePlanToAccountMutationVariables ->; /** - * __useAssignLicensePlanToAccountMutation__ + * __useOrganizationInfoQuery__ * - * To run a mutation, you first call `useAssignLicensePlanToAccountMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useAssignLicensePlanToAccountMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution + * To run a query within a React component, call `useOrganizationInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useOrganizationInfoQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example - * const [assignLicensePlanToAccountMutation, { data, loading, error }] = useAssignLicensePlanToAccountMutation({ + * const { data, loading, error } = useOrganizationInfoQuery({ * variables: { - * licensePlanId: // value for 'licensePlanId' - * accountId: // value for 'accountId' - * licensingId: // value for 'licensingId' + * organizationId: // value for 'organizationId' + * includeAssociates: // value for 'includeAssociates' * }, * }); */ -export function useAssignLicensePlanToAccountMutation( - baseOptions?: Apollo.MutationHookOptions< - SchemaTypes.AssignLicensePlanToAccountMutation, - SchemaTypes.AssignLicensePlanToAccountMutationVariables +export function useOrganizationInfoQuery( + baseOptions: Apollo.QueryHookOptions +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + OrganizationInfoDocument, + options + ); +} + +export function useOrganizationInfoLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.OrganizationInfoQuery, + SchemaTypes.OrganizationInfoQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation< - SchemaTypes.AssignLicensePlanToAccountMutation, - SchemaTypes.AssignLicensePlanToAccountMutationVariables - >(AssignLicensePlanToAccountDocument, options); + return Apollo.useLazyQuery( + OrganizationInfoDocument, + options + ); } -export type AssignLicensePlanToAccountMutationHookResult = ReturnType; -export type AssignLicensePlanToAccountMutationResult = - Apollo.MutationResult; -export type AssignLicensePlanToAccountMutationOptions = Apollo.BaseMutationOptions< - SchemaTypes.AssignLicensePlanToAccountMutation, - SchemaTypes.AssignLicensePlanToAccountMutationVariables +export type OrganizationInfoQueryHookResult = ReturnType; +export type OrganizationInfoLazyQueryHookResult = ReturnType; +export type OrganizationInfoQueryResult = Apollo.QueryResult< + SchemaTypes.OrganizationInfoQuery, + SchemaTypes.OrganizationInfoQueryVariables >; -export const RevokeLicensePlanFromAccountDocument = gql` - mutation RevokeLicensePlanFromAccount($licensePlanId: UUID!, $accountId: UUID!, $licensingId: UUID!) { - revokeLicensePlanFromAccount( - planData: { accountID: $accountId, licensePlanID: $licensePlanId, licensingID: $licensingId } - ) { +export function refetchOrganizationInfoQuery(variables: SchemaTypes.OrganizationInfoQueryVariables) { + return { query: OrganizationInfoDocument, variables: variables }; +} + +export const CreateGroupOnOrganizationDocument = gql` + mutation createGroupOnOrganization($input: CreateUserGroupInput!) { + createGroupOnOrganization(groupData: $input) { id + profile { + id + displayName + } } } `; -export type RevokeLicensePlanFromAccountMutationFn = Apollo.MutationFunction< - SchemaTypes.RevokeLicensePlanFromAccountMutation, - SchemaTypes.RevokeLicensePlanFromAccountMutationVariables +export type CreateGroupOnOrganizationMutationFn = Apollo.MutationFunction< + SchemaTypes.CreateGroupOnOrganizationMutation, + SchemaTypes.CreateGroupOnOrganizationMutationVariables >; /** - * __useRevokeLicensePlanFromAccountMutation__ + * __useCreateGroupOnOrganizationMutation__ * - * To run a mutation, you first call `useRevokeLicensePlanFromAccountMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useRevokeLicensePlanFromAccountMutation` returns a tuple that includes: + * To run a mutation, you first call `useCreateGroupOnOrganizationMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateGroupOnOrganizationMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const [revokeLicensePlanFromAccountMutation, { data, loading, error }] = useRevokeLicensePlanFromAccountMutation({ + * const [createGroupOnOrganizationMutation, { data, loading, error }] = useCreateGroupOnOrganizationMutation({ * variables: { - * licensePlanId: // value for 'licensePlanId' - * accountId: // value for 'accountId' - * licensingId: // value for 'licensingId' + * input: // value for 'input' * }, * }); */ -export function useRevokeLicensePlanFromAccountMutation( +export function useCreateGroupOnOrganizationMutation( baseOptions?: Apollo.MutationHookOptions< - SchemaTypes.RevokeLicensePlanFromAccountMutation, - SchemaTypes.RevokeLicensePlanFromAccountMutationVariables + SchemaTypes.CreateGroupOnOrganizationMutation, + SchemaTypes.CreateGroupOnOrganizationMutationVariables > ) { const options = { ...defaultOptions, ...baseOptions }; return Apollo.useMutation< - SchemaTypes.RevokeLicensePlanFromAccountMutation, - SchemaTypes.RevokeLicensePlanFromAccountMutationVariables - >(RevokeLicensePlanFromAccountDocument, options); + SchemaTypes.CreateGroupOnOrganizationMutation, + SchemaTypes.CreateGroupOnOrganizationMutationVariables + >(CreateGroupOnOrganizationDocument, options); } -export type RevokeLicensePlanFromAccountMutationHookResult = ReturnType; -export type RevokeLicensePlanFromAccountMutationResult = - Apollo.MutationResult; -export type RevokeLicensePlanFromAccountMutationOptions = Apollo.BaseMutationOptions< - SchemaTypes.RevokeLicensePlanFromAccountMutation, - SchemaTypes.RevokeLicensePlanFromAccountMutationVariables +export type CreateGroupOnOrganizationMutationHookResult = ReturnType; +export type CreateGroupOnOrganizationMutationResult = + Apollo.MutationResult; +export type CreateGroupOnOrganizationMutationOptions = Apollo.BaseMutationOptions< + SchemaTypes.CreateGroupOnOrganizationMutation, + SchemaTypes.CreateGroupOnOrganizationMutationVariables >; -export const AdminGlobalOrganizationsListDocument = gql` - query adminGlobalOrganizationsList($first: Int!, $after: UUID, $filter: OrganizationFilterInput) { - organizationsPaginated(first: $first, after: $after, filter: $filter) { - organization { +export const CreateOrganizationDocument = gql` + mutation createOrganization($input: CreateOrganizationInput!) { + createOrganization(organizationData: $input) { + id + nameID + profile { id - account { - id - subscriptions { - name - } - } - profile { - id - url - displayName - visual(type: AVATAR) { - id - uri - } - } - verification { - id - state - } - } - pageInfo { - ...PageInfo + displayName + url } } } - ${PageInfoFragmentDoc} `; +export type CreateOrganizationMutationFn = Apollo.MutationFunction< + SchemaTypes.CreateOrganizationMutation, + SchemaTypes.CreateOrganizationMutationVariables +>; /** - * __useAdminGlobalOrganizationsListQuery__ + * __useCreateOrganizationMutation__ * - * To run a query within a React component, call `useAdminGlobalOrganizationsListQuery` and pass it any options that fit your needs. - * When your component renders, `useAdminGlobalOrganizationsListQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. + * To run a mutation, you first call `useCreateOrganizationMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateOrganizationMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const { data, loading, error } = useAdminGlobalOrganizationsListQuery({ - * variables: { - * first: // value for 'first' - * after: // value for 'after' - * filter: // value for 'filter' - * }, - * }); - */ -export function useAdminGlobalOrganizationsListQuery( - baseOptions: Apollo.QueryHookOptions< - SchemaTypes.AdminGlobalOrganizationsListQuery, - SchemaTypes.AdminGlobalOrganizationsListQueryVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - SchemaTypes.AdminGlobalOrganizationsListQuery, - SchemaTypes.AdminGlobalOrganizationsListQueryVariables - >(AdminGlobalOrganizationsListDocument, options); -} - -export function useAdminGlobalOrganizationsListLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - SchemaTypes.AdminGlobalOrganizationsListQuery, - SchemaTypes.AdminGlobalOrganizationsListQueryVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - SchemaTypes.AdminGlobalOrganizationsListQuery, - SchemaTypes.AdminGlobalOrganizationsListQueryVariables - >(AdminGlobalOrganizationsListDocument, options); -} - -export type AdminGlobalOrganizationsListQueryHookResult = ReturnType; -export type AdminGlobalOrganizationsListLazyQueryHookResult = ReturnType< - typeof useAdminGlobalOrganizationsListLazyQuery ->; -export type AdminGlobalOrganizationsListQueryResult = Apollo.QueryResult< - SchemaTypes.AdminGlobalOrganizationsListQuery, - SchemaTypes.AdminGlobalOrganizationsListQueryVariables ->; -export function refetchAdminGlobalOrganizationsListQuery( - variables: SchemaTypes.AdminGlobalOrganizationsListQueryVariables -) { - return { query: AdminGlobalOrganizationsListDocument, variables: variables }; -} - -export const AdminOrganizationVerifyDocument = gql` - mutation adminOrganizationVerify($input: OrganizationVerificationEventInput!) { - eventOnOrganizationVerification(eventData: $input) { - id - nextEvents - state - } - } -`; -export type AdminOrganizationVerifyMutationFn = Apollo.MutationFunction< - SchemaTypes.AdminOrganizationVerifyMutation, - SchemaTypes.AdminOrganizationVerifyMutationVariables ->; - -/** - * __useAdminOrganizationVerifyMutation__ - * - * To run a mutation, you first call `useAdminOrganizationVerifyMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useAdminOrganizationVerifyMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [adminOrganizationVerifyMutation, { data, loading, error }] = useAdminOrganizationVerifyMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useAdminOrganizationVerifyMutation( - baseOptions?: Apollo.MutationHookOptions< - SchemaTypes.AdminOrganizationVerifyMutation, - SchemaTypes.AdminOrganizationVerifyMutationVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation< - SchemaTypes.AdminOrganizationVerifyMutation, - SchemaTypes.AdminOrganizationVerifyMutationVariables - >(AdminOrganizationVerifyDocument, options); -} - -export type AdminOrganizationVerifyMutationHookResult = ReturnType; -export type AdminOrganizationVerifyMutationResult = Apollo.MutationResult; -export type AdminOrganizationVerifyMutationOptions = Apollo.BaseMutationOptions< - SchemaTypes.AdminOrganizationVerifyMutation, - SchemaTypes.AdminOrganizationVerifyMutationVariables ->; -export const OrganizationInfoDocument = gql` - query organizationInfo($organizationId: UUID_NAMEID!, $includeAssociates: Boolean = false) { - organization(ID: $organizationId) { - ...OrganizationInfo - } - } - ${OrganizationInfoFragmentDoc} -`; - -/** - * __useOrganizationInfoQuery__ - * - * To run a query within a React component, call `useOrganizationInfoQuery` and pass it any options that fit your needs. - * When your component renders, `useOrganizationInfoQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useOrganizationInfoQuery({ - * variables: { - * organizationId: // value for 'organizationId' - * includeAssociates: // value for 'includeAssociates' - * }, - * }); - */ -export function useOrganizationInfoQuery( - baseOptions: Apollo.QueryHookOptions -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - OrganizationInfoDocument, - options - ); -} - -export function useOrganizationInfoLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - SchemaTypes.OrganizationInfoQuery, - SchemaTypes.OrganizationInfoQueryVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - OrganizationInfoDocument, - options - ); -} - -export type OrganizationInfoQueryHookResult = ReturnType; -export type OrganizationInfoLazyQueryHookResult = ReturnType; -export type OrganizationInfoQueryResult = Apollo.QueryResult< - SchemaTypes.OrganizationInfoQuery, - SchemaTypes.OrganizationInfoQueryVariables ->; -export function refetchOrganizationInfoQuery(variables: SchemaTypes.OrganizationInfoQueryVariables) { - return { query: OrganizationInfoDocument, variables: variables }; -} - -export const CreateGroupOnOrganizationDocument = gql` - mutation createGroupOnOrganization($input: CreateUserGroupInput!) { - createGroupOnOrganization(groupData: $input) { - id - profile { - id - displayName - } - } - } -`; -export type CreateGroupOnOrganizationMutationFn = Apollo.MutationFunction< - SchemaTypes.CreateGroupOnOrganizationMutation, - SchemaTypes.CreateGroupOnOrganizationMutationVariables ->; - -/** - * __useCreateGroupOnOrganizationMutation__ - * - * To run a mutation, you first call `useCreateGroupOnOrganizationMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateGroupOnOrganizationMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createGroupOnOrganizationMutation, { data, loading, error }] = useCreateGroupOnOrganizationMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateGroupOnOrganizationMutation( - baseOptions?: Apollo.MutationHookOptions< - SchemaTypes.CreateGroupOnOrganizationMutation, - SchemaTypes.CreateGroupOnOrganizationMutationVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation< - SchemaTypes.CreateGroupOnOrganizationMutation, - SchemaTypes.CreateGroupOnOrganizationMutationVariables - >(CreateGroupOnOrganizationDocument, options); -} - -export type CreateGroupOnOrganizationMutationHookResult = ReturnType; -export type CreateGroupOnOrganizationMutationResult = - Apollo.MutationResult; -export type CreateGroupOnOrganizationMutationOptions = Apollo.BaseMutationOptions< - SchemaTypes.CreateGroupOnOrganizationMutation, - SchemaTypes.CreateGroupOnOrganizationMutationVariables ->; -export const CreateOrganizationDocument = gql` - mutation createOrganization($input: CreateOrganizationInput!) { - createOrganization(organizationData: $input) { - id - nameID - profile { - id - displayName - url - } - } - } -`; -export type CreateOrganizationMutationFn = Apollo.MutationFunction< - SchemaTypes.CreateOrganizationMutation, - SchemaTypes.CreateOrganizationMutationVariables ->; - -/** - * __useCreateOrganizationMutation__ - * - * To run a mutation, you first call `useCreateOrganizationMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateOrganizationMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createOrganizationMutation, { data, loading, error }] = useCreateOrganizationMutation({ + * const [createOrganizationMutation, { data, loading, error }] = useCreateOrganizationMutation({ * variables: { * input: // value for 'input' * }, @@ -11714,55 +11343,6 @@ export type DeleteOrganizationMutationOptions = Apollo.BaseMutationOptions< SchemaTypes.DeleteOrganizationMutation, SchemaTypes.DeleteOrganizationMutationVariables >; -export const UpdateOrganizationDocument = gql` - mutation updateOrganization($input: UpdateOrganizationInput!) { - updateOrganization(organizationData: $input) { - ...OrganizationProfileInfo - } - } - ${OrganizationProfileInfoFragmentDoc} -`; -export type UpdateOrganizationMutationFn = Apollo.MutationFunction< - SchemaTypes.UpdateOrganizationMutation, - SchemaTypes.UpdateOrganizationMutationVariables ->; - -/** - * __useUpdateOrganizationMutation__ - * - * To run a mutation, you first call `useUpdateOrganizationMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateOrganizationMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateOrganizationMutation, { data, loading, error }] = useUpdateOrganizationMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateOrganizationMutation( - baseOptions?: Apollo.MutationHookOptions< - SchemaTypes.UpdateOrganizationMutation, - SchemaTypes.UpdateOrganizationMutationVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation( - UpdateOrganizationDocument, - options - ); -} - -export type UpdateOrganizationMutationHookResult = ReturnType; -export type UpdateOrganizationMutationResult = Apollo.MutationResult; -export type UpdateOrganizationMutationOptions = Apollo.BaseMutationOptions< - SchemaTypes.UpdateOrganizationMutation, - SchemaTypes.UpdateOrganizationMutationVariables ->; export const OrganizationAuthorizationDocument = gql` query OrganizationAuthorization($organizationId: UUID_NAMEID!) { organization(ID: $organizationId) { @@ -12562,163 +12142,401 @@ export function refetchAvailableVirtualContributorsQuery( return { query: AvailableVirtualContributorsDocument, variables: variables }; } -export const AvailableVirtualContributorsInLibraryDocument = gql` - query AvailableVirtualContributorsInLibrary { - platform { +export const AvailableVirtualContributorsInLibraryDocument = gql` + query AvailableVirtualContributorsInLibrary { + platform { + id + library { + id + virtualContributors { + searchVisibility + ...VirtualContributorFull + } + } + } + } + ${VirtualContributorFullFragmentDoc} +`; + +/** + * __useAvailableVirtualContributorsInLibraryQuery__ + * + * To run a query within a React component, call `useAvailableVirtualContributorsInLibraryQuery` and pass it any options that fit your needs. + * When your component renders, `useAvailableVirtualContributorsInLibraryQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAvailableVirtualContributorsInLibraryQuery({ + * variables: { + * }, + * }); + */ +export function useAvailableVirtualContributorsInLibraryQuery( + baseOptions?: Apollo.QueryHookOptions< + SchemaTypes.AvailableVirtualContributorsInLibraryQuery, + SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + SchemaTypes.AvailableVirtualContributorsInLibraryQuery, + SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables + >(AvailableVirtualContributorsInLibraryDocument, options); +} + +export function useAvailableVirtualContributorsInLibraryLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.AvailableVirtualContributorsInLibraryQuery, + SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + SchemaTypes.AvailableVirtualContributorsInLibraryQuery, + SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables + >(AvailableVirtualContributorsInLibraryDocument, options); +} + +export type AvailableVirtualContributorsInLibraryQueryHookResult = ReturnType< + typeof useAvailableVirtualContributorsInLibraryQuery +>; +export type AvailableVirtualContributorsInLibraryLazyQueryHookResult = ReturnType< + typeof useAvailableVirtualContributorsInLibraryLazyQuery +>; +export type AvailableVirtualContributorsInLibraryQueryResult = Apollo.QueryResult< + SchemaTypes.AvailableVirtualContributorsInLibraryQuery, + SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables +>; +export function refetchAvailableVirtualContributorsInLibraryQuery( + variables?: SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables +) { + return { query: AvailableVirtualContributorsInLibraryDocument, variables: variables }; +} + +export const CommunityVirtualMembersListDocument = gql` + query CommunityVirtualMembersList( + $roleSetId: UUID! + $spaceId: UUID = "00000000-0000-0000-0000-000000000000" + $includeSpaceHost: Boolean = false + ) { + lookup { + space(ID: $spaceId) @include(if: $includeSpaceHost) { + id + provider { + ...ContributorDetails + } + } + roleSet(ID: $roleSetId) { + authorization { + id + myPrivileges + } + memberVirtualContributors: virtualContributorsInRole(role: MEMBER) { + ...CommunityMemberVirtualContributor + } + } + } + } + ${ContributorDetailsFragmentDoc} + ${CommunityMemberVirtualContributorFragmentDoc} +`; + +/** + * __useCommunityVirtualMembersListQuery__ + * + * To run a query within a React component, call `useCommunityVirtualMembersListQuery` and pass it any options that fit your needs. + * When your component renders, `useCommunityVirtualMembersListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCommunityVirtualMembersListQuery({ + * variables: { + * roleSetId: // value for 'roleSetId' + * spaceId: // value for 'spaceId' + * includeSpaceHost: // value for 'includeSpaceHost' + * }, + * }); + */ +export function useCommunityVirtualMembersListQuery( + baseOptions: Apollo.QueryHookOptions< + SchemaTypes.CommunityVirtualMembersListQuery, + SchemaTypes.CommunityVirtualMembersListQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + SchemaTypes.CommunityVirtualMembersListQuery, + SchemaTypes.CommunityVirtualMembersListQueryVariables + >(CommunityVirtualMembersListDocument, options); +} + +export function useCommunityVirtualMembersListLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.CommunityVirtualMembersListQuery, + SchemaTypes.CommunityVirtualMembersListQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + SchemaTypes.CommunityVirtualMembersListQuery, + SchemaTypes.CommunityVirtualMembersListQueryVariables + >(CommunityVirtualMembersListDocument, options); +} + +export type CommunityVirtualMembersListQueryHookResult = ReturnType; +export type CommunityVirtualMembersListLazyQueryHookResult = ReturnType; +export type CommunityVirtualMembersListQueryResult = Apollo.QueryResult< + SchemaTypes.CommunityVirtualMembersListQuery, + SchemaTypes.CommunityVirtualMembersListQueryVariables +>; +export function refetchCommunityVirtualMembersListQuery( + variables: SchemaTypes.CommunityVirtualMembersListQueryVariables +) { + return { query: CommunityVirtualMembersListDocument, variables: variables }; +} + +export const OrganizationAccountDocument = gql` + query OrganizationAccount($organizationNameId: UUID_NAMEID!) { + organization(ID: $organizationNameId) { + id + profile { + id + displayName + } + account { + id + } + } + } +`; + +/** + * __useOrganizationAccountQuery__ + * + * To run a query within a React component, call `useOrganizationAccountQuery` and pass it any options that fit your needs. + * When your component renders, `useOrganizationAccountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOrganizationAccountQuery({ + * variables: { + * organizationNameId: // value for 'organizationNameId' + * }, + * }); + */ +export function useOrganizationAccountQuery( + baseOptions: Apollo.QueryHookOptions< + SchemaTypes.OrganizationAccountQuery, + SchemaTypes.OrganizationAccountQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + OrganizationAccountDocument, + options + ); +} + +export function useOrganizationAccountLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.OrganizationAccountQuery, + SchemaTypes.OrganizationAccountQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + OrganizationAccountDocument, + options + ); +} + +export type OrganizationAccountQueryHookResult = ReturnType; +export type OrganizationAccountLazyQueryHookResult = ReturnType; +export type OrganizationAccountQueryResult = Apollo.QueryResult< + SchemaTypes.OrganizationAccountQuery, + SchemaTypes.OrganizationAccountQueryVariables +>; +export function refetchOrganizationAccountQuery(variables: SchemaTypes.OrganizationAccountQueryVariables) { + return { query: OrganizationAccountDocument, variables: variables }; +} + +export const OrganizationSettingsDocument = gql` + query organizationSettings($orgId: UUID_NAMEID!) { + organization(ID: $orgId) { id - library { - id - virtualContributors { - searchVisibility - ...VirtualContributorFull + settings { + membership { + allowUsersMatchingDomainToJoin + } + privacy { + contributionRolesPubliclyVisible } } } } - ${VirtualContributorFullFragmentDoc} `; /** - * __useAvailableVirtualContributorsInLibraryQuery__ + * __useOrganizationSettingsQuery__ * - * To run a query within a React component, call `useAvailableVirtualContributorsInLibraryQuery` and pass it any options that fit your needs. - * When your component renders, `useAvailableVirtualContributorsInLibraryQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useOrganizationSettingsQuery` and pass it any options that fit your needs. + * When your component renders, `useOrganizationSettingsQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your UI. * * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example - * const { data, loading, error } = useAvailableVirtualContributorsInLibraryQuery({ + * const { data, loading, error } = useOrganizationSettingsQuery({ * variables: { + * orgId: // value for 'orgId' * }, * }); */ -export function useAvailableVirtualContributorsInLibraryQuery( - baseOptions?: Apollo.QueryHookOptions< - SchemaTypes.AvailableVirtualContributorsInLibraryQuery, - SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables +export function useOrganizationSettingsQuery( + baseOptions: Apollo.QueryHookOptions< + SchemaTypes.OrganizationSettingsQuery, + SchemaTypes.OrganizationSettingsQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - SchemaTypes.AvailableVirtualContributorsInLibraryQuery, - SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables - >(AvailableVirtualContributorsInLibraryDocument, options); + return Apollo.useQuery( + OrganizationSettingsDocument, + options + ); } -export function useAvailableVirtualContributorsInLibraryLazyQuery( +export function useOrganizationSettingsLazyQuery( baseOptions?: Apollo.LazyQueryHookOptions< - SchemaTypes.AvailableVirtualContributorsInLibraryQuery, - SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables + SchemaTypes.OrganizationSettingsQuery, + SchemaTypes.OrganizationSettingsQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - SchemaTypes.AvailableVirtualContributorsInLibraryQuery, - SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables - >(AvailableVirtualContributorsInLibraryDocument, options); + return Apollo.useLazyQuery( + OrganizationSettingsDocument, + options + ); } -export type AvailableVirtualContributorsInLibraryQueryHookResult = ReturnType< - typeof useAvailableVirtualContributorsInLibraryQuery ->; -export type AvailableVirtualContributorsInLibraryLazyQueryHookResult = ReturnType< - typeof useAvailableVirtualContributorsInLibraryLazyQuery ->; -export type AvailableVirtualContributorsInLibraryQueryResult = Apollo.QueryResult< - SchemaTypes.AvailableVirtualContributorsInLibraryQuery, - SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables +export type OrganizationSettingsQueryHookResult = ReturnType; +export type OrganizationSettingsLazyQueryHookResult = ReturnType; +export type OrganizationSettingsQueryResult = Apollo.QueryResult< + SchemaTypes.OrganizationSettingsQuery, + SchemaTypes.OrganizationSettingsQueryVariables >; -export function refetchAvailableVirtualContributorsInLibraryQuery( - variables?: SchemaTypes.AvailableVirtualContributorsInLibraryQueryVariables -) { - return { query: AvailableVirtualContributorsInLibraryDocument, variables: variables }; +export function refetchOrganizationSettingsQuery(variables: SchemaTypes.OrganizationSettingsQueryVariables) { + return { query: OrganizationSettingsDocument, variables: variables }; } -export const CommunityVirtualMembersListDocument = gql` - query CommunityVirtualMembersList( - $roleSetId: UUID! - $spaceId: UUID = "00000000-0000-0000-0000-000000000000" - $includeSpaceHost: Boolean = false - ) { - lookup { - space(ID: $spaceId) @include(if: $includeSpaceHost) { - id - provider { - ...ContributorDetails - } - } - roleSet(ID: $roleSetId) { - authorization { - id - myPrivileges - } - memberVirtualContributors: virtualContributorsInRole(role: MEMBER) { - ...CommunityMemberVirtualContributor - } - } +export const UpdateOrganizationDocument = gql` + mutation updateOrganization($input: UpdateOrganizationInput!) { + updateOrganization(organizationData: $input) { + ...OrganizationProfileInfo } } - ${ContributorDetailsFragmentDoc} - ${CommunityMemberVirtualContributorFragmentDoc} + ${OrganizationProfileInfoFragmentDoc} `; +export type UpdateOrganizationMutationFn = Apollo.MutationFunction< + SchemaTypes.UpdateOrganizationMutation, + SchemaTypes.UpdateOrganizationMutationVariables +>; /** - * __useCommunityVirtualMembersListQuery__ + * __useUpdateOrganizationMutation__ * - * To run a query within a React component, call `useCommunityVirtualMembersListQuery` and pass it any options that fit your needs. - * When your component renders, `useCommunityVirtualMembersListQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. + * To run a mutation, you first call `useUpdateOrganizationMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateOrganizationMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const { data, loading, error } = useCommunityVirtualMembersListQuery({ + * const [updateOrganizationMutation, { data, loading, error }] = useUpdateOrganizationMutation({ * variables: { - * roleSetId: // value for 'roleSetId' - * spaceId: // value for 'spaceId' - * includeSpaceHost: // value for 'includeSpaceHost' + * input: // value for 'input' * }, * }); */ -export function useCommunityVirtualMembersListQuery( - baseOptions: Apollo.QueryHookOptions< - SchemaTypes.CommunityVirtualMembersListQuery, - SchemaTypes.CommunityVirtualMembersListQueryVariables +export function useUpdateOrganizationMutation( + baseOptions?: Apollo.MutationHookOptions< + SchemaTypes.UpdateOrganizationMutation, + SchemaTypes.UpdateOrganizationMutationVariables > ) { const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - SchemaTypes.CommunityVirtualMembersListQuery, - SchemaTypes.CommunityVirtualMembersListQueryVariables - >(CommunityVirtualMembersListDocument, options); + return Apollo.useMutation( + UpdateOrganizationDocument, + options + ); } -export function useCommunityVirtualMembersListLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - SchemaTypes.CommunityVirtualMembersListQuery, - SchemaTypes.CommunityVirtualMembersListQueryVariables +export type UpdateOrganizationMutationHookResult = ReturnType; +export type UpdateOrganizationMutationResult = Apollo.MutationResult; +export type UpdateOrganizationMutationOptions = Apollo.BaseMutationOptions< + SchemaTypes.UpdateOrganizationMutation, + SchemaTypes.UpdateOrganizationMutationVariables +>; +export const UpdateOrganizationSettingsDocument = gql` + mutation updateOrganizationSettings($settingsData: UpdateOrganizationSettingsInput!) { + updateOrganizationSettings(settingsData: $settingsData) { + id + settings { + membership { + allowUsersMatchingDomainToJoin + } + } + } + } +`; +export type UpdateOrganizationSettingsMutationFn = Apollo.MutationFunction< + SchemaTypes.UpdateOrganizationSettingsMutation, + SchemaTypes.UpdateOrganizationSettingsMutationVariables +>; + +/** + * __useUpdateOrganizationSettingsMutation__ + * + * To run a mutation, you first call `useUpdateOrganizationSettingsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateOrganizationSettingsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateOrganizationSettingsMutation, { data, loading, error }] = useUpdateOrganizationSettingsMutation({ + * variables: { + * settingsData: // value for 'settingsData' + * }, + * }); + */ +export function useUpdateOrganizationSettingsMutation( + baseOptions?: Apollo.MutationHookOptions< + SchemaTypes.UpdateOrganizationSettingsMutation, + SchemaTypes.UpdateOrganizationSettingsMutationVariables > ) { const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - SchemaTypes.CommunityVirtualMembersListQuery, - SchemaTypes.CommunityVirtualMembersListQueryVariables - >(CommunityVirtualMembersListDocument, options); + return Apollo.useMutation< + SchemaTypes.UpdateOrganizationSettingsMutation, + SchemaTypes.UpdateOrganizationSettingsMutationVariables + >(UpdateOrganizationSettingsDocument, options); } -export type CommunityVirtualMembersListQueryHookResult = ReturnType; -export type CommunityVirtualMembersListLazyQueryHookResult = ReturnType; -export type CommunityVirtualMembersListQueryResult = Apollo.QueryResult< - SchemaTypes.CommunityVirtualMembersListQuery, - SchemaTypes.CommunityVirtualMembersListQueryVariables +export type UpdateOrganizationSettingsMutationHookResult = ReturnType; +export type UpdateOrganizationSettingsMutationResult = + Apollo.MutationResult; +export type UpdateOrganizationSettingsMutationOptions = Apollo.BaseMutationOptions< + SchemaTypes.UpdateOrganizationSettingsMutation, + SchemaTypes.UpdateOrganizationSettingsMutationVariables >; -export function refetchCommunityVirtualMembersListQuery( - variables: SchemaTypes.CommunityVirtualMembersListQueryVariables -) { - return { query: CommunityVirtualMembersListDocument, variables: variables }; -} - export const PendingMembershipsSpaceDocument = gql` query PendingMembershipsSpace( $spaceId: UUID! @@ -13009,132 +12827,63 @@ export function refetchUserSelectorQuery(variables?: SchemaTypes.UserSelectorQue export const UserSelectorUserDetailsDocument = gql` query UserSelectorUserDetails($id: UUID_NAMEID_EMAIL!) { - user(ID: $id) { - ...UserSelectorUserInformation - } - } - ${UserSelectorUserInformationFragmentDoc} -`; - -/** - * __useUserSelectorUserDetailsQuery__ - * - * To run a query within a React component, call `useUserSelectorUserDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useUserSelectorUserDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useUserSelectorUserDetailsQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useUserSelectorUserDetailsQuery( - baseOptions: Apollo.QueryHookOptions< - SchemaTypes.UserSelectorUserDetailsQuery, - SchemaTypes.UserSelectorUserDetailsQueryVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - UserSelectorUserDetailsDocument, - options - ); -} - -export function useUserSelectorUserDetailsLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - SchemaTypes.UserSelectorUserDetailsQuery, - SchemaTypes.UserSelectorUserDetailsQueryVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - SchemaTypes.UserSelectorUserDetailsQuery, - SchemaTypes.UserSelectorUserDetailsQueryVariables - >(UserSelectorUserDetailsDocument, options); -} - -export type UserSelectorUserDetailsQueryHookResult = ReturnType; -export type UserSelectorUserDetailsLazyQueryHookResult = ReturnType; -export type UserSelectorUserDetailsQueryResult = Apollo.QueryResult< - SchemaTypes.UserSelectorUserDetailsQuery, - SchemaTypes.UserSelectorUserDetailsQueryVariables ->; -export function refetchUserSelectorUserDetailsQuery(variables: SchemaTypes.UserSelectorUserDetailsQueryVariables) { - return { query: UserSelectorUserDetailsDocument, variables: variables }; -} - -export const UserListDocument = gql` - query userList($first: Int!, $after: UUID, $filter: UserFilterInput) { - usersPaginated(first: $first, after: $after, filter: $filter) { - users { - id - account { - id - subscriptions { - name - } - } - profile { - id - url - displayName - visual(type: AVATAR) { - id - uri - } - } - email - } - pageInfo { - endCursor - hasNextPage - } + user(ID: $id) { + ...UserSelectorUserInformation } } + ${UserSelectorUserInformationFragmentDoc} `; /** - * __useUserListQuery__ + * __useUserSelectorUserDetailsQuery__ * - * To run a query within a React component, call `useUserListQuery` and pass it any options that fit your needs. - * When your component renders, `useUserListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useUserSelectorUserDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useUserSelectorUserDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your UI. * * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example - * const { data, loading, error } = useUserListQuery({ + * const { data, loading, error } = useUserSelectorUserDetailsQuery({ * variables: { - * first: // value for 'first' - * after: // value for 'after' - * filter: // value for 'filter' + * id: // value for 'id' * }, * }); */ -export function useUserListQuery( - baseOptions: Apollo.QueryHookOptions +export function useUserSelectorUserDetailsQuery( + baseOptions: Apollo.QueryHookOptions< + SchemaTypes.UserSelectorUserDetailsQuery, + SchemaTypes.UserSelectorUserDetailsQueryVariables + > ) { const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery(UserListDocument, options); + return Apollo.useQuery( + UserSelectorUserDetailsDocument, + options + ); } -export function useUserListLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions +export function useUserSelectorUserDetailsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.UserSelectorUserDetailsQuery, + SchemaTypes.UserSelectorUserDetailsQueryVariables + > ) { const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery(UserListDocument, options); + return Apollo.useLazyQuery< + SchemaTypes.UserSelectorUserDetailsQuery, + SchemaTypes.UserSelectorUserDetailsQueryVariables + >(UserSelectorUserDetailsDocument, options); } -export type UserListQueryHookResult = ReturnType; -export type UserListLazyQueryHookResult = ReturnType; -export type UserListQueryResult = Apollo.QueryResult; -export function refetchUserListQuery(variables: SchemaTypes.UserListQueryVariables) { - return { query: UserListDocument, variables: variables }; +export type UserSelectorUserDetailsQueryHookResult = ReturnType; +export type UserSelectorUserDetailsLazyQueryHookResult = ReturnType; +export type UserSelectorUserDetailsQueryResult = Apollo.QueryResult< + SchemaTypes.UserSelectorUserDetailsQuery, + SchemaTypes.UserSelectorUserDetailsQueryVariables +>; +export function refetchUserSelectorUserDetailsQuery(variables: SchemaTypes.UserSelectorUserDetailsQueryVariables) { + return { query: UserSelectorUserDetailsDocument, variables: variables }; } export const UserAvatarsDocument = gql` @@ -13566,52 +13315,6 @@ export type UpdateGroupMutationOptions = Apollo.BaseMutationOptions< SchemaTypes.UpdateGroupMutation, SchemaTypes.UpdateGroupMutationVariables >; -export const UpdateUserDocument = gql` - mutation updateUser($input: UpdateUserInput!) { - updateUser(userData: $input) { - ...UserDetails - } - } - ${UserDetailsFragmentDoc} -`; -export type UpdateUserMutationFn = Apollo.MutationFunction< - SchemaTypes.UpdateUserMutation, - SchemaTypes.UpdateUserMutationVariables ->; - -/** - * __useUpdateUserMutation__ - * - * To run a mutation, you first call `useUpdateUserMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateUserMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateUserMutation, { data, loading, error }] = useUpdateUserMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateUserMutation( - baseOptions?: Apollo.MutationHookOptions -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation( - UpdateUserDocument, - options - ); -} - -export type UpdateUserMutationHookResult = ReturnType; -export type UpdateUserMutationResult = Apollo.MutationResult; -export type UpdateUserMutationOptions = Apollo.BaseMutationOptions< - SchemaTypes.UpdateUserMutation, - SchemaTypes.UpdateUserMutationVariables ->; export const UpdatePreferenceOnUserDocument = gql` mutation updatePreferenceOnUser($input: UpdateUserPreferenceInput!) { updatePreferenceOnUser(preferenceData: $input) { @@ -14261,115 +13964,281 @@ export const UserContributionsDocument = gql` `; /** - * __useUserContributionsQuery__ + * __useUserContributionsQuery__ + * + * To run a query within a React component, call `useUserContributionsQuery` and pass it any options that fit your needs. + * When your component renders, `useUserContributionsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useUserContributionsQuery({ + * variables: { + * userId: // value for 'userId' + * }, + * }); + */ +export function useUserContributionsQuery( + baseOptions: Apollo.QueryHookOptions +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + UserContributionsDocument, + options + ); +} + +export function useUserContributionsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.UserContributionsQuery, + SchemaTypes.UserContributionsQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + UserContributionsDocument, + options + ); +} + +export type UserContributionsQueryHookResult = ReturnType; +export type UserContributionsLazyQueryHookResult = ReturnType; +export type UserContributionsQueryResult = Apollo.QueryResult< + SchemaTypes.UserContributionsQuery, + SchemaTypes.UserContributionsQueryVariables +>; +export function refetchUserContributionsQuery(variables: SchemaTypes.UserContributionsQueryVariables) { + return { query: UserContributionsDocument, variables: variables }; +} + +export const UserOrganizationIdsDocument = gql` + query UserOrganizationIds($userId: UUID_NAMEID_EMAIL!) { + rolesUser(rolesData: { userID: $userId }) { + id + organizations { + id + } + } + } +`; + +/** + * __useUserOrganizationIdsQuery__ + * + * To run a query within a React component, call `useUserOrganizationIdsQuery` and pass it any options that fit your needs. + * When your component renders, `useUserOrganizationIdsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useUserOrganizationIdsQuery({ + * variables: { + * userId: // value for 'userId' + * }, + * }); + */ +export function useUserOrganizationIdsQuery( + baseOptions: Apollo.QueryHookOptions< + SchemaTypes.UserOrganizationIdsQuery, + SchemaTypes.UserOrganizationIdsQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + UserOrganizationIdsDocument, + options + ); +} + +export function useUserOrganizationIdsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.UserOrganizationIdsQuery, + SchemaTypes.UserOrganizationIdsQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + UserOrganizationIdsDocument, + options + ); +} + +export type UserOrganizationIdsQueryHookResult = ReturnType; +export type UserOrganizationIdsLazyQueryHookResult = ReturnType; +export type UserOrganizationIdsQueryResult = Apollo.QueryResult< + SchemaTypes.UserOrganizationIdsQuery, + SchemaTypes.UserOrganizationIdsQueryVariables +>; +export function refetchUserOrganizationIdsQuery(variables: SchemaTypes.UserOrganizationIdsQueryVariables) { + return { query: UserOrganizationIdsDocument, variables: variables }; +} + +export const UpdateUserDocument = gql` + mutation updateUser($input: UpdateUserInput!) { + updateUser(userData: $input) { + ...UserDetails + } + } + ${UserDetailsFragmentDoc} +`; +export type UpdateUserMutationFn = Apollo.MutationFunction< + SchemaTypes.UpdateUserMutation, + SchemaTypes.UpdateUserMutationVariables +>; + +/** + * __useUpdateUserMutation__ + * + * To run a mutation, you first call `useUpdateUserMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateUserMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateUserMutation, { data, loading, error }] = useUpdateUserMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useUpdateUserMutation( + baseOptions?: Apollo.MutationHookOptions +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation( + UpdateUserDocument, + options + ); +} + +export type UpdateUserMutationHookResult = ReturnType; +export type UpdateUserMutationResult = Apollo.MutationResult; +export type UpdateUserMutationOptions = Apollo.BaseMutationOptions< + SchemaTypes.UpdateUserMutation, + SchemaTypes.UpdateUserMutationVariables +>; +export const UpdateUserSettingsDocument = gql` + mutation updateUserSettings($settingsData: UpdateUserSettingsInput!) { + updateUserSettings(settingsData: $settingsData) { + id + settings { + privacy { + contributionRolesPubliclyVisible + } + communication { + allowOtherUsersToSendMessages + } + } + } + } +`; +export type UpdateUserSettingsMutationFn = Apollo.MutationFunction< + SchemaTypes.UpdateUserSettingsMutation, + SchemaTypes.UpdateUserSettingsMutationVariables +>; + +/** + * __useUpdateUserSettingsMutation__ * - * To run a query within a React component, call `useUserContributionsQuery` and pass it any options that fit your needs. - * When your component renders, `useUserContributionsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. + * To run a mutation, you first call `useUpdateUserSettingsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateUserSettingsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const { data, loading, error } = useUserContributionsQuery({ + * const [updateUserSettingsMutation, { data, loading, error }] = useUpdateUserSettingsMutation({ * variables: { - * userId: // value for 'userId' + * settingsData: // value for 'settingsData' * }, * }); */ -export function useUserContributionsQuery( - baseOptions: Apollo.QueryHookOptions -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - UserContributionsDocument, - options - ); -} - -export function useUserContributionsLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - SchemaTypes.UserContributionsQuery, - SchemaTypes.UserContributionsQueryVariables +export function useUpdateUserSettingsMutation( + baseOptions?: Apollo.MutationHookOptions< + SchemaTypes.UpdateUserSettingsMutation, + SchemaTypes.UpdateUserSettingsMutationVariables > ) { const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - UserContributionsDocument, + return Apollo.useMutation( + UpdateUserSettingsDocument, options ); } -export type UserContributionsQueryHookResult = ReturnType; -export type UserContributionsLazyQueryHookResult = ReturnType; -export type UserContributionsQueryResult = Apollo.QueryResult< - SchemaTypes.UserContributionsQuery, - SchemaTypes.UserContributionsQueryVariables +export type UpdateUserSettingsMutationHookResult = ReturnType; +export type UpdateUserSettingsMutationResult = Apollo.MutationResult; +export type UpdateUserSettingsMutationOptions = Apollo.BaseMutationOptions< + SchemaTypes.UpdateUserSettingsMutation, + SchemaTypes.UpdateUserSettingsMutationVariables >; -export function refetchUserContributionsQuery(variables: SchemaTypes.UserContributionsQueryVariables) { - return { query: UserContributionsDocument, variables: variables }; -} - -export const UserOrganizationIdsDocument = gql` - query UserOrganizationIds($userId: UUID_NAMEID_EMAIL!) { - rolesUser(rolesData: { userID: $userId }) { - id - organizations { +export const UserSettingsDocument = gql` + query userSettings($userID: UUID!) { + lookup { + user(ID: $userID) { id + settings { + communication { + allowOtherUsersToSendMessages + } + privacy { + contributionRolesPubliclyVisible + } + } } } } `; /** - * __useUserOrganizationIdsQuery__ + * __useUserSettingsQuery__ * - * To run a query within a React component, call `useUserOrganizationIdsQuery` and pass it any options that fit your needs. - * When your component renders, `useUserOrganizationIdsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useUserSettingsQuery` and pass it any options that fit your needs. + * When your component renders, `useUserSettingsQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your UI. * * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example - * const { data, loading, error } = useUserOrganizationIdsQuery({ + * const { data, loading, error } = useUserSettingsQuery({ * variables: { - * userId: // value for 'userId' + * userID: // value for 'userID' * }, * }); */ -export function useUserOrganizationIdsQuery( - baseOptions: Apollo.QueryHookOptions< - SchemaTypes.UserOrganizationIdsQuery, - SchemaTypes.UserOrganizationIdsQueryVariables - > +export function useUserSettingsQuery( + baseOptions: Apollo.QueryHookOptions ) { const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - UserOrganizationIdsDocument, + return Apollo.useQuery( + UserSettingsDocument, options ); } -export function useUserOrganizationIdsLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - SchemaTypes.UserOrganizationIdsQuery, - SchemaTypes.UserOrganizationIdsQueryVariables - > +export function useUserSettingsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions ) { const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - UserOrganizationIdsDocument, + return Apollo.useLazyQuery( + UserSettingsDocument, options ); } -export type UserOrganizationIdsQueryHookResult = ReturnType; -export type UserOrganizationIdsLazyQueryHookResult = ReturnType; -export type UserOrganizationIdsQueryResult = Apollo.QueryResult< - SchemaTypes.UserOrganizationIdsQuery, - SchemaTypes.UserOrganizationIdsQueryVariables +export type UserSettingsQueryHookResult = ReturnType; +export type UserSettingsLazyQueryHookResult = ReturnType; +export type UserSettingsQueryResult = Apollo.QueryResult< + SchemaTypes.UserSettingsQuery, + SchemaTypes.UserSettingsQueryVariables >; -export function refetchUserOrganizationIdsQuery(variables: SchemaTypes.UserOrganizationIdsQueryVariables) { - return { query: UserOrganizationIdsDocument, variables: variables }; +export function refetchUserSettingsQuery(variables: SchemaTypes.UserSettingsQueryVariables) { + return { query: UserSettingsDocument, variables: variables }; } export const VirtualContributorDocument = gql` @@ -18384,149 +18253,329 @@ export function useSubspacePageLazyQuery( ); } -export type SubspacePageQueryHookResult = ReturnType; -export type SubspacePageLazyQueryHookResult = ReturnType; -export type SubspacePageQueryResult = Apollo.QueryResult< - SchemaTypes.SubspacePageQuery, - SchemaTypes.SubspacePageQueryVariables +export type SubspacePageQueryHookResult = ReturnType; +export type SubspacePageLazyQueryHookResult = ReturnType; +export type SubspacePageQueryResult = Apollo.QueryResult< + SchemaTypes.SubspacePageQuery, + SchemaTypes.SubspacePageQueryVariables +>; +export function refetchSubspacePageQuery(variables: SchemaTypes.SubspacePageQueryVariables) { + return { query: SubspacePageDocument, variables: variables }; +} + +export const PlatformLevelAuthorizationDocument = gql` + query PlatformLevelAuthorization { + platform { + id + myRoles + authorization { + ...MyPrivileges + } + } + } + ${MyPrivilegesFragmentDoc} +`; + +/** + * __usePlatformLevelAuthorizationQuery__ + * + * To run a query within a React component, call `usePlatformLevelAuthorizationQuery` and pass it any options that fit your needs. + * When your component renders, `usePlatformLevelAuthorizationQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePlatformLevelAuthorizationQuery({ + * variables: { + * }, + * }); + */ +export function usePlatformLevelAuthorizationQuery( + baseOptions?: Apollo.QueryHookOptions< + SchemaTypes.PlatformLevelAuthorizationQuery, + SchemaTypes.PlatformLevelAuthorizationQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + SchemaTypes.PlatformLevelAuthorizationQuery, + SchemaTypes.PlatformLevelAuthorizationQueryVariables + >(PlatformLevelAuthorizationDocument, options); +} + +export function usePlatformLevelAuthorizationLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.PlatformLevelAuthorizationQuery, + SchemaTypes.PlatformLevelAuthorizationQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + SchemaTypes.PlatformLevelAuthorizationQuery, + SchemaTypes.PlatformLevelAuthorizationQueryVariables + >(PlatformLevelAuthorizationDocument, options); +} + +export type PlatformLevelAuthorizationQueryHookResult = ReturnType; +export type PlatformLevelAuthorizationLazyQueryHookResult = ReturnType; +export type PlatformLevelAuthorizationQueryResult = Apollo.QueryResult< + SchemaTypes.PlatformLevelAuthorizationQuery, + SchemaTypes.PlatformLevelAuthorizationQueryVariables +>; +export function refetchPlatformLevelAuthorizationQuery( + variables?: SchemaTypes.PlatformLevelAuthorizationQueryVariables +) { + return { query: PlatformLevelAuthorizationDocument, variables: variables }; +} + +export const AssignLicensePlanToAccountDocument = gql` + mutation AssignLicensePlanToAccount($licensePlanId: UUID!, $accountId: UUID!, $licensingId: UUID!) { + assignLicensePlanToAccount( + planData: { accountID: $accountId, licensePlanID: $licensePlanId, licensingID: $licensingId } + ) { + id + } + } +`; +export type AssignLicensePlanToAccountMutationFn = Apollo.MutationFunction< + SchemaTypes.AssignLicensePlanToAccountMutation, + SchemaTypes.AssignLicensePlanToAccountMutationVariables +>; + +/** + * __useAssignLicensePlanToAccountMutation__ + * + * To run a mutation, you first call `useAssignLicensePlanToAccountMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAssignLicensePlanToAccountMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [assignLicensePlanToAccountMutation, { data, loading, error }] = useAssignLicensePlanToAccountMutation({ + * variables: { + * licensePlanId: // value for 'licensePlanId' + * accountId: // value for 'accountId' + * licensingId: // value for 'licensingId' + * }, + * }); + */ +export function useAssignLicensePlanToAccountMutation( + baseOptions?: Apollo.MutationHookOptions< + SchemaTypes.AssignLicensePlanToAccountMutation, + SchemaTypes.AssignLicensePlanToAccountMutationVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + SchemaTypes.AssignLicensePlanToAccountMutation, + SchemaTypes.AssignLicensePlanToAccountMutationVariables + >(AssignLicensePlanToAccountDocument, options); +} + +export type AssignLicensePlanToAccountMutationHookResult = ReturnType; +export type AssignLicensePlanToAccountMutationResult = + Apollo.MutationResult; +export type AssignLicensePlanToAccountMutationOptions = Apollo.BaseMutationOptions< + SchemaTypes.AssignLicensePlanToAccountMutation, + SchemaTypes.AssignLicensePlanToAccountMutationVariables +>; +export const RevokeLicensePlanFromAccountDocument = gql` + mutation RevokeLicensePlanFromAccount($licensePlanId: UUID!, $accountId: UUID!, $licensingId: UUID!) { + revokeLicensePlanFromAccount( + planData: { accountID: $accountId, licensePlanID: $licensePlanId, licensingID: $licensingId } + ) { + id + } + } +`; +export type RevokeLicensePlanFromAccountMutationFn = Apollo.MutationFunction< + SchemaTypes.RevokeLicensePlanFromAccountMutation, + SchemaTypes.RevokeLicensePlanFromAccountMutationVariables +>; + +/** + * __useRevokeLicensePlanFromAccountMutation__ + * + * To run a mutation, you first call `useRevokeLicensePlanFromAccountMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useRevokeLicensePlanFromAccountMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [revokeLicensePlanFromAccountMutation, { data, loading, error }] = useRevokeLicensePlanFromAccountMutation({ + * variables: { + * licensePlanId: // value for 'licensePlanId' + * accountId: // value for 'accountId' + * licensingId: // value for 'licensingId' + * }, + * }); + */ +export function useRevokeLicensePlanFromAccountMutation( + baseOptions?: Apollo.MutationHookOptions< + SchemaTypes.RevokeLicensePlanFromAccountMutation, + SchemaTypes.RevokeLicensePlanFromAccountMutationVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + SchemaTypes.RevokeLicensePlanFromAccountMutation, + SchemaTypes.RevokeLicensePlanFromAccountMutationVariables + >(RevokeLicensePlanFromAccountDocument, options); +} + +export type RevokeLicensePlanFromAccountMutationHookResult = ReturnType; +export type RevokeLicensePlanFromAccountMutationResult = + Apollo.MutationResult; +export type RevokeLicensePlanFromAccountMutationOptions = Apollo.BaseMutationOptions< + SchemaTypes.RevokeLicensePlanFromAccountMutation, + SchemaTypes.RevokeLicensePlanFromAccountMutationVariables >; -export function refetchSubspacePageQuery(variables: SchemaTypes.SubspacePageQueryVariables) { - return { query: SubspacePageDocument, variables: variables }; -} - -export const PlatformLevelAuthorizationDocument = gql` - query PlatformLevelAuthorization { - platform { - id - myRoles - authorization { - ...MyPrivileges +export const AdminGlobalOrganizationsListDocument = gql` + query adminGlobalOrganizationsList($first: Int!, $after: UUID, $filter: OrganizationFilterInput) { + organizationsPaginated(first: $first, after: $after, filter: $filter) { + organization { + id + account { + id + subscriptions { + name + } + } + profile { + id + url + displayName + visual(type: AVATAR) { + id + uri + } + } + verification { + id + state + } + } + pageInfo { + ...PageInfo } } } - ${MyPrivilegesFragmentDoc} + ${PageInfoFragmentDoc} `; /** - * __usePlatformLevelAuthorizationQuery__ + * __useAdminGlobalOrganizationsListQuery__ * - * To run a query within a React component, call `usePlatformLevelAuthorizationQuery` and pass it any options that fit your needs. - * When your component renders, `usePlatformLevelAuthorizationQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useAdminGlobalOrganizationsListQuery` and pass it any options that fit your needs. + * When your component renders, `useAdminGlobalOrganizationsListQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your UI. * * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example - * const { data, loading, error } = usePlatformLevelAuthorizationQuery({ + * const { data, loading, error } = useAdminGlobalOrganizationsListQuery({ * variables: { + * first: // value for 'first' + * after: // value for 'after' + * filter: // value for 'filter' * }, * }); */ -export function usePlatformLevelAuthorizationQuery( - baseOptions?: Apollo.QueryHookOptions< - SchemaTypes.PlatformLevelAuthorizationQuery, - SchemaTypes.PlatformLevelAuthorizationQueryVariables +export function useAdminGlobalOrganizationsListQuery( + baseOptions: Apollo.QueryHookOptions< + SchemaTypes.AdminGlobalOrganizationsListQuery, + SchemaTypes.AdminGlobalOrganizationsListQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; return Apollo.useQuery< - SchemaTypes.PlatformLevelAuthorizationQuery, - SchemaTypes.PlatformLevelAuthorizationQueryVariables - >(PlatformLevelAuthorizationDocument, options); + SchemaTypes.AdminGlobalOrganizationsListQuery, + SchemaTypes.AdminGlobalOrganizationsListQueryVariables + >(AdminGlobalOrganizationsListDocument, options); } -export function usePlatformLevelAuthorizationLazyQuery( +export function useAdminGlobalOrganizationsListLazyQuery( baseOptions?: Apollo.LazyQueryHookOptions< - SchemaTypes.PlatformLevelAuthorizationQuery, - SchemaTypes.PlatformLevelAuthorizationQueryVariables + SchemaTypes.AdminGlobalOrganizationsListQuery, + SchemaTypes.AdminGlobalOrganizationsListQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; return Apollo.useLazyQuery< - SchemaTypes.PlatformLevelAuthorizationQuery, - SchemaTypes.PlatformLevelAuthorizationQueryVariables - >(PlatformLevelAuthorizationDocument, options); + SchemaTypes.AdminGlobalOrganizationsListQuery, + SchemaTypes.AdminGlobalOrganizationsListQueryVariables + >(AdminGlobalOrganizationsListDocument, options); } -export type PlatformLevelAuthorizationQueryHookResult = ReturnType; -export type PlatformLevelAuthorizationLazyQueryHookResult = ReturnType; -export type PlatformLevelAuthorizationQueryResult = Apollo.QueryResult< - SchemaTypes.PlatformLevelAuthorizationQuery, - SchemaTypes.PlatformLevelAuthorizationQueryVariables +export type AdminGlobalOrganizationsListQueryHookResult = ReturnType; +export type AdminGlobalOrganizationsListLazyQueryHookResult = ReturnType< + typeof useAdminGlobalOrganizationsListLazyQuery >; -export function refetchPlatformLevelAuthorizationQuery( - variables?: SchemaTypes.PlatformLevelAuthorizationQueryVariables +export type AdminGlobalOrganizationsListQueryResult = Apollo.QueryResult< + SchemaTypes.AdminGlobalOrganizationsListQuery, + SchemaTypes.AdminGlobalOrganizationsListQueryVariables +>; +export function refetchAdminGlobalOrganizationsListQuery( + variables: SchemaTypes.AdminGlobalOrganizationsListQueryVariables ) { - return { query: PlatformLevelAuthorizationDocument, variables: variables }; + return { query: AdminGlobalOrganizationsListDocument, variables: variables }; } -export const OrganizationAccountDocument = gql` - query OrganizationAccount($organizationNameId: UUID_NAMEID!) { - organization(ID: $organizationNameId) { +export const AdminOrganizationVerifyDocument = gql` + mutation adminOrganizationVerify($input: OrganizationVerificationEventInput!) { + eventOnOrganizationVerification(eventData: $input) { id - profile { - id - displayName - } - account { - id - } + nextEvents + state } } `; +export type AdminOrganizationVerifyMutationFn = Apollo.MutationFunction< + SchemaTypes.AdminOrganizationVerifyMutation, + SchemaTypes.AdminOrganizationVerifyMutationVariables +>; /** - * __useOrganizationAccountQuery__ + * __useAdminOrganizationVerifyMutation__ * - * To run a query within a React component, call `useOrganizationAccountQuery` and pass it any options that fit your needs. - * When your component renders, `useOrganizationAccountQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. + * To run a mutation, you first call `useAdminOrganizationVerifyMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAdminOrganizationVerifyMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const { data, loading, error } = useOrganizationAccountQuery({ + * const [adminOrganizationVerifyMutation, { data, loading, error }] = useAdminOrganizationVerifyMutation({ * variables: { - * organizationNameId: // value for 'organizationNameId' + * input: // value for 'input' * }, * }); */ -export function useOrganizationAccountQuery( - baseOptions: Apollo.QueryHookOptions< - SchemaTypes.OrganizationAccountQuery, - SchemaTypes.OrganizationAccountQueryVariables - > -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - OrganizationAccountDocument, - options - ); -} - -export function useOrganizationAccountLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - SchemaTypes.OrganizationAccountQuery, - SchemaTypes.OrganizationAccountQueryVariables +export function useAdminOrganizationVerifyMutation( + baseOptions?: Apollo.MutationHookOptions< + SchemaTypes.AdminOrganizationVerifyMutation, + SchemaTypes.AdminOrganizationVerifyMutationVariables > ) { const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - OrganizationAccountDocument, - options - ); + return Apollo.useMutation< + SchemaTypes.AdminOrganizationVerifyMutation, + SchemaTypes.AdminOrganizationVerifyMutationVariables + >(AdminOrganizationVerifyDocument, options); } -export type OrganizationAccountQueryHookResult = ReturnType; -export type OrganizationAccountLazyQueryHookResult = ReturnType; -export type OrganizationAccountQueryResult = Apollo.QueryResult< - SchemaTypes.OrganizationAccountQuery, - SchemaTypes.OrganizationAccountQueryVariables +export type AdminOrganizationVerifyMutationHookResult = ReturnType; +export type AdminOrganizationVerifyMutationResult = Apollo.MutationResult; +export type AdminOrganizationVerifyMutationOptions = Apollo.BaseMutationOptions< + SchemaTypes.AdminOrganizationVerifyMutation, + SchemaTypes.AdminOrganizationVerifyMutationVariables >; -export function refetchOrganizationAccountQuery(variables: SchemaTypes.OrganizationAccountQueryVariables) { - return { query: OrganizationAccountDocument, variables: variables }; -} - export const AssignLicensePlanToSpaceDocument = gql` mutation AssignLicensePlanToSpace($licensePlanId: UUID!, $spaceId: UUID!) { assignLicensePlanToSpace(planData: { spaceID: $spaceId, licensePlanID: $licensePlanId }) { @@ -18992,6 +19041,75 @@ export type DeleteDocumentMutationOptions = Apollo.BaseMutationOptions< SchemaTypes.DeleteDocumentMutation, SchemaTypes.DeleteDocumentMutationVariables >; +export const UserListDocument = gql` + query userList($first: Int!, $after: UUID, $filter: UserFilterInput) { + usersPaginated(first: $first, after: $after, filter: $filter) { + users { + id + account { + id + subscriptions { + name + } + } + profile { + id + url + displayName + visual(type: AVATAR) { + id + uri + } + } + email + } + pageInfo { + endCursor + hasNextPage + } + } + } +`; + +/** + * __useUserListQuery__ + * + * To run a query within a React component, call `useUserListQuery` and pass it any options that fit your needs. + * When your component renders, `useUserListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useUserListQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * filter: // value for 'filter' + * }, + * }); + */ +export function useUserListQuery( + baseOptions: Apollo.QueryHookOptions +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery(UserListDocument, options); +} + +export function useUserListLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery(UserListDocument, options); +} + +export type UserListQueryHookResult = ReturnType; +export type UserListLazyQueryHookResult = ReturnType; +export type UserListQueryResult = Apollo.QueryResult; +export function refetchUserListQuery(variables: SchemaTypes.UserListQueryVariables) { + return { query: UserListDocument, variables: variables }; +} + export const AdminVirtualContributorsDocument = gql` query AdminVirtualContributors { virtualContributors { diff --git a/src/core/apollo/generated/graphql-schema.ts b/src/core/apollo/generated/graphql-schema.ts index 1dad6ca085..d2ccc3f5da 100644 --- a/src/core/apollo/generated/graphql-schema.ts +++ b/src/core/apollo/generated/graphql-schema.ts @@ -804,6 +804,7 @@ export enum AuthenticationType { export type Authorization = { __typename?: 'Authorization'; + anonymousReadAccess?: Maybe; /** The date at which the entity was created. */ createdDate?: Maybe; /** The set of credential rules that are contained by this Authorization Policy. */ @@ -825,7 +826,6 @@ export type Authorization = { export enum AuthorizationCredential { BetaTester = 'BETA_TESTER', GlobalAdmin = 'GLOBAL_ADMIN', - GlobalAnonymous = 'GLOBAL_ANONYMOUS', GlobalCommunityRead = 'GLOBAL_COMMUNITY_READ', GlobalLicenseManager = 'GLOBAL_LICENSE_MANAGER', GlobalRegistered = 'GLOBAL_REGISTERED', @@ -959,7 +959,6 @@ export enum AuthorizationPrivilege { MovePost = 'MOVE_POST', PlatformAdmin = 'PLATFORM_ADMIN', Read = 'READ', - ReadAbout = 'READ_ABOUT', ReadUsers = 'READ_USERS', ReadUserPii = 'READ_USER_PII', ReadUserSettings = 'READ_USER_SETTINGS', @@ -2022,7 +2021,7 @@ export type CreateSubspaceInput = { /** A readable identifier, unique within the containing scope. */ nameID?: InputMaybe; profileData: CreateProfileInput; - spaceID: Scalars['UUID_NAMEID']; + spaceID: Scalars['UUID']; tags?: InputMaybe>; type?: InputMaybe; }; @@ -2161,7 +2160,6 @@ export enum CredentialType { AccountLicensePlus = 'ACCOUNT_LICENSE_PLUS', BetaTester = 'BETA_TESTER', GlobalAdmin = 'GLOBAL_ADMIN', - GlobalAnonymous = 'GLOBAL_ANONYMOUS', GlobalCommunityRead = 'GLOBAL_COMMUNITY_READ', GlobalLicenseManager = 'GLOBAL_LICENSE_MANAGER', GlobalRegistered = 'GLOBAL_REGISTERED', @@ -2243,7 +2241,7 @@ export type DeleteLinkInput = { }; export type DeleteOrganizationInput = { - ID: Scalars['UUID_NAMEID']; + ID: Scalars['UUID']; }; export type DeletePlatformInvitationInput = { @@ -3009,10 +3007,17 @@ export enum LicensingCredentialBasedPlanType { export type LicensingCredentialBasedPolicyCredentialRule = { __typename?: 'LicensingCredentialBasedPolicyCredentialRule'; credentialType: LicensingCredentialBasedCredentialType; - grantedEntitlements: Array; + grantedEntitlements: Array; name?: Maybe; }; +export type LicensingGrantedEntitlement = { + __typename?: 'LicensingGrantedEntitlement'; + limit: Scalars['Float']; + /** The entitlement that is granted. */ + type: LicenseEntitlementType; +}; + export type Lifecycle = { __typename?: 'Lifecycle'; /** The date at which the entity was created. */ @@ -3073,6 +3078,178 @@ export type LookupByNameQueryResultsTemplateArgs = { templatesSetID: Scalars['UUID']; }; +export type LookupMyPrivilegesQueryResults = { + __typename?: 'LookupMyPrivilegesQueryResults'; + /** Lookup myPrivileges on the specified Account */ + account?: Maybe>; + /** Lookup myPrivileges on the specified Application */ + application?: Maybe>; + /** Lookup myPrivileges on the specified Calendar */ + calendar?: Maybe>; + /** Lookup myPrivileges on the specified CalendarEvent */ + calendarEvent?: Maybe>; + /** Lookup myPrivileges on the specified Callout */ + callout?: Maybe>; + /** Lookup myPrivileges on the specified Collaboration */ + collaboration?: Maybe>; + /** Lookup myPrivileges on the specified Community */ + community?: Maybe>; + /** Lookup myPrivileges on the specified Community guidelines */ + communityGuidelines?: Maybe>; + /** Lookup myPrivileges on the specified Context */ + context?: Maybe>; + /** Lookup myPrivileges on the specified Document */ + document?: Maybe>; + /** Lookup myPrivileges on the specified InnovationFlow */ + innovationFlow?: Maybe>; + /** Lookup myPrivileges on the specified InnovationHub */ + innovationHub?: Maybe>; + /** Lookup myPrivileges on the specified InnovationPack */ + innovationPack?: Maybe>; + /** Lookup myPrivileges on the specified Invitation */ + invitation?: Maybe>; + /** Lookup myPrivileges on the specified License */ + license?: Maybe>; + /** Lookup myPrivileges on the specified Post */ + post?: Maybe>; + /** Lookup myPrivileges on the specified Profile */ + profile?: Maybe>; + /** Lookup myPrivileges on the specified RoleSet */ + roleSet?: Maybe>; + /** Lookup myPrivileges on the specified Room */ + room?: Maybe>; + /** Lookup myPrivileges on the specified Space */ + space?: Maybe>; + /** Lookup myPrivileges on the specified StorageAggregator */ + storageAggregator?: Maybe>; + /** Lookup myPrivileges on the specified StorageBucket */ + storageBucket?: Maybe>; + /** Lookup myPrivileges on the specified Template */ + template?: Maybe>; + /** Lookup myPrivileges on the specified TemplatesManager */ + templatesManager?: Maybe>; + /** Lookup myPrivileges on the specified TemplatesSet */ + templatesSet?: Maybe>; + /** Lookup myPrivileges on the specified User */ + user?: Maybe>; + /** A particular VirtualContributor */ + virtualContributor?: Maybe>; + /** Lookup myPrivileges on the specified Whiteboard */ + whiteboard?: Maybe>; +}; + +export type LookupMyPrivilegesQueryResultsAccountArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsApplicationArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsCalendarArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsCalendarEventArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsCalloutArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsCollaborationArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsCommunityArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsCommunityGuidelinesArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsContextArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsDocumentArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsInnovationFlowArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsInnovationHubArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsInnovationPackArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsInvitationArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsLicenseArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsPostArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsProfileArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsRoleSetArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsRoomArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsSpaceArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsStorageAggregatorArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsStorageBucketArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsTemplateArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsTemplatesManagerArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsTemplatesSetArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsUserArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsVirtualContributorArgs = { + ID: Scalars['UUID']; +}; + +export type LookupMyPrivilegesQueryResultsWhiteboardArgs = { + ID: Scalars['UUID']; +}; + export type LookupQueryResults = { __typename?: 'LookupQueryResults'; /** Lookup the specified Account */ @@ -3109,6 +3286,8 @@ export type LookupQueryResults = { invitation?: Maybe; /** Lookup the specified License */ license?: Maybe; + /** Lookup myPrivileges on the specified entity. */ + myPrivileges?: Maybe; /** Lookup the specified Post */ post?: Maybe; /** Lookup the specified Profile */ @@ -3658,10 +3837,10 @@ export type Mutation = { updateOrganization: Organization; /** Updates the specified Organization platform settings. */ updateOrganizationPlatformSettings: Organization; + /** Updates one of the Setting on an Organization */ + updateOrganizationSettings: Organization; /** Updates the specified Post. */ updatePost: Post; - /** Updates one of the Preferences on an Organization */ - updatePreferenceOnOrganization: Preference; /** Updates one of the Preferences on a Space */ updatePreferenceOnUser: Preference; /** Updates the specified Profile. */ @@ -3688,6 +3867,8 @@ export type Mutation = { updateUserGroup: UserGroup; /** Update the platform settings, such as nameID, email, for the specified User. */ updateUserPlatformSettings: User; + /** Updates one of the Setting on a User */ + updateUserSettings: User; /** Updates the specified VirtualContributor. */ updateVirtualContributor: VirtualContributor; /** Updates the image URI for the specified Visual. */ @@ -4236,12 +4417,12 @@ export type MutationUpdateOrganizationPlatformSettingsArgs = { organizationData: UpdateOrganizationPlatformSettingsInput; }; -export type MutationUpdatePostArgs = { - postData: UpdatePostInput; +export type MutationUpdateOrganizationSettingsArgs = { + settingsData: UpdateOrganizationSettingsInput; }; -export type MutationUpdatePreferenceOnOrganizationArgs = { - preferenceData: UpdateOrganizationPreferenceInput; +export type MutationUpdatePostArgs = { + postData: UpdatePostInput; }; export type MutationUpdatePreferenceOnUserArgs = { @@ -4296,6 +4477,10 @@ export type MutationUpdateUserPlatformSettingsArgs = { updateData: UpdateUserPlatformSettingsInput; }; +export type MutationUpdateUserSettingsArgs = { + settingsData: UpdateUserSettingsInput; +}; + export type MutationUpdateVirtualContributorArgs = { virtualContributorData: UpdateVirtualContributorInput; }; @@ -4416,10 +4601,10 @@ export type Organization = Contributor & nameID: Scalars['NameID']; /** All Users that are owners of this Organization. */ owners?: Maybe>; - /** The preferences for this Organization */ - preferences: Array; /** The profile for this Organization. */ profile: Profile; + /** The settings for this Organization. */ + settings: OrganizationSettings; /** The StorageAggregator for managing storage buckets in use by this Organization */ storageAggregator?: Maybe; /** The date at which the entity was last updated. */ @@ -4446,16 +4631,32 @@ export type OrganizationFilterInput = { website?: InputMaybe; }; -export enum OrganizationPreferenceType { - AuthorizationOrganizationMatchDomain = 'AUTHORIZATION_ORGANIZATION_MATCH_DOMAIN', -} - export enum OrganizationRole { Admin = 'ADMIN', Associate = 'ASSOCIATE', Owner = 'OWNER', } +export type OrganizationSettings = { + __typename?: 'OrganizationSettings'; + /** The membership settings for this Organization. */ + membership: OrganizationSettingsMembership; + /** The privacy settings for this Organization */ + privacy: OrganizationSettingsPrivacy; +}; + +export type OrganizationSettingsMembership = { + __typename?: 'OrganizationSettingsMembership'; + /** Allow Users with email addresses matching the domain of this Organization to join. */ + allowUsersMatchingDomainToJoin: Scalars['Boolean']; +}; + +export type OrganizationSettingsPrivacy = { + __typename?: 'OrganizationSettingsPrivacy'; + /** Allow contribution roles (membership, lead etc) in Spaces to be visible. */ + contributionRolesPubliclyVisible: Scalars['Boolean']; +}; + export type OrganizationVerification = { __typename?: 'OrganizationVerification'; /** The authorization rules for the entity */ @@ -4734,7 +4935,6 @@ export type PreferenceDefinition = { }; export enum PreferenceType { - AuthorizationOrganizationMatchDomain = 'AUTHORIZATION_ORGANIZATION_MATCH_DOMAIN', NotificationApplicationReceived = 'NOTIFICATION_APPLICATION_RECEIVED', NotificationApplicationSubmitted = 'NOTIFICATION_APPLICATION_SUBMITTED', NotificationCalloutPublished = 'NOTIFICATION_CALLOUT_PUBLISHED', @@ -4742,7 +4942,6 @@ export enum PreferenceType { NotificationCommunicationDiscussionCreated = 'NOTIFICATION_COMMUNICATION_DISCUSSION_CREATED', NotificationCommunicationDiscussionCreatedAdmin = 'NOTIFICATION_COMMUNICATION_DISCUSSION_CREATED_ADMIN', NotificationCommunicationMention = 'NOTIFICATION_COMMUNICATION_MENTION', - NotificationCommunicationMessage = 'NOTIFICATION_COMMUNICATION_MESSAGE', NotificationCommunicationUpdates = 'NOTIFICATION_COMMUNICATION_UPDATES', NotificationCommunicationUpdateSentAdmin = 'NOTIFICATION_COMMUNICATION_UPDATE_SENT_ADMIN', NotificationCommunityCollaborationInterestAdmin = 'NOTIFICATION_COMMUNITY_COLLABORATION_INTEREST_ADMIN', @@ -6523,8 +6722,8 @@ export type UpdateNotificationStateInput = { }; export type UpdateOrganizationInput = { - /** The ID or NameID of the Organization to update. */ - ID: Scalars['UUID_NAMEID']; + /** The ID of the Organization to update. */ + ID: Scalars['UUID']; contactEmail?: InputMaybe; domain?: InputMaybe; legalEntityName?: InputMaybe; @@ -6542,12 +6741,26 @@ export type UpdateOrganizationPlatformSettingsInput = { organizationID: Scalars['UUID']; }; -export type UpdateOrganizationPreferenceInput = { - /** ID of the Organization */ - organizationID: Scalars['UUID_NAMEID']; - /** Type of the organization preference */ - type: OrganizationPreferenceType; - value: Scalars['String']; +export type UpdateOrganizationSettingsEntityInput = { + membership?: InputMaybe; + privacy?: InputMaybe; +}; + +export type UpdateOrganizationSettingsInput = { + /** The identifier for the Organization whose settings are to be updated. */ + organizationID: Scalars['UUID']; + /** Update the settings for the Organization. */ + settings: UpdateOrganizationSettingsEntityInput; +}; + +export type UpdateOrganizationSettingsMembershipInput = { + /** Allow Users with email addresses matching the domain of this Organization to join. */ + allowUsersMatchingDomainToJoin: Scalars['Boolean']; +}; + +export type UpdateOrganizationSettingsPrivacyInput = { + /** Allow contribution roles (membership, lead etc) in Spaces to be visible. */ + contributionRolesPubliclyVisible: Scalars['Boolean']; }; export type UpdatePostInput = { @@ -6708,12 +6921,36 @@ export type UpdateUserPlatformSettingsInput = { export type UpdateUserPreferenceInput = { /** Type of the user preference */ - type: UserPreferenceType; + type: PreferenceType; /** ID of the User */ userID: Scalars['UUID']; value: Scalars['String']; }; +export type UpdateUserSettingsCommunicationInput = { + /** Allow Users to send messages to this User. */ + allowOtherUsersToSendMessages: Scalars['Boolean']; +}; + +export type UpdateUserSettingsEntityInput = { + /** Settings related to this users Communication preferences. */ + communication?: InputMaybe; + /** Settings related to Privacy. */ + privacy?: InputMaybe; +}; + +export type UpdateUserSettingsInput = { + /** Update the settings for the User. */ + settings: UpdateUserSettingsEntityInput; + /** The identifier for the User whose settings are to be updated. */ + userID: Scalars['UUID']; +}; + +export type UpdateUserSettingsPrivacyInput = { + /** Allow contribution roles (communication, lead etc) in Spaces to be visible. */ + contributionRolesPubliclyVisible: Scalars['Boolean']; +}; + export type UpdateVirtualContributorInput = { /** The ID of the Virtual Contributor to update. */ ID: Scalars['UUID']; @@ -6778,6 +7015,8 @@ export type User = Contributor & { preferences: Array; /** The Profile for this User. */ profile: Profile; + /** The settings for this User. */ + settings: UserSettings; /** The StorageAggregator for managing storage buckets in use by this User */ storageAggregator?: Maybe; /** The date at which the entity was last updated. */ @@ -6829,37 +7068,6 @@ export type UserGroup = { updatedDate?: Maybe; }; -export enum UserPreferenceType { - NotificationApplicationReceived = 'NOTIFICATION_APPLICATION_RECEIVED', - NotificationApplicationSubmitted = 'NOTIFICATION_APPLICATION_SUBMITTED', - NotificationCalloutPublished = 'NOTIFICATION_CALLOUT_PUBLISHED', - NotificationCommentReply = 'NOTIFICATION_COMMENT_REPLY', - NotificationCommunicationDiscussionCreated = 'NOTIFICATION_COMMUNICATION_DISCUSSION_CREATED', - NotificationCommunicationDiscussionCreatedAdmin = 'NOTIFICATION_COMMUNICATION_DISCUSSION_CREATED_ADMIN', - NotificationCommunicationMention = 'NOTIFICATION_COMMUNICATION_MENTION', - NotificationCommunicationMessage = 'NOTIFICATION_COMMUNICATION_MESSAGE', - NotificationCommunicationUpdates = 'NOTIFICATION_COMMUNICATION_UPDATES', - NotificationCommunicationUpdateSentAdmin = 'NOTIFICATION_COMMUNICATION_UPDATE_SENT_ADMIN', - NotificationCommunityCollaborationInterestAdmin = 'NOTIFICATION_COMMUNITY_COLLABORATION_INTEREST_ADMIN', - NotificationCommunityCollaborationInterestUser = 'NOTIFICATION_COMMUNITY_COLLABORATION_INTEREST_USER', - NotificationCommunityInvitationUser = 'NOTIFICATION_COMMUNITY_INVITATION_USER', - NotificationCommunityNewMember = 'NOTIFICATION_COMMUNITY_NEW_MEMBER', - NotificationCommunityNewMemberAdmin = 'NOTIFICATION_COMMUNITY_NEW_MEMBER_ADMIN', - NotificationCommunityReviewSubmitted = 'NOTIFICATION_COMMUNITY_REVIEW_SUBMITTED', - NotificationCommunityReviewSubmittedAdmin = 'NOTIFICATION_COMMUNITY_REVIEW_SUBMITTED_ADMIN', - NotificationDiscussionCommentCreated = 'NOTIFICATION_DISCUSSION_COMMENT_CREATED', - NotificationForumDiscussionComment = 'NOTIFICATION_FORUM_DISCUSSION_COMMENT', - NotificationForumDiscussionCreated = 'NOTIFICATION_FORUM_DISCUSSION_CREATED', - NotificationOrganizationMention = 'NOTIFICATION_ORGANIZATION_MENTION', - NotificationOrganizationMessage = 'NOTIFICATION_ORGANIZATION_MESSAGE', - NotificationPostCommentCreated = 'NOTIFICATION_POST_COMMENT_CREATED', - NotificationPostCreated = 'NOTIFICATION_POST_CREATED', - NotificationPostCreatedAdmin = 'NOTIFICATION_POST_CREATED_ADMIN', - NotificationUserRemoved = 'NOTIFICATION_USER_REMOVED', - NotificationUserSignUp = 'NOTIFICATION_USER_SIGN_UP', - NotificationWhiteboardCreated = 'NOTIFICATION_WHITEBOARD_CREATED', -} - export type UserSendMessageInput = { /** The message being sent */ message: Scalars['String']; @@ -6867,6 +7075,26 @@ export type UserSendMessageInput = { receivingUserID: Scalars['String']; }; +export type UserSettings = { + __typename?: 'UserSettings'; + /** The communication settings for this User. */ + communication: UserSettingsCommunication; + /** The privacy settings for this User */ + privacy: UserSettingsPrivacy; +}; + +export type UserSettingsCommunication = { + __typename?: 'UserSettingsCommunication'; + /** Allow Users to send messages to this User. */ + allowOtherUsersToSendMessages: Scalars['Boolean']; +}; + +export type UserSettingsPrivacy = { + __typename?: 'UserSettingsPrivacy'; + /** Allow contribution roles (communication, lead etc) in Spaces to be visible. */ + contributionRolesPubliclyVisible: Scalars['Boolean']; +}; + export type UsersWithAuthorizationCredentialInput = { /** The resource to which a credential needs to be bound. */ resourceID?: InputMaybe; @@ -13869,41 +14097,6 @@ export type LinkDetailsWithAuthorizationFragment = { | undefined; }; -export type OrganizationPreferencesQueryVariables = Exact<{ - orgId: Scalars['UUID_NAMEID']; -}>; - -export type OrganizationPreferencesQuery = { - __typename?: 'Query'; - organization: { - __typename?: 'Organization'; - id: string; - preferences: Array<{ - __typename?: 'Preference'; - id: string; - value: string; - definition: { - __typename?: 'PreferenceDefinition'; - id: string; - description: string; - displayName: string; - group: string; - type: PreferenceType; - valueType: PreferenceValueType; - }; - }>; - }; -}; - -export type UpdatePreferenceOnOrganizationMutationVariables = Exact<{ - preferenceData: UpdateOrganizationPreferenceInput; -}>; - -export type UpdatePreferenceOnOrganizationMutation = { - __typename?: 'Mutation'; - updatePreferenceOnOrganization: { __typename?: 'Preference'; id: string; value: string }; -}; - export type CreateReferenceOnProfileMutationVariables = Exact<{ input: CreateReferenceOnProfileInput; }>; @@ -16570,80 +16763,6 @@ export type RolesOrganizationQuery = { }; }; -export type AssignLicensePlanToAccountMutationVariables = Exact<{ - licensePlanId: Scalars['UUID']; - accountId: Scalars['UUID']; - licensingId: Scalars['UUID']; -}>; - -export type AssignLicensePlanToAccountMutation = { - __typename?: 'Mutation'; - assignLicensePlanToAccount: { __typename?: 'Account'; id: string }; -}; - -export type RevokeLicensePlanFromAccountMutationVariables = Exact<{ - licensePlanId: Scalars['UUID']; - accountId: Scalars['UUID']; - licensingId: Scalars['UUID']; -}>; - -export type RevokeLicensePlanFromAccountMutation = { - __typename?: 'Mutation'; - revokeLicensePlanFromAccount: { __typename?: 'Account'; id: string }; -}; - -export type AdminGlobalOrganizationsListQueryVariables = Exact<{ - first: Scalars['Int']; - after?: InputMaybe; - filter?: InputMaybe; -}>; - -export type AdminGlobalOrganizationsListQuery = { - __typename?: 'Query'; - organizationsPaginated: { - __typename?: 'PaginatedOrganization'; - organization: Array<{ - __typename?: 'Organization'; - id: string; - account?: - | { - __typename?: 'Account'; - id: string; - subscriptions: Array<{ __typename?: 'AccountSubscription'; name: LicensingCredentialBasedCredentialType }>; - } - | undefined; - profile: { - __typename?: 'Profile'; - id: string; - url: string; - displayName: string; - visual?: { __typename?: 'Visual'; id: string; uri: string } | undefined; - }; - verification: { __typename?: 'OrganizationVerification'; id: string; state: string }; - }>; - pageInfo: { - __typename?: 'PageInfo'; - startCursor?: string | undefined; - endCursor?: string | undefined; - hasNextPage: boolean; - }; - }; -}; - -export type AdminOrganizationVerifyMutationVariables = Exact<{ - input: OrganizationVerificationEventInput; -}>; - -export type AdminOrganizationVerifyMutation = { - __typename?: 'Mutation'; - eventOnOrganizationVerification: { - __typename?: 'OrganizationVerification'; - id: string; - nextEvents: Array; - state: string; - }; -}; - export type OrganizationInfoFragment = { __typename?: 'Organization'; id: string; @@ -16909,61 +17028,6 @@ export type DeleteOrganizationMutation = { deleteOrganization: { __typename?: 'Organization'; id: string }; }; -export type UpdateOrganizationMutationVariables = Exact<{ - input: UpdateOrganizationInput; -}>; - -export type UpdateOrganizationMutation = { - __typename?: 'Mutation'; - updateOrganization: { - __typename?: 'Organization'; - id: string; - nameID: string; - contactEmail?: string | undefined; - domain?: string | undefined; - legalEntityName?: string | undefined; - website?: string | undefined; - verification: { __typename?: 'OrganizationVerification'; id: string; status: OrganizationVerificationEnum }; - profile: { - __typename?: 'Profile'; - id: string; - url: string; - displayName: string; - description?: string | undefined; - tagline?: string | undefined; - visual?: - | { - __typename?: 'Visual'; - id: string; - uri: string; - name: string; - allowedTypes: Array; - aspectRatio: number; - maxHeight: number; - maxWidth: number; - minHeight: number; - minWidth: number; - alternativeText?: string | undefined; - } - | undefined; - location?: { __typename?: 'Location'; country?: string | undefined; city?: string | undefined } | undefined; - references?: - | Array<{ __typename?: 'Reference'; id: string; name: string; uri: string; description?: string | undefined }> - | undefined; - tagsets?: - | Array<{ - __typename?: 'Tagset'; - id: string; - name: string; - tags: Array; - allowedValues: Array; - type: TagsetType; - }> - | undefined; - }; - }; -}; - export type OrganizationAuthorizationQueryVariables = Exact<{ organizationId: Scalars['UUID_NAMEID']; }>; @@ -17631,6 +17695,108 @@ export type VirtualContributorFullFragment = { | undefined; }; +export type OrganizationAccountQueryVariables = Exact<{ + organizationNameId: Scalars['UUID_NAMEID']; +}>; + +export type OrganizationAccountQuery = { + __typename?: 'Query'; + organization: { + __typename?: 'Organization'; + id: string; + profile: { __typename?: 'Profile'; id: string; displayName: string }; + account?: { __typename?: 'Account'; id: string } | undefined; + }; +}; + +export type OrganizationSettingsQueryVariables = Exact<{ + orgId: Scalars['UUID_NAMEID']; +}>; + +export type OrganizationSettingsQuery = { + __typename?: 'Query'; + organization: { + __typename?: 'Organization'; + id: string; + settings: { + __typename?: 'OrganizationSettings'; + membership: { __typename?: 'OrganizationSettingsMembership'; allowUsersMatchingDomainToJoin: boolean }; + privacy: { __typename?: 'OrganizationSettingsPrivacy'; contributionRolesPubliclyVisible: boolean }; + }; + }; +}; + +export type UpdateOrganizationMutationVariables = Exact<{ + input: UpdateOrganizationInput; +}>; + +export type UpdateOrganizationMutation = { + __typename?: 'Mutation'; + updateOrganization: { + __typename?: 'Organization'; + id: string; + nameID: string; + contactEmail?: string | undefined; + domain?: string | undefined; + legalEntityName?: string | undefined; + website?: string | undefined; + verification: { __typename?: 'OrganizationVerification'; id: string; status: OrganizationVerificationEnum }; + profile: { + __typename?: 'Profile'; + id: string; + url: string; + displayName: string; + description?: string | undefined; + tagline?: string | undefined; + visual?: + | { + __typename?: 'Visual'; + id: string; + uri: string; + name: string; + allowedTypes: Array; + aspectRatio: number; + maxHeight: number; + maxWidth: number; + minHeight: number; + minWidth: number; + alternativeText?: string | undefined; + } + | undefined; + location?: { __typename?: 'Location'; country?: string | undefined; city?: string | undefined } | undefined; + references?: + | Array<{ __typename?: 'Reference'; id: string; name: string; uri: string; description?: string | undefined }> + | undefined; + tagsets?: + | Array<{ + __typename?: 'Tagset'; + id: string; + name: string; + tags: Array; + allowedValues: Array; + type: TagsetType; + }> + | undefined; + }; + }; +}; + +export type UpdateOrganizationSettingsMutationVariables = Exact<{ + settingsData: UpdateOrganizationSettingsInput; +}>; + +export type UpdateOrganizationSettingsMutation = { + __typename?: 'Mutation'; + updateOrganizationSettings: { + __typename?: 'Organization'; + id: string; + settings: { + __typename?: 'OrganizationSettings'; + membership: { __typename?: 'OrganizationSettingsMembership'; allowUsersMatchingDomainToJoin: boolean }; + }; + }; +}; + export type PendingMembershipsSpaceQueryVariables = Exact<{ spaceId: Scalars['UUID']; fetchDetails?: Scalars['Boolean']; @@ -17839,39 +18005,6 @@ export type UserSelectorUserInformationFragment = { }; }; -export type UserListQueryVariables = Exact<{ - first: Scalars['Int']; - after?: InputMaybe; - filter?: InputMaybe; -}>; - -export type UserListQuery = { - __typename?: 'Query'; - usersPaginated: { - __typename?: 'PaginatedUsers'; - users: Array<{ - __typename?: 'User'; - id: string; - email: string; - account?: - | { - __typename?: 'Account'; - id: string; - subscriptions: Array<{ __typename?: 'AccountSubscription'; name: LicensingCredentialBasedCredentialType }>; - } - | undefined; - profile: { - __typename?: 'Profile'; - id: string; - url: string; - displayName: string; - visual?: { __typename?: 'Visual'; id: string; uri: string } | undefined; - }; - }>; - pageInfo: { __typename?: 'PageInfo'; endCursor?: string | undefined; hasNextPage: boolean }; - }; -}; - export type UserAvatarsQueryVariables = Exact<{ ids: Array | Scalars['UUID']; }>; @@ -18268,60 +18401,6 @@ export type UpdateGroupMutation = { }; }; -export type UpdateUserMutationVariables = Exact<{ - input: UpdateUserInput; -}>; - -export type UpdateUserMutation = { - __typename?: 'Mutation'; - updateUser: { - __typename?: 'User'; - id: string; - nameID: string; - firstName: string; - lastName: string; - email: string; - phone?: string | undefined; - profile: { - __typename?: 'Profile'; - id: string; - displayName: string; - tagline?: string | undefined; - description?: string | undefined; - url: string; - location?: { __typename?: 'Location'; country?: string | undefined; city?: string | undefined } | undefined; - avatar?: - | { - __typename?: 'Visual'; - id: string; - uri: string; - name: string; - allowedTypes: Array; - aspectRatio: number; - maxHeight: number; - maxWidth: number; - minHeight: number; - minWidth: number; - alternativeText?: string | undefined; - } - | undefined; - references?: - | Array<{ __typename?: 'Reference'; id: string; name: string; uri: string; description?: string | undefined }> - | undefined; - tagsets?: - | Array<{ - __typename?: 'Tagset'; - id: string; - name: string; - tags: Array; - allowedValues: Array; - type: TagsetType; - }> - | undefined; - }; - }; -}; - export type UpdatePreferenceOnUserMutationVariables = Exact<{ input: UpdateUserPreferenceInput; }>; @@ -18901,6 +18980,99 @@ export type UserOrganizationIdsQuery = { }; }; +export type UpdateUserMutationVariables = Exact<{ + input: UpdateUserInput; +}>; + +export type UpdateUserMutation = { + __typename?: 'Mutation'; + updateUser: { + __typename?: 'User'; + id: string; + nameID: string; + firstName: string; + lastName: string; + email: string; + phone?: string | undefined; + profile: { + __typename?: 'Profile'; + id: string; + displayName: string; + tagline?: string | undefined; + description?: string | undefined; + url: string; + location?: { __typename?: 'Location'; country?: string | undefined; city?: string | undefined } | undefined; + avatar?: + | { + __typename?: 'Visual'; + id: string; + uri: string; + name: string; + allowedTypes: Array; + aspectRatio: number; + maxHeight: number; + maxWidth: number; + minHeight: number; + minWidth: number; + alternativeText?: string | undefined; + } + | undefined; + references?: + | Array<{ __typename?: 'Reference'; id: string; name: string; uri: string; description?: string | undefined }> + | undefined; + tagsets?: + | Array<{ + __typename?: 'Tagset'; + id: string; + name: string; + tags: Array; + allowedValues: Array; + type: TagsetType; + }> + | undefined; + }; + }; +}; + +export type UpdateUserSettingsMutationVariables = Exact<{ + settingsData: UpdateUserSettingsInput; +}>; + +export type UpdateUserSettingsMutation = { + __typename?: 'Mutation'; + updateUserSettings: { + __typename?: 'User'; + id: string; + settings: { + __typename?: 'UserSettings'; + privacy: { __typename?: 'UserSettingsPrivacy'; contributionRolesPubliclyVisible: boolean }; + communication: { __typename?: 'UserSettingsCommunication'; allowOtherUsersToSendMessages: boolean }; + }; + }; +}; + +export type UserSettingsQueryVariables = Exact<{ + userID: Scalars['UUID']; +}>; + +export type UserSettingsQuery = { + __typename?: 'Query'; + lookup: { + __typename?: 'LookupQueryResults'; + user?: + | { + __typename?: 'User'; + id: string; + settings: { + __typename?: 'UserSettings'; + communication: { __typename?: 'UserSettingsCommunication'; allowOtherUsersToSendMessages: boolean }; + privacy: { __typename?: 'UserSettingsPrivacy'; contributionRolesPubliclyVisible: boolean }; + }; + } + | undefined; + }; +}; + export type VirtualContributorQueryVariables = Exact<{ id: Scalars['UUID_NAMEID']; }>; @@ -23888,17 +24060,77 @@ export type PlatformLevelAuthorizationQuery = { }; }; -export type OrganizationAccountQueryVariables = Exact<{ - organizationNameId: Scalars['UUID_NAMEID']; +export type AssignLicensePlanToAccountMutationVariables = Exact<{ + licensePlanId: Scalars['UUID']; + accountId: Scalars['UUID']; + licensingId: Scalars['UUID']; }>; -export type OrganizationAccountQuery = { +export type AssignLicensePlanToAccountMutation = { + __typename?: 'Mutation'; + assignLicensePlanToAccount: { __typename?: 'Account'; id: string }; +}; + +export type RevokeLicensePlanFromAccountMutationVariables = Exact<{ + licensePlanId: Scalars['UUID']; + accountId: Scalars['UUID']; + licensingId: Scalars['UUID']; +}>; + +export type RevokeLicensePlanFromAccountMutation = { + __typename?: 'Mutation'; + revokeLicensePlanFromAccount: { __typename?: 'Account'; id: string }; +}; + +export type AdminGlobalOrganizationsListQueryVariables = Exact<{ + first: Scalars['Int']; + after?: InputMaybe; + filter?: InputMaybe; +}>; + +export type AdminGlobalOrganizationsListQuery = { __typename?: 'Query'; - organization: { - __typename?: 'Organization'; + organizationsPaginated: { + __typename?: 'PaginatedOrganization'; + organization: Array<{ + __typename?: 'Organization'; + id: string; + account?: + | { + __typename?: 'Account'; + id: string; + subscriptions: Array<{ __typename?: 'AccountSubscription'; name: LicensingCredentialBasedCredentialType }>; + } + | undefined; + profile: { + __typename?: 'Profile'; + id: string; + url: string; + displayName: string; + visual?: { __typename?: 'Visual'; id: string; uri: string } | undefined; + }; + verification: { __typename?: 'OrganizationVerification'; id: string; state: string }; + }>; + pageInfo: { + __typename?: 'PageInfo'; + startCursor?: string | undefined; + endCursor?: string | undefined; + hasNextPage: boolean; + }; + }; +}; + +export type AdminOrganizationVerifyMutationVariables = Exact<{ + input: OrganizationVerificationEventInput; +}>; + +export type AdminOrganizationVerifyMutation = { + __typename?: 'Mutation'; + eventOnOrganizationVerification: { + __typename?: 'OrganizationVerification'; id: string; - profile: { __typename?: 'Profile'; id: string; displayName: string }; - account?: { __typename?: 'Account'; id: string } | undefined; + nextEvents: Array; + state: string; }; }; @@ -24401,6 +24633,39 @@ export type DeleteDocumentMutation = { deleteDocument: { __typename?: 'Document'; id: string }; }; +export type UserListQueryVariables = Exact<{ + first: Scalars['Int']; + after?: InputMaybe; + filter?: InputMaybe; +}>; + +export type UserListQuery = { + __typename?: 'Query'; + usersPaginated: { + __typename?: 'PaginatedUsers'; + users: Array<{ + __typename?: 'User'; + id: string; + email: string; + account?: + | { + __typename?: 'Account'; + id: string; + subscriptions: Array<{ __typename?: 'AccountSubscription'; name: LicensingCredentialBasedCredentialType }>; + } + | undefined; + profile: { + __typename?: 'Profile'; + id: string; + url: string; + displayName: string; + visual?: { __typename?: 'Visual'; id: string; uri: string } | undefined; + }; + }>; + pageInfo: { __typename?: 'PageInfo'; endCursor?: string | undefined; hasNextPage: boolean }; + }; +}; + export type AdminVirtualContributorsQueryVariables = Exact<{ [key: string]: never }>; export type AdminVirtualContributorsQuery = { diff --git a/src/core/i18n/en/translation.en.json b/src/core/i18n/en/translation.en.json index 67cd1dc1d8..7718c51c43 100644 --- a/src/core/i18n/en/translation.en.json +++ b/src/core/i18n/en/translation.en.json @@ -1983,12 +1983,34 @@ } } }, + "user": { + "settings": { + "title": "Settings", + "subtitle": "This section allows you to modify the User settings", + "communication": { + "allowOtherUsersToSendMessages": "Allow other users to message me." + }, + "privacy": { + "contributorRolesVisible": "Show contributor roles to all registered users" + } + } + }, "organization": { "create-organization": "Create organization", "authorization": { - "preferences": { - "title": "Authorization", - "subtitle": "This section allows you to modify the organizations authorization" + "title": "Authorization", + "subtitle": "This section allows you to modify the organizations authorization" + }, + "settings": { + "title": "Settings", + "subtitle": "This section allows you to modify the organization settings", + "membership": { + "usersMatchingEmail": "Allow users with emails matching the domain of the Organization to associate themselves." + }, + "privacy": { + "title": "Privacy", + "subtitle": "This section allows you to modify the organization privacy settings", + "contributorRolesVisible": "Show contributor roles to all registered users" } }, "notifications": { diff --git a/src/core/ui/content/LabeledCount.tsx b/src/core/ui/content/LabeledCount.tsx index c1fea72fa0..c4d48ae0e3 100644 --- a/src/core/ui/content/LabeledCount.tsx +++ b/src/core/ui/content/LabeledCount.tsx @@ -1,5 +1,5 @@ import { Box, Skeleton } from '@mui/material'; -import OrganizationVerifiedStatus from '@/domain/community/organization/organizationVerifiedStatus/OrganizationVerifiedStatus'; +import OrganizationVerifiedStatus from '@/domain/community/contributor/organization/OrganizationVerifiedStatus'; import CircleTag from '../tags/CircleTag'; import { Caption } from '../typography'; diff --git a/src/domain/common/preference/organization/OrganizationPreferenceContainer.tsx b/src/domain/common/preference/organization/OrganizationPreferenceContainer.tsx deleted file mode 100644 index 57aaedd83f..0000000000 --- a/src/domain/common/preference/organization/OrganizationPreferenceContainer.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import React, { FC, useCallback } from 'react'; -import { ApolloError } from '@apollo/client'; -import { ContainerChildProps } from '@/core/container/container'; -import { - useOrganizationPreferencesQuery, - useUpdatePreferenceOnOrganizationMutation, -} from '@/core/apollo/generated/apollo-hooks'; -import { OrganizationPreferenceType, Preference } from '@/core/apollo/generated/graphql-schema'; - -export interface OrganizationPreferenceContainerEntities { - preferences: Preference[]; -} - -export interface OrganizationPreferenceContainerActions { - onUpdate: (id: string, type: OrganizationPreferenceType, value: boolean) => void; -} - -export interface OrganizationPreferenceContainerState { - loading: boolean; - error?: ApolloError; -} - -export interface OrganizationPreferenceContainerProps - extends ContainerChildProps< - OrganizationPreferenceContainerEntities, - OrganizationPreferenceContainerActions, - OrganizationPreferenceContainerState - > { - orgId: string; -} - -const OrganizationPreferenceContainer: FC = ({ children, orgId }) => { - const { data, loading, error } = useOrganizationPreferencesQuery({ - variables: { orgId }, - fetchPolicy: 'network-only', - nextFetchPolicy: 'cache-first', - }); - - const [updatePreference] = useUpdatePreferenceOnOrganizationMutation({}); - - const preferences = data?.organization?.preferences ?? []; - - const onUpdate = useCallback( - (id: string, type: OrganizationPreferenceType, checked: boolean) => { - updatePreference({ - variables: { - preferenceData: { - organizationID: orgId, - type, - value: checked ? 'true' : 'false', - }, - }, - optimisticResponse: { - updatePreferenceOnOrganization: { - __typename: 'Preference', - id, - value: checked ? 'true' : 'false', - }, - }, - }); - }, - [orgId, updatePreference] - ); - - return <>{children({ preferences }, { loading, error }, { onUpdate })}; -}; - -export default OrganizationPreferenceContainer; diff --git a/src/domain/common/preference/organization/OrganizationPreferenceQueries.graphql b/src/domain/common/preference/organization/OrganizationPreferenceQueries.graphql deleted file mode 100644 index 9e0054db1a..0000000000 --- a/src/domain/common/preference/organization/OrganizationPreferenceQueries.graphql +++ /dev/null @@ -1,24 +0,0 @@ -query organizationPreferences($orgId: UUID_NAMEID!) { - organization(ID: $orgId) { - id - preferences { - id - value - definition { - id - description - displayName - group - type - valueType - } - } - } -} - -mutation updatePreferenceOnOrganization($preferenceData: UpdateOrganizationPreferenceInput!) { - updatePreferenceOnOrganization(preferenceData: $preferenceData) { - id - value - } -} diff --git a/src/domain/common/preference/preference-types.ts b/src/domain/common/preference/preference-types.ts deleted file mode 100644 index 236e2a8c75..0000000000 --- a/src/domain/common/preference/preference-types.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { OrganizationPreferenceType, UserPreferenceType } from '@/core/apollo/generated/graphql-schema'; - -export type PreferenceTypes = UserPreferenceType | OrganizationPreferenceType; diff --git a/src/domain/community/organization/layout/OrganizationPageBanner.tsx b/src/domain/community/contributor/organization/OrganizationPageBanner.tsx similarity index 100% rename from src/domain/community/organization/layout/OrganizationPageBanner.tsx rename to src/domain/community/contributor/organization/OrganizationPageBanner.tsx diff --git a/src/domain/community/organization/organizationVerifiedStatus/OrganizationVerifiedStatus.tsx b/src/domain/community/contributor/organization/OrganizationVerifiedStatus.tsx similarity index 100% rename from src/domain/community/organization/organizationVerifiedStatus/OrganizationVerifiedStatus.tsx rename to src/domain/community/contributor/organization/OrganizationVerifiedStatus.tsx diff --git a/src/domain/community/contributor/organization/views/OrganizationAuthorizationPreferencesView.tsx b/src/domain/community/contributor/organization/views/OrganizationAuthorizationPreferencesView.tsx deleted file mode 100644 index 8cf6214072..0000000000 --- a/src/domain/community/contributor/organization/views/OrganizationAuthorizationPreferencesView.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { ApolloError } from '@apollo/client'; -import { ViewProps } from '@/core/container/view'; -import { OrganizationPreferenceType, Preference } from '@/core/apollo/generated/graphql-schema'; -import PreferenceSection from '@/main/ui/settings/PreferenceSection'; -import { useTranslation } from 'react-i18next'; - -export interface OrganizationAuthorizationPreferencesViewEntities { - preferences: Preference[]; -} - -export interface OrganizationAuthorizationPreferencesViewActions { - onUpdate: (id: string, type: OrganizationPreferenceType, value: boolean) => void; -} - -export interface OrganizationAuthorizationPreferencesViewOptions {} - -export interface OrganizationAuthorizationPreferencesViewState { - loading: boolean; - error?: ApolloError; -} - -export interface OrganizationAuthorizationPreferencesViewProps - extends ViewProps< - OrganizationAuthorizationPreferencesViewEntities, - OrganizationAuthorizationPreferencesViewActions, - OrganizationAuthorizationPreferencesViewState, - OrganizationAuthorizationPreferencesViewOptions - > {} - -const OrganizationAuthorizationPreferencesView = ({ - entities, - state, - actions, -}: OrganizationAuthorizationPreferencesViewProps) => { - const { t } = useTranslation(); - const { preferences } = entities; - const { loading } = state; - const { onUpdate } = actions; - return ( - onUpdate(id, type as OrganizationPreferenceType, value)} - loading={loading} - /> - ); -}; - -export default OrganizationAuthorizationPreferencesView; diff --git a/src/domain/community/contributor/organization/layout/OrganizationPageLayout.tsx b/src/domain/community/organization/layout/OrganizationPageLayout.tsx similarity index 87% rename from src/domain/community/contributor/organization/layout/OrganizationPageLayout.tsx rename to src/domain/community/organization/layout/OrganizationPageLayout.tsx index a08cf796a8..dc14adcf6d 100644 --- a/src/domain/community/contributor/organization/layout/OrganizationPageLayout.tsx +++ b/src/domain/community/organization/layout/OrganizationPageLayout.tsx @@ -1,9 +1,9 @@ -import OrganizationPageBanner from '@/domain/community/organization/layout/OrganizationPageBanner'; +import OrganizationPageBanner from '@/domain/community/contributor/organization/OrganizationPageBanner'; import React, { PropsWithChildren } from 'react'; import TopLevelPageBreadcrumbs from '@/main/topLevelPages/topLevelPageBreadcrumbs/TopLevelPageBreadcrumbs'; import { Diversity3Outlined } from '@mui/icons-material'; import TopLevelLayout from '@/main/ui/layout/TopLevelLayout'; -import OrganizationPageContainer from '../OrganizationPageContainer/OrganizationPageContainer'; +import OrganizationPageContainer from '../../contributor/organization/OrganizationPageContainer/OrganizationPageContainer'; import BreadcrumbsItem from '@/core/ui/navigation/BreadcrumbsItem'; import { useTranslation } from 'react-i18next'; diff --git a/src/domain/community/contributor/organization/pages/OrganizationPage.tsx b/src/domain/community/organization/pages/OrganizationPage.tsx similarity index 86% rename from src/domain/community/contributor/organization/pages/OrganizationPage.tsx rename to src/domain/community/organization/pages/OrganizationPage.tsx index 44bd303ef5..2d044c2e76 100644 --- a/src/domain/community/contributor/organization/pages/OrganizationPage.tsx +++ b/src/domain/community/organization/pages/OrganizationPage.tsx @@ -1,10 +1,10 @@ -import OrganizationPageContainer from '../OrganizationPageContainer/OrganizationPageContainer'; +import OrganizationPageContainer from '../../contributor/organization/OrganizationPageContainer/OrganizationPageContainer'; import OrganizationPageLayout from '../layout/OrganizationPageLayout'; import OrganizationPageView from '../views/OrganizationPageView'; import Loading from '@/core/ui/loading/Loading'; import TopLevelLayout from '@/main/ui/layout/TopLevelLayout'; import { Error404 } from '@/core/pages/Errors/Error404'; -import { useOrganization } from '../hooks/useOrganization'; +import { useOrganization } from '../../contributor/organization/hooks/useOrganization'; import { useOrganizationAccountQuery } from '@/core/apollo/generated/apollo-hooks'; import useAccountResources from '@/domain/community/contributor/useAccountResources/useAccountResources'; diff --git a/src/domain/community/contributor/organization/routing/OrganizationRoute.tsx b/src/domain/community/organization/routing/OrganizationRoute.tsx similarity index 84% rename from src/domain/community/contributor/organization/routing/OrganizationRoute.tsx rename to src/domain/community/organization/routing/OrganizationRoute.tsx index 2356bd0cfb..652ff64cbd 100644 --- a/src/domain/community/contributor/organization/routing/OrganizationRoute.tsx +++ b/src/domain/community/organization/routing/OrganizationRoute.tsx @@ -2,9 +2,9 @@ import { Route, Routes } from 'react-router'; import { PageLayoutHolderWithOutlet } from '@/domain/journey/common/EntityPageLayout'; import { Error404 } from '@/core/pages/Errors/Error404'; import OrganizationPage from '../pages/OrganizationPage'; -import OrganizationAdminRoutes from '@/domain/platform/admin/organization/OrganizationAdminRoutes'; +import OrganizationAdminRoutes from '@/domain/community/organizationAdmin/OrganizationAdminRoutes'; import { nameOfUrl } from '@/main/routing/urlParams'; -import { OrganizationProvider } from '../context/OrganizationProvider'; +import { OrganizationProvider } from '../../contributor/organization/context/OrganizationProvider'; import { Outlet } from 'react-router-dom'; import TopLevelLayout from '@/main/ui/layout/TopLevelLayout'; diff --git a/src/domain/community/contributor/organization/views/OrganizationPageView.tsx b/src/domain/community/organization/views/OrganizationPageView.tsx similarity index 97% rename from src/domain/community/contributor/organization/views/OrganizationPageView.tsx rename to src/domain/community/organization/views/OrganizationPageView.tsx index c3edebe207..1b9edf5a1f 100644 --- a/src/domain/community/contributor/organization/views/OrganizationPageView.tsx +++ b/src/domain/community/organization/views/OrganizationPageView.tsx @@ -1,9 +1,6 @@ import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; -import { - OrganizationContainerEntities, - OrganizationContainerState, -} from '../OrganizationPageContainer/OrganizationPageContainer'; + import { OrganizationVerificationEnum } from '@/core/apollo/generated/graphql-schema'; import { buildSettingsUrl } from '@/main/routing/urlBuilders'; import { @@ -25,6 +22,10 @@ import AccountResourcesView, { import useFilteredMemberships from '@/domain/community/user/hooks/useFilteredMemberships'; import { RoleType } from '@/domain/community/user/constants/RoleType'; import Loading from '@/core/ui/loading/Loading'; +import { + OrganizationContainerEntities, + OrganizationContainerState, +} from '../../contributor/organization/OrganizationPageContainer/OrganizationPageContainer'; type OrganizationPageViewProps = { entities: OrganizationContainerEntities; diff --git a/src/domain/platform/admin/organization/OrganizationAdminRoutes.tsx b/src/domain/community/organizationAdmin/OrganizationAdminRoutes.tsx similarity index 65% rename from src/domain/platform/admin/organization/OrganizationAdminRoutes.tsx rename to src/domain/community/organizationAdmin/OrganizationAdminRoutes.tsx index 9d22e7adcb..f959863e94 100644 --- a/src/domain/platform/admin/organization/OrganizationAdminRoutes.tsx +++ b/src/domain/community/organizationAdmin/OrganizationAdminRoutes.tsx @@ -1,16 +1,17 @@ import React, { FC } from 'react'; import { Navigate, Route, Routes } from 'react-router-dom'; import { Error404 } from '@/core/pages/Errors/Error404'; -import OrganizationProfilePage from './OrganizationProfilePage'; -import OrganizationAccountPage from './OrganizationAccountPage'; +import OrganizationAdminProfilePage from './tabs/OrganizationAdminProfilePage'; +import OrganizationAccountPage from './tabs/OrganizationAdminAccountPage'; import { OrganizationGroupsRoute } from './OrganizationGroupsRoute'; -import OrganizationCommunityPage from './OrganizationCommunityPage'; -import OrganizationAuthorizationPage from './OrganizationAuthorizationPage'; +import OrganizationAdminCommunityPage from './tabs/OrganizationAdminCommunityPage'; +import OrganizationAdminAuthorizationPage from './tabs/OrganizationAdminAuthorizationPage'; import NonAdminRedirect from '@/main/admin/NonAdminRedirect'; import { useOrganization } from '@/domain/community/contributor/organization/hooks/useOrganization'; import { AuthorizationPrivilege } from '@/core/apollo/generated/graphql-schema'; import Loading from '@/core/ui/loading/Loading'; import TopLevelLayout from '@/main/ui/layout/TopLevelLayout'; +import OrganizationAdminSettingsPage from './tabs/OrganizationAdminSettingsPage'; const OrganizationAdminRoutes: FC = () => { const { organization, loading } = useOrganization(); @@ -33,11 +34,12 @@ const OrganizationAdminRoutes: FC = () => { > } /> - } /> + } /> } /> - } /> + } /> } /> - } /> + } /> + } /> } /> diff --git a/src/domain/community/organizationAdmin/OrganizationAdminTabs.ts b/src/domain/community/organizationAdmin/OrganizationAdminTabs.ts new file mode 100644 index 0000000000..d168ca5445 --- /dev/null +++ b/src/domain/community/organizationAdmin/OrganizationAdminTabs.ts @@ -0,0 +1,34 @@ +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import { TabDefinition } from '@/domain/platform/admin/layout/EntitySettingsLayout/EntitySettingsTabs'; +import PeopleOutlinedIcon from '@mui/icons-material/PeopleOutlined'; +import GppGoodOutlinedIcon from '@mui/icons-material/GppGoodOutlined'; +import SellOutlinedIcon from '@mui/icons-material/SellOutlined'; +import SettingsOutlinedIcon from '@mui/icons-material/SettingsOutlined'; + +export const organizationAdminTabs: TabDefinition[] = [ + { + section: SettingsSection.Profile, + route: 'profile', + icon: PeopleOutlinedIcon, + }, + { + section: SettingsSection.Account, + route: 'account', + icon: SellOutlinedIcon, + }, + { + section: SettingsSection.Community, + route: 'community', + icon: PeopleOutlinedIcon, + }, + { + section: SettingsSection.Authorization, + route: 'authorization', + icon: GppGoodOutlinedIcon, + }, + { + section: SettingsSection.Settings, + route: 'settings', + icon: SettingsOutlinedIcon, + }, +]; diff --git a/src/domain/platform/admin/organization/OrganizationGroupRoute.tsx b/src/domain/community/organizationAdmin/OrganizationGroupRoute.tsx similarity index 89% rename from src/domain/platform/admin/organization/OrganizationGroupRoute.tsx rename to src/domain/community/organizationAdmin/OrganizationGroupRoute.tsx index 7d3827b872..ab2e4825ff 100644 --- a/src/domain/platform/admin/organization/OrganizationGroupRoute.tsx +++ b/src/domain/community/organizationAdmin/OrganizationGroupRoute.tsx @@ -1,7 +1,7 @@ import React, { FC } from 'react'; import { useUrlParams } from '@/core/routing/useUrlParams'; import { useOrganizationGroupQuery } from '@/core/apollo/generated/apollo-hooks'; -import { GroupRoute } from '../routing/GroupRoute'; +import { GroupRoute } from '../../platform/admin/routing/GroupRoute'; export const OrganizationGroupRoute: FC = () => { const { groupId = '', organizationNameId = '' } = useUrlParams(); diff --git a/src/domain/platform/admin/organization/OrganizationGroupsRoute.tsx b/src/domain/community/organizationAdmin/OrganizationGroupsRoute.tsx similarity index 82% rename from src/domain/platform/admin/organization/OrganizationGroupsRoute.tsx rename to src/domain/community/organizationAdmin/OrganizationGroupsRoute.tsx index 0a4cd4d080..f3acd582d8 100644 --- a/src/domain/platform/admin/organization/OrganizationGroupsRoute.tsx +++ b/src/domain/community/organizationAdmin/OrganizationGroupsRoute.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; import { Route, Routes } from 'react-router-dom'; -import { CreateOrganizationGroupPage } from '../components/Organization/CreateOrganizationGroup'; +import { CreateOrganizationGroupPage } from '../../platform/admin/components/Organization/CreateOrganizationGroup'; import { Error404 } from '@/core/pages/Errors/Error404'; import { nameOfUrl } from '@/main/routing/urlParams'; import { OrganizationGroupRoute } from './OrganizationGroupRoute'; diff --git a/src/domain/platform/admin/organization/graphql/OrganizationAccount.graphql b/src/domain/community/organizationAdmin/graphql/OrganizationAccount.graphql similarity index 100% rename from src/domain/platform/admin/organization/graphql/OrganizationAccount.graphql rename to src/domain/community/organizationAdmin/graphql/OrganizationAccount.graphql diff --git a/src/domain/community/organizationAdmin/graphql/organizationSettingsQueries.graphql b/src/domain/community/organizationAdmin/graphql/organizationSettingsQueries.graphql new file mode 100644 index 0000000000..9b059664b0 --- /dev/null +++ b/src/domain/community/organizationAdmin/graphql/organizationSettingsQueries.graphql @@ -0,0 +1,13 @@ +query organizationSettings($orgId: UUID_NAMEID!) { + organization(ID: $orgId) { + id + settings { + membership { + allowUsersMatchingDomainToJoin + } + privacy { + contributionRolesPubliclyVisible + } + } + } +} diff --git a/src/domain/community/contributor/organization/graphql/mutations/updateOrganization.graphql b/src/domain/community/organizationAdmin/graphql/updateOrganization.graphql similarity index 100% rename from src/domain/community/contributor/organization/graphql/mutations/updateOrganization.graphql rename to src/domain/community/organizationAdmin/graphql/updateOrganization.graphql diff --git a/src/domain/community/organizationAdmin/graphql/updateOrganizationSettings.graphql b/src/domain/community/organizationAdmin/graphql/updateOrganizationSettings.graphql new file mode 100644 index 0000000000..a4342a5d38 --- /dev/null +++ b/src/domain/community/organizationAdmin/graphql/updateOrganizationSettings.graphql @@ -0,0 +1,10 @@ +mutation updateOrganizationSettings($settingsData: UpdateOrganizationSettingsInput!) { + updateOrganizationSettings(settingsData: $settingsData) { + id + settings { + membership { + allowUsersMatchingDomainToJoin + } + } + } +} diff --git a/src/domain/community/organizationAdmin/index.ts b/src/domain/community/organizationAdmin/index.ts new file mode 100644 index 0000000000..97141043fe --- /dev/null +++ b/src/domain/community/organizationAdmin/index.ts @@ -0,0 +1 @@ +export { default as AdminOrganizationsRoutes } from '../../platform/admin/organizations/AdminOrganizationsRoutes'; diff --git a/src/domain/platform/admin/organization/OrganizationAdminLayout.tsx b/src/domain/community/organizationAdmin/layout/OrganizationAdminLayout.tsx similarity index 66% rename from src/domain/platform/admin/organization/OrganizationAdminLayout.tsx rename to src/domain/community/organizationAdmin/layout/OrganizationAdminLayout.tsx index 77d271a54a..fd3a09f6aa 100644 --- a/src/domain/platform/admin/organization/OrganizationAdminLayout.tsx +++ b/src/domain/community/organizationAdmin/layout/OrganizationAdminLayout.tsx @@ -1,40 +1,15 @@ import React, { FC } from 'react'; -import { SettingsSection } from '../layout/EntitySettingsLayout/constants'; -import { TabDefinition } from '../layout/EntitySettingsLayout/EntitySettingsTabs'; +import { SettingsSection } from '../../../platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { useOrganization } from '@/domain/community/contributor/organization/hooks/useOrganization'; -import EntitySettingsLayout from '../layout/EntitySettingsLayout/EntitySettingsLayout'; -import OrganizationPageBanner from '@/domain/community/organization/layout/OrganizationPageBanner'; -import PeopleOutlinedIcon from '@mui/icons-material/PeopleOutlined'; -import GppGoodOutlinedIcon from '@mui/icons-material/GppGoodOutlined'; +import EntitySettingsLayout from '../../../platform/admin/layout/EntitySettingsLayout/EntitySettingsLayout'; +import OrganizationPageBanner from '@/domain/community/contributor/organization/OrganizationPageBanner'; import OrganizationPageContainer from '@/domain/community/contributor/organization/OrganizationPageContainer/OrganizationPageContainer'; import BreadcrumbsItem from '@/core/ui/navigation/BreadcrumbsItem'; -import { Diversity3Outlined, Settings, LocalOfferOutlined } from '@mui/icons-material'; +import { Diversity3Outlined, Settings } from '@mui/icons-material'; import { buildOrganizationUrl } from '@/main/routing/urlBuilders'; import TopLevelPageBreadcrumbs from '@/main/topLevelPages/topLevelPageBreadcrumbs/TopLevelPageBreadcrumbs'; import { useTranslation } from 'react-i18next'; - -const tabs: TabDefinition[] = [ - { - section: SettingsSection.Profile, - route: 'profile', - icon: PeopleOutlinedIcon, - }, - { - section: SettingsSection.Account, - route: 'account', - icon: LocalOfferOutlined, - }, - { - section: SettingsSection.Community, - route: 'community', - icon: PeopleOutlinedIcon, - }, - { - section: SettingsSection.Authorization, - route: 'authorization', - icon: GppGoodOutlinedIcon, - }, -]; +import { organizationAdminTabs } from '../OrganizationAdminTabs'; interface OrganizationAdminLayoutProps { currentTab: SettingsSection; @@ -51,7 +26,7 @@ const OrganizationAdminLayout: FC = props => { {({ organization, permissions, handleSendMessage }, { loading }) => ( ( + + + + + +); + +export default OrganizationAdminAuthorizationPage; diff --git a/src/domain/community/organizationAdmin/tabs/OrganizationAdminCommunityPage.tsx b/src/domain/community/organizationAdmin/tabs/OrganizationAdminCommunityPage.tsx new file mode 100644 index 0000000000..8d4d4e5c67 --- /dev/null +++ b/src/domain/community/organizationAdmin/tabs/OrganizationAdminCommunityPage.tsx @@ -0,0 +1,17 @@ +import { FC } from 'react'; +import OrganizationAdminLayout from '../layout/OrganizationAdminLayout'; +import { SettingsSection } from '../../../platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import { SettingsPageProps } from '../../../platform/admin/layout/EntitySettingsLayout/types'; +import { OrganizationGroupsView } from '../views/OrganizationGroupsView'; +import OrganizationAssociatesView from '../views/OrganizationAssociatesView'; +import { SectionSpacer } from '@/domain/shared/components/Section/Section'; + +const OrganizationAdminCommunityPage: FC = () => ( + + + + + +); + +export default OrganizationAdminCommunityPage; diff --git a/src/domain/community/organizationAdmin/tabs/OrganizationAdminProfilePage.tsx b/src/domain/community/organizationAdmin/tabs/OrganizationAdminProfilePage.tsx new file mode 100644 index 0000000000..f9ff396aa8 --- /dev/null +++ b/src/domain/community/organizationAdmin/tabs/OrganizationAdminProfilePage.tsx @@ -0,0 +1,16 @@ +import React, { FC } from 'react'; +import OrganizationAdminLayout from '../layout/OrganizationAdminLayout'; +import { SettingsSection } from '../../../platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import OrganizationPage from '../../../platform/admin/components/Organization/OrganizationPage'; +import { EditMode } from '@/core/ui/forms/editMode'; +import { SettingsPageProps } from '../../../platform/admin/layout/EntitySettingsLayout/types'; + +const OrganizationAdminProfilePage: FC = () => { + return ( + + + + ); +}; + +export default OrganizationAdminProfilePage; diff --git a/src/domain/community/organizationAdmin/tabs/OrganizationAdminSettingsPage.tsx b/src/domain/community/organizationAdmin/tabs/OrganizationAdminSettingsPage.tsx new file mode 100644 index 0000000000..6abf67219a --- /dev/null +++ b/src/domain/community/organizationAdmin/tabs/OrganizationAdminSettingsPage.tsx @@ -0,0 +1,11 @@ +import OrganizationAdminLayout from '../layout/OrganizationAdminLayout'; +import { SettingsSection } from '../../../platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import OrganizationAdminSettingsView from '../views/OrganizationAdminSettingsView'; + +const OrganizationAdminSettingsPage = () => ( + + + +); + +export default OrganizationAdminSettingsPage; diff --git a/src/domain/platform/admin/organization/views/OrganizationAdminAuthorizationView.tsx b/src/domain/community/organizationAdmin/views/OrganizationAdminAuthorizationView.tsx similarity index 100% rename from src/domain/platform/admin/organization/views/OrganizationAdminAuthorizationView.tsx rename to src/domain/community/organizationAdmin/views/OrganizationAdminAuthorizationView.tsx diff --git a/src/domain/community/organizationAdmin/views/OrganizationAdminSettingsView.tsx b/src/domain/community/organizationAdmin/views/OrganizationAdminSettingsView.tsx new file mode 100644 index 0000000000..199e43d5f6 --- /dev/null +++ b/src/domain/community/organizationAdmin/views/OrganizationAdminSettingsView.tsx @@ -0,0 +1,100 @@ +import { useMemo } from 'react'; +import { useOrganization } from '@/domain/community/contributor/organization/hooks/useOrganization'; +import Loading from '@/core/ui/loading/Loading'; +import { Trans, useTranslation } from 'react-i18next'; +import { + useOrganizationSettingsQuery, + useUpdateOrganizationSettingsMutation, +} from '@/core/apollo/generated/apollo-hooks'; +import PageContent from '@/core/ui/content/PageContent'; +import PageContentBlock from '@/core/ui/content/PageContentBlock'; +import { BlockTitle } from '@/core/ui/typography/components'; +import SwitchSettingsGroup from '@/core/ui/forms/SettingsGroups/SwitchSettingsGroup'; + +const defaultOrganizationSettings = { + privacy: { + contributionRolePubliclyVisible: true, + }, + membership: { + allowUsersMatchingDomainToJoin: false, + }, +}; + +export const OrganizationAdminSettingsView = () => { + const { organizationId, loading: isLoadingOrganization } = useOrganization(); + const { t } = useTranslation(); + + const { data, loading } = useOrganizationSettingsQuery({ + variables: { orgId: organizationId }, + skip: isLoadingOrganization || !organizationId, + }); + + const [updateOrganizationSettings] = useUpdateOrganizationSettingsMutation(); + + const currentSettings = useMemo(() => { + const settings = data?.organization.settings; + return { + ...settings, + }; + }, [data, organizationId]); + + if (loading) { + return ; + } + + const handleUpdateSettings = async ({ + allowUsersMatchingDomainToJoin = currentSettings?.membership?.allowUsersMatchingDomainToJoin || + defaultOrganizationSettings.membership.allowUsersMatchingDomainToJoin, + contributionRolesPubliclyVisible = currentSettings?.privacy?.contributionRolesPubliclyVisible || + defaultOrganizationSettings.privacy.contributionRolePubliclyVisible, + }: { + allowUsersMatchingDomainToJoin?: boolean; + contributionRolesPubliclyVisible?: boolean; + }) => { + const settingsVariable = { + privacy: { + contributionRolesPubliclyVisible, + }, + membership: { + allowUsersMatchingDomainToJoin, + }, + }; + + await updateOrganizationSettings({ + variables: { + settingsData: { + organizationID: organizationId, + settings: settingsVariable, + }, + }, + }); + }; + + return ( + + {!loading && ( + <> + + {t('pages.admin.organization.settings.title')} + }} + /> + ), + }, + }} + onChange={(setting, newValue) => handleUpdateSettings({ [setting]: newValue })} + /> + + + )} + + ); +}; + +export default OrganizationAdminSettingsView; diff --git a/src/domain/platform/admin/organization/views/OrganizationAssociatesView.tsx b/src/domain/community/organizationAdmin/views/OrganizationAssociatesView.tsx similarity index 100% rename from src/domain/platform/admin/organization/views/OrganizationAssociatesView.tsx rename to src/domain/community/organizationAdmin/views/OrganizationAssociatesView.tsx diff --git a/src/domain/platform/admin/organization/views/OrganizationGroupsView.tsx b/src/domain/community/organizationAdmin/views/OrganizationGroupsView.tsx similarity index 100% rename from src/domain/platform/admin/organization/views/OrganizationGroupsView.tsx rename to src/domain/community/organizationAdmin/views/OrganizationGroupsView.tsx diff --git a/src/domain/platform/admin/organization/views/OrganizationOwnerAuthorizationView.tsx b/src/domain/community/organizationAdmin/views/OrganizationOwnerAuthorizationView.tsx similarity index 100% rename from src/domain/platform/admin/organization/views/OrganizationOwnerAuthorizationView.tsx rename to src/domain/community/organizationAdmin/views/OrganizationOwnerAuthorizationView.tsx diff --git a/src/domain/community/profile/views/ProfileView/OrganizationProfileView.tsx b/src/domain/community/profile/views/ProfileView/OrganizationProfileView.tsx index fb0f4f8d9c..648911b209 100644 --- a/src/domain/community/profile/views/ProfileView/OrganizationProfileView.tsx +++ b/src/domain/community/profile/views/ProfileView/OrganizationProfileView.tsx @@ -2,7 +2,7 @@ import { Box, CardContent, Grid, Link, styled } from '@mui/material'; import { useTranslation } from 'react-i18next'; import ProfileDetail from '@/domain/community/profile/ProfileDetail/ProfileDetail'; import TagsComponent from '@/domain/shared/components/TagsComponent/TagsComponent'; -import OrganizationVerifiedStatus from '@/domain/community/organization/organizationVerifiedStatus/OrganizationVerifiedStatus'; +import OrganizationVerifiedStatus from '@/domain/community/contributor/organization/OrganizationVerifiedStatus'; import { Location } from '@/core/apollo/generated/graphql-schema'; import { BlockTitle } from '@/core/ui/typography'; import PageContentBlock from '@/core/ui/content/PageContentBlock'; diff --git a/src/domain/community/user/containers/UserNotificationsContainer.tsx b/src/domain/community/user/containers/UserNotificationsContainer.tsx index 92d289738a..3c80f0d553 100644 --- a/src/domain/community/user/containers/UserNotificationsContainer.tsx +++ b/src/domain/community/user/containers/UserNotificationsContainer.tsx @@ -6,7 +6,7 @@ import { useUserNotificationsPreferencesQuery, } from '@/core/apollo/generated/apollo-hooks'; import { ContainerChildProps } from '@/core/container/container'; -import { Preference, UserPreferenceType } from '@/core/apollo/generated/graphql-schema'; +import { Preference, PreferenceType } from '@/core/apollo/generated/graphql-schema'; export interface UserNotificationsContainerEntities { preferences: Preference[]; @@ -17,7 +17,7 @@ export interface UserNotificationsContainerState { } export interface UserNotificationsContainerActions { - updatePreference: (type: UserPreferenceType, checked: boolean, id: string) => void; + updatePreference: (type: PreferenceType, checked: boolean, id: string) => void; } export interface UserNotificationsContainerProps @@ -40,7 +40,7 @@ const UserNotificationsContainer = ({ children }: PropsWithChildren { + const updatePreference = (type: PreferenceType, checked: boolean, id: string) => { if (!userUUID) { return; } diff --git a/src/domain/community/user/pages/UserNotificationsPage.tsx b/src/domain/community/user/pages/UserNotificationsPage.tsx deleted file mode 100644 index 3e271684f0..0000000000 --- a/src/domain/community/user/pages/UserNotificationsPage.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import UserNotificationsContainer from '../containers/UserNotificationsContainer'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; -import UserSettingsLayout from '@/domain/platform/admin/user/layout/UserSettingsLayout'; -import UserNotificationsPageView from '../views/UserNotificationsPageView'; - -const UserNotificationsPage = () => ( - - - {(entities, state, actions) => ( - - )} - - -); - -export default UserNotificationsPage; diff --git a/src/domain/community/user/routing/UserRoute.tsx b/src/domain/community/user/routing/UserRoute.tsx index 56cfb085fd..6dc2a23c77 100644 --- a/src/domain/community/user/routing/UserRoute.tsx +++ b/src/domain/community/user/routing/UserRoute.tsx @@ -1,7 +1,7 @@ import { Route, Routes } from 'react-router-dom'; import UserProfilePage from '../userProfilePage/UserProfilePage'; import { Error404 } from '@/core/pages/Errors/Error404'; -import UserSettingsRoute from './UserSettingsRoute'; +import UserAdminRoute from '../../userAdmin/routing/UserAdminRoute'; import { PageLayoutHolderWithOutlet } from '@/domain/journey/common/EntityPageLayout'; import TopLevelLayout from '@/main/ui/layout/TopLevelLayout'; import { nameOfUrl } from '@/main/routing/urlParams'; @@ -12,7 +12,7 @@ export const UserRoute = () => ( }> } /> - } /> + } /> { - const { isFeatureEnabled } = useConfig(); - - return ( - - }> - } /> - } /> - } /> - } /> - } /> - } /> - {isFeatureEnabled(PlatformFeatureFlagName.Ssi) && ( - } /> - )} - } /> - - - ); -}; - -export default UserSettingsRoute; diff --git a/src/domain/community/userAdmin/UserAdminTabs.ts b/src/domain/community/userAdmin/UserAdminTabs.ts new file mode 100644 index 0000000000..246a36c6e3 --- /dev/null +++ b/src/domain/community/userAdmin/UserAdminTabs.ts @@ -0,0 +1,47 @@ +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import { TabDefinition } from '@/domain/platform/admin/layout/EntitySettingsLayout/EntitySettingsTabs'; +import ForumOutlinedIcon from '@mui/icons-material/ForumOutlined'; +import ContentPasteOutlinedIcon from '@mui/icons-material/ContentPasteOutlined'; +import NotificationsNoneOutlinedIcon from '@mui/icons-material/NotificationsNoneOutlined'; +import VerifiedUserIcon from '@mui/icons-material/VerifiedUser'; +import SellOutlinedIcon from '@mui/icons-material/SellOutlined'; +import PeopleOutlinedIcon from '@mui/icons-material/PeopleOutlined'; +import SettingsOutlinedIcon from '@mui/icons-material/SettingsOutlined'; + +export const UserAdminTabs: TabDefinition[] = [ + { + section: SettingsSection.Membership, + route: 'membership', + icon: ContentPasteOutlinedIcon, + }, + { + section: SettingsSection.MyProfile, + route: 'profile', + icon: PeopleOutlinedIcon, + }, + { + section: SettingsSection.Account, + route: 'account', + icon: SellOutlinedIcon, + }, + { + section: SettingsSection.Organizations, + route: 'organizations', + icon: ForumOutlinedIcon, + }, + { + section: SettingsSection.Notifications, + route: 'notifications', + icon: NotificationsNoneOutlinedIcon, + }, + { + section: SettingsSection.Credentials, + route: 'credentials', + icon: VerifiedUserIcon, + }, + { + section: SettingsSection.Settings, + route: 'settings', + icon: SettingsOutlinedIcon, + }, +]; diff --git a/src/domain/community/user/graphql/mutations/updateUser.graphql b/src/domain/community/userAdmin/graphql/updateUser.graphql similarity index 100% rename from src/domain/community/user/graphql/mutations/updateUser.graphql rename to src/domain/community/userAdmin/graphql/updateUser.graphql diff --git a/src/domain/community/userAdmin/graphql/updateUserSettings.graphql b/src/domain/community/userAdmin/graphql/updateUserSettings.graphql new file mode 100644 index 0000000000..baae0351a0 --- /dev/null +++ b/src/domain/community/userAdmin/graphql/updateUserSettings.graphql @@ -0,0 +1,13 @@ +mutation updateUserSettings($settingsData: UpdateUserSettingsInput!) { + updateUserSettings(settingsData: $settingsData) { + id + settings { + privacy { + contributionRolesPubliclyVisible + } + communication { + allowOtherUsersToSendMessages + } + } + } +} diff --git a/src/domain/community/userAdmin/graphql/userSettingsQueries.graphql b/src/domain/community/userAdmin/graphql/userSettingsQueries.graphql new file mode 100644 index 0000000000..633989f0a3 --- /dev/null +++ b/src/domain/community/userAdmin/graphql/userSettingsQueries.graphql @@ -0,0 +1,15 @@ +query userSettings($userID: UUID!) { + lookup { + user(ID: $userID) { + id + settings { + communication { + allowOtherUsersToSendMessages + } + privacy { + contributionRolesPubliclyVisible + } + } + } + } +} diff --git a/src/domain/platform/admin/user/layout/UserSettingsLayout.tsx b/src/domain/community/userAdmin/layout/UserAdminLayout.tsx similarity index 83% rename from src/domain/platform/admin/user/layout/UserSettingsLayout.tsx rename to src/domain/community/userAdmin/layout/UserAdminLayout.tsx index 4ee9a7d697..31a7c1c153 100644 --- a/src/domain/platform/admin/user/layout/UserSettingsLayout.tsx +++ b/src/domain/community/userAdmin/layout/UserAdminLayout.tsx @@ -2,7 +2,7 @@ import React, { FC } from 'react'; import { useConfig } from '@/domain/platform/config/useConfig'; import { useUserContext } from '@/domain/community/user'; import UserPageBanner from '@/domain/community/user/layout/UserPageBanner'; -import { UserProfileTabs, SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import EntitySettingsLayout from '@/domain/platform/admin/layout/EntitySettingsLayout/EntitySettingsLayout'; import BreadcrumbsItem from '@/core/ui/navigation/BreadcrumbsItem'; import GroupOutlinedIcon from '@mui/icons-material/GroupOutlined'; @@ -11,6 +11,7 @@ import { buildUserProfileUrl } from '@/main/routing/urlBuilders'; import TopLevelPageBreadcrumbs from '@/main/topLevelPages/topLevelPageBreadcrumbs/TopLevelPageBreadcrumbs'; import { useTranslation } from 'react-i18next'; import { PlatformFeatureFlagName } from '@/core/apollo/generated/graphql-schema'; +import { UserAdminTabs } from '../UserAdminTabs'; const tabs = [ SettingsSection.MyProfile, @@ -18,22 +19,23 @@ const tabs = [ SettingsSection.Membership, SettingsSection.Organizations, SettingsSection.Notifications, + SettingsSection.Settings, ].map(section => { - return UserProfileTabs.find(tab => tab.section === section)!; + return UserAdminTabs.find(tab => tab.section === section)!; }); -interface UserSettingsLayoutProps { +interface UserAdminLayoutProps { currentTab: SettingsSection; tabRoutePrefix?: string; } -const UserSettingsLayout: FC = props => { +const UserAdminLayout: FC = props => { const { user, loading } = useUserContext(); // Add credentials tab is SSI is enabled: const { isFeatureEnabled } = useConfig(); if (isFeatureEnabled(PlatformFeatureFlagName.Ssi)) { - tabs.push(UserProfileTabs.find(tab => tab.section === SettingsSection.Credentials)!); + tabs.push(UserAdminTabs.find(tab => tab.section === SettingsSection.Credentials)!); } const entityAttrs = { @@ -70,4 +72,4 @@ const UserSettingsLayout: FC = props => { ); }; -export default UserSettingsLayout; +export default UserAdminLayout; diff --git a/src/domain/community/userAdmin/routing/UserAdminRoute.tsx b/src/domain/community/userAdmin/routing/UserAdminRoute.tsx new file mode 100644 index 0000000000..2681c938d8 --- /dev/null +++ b/src/domain/community/userAdmin/routing/UserAdminRoute.tsx @@ -0,0 +1,36 @@ +import { Navigate, Route, Routes } from 'react-router-dom'; +import { useConfig } from '@/domain/platform/config/useConfig'; +import { Error404 } from '@/core/pages/Errors/Error404'; +import { PageLayoutHolderWithOutlet } from '@/domain/journey/common/EntityPageLayout'; +import UserAdminProfilePage from '../tabs/UserAdminProfilePage'; +import UserAdminAccountPage from '../tabs/UserAdminAccountPage'; +import UserAdminCredentialsPage from '../tabs/UserAdminCredentialsPage'; +import UserAdminMembershipPage from '../tabs/UserAdminMembershipPage'; +import UserAdminNotificationsPage from '../tabs/UserAdminNotificationsPage'; +import UserAdminOrganizationsPage from '../tabs/UserAdminOrganizationsPage'; +import { PlatformFeatureFlagName } from '@/core/apollo/generated/graphql-schema'; +import UserAdminSettingsPage from '../tabs/UserAdminSettingsPage'; + +export const UserAdminRoute = () => { + const { isFeatureEnabled } = useConfig(); + + return ( + + }> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + {isFeatureEnabled(PlatformFeatureFlagName.Ssi) && ( + } /> + )} + } /> + + + ); +}; + +export default UserAdminRoute; diff --git a/src/domain/community/user/pages/UserAccountPage.tsx b/src/domain/community/userAdmin/tabs/UserAdminAccountPage.tsx similarity index 76% rename from src/domain/community/user/pages/UserAccountPage.tsx rename to src/domain/community/userAdmin/tabs/UserAdminAccountPage.tsx index f9c86af722..488f99a1e9 100644 --- a/src/domain/community/user/pages/UserAccountPage.tsx +++ b/src/domain/community/userAdmin/tabs/UserAdminAccountPage.tsx @@ -1,10 +1,10 @@ import { useAccountInformationQuery, useUserAccountQuery } from '@/core/apollo/generated/apollo-hooks'; -import UserSettingsLayout from '@/domain/platform/admin/user/layout/UserSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import UserAdminLayout from '@/domain/community/userAdmin/layout/UserAdminLayout'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { useUrlParams } from '@/core/routing/useUrlParams'; import ContributorAccountView from '@/domain/community/contributor/Account/ContributorAccountView'; -export const UserAccountPage = () => { +export const UserAdminAccountPage = () => { const { userNameId = '' } = useUrlParams(); const { data: userData, loading: loadingUser } = useUserAccountQuery({ @@ -22,14 +22,14 @@ export const UserAccountPage = () => { }); return ( - + - + ); }; -export default UserAccountPage; +export default UserAdminAccountPage; diff --git a/src/domain/community/user/pages/UserCredentialsPage.tsx b/src/domain/community/userAdmin/tabs/UserAdminCredentialsPage.tsx similarity index 95% rename from src/domain/community/user/pages/UserCredentialsPage.tsx rename to src/domain/community/userAdmin/tabs/UserAdminCredentialsPage.tsx index 86f8a65bcc..a171aa3ecf 100644 --- a/src/domain/community/user/pages/UserCredentialsPage.tsx +++ b/src/domain/community/userAdmin/tabs/UserAdminCredentialsPage.tsx @@ -12,14 +12,14 @@ import Loading from '@/core/ui/loading/Loading'; import UserCredentialsContainer from '@/domain/agent/credential/verifiedCredentials/UserCredentialsContainer'; import { useNotification } from '@/core/ui/notifications/useNotification'; import { useProfileVerifiedCredentialSubscription, useUserSsiLazyQuery } from '@/core/apollo/generated/apollo-hooks'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; -import UserSettingsLayout from '@/domain/platform/admin/user/layout/UserSettingsLayout'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import UserAdminLayout from '@/domain/community/userAdmin/layout/UserAdminLayout'; import DashboardGenericSection from '@/domain/shared/components/DashboardSections/DashboardGenericSection'; import { CardLayoutContainer, CardLayoutItem } from '@/core/ui/card/cardsLayout/CardsLayout'; -import { useUserContext } from '../hooks/useUserContext'; -import useUserContributions from '../userContributions/useUserContributions'; +import { useUserContext } from '../../user/hooks/useUserContext'; +import useUserContributions from '../../user/userContributions/useUserContributions'; -export const UserCredentialsPage = () => { +export const UserAdminCredentialsPage = () => { const { t } = useTranslation(); const notify = useNotification(); @@ -48,7 +48,7 @@ export const UserCredentialsPage = () => { } return ( - + {({ verifiedCredentials, credentialMetadata }, state, actions) => ( @@ -200,8 +200,8 @@ export const UserCredentialsPage = () => { )} - + ); }; -export default UserCredentialsPage; +export default UserAdminCredentialsPage; diff --git a/src/domain/community/user/pages/UserMembershipPage.tsx b/src/domain/community/userAdmin/tabs/UserAdminMembershipPage.tsx similarity index 89% rename from src/domain/community/user/pages/UserMembershipPage.tsx rename to src/domain/community/userAdmin/tabs/UserAdminMembershipPage.tsx index 199f9df8bf..36ec89036f 100644 --- a/src/domain/community/user/pages/UserMembershipPage.tsx +++ b/src/domain/community/userAdmin/tabs/UserAdminMembershipPage.tsx @@ -3,16 +3,16 @@ import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { useUrlParams } from '@/core/routing/useUrlParams'; import { ContributionsView } from '@/domain/community/profile/views/ProfileView'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; -import UserSettingsLayout from '@/domain/platform/admin/user/layout/UserSettingsLayout'; -import { useUserMetadata } from '../hooks/useUserMetadata'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import UserAdminLayout from '@/domain/community/userAdmin/layout/UserAdminLayout'; +import { useUserMetadata } from '../../user/hooks/useUserMetadata'; import GridProvider from '@/core/ui/grid/GridProvider'; import SectionSpacer from '@/domain/shared/components/Section/SectionSpacer'; import { SpaceHostedItem } from '@/domain/journey/utils/SpaceHostedItem'; import { CommunityContributorType, SpaceLevel } from '@/core/apollo/generated/graphql-schema'; import { useUserContributionsQuery, useUserPendingMembershipsQuery } from '@/core/apollo/generated/apollo-hooks'; -const UserMembershipPage = () => { +const UserAdminMembershipPage = () => { const { t } = useTranslation(); const { userNameId = '' } = useUrlParams(); const { user: userMetadata } = useUserMetadata(userNameId); @@ -68,7 +68,7 @@ const UserMembershipPage = () => { }, [userMetadata, pendingMembershipsData]); return ( - + { /> - + ); }; -export default UserMembershipPage; +export default UserAdminMembershipPage; diff --git a/src/domain/community/userAdmin/tabs/UserAdminNotificationsPage.tsx b/src/domain/community/userAdmin/tabs/UserAdminNotificationsPage.tsx new file mode 100644 index 0000000000..ff5d4c3857 --- /dev/null +++ b/src/domain/community/userAdmin/tabs/UserAdminNotificationsPage.tsx @@ -0,0 +1,16 @@ +import UserNotificationsContainer from '../../user/containers/UserNotificationsContainer'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import UserAdminLayout from '@/domain/community/userAdmin/layout/UserAdminLayout'; +import UserNotificationsPageView from '../views/UserAdminNotificationsPageView'; + +const UserAdminNotificationsPage = () => ( + + + {(entities, state, actions) => ( + + )} + + +); + +export default UserAdminNotificationsPage; diff --git a/src/domain/community/user/pages/UserOrganizationsPage.tsx b/src/domain/community/userAdmin/tabs/UserAdminOrganizationsPage.tsx similarity index 73% rename from src/domain/community/user/pages/UserOrganizationsPage.tsx rename to src/domain/community/userAdmin/tabs/UserAdminOrganizationsPage.tsx index 6e0e15c830..4d5b24a264 100644 --- a/src/domain/community/user/pages/UserOrganizationsPage.tsx +++ b/src/domain/community/userAdmin/tabs/UserAdminOrganizationsPage.tsx @@ -1,21 +1,21 @@ import { Grid } from '@mui/material'; import { useTranslation } from 'react-i18next'; import { useUrlParams } from '@/core/routing/useUrlParams'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; -import UserSettingsLayout from '@/domain/platform/admin/user/layout/UserSettingsLayout'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import UserAdminLayout from '@/domain/community/userAdmin/layout/UserAdminLayout'; import AssociatedOrganizationsLazilyFetched from '@/domain/community/contributor/organization/AssociatedOrganizations/AssociatedOrganizationsLazilyFetched'; -import { useUserMetadata } from '../hooks/useUserMetadata'; +import { useUserMetadata } from '../../user/hooks/useUserMetadata'; import { AuthorizationPrivilege } from '@/core/apollo/generated/graphql-schema'; -import useUserOrganizationIds from '../userContributions/useUserOrganizationIds'; +import useUserOrganizationIds from '../../user/userContributions/useUserOrganizationIds'; -const UserOrganizationsPage = () => { +const UserAdminOrganizationsPage = () => { const { t } = useTranslation(); const { userNameId = '' } = useUrlParams(); const { user: userMetadata, loading } = useUserMetadata(userNameId); const organizationIds = useUserOrganizationIds(userMetadata?.user.id); return ( - + { /> - + ); }; -export default UserOrganizationsPage; +export default UserAdminOrganizationsPage; diff --git a/src/domain/community/user/pages/UserProfilePage.tsx b/src/domain/community/userAdmin/tabs/UserAdminProfilePage.tsx similarity index 84% rename from src/domain/community/user/pages/UserProfilePage.tsx rename to src/domain/community/userAdmin/tabs/UserAdminProfilePage.tsx index aa700686e1..5d589896dd 100644 --- a/src/domain/community/user/pages/UserProfilePage.tsx +++ b/src/domain/community/userAdmin/tabs/UserAdminProfilePage.tsx @@ -1,9 +1,9 @@ import { useMemo } from 'react'; import useNavigate from '@/core/routing/useNavigate'; -import { UserForm } from '../userForm/UserForm'; +import { UserForm } from '../../user/userForm/UserForm'; import Loading from '@/core/ui/loading/Loading'; import { useUrlParams } from '@/core/routing/useUrlParams'; -import { useUserContext } from '../hooks/useUserContext'; +import { useUserContext } from '../../user/hooks/useUserContext'; import { useNotification } from '@/core/ui/notifications/useNotification'; import { useCreateTagsetOnProfileMutation, @@ -11,16 +11,16 @@ import { useUserQuery, } from '@/core/apollo/generated/apollo-hooks'; import { EditMode } from '@/core/ui/forms/editMode'; -import { UserModel } from '../models/User'; +import { UserModel } from '../../user/models/User'; import { buildUserProfileUrl } from '@/main/routing/urlBuilders'; -import { getUpdateUserInput } from '../utils/getUpdateUserInput'; +import { getUpdateUserInput } from '../../user/utils/getUpdateUserInput'; import { StorageConfigContextProvider } from '@/domain/storage/StorageBucket/StorageConfigContext'; import PageContentColumn from '@/core/ui/content/PageContentColumn'; import PageContentBlock from '@/core/ui/content/PageContentBlock'; -import UserSettingsLayout from '@/domain/platform/admin/user/layout/UserSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import UserAdminLayout from '@/domain/community/userAdmin/layout/UserAdminLayout'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; -export const UserProfilePage = () => { +export const UserAdminProfilePage = () => { const navigate = useNavigate(); const { userNameId = '' } = useUrlParams(); @@ -85,7 +85,7 @@ export const UserProfilePage = () => { return ( - + { /> - + ); }; -export default UserProfilePage; +export default UserAdminProfilePage; diff --git a/src/domain/community/userAdmin/tabs/UserAdminSettingsPage.tsx b/src/domain/community/userAdmin/tabs/UserAdminSettingsPage.tsx new file mode 100644 index 0000000000..c344d0f4c3 --- /dev/null +++ b/src/domain/community/userAdmin/tabs/UserAdminSettingsPage.tsx @@ -0,0 +1,11 @@ +import UserAdminLayout from '@/domain/community/userAdmin/layout/UserAdminLayout'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import UserAdminSettingsView from '../views/UserAdminSettingsView'; + +export const UserAdminSettingsPage = () => ( + + + +); + +export default UserAdminSettingsPage; diff --git a/src/domain/community/user/views/UserNotificationsPageView.tsx b/src/domain/community/userAdmin/views/UserAdminNotificationsPageView.tsx similarity index 90% rename from src/domain/community/user/views/UserNotificationsPageView.tsx rename to src/domain/community/userAdmin/views/UserAdminNotificationsPageView.tsx index 1b06b2e099..bd6ce010f7 100644 --- a/src/domain/community/user/views/UserNotificationsPageView.tsx +++ b/src/domain/community/userAdmin/views/UserAdminNotificationsPageView.tsx @@ -1,8 +1,8 @@ import { Grid, Box } from '@mui/material'; import { useTranslation } from 'react-i18next'; -import { AuthorizationPrivilege, Preference, UserPreferenceType } from '@/core/apollo/generated/graphql-schema'; +import { AuthorizationPrivilege, Preference, PreferenceType } from '@/core/apollo/generated/graphql-schema'; import { ViewProps } from '@/core/container/view'; -import { useUserContext } from '../hooks/useUserContext'; +import { useUserContext } from '../../user/hooks/useUserContext'; import PreferenceSection from '@/main/ui/settings/PreferenceSection'; import { gutters } from '@/core/ui/grid/utils'; import { GUTTER_MUI } from '@/core/ui/grid/constants'; @@ -16,7 +16,7 @@ export interface UserNotificationsPageViewState { } export interface UserNotificationsPageViewActions { - updatePreference: (type: UserPreferenceType, checked: boolean, id: string) => void; + updatePreference: (type: PreferenceType, checked: boolean, id: string) => void; } export interface UserNotificationsPageViewProps @@ -53,14 +53,14 @@ const UserNotificationsPageView = ({ entities, actions, state }: UserNotificatio subHeaderText={t('pages.user-notifications-settings.general.subtitle')} preferences={generalGroup} loading={loading} - onUpdate={(id, type, value) => updatePreference(type as UserPreferenceType, value, id)} + onUpdate={(id, type, value) => updatePreference(type as PreferenceType, value, id)} /> updatePreference(type as UserPreferenceType, value, id)} + onUpdate={(id, type, value) => updatePreference(type as PreferenceType, value, id)} /> {orgCommunicationGroup && ( updatePreference(type as UserPreferenceType, value, id)} + onUpdate={(id, type, value) => updatePreference(type as PreferenceType, value, id)} /> )} @@ -80,7 +80,7 @@ const UserNotificationsPageView = ({ entities, actions, state }: UserNotificatio subHeaderText={t('pages.user-notifications-settings.forum.subtitle')} preferences={forumGroup} loading={loading} - onUpdate={(id, type, value) => updatePreference(type as UserPreferenceType, value, id)} + onUpdate={(id, type, value) => updatePreference(type as PreferenceType, value, id)} /> {!!(adminGroup.length || communityGroup.length) && ( <> @@ -90,7 +90,7 @@ const UserNotificationsPageView = ({ entities, actions, state }: UserNotificatio subHeaderText={t('pages.user-notifications-settings.user-administration.subtitle')} preferences={adminGroup} loading={loading} - onUpdate={(id, type, value) => updatePreference(type as UserPreferenceType, value, id)} + onUpdate={(id, type, value) => updatePreference(type as PreferenceType, value, id)} /> )} {communityGroup.length > 0 && ( @@ -99,7 +99,7 @@ const UserNotificationsPageView = ({ entities, actions, state }: UserNotificatio subHeaderText={t('pages.user-notifications-settings.community-administration.subtitle')} preferences={communityGroup} loading={loading} - onUpdate={(id, type, value) => updatePreference(type as UserPreferenceType, value, id)} + onUpdate={(id, type, value) => updatePreference(type as PreferenceType, value, id)} /> )} diff --git a/src/domain/community/userAdmin/views/UserAdminSettingsView.tsx b/src/domain/community/userAdmin/views/UserAdminSettingsView.tsx new file mode 100644 index 0000000000..bd344e0ed9 --- /dev/null +++ b/src/domain/community/userAdmin/views/UserAdminSettingsView.tsx @@ -0,0 +1,102 @@ +import { useMemo } from 'react'; +import Loading from '@/core/ui/loading/Loading'; +import { Trans, useTranslation } from 'react-i18next'; +import { useUserSettingsQuery, useUpdateUserSettingsMutation } from '@/core/apollo/generated/apollo-hooks'; +import PageContent from '@/core/ui/content/PageContent'; +import PageContentBlock from '@/core/ui/content/PageContentBlock'; +import { BlockTitle } from '@/core/ui/typography/components'; +import SwitchSettingsGroup from '@/core/ui/forms/SettingsGroups/SwitchSettingsGroup'; +import { useUrlParams } from '@/core/routing/useUrlParams'; +import { useUserMetadata } from '@/domain/community/user/hooks/useUserMetadata'; + +const defaultUserSettings = { + privacy: { + contributionRolePubliclyVisible: true, + }, + communication: { + allowOtherUsersToSendMessages: true, + }, +}; + +export const UserAdminSettingsView = () => { + const { userNameId = '' } = useUrlParams(); + const { user: userMetadata, loading: isLoadingUser } = useUserMetadata(userNameId); + + const { t } = useTranslation(); + const userID = userMetadata?.user.id ?? ''; + + const { data, loading } = useUserSettingsQuery({ + variables: { userID }, + skip: isLoadingUser || !userID, + }); + + const [updateUserSettings] = useUpdateUserSettingsMutation(); + + const currentSettings = useMemo(() => { + const settings = data?.lookup.user?.settings; + + return { + ...settings, + }; + }, [data, userID]); + + if (loading) { + return ; + } + + const handleUpdateSettings = async ({ + allowOtherUsersToSendMessages = currentSettings?.communication?.allowOtherUsersToSendMessages || + defaultUserSettings.communication.allowOtherUsersToSendMessages, + contributionRolesPubliclyVisible = currentSettings?.privacy?.contributionRolesPubliclyVisible || + defaultUserSettings.privacy.contributionRolePubliclyVisible, + }: { + allowOtherUsersToSendMessages?: boolean; + contributionRolesPubliclyVisible?: boolean; + }) => { + const settingsVariable = { + privacy: { + contributionRolesPubliclyVisible, + }, + communication: { + allowOtherUsersToSendMessages, + }, + }; + + await updateUserSettings({ + variables: { + settingsData: { + userID, + settings: settingsVariable, + }, + }, + }); + }; + + return ( + + {!loading && ( + <> + + {t('pages.admin.user.settings.title')} + }} + /> + ), + }, + }} + onChange={(setting, newValue) => handleUpdateSettings({ [setting]: newValue })} + /> + + + )} + + ); +}; + +export default UserAdminSettingsView; diff --git a/src/domain/community/virtualContributor/VCRoute.tsx b/src/domain/community/virtualContributor/VCRoute.tsx index 4c98ea4808..3c47bb0913 100644 --- a/src/domain/community/virtualContributor/VCRoute.tsx +++ b/src/domain/community/virtualContributor/VCRoute.tsx @@ -3,7 +3,7 @@ import VCProfilePage from './vcProfilePage/VCProfilePage'; import { PageLayoutHolderWithOutlet } from '@/domain/journey/common/EntityPageLayout'; import TopLevelLayout from '@/main/ui/layout/TopLevelLayout'; import { Error404 } from '@/core/pages/Errors/Error404'; -import VCSettingsRoute from './VCSettingsRoute'; +import VCSettingsRoute from '../virtualContributorAdmin/VCSettingsRoute'; import { nameOfUrl } from '@/main/routing/urlParams'; export const VCRoute = () => ( diff --git a/src/domain/community/virtualContributor/vcMembershipPage/VCMembershipPage.tsx b/src/domain/community/virtualContributor/vcMembershipPage/VCMembershipPage.tsx index f0ffeb5c7f..03a87b5d3b 100644 --- a/src/domain/community/virtualContributor/vcMembershipPage/VCMembershipPage.tsx +++ b/src/domain/community/virtualContributor/vcMembershipPage/VCMembershipPage.tsx @@ -2,8 +2,8 @@ import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { useUrlParams } from '@/core/routing/useUrlParams'; import { ContributionsView } from '@/domain/community/profile/views/ProfileView'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; -import VCSettingsPageLayout from '../layout/VCSettingsPageLayout'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import VCSettingsPageLayout from '../../virtualContributorAdmin/layout/VCSettingsPageLayout'; import { SpaceHostedItem } from '@/domain/journey/utils/SpaceHostedItem'; import { AuthorizationPrivilege, CommunityContributorType, SpaceLevel } from '@/core/apollo/generated/graphql-schema'; import { useVcMembershipsQuery } from '@/core/apollo/generated/apollo-hooks'; diff --git a/src/domain/community/virtualContributor/VCAccessibilitySettings/VCAccessibilitySettingsPage.tsx b/src/domain/community/virtualContributorAdmin/VCAccessibilitySettings/VCAccessibilitySettingsPage.tsx similarity index 99% rename from src/domain/community/virtualContributor/VCAccessibilitySettings/VCAccessibilitySettingsPage.tsx rename to src/domain/community/virtualContributorAdmin/VCAccessibilitySettings/VCAccessibilitySettingsPage.tsx index 69bd206ca2..00ef3dcdcc 100644 --- a/src/domain/community/virtualContributor/VCAccessibilitySettings/VCAccessibilitySettingsPage.tsx +++ b/src/domain/community/virtualContributorAdmin/VCAccessibilitySettings/VCAccessibilitySettingsPage.tsx @@ -9,7 +9,7 @@ import PageContentBlock from '@/core/ui/content/PageContentBlock'; import PageContent from '@/core/ui/content/PageContent'; import { StorageConfigContextProvider } from '@/domain/storage/StorageBucket/StorageConfigContext'; import { Trans, useTranslation } from 'react-i18next'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import VCSettingsPageLayout from '../layout/VCSettingsPageLayout'; import SwitchSettingsGroup from '@/core/ui/forms/SettingsGroups/SwitchSettingsGroup'; import { useNotification } from '@/core/ui/notifications/useNotification'; diff --git a/src/domain/community/virtualContributor/VCSettingsRoute.tsx b/src/domain/community/virtualContributorAdmin/VCSettingsRoute.tsx similarity index 90% rename from src/domain/community/virtualContributor/VCSettingsRoute.tsx rename to src/domain/community/virtualContributorAdmin/VCSettingsRoute.tsx index 16eb517099..68163b75f6 100644 --- a/src/domain/community/virtualContributor/VCSettingsRoute.tsx +++ b/src/domain/community/virtualContributorAdmin/VCSettingsRoute.tsx @@ -2,7 +2,7 @@ import { Navigate, Route, Routes } from 'react-router-dom'; import { Error404 } from '@/core/pages/Errors/Error404'; import { PageLayoutHolderWithOutlet } from '@/domain/journey/common/EntityPageLayout'; import VCEditProfilePage from './vcSettingsPage/VCEditProfilePage'; -import VCMembershipPage from './vcMembershipPage/VCMembershipPage'; +import VCMembershipPage from '../virtualContributor/vcMembershipPage/VCMembershipPage'; import VCAccessibilitySettingsPage from './VCAccessibilitySettings/VCAccessibilitySettingsPage'; const VCSettingsRoute = () => ( diff --git a/src/domain/community/virtualContributorAdmin/VcAdminTabs.ts b/src/domain/community/virtualContributorAdmin/VcAdminTabs.ts new file mode 100644 index 0000000000..6ca5b98084 --- /dev/null +++ b/src/domain/community/virtualContributorAdmin/VcAdminTabs.ts @@ -0,0 +1,23 @@ +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import { TabDefinition } from '@/domain/platform/admin/layout/EntitySettingsLayout/EntitySettingsTabs'; +import ContentPasteOutlinedIcon from '@mui/icons-material/ContentPasteOutlined'; +import SettingsOutlinedIcon from '@mui/icons-material/SettingsOutlined'; +import PeopleOutlinedIcon from '@mui/icons-material/PeopleOutlined'; + +export const VCProfileTabs: TabDefinition[] = [ + { + section: SettingsSection.Membership, + route: 'membership', + icon: ContentPasteOutlinedIcon, + }, + { + section: SettingsSection.MyProfile, + route: 'profile', + icon: PeopleOutlinedIcon, + }, + { + section: SettingsSection.Settings, + route: 'settings', + icon: SettingsOutlinedIcon, + }, +]; diff --git a/src/domain/community/virtualContributor/layout/VCSettingsPageLayout.tsx b/src/domain/community/virtualContributorAdmin/layout/VCSettingsPageLayout.tsx similarity index 91% rename from src/domain/community/virtualContributor/layout/VCSettingsPageLayout.tsx rename to src/domain/community/virtualContributorAdmin/layout/VCSettingsPageLayout.tsx index 7df8a0450a..c263a59c66 100644 --- a/src/domain/community/virtualContributor/layout/VCSettingsPageLayout.tsx +++ b/src/domain/community/virtualContributorAdmin/layout/VCSettingsPageLayout.tsx @@ -5,12 +5,13 @@ import { useUrlParams } from '@/core/routing/useUrlParams'; import BreadcrumbsItem from '@/core/ui/navigation/BreadcrumbsItem'; import GroupOutlinedIcon from '@mui/icons-material/GroupOutlined'; import { useTranslation } from 'react-i18next'; -import VCPageBanner from './VCPageBanner'; +import VCPageBanner from '../../virtualContributor/layout/VCPageBanner'; import { useVirtualContributorQuery } from '@/core/apollo/generated/apollo-hooks'; -import { SettingsSection, VCProfileTabs } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import EntitySettingsLayout from '@/domain/platform/admin/layout/EntitySettingsLayout/EntitySettingsLayout'; import useRestrictedRedirect from '@/core/routing/useRestrictedRedirect'; import { AuthorizationPrivilege } from '@/core/apollo/generated/graphql-schema'; +import { VCProfileTabs } from '../VcAdminTabs'; type VCPageLayoutProps = { currentTab: SettingsSection; diff --git a/src/domain/community/virtualContributor/vcSettingsPage/VCEditProfilePage.tsx b/src/domain/community/virtualContributorAdmin/vcSettingsPage/VCEditProfilePage.tsx similarity index 98% rename from src/domain/community/virtualContributor/vcSettingsPage/VCEditProfilePage.tsx rename to src/domain/community/virtualContributorAdmin/vcSettingsPage/VCEditProfilePage.tsx index 145fac60e3..cdfe815ae7 100644 --- a/src/domain/community/virtualContributor/vcSettingsPage/VCEditProfilePage.tsx +++ b/src/domain/community/virtualContributorAdmin/vcSettingsPage/VCEditProfilePage.tsx @@ -12,9 +12,9 @@ import PageContent from '@/core/ui/content/PageContent'; import { useNotification } from '@/core/ui/notifications/useNotification'; import { StorageConfigContextProvider } from '@/domain/storage/StorageBucket/StorageConfigContext'; import { useTranslation } from 'react-i18next'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; -import VCSettingsPageLayout from '../layout/VCSettingsPageLayout'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { AiPersonaBodyOfKnowledgeType } from '@/core/apollo/generated/graphql-schema'; +import VCSettingsPageLayout from '../layout/VCSettingsPageLayout'; export const VCSettingsPage = () => { const { t } = useTranslation(); diff --git a/src/domain/community/virtualContributor/vcSettingsPage/VirtualContributorForm.tsx b/src/domain/community/virtualContributorAdmin/vcSettingsPage/VirtualContributorForm.tsx similarity index 98% rename from src/domain/community/virtualContributor/vcSettingsPage/VirtualContributorForm.tsx rename to src/domain/community/virtualContributorAdmin/vcSettingsPage/VirtualContributorForm.tsx index 9fb1540305..9144dec9ab 100644 --- a/src/domain/community/virtualContributor/vcSettingsPage/VirtualContributorForm.tsx +++ b/src/domain/community/virtualContributorAdmin/vcSettingsPage/VirtualContributorForm.tsx @@ -18,7 +18,7 @@ import { theme } from '@/core/ui/themes/default/Theme'; import GridContainer from '@/core/ui/grid/GridContainer'; import GridProvider from '@/core/ui/grid/GridProvider'; import GridItem from '@/core/ui/grid/GridItem'; -import { BasicSpaceProps } from '../components/BasicSpaceCard'; +import { BasicSpaceProps } from '../../virtualContributor/components/BasicSpaceCard'; import { useColumns } from '@/core/ui/grid/GridContext'; import { useBackToStaticPath } from '@/core/routing/useBackToPath'; import { KEYWORDS_TAGSET } from '@/domain/common/tags/tagset.constants'; diff --git a/src/domain/context/ContextForm/index.tsx b/src/domain/context/ContextForm/index.tsx index 816897ebe4..fdef55507f 100644 --- a/src/domain/context/ContextForm/index.tsx +++ b/src/domain/context/ContextForm/index.tsx @@ -12,7 +12,7 @@ export interface ContextFormValues { } type ContextFormProps = { - context?: Context; + context?: Omit; profile?: Omit; onSubmit: (formData: ContextFormValues) => void; wireSubmit: (setter: () => void) => void; diff --git a/src/domain/journey/opportunity/pages/AdminOpportunityCommunityPage.tsx b/src/domain/journey/opportunity/pages/AdminOpportunityCommunityPage.tsx index f99cbbd075..be15de5368 100644 --- a/src/domain/journey/opportunity/pages/AdminOpportunityCommunityPage.tsx +++ b/src/domain/journey/opportunity/pages/AdminOpportunityCommunityPage.tsx @@ -5,7 +5,7 @@ import PageContentColumn from '@/core/ui/content/PageContentColumn'; import CommunityOrganizations from '@/domain/community/community/CommunityAdmin/CommunityOrganizations'; import CommunityUsers from '@/domain/community/community/CommunityAdmin/CommunityUsers'; import useRoleSetAdmin from '@/domain/community/community/CommunityAdmin/useCommunityAdmin'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import { useOpportunity } from '../hooks/useOpportunity'; import SubspaceSettingsLayout from '@/domain/platform/admin/subspace/SubspaceSettingsLayout'; diff --git a/src/domain/journey/space/pages/AdminSpaceCommunityPage.tsx b/src/domain/journey/space/pages/AdminSpaceCommunityPage.tsx index 7a41c4e7f0..b17d1e040c 100644 --- a/src/domain/journey/space/pages/AdminSpaceCommunityPage.tsx +++ b/src/domain/journey/space/pages/AdminSpaceCommunityPage.tsx @@ -3,7 +3,7 @@ import { Button, Icon, IconButton, Tooltip } from '@mui/material'; import DownloadForOfflineOutlinedIcon from '@mui/icons-material/DownloadForOfflineOutlined'; import InnovationLibraryIcon from '@/main/topLevelPages/InnovationLibraryPage/InnovationLibraryIcon'; import SpaceSettingsLayout from '@/domain/platform/admin/space/SpaceSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import { useSpace } from '../SpaceContext/useSpace'; import PageContent from '@/core/ui/content/PageContent'; diff --git a/src/domain/journey/space/pages/SpaceAccount/SpaceAccountPage.tsx b/src/domain/journey/space/pages/SpaceAccount/SpaceAccountPage.tsx index d7087b5c75..6477d35f31 100644 --- a/src/domain/journey/space/pages/SpaceAccount/SpaceAccountPage.tsx +++ b/src/domain/journey/space/pages/SpaceAccount/SpaceAccountPage.tsx @@ -2,7 +2,7 @@ import React, { FC } from 'react'; import { Skeleton } from '@mui/material'; import { useRouteResolver } from '@/main/routing/resolvers/RouteResolver'; import SpaceSettingsLayout from '@/domain/platform/admin/space/SpaceSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import SpaceAccountView from './SpaceAccountView'; diff --git a/src/domain/journey/space/pages/SpaceCommunication/SpaceCommunicationsPage.tsx b/src/domain/journey/space/pages/SpaceCommunication/SpaceCommunicationsPage.tsx index ffe4c7d658..b4905793f9 100644 --- a/src/domain/journey/space/pages/SpaceCommunication/SpaceCommunicationsPage.tsx +++ b/src/domain/journey/space/pages/SpaceCommunication/SpaceCommunicationsPage.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; import SpaceSettingsLayout from '@/domain/platform/admin/space/SpaceSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import CommunityUpdatesPage from '@/domain/platform/admin/community/CommunityUpdatesPage'; diff --git a/src/domain/journey/space/pages/SpaceContext/SpaceContextPage.tsx b/src/domain/journey/space/pages/SpaceContext/SpaceContextPage.tsx index 58f3923383..57180ecb14 100644 --- a/src/domain/journey/space/pages/SpaceContext/SpaceContextPage.tsx +++ b/src/domain/journey/space/pages/SpaceContext/SpaceContextPage.tsx @@ -1,7 +1,7 @@ import React, { FC } from 'react'; import SpaceContextView from './SpaceContextView'; import SpaceSettingsLayout from '@/domain/platform/admin/space/SpaceSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; const SpaceContextPage: FC = ({ routePrefix = '../' }) => { diff --git a/src/domain/journey/space/pages/SpaceProfile/SpaceProfilePage.tsx b/src/domain/journey/space/pages/SpaceProfile/SpaceProfilePage.tsx index e06148627b..3b496a53c2 100644 --- a/src/domain/journey/space/pages/SpaceProfile/SpaceProfilePage.tsx +++ b/src/domain/journey/space/pages/SpaceProfile/SpaceProfilePage.tsx @@ -1,7 +1,7 @@ import React, { FC } from 'react'; import SpaceProfile from './SpaceProfile'; import SpaceSettingsLayout from '@/domain/platform/admin/space/SpaceSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; const SpaceProfilePage: FC = ({ routePrefix = '../' }) => { diff --git a/src/domain/journey/space/pages/SpaceSettings/EditVirtualContributorDialog.tsx b/src/domain/journey/space/pages/SpaceSettings/EditVirtualContributorDialog.tsx index 378eab3f93..389f025eef 100644 --- a/src/domain/journey/space/pages/SpaceSettings/EditVirtualContributorDialog.tsx +++ b/src/domain/journey/space/pages/SpaceSettings/EditVirtualContributorDialog.tsx @@ -2,7 +2,7 @@ import { FC } from 'react'; import { useTranslation } from 'react-i18next'; import { DialogContent } from '@mui/material'; import DialogHeader from '@/core/ui/dialog/DialogHeader'; -import VirtualContributorForm from '@/domain/community/virtualContributor/vcSettingsPage/VirtualContributorForm'; +import VirtualContributorForm from '@/domain/community/virtualContributorAdmin/vcSettingsPage/VirtualContributorForm'; import { UpdateVirtualContributorInput, Visual } from '@/core/apollo/generated/graphql-schema'; import DialogWithGrid from '@/core/ui/dialog/DialogWithGrid'; diff --git a/src/domain/journey/space/pages/SpaceSettings/SpaceSettingsPage.tsx b/src/domain/journey/space/pages/SpaceSettings/SpaceSettingsPage.tsx index 1f98d1cb8e..7578569656 100644 --- a/src/domain/journey/space/pages/SpaceSettings/SpaceSettingsPage.tsx +++ b/src/domain/journey/space/pages/SpaceSettings/SpaceSettingsPage.tsx @@ -1,7 +1,7 @@ import React, { FC } from 'react'; import SpaceSettingsView from './SpaceSettingsView'; import SpaceSettingsLayout from '@/domain/platform/admin/space/SpaceSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import { useRouteResolver } from '@/main/routing/resolvers/RouteResolver'; import { Skeleton } from '@mui/material'; diff --git a/src/domain/journey/space/pages/SpaceSettings/SpaceSettingsView.tsx b/src/domain/journey/space/pages/SpaceSettings/SpaceSettingsView.tsx index c2841bc07a..2afb618cdc 100644 --- a/src/domain/journey/space/pages/SpaceSettings/SpaceSettingsView.tsx +++ b/src/domain/journey/space/pages/SpaceSettings/SpaceSettingsView.tsx @@ -28,7 +28,7 @@ import RouterLink from '@/core/ui/link/RouterLink'; import { useNotification } from '@/core/ui/notifications/useNotification'; import { BlockSectionTitle, BlockTitle, Caption, Text } from '@/core/ui/typography'; import CommunityApplicationForm from '@/domain/community/community/CommunityApplicationForm/CommunityApplicationForm'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { Box, Button, CircularProgress } from '@mui/material'; import { JourneyTypeName } from '@/domain/journey/JourneyTypeName'; import PageContentBlockHeader from '@/core/ui/content/PageContentBlockHeader'; diff --git a/src/domain/journey/space/pages/SpaceSubspaces/SubspaceListPage.tsx b/src/domain/journey/space/pages/SpaceSubspaces/SubspaceListPage.tsx index 7562de639b..e008135f16 100644 --- a/src/domain/journey/space/pages/SpaceSubspaces/SubspaceListPage.tsx +++ b/src/domain/journey/space/pages/SpaceSubspaces/SubspaceListPage.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; import SpaceSettingsLayout from '@/domain/platform/admin/space/SpaceSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import SubspaceListView from './SubspaceListView'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; diff --git a/src/domain/journey/space/spaceEditForm/SpaceEditForm.tsx b/src/domain/journey/space/spaceEditForm/SpaceEditForm.tsx index 4e0f452162..3742cf77ba 100644 --- a/src/domain/journey/space/spaceEditForm/SpaceEditForm.tsx +++ b/src/domain/journey/space/spaceEditForm/SpaceEditForm.tsx @@ -23,7 +23,7 @@ import { DEFAULT_TAGSET } from '@/domain/common/tags/tagset.constants'; import { Caption } from '@/core/ui/typography'; interface SpaceEditFormProps { - context?: Context; + context?: Omit; profile?: Omit; name?: string; nameID?: string; diff --git a/src/domain/journey/subspace/pages/AdminSubspaceCommunityPage.tsx b/src/domain/journey/subspace/pages/AdminSubspaceCommunityPage.tsx index bad675e0bf..c2db7db401 100644 --- a/src/domain/journey/subspace/pages/AdminSubspaceCommunityPage.tsx +++ b/src/domain/journey/subspace/pages/AdminSubspaceCommunityPage.tsx @@ -8,7 +8,7 @@ import CommunityApplications from '@/domain/community/community/CommunityAdmin/C import CommunityOrganizations from '@/domain/community/community/CommunityAdmin/CommunityOrganizations'; import CommunityUsers from '@/domain/community/community/CommunityAdmin/CommunityUsers'; import useRoleSetAdmin from '@/domain/community/community/CommunityAdmin/useCommunityAdmin'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import { useSubSpace } from '../hooks/useSubSpace'; import SubspaceSettingsLayout from '@/domain/platform/admin/subspace/SubspaceSettingsLayout'; diff --git a/src/domain/journey/subspace/pages/SubspaceAuthorization/SubspaceAuthorizationPage.tsx b/src/domain/journey/subspace/pages/SubspaceAuthorization/SubspaceAuthorizationPage.tsx index 313bd36e29..4922e48820 100644 --- a/src/domain/journey/subspace/pages/SubspaceAuthorization/SubspaceAuthorizationPage.tsx +++ b/src/domain/journey/subspace/pages/SubspaceAuthorization/SubspaceAuthorizationPage.tsx @@ -1,5 +1,5 @@ import SubspaceSettingsLayout from '@/domain/platform/admin/subspace/SubspaceSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import { Trans, useTranslation } from 'react-i18next'; import { useSubSpace } from '@/domain/journey/subspace/hooks/useSubSpace'; diff --git a/src/domain/journey/subspace/pages/SubspaceCommunications/SubspaceCommunicationsPage.tsx b/src/domain/journey/subspace/pages/SubspaceCommunications/SubspaceCommunicationsPage.tsx index 6297336024..6c196af8aa 100644 --- a/src/domain/journey/subspace/pages/SubspaceCommunications/SubspaceCommunicationsPage.tsx +++ b/src/domain/journey/subspace/pages/SubspaceCommunications/SubspaceCommunicationsPage.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; import SubspaceSettingsLayout from '@/domain/platform/admin/subspace/SubspaceSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import CommunityUpdatesPage, { CommunityUpdatesPageProps, diff --git a/src/domain/journey/subspace/pages/SubspaceContext/SubspaceContextPage.tsx b/src/domain/journey/subspace/pages/SubspaceContext/SubspaceContextPage.tsx index ef2a5a6a9e..861aebdd6d 100644 --- a/src/domain/journey/subspace/pages/SubspaceContext/SubspaceContextPage.tsx +++ b/src/domain/journey/subspace/pages/SubspaceContext/SubspaceContextPage.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import ChallengeContextView from './SubspaceContextView'; import SubspaceSettingsLayout from '@/domain/platform/admin/subspace/SubspaceSettingsLayout'; diff --git a/src/domain/journey/subspace/pages/SubspaceProfile/SubspaceProfilePage.tsx b/src/domain/journey/subspace/pages/SubspaceProfile/SubspaceProfilePage.tsx index a51fa07fea..98e9420084 100644 --- a/src/domain/journey/subspace/pages/SubspaceProfile/SubspaceProfilePage.tsx +++ b/src/domain/journey/subspace/pages/SubspaceProfile/SubspaceProfilePage.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import SubspaceProfileView from './SubspaceProfileView'; import SubspaceSettingsLayout from '@/domain/platform/admin/subspace/SubspaceSettingsLayout'; diff --git a/src/domain/journey/subspace/pages/SubspaceSubspaces/SubspaceSubspacesPage.tsx b/src/domain/journey/subspace/pages/SubspaceSubspaces/SubspaceSubspacesPage.tsx index 6751bf7392..e0f70cdabb 100644 --- a/src/domain/journey/subspace/pages/SubspaceSubspaces/SubspaceSubspacesPage.tsx +++ b/src/domain/journey/subspace/pages/SubspaceSubspaces/SubspaceSubspacesPage.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; import SubspaceSettingsLayout from '@/domain/platform/admin/subspace/SubspaceSettingsLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import OpportunityList from '@/domain/platform/admin/opportunity/pages/OpportunityList'; diff --git a/src/domain/platform/admin/components/Group/EditMembersPage.tsx b/src/domain/platform/admin/components/Group/EditMembersPage.tsx index 6cff390784..4f4407819d 100644 --- a/src/domain/platform/admin/components/Group/EditMembersPage.tsx +++ b/src/domain/platform/admin/components/Group/EditMembersPage.tsx @@ -1,6 +1,6 @@ import { Container } from '@mui/material'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; -import OrganizationAdminLayout from '@/domain/platform/admin/organization/OrganizationAdminLayout'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import OrganizationAdminLayout from '@/domain/community/organizationAdmin/layout/OrganizationAdminLayout'; import { AuthorizationCredential } from '@/core/apollo/generated/graphql-schema'; import EditGroupCredentials from '../Authorization/EditGroupCredentials'; diff --git a/src/domain/platform/admin/components/Group/GroupPage.tsx b/src/domain/platform/admin/components/Group/GroupPage.tsx index 8ec0690858..d629a679e9 100644 --- a/src/domain/platform/admin/components/Group/GroupPage.tsx +++ b/src/domain/platform/admin/components/Group/GroupPage.tsx @@ -10,8 +10,8 @@ import { import { AuthorizationCredential, GroupInfoFragment, User } from '@/core/apollo/generated/graphql-schema'; import GroupForm, { UserGroupUpdateInput } from './GroupForm/GroupForm'; import { getUpdateProfileInput } from '@/domain/community/user/utils/getUpdateUserInput'; -import OrganizationAdminLayout from '@/domain/platform/admin/organization/OrganizationAdminLayout'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import OrganizationAdminLayout from '@/domain/community/organizationAdmin/layout/OrganizationAdminLayout'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; export const GroupPage = ({ group }: { group?: GroupInfoFragment }) => { const { t } = useTranslation(); diff --git a/src/domain/platform/admin/components/Organization/CreateOrganizationGroup.tsx b/src/domain/platform/admin/components/Organization/CreateOrganizationGroup.tsx index 96bba9ed4e..e96ebad367 100644 --- a/src/domain/platform/admin/components/Organization/CreateOrganizationGroup.tsx +++ b/src/domain/platform/admin/components/Organization/CreateOrganizationGroup.tsx @@ -1,7 +1,7 @@ import React, { FC, useCallback } from 'react'; import useNavigate from '@/core/routing/useNavigate'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; -import OrganizationAdminLayout from '@/domain/platform/admin/organization/OrganizationAdminLayout'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; +import OrganizationAdminLayout from '@/domain/community/organizationAdmin/layout/OrganizationAdminLayout'; import { useOrganization } from '@/domain/community/contributor/organization/hooks/useOrganization'; import { GroupDetailsFragmentDoc, useCreateGroupOnOrganizationMutation } from '@/core/apollo/generated/apollo-hooks'; import CreateGroupForm from '../Common/CreateGroupForm'; diff --git a/src/domain/platform/admin/components/Organization/OrganizationForm.tsx b/src/domain/platform/admin/components/Organization/OrganizationForm.tsx index 668401805e..de54f439c9 100644 --- a/src/domain/platform/admin/components/Organization/OrganizationForm.tsx +++ b/src/domain/platform/admin/components/Organization/OrganizationForm.tsx @@ -15,7 +15,7 @@ import { LocationSegment } from '@/domain/common/location/LocationSegment'; import { formatLocation } from '@/domain/common/location/LocationUtils'; import { Tagset, UpdateTagset } from '@/domain/common/profile/Profile'; import { OrganizationInput } from '@/domain/community/contributor/organization/OrganizationInput'; -import { OrgVerificationLifecycleEvents } from '@/domain/community/contributor/organization/adminOrganizations/useAdminGlobalOrganizationsList'; +import { OrgVerificationLifecycleEvents } from '@/domain/platform/admin/organizations/useAdminGlobalOrganizationsList'; import { Button, Grid } from '@mui/material'; import { Form, Formik } from 'formik'; import { FC, useCallback } from 'react'; @@ -72,7 +72,14 @@ const EmptyOrganization: Omit = { size: -1, }, }, - preferences: [], + settings: { + privacy: { + contributionRolesPubliclyVisible: false, + }, + membership: { + allowUsersMatchingDomainToJoin: false, + }, + }, }; interface Props { diff --git a/src/domain/platform/admin/layout/EntitySettingsLayout/EntitySettingsLayout.tsx b/src/domain/platform/admin/layout/EntitySettingsLayout/EntitySettingsLayout.tsx index db5d969630..3b9f7cc05f 100644 --- a/src/domain/platform/admin/layout/EntitySettingsLayout/EntitySettingsLayout.tsx +++ b/src/domain/platform/admin/layout/EntitySettingsLayout/EntitySettingsLayout.tsx @@ -1,5 +1,5 @@ import React, { FC, ReactNode, useCallback } from 'react'; -import { SettingsSection } from './constants'; +import { SettingsSection } from './SettingsSection'; import EntitySettingsTabs, { TabDefinition } from './EntitySettingsTabs'; import { useTranslation } from 'react-i18next'; import { EntityPageSection } from '@/domain/shared/layout/EntityPageSection'; diff --git a/src/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection.ts b/src/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection.ts new file mode 100644 index 0000000000..9504baa9d8 --- /dev/null +++ b/src/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection.ts @@ -0,0 +1,20 @@ +export enum SettingsSection { + Profile = 'profile', + Context = 'context', + Community = 'community', + Communications = 'communications', + Authorization = 'authorization', + Subspaces = 'subspaces', + Subsubspaces = 'subsubspaces', + Templates = 'templates', + Storage = 'storage', + SpaceSettings = 'space-settings', + MyProfile = 'my-profile', + Membership = 'membership', + Organizations = 'organizations', + Notifications = 'notifications', + Credentials = 'credentials', + InnovationFlow = 'innovation-flow', + Account = 'account', + Settings = 'settings', +} diff --git a/src/domain/platform/admin/layout/EntitySettingsLayout/constants.ts b/src/domain/platform/admin/layout/EntitySettingsLayout/constants.ts deleted file mode 100644 index 2edbd88a3f..0000000000 --- a/src/domain/platform/admin/layout/EntitySettingsLayout/constants.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { TabDefinition } from './EntitySettingsTabs'; -import PeopleOutlinedIcon from '@mui/icons-material/PeopleOutlined'; -import ForumOutlinedIcon from '@mui/icons-material/ForumOutlined'; -import ContentPasteOutlinedIcon from '@mui/icons-material/ContentPasteOutlined'; -import NotificationsNoneOutlinedIcon from '@mui/icons-material/NotificationsNoneOutlined'; -import VerifiedUserIcon from '@mui/icons-material/VerifiedUser'; -import { SellOutlined, SettingsOutlined } from '@mui/icons-material'; - -export enum SettingsSection { - Profile = 'profile', - Context = 'context', - Community = 'community', - Communications = 'communications', - Authorization = 'authorization', - Subspaces = 'subspaces', - Subsubspaces = 'subsubspaces', - Templates = 'templates', - Storage = 'storage', - SpaceSettings = 'space-settings', - MyProfile = 'my-profile', - Membership = 'membership', - Organizations = 'organizations', - Notifications = 'notifications', - Credentials = 'credentials', - InnovationFlow = 'innovation-flow', - Account = 'account', - Settings = 'settings', -} - -export const UserProfileTabs: TabDefinition[] = [ - { - section: SettingsSection.Membership, - route: 'membership', - icon: ContentPasteOutlinedIcon, - }, - { - section: SettingsSection.MyProfile, - route: 'profile', - icon: PeopleOutlinedIcon, - }, - { - section: SettingsSection.Account, - route: 'account', - icon: SellOutlined, - }, - { - section: SettingsSection.Organizations, - route: 'organizations', - icon: ForumOutlinedIcon, - }, - { - section: SettingsSection.Notifications, - route: 'notifications', - icon: NotificationsNoneOutlinedIcon, - }, - { - section: SettingsSection.Credentials, - route: 'credentials', - icon: VerifiedUserIcon, - }, -]; - -export const VCProfileTabs: TabDefinition[] = [ - { - section: SettingsSection.Membership, - route: 'membership', - icon: ContentPasteOutlinedIcon, - }, - { - section: SettingsSection.MyProfile, - route: 'profile', - icon: PeopleOutlinedIcon, - }, - { - section: SettingsSection.Settings, - route: 'settings', - icon: SettingsOutlined, - }, -]; diff --git a/src/domain/platform/admin/opportunity/pages/OpportunityCommunications/OpportunityCommunicationsPage.tsx b/src/domain/platform/admin/opportunity/pages/OpportunityCommunications/OpportunityCommunicationsPage.tsx index c6e2b936e1..1bb7e8e360 100644 --- a/src/domain/platform/admin/opportunity/pages/OpportunityCommunications/OpportunityCommunicationsPage.tsx +++ b/src/domain/platform/admin/opportunity/pages/OpportunityCommunications/OpportunityCommunicationsPage.tsx @@ -2,7 +2,7 @@ import { PropsWithChildren } from 'react'; import CommunityUpdatesPage, { CommunityUpdatesPageProps, } from '@/domain/platform/admin/community/CommunityUpdatesPage'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import SubspaceSettingsLayout from '@/domain/platform/admin/subspace/SubspaceSettingsLayout'; diff --git a/src/domain/platform/admin/opportunity/pages/OpportunityContext/OpportunityContextPage.tsx b/src/domain/platform/admin/opportunity/pages/OpportunityContext/OpportunityContextPage.tsx index 41ff6c67a6..cdb4ab614c 100644 --- a/src/domain/platform/admin/opportunity/pages/OpportunityContext/OpportunityContextPage.tsx +++ b/src/domain/platform/admin/opportunity/pages/OpportunityContext/OpportunityContextPage.tsx @@ -1,4 +1,4 @@ -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import SubspaceSettingsLayout from '@/domain/platform/admin/subspace/SubspaceSettingsLayout'; import OpportunityContextView from './OpportunityContextView'; diff --git a/src/domain/platform/admin/opportunity/pages/OpportunityProfile/OpportunityProfilePage.tsx b/src/domain/platform/admin/opportunity/pages/OpportunityProfile/OpportunityProfilePage.tsx index 34be9e3555..d42a466916 100644 --- a/src/domain/platform/admin/opportunity/pages/OpportunityProfile/OpportunityProfilePage.tsx +++ b/src/domain/platform/admin/opportunity/pages/OpportunityProfile/OpportunityProfilePage.tsx @@ -1,4 +1,4 @@ -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import SubspaceSettingsLayout from '@/domain/platform/admin/subspace/SubspaceSettingsLayout'; import SubspaceProfileView from '@/domain/journey/subspace/pages/SubspaceProfile/SubspaceProfileView'; diff --git a/src/domain/platform/admin/opportunity/pages/OpportunitySettings/OpportunitySettingsPage.tsx b/src/domain/platform/admin/opportunity/pages/OpportunitySettings/OpportunitySettingsPage.tsx index a79e5c9cb5..d8970ee98d 100644 --- a/src/domain/platform/admin/opportunity/pages/OpportunitySettings/OpportunitySettingsPage.tsx +++ b/src/domain/platform/admin/opportunity/pages/OpportunitySettings/OpportunitySettingsPage.tsx @@ -1,4 +1,4 @@ -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import SubspaceSettingsLayout from '@/domain/platform/admin/subspace/SubspaceSettingsLayout'; import OpportunitySettingsView from './OpportunitySettingsView'; diff --git a/src/domain/platform/admin/organization/OrganizationAuthorizationPage.tsx b/src/domain/platform/admin/organization/OrganizationAuthorizationPage.tsx deleted file mode 100644 index 29b503e275..0000000000 --- a/src/domain/platform/admin/organization/OrganizationAuthorizationPage.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import OrganizationAdminLayout from './OrganizationAdminLayout'; -import { SettingsSection } from '../layout/EntitySettingsLayout/constants'; -import OrganizationAdminAuthorizationView from './views/OrganizationAdminAuthorizationView'; -import OrganizationOwnerAuthorizationView from './views/OrganizationOwnerAuthorizationView'; -import OrganizationAuthorizationPreferencesPageView from './views/OrganizationAuthorizationPreferencesPageView'; -import { SectionSpacer } from '@/domain/shared/components/Section/Section'; - -const OrganizationAuthorizationPage = () => ( - - - - - - - -); - -export default OrganizationAuthorizationPage; diff --git a/src/domain/platform/admin/organization/OrganizationCommunityPage.tsx b/src/domain/platform/admin/organization/OrganizationCommunityPage.tsx deleted file mode 100644 index a89a0fafc8..0000000000 --- a/src/domain/platform/admin/organization/OrganizationCommunityPage.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { FC } from 'react'; -import OrganizationAdminLayout from './OrganizationAdminLayout'; -import { SettingsSection } from '../layout/EntitySettingsLayout/constants'; -import { SettingsPageProps } from '../layout/EntitySettingsLayout/types'; -import { OrganizationGroupsView } from './views/OrganizationGroupsView'; -import OrganizationAssociatesView from './views/OrganizationAssociatesView'; -import { SectionSpacer } from '@/domain/shared/components/Section/Section'; - -const OrganizationCommunityPage: FC = () => ( - - - - - -); - -export default OrganizationCommunityPage; diff --git a/src/domain/platform/admin/organization/OrganizationProfilePage.tsx b/src/domain/platform/admin/organization/OrganizationProfilePage.tsx deleted file mode 100644 index 66b08250cc..0000000000 --- a/src/domain/platform/admin/organization/OrganizationProfilePage.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React, { FC } from 'react'; -import OrganizationAdminLayout from './OrganizationAdminLayout'; -import { SettingsSection } from '../layout/EntitySettingsLayout/constants'; -import OrganizationPage from '../components/Organization/OrganizationPage'; -import { EditMode } from '@/core/ui/forms/editMode'; -import { SettingsPageProps } from '../layout/EntitySettingsLayout/types'; - -const OrganizationProfilePage: FC = () => { - return ( - - - - ); -}; - -export default OrganizationProfilePage; diff --git a/src/domain/platform/admin/organization/index.ts b/src/domain/platform/admin/organization/index.ts deleted file mode 100644 index 76d9b5a779..0000000000 --- a/src/domain/platform/admin/organization/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as AdminOrganizationsRoutes } from './AdminOrganizationsRoutes'; diff --git a/src/domain/platform/admin/organization/views/OrganizationAuthorizationPreferencesPageView.tsx b/src/domain/platform/admin/organization/views/OrganizationAuthorizationPreferencesPageView.tsx deleted file mode 100644 index 67abe84505..0000000000 --- a/src/domain/platform/admin/organization/views/OrganizationAuthorizationPreferencesPageView.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React, { FC } from 'react'; -import { useOrganization } from '@/domain/community/contributor/organization/hooks/useOrganization'; -import OrganizationPreferenceContainer from '@/domain/common/preference/organization/OrganizationPreferenceContainer'; -import OrganizationAuthorizationPreferencesView from '@/domain/community/contributor/organization/views/OrganizationAuthorizationPreferencesView'; -import Loading from '@/core/ui/loading/Loading'; - -const OrganizationAuthorizationPreferencesPageView: FC = () => { - const { organizationId, loading } = useOrganization(); - - if (loading) { - return ; - } - - return ( - - {(entities, state, actions) => { - const authPrefs = entities.preferences.filter(x => x.definition.group === 'AuthorizationOrganization'); - return ( - - ); - }} - - ); -}; - -export default OrganizationAuthorizationPreferencesPageView; diff --git a/src/domain/community/contributor/organization/adminOrganizations/AdminOrganizationsPage.tsx b/src/domain/platform/admin/organizations/AdminOrganizationsPage.tsx similarity index 100% rename from src/domain/community/contributor/organization/adminOrganizations/AdminOrganizationsPage.tsx rename to src/domain/platform/admin/organizations/AdminOrganizationsPage.tsx diff --git a/src/domain/platform/admin/organization/AdminOrganizationsRoutes.tsx b/src/domain/platform/admin/organizations/AdminOrganizationsRoutes.tsx similarity index 89% rename from src/domain/platform/admin/organization/AdminOrganizationsRoutes.tsx rename to src/domain/platform/admin/organizations/AdminOrganizationsRoutes.tsx index 0574dced7f..5d06fc4a51 100644 --- a/src/domain/platform/admin/organization/AdminOrganizationsRoutes.tsx +++ b/src/domain/platform/admin/organizations/AdminOrganizationsRoutes.tsx @@ -3,7 +3,7 @@ import { Route, Routes } from 'react-router-dom'; import OrganizationPage from '../components/Organization/OrganizationPage'; import { EditMode } from '@/core/ui/forms/editMode'; import { Error404 } from '@/core/pages/Errors/Error404'; -import AdminOrganizationsPage from '@/domain/community/contributor/organization/adminOrganizations/AdminOrganizationsPage'; +import AdminOrganizationsPage from '@/domain/platform/admin/organizations/AdminOrganizationsPage'; import { useTranslation } from 'react-i18next'; import AdminLayout from '../layout/toplevel/AdminLayout'; import { AdminSection } from '../layout/toplevel/constants'; diff --git a/src/domain/community/contributor/organization/adminOrganizations/LicensePlanDialog.tsx b/src/domain/platform/admin/organizations/LicensePlanDialog.tsx similarity index 100% rename from src/domain/community/contributor/organization/adminOrganizations/LicensePlanDialog.tsx rename to src/domain/platform/admin/organizations/LicensePlanDialog.tsx diff --git a/src/domain/community/contributor/organization/adminOrganizations/ManageLicensePlanAccount.graphql b/src/domain/platform/admin/organizations/ManageLicensePlanAccount.graphql similarity index 100% rename from src/domain/community/contributor/organization/adminOrganizations/ManageLicensePlanAccount.graphql rename to src/domain/platform/admin/organizations/ManageLicensePlanAccount.graphql diff --git a/src/domain/community/contributor/organization/adminOrganizations/adminGlobalOrganizationsList.graphql b/src/domain/platform/admin/organizations/adminGlobalOrganizationsList.graphql similarity index 100% rename from src/domain/community/contributor/organization/adminOrganizations/adminGlobalOrganizationsList.graphql rename to src/domain/platform/admin/organizations/adminGlobalOrganizationsList.graphql diff --git a/src/domain/community/contributor/organization/adminOrganizations/useAdminGlobalOrganizationsList.ts b/src/domain/platform/admin/organizations/useAdminGlobalOrganizationsList.ts similarity index 100% rename from src/domain/community/contributor/organization/adminOrganizations/useAdminGlobalOrganizationsList.ts rename to src/domain/platform/admin/organizations/useAdminGlobalOrganizationsList.ts diff --git a/src/domain/platform/admin/routing/AdminRoute.tsx b/src/domain/platform/admin/routing/AdminRoute.tsx index a6aba03c0a..958bc94901 100644 --- a/src/domain/platform/admin/routing/AdminRoute.tsx +++ b/src/domain/platform/admin/routing/AdminRoute.tsx @@ -3,8 +3,8 @@ import { useTransactionScope } from '@/core/analytics/SentryTransactionScopeCont import { Error404 } from '@/core/pages/Errors/Error404'; import NonPlatformAdminRedirect from '@/main/admin/NonPlatformAdminRedirect'; import GlobalAuthorizationRoute from './GlobalAuthorizationRoute'; -import { AdminOrganizationsRoutes } from '../organization'; -import { UsersRoute } from '../user/routing/UsersRoute'; +import { AdminOrganizationsRoutes } from '../../../community/organizationAdmin'; +import { UsersRoute } from '../users/routing/UsersRoute'; import { SpacesRoute } from '../space/routing/SpacesRoute'; import NoIdentityRedirect from '@/core/routing/NoIdentityRedirect'; import AdminInnovationPacksRoutes from '@/domain/InnovationPack/admin/AdminInnovationPackRoutes'; diff --git a/src/domain/platform/admin/space/SpaceSettingsLayout.tsx b/src/domain/platform/admin/space/SpaceSettingsLayout.tsx index cc8bbacf8f..3b59ac33fd 100644 --- a/src/domain/platform/admin/space/SpaceSettingsLayout.tsx +++ b/src/domain/platform/admin/space/SpaceSettingsLayout.tsx @@ -1,6 +1,6 @@ import { PropsWithChildren } from 'react'; import { useTranslation } from 'react-i18next'; -import { SettingsSection } from '../layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '../layout/EntitySettingsLayout/SettingsSection'; import { TabDefinition } from '../layout/EntitySettingsLayout/EntitySettingsTabs'; import { useSpace } from '@/domain/journey/space/SpaceContext/useSpace'; import RouterLink from '@/core/ui/link/RouterLink'; diff --git a/src/domain/platform/admin/space/SpaceTemplatesAdminPage.tsx b/src/domain/platform/admin/space/SpaceTemplatesAdminPage.tsx index 8c45ac9285..91892622b3 100644 --- a/src/domain/platform/admin/space/SpaceTemplatesAdminPage.tsx +++ b/src/domain/platform/admin/space/SpaceTemplatesAdminPage.tsx @@ -4,7 +4,7 @@ import { useUrlParams } from '@/core/routing/useUrlParams'; import Loading from '@/core/ui/loading/Loading'; import { buildSettingsUrl } from '@/main/routing/urlBuilders'; import TemplatesAdmin from '@/domain/templates/components/TemplatesAdmin/TemplatesAdmin'; -import { SettingsSection } from '../layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '../layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '../layout/EntitySettingsLayout/types'; import SpaceSettingsLayout from './SpaceSettingsLayout'; import { TemplateType } from '@/core/apollo/generated/graphql-schema'; diff --git a/src/domain/platform/admin/space/storage/SpaceStorageAdminPage.tsx b/src/domain/platform/admin/space/storage/SpaceStorageAdminPage.tsx index 3234648b4e..15df6b2727 100644 --- a/src/domain/platform/admin/space/storage/SpaceStorageAdminPage.tsx +++ b/src/domain/platform/admin/space/storage/SpaceStorageAdminPage.tsx @@ -2,7 +2,7 @@ import { GridColDef, GridRenderCellParams, GridValueGetterParams } from '@mui/x- import { FC, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import PageContentBlock from '@/core/ui/content/PageContentBlock'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; import { SettingsPageProps } from '@/domain/platform/admin/layout/EntitySettingsLayout/types'; import SpaceSettingsLayout from '../SpaceSettingsLayout'; import { Box, BoxProps, CircularProgress, IconButton, Link, LinkProps, Skeleton, useTheme } from '@mui/material'; diff --git a/src/domain/platform/admin/subspace/SubspaceSettingsLayout.tsx b/src/domain/platform/admin/subspace/SubspaceSettingsLayout.tsx index 21f5f02904..e5771b826d 100644 --- a/src/domain/platform/admin/subspace/SubspaceSettingsLayout.tsx +++ b/src/domain/platform/admin/subspace/SubspaceSettingsLayout.tsx @@ -1,6 +1,6 @@ import React, { FC, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; -import { SettingsSection } from '../layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '../layout/EntitySettingsLayout/SettingsSection'; import { TabDefinition } from '../layout/EntitySettingsLayout/EntitySettingsTabs'; import { useSubSpace } from '@/domain/journey/subspace/hooks/useSubSpace'; import RouterLink from '@/core/ui/link/RouterLink'; diff --git a/src/domain/platform/admin/user/pages/UserPage.tsx b/src/domain/platform/admin/users/pages/UserPage.tsx similarity index 100% rename from src/domain/platform/admin/user/pages/UserPage.tsx rename to src/domain/platform/admin/users/pages/UserPage.tsx diff --git a/src/domain/platform/admin/user/routing/UsersRoute.tsx b/src/domain/platform/admin/users/routing/UsersRoute.tsx similarity index 100% rename from src/domain/platform/admin/user/routing/UsersRoute.tsx rename to src/domain/platform/admin/users/routing/UsersRoute.tsx diff --git a/src/domain/community/user/adminUsers/useAdminGlobalUserList.tsx b/src/domain/platform/admin/users/useAdminGlobalUserList.tsx similarity index 97% rename from src/domain/community/user/adminUsers/useAdminGlobalUserList.tsx rename to src/domain/platform/admin/users/useAdminGlobalUserList.tsx index 5e51f79b8d..693a5eb21d 100644 --- a/src/domain/community/user/adminUsers/useAdminGlobalUserList.tsx +++ b/src/domain/platform/admin/users/useAdminGlobalUserList.tsx @@ -19,7 +19,7 @@ import { import { useTranslation } from 'react-i18next'; import clearCacheForQuery from '@/core/apollo/utils/clearCacheForQuery'; import { buildSettingsUrl } from '@/main/routing/urlBuilders'; -import { ContributorLicensePlan } from '@/domain/community/contributor/organization/adminOrganizations/useAdminGlobalOrganizationsList'; +import { ContributorLicensePlan } from '@/domain/platform/admin/organizations/useAdminGlobalOrganizationsList'; type Provided = { loading: boolean; diff --git a/src/domain/community/user/adminUsers/userList.graphql b/src/domain/platform/admin/users/userList.graphql similarity index 100% rename from src/domain/community/user/adminUsers/userList.graphql rename to src/domain/platform/admin/users/userList.graphql diff --git a/src/domain/templates-manager/SelectDefaultCollaborationTemplate/SelectDefaultCollaborationTemplateDialog.tsx b/src/domain/templates-manager/SelectDefaultCollaborationTemplate/SelectDefaultCollaborationTemplateDialog.tsx index edec76686e..72c8569f74 100644 --- a/src/domain/templates-manager/SelectDefaultCollaborationTemplate/SelectDefaultCollaborationTemplateDialog.tsx +++ b/src/domain/templates-manager/SelectDefaultCollaborationTemplate/SelectDefaultCollaborationTemplateDialog.tsx @@ -13,7 +13,7 @@ import Gutters from '@/core/ui/grid/Gutters'; import { Actions } from '@/core/ui/actions/Actions'; import RouterLink from '@/core/ui/link/RouterLink'; import { Caption } from '@/core/ui/typography'; -import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/constants'; +import { SettingsSection } from '@/domain/platform/admin/layout/EntitySettingsLayout/SettingsSection'; interface FormValues { collaborationTemplateSelectedId: string; diff --git a/src/main/admin/authorizationPolicies/AuthorizationPrivilegesForUser.tsx b/src/main/admin/authorizationPolicies/AuthorizationPrivilegesForUser.tsx index b3ea07c1e9..c28127f95f 100644 --- a/src/main/admin/authorizationPolicies/AuthorizationPrivilegesForUser.tsx +++ b/src/main/admin/authorizationPolicies/AuthorizationPrivilegesForUser.tsx @@ -5,7 +5,7 @@ import { Autocomplete, Chip, CircularProgress, TextField } from '@mui/material'; import Loading from '@/core/ui/loading/Loading'; import Gutters from '@/core/ui/grid/Gutters'; import { BlockTitle } from '@/core/ui/typography'; -import useAdminGlobalUserList from '@/domain/community/user/adminUsers/useAdminGlobalUserList'; +import useAdminGlobalUserList from '@/domain/platform/admin/users/useAdminGlobalUserList'; import { SearchableTableItem } from '@/domain/platform/admin/components/SearchableTable'; interface AuthorizationDialogProps { diff --git a/src/main/admin/users/adminUsers/AdminUsersPage.tsx b/src/main/admin/users/adminUsers/AdminUsersPage.tsx index 6d13efc5ab..13b9600ca3 100644 --- a/src/main/admin/users/adminUsers/AdminUsersPage.tsx +++ b/src/main/admin/users/adminUsers/AdminUsersPage.tsx @@ -1,14 +1,14 @@ import React, { FC, useState } from 'react'; import AdminLayout from '@/domain/platform/admin/layout/toplevel/AdminLayout'; import { AdminSection } from '@/domain/platform/admin/layout/toplevel/constants'; -import useAdminGlobalUserList from '@/domain/community/user/adminUsers/useAdminGlobalUserList'; +import useAdminGlobalUserList from '@/domain/platform/admin/users/useAdminGlobalUserList'; import SearchableListLayout from '@/domain/shared/components/SearchableList/SearchableListLayout'; import SimpleSearchableTable, { SearchableListItem, } from '@/domain/shared/components/SearchableList/SimpleSearchableTable'; import { IconButton } from '@mui/material'; import { TuneOutlined } from '@mui/icons-material'; -import LicensePlanDialog from '@/domain/community/contributor/organization/adminOrganizations/LicensePlanDialog'; +import LicensePlanDialog from '@/domain/platform/admin/organizations/LicensePlanDialog'; const AdminUsersPage: FC = () => { const { userList, licensePlans, ...listProps } = useAdminGlobalUserList(); diff --git a/src/main/routing/TopLevelRoutes.tsx b/src/main/routing/TopLevelRoutes.tsx index bcd1662591..d58409c38b 100644 --- a/src/main/routing/TopLevelRoutes.tsx +++ b/src/main/routing/TopLevelRoutes.tsx @@ -31,7 +31,7 @@ const ContributorsPage = lazyWithGlobalErrorHandler(() => import('@/domain/commu const AdminRoute = lazyWithGlobalErrorHandler(() => import('@/domain/platform/admin/routing/AdminRoute')); const UserRoute = lazyWithGlobalErrorHandler(() => import('@/domain/community/user/routing/UserRoute')); const OrganizationRoute = lazyWithGlobalErrorHandler( - () => import('@/domain/community/contributor/organization/routing/OrganizationRoute') + () => import('@/domain/community/organization/routing/OrganizationRoute') ); const VCRoute = lazyWithGlobalErrorHandler(() => import('@/domain/community/virtualContributor/VCRoute')); const ForumRoute = lazyWithGlobalErrorHandler(() => import('@/domain/communication/discussion/routing/ForumRoute')); diff --git a/src/main/ui/settings/PreferenceSection.tsx b/src/main/ui/settings/PreferenceSection.tsx index bdb72a13a7..fde7bab678 100644 --- a/src/main/ui/settings/PreferenceSection.tsx +++ b/src/main/ui/settings/PreferenceSection.tsx @@ -1,8 +1,7 @@ import React, { FC } from 'react'; import DashboardGenericSection from '@/domain/shared/components/DashboardSections/DashboardGenericSection'; import { FormControl, FormControlLabel, FormGroup, Skeleton, Switch } from '@mui/material'; -import { Preference } from '@/core/apollo/generated/graphql-schema'; -import { PreferenceTypes } from '@/domain/common/preference/preference-types'; +import { Preference, PreferenceType } from '@/core/apollo/generated/graphql-schema'; export interface PreferenceSectionProps { headerText: string; @@ -10,7 +9,7 @@ export interface PreferenceSectionProps { preferences: Preference[]; loading?: boolean; submitting?: boolean; - onUpdate: (id: string, type: PreferenceTypes, value: boolean) => void; + onUpdate: (id: string, type: PreferenceType, value: boolean) => void; } const PreferenceSection: FC = ({ @@ -40,7 +39,7 @@ const PreferenceSection: FC = ({ onUpdate(id, event.target.name as PreferenceTypes, checked)} + onChange={(event, checked) => onUpdate(id, event.target.name as PreferenceType, checked)} disabled={submitting} /> }