Add anonymous and remote participations
This commit is contained in:
@@ -103,3 +103,45 @@ export const REJECT_RELAY = gql`
|
||||
}
|
||||
${RELAY_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const ADMIN_SETTINGS_FRAGMENT = gql`
|
||||
fragment adminSettingsFragment on AdminSettings {
|
||||
instanceName,
|
||||
instanceDescription,
|
||||
instanceTerms,
|
||||
instanceTermsType,
|
||||
instanceTermsUrl
|
||||
registrationsOpen
|
||||
}
|
||||
`;
|
||||
|
||||
export const ADMIN_SETTINGS = gql`
|
||||
query {
|
||||
adminSettings {
|
||||
...adminSettingsFragment
|
||||
}
|
||||
}
|
||||
${ADMIN_SETTINGS_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const SAVE_ADMIN_SETTINGS = gql`
|
||||
mutation SaveAdminSettings(
|
||||
$instanceName: String,
|
||||
$instanceDescription: String,
|
||||
$instanceTerms: String,
|
||||
$instanceTermsType: InstanceTermsType,
|
||||
$instanceTermsUrl: String,
|
||||
$registrationsOpen: Boolean) {
|
||||
saveAdminSettings(
|
||||
instanceName: $instanceName,
|
||||
instanceDescription: $instanceDescription,
|
||||
instanceTerms: $instanceTerms,
|
||||
instanceTermsType: $instanceTermsType,
|
||||
instanceTermsUrl: $instanceTermsUrl,
|
||||
registrationsOpen: $registrationsOpen
|
||||
) {
|
||||
...adminSettingsFragment
|
||||
}
|
||||
}
|
||||
${ADMIN_SETTINGS_FRAGMENT}
|
||||
`;
|
||||
|
||||
@@ -9,6 +9,33 @@ query {
|
||||
registrationsWhitelist,
|
||||
demoMode,
|
||||
countryCode,
|
||||
anonymous {
|
||||
participation {
|
||||
allowed,
|
||||
validation {
|
||||
email {
|
||||
enabled,
|
||||
confirmationRequired
|
||||
},
|
||||
captcha {
|
||||
enabled
|
||||
}
|
||||
}
|
||||
}
|
||||
eventCreation {
|
||||
allowed,
|
||||
validation {
|
||||
email {
|
||||
enabled,
|
||||
confirmationRequired
|
||||
},
|
||||
captcha {
|
||||
enabled
|
||||
}
|
||||
}
|
||||
}
|
||||
actorId
|
||||
},
|
||||
location {
|
||||
latitude,
|
||||
longitude,
|
||||
@@ -27,3 +54,15 @@ query {
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const TERMS = gql`
|
||||
query Terms($locale: String) {
|
||||
config {
|
||||
terms(locale: $locale) {
|
||||
type,
|
||||
url,
|
||||
bodyHtml
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -14,7 +14,11 @@ const participantQuery = `
|
||||
domain
|
||||
},
|
||||
event {
|
||||
id
|
||||
id,
|
||||
uuid
|
||||
},
|
||||
metadata {
|
||||
cancellationToken
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -41,6 +45,7 @@ const optionsQuery = `
|
||||
maximumAttendeeCapacity,
|
||||
remainingAttendeeCapacity,
|
||||
showRemainingAttendeeCapacity,
|
||||
anonymousParticipation,
|
||||
showStartTime,
|
||||
showEndTime,
|
||||
offers {
|
||||
@@ -366,10 +371,11 @@ export const EDIT_EVENT = gql`
|
||||
`;
|
||||
|
||||
export const JOIN_EVENT = gql`
|
||||
mutation JoinEvent($eventId: ID!, $actorId: ID!) {
|
||||
mutation JoinEvent($eventId: ID!, $actorId: ID!, $email: String) {
|
||||
joinEvent(
|
||||
eventId: $eventId,
|
||||
actorId: $actorId
|
||||
actorId: $actorId,
|
||||
email: $email
|
||||
) {
|
||||
${participantQuery}
|
||||
}
|
||||
@@ -377,10 +383,11 @@ export const JOIN_EVENT = gql`
|
||||
`;
|
||||
|
||||
export const LEAVE_EVENT = gql`
|
||||
mutation LeaveEvent($eventId: ID!, $actorId: ID!) {
|
||||
mutation LeaveEvent($eventId: ID!, $actorId: ID!, $token: String) {
|
||||
leaveEvent(
|
||||
eventId: $eventId,
|
||||
actorId: $actorId
|
||||
actorId: $actorId,
|
||||
token: $token
|
||||
) {
|
||||
actor {
|
||||
id
|
||||
@@ -389,6 +396,20 @@ export const LEAVE_EVENT = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const CONFIRM_PARTICIPATION = gql`
|
||||
mutation ConfirmParticipation($token: String!) {
|
||||
confirmParticipation(confirmationToken: $token) {
|
||||
actor {
|
||||
id,
|
||||
},
|
||||
event {
|
||||
uuid
|
||||
},
|
||||
role
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_PARTICIPANT = gql`
|
||||
mutation AcceptParticipant($id: ID!, $moderatorActorId: ID!, $role: ParticipantRoleEnum!) {
|
||||
updateParticipation(id: $id, moderatorActorId: $moderatorActorId, role: $role) {
|
||||
|
||||
Reference in New Issue
Block a user