diff --git a/build.gradle b/build.gradle index 673e067319..57d5838e48 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ buildscript { dependencies { classpath 'org.postgresql:postgresql:42.5.1' //this is for processing the index.html at compile time - classpath "ch.digitalfondue.jfiveparse:jfiveparse:1.0.0" + classpath "ch.digitalfondue.jfiveparse:jfiveparse:1.0.3" // } @@ -32,13 +32,13 @@ plugins { id 'java' id 'idea' id 'org.kordamp.gradle.jacoco' version '0.54.0' - id 'com.github.ben-manes.versions' version '0.50.0' + id 'com.github.ben-manes.versions' version '0.51.0' id 'com.github.hierynomus.license' version '0.16.1' id 'net.researchgate.release' version '3.0.2' - id 'org.springframework.boot' version '2.7.7' + id 'org.springframework.boot' version '3.2.5' id 'org.sonarqube' version '4.4.1.3373' // id 'net.ltgt.errorprone' version '3.1.0' - id 'com.github.node-gradle.node' version '7.0.1' + id 'com.github.node-gradle.node' version '7.0.2' } apply plugin: 'java' @@ -102,8 +102,9 @@ repositories { } dependencies { + implementation 'com.auth0:java-jwt:4.4.0' implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" - implementation 'com.auth0:java-jwt:4.2.1' + implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-csv" implementation "com.fasterxml.jackson.core:jackson-core" implementation "com.fasterxml.jackson.core:jackson-databind" implementation "org.springframework.boot:spring-boot-properties-migrator", { @@ -111,36 +112,31 @@ dependencies { } implementation 'org.springframework.session:spring-session-jdbc' implementation "ch.digitalfondue.npjt-extra:npjt-extra:2.0.4" - implementation "com.samskivert:jmustache:1.15" - implementation "javax.mail:mail:1.5.0-b01" + implementation "com.samskivert:jmustache:1.16" implementation 'com.moodysalem:LatLongToTimezoneMaven:1.2' /**/ implementation 'com.openhtmltopdf:openhtmltopdf-core:1.0.10' implementation 'com.openhtmltopdf:openhtmltopdf-pdfbox:1.0.10' - implementation 'ch.digitalfondue.jfiveparse:jfiveparse:1.0.0' + implementation 'ch.digitalfondue.jfiveparse:jfiveparse:1.0.3' /**/ - implementation 'com.google.zxing:core:3.5.1' - implementation 'com.google.zxing:javase:3.5.1' + implementation 'com.google.zxing:core:3.5.3' + implementation 'com.google.zxing:javase:3.5.3' implementation "org.flywaydb:flyway-core" implementation "org.postgresql:postgresql" implementation "com.zaxxer:HikariCP" - /* https://www.lunasec.io/docs/blog/log4j-zero-day/ */ - implementation 'org.apache.logging.log4j:log4j-api:2.19.0' - implementation 'org.apache.logging.log4j:log4j-core:2.19.0' - implementation 'org.apache.logging.log4j:log4j-jul:2.19.0' - implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.19.0' /**/ - implementation "com.stripe:stripe-java:22.4.0" + implementation "com.stripe:stripe-java:25.3.0" implementation 'com.paypal.sdk:checkout-sdk:2.0.0' - implementation 'com.google.code.gson:gson:2.10' + implementation 'com.google.code.gson:gson:2.10.1' implementation 'com.fatboyindustrial.gson-javatime-serialisers:gson-javatime-serialisers:1.1.2', { exclude module: 'gson' } - implementation "org.apache.commons:commons-lang3:3.13.0" - implementation 'com.opencsv:opencsv:5.9' + implementation 'org.apache.commons:commons-lang3:3.13.0' + implementation 'org.apache.commons:commons-text:1.12.0' + implementation 'org.apache.commons:commons-collections4:4.4' implementation 'commons-codec:commons-codec:1.15' implementation 'net.sf.biweekly:biweekly:0.6.6' implementation 'com.atlassian.commonmark:commonmark:0.17.0' @@ -148,21 +144,18 @@ dependencies { implementation 'com.ryantenney.passkit4j:passkit4j:2.0.1' implementation 'com.github.ben-manes.caffeine:caffeine' implementation 'com.github.scribejava:scribejava-core:8.3.3' - implementation 'ch.digitalfondue.vatchecker:vatchecker:1.5.0' - implementation 'ch.digitalfondue.basicxlsx:basicxlsx:0.5.1' + implementation 'ch.digitalfondue.vatchecker:vatchecker:1.6.0' + implementation 'ch.digitalfondue.basicxlsx:basicxlsx:0.7.1' implementation 'org.imgscalr:imgscalr-lib:4.2' implementation 'org.mozilla:rhino-runtime:1.7.13' - implementation 'com.google.auth:google-auth-library-oauth2-http:1.18.0' + implementation 'com.google.auth:google-auth-library-oauth2-http:1.23.0' - compileOnly "javax.servlet:javax.servlet-api:4.0.1" - testImplementation "javax.servlet:javax.servlet-api:4.0.1" - testImplementation 'org.testcontainers:testcontainers:1.19.3' - testImplementation 'org.testcontainers:postgresql:1.19.3' - testImplementation 'org.testcontainers:junit-jupiter:1.19.3' + testImplementation 'org.testcontainers:testcontainers' + testImplementation 'org.testcontainers:postgresql' + testImplementation 'org.testcontainers:junit-jupiter' testImplementation "org.springframework.boot:spring-boot-starter-test", { exclude module : 'spring-boot-starter-logging' } - runtimeOnly "commons-fileupload:commons-fileupload:1.5" implementation "org.springframework.boot:spring-boot-starter-web", { exclude module : 'spring-boot-starter-logging' exclude group: "org.springframework.boot", module: 'spring-boot-starter-tomcat' @@ -193,8 +186,10 @@ dependencies { testImplementation "org.junit.platform:junit-platform-engine" testImplementation "org.mockito:mockito-inline:4.5.1" - testImplementation "org.springdoc:springdoc-openapi-ui:1.6.14" - testImplementation "org.openapitools.openapidiff:openapi-diff-core:2.0.1" + testImplementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0" + testImplementation "org.openapitools.openapidiff:openapi-diff-core:2.1.0-beta.10", { + exclude group: "io.swagger.core.v3", module: "swagger-core" + } providedCompile "org.springframework.boot:spring-boot-starter-jetty", { exclude group: "org.eclipse.jetty.websocket", module: "websocket-server" @@ -209,9 +204,7 @@ dependencies { implementation "org.joda:joda-money:1.0.3" - testImplementation 'org.mock-server:mockserver-netty:5.13.2', { - exclude group: 'org.mozilla', module: 'rhino' - } + testImplementation 'org.mock-server:mockserver-netty-no-dependencies:5.15.0' annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" testImplementation 'org.seleniumhq.selenium:selenium-java:4.16.1' @@ -275,7 +268,7 @@ compileTestJava { } compileJava { - options.compilerArgs = ['-Xlint:all,-serial,-processing'] + options.compilerArgs = ['-parameters','-Xlint:all,-serial,-processing'] // both checks are problematic with lombok code // options.errorprone.disable('UnusedVariable', diff --git a/src/main/java/alfio/config/ConfigurationStatusChecker.java b/src/main/java/alfio/config/ConfigurationStatusChecker.java index 1b152c097b..c2acf26361 100644 --- a/src/main/java/alfio/config/ConfigurationStatusChecker.java +++ b/src/main/java/alfio/config/ConfigurationStatusChecker.java @@ -28,7 +28,6 @@ import lombok.extern.log4j.Log4j2; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextRefreshedEvent; @@ -49,7 +48,6 @@ public class ConfigurationStatusChecker implements ApplicationListener iface) throws java.sql.SQLException { + return iface.isAssignableFrom(this.getClass()); + } + + public T unwrap(Class iface) throws java.sql.SQLException { + try { + if(iface.isAssignableFrom(this.getClass())) { + return iface.cast(this); + } + throw new java.sql.SQLException("Auto-generated unwrap failed; Revisit implementation"); + } catch (Exception e) { + throw new java.sql.SQLException(e); + } + } + + public java.util.logging.Logger getParentLogger() { + // TODO Auto-generated method stub + return null; + } } } diff --git a/src/main/java/alfio/config/Initializer.java b/src/main/java/alfio/config/Initializer.java index 97f52e89a7..e16657e6b2 100644 --- a/src/main/java/alfio/config/Initializer.java +++ b/src/main/java/alfio/config/Initializer.java @@ -18,18 +18,14 @@ import alfio.util.DefaultExceptionHandler; import com.openhtmltopdf.util.XRLog; -import org.apache.commons.lang3.Validate; -import org.springframework.core.env.Environment; -import org.springframework.core.env.Profiles; +import jakarta.servlet.FilterRegistration.Dynamic; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; import org.springframework.web.context.ConfigurableWebApplicationContext; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.filter.CharacterEncodingFilter; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; -import javax.servlet.FilterRegistration.Dynamic; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.SessionCookieConfig; import java.util.Objects; import java.util.logging.Level; @@ -44,7 +40,6 @@ public class Initializer extends AbstractAnnotationConfigDispatcherServletInitia public static final String PROFILE_DISABLE_JOBS = "disable-jobs"; public static final String API_V2_PUBLIC_PATH = "/api/v2/public/"; public static final String XSRF_TOKEN = "XSRF-TOKEN"; - private Environment environment; @Override public void onStartup(ServletContext servletContext) throws ServletException { @@ -52,8 +47,6 @@ public void onStartup(ServletContext servletContext) throws ServletException { Thread.setDefaultUncaughtExceptionHandler(new DefaultExceptionHandler()); - configureSessionCookie(servletContext); - CharacterEncodingFilter cef = new CharacterEncodingFilter(); cef.setEncoding("UTF-8"); cef.setForceEncoding(true); @@ -72,23 +65,9 @@ public void onStartup(ServletContext servletContext) throws ServletException { protected WebApplicationContext createRootApplicationContext() { ConfigurableWebApplicationContext ctx = ((ConfigurableWebApplicationContext) super.createRootApplicationContext()); Objects.requireNonNull(ctx, "Something really bad is happening..."); - this.environment = ctx.getEnvironment(); return ctx; } - private void configureSessionCookie(ServletContext servletContext) { - SessionCookieConfig config = servletContext.getSessionCookieConfig(); - - config.setHttpOnly(true); - - Validate.notNull(environment, "environment cannot be null!"); - // set secure cookie only if current environment doesn't strictly need HTTP - config.setSecure(environment.acceptsProfiles(Profiles.of(Initializer.PROFILE_LIVE))); - - // https://issues.jboss.org/browse/WFLY-3448 ? - config.setPath(servletContext.getContextPath() + "/"); - } - @Override protected Class[] getRootConfigClasses() { return new Class[] { ApplicationPropertiesConfiguration.class, DataSourceConfiguration.class, WebSecurityConfig.class }; diff --git a/src/main/java/alfio/config/MvcConfiguration.java b/src/main/java/alfio/config/MvcConfiguration.java index 4ca3be85cc..451d33d5e6 100644 --- a/src/main/java/alfio/config/MvcConfiguration.java +++ b/src/main/java/alfio/config/MvcConfiguration.java @@ -17,6 +17,8 @@ package alfio.config; import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -29,12 +31,13 @@ import org.springframework.http.converter.StringHttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.session.FindByIndexNameSessionRepository; +import org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration; import org.springframework.session.jdbc.config.annotation.web.http.EnableJdbcHttpSession; import org.springframework.session.security.SpringSessionBackedSessionRegistry; import org.springframework.session.web.http.CookieHttpSessionIdResolver; +import org.springframework.session.web.http.CookieSerializer; import org.springframework.session.web.http.HeaderHttpSessionIdResolver; import org.springframework.session.web.http.HttpSessionIdResolver; -import org.springframework.web.multipart.commons.CommonsMultipartResolver; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; @@ -42,8 +45,6 @@ import org.springframework.web.servlet.view.AbstractUrlBasedView; import org.springframework.web.servlet.view.UrlBasedViewResolver; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.time.Duration; import java.util.Collections; import java.util.List; @@ -117,13 +118,6 @@ private MappingJackson2HttpMessageConverter jacksonMessageConverter(ObjectMapper return converter; } - @Bean - public CommonsMultipartResolver multipartResolver() { - var multipartResolver = new CommonsMultipartResolver(); - multipartResolver.setMaxUploadSize(500_000); // 500kB - return multipartResolver; - } - @Bean public ViewResolver viewResolver() { var resolver = new UrlBasedViewResolver(); @@ -137,9 +131,10 @@ public SpringSessionBackedSessionRegistry sessionRegistry(FindByIndexNameSess } @Bean - public HttpSessionIdResolver httpSessionIdResolver() { + public HttpSessionIdResolver httpSessionIdResolver(CookieSerializer cookieSerializer) { var publicSessionIdResolver = HeaderHttpSessionIdResolver.xAuthToken(); var adminSessionIdResolver = new CookieHttpSessionIdResolver(); + adminSessionIdResolver.setCookieSerializer(cookieSerializer); return new HttpSessionIdResolver() { @Override public List resolveSessionIds(HttpServletRequest request) { diff --git a/src/main/java/alfio/config/RoleAndOrganizationsTransactionPreparer.java b/src/main/java/alfio/config/RoleAndOrganizationsTransactionPreparer.java index 0416f1af58..8e61556e75 100644 --- a/src/main/java/alfio/config/RoleAndOrganizationsTransactionPreparer.java +++ b/src/main/java/alfio/config/RoleAndOrganizationsTransactionPreparer.java @@ -28,7 +28,7 @@ import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.sql.Connection; import java.sql.SQLException; import java.util.Objects; @@ -94,9 +94,11 @@ private static boolean isAdmin() { return false; } - private static final String QUERY_ORG_FOR_USER = "(select organization.id from organization inner join j_user_organization on org_id = organization.id where j_user_organization.user_id = (select ba_user.id from ba_user where ba_user.username = ?)) " + - " union " + - "(select organization.id from organization where 'ROLE_ADMIN' in (select role from ba_user inner join authority on ba_user.username = authority.username where ba_user.username = ?))"; + private static final String QUERY_ORG_FOR_USER = """ + (select organization.id from organization inner join j_user_organization on org_id = organization.id where j_user_organization.user_id = (select ba_user.id from ba_user where ba_user.username = ?)) \ + union \ + (select organization.id from organization where 'ROLE_ADMIN' in (select role from ba_user inner join authority on ba_user.username = authority.username where ba_user.username = ?))\ + """; public static void prepareTransactionalConnection(Connection connection) throws SQLException { if (!isInAHttpRequest()) { diff --git a/src/main/java/alfio/config/SpringBootInitializer.java b/src/main/java/alfio/config/SpringBootInitializer.java index 8ac21b1c57..d746495666 100644 --- a/src/main/java/alfio/config/SpringBootInitializer.java +++ b/src/main/java/alfio/config/SpringBootInitializer.java @@ -16,27 +16,23 @@ */ package alfio.config; -import alfio.manager.system.ExternalConfiguration; import alfio.util.ClockProvider; import com.openhtmltopdf.util.XRLog; +import jakarta.servlet.Filter; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.boot.web.server.Cookie; import org.springframework.boot.web.servlet.ServletContextInitializer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Profile; -import org.springframework.core.env.ConfigurableEnvironment; +import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; -import org.springframework.web.context.WebApplicationContext; +import org.springframework.session.web.http.CookieSerializer; +import org.springframework.session.web.http.DefaultCookieSerializer; import org.springframework.web.filter.CharacterEncodingFilter; -import javax.servlet.Filter; -import javax.servlet.SessionCookieConfig; import java.time.Clock; import java.util.logging.Level; -import static org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext; - @EnableAutoConfiguration(exclude = {org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration.class, org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration.class, org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration.class, @@ -46,26 +42,29 @@ org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration.class, org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration.class }) -@EnableConfigurationProperties(ExternalConfiguration.class) @Configuration(proxyBeanMethods = false) -@Profile(Initializer.PROFILE_SPRING_BOOT) public class SpringBootInitializer { - @Bean public ServletContextInitializer servletContextInitializer() { return servletContext -> { - WebApplicationContext ctx = getRequiredWebApplicationContext(servletContext); - ConfigurableEnvironment environment = ctx.getBean(ConfigurableEnvironment.class); - SessionCookieConfig config = servletContext.getSessionCookieConfig(); - config.setHttpOnly(true); - config.setSecure(environment.acceptsProfiles(Profiles.of(Initializer.PROFILE_LIVE))); // force log initialization, then disable it XRLog.setLevel(XRLog.EXCEPTION, Level.WARNING); XRLog.setLoggingEnabled(false); }; } + @Bean + public CookieSerializer cookieSerializer(Environment environment) { + DefaultCookieSerializer serializer = new DefaultCookieSerializer(); + serializer.setCookieName("ALFIO_SESSION"); + if (environment.acceptsProfiles(Profiles.of(Initializer.PROFILE_LIVE))) { + serializer.setSameSite(Cookie.SameSite.STRICT.attributeValue()); + serializer.setUseSecureCookie(true); + } + return serializer; + } + @Bean public Filter characterEncodingFilter() { CharacterEncodingFilter cef = new CharacterEncodingFilter(); diff --git a/src/main/java/alfio/config/WebSecurityConfig.java b/src/main/java/alfio/config/WebSecurityConfig.java index 710678a5be..e2b6315c41 100644 --- a/src/main/java/alfio/config/WebSecurityConfig.java +++ b/src/main/java/alfio/config/WebSecurityConfig.java @@ -54,7 +54,7 @@ public CsrfTokenRepository getCsrfTokenRepository() { } @Bean - @Profile("openid") + @Profile(Initializer.PROFILE_OPENID) public AdminOpenIdAuthenticationManager adminOpenIdAuthenticationManager(Environment environment, HttpClient httpClient, ConfigurationManager configurationManager, diff --git a/src/main/java/alfio/config/authentication/APITokenAuthWebSecurity.java b/src/main/java/alfio/config/authentication/APITokenAuthWebSecurity.java index 8bf2602682..8b6ff0faba 100644 --- a/src/main/java/alfio/config/authentication/APITokenAuthWebSecurity.java +++ b/src/main/java/alfio/config/authentication/APITokenAuthWebSecurity.java @@ -33,7 +33,8 @@ import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.DisabledException; import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; +import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.web.SecurityFilterChain; @@ -100,26 +101,26 @@ public SecurityFilterChain configure(HttpSecurity http) throws Exception { }); - return http.requestMatcher(RequestTypeMatchers::isTokenAuthentication) - .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeRequests(APITokenAuthWebSecurity::configureMatchers) + return http.securityMatchers(matchers -> matchers.requestMatchers(RequestTypeMatchers::isTokenAuthentication)) + .sessionManagement(management -> management.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(AbstractHttpConfigurer::disable) + .authorizeHttpRequests(APITokenAuthWebSecurity::configureMatchers) .addFilter(filter) .build(); } - private static void configureMatchers(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry auth) { - auth.antMatchers(ADMIN_PUBLIC_API + "/system/**").hasRole(SYSTEM_API_CLIENT) - .antMatchers(ADMIN_PUBLIC_API + "/**").hasRole(API_CLIENT) - .antMatchers(ADMIN_API + "/check-in/event/*/attendees").hasRole(SUPERVISOR) - .antMatchers(ADMIN_API + "/check-in/*/label-layout").hasAnyRole(OPERATOR, SUPERVISOR, SPONSOR) - .antMatchers(ADMIN_API + "/check-in/**").hasAnyRole(OPERATOR, SUPERVISOR) - .antMatchers(HttpMethod.GET, ADMIN_API + "/events").hasAnyRole(OPERATOR, SUPERVISOR, SPONSOR) - .antMatchers(HttpMethod.GET, ADMIN_API + "/user-type", ADMIN_API + "/user/details").hasAnyRole(OPERATOR, SUPERVISOR, SPONSOR) - .antMatchers(ADMIN_API + "/**").denyAll() - .antMatchers(HttpMethod.POST, "/api/attendees/sponsor-scan").hasRole(SPONSOR) - .antMatchers(HttpMethod.GET, "/api/attendees/*/ticket/*").hasAnyRole(OPERATOR, SUPERVISOR, API_CLIENT) - .antMatchers("/**").authenticated(); + private static void configureMatchers(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry auth) { + auth.requestMatchers(ADMIN_PUBLIC_API + "/system/**").hasRole(SYSTEM_API_CLIENT) + .requestMatchers(ADMIN_PUBLIC_API + "/**").hasRole(API_CLIENT) + .requestMatchers(ADMIN_API + "/check-in/event/*/attendees").hasRole(SUPERVISOR) + .requestMatchers(ADMIN_API + "/check-in/*/label-layout").hasAnyRole(OPERATOR, SUPERVISOR, SPONSOR) + .requestMatchers(ADMIN_API + "/check-in/**").hasAnyRole(OPERATOR, SUPERVISOR) + .requestMatchers(HttpMethod.GET, ADMIN_API + "/events").hasAnyRole(OPERATOR, SUPERVISOR, SPONSOR) + .requestMatchers(HttpMethod.GET, ADMIN_API + "/user-type", ADMIN_API + "/user/details").hasAnyRole(OPERATOR, SUPERVISOR, SPONSOR) + .requestMatchers(ADMIN_API + "/**").denyAll() + .requestMatchers(HttpMethod.POST, "/api/attendees/sponsor-scan").hasRole(SPONSOR) + .requestMatchers(HttpMethod.GET, "/api/attendees/*/ticket/*").hasAnyRole(OPERATOR, SUPERVISOR, API_CLIENT) + .requestMatchers("/**").authenticated(); } private static boolean apiKeyMatches(String input, alfio.model.system.Configuration systemApiKeyConfiguration) { diff --git a/src/main/java/alfio/config/authentication/AbstractFormBasedWebSecurity.java b/src/main/java/alfio/config/authentication/AbstractFormBasedWebSecurity.java index 14eb74fd1e..65d3e51de0 100644 --- a/src/main/java/alfio/config/authentication/AbstractFormBasedWebSecurity.java +++ b/src/main/java/alfio/config/authentication/AbstractFormBasedWebSecurity.java @@ -23,8 +23,12 @@ import alfio.manager.openid.PublicOpenIdAuthenticationManager; import alfio.manager.system.ConfigurationManager; import alfio.manager.user.UserManager; +import jakarta.servlet.Filter; +import jakarta.servlet.RequestDispatcher; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; -import org.eclipse.jetty.http.HttpCookie; import org.springframework.context.annotation.Bean; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; @@ -33,8 +37,10 @@ import org.springframework.security.authentication.ProviderManager; import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer; import org.springframework.security.config.annotation.web.configurers.CsrfConfigurer; -import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer; +import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer; +import org.springframework.security.config.annotation.web.configurers.LogoutConfigurer; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.provisioning.JdbcUserDetailsManager; import org.springframework.security.web.SecurityFilterChain; @@ -45,15 +51,12 @@ import org.springframework.security.web.util.matcher.AntPathRequestMatcher; import org.springframework.security.web.util.matcher.NegatedRequestMatcher; import org.springframework.security.web.util.matcher.RequestHeaderRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; import org.springframework.session.security.SpringSessionBackedSessionRegistry; -import javax.servlet.Filter; -import javax.servlet.RequestDispatcher; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import javax.sql.DataSource; import java.util.List; +import java.util.function.Consumer; import java.util.function.Predicate; import java.util.regex.Pattern; @@ -61,10 +64,11 @@ import static alfio.config.Initializer.XSRF_TOKEN; import static alfio.config.authentication.support.AuthenticationConstants.*; import static alfio.config.authentication.support.OpenIdAuthenticationFilter.*; +import static org.springframework.security.web.util.matcher.AntPathRequestMatcher.antMatcher; abstract class AbstractFormBasedWebSecurity { public static final String AUTHENTICATE = "/authenticate"; - private static final String[] OWNERSHIP_REQUIRED = new String[]{ + private static final List OWNERSHIP_REQUIRED = List.of( ADMIN_API + "/overridable-template", ADMIN_API + "/additional-services", ADMIN_API + "/events/*/additional-field", @@ -82,7 +86,7 @@ abstract class AbstractFormBasedWebSecurity { ADMIN_API + "/subscription/*/email/", ADMIN_API + "/organization/*/subscription/**", ADMIN_API + "/reservation/subscription/**" - }; + ); private final Environment environment; private final UserManager userManager; @@ -118,29 +122,23 @@ protected AbstractFormBasedWebSecurity(Environment environment, @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { if (environment.acceptsProfiles(Profiles.of(Initializer.PROFILE_LIVE))) { - http.requiresChannel().antMatchers("/healthz").requiresInsecure() - .and() - .requiresChannel().mvcMatchers("/**").requiresSecure(); + http.requiresChannel(channel -> channel.requestMatchers("/healthz").requiresInsecure()) + .requiresChannel(channel -> channel.requestMatchers("/**").requiresSecure()); } - CsrfConfigurer configurer = csrfConfigurer(http); - var authenticationManager = createAuthenticationManager(); - configurer.csrfTokenRepository(csrfTokenRepository) - .and() - .headers().frameOptions().disable() // https://github.com/alfio-event/alf.io/issues/1031 X-Frame-Options has been moved to IndexController - .and() - .authorizeRequests(AbstractFormBasedWebSecurity::authorizeRequests) + configureExceptionHandling(http); + configureCsrf(http, configurer -> configurer.csrfTokenRepository(csrfTokenRepository)); + http.headers(headers -> headers.frameOptions(HeadersConfigurer.FrameOptionsConfig::disable)) + .authorizeHttpRequests(AbstractFormBasedWebSecurity::authorizeRequests) .authenticationManager(authenticationManager) - .formLogin() - .loginPage("/authentication") - .loginProcessingUrl(AUTHENTICATE) - .defaultSuccessUrl("/admin") - .failureUrl("/authentication?failed") - .and().logout().permitAll() - .and() + .formLogin(login -> login + .loginPage("/authentication") + .loginProcessingUrl(AUTHENTICATE) + .defaultSuccessUrl("/admin") + .failureUrl("/authentication?failed")).logout(LogoutConfigurer::permitAll) // this allows us to sync between spring session and spring security, thus saving the principal name in the session table - .sessionManagement().maximumSessions(-1).sessionRegistry(sessionRegistry); + .sessionManagement(management -> management.maximumSessions(-1).sessionRegistry(sessionRegistry)); http.addFilterBefore(openIdPublicCallbackLoginFilter(publicOpenIdAuthenticationManager, authenticationManager), UsernamePasswordAuthenticationFilter.class) .addFilterBefore(openIdPublicAuthenticationFilter(publicOpenIdAuthenticationManager), AnonymousAuthenticationFilter.class); @@ -198,54 +196,52 @@ private Filter csrfFilter() { }; } - private static void authorizeRequests(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry auth) { - auth.antMatchers(ADMIN_PUBLIC_API + "/**").denyAll() // Admin public API requests must be authenticated using API-Keys - .antMatchers(HttpMethod.GET, ADMIN_API + "/users/current").hasAnyRole(ADMIN, OWNER, SUPERVISOR) - .antMatchers(HttpMethod.POST, ADMIN_API + "/users/check", ADMIN_API + "/users/current/edit", ADMIN_API + "/users/current/update-password").hasAnyRole(ADMIN, OWNER, SUPERVISOR) - .antMatchers(ADMIN_API + "/configuration/**", ADMIN_API + "/users/**").hasAnyRole(ADMIN, OWNER) - .antMatchers(ADMIN_API + "/organizations/new", ADMIN_API + "/system/**").hasRole(ADMIN) - .antMatchers(ADMIN_API + "/check-in/**").hasAnyRole(ADMIN, OWNER, SUPERVISOR) - .antMatchers(HttpMethod.GET, OWNERSHIP_REQUIRED).hasAnyRole(ADMIN, OWNER) - .antMatchers(HttpMethod.GET, ADMIN_API + "/**").hasAnyRole(ADMIN, OWNER, SUPERVISOR) - .antMatchers(HttpMethod.POST, ADMIN_API + "/reservation/event/*/new", ADMIN_API + "/reservation/event/*/*").hasAnyRole(ADMIN, OWNER, SUPERVISOR) - .antMatchers(HttpMethod.PUT, - ADMIN_API + "/reservation/event/*/*/notify", - ADMIN_API + "/reservation/event/*/*/notify-attendees", - ADMIN_API + "/reservation/event/*/*/confirm" - ).hasAnyRole(ADMIN, OWNER, SUPERVISOR) - .antMatchers(ADMIN_API + "/**").hasAnyRole(ADMIN, OWNER) - .antMatchers("/admin/**/export/**").hasAnyRole(ADMIN, OWNER) - .antMatchers("/admin/**").hasAnyRole(ADMIN, OWNER, SUPERVISOR) - .antMatchers("/api/attendees/**").denyAll() - .antMatchers("/callback").permitAll() - .antMatchers("/**").permitAll(); + private static void authorizeRequests(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry auth) { + auth.requestMatchers(antMatcher(ADMIN_PUBLIC_API + "/**")).denyAll() // Admin public API requests must be authenticated using API-Keys + .requestMatchers(antMatcher(HttpMethod.GET, ADMIN_API + "/users/current")).hasAnyRole(ADMIN, OWNER, SUPERVISOR) + .requestMatchers(antMatcher(HttpMethod.POST, ADMIN_API + "/users/check"), antMatcher(HttpMethod.POST, ADMIN_API + "/users/current/edit"), antMatcher(HttpMethod.POST, ADMIN_API + "/users/current/update-password")).hasAnyRole(ADMIN, OWNER, SUPERVISOR) + .requestMatchers(antMatcher(ADMIN_API + "/configuration/**"), antMatcher(ADMIN_API + "/users/**")).hasAnyRole(ADMIN, OWNER) + .requestMatchers(antMatcher(ADMIN_API + "/organizations/new"), antMatcher(ADMIN_API + "/system/**")).hasRole(ADMIN) + .requestMatchers(antMatcher(ADMIN_API + "/check-in/**")).hasAnyRole(ADMIN, OWNER, SUPERVISOR) + .requestMatchers(OWNERSHIP_REQUIRED.stream().map(u -> antMatcher(HttpMethod.GET, u)).toArray(RequestMatcher[]::new)).hasAnyRole(ADMIN, OWNER) + .requestMatchers(antMatcher(HttpMethod.GET, ADMIN_API + "/**")).hasAnyRole(ADMIN, OWNER, SUPERVISOR) + .requestMatchers(antMatcher(HttpMethod.POST, ADMIN_API + "/reservation/event/*/new"), antMatcher(HttpMethod.POST,ADMIN_API + "/reservation/event/*/*")).hasAnyRole(ADMIN, OWNER, SUPERVISOR) + .requestMatchers(antMatcher(HttpMethod.PUT, ADMIN_API + "/reservation/event/*/*/notify"), antMatcher(HttpMethod.PUT, ADMIN_API + "/reservation/event/*/*/notify-attendees"), antMatcher(HttpMethod.PUT,ADMIN_API + "/reservation/event/*/*/confirm")).hasAnyRole(ADMIN, OWNER, SUPERVISOR) + .requestMatchers(antMatcher(ADMIN_API + "/**")).hasAnyRole(ADMIN, OWNER) + .requestMatchers(antMatcher("/admin/**/export/**")).hasAnyRole(ADMIN, OWNER) + .requestMatchers(antMatcher("/admin/**")).hasAnyRole(ADMIN, OWNER, SUPERVISOR) + .requestMatchers(antMatcher("/api/attendees/**")).denyAll() + .requestMatchers(antMatcher("/callback")).permitAll() + .requestMatchers(antMatcher("/**")).permitAll(); } - private static CsrfConfigurer csrfConfigurer(HttpSecurity http) throws Exception { - var configurer = http.exceptionHandling() - .accessDeniedHandler((request, response, accessDeniedException) -> { - if (!response.isCommitted()) { - if ("XMLHttpRequest".equals(request.getHeader(AuthenticationConstants.X_REQUESTED_WITH))) { - response.setStatus(HttpServletResponse.SC_FORBIDDEN); - } else if (!response.isCommitted()) { - response.setStatus(HttpServletResponse.SC_FORBIDDEN); - RequestDispatcher dispatcher = request.getRequestDispatcher("/session-expired"); - dispatcher.forward(request, response); + private static void configureExceptionHandling(HttpSecurity http) throws Exception { + http.exceptionHandling(handling -> handling + .accessDeniedHandler((request, response, accessDeniedException) -> { + if(!response.isCommitted()) { + if("XMLHttpRequest".equals(request.getHeader(AuthenticationConstants.X_REQUESTED_WITH))) { + response.setStatus(HttpServletResponse.SC_FORBIDDEN); + } else if(!response.isCommitted()) { + response.setStatus(HttpServletResponse.SC_FORBIDDEN); + RequestDispatcher dispatcher = request.getRequestDispatcher("/session-expired"); + dispatcher.forward(request, response); + } } - } - }) - .defaultAuthenticationEntryPointFor((request, response, ex) -> response.sendError(HttpServletResponse.SC_UNAUTHORIZED), new RequestHeaderRequestMatcher(AuthenticationConstants.X_REQUESTED_WITH, "XMLHttpRequest")) - .and() - .headers().cacheControl().disable() - .and() - .csrf(); - Pattern methodsPattern = Pattern.compile("^(GET|HEAD|TRACE|OPTIONS)$"); - Predicate csrfAllowListPredicate = r -> r.getRequestURI().startsWith("/api/webhook/") - || r.getRequestURI().startsWith("/api/payment/webhook/") - || methodsPattern.matcher(r.getMethod()).matches(); - csrfAllowListPredicate = csrfAllowListPredicate.or(r -> r.getRequestURI().equals("/report-csp-violation")); - configurer.requireCsrfProtectionMatcher(new NegatedRequestMatcher(csrfAllowListPredicate::test)); - return configurer; + }) + .defaultAuthenticationEntryPointFor((request, response, ex) -> response.sendError(HttpServletResponse.SC_UNAUTHORIZED), new RequestHeaderRequestMatcher(AuthenticationConstants.X_REQUESTED_WITH, "XMLHttpRequest"))) + .headers(headers -> headers.cacheControl(HeadersConfigurer.CacheControlConfig::disable)); + } + + private static void configureCsrf(HttpSecurity http, Consumer> additionalConfiguration) throws Exception { + http.csrf(c -> { + Pattern methodsPattern = Pattern.compile("^(GET|HEAD|TRACE|OPTIONS)$"); + Predicate csrfAllowListPredicate = r -> r.getRequestURI().startsWith("/api/webhook/") + || r.getRequestURI().startsWith("/api/payment/webhook/") + || methodsPattern.matcher(r.getMethod()).matches(); + csrfAllowListPredicate = csrfAllowListPredicate.or(r -> r.getRequestURI().equals("/report-csp-violation")); + c.requireCsrfProtectionMatcher(new NegatedRequestMatcher(csrfAllowListPredicate::test)); + additionalConfiguration.accept(c); + }); } private void addCookie(HttpServletResponse res, CsrfToken csrf) { @@ -254,7 +250,7 @@ private void addCookie(HttpServletResponse res, CsrfToken csrf) { boolean prod = environment.acceptsProfiles(Profiles.of(Initializer.PROFILE_LIVE)); cookie.setSecure(prod); if (prod) { - cookie.setComment(HttpCookie.SAME_SITE_STRICT_COMMENT); + cookie.setAttribute("SameSite", "Strict"); } res.addCookie(cookie); } diff --git a/src/main/java/alfio/config/authentication/FormBasedWebSecurity.java b/src/main/java/alfio/config/authentication/FormBasedWebSecurity.java index 95087317e4..4645f284d0 100644 --- a/src/main/java/alfio/config/authentication/FormBasedWebSecurity.java +++ b/src/main/java/alfio/config/authentication/FormBasedWebSecurity.java @@ -16,6 +16,7 @@ */ package alfio.config.authentication; +import alfio.config.Initializer; import alfio.manager.RecaptchaService; import alfio.manager.openid.PublicOpenIdAuthenticationManager; import alfio.manager.system.ConfigurationManager; @@ -33,7 +34,7 @@ /** * Default form based configuration. */ -@Profile("!openid") +@Profile("!"+ Initializer.PROFILE_OPENID) @Configuration(proxyBeanMethods = false) @Order(1) public class FormBasedWebSecurity extends AbstractFormBasedWebSecurity { diff --git a/src/main/java/alfio/config/authentication/OpenIdAdminWebSecurity.java b/src/main/java/alfio/config/authentication/OpenIdAdminWebSecurity.java index 395a67fba7..735be348df 100644 --- a/src/main/java/alfio/config/authentication/OpenIdAdminWebSecurity.java +++ b/src/main/java/alfio/config/authentication/OpenIdAdminWebSecurity.java @@ -16,6 +16,7 @@ */ package alfio.config.authentication; +import alfio.config.Initializer; import alfio.config.authentication.support.OpenIdAuthenticationFilter; import alfio.config.authentication.support.OpenIdCallbackLoginFilter; import alfio.manager.RecaptchaService; @@ -39,7 +40,7 @@ import javax.sql.DataSource; -@Profile("openid") +@Profile(Initializer.PROFILE_OPENID) @Configuration(proxyBeanMethods = false) @Order(1) public class OpenIdAdminWebSecurity extends AbstractFormBasedWebSecurity { diff --git a/src/main/java/alfio/config/authentication/support/APIKeyAuthFilter.java b/src/main/java/alfio/config/authentication/support/APIKeyAuthFilter.java index df39504f67..2f52337e03 100644 --- a/src/main/java/alfio/config/authentication/support/APIKeyAuthFilter.java +++ b/src/main/java/alfio/config/authentication/support/APIKeyAuthFilter.java @@ -19,7 +19,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import static alfio.config.authentication.support.RequestTypeMatchers.isTokenAuthentication; diff --git a/src/main/java/alfio/config/authentication/support/OpenIdAuthenticationFilter.java b/src/main/java/alfio/config/authentication/support/OpenIdAuthenticationFilter.java index 40c466ab66..ebe72ca679 100644 --- a/src/main/java/alfio/config/authentication/support/OpenIdAuthenticationFilter.java +++ b/src/main/java/alfio/config/authentication/support/OpenIdAuthenticationFilter.java @@ -24,12 +24,12 @@ import org.springframework.security.web.util.matcher.RequestMatcher; import org.springframework.web.filter.GenericFilterBean; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.UUID; diff --git a/src/main/java/alfio/config/authentication/support/OpenIdCallbackLoginFilter.java b/src/main/java/alfio/config/authentication/support/OpenIdCallbackLoginFilter.java index 7c557e7184..dfbb8029e2 100644 --- a/src/main/java/alfio/config/authentication/support/OpenIdCallbackLoginFilter.java +++ b/src/main/java/alfio/config/authentication/support/OpenIdCallbackLoginFilter.java @@ -28,12 +28,12 @@ import org.springframework.security.web.util.matcher.AntPathRequestMatcher; import org.springframework.security.web.util.matcher.RequestMatcher; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; public class OpenIdCallbackLoginFilter extends AbstractAuthenticationProcessingFilter { diff --git a/src/main/java/alfio/config/authentication/support/RecaptchaLoginFilter.java b/src/main/java/alfio/config/authentication/support/RecaptchaLoginFilter.java index 6618030fb9..664db7f0b0 100644 --- a/src/main/java/alfio/config/authentication/support/RecaptchaLoginFilter.java +++ b/src/main/java/alfio/config/authentication/support/RecaptchaLoginFilter.java @@ -22,12 +22,12 @@ import org.springframework.security.web.util.matcher.RequestMatcher; import org.springframework.web.filter.GenericFilterBean; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import static alfio.model.system.ConfigurationKeys.ENABLE_CAPTCHA_FOR_LOGIN; diff --git a/src/main/java/alfio/config/authentication/support/RequestTypeMatchers.java b/src/main/java/alfio/config/authentication/support/RequestTypeMatchers.java index e331661697..57b5500ec2 100644 --- a/src/main/java/alfio/config/authentication/support/RequestTypeMatchers.java +++ b/src/main/java/alfio/config/authentication/support/RequestTypeMatchers.java @@ -18,7 +18,7 @@ import lombok.experimental.UtilityClass; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Locale; public class RequestTypeMatchers { diff --git a/src/main/java/alfio/config/authentication/support/UserCreatorBeforeLoginFilter.java b/src/main/java/alfio/config/authentication/support/UserCreatorBeforeLoginFilter.java index a7c2ddc642..8a82490397 100644 --- a/src/main/java/alfio/config/authentication/support/UserCreatorBeforeLoginFilter.java +++ b/src/main/java/alfio/config/authentication/support/UserCreatorBeforeLoginFilter.java @@ -24,11 +24,11 @@ import org.springframework.security.web.util.matcher.RequestMatcher; import org.springframework.web.filter.GenericFilterBean; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; import java.util.UUID; diff --git a/src/main/java/alfio/config/support/PlatformProvider.java b/src/main/java/alfio/config/support/PlatformProvider.java index 754321dc94..78be82dde6 100644 --- a/src/main/java/alfio/config/support/PlatformProvider.java +++ b/src/main/java/alfio/config/support/PlatformProvider.java @@ -50,7 +50,7 @@ public String getUrl(Environment env) { return ""; } URI uri = resolveURI(env, "ELEPHANTSQL_URI"); - return String.format("%s://%s:%s%s", "jdbc:postgresql", uri.getHost(), uri.getPort(), uri.getPath()); + return "%s://%s:%s%s".formatted("jdbc:postgresql", uri.getHost(), uri.getPort(), uri.getPath()); } @Override @@ -148,7 +148,7 @@ public boolean isHosting(Environment env) { @Override public String getUrl(Environment env) { URI uri = resolveURI(env); - return String.format("%s://%s:%s%s", "jdbc:postgresql", uri.getHost(), uri.getPort(), uri.getPath()); + return "%s://%s:%s%s".formatted("jdbc:postgresql", uri.getHost(), uri.getPort(), uri.getPath()); } @Override @@ -208,7 +208,7 @@ public String getUrl(Environment env) { String host = env.getRequiredProperty("RDS_HOSTNAME"); String port = env.getRequiredProperty("RDS_PORT"); String db = env.getRequiredProperty("RDS_DB_NAME"); - return String.format("jdbc:%s://%s:%s/%s", dbType, host, port, db); + return "jdbc:%s://%s:%s/%s".formatted(dbType, host, port, db); } @Override @@ -231,7 +231,7 @@ public boolean isHosting(Environment env) { CLEVER_CLOUD { @Override public String getUrl(Environment env) { - return String.format("jdbc:postgresql://%s:%s/%s", env.getRequiredProperty("POSTGRESQL_ADDON_HOST"), + return "jdbc:postgresql://%s:%s/%s".formatted(env.getRequiredProperty("POSTGRESQL_ADDON_HOST"), env.getRequiredProperty("POSTGRESQL_ADDON_PORT"), env.getRequiredProperty("POSTGRESQL_ADDON_DB")); } diff --git a/src/main/java/alfio/controller/AdminConfigurationController.java b/src/main/java/alfio/controller/AdminConfigurationController.java index e5e9aa253e..b49d3674ce 100644 --- a/src/main/java/alfio/controller/AdminConfigurationController.java +++ b/src/main/java/alfio/controller/AdminConfigurationController.java @@ -21,8 +21,9 @@ import alfio.manager.payment.StripeConnectManager; import alfio.manager.user.UserManager; import alfio.util.oauth2.AccessTokenResponseDetails; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpSession; import lombok.AllArgsConstructor; -import lombok.extern.log4j.Log4j2; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,8 +33,6 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; import java.security.Principal; import java.util.List; import java.util.Objects; @@ -99,7 +98,7 @@ public String authorize(Principal principal, } } else if(stateVerified && StringUtils.isNotEmpty(errorCode)) { log.warn("error from {}. {}={}", provider, errorCode, errorDescription); - redirectAttributes.addFlashAttribute("errorMessage", StringUtils.defaultString(errorDescription, errorCode)); + redirectAttributes.addFlashAttribute("errorMessage", Objects.toString(errorDescription, errorCode)); return REDIRECT_ADMIN; } redirectAttributes.addFlashAttribute("errorMessage", "Couldn't connect your account. Please retry."); diff --git a/src/main/java/alfio/controller/AdminIndexController.java b/src/main/java/alfio/controller/AdminIndexController.java index 1c3d42f8e5..e601bacde3 100644 --- a/src/main/java/alfio/controller/AdminIndexController.java +++ b/src/main/java/alfio/controller/AdminIndexController.java @@ -30,8 +30,8 @@ import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.security.Principal; import java.util.Collection; diff --git a/src/main/java/alfio/controller/AuthenticationController.java b/src/main/java/alfio/controller/AuthenticationController.java index b1db2f4d40..ca387e4f46 100644 --- a/src/main/java/alfio/controller/AuthenticationController.java +++ b/src/main/java/alfio/controller/AuthenticationController.java @@ -22,6 +22,8 @@ import alfio.manager.system.ConfigurationLevel; import alfio.manager.system.ConfigurationManager; import alfio.util.TemplateManager; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.env.Environment; import org.springframework.core.io.ClassPathResource; @@ -32,8 +34,6 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.security.Principal; import java.util.EnumSet; @@ -41,7 +41,6 @@ import static alfio.controller.Constants.*; import static alfio.model.system.ConfigurationKeys.ENABLE_CAPTCHA_FOR_LOGIN; import static alfio.model.system.ConfigurationKeys.RECAPTCHA_API_KEY; -import static com.github.scribejava.core.model.OAuthConstants.NONCE; @Controller public class AuthenticationController { diff --git a/src/main/java/alfio/controller/Constants.java b/src/main/java/alfio/controller/Constants.java index b41f6487f6..b0704c0cf0 100644 --- a/src/main/java/alfio/controller/Constants.java +++ b/src/main/java/alfio/controller/Constants.java @@ -24,7 +24,7 @@ import org.springframework.security.web.csrf.CsrfToken; import org.springframework.ui.Model; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public interface Constants { String TEXT_HTML_CHARSET_UTF_8 = "text/html;charset=UTF-8"; diff --git a/src/main/java/alfio/controller/FileController.java b/src/main/java/alfio/controller/FileController.java index 387b2888f3..02bd0c3189 100644 --- a/src/main/java/alfio/controller/FileController.java +++ b/src/main/java/alfio/controller/FileController.java @@ -18,13 +18,12 @@ import alfio.manager.FileUploadManager; import alfio.model.FileBlobMetadata; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Optional; @@ -35,13 +34,12 @@ public class FileController { private static final String MAX_AGE_6_MONTH = "max-age=15778463"; - @Autowired public FileController(FileUploadManager manager) { this.manager = manager; } @GetMapping("/file/{digest}") - public void showFile(@PathVariable("digest") String digest, HttpServletRequest request, HttpServletResponse response) throws IOException { + public void showFile(@PathVariable String digest, HttpServletRequest request, HttpServletResponse response) throws IOException { Optional res = manager.findMetadata(digest); if (res.isPresent()) { diff --git a/src/main/java/alfio/controller/IndexController.java b/src/main/java/alfio/controller/IndexController.java index 8d381b730a..87bb9a7f49 100644 --- a/src/main/java/alfio/controller/IndexController.java +++ b/src/main/java/alfio/controller/IndexController.java @@ -44,9 +44,9 @@ import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.util.UriComponentsBuilder; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; @@ -206,7 +206,7 @@ public ResponseEntity replyToK8s() { "/my-profile", }) public void replyToIndex(@PathVariable(value = EVENT_SHORT_NAME, required = false) String eventShortName, - @PathVariable(value = "subscriptionId", required = false) String subscriptionId, + @PathVariable(required = false) String subscriptionId, @RequestHeader(value = "User-Agent", required = false) String userAgent, @RequestParam(value = "lang", required = false) String lang, ServletWebRequest request, @@ -255,7 +255,7 @@ public void replyToIndex(@PathVariable(value = EVENT_SHORT_NAME, required = fals @GetMapping("/event/{eventShortName}/reservation/{reservationId}") public String redirectEventToReservation(@PathVariable(value = EVENT_SHORT_NAME) String eventShortName, - @PathVariable(value = "reservationId") String reservationId, + @PathVariable String reservationId, @RequestParam(value = "subscription", required = false) String subscriptionId) { if (eventRepository.existsByShortName(eventShortName)) { var reservationStatusUrlSegment = ticketReservationRepository.findOptionalStatusAndValidationById(reservationId) @@ -271,7 +271,7 @@ public String redirectEventToReservation(@PathVariable(value = EVENT_SHORT_NAME) } @GetMapping("/subscription/{subscriptionId}/reservation/{reservationId}") - public String redirectSubscriptionToReservation(@PathVariable("subscriptionId") String subscriptionId, @PathVariable("reservationId") String reservationId) { + public String redirectSubscriptionToReservation(@PathVariable String subscriptionId, @PathVariable String reservationId) { if (subscriptionRepository.existsById(UUID.fromString(subscriptionId))) { var reservationStatusUrlSegment = ticketReservationRepository.findOptionalStatusAndValidationById(reservationId) .map(IndexController::reservationStatusToUrlMapping).orElse(NOT_FOUND); @@ -421,7 +421,7 @@ private static Element getMetaElement(Document document, String attrName, String "/event/{eventShortName}/code/{code}", "/e/{eventShortName}/c/{code}"}) public String redirectCode(@PathVariable(EVENT_SHORT_NAME) String eventName, - @PathVariable("code") String code, + @PathVariable String code, @RequestHeader(value = "User-Agent", required = false) String userAgent) { if (RequestUtils.isSocialMediaShareUA(userAgent)) { diff --git a/src/main/java/alfio/controller/OnlineCheckInController.java b/src/main/java/alfio/controller/OnlineCheckInController.java index 13da735eb7..9ad1beecf9 100644 --- a/src/main/java/alfio/controller/OnlineCheckInController.java +++ b/src/main/java/alfio/controller/OnlineCheckInController.java @@ -47,8 +47,8 @@ public class OnlineCheckInController { @GetMapping("/event/{shortName}/ticket/{ticketUUID}/check-in/{ticketCodeHash}") public String performCheckIn(@PathVariable("shortName") String eventShortName, - @PathVariable("ticketUUID") String ticketUUID, - @PathVariable("ticketCodeHash") String ticketCodeHash) { + @PathVariable String ticketUUID, + @PathVariable String ticketCodeHash) { return ticketReservationManager.fetchCompleteAndAssignedForOnlineCheckIn(eventShortName, ticketUUID) .flatMap(data -> { diff --git a/src/main/java/alfio/controller/api/ApiControllerExceptionHandler.java b/src/main/java/alfio/controller/api/ApiControllerExceptionHandler.java index 53ace87812..c4b29936a1 100644 --- a/src/main/java/alfio/controller/api/ApiControllerExceptionHandler.java +++ b/src/main/java/alfio/controller/api/ApiControllerExceptionHandler.java @@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; @ControllerAdvice(basePackages = { "alfio.controller.api.admin", diff --git a/src/main/java/alfio/controller/api/admin/AdditionalFieldApiController.java b/src/main/java/alfio/controller/api/admin/AdditionalFieldApiController.java index d82217f579..63c565a3b6 100644 --- a/src/main/java/alfio/controller/api/admin/AdditionalFieldApiController.java +++ b/src/main/java/alfio/controller/api/admin/AdditionalFieldApiController.java @@ -60,15 +60,15 @@ public AdditionalFieldApiController(PurchaseContextManager purchaseContextManage } @GetMapping("/templates") - public List loadTemplates(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier) { + public List loadTemplates(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier) { LOGGER.trace("Loading templates for {} {}", purchaseContextType, publicIdentifier); return dynamicFieldTemplateRepository.loadAll(); } @GetMapping() - public List getAllAdditionalField(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, + public List getAllAdditionalField(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, Principal principal) { accessService.checkPurchaseContextOwnership(principal, purchaseContextType, publicIdentifier); var purchaseContext = purchaseContextManager.findBy(purchaseContextType, publicIdentifier).orElseThrow(); @@ -79,9 +79,9 @@ public List getAllAdditionalField(@PathVar } @GetMapping("/{id}/stats") - public List getStats(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("id") long id, + public List getStats(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable long id, Principal principal) { // accessService.checkPurchaseContextOwnership(principal, purchaseContextType, publicIdentifier); @@ -93,8 +93,8 @@ public List getStats(@PathVariable("purchaseContextType") // "/events/{eventName}/additional-field/new" // old "/new" ) - public ValidationResult addAdditionalField(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, + public ValidationResult addAdditionalField(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, @RequestBody AdditionalFieldRequest field, Principal principal, Errors errors) { @@ -110,8 +110,8 @@ public ValidationResult addAdditionalField(@PathVariable("purchaseContextType") // "/events/{eventName}/additional-field/descriptions" // old "/descriptions" ) - public void saveAdditionalFieldDescriptions(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, + public void saveAdditionalFieldDescriptions(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, @RequestBody Map descriptions, Principal principal) { // accessService.checkPurchaseContextOwnershipAndTicketAdditionalFieldIds(principal, purchaseContextType, publicIdentifier, descriptions.values().stream().map(TicketFieldDescriptionModification::getTicketFieldConfigurationId).collect(Collectors.toSet())); @@ -123,10 +123,10 @@ public void saveAdditionalFieldDescriptions(@PathVariable("purchaseContextType") // "/events/{eventName}/additional-field/swap-position/{id1}/{id2}" // old "/swap-position/{id1}/{id2}" ) - public void swapAdditionalFieldPosition(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("id1") long id1, - @PathVariable("id2") long id2, + public void swapAdditionalFieldPosition(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable long id1, + @PathVariable long id2, Principal principal) { // accessService.checkPurchaseContextOwnershipAndTicketAdditionalFieldIds(principal, purchaseContextType, publicIdentifier, Set.of(id1, id2)); @@ -138,9 +138,9 @@ public void swapAdditionalFieldPosition(@PathVariable("purchaseContextType") Pur // "/events/{eventName}/additional-field/set-position/{id}" // old "/set-position/{id}" ) - public void setAdditionalFieldPosition(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("id") long id, + public void setAdditionalFieldPosition(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable long id, @RequestParam("newPosition") int newPosition, Principal principal) { // @@ -153,9 +153,9 @@ public void setAdditionalFieldPosition(@PathVariable("purchaseContextType") Purc // "/events/{eventName}/additional-field/{id}" // old "/{id}" ) - public void deleteAdditionalField(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("id") long id, + public void deleteAdditionalField(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable long id, Principal principal) { // accessService.checkPurchaseContextOwnershipAndTicketAdditionalFieldIds(principal, purchaseContextType, publicIdentifier, Set.of(id)); @@ -164,9 +164,9 @@ public void deleteAdditionalField(@PathVariable("purchaseContextType") PurchaseC } @PostMapping("/{id}") - public void updateAdditionalField(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("id") long id, + public void updateAdditionalField(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable long id, @RequestBody EventModification.UpdateAdditionalField field, Principal principal) { // diff --git a/src/main/java/alfio/controller/api/admin/AdditionalServiceApiController.java b/src/main/java/alfio/controller/api/admin/AdditionalServiceApiController.java index bd3840aa00..515769914f 100644 --- a/src/main/java/alfio/controller/api/admin/AdditionalServiceApiController.java +++ b/src/main/java/alfio/controller/api/admin/AdditionalServiceApiController.java @@ -41,7 +41,7 @@ import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.math.BigDecimal; import java.security.Principal; @@ -80,7 +80,7 @@ public ResponseEntity handleError(Exception e) { } @GetMapping("/event/{eventId}/additional-services") - public List loadAll(@PathVariable("eventId") int eventId, Principal principal) { + public List loadAll(@PathVariable int eventId, Principal principal) { accessService.checkEventOwnership(principal, eventId); return eventRepository.findOptionalById(eventId) .map(event -> additionalServiceManager.loadAllForEvent(eventId) @@ -94,14 +94,14 @@ public List loadAll(@PathVariable("eventId" } @GetMapping("/event/{eventId}/additional-services/count") - public Map> countUse(@PathVariable("eventId") int eventId, Principal principal) { + public Map> countUse(@PathVariable int eventId, Principal principal) { accessService.checkEventOwnership(principal, eventId); return additionalServiceManager.countUsageForEvent(eventId); } @PutMapping("/event/{eventId}/additional-services/{additionalServiceId}") @Transactional - public ResponseEntity update(@PathVariable("eventId") int eventId, @PathVariable("additionalServiceId") int additionalServiceId, @RequestBody EventModification.AdditionalService additionalService, BindingResult bindingResult, Principal principal) { + public ResponseEntity update(@PathVariable int eventId, @PathVariable int additionalServiceId, @RequestBody EventModification.AdditionalService additionalService, BindingResult bindingResult, Principal principal) { // accessService.checkEventOwnership(principal, eventId); Optional optional = additionalServiceManager.getOptionalById(additionalServiceId, eventId); @@ -130,7 +130,7 @@ public ResponseEntity update(@PathVariable( @PostMapping(value = "/event/{eventId}/additional-services") @Transactional - public ResponseEntity insert(@PathVariable("eventId") int eventId, @RequestBody EventModification.AdditionalService additionalService, BindingResult bindingResult, Principal principal) { + public ResponseEntity insert(@PathVariable int eventId, @RequestBody EventModification.AdditionalService additionalService, BindingResult bindingResult, Principal principal) { accessService.checkEventOwnership(principal, eventId); ValidationResult validationResult = Validator.validateAdditionalService(additionalService, bindingResult); Validate.isTrue(validationResult.isSuccess(), "validation failed"); @@ -141,7 +141,7 @@ public ResponseEntity insert(@PathVariable( @DeleteMapping("/event/{eventId}/additional-services/{additionalServiceId}") @Transactional - public ResponseEntity remove(@PathVariable("eventId") int eventId, @PathVariable("additionalServiceId") int additionalServiceId, Principal principal) { + public ResponseEntity remove(@PathVariable int eventId, @PathVariable int additionalServiceId, Principal principal) { var additionalService = additionalServiceManager.getOptionalById(additionalServiceId, eventId); Assert.isTrue(additionalService.isPresent(), "Additional service " + additionalServiceId + " must be inside eventId " + eventId); accessService.checkEventOwnership(principal, eventId); @@ -161,7 +161,7 @@ public ResponseEntity remove(@PathVariable("eventId") int eventId, @Path } @GetMapping("/events/{eventName}/additional-services/{type}/export") - public void exportAdditionalServices(@PathVariable("eventName") String eventName, + public void exportAdditionalServices(@PathVariable String eventName, @PathVariable("type") AdditionalService.AdditionalServiceType additionalServiceType, HttpServletResponse response, Principal principal) throws IOException { diff --git a/src/main/java/alfio/controller/api/admin/AdminPaymentsApiController.java b/src/main/java/alfio/controller/api/admin/AdminPaymentsApiController.java index a26e31b857..80d3f1eeeb 100644 --- a/src/main/java/alfio/controller/api/admin/AdminPaymentsApiController.java +++ b/src/main/java/alfio/controller/api/admin/AdminPaymentsApiController.java @@ -30,7 +30,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.security.Principal; import java.time.ZonedDateTime; @@ -76,8 +76,8 @@ public AdminPaymentsApiController(PurchaseContextSearchManager purchaseContextSe } @GetMapping("/{purchaseContextType}/{publicIdentifier}/list") - PageAndContent> getPaymentsForPurchaseContext(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, + PageAndContent> getPaymentsForPurchaseContext(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "search", required = false) String search, Principal principal) { @@ -90,9 +90,9 @@ PageAndContent> getPaymentsForPurchaseContext(@Pa } @PutMapping("/{purchaseContextType}/{publicIdentifier}/reservation/{reservationId}") - ResponseEntity updateTransactionData(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, + ResponseEntity updateTransactionData(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable String reservationId, @RequestBody TransactionMetadataModification transactionMetadataModification, Principal principal) { try { @@ -110,8 +110,8 @@ ResponseEntity updateTransactionData(@PathVariable("purchaseContextType" } @GetMapping("/{purchaseContextType}/{publicIdentifier}/download") - void exportPayments(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, + void exportPayments(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, @RequestParam(value = "search", required = false) String search, Principal principal, HttpServletResponse response) throws IOException { diff --git a/src/main/java/alfio/controller/api/admin/AdminReservationApiController.java b/src/main/java/alfio/controller/api/admin/AdminReservationApiController.java index 9975279ad5..054d9927f5 100644 --- a/src/main/java/alfio/controller/api/admin/AdminReservationApiController.java +++ b/src/main/java/alfio/controller/api/admin/AdminReservationApiController.java @@ -34,7 +34,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.math.BigDecimal; import java.security.Principal; import java.util.Collections; @@ -58,8 +58,8 @@ public class AdminReservationApiController { private final AccessService accessService; @PostMapping("/{purchaseContextType}/{publicIdentifier}/new") - public Result createNew(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, + public Result createNew(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, @RequestBody AdminReservationModification reservation, Principal principal) { if(purchaseContextType != PurchaseContextType.event) { @@ -71,13 +71,13 @@ public Result createNew(@PathVariable("purchaseContextType") PurchaseCon @GetMapping("/{purchaseContextType}/{publicIdentifier}/reservations/all-status") - public TicketReservation.TicketReservationStatus[] getAllStatus(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, @PathVariable("publicIdentifier") String publicIdentifier) { + public TicketReservation.TicketReservationStatus[] getAllStatus(@PathVariable PurchaseContextType purchaseContextType, @PathVariable String publicIdentifier) { return TicketReservation.TicketReservationStatus.values(); } @GetMapping("/{purchaseContextType}/{publicIdentifier}/reservations/list") - public PageAndContent> findAll(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, + public PageAndContent> findAll(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "search", required = false) String search, @RequestParam(value = "status", required = false) List status, @@ -92,9 +92,9 @@ public PageAndContent> findAll(@PathVariable("purchaseCo } @PutMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/confirm") - public Result confirmReservation(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, + public Result confirmReservation(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable String reservationId, Principal principal) { accessService.checkReservationMembership(principal, purchaseContextType, publicIdentifier, reservationId); return adminReservationManager.confirmReservation(purchaseContextType, publicIdentifier, reservationId, principal.getName(), AdminReservationModification.Notification.EMPTY) @@ -102,9 +102,9 @@ public Result confirmReservation(@PathVariable("pur } @PostMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}") - public Result updateReservation(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, + public Result updateReservation(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable String reservationId, @RequestBody AdminReservationModification arm, Principal principal) { accessService.checkReservationMembership(principal, purchaseContextType, publicIdentifier, reservationId); @@ -112,9 +112,9 @@ public Result updateReservation(@PathVariable("purchaseContextType") Pu } @PutMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/notify") - public Result notifyReservation(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, + public Result notifyReservation(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable String reservationId, @RequestBody AdminReservationModification arm, Principal principal) { accessService.checkReservationMembership(principal, purchaseContextType, publicIdentifier, reservationId); @@ -122,8 +122,8 @@ public Result notifyReservation(@PathVariable("purchaseContextType") Pu } @PutMapping("/event/{publicIdentifier}/{reservationId}/notify-attendees") - public Result notifyAttendees(@PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, + public Result notifyAttendees(@PathVariable String publicIdentifier, + @PathVariable String reservationId, @RequestBody List ids, Principal principal) { accessService.checkReservationMembership(principal, PurchaseContextType.event, publicIdentifier, reservationId); @@ -131,24 +131,24 @@ public Result notifyAttendees(@PathVariable("publicIdentifier") String } @GetMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/audit") - public Result> getAudit(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, Principal principal) { + public Result> getAudit(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable String reservationId, Principal principal) { accessService.checkReservationMembership(principal, purchaseContextType, publicIdentifier, reservationId); return adminReservationManager.getAudit(purchaseContextType, publicIdentifier, reservationId, principal.getName()); } @GetMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/billing-documents") - public Result> getBillingDocuments(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, @PathVariable("publicIdentifier") String publicIdentifier, @PathVariable("reservationId") String reservationId, Principal principal) { + public Result> getBillingDocuments(@PathVariable PurchaseContextType purchaseContextType, @PathVariable String publicIdentifier, @PathVariable String reservationId, Principal principal) { accessService.checkReservationOwnership(principal, purchaseContextType, publicIdentifier, reservationId); return adminReservationManager.getBillingDocuments(publicIdentifier, reservationId, principal.getName()); } @DeleteMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/billing-document/{documentId}") - public ResponseEntity invalidateBillingDocument(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, - @PathVariable("documentId") long documentId, + public ResponseEntity invalidateBillingDocument(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable String reservationId, + @PathVariable long documentId, Principal principal) { accessService.checkBillingDocumentOwnership(principal, purchaseContextType, publicIdentifier, reservationId, documentId); Result invalidateResult = adminReservationManager.invalidateBillingDocument(reservationId, documentId, principal.getName()); @@ -160,10 +160,10 @@ public ResponseEntity invalidateBillingDocument(@PathVariable("purchase } @PutMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/billing-document/{documentId}/restore") - public ResponseEntity restoreBillingDocument(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, - @PathVariable("documentId") long documentId, + public ResponseEntity restoreBillingDocument(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable String reservationId, + @PathVariable long documentId, Principal principal) { accessService.checkReservationOwnership(principal, purchaseContextType, publicIdentifier, reservationId); Result restoreResult = adminReservationManager.restoreBillingDocument(reservationId, documentId, principal.getName()); @@ -175,10 +175,10 @@ public ResponseEntity restoreBillingDocument(@PathVariable("purchaseCon } @GetMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/billing-document/{documentId}") - public ResponseEntity getBillingDocument(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, - @PathVariable("documentId") long documentId, + public ResponseEntity getBillingDocument(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable String reservationId, + @PathVariable long documentId, Principal principal, HttpServletResponse response) { accessService.checkReservationOwnership(principal, purchaseContextType, publicIdentifier, reservationId); @@ -192,14 +192,14 @@ public ResponseEntity getBillingDocument(@PathVariable("purchaseContextTyp } @GetMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}") - public Result loadReservation(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, @PathVariable("publicIdentifier") String publicIdentifier, @PathVariable("reservationId") String reservationId, Principal principal) { + public Result loadReservation(@PathVariable PurchaseContextType purchaseContextType, @PathVariable String publicIdentifier, @PathVariable String reservationId, Principal principal) { accessService.checkReservationMembership(principal, purchaseContextType, publicIdentifier, reservationId); return adminReservationManager.loadReservation(purchaseContextType, publicIdentifier, reservationId, principal.getName()) .map(triple -> toReservationDescriptor(reservationId, triple)); } @GetMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/ticket/{ticketId}") - public Result loadTicket(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, @PathVariable("publicIdentifier") String publicIdentifier, @PathVariable("reservationId") String reservationId, @PathVariable("ticketId") int ticketId, Principal principal) { + public Result loadTicket(@PathVariable PurchaseContextType purchaseContextType, @PathVariable String publicIdentifier, @PathVariable String reservationId, @PathVariable int ticketId, Principal principal) { accessService.checkTicketMembership(principal, publicIdentifier, reservationId, ticketId); return adminReservationManager.loadReservation(purchaseContextType, publicIdentifier, reservationId, principal.getName()).flatMap(triple -> //not optimal @@ -212,9 +212,9 @@ public Result loadTicket(@PathVariable("purchaseContextType") PurchaseCo } @GetMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/tickets-with-additional-data") - public List ticketsWithAdditionalData(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, + public List ticketsWithAdditionalData(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable String reservationId, Principal principal) { if(purchaseContextType != PurchaseContextType.event) { return List.of(); @@ -225,8 +225,8 @@ public List ticketsWithAdditionalData(@PathVariable("purchaseContextTyp @PostMapping("/event/{publicIdentifier}/{reservationId}/remove-tickets") - public Result removeTickets(@PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, + public Result removeTickets(@PathVariable String publicIdentifier, + @PathVariable String reservationId, @RequestBody RemoveTicketsModification toRemove, Principal principal) { accessService.checkReservationMembership(principal, PurchaseContextType.event, publicIdentifier, reservationId); @@ -246,14 +246,14 @@ public Result removeTickets(@PathVariable("publicIdentifier") Stri } @GetMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/payment-info") - public Result getPaymentInfo(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, @PathVariable("publicIdentifier") String publicIdentifier, @PathVariable("reservationId") String reservationId, Principal principal) { + public Result getPaymentInfo(@PathVariable PurchaseContextType purchaseContextType, @PathVariable String publicIdentifier, @PathVariable String reservationId, Principal principal) { accessService.checkReservationMembership(principal, purchaseContextType, publicIdentifier, reservationId); return adminReservationManager.getPaymentInfo(reservationId); } @PostMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/cancel") - public Result removeReservation(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, + public Result removeReservation(@PathVariable PurchaseContextType purchaseContextType, @PathVariable String publicIdentifier, + @PathVariable String reservationId, @RequestParam("refund") boolean refund, @RequestParam(value = "notify", defaultValue = "false") boolean notify, @RequestParam(value = "issueCreditNote", defaultValue = "false") boolean issueCreditNote, @@ -263,7 +263,7 @@ public Result removeReservation(@PathVariable("purchaseContextType") Pu } @PostMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/credit") - public Result creditReservation(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, @PathVariable("publicIdentifier") String publicIdentifier, @PathVariable("reservationId") String reservationId, @RequestParam("refund") boolean refund, + public Result creditReservation(@PathVariable PurchaseContextType purchaseContextType, @PathVariable String publicIdentifier, @PathVariable String reservationId, @RequestParam("refund") boolean refund, @RequestParam(value = "notify", defaultValue = "false") boolean notify, Principal principal) { accessService.checkReservationOwnership(principal, purchaseContextType, publicIdentifier, reservationId); @@ -272,27 +272,27 @@ public Result creditReservation(@PathVariable("purchaseContextType") Pu } @PutMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/regenerate-billing-document") - public Result regenerateBillingDocument(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, @PathVariable("publicIdentifier") String publicIdentifier, @PathVariable("reservationId") String reservationId, Principal principal) { + public Result regenerateBillingDocument(@PathVariable PurchaseContextType purchaseContextType, @PathVariable String publicIdentifier, @PathVariable String reservationId, Principal principal) { accessService.checkReservationOwnership(principal, purchaseContextType, publicIdentifier, reservationId); return adminReservationManager.regenerateBillingDocument(purchaseContextType, publicIdentifier, reservationId, principal.getName()); } @PostMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/refund") - public Result refund(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, @PathVariable("publicIdentifier") String publicIdentifier, @PathVariable("reservationId") String reservationId, @RequestBody RefundAmount amount, Principal principal) { + public Result refund(@PathVariable PurchaseContextType purchaseContextType, @PathVariable String publicIdentifier, @PathVariable String reservationId, @RequestBody RefundAmount amount, Principal principal) { accessService.checkReservationOwnership(principal, purchaseContextType, publicIdentifier, reservationId); return adminReservationManager.refund(purchaseContextType, publicIdentifier, reservationId, new BigDecimal(amount.amount), principal.getName()); } @GetMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/email-list") - public Result> getEmailList(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, @PathVariable("publicIdentifier") String publicIdentifier, @PathVariable("reservationId") String reservationId, Principal principal) { + public Result> getEmailList(@PathVariable PurchaseContextType purchaseContextType, @PathVariable String publicIdentifier, @PathVariable String reservationId, Principal principal) { accessService.checkReservationOwnership(principal, purchaseContextType, publicIdentifier, reservationId); return adminReservationManager.getEmailsForReservation(purchaseContextType, publicIdentifier, reservationId, principal.getName()); } @GetMapping("/{purchaseContextType}/{publicIdentifier}/{reservationId}/ticket/{ticketId}/full-data") - public ResponseEntity loadFullTicketData(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, + public ResponseEntity loadFullTicketData(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable String reservationId, @PathVariable("ticketId") String ticketUUID, Principal principal) { if(purchaseContextType != PurchaseContextType.event) { diff --git a/src/main/java/alfio/controller/api/admin/AdminWaitingQueueApiController.java b/src/main/java/alfio/controller/api/admin/AdminWaitingQueueApiController.java index 6546e55414..04cf9a7e1e 100644 --- a/src/main/java/alfio/controller/api/admin/AdminWaitingQueueApiController.java +++ b/src/main/java/alfio/controller/api/admin/AdminWaitingQueueApiController.java @@ -32,7 +32,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.security.Principal; import java.time.ZonedDateTime; @@ -57,7 +57,7 @@ public class AdminWaitingQueueApiController { private final AccessService accessService; @GetMapping("/status") - public Map getStatusForEvent(@PathVariable("eventName") String eventName, Principal principal) { + public Map getStatusForEvent(@PathVariable String eventName, Principal principal) { accessService.checkEventMembership(principal, eventName, AccessService.MEMBERSHIP_ROLES); return eventManager.getOptionalByName(eventName, principal.getName()) .map(this::loadStatus) @@ -80,7 +80,7 @@ private Map loadStatus(Event event) { } @PutMapping("/status") - public Map setStatusForEvent(@PathVariable("eventName") String eventName, @RequestBody SetStatusForm form, Principal principal) { + public Map setStatusForEvent(@PathVariable String eventName, @RequestBody SetStatusForm form, Principal principal) { accessService.checkEventOwnership(principal, eventName); return eventManager.getOptionalByName(eventName, principal.getName()) .map(event -> { @@ -92,7 +92,7 @@ public Map setStatusForEvent(@PathVariable("eventName") String } @GetMapping("/count") - public Integer countWaitingPeople(@PathVariable("eventName") String eventName, Principal principal, HttpServletResponse response) { + public Integer countWaitingPeople(@PathVariable String eventName, Principal principal, HttpServletResponse response) { accessService.checkEventMembership(principal, eventName, AccessService.MEMBERSHIP_ROLES); Optional count = eventManager.getOptionalEventAndOrganizationIdByName(eventName, principal.getName()) .map(e -> waitingQueueManager.countSubscribers(e.getId())); @@ -104,7 +104,7 @@ public Integer countWaitingPeople(@PathVariable("eventName") String eventName, P } @GetMapping("/load") - public List loadAllSubscriptions(@PathVariable("eventName") String eventName, Principal principal, HttpServletResponse response) { + public List loadAllSubscriptions(@PathVariable String eventName, Principal principal, HttpServletResponse response) { accessService.checkEventOwnership(principal, eventName); Optional> count = eventManager.getOptionalEventAndOrganizationIdByName(eventName, principal.getName()) .map(e -> waitingQueueManager.loadAllSubscriptionsForEvent(e.getId())); @@ -116,7 +116,7 @@ public List loadAllSubscriptions(@PathVariable("eventN } @GetMapping("/download") - public void downloadAllSubscriptions(@PathVariable("eventName") String eventName, + public void downloadAllSubscriptions(@PathVariable String eventName, @RequestParam(name = "format", defaultValue = "excel") String format, Principal principal, HttpServletResponse response) throws IOException { accessService.checkEventOwnership(principal, eventName); @@ -142,15 +142,15 @@ private static Stream convertSubscriptions(List> removeSubscriber(@PathVariable("eventName") String eventName, - @PathVariable("subscriberId") int subscriberId, + public ResponseEntity> removeSubscriber(@PathVariable String eventName, + @PathVariable int subscriberId, Principal principal) { return performStatusModification(eventName, subscriberId, principal, WaitingQueueSubscription.Status.CANCELLED, WaitingQueueSubscription.Status.WAITING); } @PutMapping("/subscriber/{subscriberId}/restore") - public ResponseEntity> restoreSubscriber(@PathVariable("eventName") String eventName, - @PathVariable("subscriberId") int subscriberId, + public ResponseEntity> restoreSubscriber(@PathVariable String eventName, + @PathVariable int subscriberId, Principal principal) { return performStatusModification(eventName, subscriberId, principal, WaitingQueueSubscription.Status.WAITING, WaitingQueueSubscription.Status.CANCELLED); } diff --git a/src/main/java/alfio/controller/api/admin/AttendeeBulkImportApiController.java b/src/main/java/alfio/controller/api/admin/AttendeeBulkImportApiController.java index 21b9f9bf37..e623aec01e 100644 --- a/src/main/java/alfio/controller/api/admin/AttendeeBulkImportApiController.java +++ b/src/main/java/alfio/controller/api/admin/AttendeeBulkImportApiController.java @@ -35,7 +35,7 @@ public class AttendeeBulkImportApiController { private final AccessService accessService; @PostMapping("") - public Result createReservations(@PathVariable("eventName") String eventName, + public Result createReservations(@PathVariable String eventName, @RequestBody AdminReservationModification body, @RequestParam(name="oneReservationPerAttendee", defaultValue = "false", required = false) boolean oneReservationPerAttendee, Principal principal) { @@ -44,8 +44,8 @@ public Result createReservations(@PathVariable("eventName") String event } @GetMapping("/{requestId}/status") - public Result getRequestsStatus(@PathVariable("eventName") String eventName, - @PathVariable("requestId") String requestId, + public Result getRequestsStatus(@PathVariable String eventName, + @PathVariable String requestId, Principal principal) { accessService.checkEventOwnership(principal, eventName); return requestManager.getRequestStatus(requestId, eventName, principal.getName()); diff --git a/src/main/java/alfio/controller/api/admin/CheckInApiController.java b/src/main/java/alfio/controller/api/admin/CheckInApiController.java index 1c8e21e809..d267e6b8ce 100644 --- a/src/main/java/alfio/controller/api/admin/CheckInApiController.java +++ b/src/main/java/alfio/controller/api/admin/CheckInApiController.java @@ -43,7 +43,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.security.Principal; import java.util.*; import java.util.stream.Collectors; @@ -74,26 +74,26 @@ public static class TicketIdentifierCode { } @GetMapping("/check-in/{eventId}/ticket/{ticketIdentifier}") - public TicketAndCheckInResult findTicketWithUUID(@PathVariable("eventId") int eventId, @PathVariable("ticketIdentifier") String ticketIdentifier, @RequestParam("qrCode") String qrCode, Principal principal) { + public TicketAndCheckInResult findTicketWithUUID(@PathVariable int eventId, @PathVariable String ticketIdentifier, @RequestParam("qrCode") String qrCode, Principal principal) { accessService.checkEventTicketIdentifierMembership(principal, eventId, ticketIdentifier, AccessService.CHECKIN_ROLES); return checkInManager.evaluateTicketStatus(eventId, ticketIdentifier, Optional.ofNullable(qrCode)); } @GetMapping("/check-in/event/{eventName}/ticket/{ticketIdentifier}") - public TicketAndCheckInResult findTicketWithUUID(@PathVariable("eventName") String eventName, @PathVariable("ticketIdentifier") String ticketIdentifier, @RequestParam("qrCode") String qrCode, Principal principal) { + public TicketAndCheckInResult findTicketWithUUID(@PathVariable String eventName, @PathVariable String ticketIdentifier, @RequestParam("qrCode") String qrCode, Principal principal) { accessService.checkEventTicketIdentifierMembership(principal, eventName, ticketIdentifier, AccessService.CHECKIN_ROLES); return checkInManager.evaluateTicketStatus(eventName, ticketIdentifier, Optional.ofNullable(qrCode)); } @GetMapping("/check-in/event/{eventName}/ticket/{ticketIdentifier}/status") - public TicketCheckInStatusResult getTicketStatus(@PathVariable("eventName") String eventName, @PathVariable("ticketIdentifier") String ticketIdentifier, Principal principal) { + public TicketCheckInStatusResult getTicketStatus(@PathVariable String eventName, @PathVariable String ticketIdentifier, Principal principal) { accessService.checkEventTicketIdentifierMembership(principal, eventName, ticketIdentifier, AccessService.CHECKIN_ROLES); return checkInManager.retrieveTicketStatus(ticketIdentifier); } @PostMapping("/check-in/{eventId}/ticket/{ticketIdentifier}") - public TicketAndCheckInResult checkIn(@PathVariable("eventId") int eventId, - @PathVariable("ticketIdentifier") String ticketIdentifier, + public TicketAndCheckInResult checkIn(@PathVariable int eventId, + @PathVariable String ticketIdentifier, @RequestBody TicketCode ticketCode, Principal principal) { accessService.checkEventTicketIdentifierMembership(principal, eventId, ticketIdentifier, AccessService.CHECKIN_ROLES); @@ -101,8 +101,8 @@ public TicketAndCheckInResult checkIn(@PathVariable("eventId") int eventId, } @PostMapping("/check-in/event/{eventName}/ticket/{ticketIdentifier}") - public TicketAndCheckInResult checkIn(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier, + public TicketAndCheckInResult checkIn(@PathVariable String eventName, + @PathVariable String ticketIdentifier, @RequestBody TicketCode ticketCode, @RequestParam(value = "offlineUser", required = false) String offlineUser, Principal principal) { @@ -113,7 +113,7 @@ public TicketAndCheckInResult checkIn(@PathVariable("eventName") String eventNam } @PostMapping("/check-in/event/{eventName}/bulk") - public Map bulkCheckIn(@PathVariable("eventName") String eventName, + public Map bulkCheckIn(@PathVariable String eventName, @RequestBody List ticketIdentifierCodes, @RequestParam(value = "offlineUser", required = false) String offlineUser, @RequestParam(value = "forceCheckInPaymentOnSite", required = false, defaultValue = "false") boolean forceCheckInPaymentOnSite, @@ -133,8 +133,8 @@ public Map bulkCheckIn(@PathVariable("eventName" } @PostMapping("/check-in/{eventId}/ticket/{ticketIdentifier}/manual-check-in") - public boolean manualCheckIn(@PathVariable("eventId") int eventId, - @PathVariable("ticketIdentifier") String ticketIdentifier, + public boolean manualCheckIn(@PathVariable int eventId, + @PathVariable String ticketIdentifier, Principal principal) { accessService.checkEventTicketIdentifierMembership(principal, eventId, ticketIdentifier, AccessService.CHECKIN_ROLES); log.warn("for event id : {} and ticket : {}, a manual check in has been done by {}", eventId, ticketIdentifier, principal.getName()); @@ -142,8 +142,8 @@ public boolean manualCheckIn(@PathVariable("eventId") int eventId, } @PostMapping("/check-in/event/{eventName}/ticket/{ticketIdentifier}/manual-check-in") - public ResponseEntity manualCheckIn(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier, + public ResponseEntity manualCheckIn(@PathVariable String eventName, + @PathVariable String ticketIdentifier, Principal principal) { accessService.checkEventTicketIdentifierMembership(principal, eventName, ticketIdentifier, AccessService.CHECKIN_ROLES); return ResponseEntity.of(eventManager.getOptionalEventAndOrganizationIdByName(eventName, principal.getName()) @@ -151,8 +151,8 @@ public ResponseEntity manualCheckIn(@PathVariable("eventName") String e } @PostMapping("/check-in/{eventId}/ticket/{ticketIdentifier}/revert-check-in") - public boolean revertCheckIn(@PathVariable("eventId") int eventId, - @PathVariable("ticketIdentifier") String ticketIdentifier, + public boolean revertCheckIn(@PathVariable int eventId, + @PathVariable String ticketIdentifier, Principal principal) { accessService.checkEventTicketIdentifierMembership(principal, eventId, ticketIdentifier, AccessService.CHECKIN_ROLES); log.warn("for event id : {} and ticket : {}, a revert of the check in has been done by {}", eventId, ticketIdentifier, principal.getName()); @@ -160,16 +160,16 @@ public boolean revertCheckIn(@PathVariable("eventId") int eventId, } @PostMapping("/check-in/event/{eventName}/ticket/{ticketIdentifier}/revert-check-in") - public ResponseEntity revertCheckIn(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier, + public ResponseEntity revertCheckIn(@PathVariable String eventName, + @PathVariable String ticketIdentifier, Principal principal) { var eventAndOrgId = accessService.checkEventTicketIdentifierMembership(principal, eventName, ticketIdentifier, AccessService.CHECKIN_ROLES); return ResponseEntity.ok(revertCheckIn(eventAndOrgId.getId(), ticketIdentifier, principal)); } @PostMapping("/check-in/event/{eventName}/ticket/{ticketIdentifier}/confirm-on-site-payment") - public TicketAndCheckInResult confirmOnSitePayment(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier, + public TicketAndCheckInResult confirmOnSitePayment(@PathVariable String eventName, + @PathVariable String ticketIdentifier, @RequestBody TicketCode ticketCode, @RequestParam(value = "offlineUser", required = false) String offlineUser, Principal principal) { @@ -180,13 +180,13 @@ public TicketAndCheckInResult confirmOnSitePayment(@PathVariable("eventName") St } @GetMapping("/check-in/event/{eventName}/statistics") - public CheckInStatistics getStatistics(@PathVariable("eventName") String eventName, Principal principal) { + public CheckInStatistics getStatistics(@PathVariable String eventName, Principal principal) { accessService.checkEventMembership(principal, eventName, AccessService.CHECKIN_ROLES); return checkInManager.getStatistics(eventName, principal.getName()); } @PostMapping("/check-in/{eventId}/ticket/{ticketIdentifier}/confirm-on-site-payment") - public OnSitePaymentConfirmation confirmOnSitePayment(@PathVariable("eventId") int eventId, @PathVariable("ticketIdentifier") String ticketIdentifier, Principal principal) { + public OnSitePaymentConfirmation confirmOnSitePayment(@PathVariable int eventId, @PathVariable String ticketIdentifier, Principal principal) { accessService.checkEventTicketIdentifierMembership(principal, eventId, ticketIdentifier, AccessService.CHECKIN_ROLES); return checkInManager.confirmOnSitePayment(ticketIdentifier) .map(s -> new OnSitePaymentConfirmation(true, "ok")) @@ -194,7 +194,7 @@ public OnSitePaymentConfirmation confirmOnSitePayment(@PathVariable("eventId") i } @GetMapping("/check-in/{eventId}/ticket-identifiers") - public List findAllIdentifiersForAdminCheckIn(@PathVariable("eventId") int eventId, + public List findAllIdentifiersForAdminCheckIn(@PathVariable int eventId, @RequestParam(value = "changedSince", required = false) Long changedSince, HttpServletResponse response, Principal principal) { @@ -204,7 +204,7 @@ public List findAllIdentifiersForAdminCheckIn(@PathVariable("eventId") } @GetMapping("/check-in/event/{publicIdentifier}/attendees") - public ResponseEntity searchAttendees(@PathVariable("publicIdentifier") String publicIdentifier, + public ResponseEntity searchAttendees(@PathVariable String publicIdentifier, @RequestParam(value = "query", required = false) String query, @RequestParam(value = "page", required = false, defaultValue = "0") int page, Principal principal) { @@ -219,7 +219,7 @@ public ResponseEntity searchAttendees(@PathVariable("publ } @PostMapping("/check-in/{eventId}/tickets") - public List findAllTicketsForAdminCheckIn(@PathVariable("eventId") int eventId, + public List findAllTicketsForAdminCheckIn(@PathVariable int eventId, @RequestBody List ids, Principal principal) { accessService.checkEventMembership(principal, eventId, AccessService.CHECKIN_ROLES); @@ -228,7 +228,7 @@ public List findAllTicketsForAdminCheckIn(@PathVariable("eventId } @GetMapping("/check-in/{eventName}/label-layout") - public ResponseEntity getLabelLayoutForEvent(@PathVariable("eventName") String eventName, Principal principal) { + public ResponseEntity getLabelLayoutForEvent(@PathVariable String eventName, Principal principal) { var event = accessService.canAccessEvent(principal, eventName); if (checkInManager.isOfflineCheckInEnabled().test(event)) { return parseLabelLayout(event); @@ -238,7 +238,7 @@ public ResponseEntity getLabelLayoutForEvent(@PathVariable("eventNa } @GetMapping("/check-in/{eventName}/offline-identifiers") - public List getOfflineIdentifiers(@PathVariable("eventName") String eventName, + public List getOfflineIdentifiers(@PathVariable String eventName, @RequestParam(value = "changedSince", required = false) Long changedSince, HttpServletResponse resp, Principal principal) { @@ -256,7 +256,7 @@ public List getOfflineIdentifiers(@PathVariable("eventName") String eve } @PostMapping("/check-in/{eventName}/offline") - public Map getOfflineEncryptedInfo(@PathVariable("eventName") String eventName, + public Map getOfflineEncryptedInfo(@PathVariable String eventName, @RequestParam(value = "additionalField", required = false) List additionalFields, @RequestBody List ids, Principal principal) { diff --git a/src/main/java/alfio/controller/api/admin/ConfigurationApiController.java b/src/main/java/alfio/controller/api/admin/ConfigurationApiController.java index 67b99248a0..3801eebaa4 100644 --- a/src/main/java/alfio/controller/api/admin/ConfigurationApiController.java +++ b/src/main/java/alfio/controller/api/admin/ConfigurationApiController.java @@ -91,13 +91,13 @@ public boolean updateConfiguration(@RequestBody Map> loadOrganizationConfiguration(@PathVariable("organizationId") int organizationId, Principal principal) { + public Map> loadOrganizationConfiguration(@PathVariable int organizationId, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); return configurationManager.loadOrganizationConfig(organizationId, principal.getName()); } @PostMapping(value = "/organizations/{organizationId}/update") - public boolean updateOrganizationConfiguration(@PathVariable("organizationId") int organizationId, + public boolean updateOrganizationConfiguration(@PathVariable int organizationId, @RequestBody Map> input, Principal principal) { // id of input are not used, so not needed to check for consistency accessService.checkOrganizationOwnership(principal, organizationId); @@ -107,7 +107,7 @@ public boolean updateOrganizationConfiguration(@PathVariable("organizationId") i } @GetMapping(value = "/events/{eventId}/load") - public Map> loadEventConfiguration(@PathVariable("eventId") int eventId, + public Map> loadEventConfiguration(@PathVariable int eventId, Principal principal) { accessService.checkEventOwnership(principal, eventId); return configurationManager.loadEventConfig(eventId, principal.getName()); @@ -115,7 +115,7 @@ public Map> loadEventConf @GetMapping("/events/{eventName}/single/{key}") public ResponseEntity getSingleConfigForEvent(@PathVariable("eventName") String eventShortName, - @PathVariable("key") String key, + @PathVariable String key, Principal principal) { accessService.checkEventOwnership(principal, eventShortName); @@ -134,8 +134,8 @@ public ResponseEntity getSingleConfigForEvent(@PathVariable("eventName") } @GetMapping("/organizations/{organizationId}/single/{key}") - public ResponseEntity getSingleConfigForOrganization(@PathVariable("organizationId") int organizationId, - @PathVariable("key") String key, + public ResponseEntity getSingleConfigForOrganization(@PathVariable int organizationId, + @PathVariable String key, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); @@ -147,7 +147,7 @@ public ResponseEntity getSingleConfigForOrganization(@PathVariable("orga } @PostMapping(value = "/organizations/{organizationId}/events/{eventId}/update") - public boolean updateEventConfiguration(@PathVariable("organizationId") int organizationId, @PathVariable("eventId") int eventId, + public boolean updateEventConfiguration(@PathVariable int organizationId, @PathVariable int eventId, @RequestBody Map> input, Principal principal) { // id of input are not used, so not needed to check for consistency accessService.checkEventOwnership(principal, eventId, organizationId); @@ -157,7 +157,7 @@ public boolean updateEventConfiguration(@PathVariable("organizationId") int orga } @PostMapping(value = "/events/{eventId}/categories/{categoryId}/update") - public boolean updateCategoryConfiguration(@PathVariable("categoryId") int categoryId, @PathVariable("eventId") int eventId, + public boolean updateCategoryConfiguration(@PathVariable int categoryId, @PathVariable int eventId, @RequestBody Map> input, Principal principal) { // id of input are not used, so no needed to check for consistency accessService.checkCategoryOwnership(principal, eventId, categoryId); @@ -167,34 +167,34 @@ public boolean updateCategoryConfiguration(@PathVariable("categoryId") int categ } @GetMapping(value = "/events/{eventId}/categories/{categoryId}/load") - public Map> loadCategoryConfiguration(@PathVariable("eventId") int eventId, @PathVariable("categoryId") int categoryId, Principal principal) { + public Map> loadCategoryConfiguration(@PathVariable int eventId, @PathVariable int categoryId, Principal principal) { accessService.checkCategoryOwnership(principal, eventId, categoryId); return configurationManager.loadCategoryConfig(eventId, categoryId, principal.getName()); } @DeleteMapping(value = "/organization/{organizationId}/key/{key}") - public boolean deleteOrganizationLevelKey(@PathVariable("organizationId") int organizationId, @PathVariable("key") ConfigurationKeys key, Principal principal) { + public boolean deleteOrganizationLevelKey(@PathVariable int organizationId, @PathVariable ConfigurationKeys key, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); configurationManager.deleteOrganizationLevelByKey(key.getValue(), organizationId, principal.getName()); return true; } @DeleteMapping(value = "/event/{eventId}/key/{key}") - public boolean deleteEventLevelKey(@PathVariable("eventId") int eventId, @PathVariable("key") ConfigurationKeys key, Principal principal) { + public boolean deleteEventLevelKey(@PathVariable int eventId, @PathVariable ConfigurationKeys key, Principal principal) { accessService.checkEventOwnership(principal, eventId); configurationManager.deleteEventLevelByKey(key.getValue(), eventId, principal.getName()); return true; } @DeleteMapping(value = "/event/{eventId}/category/{categoryId}/key/{key}") - public boolean deleteCategoryLevelKey(@PathVariable("eventId") int eventId, @PathVariable("categoryId") int categoryId, @PathVariable("key") ConfigurationKeys key, Principal principal) { + public boolean deleteCategoryLevelKey(@PathVariable int eventId, @PathVariable int categoryId, @PathVariable ConfigurationKeys key, Principal principal) { accessService.checkCategoryOwnership(principal, eventId, categoryId); configurationManager.deleteCategoryLevelByKey(key.getValue(), eventId, categoryId, principal.getName()); return true; } @DeleteMapping(value = "/key/{key}") - public boolean deleteKey(@PathVariable("key") String key, Principal principal) { + public boolean deleteKey(@PathVariable String key, Principal principal) { accessService.ensureAdmin(principal); configurationManager.deleteKey(key); return true; @@ -212,7 +212,7 @@ public InstanceSettings loadInstanceSettings() { } @GetMapping(value = "/platform-mode/status/{organizationId}") - public Map loadPlatformModeStatus(@PathVariable("organizationId") int organizationId, Principal principal) { + public Map loadPlatformModeStatus(@PathVariable int organizationId, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); Map result = new HashMap<>(); boolean platformModeEnabled = configurationManager.getForSystem(PLATFORM_MODE_ENABLED).getValueAsBooleanOrDefault(); @@ -231,14 +231,14 @@ public Collection getSettingCategories() { } @GetMapping(value = "/event/{eventId}/invoice-first-date") - public ResponseEntity getFirstInvoiceDate(@PathVariable("eventId") Integer eventId, Principal principal) { + public ResponseEntity getFirstInvoiceDate(@PathVariable Integer eventId, Principal principal) { accessService.checkEventOwnership(principal, eventId); return ResponseEntity.of(optionally(() -> eventManager.getSingleEventById(eventId, principal.getName())) .map(event -> billingDocumentManager.findFirstInvoiceDate(event.getId()).orElseGet(() -> ZonedDateTime.now(clockProvider.getClock().withZone(event.getZoneId()))))); } @GetMapping(value = "/event/{eventId}/matching-invoices") - public ResponseEntity> getMatchingInvoicesForEvent(@PathVariable("eventId") Integer eventId, + public ResponseEntity> getMatchingInvoicesForEvent(@PathVariable Integer eventId, @RequestParam("from") long fromInstant, @RequestParam("to") long toInstant, Principal principal) { @@ -257,7 +257,7 @@ public ResponseEntity> getMatchingInvoicesForEvent(@PathVariable(" } @PostMapping(value = "/event/{eventId}/regenerate-invoices") - public ResponseEntity regenerateInvoices(@PathVariable("eventId") Integer eventId, + public ResponseEntity regenerateInvoices(@PathVariable Integer eventId, @RequestBody List documentIds, Principal principal) { // diff --git a/src/main/java/alfio/controller/api/admin/CustomMessagesApiController.java b/src/main/java/alfio/controller/api/admin/CustomMessagesApiController.java index eecf24ad73..edec73354c 100644 --- a/src/main/java/alfio/controller/api/admin/CustomMessagesApiController.java +++ b/src/main/java/alfio/controller/api/admin/CustomMessagesApiController.java @@ -22,7 +22,6 @@ import lombok.extern.log4j.Log4j2; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; @@ -39,7 +38,6 @@ public class CustomMessagesApiController { private final CustomMessageManager customMessageManager; private final AccessService accessService; - @Autowired public CustomMessagesApiController(CustomMessageManager customMessageManager, AccessService accessService) { this.customMessageManager = customMessageManager; @@ -55,7 +53,7 @@ public String handleException(IllegalStateException ex) { } @PostMapping("/preview") - public Map preview(@PathVariable("eventName") String eventName, + public Map preview(@PathVariable String eventName, @RequestParam(required = false, value = "categoryId") Integer categoryId, @RequestBody List messageModifications, Principal principal) { accessService.checkEventOwnership(principal, eventName); @@ -63,7 +61,7 @@ public Map preview(@PathVariable("eventName") String eventName, } @PostMapping("/send") - public void send(@PathVariable("eventName") String eventName, + public void send(@PathVariable String eventName, @RequestParam(required = false, value = "categoryId") Integer categoryId, @RequestBody List messageModifications, Principal principal) { diff --git a/src/main/java/alfio/controller/api/admin/EmailMessageApiController.java b/src/main/java/alfio/controller/api/admin/EmailMessageApiController.java index 80c9c9767c..d80ab4dbaa 100644 --- a/src/main/java/alfio/controller/api/admin/EmailMessageApiController.java +++ b/src/main/java/alfio/controller/api/admin/EmailMessageApiController.java @@ -47,8 +47,8 @@ public class EmailMessageApiController { private final AccessService accessService; @GetMapping("/") - public PageAndContent> loadEmailMessages(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, + public PageAndContent> loadEmailMessages(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "search", required = false) String search, Principal principal) { @@ -62,9 +62,9 @@ public PageAndContent> loadEmailMessages(@PathVari } @GetMapping("/{messageId}") - public LightweightEmailMessage loadEmailMessage(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("messageId") int messageId, + public LightweightEmailMessage loadEmailMessage(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable int messageId, Principal principal) { var purchaseContext = purchaseContextManager.findBy(purchaseContextType, publicIdentifier).orElseThrow(); accessService.checkOrganizationOwnership(principal, purchaseContext.getOrganizationId()); diff --git a/src/main/java/alfio/controller/api/admin/EventApiController.java b/src/main/java/alfio/controller/api/admin/EventApiController.java index 3488df89cf..95f04a57ff 100644 --- a/src/main/java/alfio/controller/api/admin/EventApiController.java +++ b/src/main/java/alfio/controller/api/admin/EventApiController.java @@ -42,8 +42,11 @@ import alfio.repository.PurchaseContextFieldRepository; import alfio.repository.SponsorScanRepository; import alfio.util.*; -import com.opencsv.CSVReader; -import com.opencsv.exceptions.CsvException; +import com.fasterxml.jackson.databind.MappingIterator; +import com.fasterxml.jackson.dataformat.csv.CsvMapper; +import com.fasterxml.jackson.dataformat.csv.CsvSchema; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import lombok.AllArgsConstructor; import lombok.Data; import lombok.Getter; @@ -63,8 +66,6 @@ import org.springframework.validation.Errors; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; @@ -89,7 +90,6 @@ import static alfio.util.Wrappers.optionally; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.stream.Collectors.toList; -import static org.apache.commons.lang3.StringUtils.defaultString; @RestController @RequestMapping("/admin/api") @@ -144,7 +144,7 @@ public String unhandledIllegalStateException(IllegalStateException e) { @GetMapping("/paymentProxies/{organizationId}") @ResponseStatus(HttpStatus.OK) - public List getPaymentProxies( @PathVariable("organizationId") int organizationId, Principal principal) { + public List getPaymentProxies( @PathVariable int organizationId, Principal principal) { accessService.checkOrganizationMembership(principal, organizationId, AccessService.MEMBERSHIP_ROLES); return userManager.findUserOrganizations(principal.getName()) .stream() @@ -211,13 +211,13 @@ public ResponseEntity getSingleEvent(@PathVariable("name") } @DeleteMapping("/events/{eventId}") - public void deleteEvent(@PathVariable("eventId") int eventId, Principal principal) { + public void deleteEvent(@PathVariable int eventId, Principal principal) { accessService.checkEventOwnership(principal, eventId); eventManager.deleteEvent(eventId, principal.getName()); } @GetMapping("/events/id/{eventId}") - public Event getSingleEventById(@PathVariable("eventId") int eventId, Principal principal) { + public Event getSingleEventById(@PathVariable int eventId, Principal principal) { accessService.checkEventOwnership(principal, eventId); return eventManager.getSingleEventById(eventId, principal.getName()); } @@ -273,7 +273,7 @@ public Map getEventNamesByIds(@RequestParam("eventIds") List getEventsNameInOrganization(@PathVariable("orgId") int orgId, Principal principal) { + public Map getEventsNameInOrganization(@PathVariable int orgId, Principal principal) { accessService.checkOrganizationOwnership(principal, orgId); return eventManager.getEventsNameInOrganization(orgId, principal); } @@ -286,35 +286,35 @@ public String insertEvent(@RequestBody EventModification eventModification, Prin } @PutMapping("/events/{id}/status") - public String activateEvent(@PathVariable("id") int id, @RequestParam("active") boolean active, Principal principal) { + public String activateEvent(@PathVariable int id, @RequestParam("active") boolean active, Principal principal) { accessService.checkEventOwnership(principal, id); eventManager.toggleActiveFlag(id, principal.getName(), active); return OK; } @PostMapping("/events/{id}/header/update") - public ValidationResult updateHeader(@PathVariable("id") int id, @RequestBody EventModification eventModification, Errors errors, Principal principal) { + public ValidationResult updateHeader(@PathVariable int id, @RequestBody EventModification eventModification, Errors errors, Principal principal) { accessService.checkEventOwnership(principal, id); Event event = eventManager.getSingleEventById(id, principal.getName()); return validateEventHeader(Optional.of(event), eventModification, getDescriptionLength(), errors).ifSuccess(() -> eventManager.updateEventHeader(event, eventModification, principal.getName())); } @PostMapping("/events/{id}/prices/update") - public ValidationResult updatePrices(@PathVariable("id") int id, @RequestBody EventModification eventModification, Errors errors, Principal principal) { + public ValidationResult updatePrices(@PathVariable int id, @RequestBody EventModification eventModification, Errors errors, Principal principal) { accessService.checkEventOwnership(principal, id); Event event = eventManager.getSingleEventById(id, principal.getName()); return validateEventPrices(eventModification, errors).ifSuccess(() -> eventManager.updateEventSeatsAndPrices(event, eventModification, principal.getName())); } @PostMapping("/events/{eventId}/categories/{categoryId}/update") - public ValidationResult updateExistingCategory(@PathVariable("eventId") int eventId, @PathVariable("categoryId") int categoryId, @RequestBody TicketCategoryModification category, Errors errors, Principal principal) { + public ValidationResult updateExistingCategory(@PathVariable int eventId, @PathVariable int categoryId, @RequestBody TicketCategoryModification category, Errors errors, Principal principal) { accessService.checkCategoryOwnership(principal, eventId, categoryId); Assert.isTrue(categoryId == category.getId().intValue(), "categoryId must be equal to category.getId()"); return validateCategory(category, errors, getDescriptionLength()).ifSuccess(() -> eventManager.updateCategory(categoryId, eventId, category, principal.getName())); } @PostMapping("/events/{eventId}/categories/new") - public ValidationResult createCategory(@PathVariable("eventId") int eventId, @RequestBody TicketCategoryModification category, Errors errors, Principal principal) { + public ValidationResult createCategory(@PathVariable int eventId, @RequestBody TicketCategoryModification category, Errors errors, Principal principal) { accessService.checkEventOwnership(principal, eventId); return validateCategory(category, errors, getDescriptionLength()).ifSuccess(() -> eventManager.insertCategory(eventId, category, principal.getName())); } @@ -327,21 +327,21 @@ public String reallocateTickets(@RequestBody TicketAllocationModification form, } @PutMapping("/events/{eventName}/category/{categoryId}/unbind-tickets") - public String unbindTickets(@PathVariable("eventName") String eventName, @PathVariable("categoryId") int categoryId, Principal principal) { + public String unbindTickets(@PathVariable String eventName, @PathVariable int categoryId, Principal principal) { accessService.checkCategoryOwnership(principal, eventName, categoryId); eventManager.unbindTickets(eventName, categoryId, principal.getName()); return OK; } @DeleteMapping("/events/{eventName}/category/{categoryId}") - public String deleteCategory(@PathVariable("eventName") String eventName, @PathVariable("categoryId") int categoryId, Principal principal) { + public String deleteCategory(@PathVariable String eventName, @PathVariable int categoryId, Principal principal) { accessService.checkCategoryOwnership(principal, eventName, categoryId); eventManager.deleteCategory(eventName, categoryId, principal.getName()); return OK; } @PutMapping("/events/{eventName}/rearrange-categories") - public ResponseEntity rearrangeCategories(@PathVariable("eventName") String eventName, @RequestBody List categories, Principal principal) { + public ResponseEntity rearrangeCategories(@PathVariable String eventName, @RequestBody List categories, Principal principal) { accessService.checkCategoryOwnership(principal, eventName, categories.stream().map(CategoryOrdinalModification::getId).collect(Collectors.toSet())); if(CollectionUtils.isEmpty(categories)) { return ResponseEntity.badRequest().build(); @@ -358,7 +358,7 @@ public ResponseEntity rearrangeCategories(@PathVariable("eventName") Str private static final List ITALIAN_E_INVOICING_FIELDS = List.of(FISCAL_CODE, REFERENCE_TYPE, "Addressee Code", "PEC"); @GetMapping("/events/{eventName}/export") - public void downloadAllTicketsCSV(@PathVariable("eventName") String eventName, @RequestParam(name = "format", defaultValue = "excel") String format, HttpServletRequest request, HttpServletResponse response, Principal principal) throws IOException { + public void downloadAllTicketsCSV(@PathVariable String eventName, @RequestParam(name = "format", defaultValue = "excel") String format, HttpServletRequest request, HttpServletResponse response, Principal principal) throws IOException { accessService.checkEventOwnership(principal, eventName); List fields = Arrays.asList(Optional.ofNullable(request.getParameterValues("fields")).orElse(new String[] {})); Event event = loadEvent(eventName, principal); @@ -427,7 +427,7 @@ private Stream exportLines(String eventName, Principal principal, List boolean paymentGatewayRequested = fields.contains(PAYMENT_METHOD); if((paymentIdRequested || paymentGatewayRequested)) { Optional transaction = trs.getTransaction(); - if(paymentIdRequested) { line.add(defaultString(transaction.map(Transaction::getPaymentId).orElse(null), transaction.map(Transaction::getTransactionId).orElse(""))); } + if(paymentIdRequested) { line.add(Objects.toString(transaction.map(Transaction::getPaymentId).orElse(null), transaction.map(Transaction::getTransactionId).orElse(""))); } if(paymentGatewayRequested) { line.add(transaction.map(tr -> tr.getPaymentProxy().name()).orElse("")); } } @@ -455,7 +455,7 @@ private Stream exportLines(String eventName, Principal principal, List } @GetMapping("/events/{eventName}/sponsor-scan/export") - public void downloadSponsorScanExport(@PathVariable("eventName") String eventName, @RequestParam(name = "format", defaultValue = "excel") String format, HttpServletResponse response, Principal principal) throws IOException { + public void downloadSponsorScanExport(@PathVariable String eventName, @RequestParam(name = "format", defaultValue = "excel") String format, HttpServletResponse response, Principal principal) throws IOException { accessService.checkEventOwnership(principal, eventName); var event = eventManager.getSingleEvent(eventName, principal.getName()); List fields = purchaseContextFieldRepository.findAdditionalFieldsForEvent(event.getId()); @@ -466,7 +466,7 @@ public void downloadSponsorScanExport(@PathVariable("eventName") String eventNam header.add("Timestamp"); header.add("Full name"); header.add("Email"); - header.addAll(fields.stream().map(PurchaseContextFieldConfiguration::getName).collect(toList())); + header.addAll(fields.stream().map(PurchaseContextFieldConfiguration::getName).toList()); header.add("Sponsor notes"); header.add("Lead Status"); header.add("Operator"); @@ -521,7 +521,7 @@ private void exportSponsorScanCSV(String eventName, List header, Stream< } @GetMapping("/events/{eventName}/fields") - public List> getAllFields(@PathVariable("eventName") String eventName, Principal principal) { + public List> getAllFields(@PathVariable String eventName, Principal principal) { accessService.checkEventOwnership(principal, eventName); var eventAndOrganizationId = eventManager.getEventAndOrganizationId(eventName, principal.getName()); List> fields = new ArrayList<>(FIXED_PAIRS); @@ -533,13 +533,13 @@ public List> getAllFields(@PathVariable("eventN } @GetMapping("/events/{eventName}/pending-payments") - public List getPendingPayments(@PathVariable("eventName") String eventName, Principal principal) { + public List getPendingPayments(@PathVariable String eventName, Principal principal) { accessService.checkEventOwnership(principal, eventName); return ticketReservationManager.getPendingPayments(eventName); } @GetMapping("/events/{eventName}/pending-payments-count") - public Integer getPendingPaymentsCount(@PathVariable("eventName") String eventName, Principal principal) { + public Integer getPendingPaymentsCount(@PathVariable String eventName, Principal principal) { accessService.checkEventMembership(principal, eventName, AccessService.MEMBERSHIP_ROLES); return eventManager.getOptionalEventAndOrganizationIdByName(eventName, principal.getName()) .map(e -> ticketReservationManager.getPendingPaymentsCount(e.getId())) @@ -547,8 +547,8 @@ public Integer getPendingPaymentsCount(@PathVariable("eventName") String eventNa } @PostMapping("/events/{eventName}/pending-payments/{reservationId}/confirm") - public String confirmPayment(@PathVariable("eventName") String eventName, - @PathVariable("reservationId") String reservationId, + public String confirmPayment(@PathVariable String eventName, + @PathVariable String reservationId, @RequestBody TransactionMetadataModification transactionMetadataModification, Principal principal) { accessService.checkEventAndReservationOwnership(principal, eventName, Set.of(reservationId)); @@ -564,8 +564,8 @@ public String confirmPayment(@PathVariable("eventName") String eventName, } @DeleteMapping("/events/{eventName}/pending-payments/{reservationId}") - public String deletePendingPayment(@PathVariable("eventName") String eventName, - @PathVariable("reservationId") String reservationId, + public String deletePendingPayment(@PathVariable String eventName, + @PathVariable String reservationId, @RequestParam(required = false, value = "credit", defaultValue = "false") Boolean creditReservation, @RequestParam(required = false, value = "notify", defaultValue = "true") Boolean notify, Principal principal) { @@ -575,29 +575,30 @@ public String deletePendingPayment(@PathVariable("eventName") String eventName, } @PostMapping("/events/{eventName}/pending-payments/bulk-confirmation") - public List> bulkConfirmation(@PathVariable("eventName") String eventName, + public List> bulkConfirmation(@PathVariable String eventName, Principal principal, - @RequestBody UploadBase64FileModification file) throws IOException, CsvException { - try(InputStreamReader isr = new InputStreamReader(file.getInputStream(), UTF_8); CSVReader reader = new CSVReader(isr)) { - var all = reader.readAll(); + @RequestBody UploadBase64FileModification file) throws IOException { + record Transaction(String reservationId, BigDecimal price) {} + var csvMapper = new CsvMapper(); + try(InputStreamReader isr = new InputStreamReader(file.getInputStream(), UTF_8)) { + MappingIterator iterator = csvMapper.readerFor(Transaction.class) + .with(CsvSchema.emptySchema().withoutHeader()) + .readValues(isr); + var all = iterator.readAll(); + var reservationIds = all.stream() - .map(line -> { - Validate.isTrue(line.length >= 2); - return line[0]; - }) + .map(Transaction::reservationId) .collect(Collectors.toSet()); accessService.checkEventAndReservationOwnership(principal, eventName, reservationIds); Event event = loadEvent(eventName, principal); return all.stream() .map(line -> { - String reservationID = null; try { - reservationID = line[0]; - ticketReservationManager.validateAndConfirmOfflinePayment(reservationID, event, new BigDecimal(line[1]), principal.getName()); - return Triple.of(Boolean.TRUE, reservationID, ""); + ticketReservationManager.validateAndConfirmOfflinePayment(line.reservationId, event, line.price, principal.getName()); + return Triple.of(Boolean.TRUE, line.reservationId, ""); } catch (Exception e) { - return Triple.of(Boolean.FALSE, Optional.ofNullable(reservationID).orElse(""), e.getMessage()); + return Triple.of(Boolean.FALSE, Optional.ofNullable(line.reservationId).orElse(""), e.getMessage()); } }) .collect(toList()); @@ -605,22 +606,22 @@ public List> bulkConfirmation(@PathVariable("eve } @PutMapping("/events/{eventName}/categories/{categoryId}/tickets/{ticketId}/toggle-locking") - public boolean toggleTicketLocking(@PathVariable("eventName") String eventName, - @PathVariable("categoryId") int categoryId, - @PathVariable("ticketId") int ticketId, + public boolean toggleTicketLocking(@PathVariable String eventName, + @PathVariable int categoryId, + @PathVariable int ticketId, Principal principal) { accessService.checkCategoryOwnershipAndTicket(principal, eventName, categoryId, ticketId); return eventManager.toggleTicketLocking(eventName, categoryId, ticketId, principal.getName()); } @GetMapping("/events/{eventName}/languages") - public List getAvailableLocales(@PathVariable("eventName") String eventName, Principal principal) { + public List getAvailableLocales(@PathVariable String eventName, Principal principal) { accessService.checkEventOwnership(principal, eventName); return i18nManager.getEventLanguages(eventName); } @GetMapping("/events/{eventName}/invoices/count") - public Integer countBillingDocumentsForEvent(@PathVariable("eventName") String eventName, Principal principal) { + public Integer countBillingDocumentsForEvent(@PathVariable String eventName, Principal principal) { accessService.checkEventOwnership(principal, eventName); return eventManager.getOptionalEventAndOrganizationIdByName(eventName, principal.getName()) .map(e -> ticketReservationManager.countBillingDocuments(e.getId())) @@ -628,7 +629,7 @@ public Integer countBillingDocumentsForEvent(@PathVariable("eventName") String e } @GetMapping("/events/{eventName}/all-documents") - public void getAllInvoices(@PathVariable("eventName") String eventName, HttpServletResponse response, Principal principal) throws IOException { + public void getAllInvoices(@PathVariable String eventName, HttpServletResponse response, Principal principal) throws IOException { accessService.checkEventOwnership(principal, eventName); Event event = loadEvent(eventName, principal); @@ -674,7 +675,7 @@ private void addPdfToZip(Event event, ZipOutputStream zipOS, TicketReservation r } @GetMapping("/events/{eventName}/all-documents-xls") - public void getAllDocumentsXls(@PathVariable("eventName") String eventName, HttpServletResponse response, Principal principal) throws IOException { + public void getAllDocumentsXls(@PathVariable String eventName, HttpServletResponse response, Principal principal) throws IOException { accessService.checkEventOwnership(principal, eventName); Event event = loadEvent(eventName, principal); @@ -747,7 +748,7 @@ public List getSupportedLanguages() { } @GetMapping("/events/{eventName}/category/{categoryId}/ticket") - public PageAndContent> getTicketsInCategory(@PathVariable("eventName") String eventName, @PathVariable("categoryId") int categoryId, + public PageAndContent> getTicketsInCategory(@PathVariable String eventName, @PathVariable int categoryId, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "search", required = false) String search, Principal principal) { @@ -757,7 +758,7 @@ public PageAndContent> getTicketsInCategory(@PathVaria } @GetMapping("/events/{eventName}/ticket-sold-statistics") - public ResponseEntity getTicketsStatistics(@PathVariable("eventName") String eventName, + public ResponseEntity getTicketsStatistics(@PathVariable String eventName, @RequestParam(value = "from", required = false) String f, @RequestParam(value = "to", required = false) String t, Principal principal) { @@ -799,9 +800,9 @@ private ZonedDateTime parseDate(String dateToParse, } @DeleteMapping("/events/{eventName}/reservation/{reservationId}/transaction/{transactionId}/discard") - public ResponseEntity discardMatchingPayment(@PathVariable("eventName") String eventName, - @PathVariable("reservationId") String reservationId, - @PathVariable("transactionId") int transactionId, + public ResponseEntity discardMatchingPayment(@PathVariable String eventName, + @PathVariable String reservationId, + @PathVariable int transactionId, Principal principal) { accessService.checkEventAndReservationAndTransactionOwnership(principal, eventName, reservationId, transactionId); var result = ticketReservationManager.discardMatchingPayment(eventName, reservationId, transactionId); @@ -813,7 +814,7 @@ public ResponseEntity discardMatchingPayment(@PathVariable("eventName") } @PutMapping("/events/{eventName}/metadata") - public ResponseEntity updateMetadata(@PathVariable("eventName") String eventName, + public ResponseEntity updateMetadata(@PathVariable String eventName, @RequestBody MetadataModification metadataModification, Principal principal) { accessService.checkEventOwnership(principal, eventName); @@ -825,15 +826,15 @@ public ResponseEntity updateMetadata(@PathVariable("eventName") String } @GetMapping("/events/{eventName}/metadata") - public ResponseEntity loadMetadata(@PathVariable("eventName") String eventName, Principal principal) { + public ResponseEntity loadMetadata(@PathVariable String eventName, Principal principal) { accessService.checkEventOwnership(principal, eventName); return ResponseEntity.of(eventManager.getOptionalEventAndOrganizationIdByName(eventName, principal.getName()) .map(eventManager::getMetadataForEvent)); } @PutMapping("/events/{eventName}/category/{categoryId}/metadata") - public ResponseEntity updateCategoryMetadata(@PathVariable("eventName") String eventName, - @PathVariable("categoryId") int categoryId, + public ResponseEntity updateCategoryMetadata(@PathVariable String eventName, + @PathVariable int categoryId, @RequestBody MetadataModification metadataModification, Principal principal) { accessService.checkCategoryOwnership(principal, eventName, categoryId); @@ -846,8 +847,8 @@ public ResponseEntity updateCategoryMetadata(@PathVariable("eventName") @GetMapping("/events/{eventName}/category/{categoryId}/metadata") - public ResponseEntity loadCategoryMetadata(@PathVariable("eventName") String eventName, - @PathVariable("categoryId") int categoryId, + public ResponseEntity loadCategoryMetadata(@PathVariable String eventName, + @PathVariable int categoryId, Principal principal) { accessService.checkCategoryOwnership(principal, eventName, categoryId); return ResponseEntity.of(eventManager.getOptionalEventAndOrganizationIdByName(eventName, principal.getName()) @@ -855,8 +856,8 @@ public ResponseEntity loadCategoryMetadata(@PathVariable("eventNa } @PostMapping("/events/{eventName}/capability/{capability}") - public ResponseEntity executeCapabilityForEvent(@PathVariable("eventName") String eventName, - @PathVariable("capability") ExtensionCapability capability, + public ResponseEntity executeCapabilityForEvent(@PathVariable String eventName, + @PathVariable ExtensionCapability capability, @RequestBody Map params, Principal principal) { accessService.checkEventOwnership(principal, eventName); diff --git a/src/main/java/alfio/controller/api/admin/ExportApiController.java b/src/main/java/alfio/controller/api/admin/ExportApiController.java index 70ed2c1c7d..325bf832b0 100644 --- a/src/main/java/alfio/controller/api/admin/ExportApiController.java +++ b/src/main/java/alfio/controller/api/admin/ExportApiController.java @@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.security.Principal; import java.time.LocalDate; diff --git a/src/main/java/alfio/controller/api/admin/ExtensionApiController.java b/src/main/java/alfio/controller/api/admin/ExtensionApiController.java index de63fd112d..9642c753e7 100644 --- a/src/main/java/alfio/controller/api/admin/ExtensionApiController.java +++ b/src/main/java/alfio/controller/api/admin/ExtensionApiController.java @@ -90,7 +90,7 @@ public ResponseEntity> create(@RequestBody Ext } @PostMapping(value = "{path}/{name}") - public ResponseEntity> update(@PathVariable("path") String path, @PathVariable("name") String name, @RequestBody Extension script, Principal principal) { + public ResponseEntity> update(@PathVariable String path, @PathVariable String name, @RequestBody Extension script, Principal principal) { return createOrUpdate(path, name, script, principal); } @@ -106,20 +106,20 @@ private ResponseEntity> createOrUpdate(String } @GetMapping("{path}/{name}") - public ResponseEntity loadSingle(@PathVariable("path") String path, @PathVariable("name") String name, Principal principal) { + public ResponseEntity loadSingle(@PathVariable String path, @PathVariable String name, Principal principal) { accessService.ensureAdmin(principal); return extensionService.getSingle(URLDecoder.decode(path, StandardCharsets.UTF_8), name).map(ResponseEntity::ok).orElseGet(() -> ResponseEntity.notFound().build()); } @DeleteMapping(value = "{path}/{name}") - public void delete(@PathVariable("path") String path, @PathVariable("name") String name, Principal principal) { + public void delete(@PathVariable String path, @PathVariable String name, Principal principal) { accessService.ensureAdmin(principal); extensionService.delete(path, name); } @PostMapping(value = "/{path}/{name}/toggle/{enable}") - public void toggle(@PathVariable("path") String path, @PathVariable("name") String name, @PathVariable("enable") boolean enable, Principal principal) { + public void toggle(@PathVariable String path, @PathVariable String name, @PathVariable boolean enable, Principal principal) { accessService.ensureAdmin(principal); extensionService.toggle(path, name, enable); } @@ -143,13 +143,13 @@ public void bulkUpdateSystem(@RequestBody List toUpdate, } @DeleteMapping("/setting/system/{id}") - public void deleteSystemSettingValue(@PathVariable("id") int id, Principal principal) { + public void deleteSystemSettingValue(@PathVariable int id, Principal principal) { accessService.ensureAdmin(principal); extensionService.deleteSettingValue(id, "-"); } @GetMapping("/setting/organization/{orgId}") - public Map> getParametersFor(@PathVariable("orgId") int orgId, Principal principal) { + public Map> getParametersFor(@PathVariable int orgId, Principal principal) { accessService.checkOrganizationOwnership(principal, orgId); Organization org = userManager.findOrganizationById(orgId, principal.getName()); return extensionService.getConfigurationParametersFor("-" + org.getId(), "-" + org.getId()+"-%", "ORGANIZATION") @@ -157,7 +157,7 @@ public Map> getParametersFor(@ } @PostMapping("/setting/organization/{orgId}/bulk-update") - public void bulkUpdateOrganization(@PathVariable("orgId") int orgId, @RequestBody List toUpdate, Principal principal) { + public void bulkUpdateOrganization(@PathVariable int orgId, @RequestBody List toUpdate, Principal principal) { accessService.checkOrganizationOwnership(principal, orgId); Organization org = userManager.findOrganizationById(orgId, principal.getName()); ensureIdsArePresent(toUpdate, extensionService.getConfigurationParametersFor("-" + org.getId(), "-" + org.getId()+"-%", "ORGANIZATION")); @@ -165,13 +165,13 @@ public void bulkUpdateOrganization(@PathVariable("orgId") int orgId, @RequestBod } @DeleteMapping("/setting/organization/{orgId}/{id}") - public void deleteOrganizationSettingValue(@PathVariable("orgId") int orgId, @PathVariable("id") int id, Principal principal) { + public void deleteOrganizationSettingValue(@PathVariable int orgId, @PathVariable int id, Principal principal) { accessService.checkOrganizationOwnership(principal, orgId); extensionService.deleteSettingValue(id, "-" + orgId); } @GetMapping("/setting/organization/{orgId}/event/{shortName}") - public Map> getParametersFor(@PathVariable("orgId") int orgId, + public Map> getParametersFor(@PathVariable int orgId, @PathVariable("shortName") String eventShortName, Principal principal) { @@ -183,7 +183,7 @@ public Map> getParametersFor(@ } @PostMapping("/setting/organization/{orgId}/event/{shortName}/bulk-update") - public void bulkUpdateEvent(@PathVariable("orgId") int orgId, @PathVariable("shortName") String eventShortName, + public void bulkUpdateEvent(@PathVariable int orgId, @PathVariable("shortName") String eventShortName, @RequestBody List toUpdate, Principal principal) { accessService.checkEventOwnership(principal, eventShortName, orgId); Organization org = userManager.findOrganizationById(orgId, principal.getName()); @@ -194,7 +194,7 @@ public void bulkUpdateEvent(@PathVariable("orgId") int orgId, @PathVariable("sho } @DeleteMapping("/setting/organization/{orgId}/event/{shortName}/{id}") - public void deleteEventSettingValue(@PathVariable("orgId") int orgId, @PathVariable("shortName") String eventShortName, @PathVariable("id") int id, Principal principal) { + public void deleteEventSettingValue(@PathVariable int orgId, @PathVariable("shortName") String eventShortName, @PathVariable int id, Principal principal) { accessService.checkEventOwnership(principal, eventShortName, orgId); var event = eventManager.getOptionalEventAndOrganizationIdByName(eventShortName, principal.getName()).orElseThrow(IllegalStateException::new); extensionService.deleteSettingValue(id, generatePatternFrom(event)); diff --git a/src/main/java/alfio/controller/api/admin/FileUploadApiController.java b/src/main/java/alfio/controller/api/admin/FileUploadApiController.java index 70a20c6171..c10b118c93 100644 --- a/src/main/java/alfio/controller/api/admin/FileUploadApiController.java +++ b/src/main/java/alfio/controller/api/admin/FileUploadApiController.java @@ -23,7 +23,6 @@ import org.imgscalr.Scalr; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; @@ -43,7 +42,6 @@ public class FileUploadApiController { private static final Logger log = LoggerFactory.getLogger(FileUploadApiController.class); private final FileUploadManager fileUploadManager; - @Autowired public FileUploadApiController(FileUploadManager fileUploadManager) { this.fileUploadManager = fileUploadManager; } diff --git a/src/main/java/alfio/controller/api/admin/GroupApiController.java b/src/main/java/alfio/controller/api/admin/GroupApiController.java index 0844188344..2bd3f9ec6c 100644 --- a/src/main/java/alfio/controller/api/admin/GroupApiController.java +++ b/src/main/java/alfio/controller/api/admin/GroupApiController.java @@ -54,7 +54,7 @@ public String handleDuplicateGroupItemException(DuplicateGroupItemException exc) } @GetMapping("/for/{organizationId}") - public ResponseEntity> loadAllGroupsForOrganization(@PathVariable("organizationId") int organizationId, @RequestParam(name = "showAll", defaultValue = "false", required = false) boolean showAll, Principal principal) { + public ResponseEntity> loadAllGroupsForOrganization(@PathVariable int organizationId, @RequestParam(name = "showAll", defaultValue = "false", required = false) boolean showAll, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); if (showAll) { return ResponseEntity.ok(groupManager.getAllForOrganization(organizationId)); @@ -64,13 +64,13 @@ public ResponseEntity> loadAllGroupsForOrganization(@PathVariable("o } @GetMapping("/for/{organizationId}/detail/{listId}") - public ResponseEntity loadDetail(@PathVariable("organizationId") int organizationId, @PathVariable("listId") int listId, Principal principal) { + public ResponseEntity loadDetail(@PathVariable int organizationId, @PathVariable int listId, Principal principal) { accessService.checkGroupOwnership(principal, listId, organizationId); return groupManager.loadComplete(listId).map(ResponseEntity::ok).orElseGet(() -> ResponseEntity.notFound().build()); } @PostMapping("/for/{organizationId}/update/{groupId}") - public ResponseEntity updateGroup(@PathVariable("organizationId") int organizationId, + public ResponseEntity updateGroup(@PathVariable int organizationId, @PathVariable("groupId") int listId, @RequestBody GroupModification modification, Principal principal) { @@ -79,7 +79,7 @@ public ResponseEntity updateGroup(@PathVariable("organization } @PostMapping("/for/{organizationId}/new") - public ResponseEntity createNew(@PathVariable("organizationId") int organizationId, @RequestBody GroupModification request, Principal principal) { + public ResponseEntity createNew(@PathVariable int organizationId, @RequestBody GroupModification request, Principal principal) { accessService.checkGroupCreateRequest(principal, organizationId, request); if(request.getOrganizationId() != organizationId) { return ResponseEntity.badRequest().build(); @@ -97,7 +97,7 @@ public ResponseEntity createNew(@PathVariable("organizationId") int orga } @GetMapping("/for/event/{eventName}/all") - public ResponseEntity> findLinked(@PathVariable("eventName") String eventName, + public ResponseEntity> findLinked(@PathVariable String eventName, Principal principal) { accessService.checkEventMembership(principal, eventName, AccessService.MEMBERSHIP_ROLES); return eventManager.getOptionalEventAndOrganizationIdByName(eventName, principal.getName()) @@ -106,7 +106,7 @@ public ResponseEntity> findLinked(@PathVariable("eventName") S } @GetMapping("/for/event/{eventName}") - public ResponseEntity findActiveGroup(@PathVariable("eventName") String eventName, + public ResponseEntity findActiveGroup(@PathVariable String eventName, Principal principal) { accessService.checkEventOwnership(principal, eventName); return eventManager.getOptionalEventAndOrganizationIdByName(eventName, principal.getName()) @@ -120,8 +120,8 @@ public ResponseEntity findActiveGroup(@PathVariable("eventName") St } @GetMapping("/for/event/{eventName}/category/{categoryId}") - public ResponseEntity findActiveGroup(@PathVariable("eventName") String eventName, - @PathVariable("categoryId") int categoryId, + public ResponseEntity findActiveGroup(@PathVariable String eventName, + @PathVariable int categoryId, Principal principal) { accessService.checkCategoryOwnership(principal, eventName, categoryId); return eventManager.getOptionalEventAndOrganizationIdByName(eventName, principal.getName()) @@ -136,7 +136,7 @@ public ResponseEntity findActiveGroup(@PathVariable("eventName") St } @PostMapping("/{groupId}/link") - public ResponseEntity linkGroup(@PathVariable("groupId") int groupId, @RequestBody LinkedGroupModification body, Principal principal) { + public ResponseEntity linkGroup(@PathVariable int groupId, @RequestBody LinkedGroupModification body, Principal principal) { if(body == null || groupId != body.getGroupId()) { return ResponseEntity.badRequest().build(); } @@ -163,9 +163,9 @@ public ResponseEntity linkGroup(@PathVariable("groupId") int groupId, @ } @DeleteMapping("/for/{organizationId}/event/{eventId}/link/{configurationId}") - public ResponseEntity unlinkGroup(@PathVariable("organizationId") int organizationId, - @PathVariable("configurationId") int configurationId, - @PathVariable("eventId") int eventId, + public ResponseEntity unlinkGroup(@PathVariable int organizationId, + @PathVariable int configurationId, + @PathVariable int eventId, @RequestParam(name = "categoryId", required = false) Integer categoryId, Principal principal) { accessService.checkGroupLinkOwnership(principal, configurationId, organizationId, eventId, categoryId); @@ -174,17 +174,17 @@ public ResponseEntity unlinkGroup(@PathVariable("organizationId") int or } @DeleteMapping("/for/{organizationId}/id/{groupId}/member/{memberId}") - public ResponseEntity deactivateMember(@PathVariable("groupId") int groupId, - @PathVariable("memberId") int memberId, - @PathVariable("organizationId") int organizationId, + public ResponseEntity deactivateMember(@PathVariable int groupId, + @PathVariable int memberId, + @PathVariable int organizationId, Principal principal) { accessService.checkGroupOwnership(principal, groupId, organizationId); return ResponseEntity.ok(groupManager.deactivateMembers(Collections.singletonList(memberId), groupId)); } @DeleteMapping("/for/{organizationId}/id/{groupId}") - public ResponseEntity deactivateGroup(@PathVariable("groupId") int groupId, - @PathVariable("organizationId") int organizationId, + public ResponseEntity deactivateGroup(@PathVariable int groupId, + @PathVariable int organizationId, Principal principal) { accessService.checkGroupOwnership(principal, groupId, organizationId); return ResponseEntity.ok(groupManager.deactivateGroup(groupId)); diff --git a/src/main/java/alfio/controller/api/admin/PollAdminApiController.java b/src/main/java/alfio/controller/api/admin/PollAdminApiController.java index dc77754f83..9ce75630ad 100644 --- a/src/main/java/alfio/controller/api/admin/PollAdminApiController.java +++ b/src/main/java/alfio/controller/api/admin/PollAdminApiController.java @@ -43,7 +43,7 @@ public class PollAdminApiController { private final AccessService accessService; @GetMapping - ResponseEntity> getAllForEvent(@PathVariable("eventName") String eventName, + ResponseEntity> getAllForEvent(@PathVariable String eventName, Principal principal) { if(StringUtils.isEmpty(eventName)) { return ResponseEntity.badRequest().build(); @@ -53,8 +53,8 @@ ResponseEntity> getAllForEvent(@PathVariable("eventName") } @GetMapping("/{pollId}") - ResponseEntity getPollDetail(@PathVariable("eventName") String eventName, - @PathVariable("pollId") Long pollId, + ResponseEntity getPollDetail(@PathVariable String eventName, + @PathVariable Long pollId, Principal principal) { if(StringUtils.isEmpty(eventName) || pollId == null) { return ResponseEntity.badRequest().build(); @@ -64,7 +64,7 @@ ResponseEntity getPollDetail(@PathVariable("eventName") String } @PostMapping - ResponseEntity createNewPoll(@PathVariable("eventName") String eventName, + ResponseEntity createNewPoll(@PathVariable String eventName, @RequestBody PollModification form, Principal principal) { if(form == null || !form.isValid()) { @@ -75,8 +75,8 @@ ResponseEntity createNewPoll(@PathVariable("eventName") String eventName, } @PostMapping("/{pollId}") - ResponseEntity updatePoll(@PathVariable("eventName") String eventName, - @PathVariable("pollId") Long pollId, + ResponseEntity updatePoll(@PathVariable String eventName, + @PathVariable Long pollId, @RequestBody PollModification form, Principal principal) { if(form == null || !form.isValid(pollId)) { @@ -87,25 +87,25 @@ ResponseEntity updatePoll(@PathVariable("eventName") String ev } @DeleteMapping("/{pollId}") - ResponseEntity deletePoll(@PathVariable("eventName") String eventName, - @PathVariable("pollId") Long pollId, + ResponseEntity deletePoll(@PathVariable String eventName, + @PathVariable Long pollId, Principal principal) { var eventAndOrganizationId = accessService.checkEventOwnership(principal, eventName); return ResponseEntity.ok(pollManager.deletePoll(eventAndOrganizationId, pollId)); } @DeleteMapping("/{pollId}/option/{optionId}") - ResponseEntity removeOption(@PathVariable("eventName") String eventName, - @PathVariable("pollId") Long pollId, - @PathVariable("optionId") Long optionId, + ResponseEntity removeOption(@PathVariable String eventName, + @PathVariable Long pollId, + @PathVariable Long optionId, Principal principal) { var event = accessService.checkEventOwnership(principal, eventName); return ResponseEntity.of(pollManager.removeOption(event, pollId, optionId).map(PollModification::from)); } @PutMapping("/{pollId}") - ResponseEntity updateStatus(@PathVariable("eventName") String eventName, - @PathVariable("pollId") Long pollId, + ResponseEntity updateStatus(@PathVariable String eventName, + @PathVariable Long pollId, @RequestBody UpdatePollStatusForm form, Principal principal) { if(form.status == Poll.PollStatus.DRAFT) { @@ -116,8 +116,8 @@ ResponseEntity updateStatus(@PathVariable("eventName") String } @GetMapping("/{pollId}/filter-tickets") - ResponseEntity> findAdditionalAttendees(@PathVariable("eventName") String eventName, - @PathVariable("pollId") Long pollId, + ResponseEntity> findAdditionalAttendees(@PathVariable String eventName, + @PathVariable Long pollId, @RequestParam("filter") String filter, Principal principal) { if(StringUtils.isBlank(filter)) { @@ -128,8 +128,8 @@ ResponseEntity> findAdditionalAttendees(@PathVariable("eve } @PostMapping("/{pollId}/allow") - ResponseEntity allowAttendees(@PathVariable("eventName") String eventName, - @PathVariable("pollId") Long pollId, + ResponseEntity allowAttendees(@PathVariable String eventName, + @PathVariable Long pollId, @RequestBody UpdateParticipantsForm form, Principal principal) { @@ -141,16 +141,16 @@ ResponseEntity allowAttendees(@PathVariable("eventName") String eventNa } @GetMapping("/{pollId}/allowed") - ResponseEntity> getAllowedAttendees(@PathVariable("eventName") String eventName, - @PathVariable("pollId") Long pollId, + ResponseEntity> getAllowedAttendees(@PathVariable String eventName, + @PathVariable Long pollId, Principal principal) { var eventAndOrgId = accessService.checkEventOwnership(principal, eventName); return ResponseEntity.ok(pollManager.fetchAllowedTickets(eventAndOrgId, pollId)); } @DeleteMapping("/{pollId}/allowed") - ResponseEntity> forbidAttendees(@PathVariable("eventName") String eventName, - @PathVariable("pollId") Long pollId, + ResponseEntity> forbidAttendees(@PathVariable String eventName, + @PathVariable Long pollId, @RequestBody UpdateParticipantsForm form, Principal principal) { var eventAndOrgId = accessService.checkEventOwnership(principal, eventName); @@ -158,8 +158,8 @@ ResponseEntity> forbidAttendees(@PathVariable("eventName") } @GetMapping("/{pollId}/stats") - ResponseEntity getStatisticsForEvent(@PathVariable("eventName") String eventName, - @PathVariable("pollId") Long pollId, + ResponseEntity getStatisticsForEvent(@PathVariable String eventName, + @PathVariable Long pollId, Principal principal) { var eventAndOrgId = accessService.checkEventOwnership(principal, eventName); return ResponseEntity.of(pollManager.getStatisticsFor(eventAndOrgId, pollId)); diff --git a/src/main/java/alfio/controller/api/admin/PromoCodeDiscountApiController.java b/src/main/java/alfio/controller/api/admin/PromoCodeDiscountApiController.java index afd9b3e7d0..ea6edfaa5d 100644 --- a/src/main/java/alfio/controller/api/admin/PromoCodeDiscountApiController.java +++ b/src/main/java/alfio/controller/api/admin/PromoCodeDiscountApiController.java @@ -64,7 +64,7 @@ public void addPromoCode(@RequestBody PromoCodeDiscountModification promoCode, P } @PostMapping("/promo-code/{promoCodeId}") - public void updatePromoCode(@PathVariable("promoCodeId") int promoCodeId, + public void updatePromoCode(@PathVariable int promoCodeId, @RequestBody PromoCodeDiscountModification promoCode, Principal principal) { accessService.checkAccessToPromoCodeEventOrganization(principal, promoCode.getEventId(), promoCode.getOrganizationId()); @@ -84,38 +84,38 @@ private ZoneId zoneIdFromEventId(Integer eventId, Integer utcOffset) { } @GetMapping("/events/{eventId}/promo-code") - public List listPromoCodeInEvent(@PathVariable("eventId") int eventId, Principal principal) { + public List listPromoCodeInEvent(@PathVariable int eventId, Principal principal) { accessService.checkEventOwnership(principal, eventId); return eventManager.findPromoCodesInEvent(eventId); } @GetMapping("/organization/{organizationId}/promo-code") - public List listPromoCodeInOrganization(@PathVariable("organizationId") int organizationId, + public List listPromoCodeInOrganization(@PathVariable int organizationId, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); return eventManager.findPromoCodesInOrganization(organizationId); } @DeleteMapping("/promo-code/{promoCodeId}") - public void removePromoCode(@PathVariable("promoCodeId") int promoCodeId, Principal principal) { + public void removePromoCode(@PathVariable int promoCodeId, Principal principal) { accessService.checkAccessToPromoCode(principal, promoCodeId); eventManager.deletePromoCode(promoCodeId); } @PostMapping("/promo-code/{promoCodeId}/disable") - public void disablePromoCode(@PathVariable("promoCodeId") int promoCodeId, Principal principal) { + public void disablePromoCode(@PathVariable int promoCodeId, Principal principal) { accessService.checkAccessToPromoCode(principal, promoCodeId); promoCodeRequestManager.disablePromoCode(promoCodeId); } @GetMapping("/promo-code/{promoCodeId}/count-use") - public int countPromoCodeUse(@PathVariable("promoCodeId") int promoCodeId, Principal principal) { + public int countPromoCodeUse(@PathVariable int promoCodeId, Principal principal) { accessService.checkAccessToPromoCode(principal, promoCodeId); return promoCodeRequestManager.countUsage(promoCodeId); } @GetMapping("/promo-code/{promoCodeId}/detailed-usage") - public List retrieveDetailedUsage(@PathVariable("promoCodeId") int promoCodeId, + public List retrieveDetailedUsage(@PathVariable int promoCodeId, @RequestParam(value = "eventShortName", required = false) String eventShortName, Principal principal) { Integer eventId = null; diff --git a/src/main/java/alfio/controller/api/admin/ResourceController.java b/src/main/java/alfio/controller/api/admin/ResourceController.java index 5d5dfb9e85..4e4783c488 100644 --- a/src/main/java/alfio/controller/api/admin/ResourceController.java +++ b/src/main/java/alfio/controller/api/admin/ResourceController.java @@ -42,7 +42,7 @@ import org.springframework.util.StreamUtils; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; @@ -92,7 +92,7 @@ public List getOverridableTemplates() { } @GetMapping("/overridable-template/{name}/{locale}") - public void getTemplate(@PathVariable("name") TemplateResource name, @PathVariable("locale") String locale, HttpServletResponse response) throws IOException { + public void getTemplate(@PathVariable TemplateResource name, @PathVariable String locale, HttpServletResponse response) throws IOException { ByteArrayOutputStream os = new ByteArrayOutputStream(); try (InputStream is = new ClassPathResource(name.classPath()).getInputStream()) { is.transferTo(os); @@ -105,7 +105,7 @@ public void getTemplate(@PathVariable("name") TemplateResource name, @PathVariab } @PostMapping("/overridable-template/{name}/{locale}/preview") - public void previewTemplate(@PathVariable("name") TemplateResource name, @PathVariable("locale") String locale, + public void previewTemplate(@PathVariable TemplateResource name, @PathVariable String locale, @RequestParam(required = false, value = "organizationId") Integer organizationId, @RequestParam(required = false, value = "eventId") Integer eventId, @RequestParam(required = false, value = "subscriptionDescriptorId") UUID subscriptionDescriptorId, @@ -229,13 +229,13 @@ public List findAll(Principal principal) { } @GetMapping("/resource-organization/{organizationId}") - public List findAllForOrganization(@PathVariable("organizationId") int organizationId, Principal principal) { + public List findAllForOrganization(@PathVariable int organizationId, Principal principal) { checkAccess(organizationId, principal); return uploadedResourceManager.findAll(organizationId); } @GetMapping("/resource-event/{organizationId}/{eventId}") - public List findAllForEvent(@PathVariable("organizationId") int organizationId, @PathVariable("eventId") int eventId, Principal principal) { + public List findAllForEvent(@PathVariable int organizationId, @PathVariable int eventId, Principal principal) { checkAccess(organizationId, eventId, principal); return uploadedResourceManager.findAll(organizationId, eventId); } @@ -244,7 +244,7 @@ public List findAllForEvent(@PathVariable("organizationId") in //------------------ @GetMapping("/resource/{name}/metadata") - public ResponseEntity getMetadata(@PathVariable("name") String name, Principal principal) { + public ResponseEntity getMetadata(@PathVariable String name, Principal principal) { checkAccess(principal); if (uploadedResourceManager.hasResource(name)) { return new ResponseEntity<>(uploadedResourceManager.get(name), HttpStatus.OK); @@ -254,7 +254,7 @@ public ResponseEntity getMetadata(@PathVariable("name") String } @GetMapping("/resource-organization/{organizationId}/{name}/metadata") - public ResponseEntity getMetadata(@PathVariable("organizationId") int organizationId, @PathVariable("name") String name, Principal principal) { + public ResponseEntity getMetadata(@PathVariable int organizationId, @PathVariable String name, Principal principal) { checkAccess(organizationId, principal); if (uploadedResourceManager.hasResource(organizationId, name)) { return new ResponseEntity<>(uploadedResourceManager.get(organizationId, name), HttpStatus.OK); @@ -264,7 +264,7 @@ public ResponseEntity getMetadata(@PathVariable("organizationI } @GetMapping("/resource-event/{organizationId}/{eventId}/{name}/metadata") - public ResponseEntity getMetadata(@PathVariable("organizationId") int organizationId, @PathVariable("eventId") int eventId, @PathVariable("name") String name, Principal principal) { + public ResponseEntity getMetadata(@PathVariable int organizationId, @PathVariable int eventId, @PathVariable String name, Principal principal) { checkAccess(organizationId, eventId, principal); if (uploadedResourceManager.hasResource(organizationId, eventId, name)) { return new ResponseEntity<>(uploadedResourceManager.get(organizationId, eventId, name), HttpStatus.OK); @@ -282,20 +282,20 @@ public void uploadFile(@RequestBody UploadBase64FileModification upload, Princip } @PostMapping("/resource-organization/{organizationId}/") - public void uploadFile(@PathVariable("organizationId") int organizationId, @RequestBody UploadBase64FileModification upload, Principal principal) { + public void uploadFile(@PathVariable int organizationId, @RequestBody UploadBase64FileModification upload, Principal principal) { checkAccess(organizationId, principal); uploadedResourceManager.saveResource(organizationId, upload).orElseThrow(IllegalArgumentException::new); } @PostMapping("/resource-event/{organizationId}/{eventId}/") - public void uploadFile(@PathVariable("organizationId") int organizationId, @PathVariable("eventId") int eventId, @RequestBody UploadBase64FileModification upload, Principal principal) { + public void uploadFile(@PathVariable int organizationId, @PathVariable int eventId, @RequestBody UploadBase64FileModification upload, Principal principal) { checkAccess(organizationId, eventId, principal); uploadedResourceManager.saveResource(organizationId, eventId, upload).orElseThrow(IllegalArgumentException::new); } //------------------ @GetMapping("/resource/{name:.*}") - public void outputContent(@PathVariable("name") String name, Principal principal, HttpServletResponse response) throws IOException { + public void outputContent(@PathVariable String name, Principal principal, HttpServletResponse response) throws IOException { checkAccess(principal); if (!uploadedResourceManager.hasResource(name)) { response.sendError(HttpServletResponse.SC_NOT_FOUND); @@ -310,7 +310,7 @@ public void outputContent(@PathVariable("name") String name, Principal principal } @GetMapping("/resource-organization/{organizationId}/{name:.*}") - public void outputContent(@PathVariable("organizationId") int organizationId, @PathVariable("name") String name, Principal principal, HttpServletResponse response) throws IOException { + public void outputContent(@PathVariable int organizationId, @PathVariable String name, Principal principal, HttpServletResponse response) throws IOException { checkAccess(organizationId, principal); if (!uploadedResourceManager.hasResource(organizationId, name)) { response.sendError(HttpServletResponse.SC_NOT_FOUND); @@ -325,7 +325,7 @@ public void outputContent(@PathVariable("organizationId") int organizationId, @P } @GetMapping("/resource-event/{organizationId}/{eventId}/{name:.*}") - public void outputContent(@PathVariable("organizationId") int organizationId, @PathVariable("eventId") int eventId, @PathVariable("name") String name, Principal principal, HttpServletResponse response) throws IOException { + public void outputContent(@PathVariable int organizationId, @PathVariable int eventId, @PathVariable String name, Principal principal, HttpServletResponse response) throws IOException { checkAccess(organizationId, eventId, principal); if (!uploadedResourceManager.hasResource(organizationId, eventId, name)) { response.sendError(HttpServletResponse.SC_NOT_FOUND); @@ -342,19 +342,19 @@ public void outputContent(@PathVariable("organizationId") int organizationId, @P //------------------ @DeleteMapping("/resource/{name:.*}") - public void delete(@PathVariable("name") String name, Principal principal) { + public void delete(@PathVariable String name, Principal principal) { checkAccess(principal); uploadedResourceManager.deleteResource(name); } @DeleteMapping("/resource-organization/{organizationId}/{name:.*}") - public void delete(@PathVariable("organizationId") int organizationId, @PathVariable("name") String name, Principal principal) { + public void delete(@PathVariable int organizationId, @PathVariable String name, Principal principal) { checkAccess(organizationId, principal); uploadedResourceManager.deleteResource(organizationId, name); } @DeleteMapping("/resource-event/{organizationId}/{eventId}/{name:.*}") - public void delete(@PathVariable("organizationId") int organizationId, @PathVariable("eventId") int eventId, @PathVariable("name") String name, Principal principal) { + public void delete(@PathVariable int organizationId, @PathVariable int eventId, @PathVariable String name, Principal principal) { checkAccess(organizationId, eventId, principal); uploadedResourceManager.deleteResource(organizationId, eventId, name); } diff --git a/src/main/java/alfio/controller/api/admin/SpecialPriceApiController.java b/src/main/java/alfio/controller/api/admin/SpecialPriceApiController.java index e849d2f99d..8ce281fcab 100644 --- a/src/main/java/alfio/controller/api/admin/SpecialPriceApiController.java +++ b/src/main/java/alfio/controller/api/admin/SpecialPriceApiController.java @@ -21,13 +21,13 @@ import alfio.model.SpecialPrice; import alfio.model.modification.SendCodeModification; import alfio.model.modification.UploadBase64FileModification; -import com.opencsv.CSVReader; -import com.opencsv.exceptions.CsvException; +import com.fasterxml.jackson.databind.MappingIterator; +import com.fasterxml.jackson.dataformat.csv.CsvMapper; +import com.fasterxml.jackson.dataformat.csv.CsvSchema; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @@ -37,10 +37,8 @@ import java.security.Principal; import java.util.List; import java.util.Objects; -import java.util.stream.Collectors; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.apache.commons.lang3.StringUtils.trim; @RestController @RequestMapping("/admin/api") @@ -50,7 +48,6 @@ public class SpecialPriceApiController { private final SpecialPriceManager specialPriceManager; private final AccessService accessService; - @Autowired public SpecialPriceApiController(SpecialPriceManager specialPriceManager, AccessService accessService) { this.specialPriceManager = specialPriceManager; @@ -68,27 +65,24 @@ public ResponseEntity handleExceptions(Exception e) { } @PostMapping("/events/{eventName}/categories/{categoryId}/link-codes") - public ResponseEntity> linkAssigneeToCodes(@PathVariable("eventName") String eventName, - @PathVariable("categoryId") int categoryId, + public ResponseEntity> linkAssigneeToCodes(@PathVariable String eventName, + @PathVariable int categoryId, @RequestBody UploadBase64FileModification file, - Principal principal) throws IOException, CsvException { + Principal principal) throws IOException { Validate.isTrue(StringUtils.isNotEmpty(eventName)); accessService.checkCategoryOwnership(principal, eventName, categoryId); - try(InputStreamReader isr = new InputStreamReader(file.getInputStream(), UTF_8); CSVReader reader = new CSVReader(isr)) { - List content = reader.readAll().stream() - .map(line -> { - Validate.isTrue(line.length >= 4); - return new SendCodeModification(StringUtils.trimToNull(line[0]), trim(line[1]), trim(line[2]), trim(line[3])); - }) - .collect(Collectors.toList()); - return ResponseEntity.ok(specialPriceManager.linkAssigneeToCode(content, eventName, categoryId, principal.getName())); + try(InputStreamReader isr = new InputStreamReader(file.getInputStream(), UTF_8)) { + MappingIterator iterator = new CsvMapper().readerFor(SendCodeModification.class) + .with(CsvSchema.emptySchema().withoutHeader()) + .readValues(isr); + return ResponseEntity.ok(specialPriceManager.linkAssigneeToCode(iterator.readAll(), eventName, categoryId, principal.getName())); } } @PostMapping("/events/{eventName}/categories/{categoryId}/send-codes") - public boolean sendCodes(@PathVariable("eventName") String eventName, - @PathVariable("categoryId") int categoryId, + public boolean sendCodes(@PathVariable String eventName, + @PathVariable int categoryId, @RequestBody List codes, Principal principal) { @@ -100,16 +94,16 @@ public boolean sendCodes(@PathVariable("eventName") String eventName, } @GetMapping("/events/{eventName}/categories/{categoryId}/sent-codes") - public List loadSentCodes(@PathVariable("eventName") String eventName, - @PathVariable("categoryId") int categoryId, + public List loadSentCodes(@PathVariable String eventName, + @PathVariable int categoryId, Principal principal) { return specialPriceManager.loadSentCodes(eventName, categoryId, principal.getName()); } @DeleteMapping("/events/{eventName}/categories/{categoryId}/codes/{codeId}/recipient") - public boolean clearRecipientData(@PathVariable("eventName") String eventName, - @PathVariable("categoryId") int categoryId, - @PathVariable("codeId") int codeId, + public boolean clearRecipientData(@PathVariable String eventName, + @PathVariable int categoryId, + @PathVariable int codeId, Principal principal) { return specialPriceManager.clearRecipientData(eventName, categoryId, codeId, principal.getName()); } diff --git a/src/main/java/alfio/controller/api/admin/SubscriptionApiController.java b/src/main/java/alfio/controller/api/admin/SubscriptionApiController.java index 798c52ee78..8315070cf1 100644 --- a/src/main/java/alfio/controller/api/admin/SubscriptionApiController.java +++ b/src/main/java/alfio/controller/api/admin/SubscriptionApiController.java @@ -45,27 +45,27 @@ public SubscriptionApiController(SubscriptionManager subscriptionManager, } @GetMapping("/list") - ResponseEntity> findAll(@PathVariable("organizationId") int organizationId, Principal principal) { + ResponseEntity> findAll(@PathVariable int organizationId, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); return ResponseEntity.ok(subscriptionManager.loadSubscriptionsWithStatistics(organizationId)); } @GetMapping("/active") - ResponseEntity> findActive(@PathVariable("organizationId") int organizationId, Principal principal) { + ResponseEntity> findActive(@PathVariable int organizationId, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); return ResponseEntity.ok(subscriptionManager.loadActiveSubscriptionDescriptors(organizationId)); } @GetMapping("/{subscriptionId}") - ResponseEntity getSingle(@PathVariable("organizationId") int organizationId, - @PathVariable("subscriptionId") UUID subscriptionId, + ResponseEntity getSingle(@PathVariable int organizationId, + @PathVariable UUID subscriptionId, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); return ResponseEntity.of(subscriptionManager.findOne(subscriptionId, organizationId).map(SubscriptionDescriptorModification::fromModel)); } @PostMapping("/") - ResponseEntity create(@PathVariable("organizationId") int organizationId, + ResponseEntity create(@PathVariable int organizationId, @RequestBody SubscriptionDescriptorModification subscriptionDescriptor, Principal principal) { @@ -84,8 +84,8 @@ ResponseEntity create(@PathVariable("organizationId") int organizationId, } @PostMapping("/{subscriptionId}") - ResponseEntity update(@PathVariable("organizationId") int organizationId, - @PathVariable("subscriptionId") UUID subscriptionId, + ResponseEntity update(@PathVariable int organizationId, + @PathVariable UUID subscriptionId, @RequestBody SubscriptionDescriptorModification subscriptionDescriptor, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); @@ -97,8 +97,8 @@ ResponseEntity update(@PathVariable("organizationId") int organizationId, } @PatchMapping("/{subscriptionId}/is-public") - ResponseEntity setPublicState(@PathVariable("organizationId") int organizationId, - @PathVariable("subscriptionId") UUID subscriptionId, + ResponseEntity setPublicState(@PathVariable int organizationId, + @PathVariable UUID subscriptionId, @RequestParam("status") boolean status, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); @@ -106,8 +106,8 @@ ResponseEntity setPublicState(@PathVariable("organizationId") int organ } @GetMapping("/{subscriptionId}/events") - ResponseEntity> getLinkedEvents(@PathVariable("organizationId") int organizationId, - @PathVariable("subscriptionId") UUID subscriptionId, + ResponseEntity> getLinkedEvents(@PathVariable int organizationId, + @PathVariable UUID subscriptionId, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); return ResponseEntity.ok(subscriptionManager.getLinkedEvents(organizationId, subscriptionId)); @@ -125,7 +125,7 @@ ResponseEntity> getLinkedEvents(@PathVariable("organ * @return */ @DeleteMapping("/{subscriptionId}") - ResponseEntity deactivate(@PathVariable("organizationId") int organizationId, + ResponseEntity deactivate(@PathVariable int organizationId, @PathVariable("subscriptionId") UUID descriptorId, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); diff --git a/src/main/java/alfio/controller/api/admin/UsersApiController.java b/src/main/java/alfio/controller/api/admin/UsersApiController.java index 6eb575cb8d..4b30c77a6c 100644 --- a/src/main/java/alfio/controller/api/admin/UsersApiController.java +++ b/src/main/java/alfio/controller/api/admin/UsersApiController.java @@ -29,9 +29,9 @@ import alfio.util.Json; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.servlet.http.HttpServletResponse; import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.extern.log4j.Log4j2; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.tuple.Pair; @@ -43,7 +43,6 @@ import org.springframework.util.StreamUtils; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; import java.security.Principal; @@ -52,7 +51,6 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; -import static org.apache.commons.lang3.StringUtils.defaultString; import static org.apache.commons.lang3.StringUtils.trimToNull; @RestController @@ -122,7 +120,7 @@ public List getAllOrganizations(Principal principal) { } @GetMapping("/organizations/{id}") - public Organization getOrganization(@PathVariable("id") int id, Principal principal) { + public Organization getOrganization(@PathVariable int id, Principal principal) { return userManager.findOrganizationById(id, principal.getName()); } @@ -203,7 +201,7 @@ public UserWithPasswordAndQRCode insertUser(@RequestBody UserModification userMo } @GetMapping("/api-keys/organization/{organizationId}/all") - public void getAllApiKeys(@PathVariable("organizationId") int organizationId, HttpServletResponse response, Principal principal) throws IOException { + public void getAllApiKeys(@PathVariable int organizationId, HttpServletResponse response, Principal principal) throws IOException { accessService.checkOrganizationOwnership(principal, organizationId); response.setContentType("application/zip"); response.setHeader("Content-Disposition", "attachment; filename=apiKeys.zip"); @@ -222,7 +220,7 @@ private static Pair generateApiKeyQRCode(User user, String baseU Map info = new HashMap<>(); info.put("apiKey", user.getUsername()); info.put("baseUrl", baseUrl); - String description = defaultString(trimToNull(user.getDescription()), user.getUsername()); + String description = Objects.toString(trimToNull(user.getDescription()), user.getUsername()); return Pair.of(description, ImageUtil.createQRCodeWithDescription(Json.GSON.toJson(info), description)); } @@ -241,7 +239,7 @@ public String deleteUser(@PathVariable("id") int userId, Principal principal) { } @PostMapping("/users/{id}/enable/{enable}") - public String enableUser(@PathVariable("id") int userId, @PathVariable("enable")boolean enable, Principal principal) { + public String enableUser(@PathVariable("id") int userId, @PathVariable boolean enable, Principal principal) { userManager.enable(userId, enable, principal); return OK; } diff --git a/src/main/java/alfio/controller/api/admin/UtilsApiController.java b/src/main/java/alfio/controller/api/admin/UtilsApiController.java index e3e0fce772..9cf4f1828f 100644 --- a/src/main/java/alfio/controller/api/admin/UtilsApiController.java +++ b/src/main/java/alfio/controller/api/admin/UtilsApiController.java @@ -27,7 +27,6 @@ import org.joda.money.CurrencyUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; @@ -36,7 +35,7 @@ import org.springframework.web.bind.MissingServletRequestParameterException; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.security.Principal; import java.util.*; import java.util.stream.Collectors; @@ -51,7 +50,6 @@ public class UtilsApiController { private final String version; private final Environment environment; - @Autowired public UtilsApiController(EventNameManager eventNameManager, @Value("${alfio.version}") String version, Environment environment) { this.eventNameManager = eventNameManager; this.version = version; diff --git a/src/main/java/alfio/controller/api/pass/PassKitApiController.java b/src/main/java/alfio/controller/api/pass/PassKitApiController.java index 95c9413d75..132114b75f 100644 --- a/src/main/java/alfio/controller/api/pass/PassKitApiController.java +++ b/src/main/java/alfio/controller/api/pass/PassKitApiController.java @@ -27,7 +27,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Optional; @@ -46,9 +46,9 @@ public class PassKitApiController { @GetMapping("/version/passes/{passTypeIdentifier}/{serialNumber}") - public void getLatestVersion(@PathVariable("eventName") String eventName, - @PathVariable("passTypeIdentifier") String passTypeIdentifier, - @PathVariable("serialNumber") String serialNumber, + public void getLatestVersion(@PathVariable String eventName, + @PathVariable String passTypeIdentifier, + @PathVariable String serialNumber, @RequestHeader("Authorization") String authorization, HttpServletResponse response) throws IOException { Optional> validationResult = passKitManager.validateToken(eventName, passTypeIdentifier, serialNumber, authorization); @@ -61,8 +61,8 @@ public void getLatestVersion(@PathVariable("eventName") String eventName, } @GetMapping("/version/passes/{ticketUuid}") - public void downloadPassForTicket(@PathVariable("eventName") String eventName, - @PathVariable("ticketUuid") String ticketUuid, + public void downloadPassForTicket(@PathVariable String eventName, + @PathVariable String ticketUuid, HttpServletResponse response) throws IOException { var ticketAndEventData = passKitManager.retrieveTicketDetails(eventName, ticketUuid); if (ticketAndEventData.isPresent()) { diff --git a/src/main/java/alfio/controller/api/support/CspReportApiController.java b/src/main/java/alfio/controller/api/support/CspReportApiController.java index 410f625dde..83698422c4 100644 --- a/src/main/java/alfio/controller/api/support/CspReportApiController.java +++ b/src/main/java/alfio/controller/api/support/CspReportApiController.java @@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; import java.util.Set; import java.util.stream.Collectors; diff --git a/src/main/java/alfio/controller/api/support/WebhookApiController.java b/src/main/java/alfio/controller/api/support/WebhookApiController.java index 74f3dca613..47be8efcda 100644 --- a/src/main/java/alfio/controller/api/support/WebhookApiController.java +++ b/src/main/java/alfio/controller/api/support/WebhookApiController.java @@ -23,7 +23,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping("/api/webhook") @@ -33,7 +33,7 @@ public class WebhookApiController { private final StripeCreditCardManager stripeCreditCardManager; @PostMapping("/mollie/event/{eventName}/reservation/{reservationId}") - public void handleMollie(@PathVariable("eventName") String eventName, @PathVariable("reservationId") String reservationId) { + public void handleMollie(@PathVariable String eventName, @PathVariable String reservationId) { } @PostMapping("/stripe/notification") diff --git a/src/main/java/alfio/controller/api/v1/admin/ConfigurationApiV1Controller.java b/src/main/java/alfio/controller/api/v1/admin/ConfigurationApiV1Controller.java index b582aa8629..cee48d9f1c 100644 --- a/src/main/java/alfio/controller/api/v1/admin/ConfigurationApiV1Controller.java +++ b/src/main/java/alfio/controller/api/v1/admin/ConfigurationApiV1Controller.java @@ -60,7 +60,7 @@ public ConfigurationApiV1Controller(ConfigurationManager configurationManager, } @PutMapping("/organization/{organizationId}") - public ResponseEntity saveConfigurationForOrganization(@PathVariable("organizationId") int organizationId, + public ResponseEntity saveConfigurationForOrganization(@PathVariable int organizationId, @RequestBody Map configurationKeyValues, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); @@ -83,9 +83,9 @@ public ResponseEntity saveConfigurationForOrganization(@PathVariable("or } @PutMapping("/organization/{organizationId}/{purchaseContextType}/{publicIdentifier}") - public ResponseEntity saveConfigurationForPurchaseContext(@PathVariable("organizationId") int organizationId, - @PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, + public ResponseEntity saveConfigurationForPurchaseContext(@PathVariable int organizationId, + @PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, @RequestBody Map configurationKeyValues, Principal principal) { var configurationKeys = configurationKeyValues.keySet().stream() diff --git a/src/main/java/alfio/controller/api/v1/admin/EventApiV1Controller.java b/src/main/java/alfio/controller/api/v1/admin/EventApiV1Controller.java index 64ec078c7f..2fa2909523 100644 --- a/src/main/java/alfio/controller/api/v1/admin/EventApiV1Controller.java +++ b/src/main/java/alfio/controller/api/v1/admin/EventApiV1Controller.java @@ -43,8 +43,7 @@ import alfio.repository.ExtensionRepository; import alfio.util.Json; import lombok.AllArgsConstructor; -import lombok.extern.log4j.Log4j2; -import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.tuple.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -140,7 +139,7 @@ private ErrorCode toErrorCode(Errors errors) { } @GetMapping("/{slug}/stats") - public ResponseEntity stats(@PathVariable("slug") String slug, Principal user) { + public ResponseEntity stats(@PathVariable String slug, Principal user) { accessService.checkEventOwnership(user, slug); Result result = new Result.Builder() .build(() -> eventStatisticsManager.getEventWithAdditionalInfo(slug,user.getName())); @@ -153,7 +152,7 @@ public ResponseEntity stats(@PathVariable("slug") Strin } @DeleteMapping("/{slug}") - public ResponseEntity delete(@PathVariable("slug") String slug, Principal user) { + public ResponseEntity delete(@PathVariable String slug, Principal user) { accessService.checkEventOwnership(user, slug); Result result = new Result.Builder() .build(() -> { @@ -170,7 +169,7 @@ public ResponseEntity delete(@PathVariable("slug") String slug, Principa @PostMapping("/update/{slug}") @Transactional - public ResponseEntity update(@PathVariable("slug") String slug, @RequestBody EventCreationRequest request, Principal user) { + public ResponseEntity update(@PathVariable String slug, @RequestBody EventCreationRequest request, Principal user) { accessService.checkEventOwnership(user, slug); String imageRef = fetchImage(request.getImageUrl()); @@ -185,13 +184,13 @@ public ResponseEntity update(@PathVariable("slug") String slug, @Request } @GetMapping("/{slug}/subscriptions") - public ResponseEntity getLinkedSubscriptions(@PathVariable("slug") String slug, Principal user) { + public ResponseEntity getLinkedSubscriptions(@PathVariable String slug, Principal user) { var event = accessService.checkEventOwnership(user, slug); return ResponseEntity.ok(retrieveLinkedSubscriptionsForEvent(slug, event.getId(), event.getOrganizationId())); } @PutMapping("/{slug}/subscriptions") - public ResponseEntity updateLinkedSubscriptions(@PathVariable("slug") String slug, + public ResponseEntity updateLinkedSubscriptions(@PathVariable String slug, @RequestBody List subscriptions, Principal user) { var eventAndOrgId = accessService.checkDescriptorsLinkRequest(user, slug, subscriptions); @@ -200,7 +199,7 @@ public ResponseEntity updateLinkedSubscriptions(@PathVariab } @PostMapping("/{slug}/generate-subscribers-tickets") - public ResponseEntity generateTicketsForSubscribers(@PathVariable("slug") String slug, + public ResponseEntity generateTicketsForSubscribers(@PathVariable String slug, Principal user) { var eventAndOrganizationId = accessService.checkEventOwnership(user, slug); Map params = Map.of( @@ -212,7 +211,7 @@ public ResponseEntity generateTicketsForSubscribers(@PathVariable("slug } @GetMapping("/{slug}/check-in-log") - public ResponseEntity> checkInLog(@PathVariable("slug") String slug, + public ResponseEntity> checkInLog(@PathVariable String slug, Principal user) { accessService.checkEventOwnership(user, slug); try { diff --git a/src/main/java/alfio/controller/api/v1/admin/OrganizationsApiV1Controller.java b/src/main/java/alfio/controller/api/v1/admin/OrganizationsApiV1Controller.java index cd357cf27f..3a30f382f6 100644 --- a/src/main/java/alfio/controller/api/v1/admin/OrganizationsApiV1Controller.java +++ b/src/main/java/alfio/controller/api/v1/admin/OrganizationsApiV1Controller.java @@ -27,7 +27,6 @@ import alfio.model.user.Role; import alfio.model.user.User; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @@ -41,7 +40,6 @@ public class OrganizationsApiV1Controller { private final OrganizationDeleter organizationDeleter; private final AccessService accessService; - @Autowired public OrganizationsApiV1Controller(UserManager userManager, OrganizationDeleter organizationDeleter, AccessService accessService) { @@ -93,7 +91,7 @@ public ResponseEntity createApiKeyForOrganization(@PathVaria @DeleteMapping("/{id}/api-key/{apiKey}") public ResponseEntity deleteApiKeyForOrganization(@PathVariable("id") int organizationId, - @PathVariable("apiKey") String apiKey, + @PathVariable String apiKey, Principal principal) { accessService.checkOrganizationOwnership(principal, organizationId); return ResponseEntity.of(userManager.findUserIdByApiKey(apiKey, organizationId).map(userId -> { diff --git a/src/main/java/alfio/controller/api/v1/admin/ReservationApiV1Controller.java b/src/main/java/alfio/controller/api/v1/admin/ReservationApiV1Controller.java index 41e1125db0..26b405d6a8 100644 --- a/src/main/java/alfio/controller/api/v1/admin/ReservationApiV1Controller.java +++ b/src/main/java/alfio/controller/api/v1/admin/ReservationApiV1Controller.java @@ -34,7 +34,6 @@ import alfio.util.ReservationUtil; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.BeanPropertyBindingResult; @@ -59,7 +58,6 @@ public class ReservationApiV1Controller { private final AccessService accessService; private final PurchaseContextFieldManager purchaseContextFieldManager; - @Autowired public ReservationApiV1Controller(TicketReservationManager ticketReservationManager, PurchaseContextManager purchaseContextManager, PromoCodeRequestManager promoCodeRequestManager, @@ -79,8 +77,8 @@ public ReservationApiV1Controller(TicketReservationManager ticketReservationMana } @GetMapping("/{purchaseContextType}/{publicIdentifier}/reservation/{id}") - public ResponseEntity retrieveDetail(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, + public ResponseEntity retrieveDetail(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, @PathVariable("id") String reservationId, Principal principal) { accessService.checkReservationOwnership(principal, purchaseContextType, publicIdentifier, reservationId); @@ -178,7 +176,7 @@ public ResponseEntity createSubscriptionReservation(@PathVaria } @PutMapping("/reservation/{reservationId}/confirm") - public ResponseEntity confirmReservation(@PathVariable("reservationId") String reservationId, + public ResponseEntity confirmReservation(@PathVariable String reservationId, @RequestBody ReservationConfirmationRequest reservationConfirmationRequest, Principal principal) { @@ -216,8 +214,8 @@ public ResponseEntity confirmReservation(@PathV // delete ticket from event @DeleteMapping("/event/{slug}/reservation/delete-ticket/{ticketUUID}") - public ResponseEntity deleteTicket(@PathVariable("slug") String slug, - @PathVariable("ticketUUID") String ticketUUID, + public ResponseEntity deleteTicket(@PathVariable String slug, + @PathVariable String ticketUUID, Principal user) { accessService.checkEventTicketIdentifierMembership(user, slug, ticketUUID, EnumSet.of(Role.OWNER, Role.API_CONSUMER)); return ResponseEntity.of(adminReservationManager.findTicketWithReservationId(ticketUUID, slug, user.getName()) @@ -238,7 +236,7 @@ public ResponseEntity deleteTicket(@PathVariable("slug") String slug, // delete subscription @DeleteMapping("/subscription/{id}/reservation/delete-subscription/{subscriptionToDelete}") public ResponseEntity deleteSubscription(@PathVariable("id") String descriptorId, - @PathVariable("subscriptionToDelete") UUID subscriptionToDelete, + @PathVariable UUID subscriptionToDelete, Principal user) { accessService.checkSubscriptionDescriptorOwnership(user, descriptorId); return ResponseEntity.of(adminReservationManager.findReservationIdForSubscription(descriptorId, subscriptionToDelete, user) @@ -266,10 +264,10 @@ private CreationResponse postCreate(ReservationAPICreationRequest creationReques reservationConfiguration.isLockEmailEdit()); ticketReservationManager.setReservationMetadata(id, reservationMetadata); } - var descriptorId = creationRequest instanceof TicketReservationCreationRequest ? ((TicketReservationCreationRequest) creationRequest).getSubscriptionId() : null; - if (creationRequest instanceof SubscriptionReservationCreationRequest && ((SubscriptionReservationCreationRequest)creationRequest).hasAdditionalInfo()) { + var descriptorId = creationRequest instanceof TicketReservationCreationRequest trcr ? trcr.getSubscriptionId() : null; + if (creationRequest instanceof SubscriptionReservationCreationRequest request && request.hasAdditionalInfo()) { var subscriptionId = ticketReservationManager.findSubscriptionDetails(id).orElseThrow().getSubscription().getId(); - purchaseContextFieldManager.updateFieldsForReservation(((SubscriptionReservationCreationRequest) creationRequest).getSubscriptionOwner(), purchaseContext, + purchaseContextFieldManager.updateFieldsForReservation(request.getSubscriptionOwner(), purchaseContext, null, subscriptionId); } return CreationResponse.success(id, ticketReservationManager.reservationUrlForExternalClients(id, purchaseContext, locale.getLanguage(), user != null, descriptorId)); diff --git a/src/main/java/alfio/controller/api/v1/admin/SubscriptionApiV1Controller.java b/src/main/java/alfio/controller/api/v1/admin/SubscriptionApiV1Controller.java index 68652f62d5..625c964119 100644 --- a/src/main/java/alfio/controller/api/v1/admin/SubscriptionApiV1Controller.java +++ b/src/main/java/alfio/controller/api/v1/admin/SubscriptionApiV1Controller.java @@ -93,7 +93,7 @@ public ResponseEntity create(@RequestBody SubscriptionDescriptorModifica } @PostMapping("/{subscriptionId}/update") - public ResponseEntity update(@PathVariable("subscriptionId") UUID subscriptionId, + public ResponseEntity update(@PathVariable UUID subscriptionId, @RequestBody SubscriptionDescriptorModificationRequest request, Principal principal) { accessService.checkSubscriptionDescriptorOwnership(principal, subscriptionId.toString()); var organization = userManager.findUserOrganizations(principal.getName()).get(0); @@ -113,7 +113,7 @@ public ResponseEntity update(@PathVariable("subscriptionId") UUID subscr } @GetMapping("/{subscriptionId}") - public ResponseEntity get(@PathVariable("subscriptionId") UUID subscriptionId, + public ResponseEntity get(@PathVariable UUID subscriptionId, Principal principal) { accessService.checkSubscriptionDescriptorOwnership(principal, subscriptionId.toString()); var organization = userManager.findUserOrganizations(principal.getName()).get(0); @@ -121,7 +121,7 @@ public ResponseEntity get(@PathVariable("s } @GetMapping("/{subscriptionId}/events") - public ResponseEntity> getLinkedEvents(@PathVariable("subscriptionId") UUID subscriptionId, + public ResponseEntity> getLinkedEvents(@PathVariable UUID subscriptionId, Principal principal) { accessService.checkSubscriptionDescriptorOwnership(principal, subscriptionId.toString()); var organization = userManager.findUserOrganizations(principal.getName()).get(0); @@ -129,7 +129,7 @@ public ResponseEntity> getLinkedEvents(@PathVariable("subscriptionI } @PostMapping("/{subscriptionId}/events") - public ResponseEntity> updateLinkedEvents(@PathVariable("subscriptionId") UUID subscriptionId, + public ResponseEntity> updateLinkedEvents(@PathVariable UUID subscriptionId, @RequestBody List eventSlugs, Principal principal) { if (eventSlugs == null) { diff --git a/src/main/java/alfio/controller/api/v2/InfoApiController.java b/src/main/java/alfio/controller/api/v2/InfoApiController.java index ada7168c22..b409f536e5 100644 --- a/src/main/java/alfio/controller/api/v2/InfoApiController.java +++ b/src/main/java/alfio/controller/api/v2/InfoApiController.java @@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; @RestController @RequestMapping("/api/v2/") diff --git a/src/main/java/alfio/controller/api/v2/TranslationsApiController.java b/src/main/java/alfio/controller/api/v2/TranslationsApiController.java index 736322870e..8ae3296c8b 100644 --- a/src/main/java/alfio/controller/api/v2/TranslationsApiController.java +++ b/src/main/java/alfio/controller/api/v2/TranslationsApiController.java @@ -48,29 +48,29 @@ public TranslationsApiController(MessageSourceManager messageSourceManager, Conf } @GetMapping("/public/i18n/bundle/{lang}") - public Map getPublicTranslations(@PathVariable("lang") String lang, + public Map getPublicTranslations(@PathVariable String lang, @RequestParam(value = "withSystemOverride", defaultValue = "true", required = false) boolean withSystemOverride) { return messageSourceManager.getBundleAsMap("alfio.i18n.public", withSystemOverride, lang, MessageSourceManager.PUBLIC_FRONTEND); } @GetMapping("/admin/i18n/bundle/{lang}") - public Map getAdminTranslations(@PathVariable("lang") String lang, + public Map getAdminTranslations(@PathVariable String lang, @RequestParam(value = "withSystemOverride", defaultValue = "true", required = false) boolean withSystemOverride) { return messageSourceManager.getBundleAsMap("alfio.i18n.public", withSystemOverride, lang, MessageSourceManager.ADMIN_FRONTEND); } @GetMapping("/public/i18n/countries/{lang}") - public List getCountries(@PathVariable("lang") String lang) { + public List getCountries(@PathVariable String lang) { return fromPair(TicketHelper.getLocalizedCountries(LocaleUtil.forLanguageTag(lang))); } @GetMapping("/public/i18n/countries-vat/{lang}") - public List getCountriesForVat(@PathVariable("lang") String lang) { + public List getCountriesForVat(@PathVariable String lang) { return fromPair(TicketHelper.getLocalizedCountriesForVat(LocaleUtil.forLanguageTag(lang))); } @GetMapping("/public/i18n/eu-countries-vat/{lang}") - public List getEuCountriesForVat(@PathVariable("lang") String lang) { + public List getEuCountriesForVat(@PathVariable String lang) { var countries = TicketHelper.getLocalizedEUCountriesForVat(LocaleUtil.forLanguageTag(lang), configurationManager.getForSystem(ConfigurationKeys.EU_COUNTRIES_LIST).getRequiredValue()); return fromPair(countries); diff --git a/src/main/java/alfio/controller/api/v2/model/AnalyticsConfiguration.java b/src/main/java/alfio/controller/api/v2/model/AnalyticsConfiguration.java index 94068d1ac3..d3e8dbeb7b 100644 --- a/src/main/java/alfio/controller/api/v2/model/AnalyticsConfiguration.java +++ b/src/main/java/alfio/controller/api/v2/model/AnalyticsConfiguration.java @@ -23,7 +23,7 @@ import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.lang3.StringUtils; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import java.util.Map; import static alfio.model.system.ConfigurationKeys.GOOGLE_ANALYTICS_ANONYMOUS_MODE; diff --git a/src/main/java/alfio/controller/api/v2/user/EventApiV2Controller.java b/src/main/java/alfio/controller/api/v2/user/EventApiV2Controller.java index 7d48fd2677..3f33f96640 100644 --- a/src/main/java/alfio/controller/api/v2/user/EventApiV2Controller.java +++ b/src/main/java/alfio/controller/api/v2/user/EventApiV2Controller.java @@ -51,9 +51,9 @@ import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.util.UriComponentsBuilder; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; import java.io.IOException; import java.security.Principal; import java.time.ZonedDateTime; @@ -113,13 +113,13 @@ public ResponseEntity> listEvents(SearchOptions searchOptio } @GetMapping("event/{eventName}") - public ResponseEntity getEvent(@PathVariable("eventName") String eventName, HttpSession session) { + public ResponseEntity getEvent(@PathVariable String eventName, HttpSession session) { return eventLoader.loadEventInfo(eventName, session).map(eventWithAdditionalInfo -> new ResponseEntity<>(eventWithAdditionalInfo, getCorsHeaders(), HttpStatus.OK)) .orElseGet(() -> ResponseEntity.notFound().headers(getCorsHeaders()).build()); } @PostMapping("event/{eventName}/waiting-list/subscribe") - public ResponseEntity> subscribeToWaitingList(@PathVariable("eventName") String eventName, + public ResponseEntity> subscribeToWaitingList(@PathVariable String eventName, @RequestBody WaitingQueueSubscriptionForm subscription, BindingResult bindingResult) { @@ -137,7 +137,7 @@ public ResponseEntity> subscribeToWaitingList(@PathVa } @GetMapping("event/{eventName}/ticket-categories") - public ResponseEntity getTicketCategories(@PathVariable("eventName") String eventName, @RequestParam(value = "code", required = false) String code) { + public ResponseEntity getTicketCategories(@PathVariable String eventName, @RequestParam(value = "code", required = false) String code) { // return eventRepository.findOptionalByShortName(eventName).filter(e -> e.getStatus() != Event.Status.DISABLED).map(event -> { @@ -246,8 +246,8 @@ private static int getMaxAmountOfTicketsPerReservation(Map> reserveTickets(@PathVariable("eventName") String eventName, + public ResponseEntity> reserveTickets(@PathVariable String eventName, @RequestParam("lang") String lang, @RequestBody ReservationForm reservation, BindingResult bindingResult, @@ -334,7 +334,7 @@ private Optional createTicketReservation(ReservationForm reservation, } @GetMapping("event/{eventName}/validate-code") - public ResponseEntity> validateCode(@PathVariable("eventName") String eventName, + public ResponseEntity> validateCode(@PathVariable String eventName, @RequestParam("code") String code) { var res = promoCodeRequestManager.checkCode(eventName, code); @@ -356,7 +356,7 @@ public ResponseEntity> validateCode(@PathVariable(" } @PostMapping("event/{eventName}/check-discount") - public ResponseEntity checkDiscount(@PathVariable("eventName") String eventName, @RequestBody ReservationForm reservation) { + public ResponseEntity checkDiscount(@PathVariable String eventName, @RequestBody ReservationForm reservation) { return eventRepository.findOptionalByShortName(eventName) .flatMap(event -> { Map quantityByCategory = reservation.getReservation().stream() @@ -383,7 +383,7 @@ public ResponseEntity checkDiscount(@PathVariable("eventName") } @GetMapping("event/{eventName}/code/{code}") - public ResponseEntity handleCode(@PathVariable("eventName") String eventName, @PathVariable("code") String code, ServletWebRequest request, Principal principal) { + public ResponseEntity handleCode(@PathVariable String eventName, @PathVariable String code, ServletWebRequest request, Principal principal) { String trimmedCode = StringUtils.trimToNull(code); Map queryStrings = new HashMap<>(); diff --git a/src/main/java/alfio/controller/api/v2/user/PollApiController.java b/src/main/java/alfio/controller/api/v2/user/PollApiController.java index 684d12e6b8..14d55a6a43 100644 --- a/src/main/java/alfio/controller/api/v2/user/PollApiController.java +++ b/src/main/java/alfio/controller/api/v2/user/PollApiController.java @@ -36,7 +36,7 @@ public class PollApiController { private final PollManager pollManager; @GetMapping("") - ResponseEntity>> getAll(@PathVariable("eventName") String eventName, @RequestParam("pin") String pin) { + ResponseEntity>> getAll(@PathVariable String eventName, @RequestParam("pin") String pin) { var result = pollManager.getActiveForEvent(eventName, pin); if(result.isSuccess()) { return ResponseEntity.ok(ValidatedResponse.fromResult(result, "pin")); @@ -45,7 +45,7 @@ ResponseEntity>> getAll(@PathVariable("eventName") } @GetMapping("/{pollId}") - ResponseEntity> getSingle(@PathVariable("eventName") String eventName, @PathVariable("pollId") Long pollId, @RequestParam("pin") String pin) { + ResponseEntity> getSingle(@PathVariable String eventName, @PathVariable Long pollId, @RequestParam("pin") String pin) { var result = pollManager.getSingleActiveForEvent(eventName, pollId, pin); if(result.isSuccess()) { return ResponseEntity.ok(ValidatedResponse.fromResult(result, "pin")); @@ -54,8 +54,8 @@ ResponseEntity> getSingle(@PathVariable("even } @PostMapping("/{pollId}/answer") - ResponseEntity> registerAnswer(@PathVariable("eventName") String eventName, - @PathVariable("pollId") Long pollId, + ResponseEntity> registerAnswer(@PathVariable String eventName, + @PathVariable Long pollId, @RequestBody PollVoteForm form) { var result = pollManager.registerAnswer(eventName, pollId, form.getOptionId(), form.getPin()); diff --git a/src/main/java/alfio/controller/api/v2/user/ReservationApiV2Controller.java b/src/main/java/alfio/controller/api/v2/user/ReservationApiV2Controller.java index 9dda479e8a..e75e797622 100644 --- a/src/main/java/alfio/controller/api/v2/user/ReservationApiV2Controller.java +++ b/src/main/java/alfio/controller/api/v2/user/ReservationApiV2Controller.java @@ -65,8 +65,8 @@ import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.security.Principal; import java.time.ZonedDateTime; @@ -121,10 +121,8 @@ public class ReservationApiV2Controller { * @param reservationId * @return */ - @GetMapping({"/reservation/{reservationId}", - "/event/{eventName}/reservation/{reservationId}" //<-deprecated - }) - public ResponseEntity getReservationInfo(@PathVariable("reservationId") String reservationId, Principal principal) { + @GetMapping("/reservation/{reservationId}") + public ResponseEntity getReservationInfo(@PathVariable String reservationId, Principal principal) { Optional res = purchaseContextManager.findByReservationId(reservationId).flatMap(purchaseContext -> ticketReservationManager.findById(reservationId).flatMap(reservation -> { @@ -266,11 +264,8 @@ private Map getActivePaymentMethods(P } } - @GetMapping({ - "/reservation/{reservationId}/status", - "/event/{eventName}/reservation/{reservationId}/status" //<- deprecated - }) - public ResponseEntity getReservationStatus(@PathVariable("reservationId") String reservationId) { + @GetMapping("/reservation/{reservationId}/status") + public ResponseEntity getReservationStatus(@PathVariable String reservationId) { Optional res = ticketReservationRepository.findOptionalStatusAndValidationById(reservationId) .map(status -> new ReservationStatusInfo(status.getStatus(), Boolean.TRUE.equals(status.getValidated()))); @@ -278,29 +273,20 @@ public ResponseEntity getReservationStatus(@PathVariable( } - @DeleteMapping({ - "/reservation/{reservationId}", - "/event/{eventName}/reservation/{reservationId}" //<- deprecated - }) - public ResponseEntity cancelPendingReservation(@PathVariable("reservationId") String reservationId) { + @DeleteMapping("/reservation/{reservationId}") + public ResponseEntity cancelPendingReservation(@PathVariable String reservationId) { getReservationWithPendingStatus(reservationId).ifPresent(er -> ticketReservationManager.cancelPendingReservation(reservationId, false, null)); return ResponseEntity.ok(true); } - @PostMapping({ - "/reservation/{reservationId}/back-to-booking", - "/event/{eventName}/reservation/{reservationId}/back-to-booking" //<- deprecated - }) - public ResponseEntity backToBooking(@PathVariable("reservationId") String reservationId) { + @PostMapping("/reservation/{reservationId}/back-to-booking") + public ResponseEntity backToBooking(@PathVariable String reservationId) { getReservationWithPendingStatus(reservationId).ifPresent(er -> ticketReservationRepository.updateValidationStatus(reservationId, false)); return ResponseEntity.ok(true); } - @PostMapping({ - "/reservation/{reservationId}", - "/event/{eventName}/reservation/{reservationId}"// <- deprecated - }) - public ResponseEntity> confirmOverview(@PathVariable("reservationId") String reservationId, + @PostMapping("/reservation/{reservationId}") + public ResponseEntity> confirmOverview(@PathVariable String reservationId, @RequestParam("lang") String lang, @RequestBody PaymentForm paymentForm, BindingResult bindingResult, @@ -380,11 +366,8 @@ private static ResponseEntity> build return ResponseEntity.status(bindingResult.hasErrors() ? HttpStatus.UNPROCESSABLE_ENTITY : HttpStatus.OK).body(body); } - @PostMapping({ - "/reservation/{reservationId}/validate-to-overview", - "/event/{eventName}/reservation/{reservationId}/validate-to-overview" //<-deprecated - }) - public ResponseEntity> validateToOverview(@PathVariable("reservationId") String reservationId, + @PostMapping("/reservation/{reservationId}/validate-to-overview") + public ResponseEntity> validateToOverview(@PathVariable String reservationId, @RequestParam("lang") String lang, @RequestParam(value = "ignoreWarnings", defaultValue = "false") boolean ignoreWarnings, @RequestBody ContactAndTicketsForm contactAndTicketsForm, @@ -566,9 +549,9 @@ private Optional> getPurchaseContextAnd } @PostMapping("/{purchaseContextType}/{publicIdentifier}/reservation/{reservationId}/re-send-email") - public ResponseEntity reSendReservationConfirmationEmail(@PathVariable("purchaseContextType") PurchaseContextType purchaseContextType, - @PathVariable("publicIdentifier") String publicIdentifier, - @PathVariable("reservationId") String reservationId, + public ResponseEntity reSendReservationConfirmationEmail(@PathVariable PurchaseContextType purchaseContextType, + @PathVariable String publicIdentifier, + @PathVariable String reservationId, @RequestParam("lang") String lang, Principal principal) { @@ -585,16 +568,16 @@ public ResponseEntity reSendReservationConfirmationEmail(@PathVariable( // @GetMapping("/event/{eventName}/reservation/{reservationId}/receipt") - public ResponseEntity getReceipt(@PathVariable("eventName") String eventName, - @PathVariable("reservationId") String reservationId, + public ResponseEntity getReceipt(@PathVariable String eventName, + @PathVariable String reservationId, HttpServletResponse response, Authentication authentication) { return handleReservationWith(eventName, reservationId, authentication, generatePdfFunction(false, response)); } @GetMapping("/event/{eventName}/reservation/{reservationId}/invoice") - public ResponseEntity getInvoice(@PathVariable("eventName") String eventName, - @PathVariable("reservationId") String reservationId, + public ResponseEntity getInvoice(@PathVariable String eventName, + @PathVariable String reservationId, HttpServletResponse response, Authentication authentication) { return handleReservationWith(eventName, reservationId, authentication, generatePdfFunction(true, response)); @@ -650,11 +633,8 @@ private BiFunction> generatePdfFu //---------------- - @PostMapping({ - "/reservation/{reservationId}/payment/{method}/init", - "/event/{eventName}/reservation/{reservationId}/payment/{method}/init" //<-deprecated - }) - public ResponseEntity initTransaction(@PathVariable("reservationId") String reservationId, + @PostMapping("/reservation/{reservationId}/payment/{method}/init") + public ResponseEntity initTransaction(@PathVariable String reservationId, @PathVariable("method") String paymentMethodStr, @RequestParam MultiValueMap allParams) { var paymentMethod = PaymentMethod.safeParse(paymentMethodStr); @@ -673,33 +653,23 @@ public ResponseEntity initTransaction(@PathVaria return responseEntity.orElseGet(() -> ResponseEntity.badRequest().build()); } - @DeleteMapping({ - "/reservation/{reservationId}/payment/token", - "/event/{eventName}/reservation/{reservationId}/payment/token" //<-deprecated - }) - public ResponseEntity removeToken(@PathVariable("eventName") String eventName, - @PathVariable("reservationId") String reservationId) { + @DeleteMapping("/reservation/{reservationId}/payment/token") + public ResponseEntity removeToken(@PathVariable String reservationId) { var res = purchaseContextManager.getReservationWithPurchaseContext(reservationId).map(et -> paymentManager.removePaymentTokenReservation(et.getRight().getId())).orElse(false); return ResponseEntity.ok(res); } - @DeleteMapping({ - "/reservation/{reservationId}/payment", - "/event/{eventName}/reservation/{reservationId}/payment" //<-deprecated - }) - public ResponseEntity deletePaymentAttempt(@PathVariable("reservationId") String reservationId) { + @DeleteMapping("/reservation/{reservationId}/payment") + public ResponseEntity deletePaymentAttempt(@PathVariable String reservationId) { var res = purchaseContextManager.getReservationWithPurchaseContext(reservationId).map(et -> ticketReservationManager.cancelPendingPayment(et.getRight().getId(), et.getLeft())).orElse(false); return ResponseEntity.ok(res); } - @GetMapping({ - "/reservation/{reservationId}/payment/{method}/status", - "/event/{eventName}/reservation/{reservationId}/payment/{method}/status" //<-deprecated - }) + @GetMapping("/reservation/{reservationId}/payment/{method}/status") public ResponseEntity getTransactionStatus( - @PathVariable("reservationId") String reservationId, + @PathVariable String reservationId, @PathVariable("method") String paymentMethodStr) { var paymentMethod = PaymentMethod.safeParse(paymentMethodStr); @@ -715,7 +685,7 @@ public ResponseEntity getTransactionStatus( } @PostMapping("/reservation/{reservationId}/apply-code") - public ResponseEntity> applyCode(@PathVariable("reservationId") String reservationId, @RequestBody ReservationCodeForm reservationCodeForm, BindingResult bindingResult) { + public ResponseEntity> applyCode(@PathVariable String reservationId, @RequestBody ReservationCodeForm reservationCodeForm, BindingResult bindingResult) { if(reservationCodeForm.getType() != ReservationCodeForm.ReservationCodeType.SUBSCRIPTION) { throw new IllegalStateException(reservationCodeForm.getType() + " not supported"); } @@ -731,7 +701,7 @@ public ResponseEntity> applyCode(@PathVariable("reser } @DeleteMapping("/reservation/{reservationId}/remove-code") - public ResponseEntity removeCode(@PathVariable("reservationId") String reservationId, @RequestParam("type") ReservationCodeForm.ReservationCodeType type) { + public ResponseEntity removeCode(@PathVariable String reservationId, @RequestParam("type") ReservationCodeForm.ReservationCodeType type) { boolean res = false; if (type == ReservationCodeForm.ReservationCodeType.SUBSCRIPTION) { res = purchaseContextManager.getReservationWithPurchaseContext(reservationId).map(et -> ticketReservationManager.removeSubscription(et.getRight())).orElse(false); diff --git a/src/main/java/alfio/controller/api/v2/user/SubscriptionsApiController.java b/src/main/java/alfio/controller/api/v2/user/SubscriptionsApiController.java index 0aee06fc94..bd924d997a 100644 --- a/src/main/java/alfio/controller/api/v2/user/SubscriptionsApiController.java +++ b/src/main/java/alfio/controller/api/v2/user/SubscriptionsApiController.java @@ -40,7 +40,7 @@ import org.springframework.validation.MapBindingResult; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import java.security.Principal; import java.time.ZonedDateTime; import java.util.*; @@ -107,7 +107,7 @@ private static BasicSubscriptionDescriptorInfo subscriptionDescriptorMapper(Subs } @GetMapping("subscription/{id}") - public ResponseEntity getSubscriptionInfo(@PathVariable("id") String id, HttpSession session) { + public ResponseEntity getSubscriptionInfo(@PathVariable String id, HttpSession session) { var res = subscriptionManager.getSubscriptionById(UUID.fromString(id)); return res .map(s -> { @@ -149,7 +149,7 @@ public ResponseEntity getSubscriptionI } @PostMapping("subscription/{id}") - public ResponseEntity> reserveSubscription(@PathVariable("id") String id, Locale locale, Principal principal) { + public ResponseEntity> reserveSubscription(@PathVariable String id, Locale locale, Principal principal) { var bindingResult = new MapBindingResult(new HashMap<>(), "request"); return subscriptionManager.getSubscriptionById(UUID.fromString(id)) .map(subscriptionDescriptor -> { diff --git a/src/main/java/alfio/controller/api/v2/user/TicketApiV2Controller.java b/src/main/java/alfio/controller/api/v2/user/TicketApiV2Controller.java index 4889bd1d23..dcfe86a4c4 100644 --- a/src/main/java/alfio/controller/api/v2/user/TicketApiV2Controller.java +++ b/src/main/java/alfio/controller/api/v2/user/TicketApiV2Controller.java @@ -50,7 +50,7 @@ import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; import java.nio.charset.StandardCharsets; @@ -89,8 +89,8 @@ public class TicketApiV2Controller { "/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/code.png", "/event/{eventName}/ticket/{ticketIdentifier}/code.png" }) - public void showQrCode(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier, HttpServletResponse response) throws IOException { + public void showQrCode(@PathVariable String eventName, + @PathVariable String ticketIdentifier, HttpServletResponse response) throws IOException { var oData = ticketReservationManager.fetchCompleteAndAssigned(eventName, ticketIdentifier); if (oData.isEmpty()) { response.sendError(HttpServletResponse.SC_FORBIDDEN); @@ -111,8 +111,8 @@ public void showQrCode(@PathVariable("eventName") String eventName, } @GetMapping("/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/download-ticket") - public void generateTicketPdf(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier, + public void generateTicketPdf(@PathVariable String eventName, + @PathVariable String ticketIdentifier, HttpServletResponse response) { ticketReservationManager.fetchCompleteAndAssigned(eventName, ticketIdentifier).ifPresentOrElse(data -> { @@ -151,8 +151,8 @@ public void generateTicketPdf(@PathVariable("eventName") String eventName, } @PostMapping("/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/send-ticket-by-email") - public ResponseEntity sendTicketByEmail(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier) { + public ResponseEntity sendTicketByEmail(@PathVariable String eventName, + @PathVariable String ticketIdentifier) { return ticketReservationManager.fetchCompleteAndAssigned(eventName, ticketIdentifier).map(data -> { Event event = data.getLeft(); @@ -175,8 +175,8 @@ public ResponseEntity sendTicketByEmail(@PathVariable("eventName") Stri } @DeleteMapping("/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}") - public ResponseEntity releaseTicket(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier) { + public ResponseEntity releaseTicket(@PathVariable String eventName, + @PathVariable String ticketIdentifier) { var oData = ticketReservationManager.fetchCompleteAndAssigned(eventName, ticketIdentifier); try { oData.ifPresent(triple -> ticketReservationManager.releaseTicket(triple.getLeft(), triple.getMiddle(), triple.getRight())); @@ -187,8 +187,8 @@ public ResponseEntity releaseTicket(@PathVariable("eventName") String e } @GetMapping("/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/full") - public ResponseEntity getTicket(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier) { + public ResponseEntity getTicket(@PathVariable String eventName, + @PathVariable String ticketIdentifier) { var optionalTicket = ticketReservationManager.fetchCompleteAndAssigned(eventName, ticketIdentifier) .map(complete -> { @@ -202,8 +202,8 @@ public ResponseEntity getTicket(@PathVa } @GetMapping("/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}") - public ResponseEntity getTicketInfo(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier) { + public ResponseEntity getTicketInfo(@PathVariable String eventName, + @PathVariable String ticketIdentifier) { //TODO: cleanup, we load useless data here! @@ -254,8 +254,8 @@ public ResponseEntity getTicketInfo(@PathVariable("eventName") Strin } @PutMapping("/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}") - public ResponseEntity> updateTicketInfo(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier, + public ResponseEntity> updateTicketInfo(@PathVariable String eventName, + @PathVariable String ticketIdentifier, @RequestBody UpdateTicketOwnerForm updateTicketOwner, BindingResult bindingResult, Authentication authentication) { @@ -286,9 +286,9 @@ public ResponseEntity> updateTicketInfo(@PathVariable } @GetMapping("/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/code/{checkInCode}/check-in-info") - public ResponseEntity getCheckInInfo(@PathVariable("eventName") String eventName, - @PathVariable("ticketIdentifier") String ticketIdentifier, - @PathVariable("checkInCode") String checkInCode, + public ResponseEntity getCheckInInfo(@PathVariable String eventName, + @PathVariable String ticketIdentifier, + @PathVariable String checkInCode, @RequestParam(value = "tz", required = false) String userTz) { return ResponseEntity.of(ticketReservationManager.fetchCompleteAndAssignedForOnlineCheckIn(eventName, ticketIdentifier) .flatMap(info -> { diff --git a/src/main/java/alfio/controller/api/v2/user/UserApiV2Controller.java b/src/main/java/alfio/controller/api/v2/user/UserApiV2Controller.java index fd3cf6f280..45fac628a4 100644 --- a/src/main/java/alfio/controller/api/v2/user/UserApiV2Controller.java +++ b/src/main/java/alfio/controller/api/v2/user/UserApiV2Controller.java @@ -158,8 +158,8 @@ private static ResponseEntity redirectToIdpLogout(Authentication SecurityContextHolder.getContext().setAuthentication(null); } String redirectUrl = "/"; - if(authentication instanceof OpenIdAlfioAuthentication) { - redirectUrl = ((OpenIdAlfioAuthentication) authentication).getIdpLogoutRedirectionUrl(); + if(authentication instanceof OpenIdAlfioAuthentication alfioAuthentication) { + redirectUrl = alfioAuthentication.getIdpLogoutRedirectionUrl(); } return ResponseEntity.ok(new ClientRedirect(redirectUrl)); } diff --git a/src/main/java/alfio/controller/api/v2/user/support/EventLoader.java b/src/main/java/alfio/controller/api/v2/user/support/EventLoader.java index be956ffe23..ea784832ad 100644 --- a/src/main/java/alfio/controller/api/v2/user/support/EventLoader.java +++ b/src/main/java/alfio/controller/api/v2/user/support/EventLoader.java @@ -31,7 +31,7 @@ import lombok.AllArgsConstructor; import org.springframework.stereotype.Component; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import java.util.*; import static alfio.model.system.ConfigurationKeys.*; diff --git a/src/main/java/alfio/controller/api/wallet/GoogleWalletApiController.java b/src/main/java/alfio/controller/api/wallet/GoogleWalletApiController.java index 6f9a8a7166..7bf4accd83 100644 --- a/src/main/java/alfio/controller/api/wallet/GoogleWalletApiController.java +++ b/src/main/java/alfio/controller/api/wallet/GoogleWalletApiController.java @@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Optional; @@ -38,7 +38,7 @@ public class GoogleWalletApiController { private final GoogleWalletManager walletManager; @GetMapping("/version/passes/{uuid}") - public void walletPass(@PathVariable("eventName") String eventName, + public void walletPass(@PathVariable String eventName, @PathVariable("uuid") String serialNumber, HttpServletResponse response) throws IOException { Optional> validationResult = walletManager.validateTicket(eventName, serialNumber); diff --git a/src/main/java/alfio/controller/form/ContactAndTicketsForm.java b/src/main/java/alfio/controller/form/ContactAndTicketsForm.java index 46f0b95bde..7b81c6184f 100644 --- a/src/main/java/alfio/controller/form/ContactAndTicketsForm.java +++ b/src/main/java/alfio/controller/form/ContactAndTicketsForm.java @@ -32,7 +32,7 @@ import alfio.util.ItalianTaxIdValidator; import alfio.util.Validator; import lombok.Data; -import org.apache.commons.collections.MapUtils; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.validation.BindingResult; import org.springframework.validation.ValidationUtils; diff --git a/src/main/java/alfio/controller/payment/PayPalCallbackController.java b/src/main/java/alfio/controller/payment/PayPalCallbackController.java index 80d1dbdda8..5ec5e97a93 100644 --- a/src/main/java/alfio/controller/payment/PayPalCallbackController.java +++ b/src/main/java/alfio/controller/payment/PayPalCallbackController.java @@ -43,9 +43,9 @@ public class PayPalCallbackController { private final PayPalManager payPalManager; @GetMapping("/confirm") - public String payPalSuccess(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, + public String payPalSuccess(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, @PathVariable("purchaseContextIdentifier") String purchaseContextId, - @PathVariable("reservationId") String reservationId, + @PathVariable String reservationId, @RequestParam(value = "token", required = false) String payPalPaymentId, @RequestParam(value = "PayerID", required = false) String payPalPayerID, @RequestParam(value = "hmac") String hmac) { @@ -77,9 +77,9 @@ public String payPalSuccess(@PathVariable("purchaseContextType") PurchaseContext } @GetMapping("/cancel") - public String payPalCancel(@PathVariable("reservationId") String reservationId, + public String payPalCancel(@PathVariable String reservationId, @RequestParam(value = "token", required = false) String payPalPaymentId, - @RequestParam(value = "hmac") String hmac) { + @RequestParam String hmac) { var optionalPurchaseContext = purchaseContextManager.findByReservationId(reservationId); if(optionalPurchaseContext.isEmpty()) { diff --git a/src/main/java/alfio/controller/payment/SaferpayCallbackController.java b/src/main/java/alfio/controller/payment/SaferpayCallbackController.java index 2583280bf9..ebd2e9eb5d 100644 --- a/src/main/java/alfio/controller/payment/SaferpayCallbackController.java +++ b/src/main/java/alfio/controller/payment/SaferpayCallbackController.java @@ -34,9 +34,9 @@ public class SaferpayCallbackController { private final PurchaseContextManager purchaseContextManager; @GetMapping(PaymentPageInitializeRequestBuilder.CANCEL_URL_TEMPLATE) - public String saferpayCancel(@PathVariable("purchaseContextType") PurchaseContext.PurchaseContextType purchaseContextType, - @PathVariable("purchaseContextIdentifier") String purchaseContextIdentifier, - @PathVariable("reservationId") String reservationId) { + public String saferpayCancel(@PathVariable PurchaseContext.PurchaseContextType purchaseContextType, + @PathVariable String purchaseContextIdentifier, + @PathVariable String reservationId) { var maybePurchaseContext = purchaseContextManager.findBy(purchaseContextType, purchaseContextIdentifier); if(maybePurchaseContext.isEmpty()) { return "redirect:/"; diff --git a/src/main/java/alfio/controller/payment/api/PaymentApiController.java b/src/main/java/alfio/controller/payment/api/PaymentApiController.java index 5aeb600f3f..520e10c159 100644 --- a/src/main/java/alfio/controller/payment/api/PaymentApiController.java +++ b/src/main/java/alfio/controller/payment/api/PaymentApiController.java @@ -43,7 +43,7 @@ public class PaymentApiController { @PostMapping({"/api/reservation/{reservationId}/payment/{method}/init", "/api/events/{eventName}/reservation/{reservationId}/payment/{method}/init" //<-deprecated }) - public ResponseEntity initTransaction(@PathVariable("reservationId") String reservationId, + public ResponseEntity initTransaction(@PathVariable String reservationId, @PathVariable("method") String paymentMethodStr, @RequestParam MultiValueMap allParams) { @@ -69,7 +69,7 @@ private Optional> getEventRes "/api/reservation/{reservationId}/payment/{method}/status", "/api/events/{eventName}/reservation/{reservationId}/payment/{method}/status" //<-deprecated }) - public ResponseEntity getTransactionStatus(@PathVariable("reservationId") String reservationId, + public ResponseEntity getTransactionStatus(@PathVariable String reservationId, @PathVariable("method") String paymentMethodStr) { var paymentMethod = PaymentMethod.safeParse(paymentMethodStr); if (paymentMethod == null) { @@ -86,7 +86,7 @@ public ResponseEntity getTransactionStatus(@PathVariable("reserva "/api/v2/public/reservation/{reservationId}/transaction/force-check", "/api/v2/public/event/{eventName}/reservation/{reservationId}/transaction/force-check" //<-deprecated }) - public ResponseEntity forceCheckStatus(@PathVariable("reservationId") String reservationId) { + public ResponseEntity forceCheckStatus(@PathVariable String reservationId) { return ResponseEntity.of(getEventReservationPair(reservationId) .flatMap(pair -> ticketReservationManager.forceTransactionCheck(pair.getLeft(), pair.getRight()))); } diff --git a/src/main/java/alfio/controller/payment/api/mollie/MolliePaymentWebhookController.java b/src/main/java/alfio/controller/payment/api/mollie/MolliePaymentWebhookController.java index 005c20cb51..f79659c6e1 100644 --- a/src/main/java/alfio/controller/payment/api/mollie/MolliePaymentWebhookController.java +++ b/src/main/java/alfio/controller/payment/api/mollie/MolliePaymentWebhookController.java @@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Map; import java.util.Optional; @@ -43,7 +43,7 @@ public class MolliePaymentWebhookController { @PostMapping(WEBHOOK_URL_TEMPLATE) public ResponseEntity receivePaymentConfirmation(HttpServletRequest request, - @PathVariable("reservationId") String reservationId) { + @PathVariable String reservationId) { return Optional.ofNullable(StringUtils.trimToNull(request.getParameter("id"))) .flatMap(id -> purchaseContextManager.findByReservationId(reservationId) .map(purchaseContext -> { diff --git a/src/main/java/alfio/controller/payment/api/saferpay/SaferpayPaymentWebhookController.java b/src/main/java/alfio/controller/payment/api/saferpay/SaferpayPaymentWebhookController.java index 8319ac40cd..2b84258616 100644 --- a/src/main/java/alfio/controller/payment/api/saferpay/SaferpayPaymentWebhookController.java +++ b/src/main/java/alfio/controller/payment/api/saferpay/SaferpayPaymentWebhookController.java @@ -37,7 +37,7 @@ public class SaferpayPaymentWebhookController { private final PurchaseContextManager purchaseContextManager; @GetMapping(PaymentPageInitializeRequestBuilder.WEBHOOK_URL_TEMPLATE) - ResponseEntity handleTransactionNotification(@PathVariable("reservationId") String reservationId) { + ResponseEntity handleTransactionNotification(@PathVariable String reservationId) { return purchaseContextManager.findByReservationId(reservationId) .map(purchaseContext -> { var result = ticketReservationManager.processTransactionWebhook("", null, PaymentProxy.SAFERPAY, diff --git a/src/main/java/alfio/controller/payment/api/stripe/StripePaymentWebhookController.java b/src/main/java/alfio/controller/payment/api/stripe/StripePaymentWebhookController.java index 85e66ad541..ce7ad15b3e 100644 --- a/src/main/java/alfio/controller/payment/api/stripe/StripePaymentWebhookController.java +++ b/src/main/java/alfio/controller/payment/api/stripe/StripePaymentWebhookController.java @@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Map; import static alfio.util.HttpUtils.APPLICATION_JSON_UTF8; diff --git a/src/main/java/alfio/controller/support/CSPConfigurer.java b/src/main/java/alfio/controller/support/CSPConfigurer.java index 2d234eb3fa..c4e0d38a46 100644 --- a/src/main/java/alfio/controller/support/CSPConfigurer.java +++ b/src/main/java/alfio/controller/support/CSPConfigurer.java @@ -22,7 +22,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.security.SecureRandom; import java.util.List; diff --git a/src/main/java/alfio/extension/ConsoleLogger.java b/src/main/java/alfio/extension/ConsoleLogger.java index c465c6bccc..ff2ea25a16 100644 --- a/src/main/java/alfio/extension/ConsoleLogger.java +++ b/src/main/java/alfio/extension/ConsoleLogger.java @@ -60,6 +60,6 @@ private static String composeMessage(Object first, Object... others) { } else { paramObjects = new Object[] {first}; } - return String.format(messageTemplate + parameterPlaceholders, paramObjects); + return (messageTemplate + parameterPlaceholders).formatted(paramObjects); } } diff --git a/src/main/java/alfio/extension/ExtensionUtils.java b/src/main/java/alfio/extension/ExtensionUtils.java index 0382c8d160..24b17ae6d5 100644 --- a/src/main/java/alfio/extension/ExtensionUtils.java +++ b/src/main/java/alfio/extension/ExtensionUtils.java @@ -46,7 +46,7 @@ private ExtensionUtils() { } public static String format(String str, String... params) { - return String.format(str, (Object[]) params); + return str.formatted((Object[]) params); } public static String md5(String str) { @@ -102,24 +102,22 @@ public static String convertToJson(Object o) { static Object unwrap(Object o) { if (o instanceof Scriptable) { - if (o instanceof NativeArray) { + if (o instanceof NativeArray na) { List res = new ArrayList<>(); - var na = (NativeArray) o; for (var a : na) { res.add(unwrap(a)); } return res; - } else if (o instanceof NativeJavaObject) { - return ((NativeJavaObject) o).unwrap(); - } else if (o instanceof NativeObject) { - var na = (NativeObject) o; + } else if (o instanceof NativeJavaObject object) { + return object.unwrap(); + } else if (o instanceof NativeObject na) { Map res = new LinkedHashMap<>(); for (var kv : na.entrySet()) { res.put(kv.getKey(), unwrap(kv.getValue())); } return res; - } else if (o instanceof IdScriptableObject) { - return parseIdScriptableObject((IdScriptableObject) o); + } else if (o instanceof IdScriptableObject object) { + return parseIdScriptableObject(object); } } else if (o instanceof CharSequence) { return o.toString(); diff --git a/src/main/java/alfio/extension/JSNodeVisitor.java b/src/main/java/alfio/extension/JSNodeVisitor.java index 9a1b6d23ef..7d0a0f975f 100644 --- a/src/main/java/alfio/extension/JSNodeVisitor.java +++ b/src/main/java/alfio/extension/JSNodeVisitor.java @@ -68,8 +68,8 @@ private void checkNode(AstNode node) { return; } // keep track of function calls - if (node instanceof FunctionCall) { - AstNode target = ((FunctionCall) node).getTarget(); + if (node instanceof FunctionCall call) { + AstNode target = call.getTarget(); if (!(target instanceof PropertyGet)) { Name name = (Name) target; // keep all function calls inside an ArrayList @@ -77,8 +77,8 @@ private void checkNode(AstNode node) { // go back in the script and find the parent i.e. the function in which this node is inside AstNode parentNode = node.getParent(); while (parentNode != null) { - if (parentNode instanceof FunctionNode) { - Name parentName = ((FunctionNode) parentNode).getFunctionName(); + if (parentNode instanceof FunctionNode functionNode) { + Name parentName = functionNode.getFunctionName(); String id = parentName.getIdentifier(); // when the function name is found, check if it was called from somewhere else // if this function is called from another place and it contains another function call, throw an exception @@ -95,16 +95,18 @@ private void checkNode(AstNode node) { || node instanceof DoLoop || node instanceof WithStatement || node instanceof LabeledStatement - || (node instanceof PropertyGet && ((PropertyGet) node).getRight().getString().equals("System")) - || (node instanceof PropertyGet && ((PropertyGet) node).getRight().getString().equals("getClass")) + || (node instanceof PropertyGet get && get.getRight().getString().equals("System")) + || (node instanceof PropertyGet propertyGet && propertyGet.getRight().getString().equals("getClass")) || (node instanceof Name && node.getString().equals("newInstance"))) { - throw new ScriptNotValidException("Script not valid. One or more of the following components have been detected: \n" + - "- while() Loop\n" + - "- with() Statement\n" + - "- a labeled statement\n" + - "- Access to java.lang.System\n" + - "- Access to Object.getClass()\n" + - "- Java reflection usage"); + throw new ScriptNotValidException(""" + Script not valid. One or more of the following components have been detected:\s + - while() Loop + - with() Statement + - a labeled statement + - Access to java.lang.System + - Access to Object.getClass() + - Java reflection usage\ + """); } } diff --git a/src/main/java/alfio/extension/JSSymbol.java b/src/main/java/alfio/extension/JSSymbol.java index 286d73d9ae..d835b457bf 100644 --- a/src/main/java/alfio/extension/JSSymbol.java +++ b/src/main/java/alfio/extension/JSSymbol.java @@ -40,8 +40,7 @@ class JSSymbol { public JSSymbol(AstNode node) { this.node = node; - if (node instanceof FunctionNode) { - FunctionNode funcNode = (FunctionNode)node; + if (node instanceof FunctionNode funcNode) { List args = funcNode.getParams(); if (args != null) { for (AstNode argNode : args) { @@ -59,8 +58,8 @@ public void addChild(JSSymbol child) { if (child.getType() == Token.VAR) { //check if it is already added AstNode childNode = child.getNode(); - if (childNode instanceof VariableInitializer) { - String varName = ((Name)((VariableInitializer) childNode).getTarget()).getIdentifier(); + if (childNode instanceof VariableInitializer initializer) { + String varName = ((Name)initializer.getTarget()).getIdentifier(); if (localVars.containsKey(varName)) { return; } diff --git a/src/main/java/alfio/extension/ScriptingExecutionService.java b/src/main/java/alfio/extension/ScriptingExecutionService.java index 3f078fda0c..036094ff71 100644 --- a/src/main/java/alfio/extension/ScriptingExecutionService.java +++ b/src/main/java/alfio/extension/ScriptingExecutionService.java @@ -73,8 +73,8 @@ public class ScriptingExecutionService { private final Cache asyncExecutors = Caffeine.newBuilder() .expireAfterAccess(Duration.ofHours(12)) .removalListener((String key, Executor value, RemovalCause cause) -> { - if (value instanceof ExecutorService) { - ((ExecutorService) value).shutdown(); + if (value instanceof ExecutorService service) { + service.shutdown(); } }) .build(); @@ -198,8 +198,7 @@ private T executeScriptFinally(String name, String script, Map authority.getAuthority().equals("ROLE_" + SYSTEM_API_CLIENT)); } diff --git a/src/main/java/alfio/manager/AdminReservationManager.java b/src/main/java/alfio/manager/AdminReservationManager.java index c6dd5ef117..9fa3121cc5 100644 --- a/src/main/java/alfio/manager/AdminReservationManager.java +++ b/src/main/java/alfio/manager/AdminReservationManager.java @@ -417,7 +417,7 @@ private Result performConfirmation(String reservationId, .orElse("Unknown error"); log.warn("Unable to apply subscription {}: {}", subscriptionId, bindingResult.getAllErrors().stream().map(ObjectError::getCode).collect(joining(", "))); - return Result.error(ErrorCode.custom(message, String.format("Cannot assign subscription %s to Reservation %s", subscriptionId, reservationId))); + return Result.error(ErrorCode.custom(message, "Cannot assign subscription %s to Reservation %s".formatted(subscriptionId, reservationId))); } reservation = ticketReservationManager.findById(reservationId).orElseThrow(); diff --git a/src/main/java/alfio/manager/AdminReservationRequestManager.java b/src/main/java/alfio/manager/AdminReservationRequestManager.java index ebb04d0929..9100a91369 100644 --- a/src/main/java/alfio/manager/AdminReservationRequestManager.java +++ b/src/main/java/alfio/manager/AdminReservationRequestManager.java @@ -26,10 +26,7 @@ import alfio.repository.AdminReservationRequestRepository; import alfio.repository.EventRepository; import alfio.repository.user.UserRepository; -import alfio.util.ClockProvider; import lombok.RequiredArgsConstructor; -import lombok.extern.log4j.Log4j2; -import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Triple; @@ -53,6 +50,7 @@ import static alfio.model.modification.AdminReservationModification.Notification.orEmpty; import static java.util.Collections.singletonList; import static java.util.Optional.ofNullable; +import static org.apache.commons.collections4.CollectionUtils.size; @Component @Transactional @@ -128,7 +126,7 @@ public Pair processPendingReservations() { } }); - return Pair.of(CollectionUtils.size(result.get(true)), CollectionUtils.size(result.get(false))); + return Pair.of(size(result.get(true)), size(result.get(false))); } diff --git a/src/main/java/alfio/manager/BillingDocumentManager.java b/src/main/java/alfio/manager/BillingDocumentManager.java index 3ad6d35da3..7fdea8cdc5 100644 --- a/src/main/java/alfio/manager/BillingDocumentManager.java +++ b/src/main/java/alfio/manager/BillingDocumentManager.java @@ -206,7 +206,7 @@ private String formatDocumentNumber(PurchaseContext purchaseContext, int sequenc String pattern = configurationManager .getFor(ConfigurationKeys.INVOICE_NUMBER_PATTERN, purchaseContext.getConfigurationLevel()) .getValueOrDefault("%d"); - return String.format(ObjectUtils.firstNonNull(StringUtils.trimToNull(pattern), "%d"), sequence); + return ObjectUtils.firstNonNull(StringUtils.trimToNull(pattern), "%d").formatted(sequence); } private Map prepareModelForBillingDocument(PurchaseContext purchaseContext, TicketReservation reservation, OrderSummary summary, BillingDocument.Type type) { diff --git a/src/main/java/alfio/manager/CheckInManager.java b/src/main/java/alfio/manager/CheckInManager.java index 99ded75b4e..cd64547796 100644 --- a/src/main/java/alfio/manager/CheckInManager.java +++ b/src/main/java/alfio/manager/CheckInManager.java @@ -35,7 +35,7 @@ import lombok.AllArgsConstructor; import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.digest.DigestUtils; -import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.tuple.Pair; diff --git a/src/main/java/alfio/manager/EventManager.java b/src/main/java/alfio/manager/EventManager.java index 35f57b5eaf..12c58dac7f 100644 --- a/src/main/java/alfio/manager/EventManager.java +++ b/src/main/java/alfio/manager/EventManager.java @@ -48,7 +48,6 @@ import alfio.util.RequestUtils; import ch.digitalfondue.npjt.AffectedRowCountAndKey; import lombok.AllArgsConstructor; -import lombok.extern.log4j.Log4j2; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.IterableUtils; import org.apache.commons.lang3.ObjectUtils; @@ -108,7 +107,6 @@ public class EventManager { private final SpecialPriceRepository specialPriceRepository; private final PromoCodeDiscountRepository promoCodeRepository; private final ConfigurationManager configurationManager; - private final PurchaseContextFieldRepository purchaseContextFieldRepository; private final EventDeleterRepository eventDeleterRepository; private final PurchaseContextFieldManager purchaseContextFieldManager; private final Flyway flyway; @@ -364,7 +362,7 @@ public void updateEventSeatsAndPrices(Event original, EventModification em, Stri List ids = ticketRepository.selectNotAllocatedTicketsForUpdate(eventId, Math.abs(seatsDifference), singletonList(TicketStatus.FREE.name())); Validate.isTrue(ids.size() == Math.abs(seatsDifference), "cannot lock enough tickets for deletion."); int invalidatedTickets = ticketRepository.invalidateTickets(ids); - Validate.isTrue(ids.size() == invalidatedTickets, String.format("error during ticket invalidation: expected %d, got %d", ids.size(), invalidatedTickets)); + Validate.isTrue(ids.size() == invalidatedTickets, "error during ticket invalidation: expected %d, got %d".formatted(ids.size(), invalidatedTickets)); } } if (updateSubscriptions) { @@ -510,7 +508,7 @@ void reallocateTickets(TicketCategoryStatisticView src, Optional List lockedTickets = ticketRepository.selectTicketInCategoryForUpdate(event.getId(), src.getId(), notSoldTickets, singletonList(TicketStatus.FREE.name())); int locked = lockedTickets.size(); if(locked != notSoldTickets) { - throw new IllegalStateException(String.format("Expected %d free tickets, got %d.", notSoldTickets, locked)); + throw new IllegalStateException("Expected %d free tickets, got %d.".formatted(notSoldTickets, locked)); } ticketCategoryRepository.updateSeatsAvailability(src.getId(), src.getSoldTicketsCount()); if(target.isPresent()) { @@ -524,7 +522,7 @@ void reallocateTickets(TicketCategoryStatisticView src, Optional } } else { int result = ticketRepository.unbindTicketsFromCategory(event.getId(), src.getId(), lockedTickets); - Validate.isTrue(result == locked, String.format("Expected %d modified tickets, got %d.", locked, result)); + Validate.isTrue(result == locked, "Expected %d modified tickets, got %d.".formatted(locked, result)); ticketRepository.resetTickets(lockedTickets); } specialPriceRepository.cancelExpiredTokens(src.getId()); @@ -824,13 +822,13 @@ void handleTicketNumberModification(Event event, TicketCategory updated, int add } private void createAllTicketsForEvent(Event event, EventModification em) { - Validate.notNull(em.getAvailableSeats()); + Objects.requireNonNull(em.getAvailableSeats()); final MapSqlParameterSource[] params = prepareTicketsBulkInsertParameters(event.now(clockProvider), event, em.getAvailableSeats(), TicketStatus.FREE); ticketRepository.bulkTicketInitialization(params); } private int insertEvent(EventModification em) { - Validate.notNull(em.getAvailableSeats()); + Objects.requireNonNull(em.getAvailableSeats()); validatePaymentProxies(em.getAllowedPaymentProxies(), em.getOrganizationId()); String paymentProxies = collectPaymentProxies(em); BigDecimal vat = em.isFreeOfCharge() ? BigDecimal.ZERO : em.getVatPercentage(); diff --git a/src/main/java/alfio/manager/FileDownloadManager.java b/src/main/java/alfio/manager/FileDownloadManager.java index 0f4d60ebde..a7ed4cfaa2 100644 --- a/src/main/java/alfio/manager/FileDownloadManager.java +++ b/src/main/java/alfio/manager/FileDownloadManager.java @@ -17,9 +17,11 @@ package alfio.manager; import alfio.model.modification.UploadBase64FileModification; +import com.beust.jcommander.Strings; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.extern.log4j.Log4j2; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -31,6 +33,8 @@ import java.util.Objects; import java.util.regex.Pattern; +import static java.util.Objects.requireNonNull; + public class FileDownloadManager { @@ -42,8 +46,8 @@ public FileDownloadManager(HttpClient httpClient) { } public DownloadedFile downloadFile(String url) { - HttpRequest httpRequest = HttpRequest.newBuilder(URI.create(url)).GET().build(); - HttpResponse response = null; + HttpRequest httpRequest = HttpRequest.newBuilder(URI.create(requireNonNull(StringUtils.trimToNull(url)))).GET().build(); + HttpResponse response; try { response = httpClient.send(httpRequest, HttpResponse.BodyHandlers.ofByteArray()); } catch (IOException exception) { diff --git a/src/main/java/alfio/manager/GroupManager.java b/src/main/java/alfio/manager/GroupManager.java index 79472f5b73..680a9400c1 100644 --- a/src/main/java/alfio/manager/GroupManager.java +++ b/src/main/java/alfio/manager/GroupManager.java @@ -31,8 +31,7 @@ import alfio.repository.TicketRepository; import ch.digitalfondue.npjt.AffectedRowCountAndKey; import lombok.RequiredArgsConstructor; -import lombok.extern.log4j.Log4j2; -import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.slf4j.Logger; diff --git a/src/main/java/alfio/manager/NotificationManager.java b/src/main/java/alfio/manager/NotificationManager.java index e0ba7e82df..8f534a2c1c 100644 --- a/src/main/java/alfio/manager/NotificationManager.java +++ b/src/main/java/alfio/manager/NotificationManager.java @@ -43,7 +43,6 @@ import org.apache.commons.lang3.tuple.Triple; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.security.crypto.codec.Hex; import org.springframework.stereotype.Component; @@ -92,7 +91,6 @@ public class NotificationManager { private final EnumMap, byte[]>> attachmentTransformer; - @Autowired public NotificationManager(Mailer mailer, MessageSourceManager messageSourceManager, PlatformTransactionManager transactionManager, @@ -285,8 +283,8 @@ public void sendTicketByEmail(Ticket ticket, var attachmentModel = new HashMap(); // attachment model expects non-string properties to be JSON, so we convert them renderedTemplate.getSrcModel().forEach((k, v) -> { - if(v instanceof String) { - attachmentModel.put(k, (String) v); + if(v instanceof String string) { + attachmentModel.put(k, string); } else { attachmentModel.put(k, Json.toJson(v)); } diff --git a/src/main/java/alfio/manager/RecaptchaService.java b/src/main/java/alfio/manager/RecaptchaService.java index 267a80f45a..ee6bee734c 100644 --- a/src/main/java/alfio/manager/RecaptchaService.java +++ b/src/main/java/alfio/manager/RecaptchaService.java @@ -25,7 +25,7 @@ import org.apache.commons.lang3.ObjectUtils; import org.springframework.stereotype.Component; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; import java.net.http.HttpClient; import java.net.http.HttpResponse; diff --git a/src/main/java/alfio/manager/SpecialPriceManager.java b/src/main/java/alfio/manager/SpecialPriceManager.java index 43ad162557..81389d1408 100644 --- a/src/main/java/alfio/manager/SpecialPriceManager.java +++ b/src/main/java/alfio/manager/SpecialPriceManager.java @@ -111,7 +111,7 @@ public boolean sendCodeToAssignee(List input, String event ContentLanguage defaultLocale = eventLanguages.contains(ContentLanguage.ENGLISH) ? ContentLanguage.ENGLISH : eventLanguages.get(0); set.forEach(m -> { var messageSource = messageSourceManager.getMessageSourceFor(event); - Locale locale = LocaleUtil.forLanguageTag(StringUtils.defaultString(StringUtils.trimToNull(m.getLanguage()), defaultLocale.getLanguage())); + Locale locale = LocaleUtil.forLanguageTag(Objects.toString(StringUtils.trimToNull(m.getLanguage()), defaultLocale.getLanguage())); var usePartnerCode = configurationManager.getFor(USE_PARTNER_CODE_INSTEAD_OF_PROMOTIONAL, event.getConfigurationLevel()).getValueAsBooleanOrDefault(); var promoCodeDescription = messageSource.getMessage("show-event.promo-code-type."+(usePartnerCode ? "partner" : "promotional"), null, null, locale); Map model = TemplateResource.prepareModelForSendReservedCode(organization, event, m, eventManager.getEventUrl(event), promoCodeDescription); diff --git a/src/main/java/alfio/manager/SpecialPriceTokenGenerator.java b/src/main/java/alfio/manager/SpecialPriceTokenGenerator.java index 366d4b7c4d..64de993e3f 100644 --- a/src/main/java/alfio/manager/SpecialPriceTokenGenerator.java +++ b/src/main/java/alfio/manager/SpecialPriceTokenGenerator.java @@ -30,7 +30,6 @@ import org.apache.commons.text.RandomStringGenerator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataAccessException; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -58,14 +57,13 @@ public class SpecialPriceTokenGenerator { private static final RandomStringGenerator RANDOM_STRING_GENERATOR = new RandomStringGenerator.Builder() .selectFrom(ADMITTED_CHARACTERS) .usingRandom(RANDOM::nextInt) - .build(); + .get(); private final SpecialPriceRepository specialPriceRepository; private final TicketCategoryRepository ticketCategoryRepository; private final EventRepository eventRepository; private final ConfigurationManager configurationManager; - @Autowired public SpecialPriceTokenGenerator(ConfigurationManager configurationManager, SpecialPriceRepository specialPriceRepository, TicketCategoryRepository ticketCategoryRepository, diff --git a/src/main/java/alfio/manager/TicketReservationManager.java b/src/main/java/alfio/manager/TicketReservationManager.java index 65cc924633..ad5c691c6d 100644 --- a/src/main/java/alfio/manager/TicketReservationManager.java +++ b/src/main/java/alfio/manager/TicketReservationManager.java @@ -1084,7 +1084,7 @@ public void markExpiredInPaymentReservationAsStuck(Date expirationDate) { reservationsGroupedByEvent.forEach((event, reservations) -> { Organization organization = organizationRepository.getById(event.getOrganizationId()); notificationManager.sendSimpleEmail(event, null, organization.getEmail(), - STUCK_TICKETS_SUBJECT, () -> RenderedTemplate.plaintext(String.format(STUCK_TICKETS_MSG, event.getDisplayName()), Map.of())); + STUCK_TICKETS_SUBJECT, () -> RenderedTemplate.plaintext(STUCK_TICKETS_MSG.formatted(event.getDisplayName()), Map.of())); extensionManager.handleStuckReservations(event, reservations.stream().map(p -> p.getLeft().getId()).collect(toList())); }); @@ -1454,7 +1454,7 @@ public void sendReminderForOfflinePaymentsToEventManagers() { if(!reservations.isEmpty()) { Organization organization = organizationRepository.getById(event.getOrganizationId()); List cc = notificationManager.getCCForEventOrganizer(event); - String subject = String.format("There are %d pending offline payments that will expire in event: %s", reservations.size(), event.getDisplayName()); + String subject = "There are %d pending offline payments that will expire in event: %s".formatted(reservations.size(), event.getDisplayName()); String baseUrl = configurationManager.getFor(BASE_URL, ConfigurationLevel.event(event)).getRequiredValue(); Map model = TemplateResource.prepareModelForOfflineReservationExpiringEmailForOrganizer(event, reservations, baseUrl); notificationManager.sendSimpleEmail(event, null, organization.getEmail(), cc, subject, () -> @@ -1519,8 +1519,7 @@ private void sendAssignmentReminder(Pair> p) { int quietPeriod = configurationManager.getFor(ASSIGNMENT_REMINDER_INTERVAL, ConfigurationLevel.event(event)).getValueAsIntOrDefault(3); p.getRight().stream() .map(id -> findByIdForNotification(id, clockProvider.withZone(eventZoneId), quietPeriod)) - .filter(Optional::isPresent) - .map(Optional::get) + .flatMap(Optional::stream) .forEach(reservation -> { Map model = reservationHelper.prepareModelForReservationEmail(event, reservation); ticketReservationRepository.updateLatestReminderTimestamp(reservation.getId(), ZonedDateTime.now(clockProvider.withZone(eventZoneId))); @@ -1575,7 +1574,7 @@ public void releaseTicket(Event event, TicketReservation ticketReservation, fina String reservationId = ticketReservation.getId(); //#365 - reset UUID when releasing a ticket int result = ticketRepository.releaseTicket(reservationId, UUID.randomUUID().toString(), event.getId(), ticket.getId()); - Validate.isTrue(result == 1, String.format("Expected 1 row to be updated, got %d", result)); + Validate.isTrue(result == 1, "Expected 1 row to be updated, got %d".formatted(result)); if(category.isAccessRestricted() || !category.isBounded()) { ticketRepository.unbindTicketsFromCategory(event.getId(), category.getId(), singletonList(ticket.getId())); } @@ -1777,7 +1776,7 @@ static String buildCompleteBillingAddress(CustomerName customerName, .orElse(null); } - return Arrays.stream(stripAll(defaultString(companyName, fullName), billingAddressLine1, billingAddressLine2, stripToEmpty(billingAddressZip) + " " + stripToEmpty(billingAddressCity) + " " + stripToEmpty(billingAddressState), stripToNull(country))) + return Arrays.stream(stripAll(Objects.toString(companyName, fullName), billingAddressLine1, billingAddressLine2, stripToEmpty(billingAddressZip) + " " + stripToEmpty(billingAddressCity) + " " + stripToEmpty(billingAddressState), stripToNull(country))) .filter(Predicate.not(StringUtils::isEmpty)) .collect(joining("\n")); } @@ -2173,7 +2172,7 @@ private void checkOfflinePaymentsForEvent(Event event) { if(matchingCount > 0) { var organization = organizationRepository.getById(event.getOrganizationId()); var cc = notificationManager.getCCForEventOrganizer(event); - var subject = String.format("%d matching payments found for: %s", matchingCount, event.getDisplayName()); + var subject = "%d matching payments found for: %s".formatted(matchingCount, event.getDisplayName()); Map model = Map.of( "matchingCount", matchingCount, diff --git a/src/main/java/alfio/manager/UploadedResourceManager.java b/src/main/java/alfio/manager/UploadedResourceManager.java index 2d0ca5dc8d..b9c648713c 100644 --- a/src/main/java/alfio/manager/UploadedResourceManager.java +++ b/src/main/java/alfio/manager/UploadedResourceManager.java @@ -23,7 +23,6 @@ import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -48,7 +47,6 @@ public class UploadedResourceManager { private final UploadedResourceRepository uploadedResourceRepository; - @Autowired public UploadedResourceManager(UploadedResourceRepository uploadedResourceRepository) { this.uploadedResourceRepository = uploadedResourceRepository; } diff --git a/src/main/java/alfio/manager/i18n/I18nManager.java b/src/main/java/alfio/manager/i18n/I18nManager.java index 11343ccb94..577d8e00b1 100644 --- a/src/main/java/alfio/manager/i18n/I18nManager.java +++ b/src/main/java/alfio/manager/i18n/I18nManager.java @@ -20,7 +20,6 @@ import alfio.model.ContentLanguage; import alfio.model.system.ConfigurationKeys; import alfio.repository.EventRepository; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -34,7 +33,6 @@ public class I18nManager { private final EventRepository eventRepository; - @Autowired public I18nManager(EventRepository eventRepository) { this.eventRepository = eventRepository; } diff --git a/src/main/java/alfio/manager/openid/BaseOpenIdAuthenticationManager.java b/src/main/java/alfio/manager/openid/BaseOpenIdAuthenticationManager.java index 1553901611..02992b4bca 100644 --- a/src/main/java/alfio/manager/openid/BaseOpenIdAuthenticationManager.java +++ b/src/main/java/alfio/manager/openid/BaseOpenIdAuthenticationManager.java @@ -44,7 +44,7 @@ import org.springframework.web.util.UriComponents; import org.springframework.web.util.UriComponentsBuilder; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; diff --git a/src/main/java/alfio/manager/openid/OpenIdAuthenticationManager.java b/src/main/java/alfio/manager/openid/OpenIdAuthenticationManager.java index 1ad982f719..70dcde5bbf 100644 --- a/src/main/java/alfio/manager/openid/OpenIdAuthenticationManager.java +++ b/src/main/java/alfio/manager/openid/OpenIdAuthenticationManager.java @@ -18,7 +18,7 @@ import alfio.config.authentication.support.OpenIdAlfioAuthentication; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; public interface OpenIdAuthenticationManager { diff --git a/src/main/java/alfio/manager/support/reservation/OrderSummaryGenerator.java b/src/main/java/alfio/manager/support/reservation/OrderSummaryGenerator.java index 3788f76cb2..8819864590 100644 --- a/src/main/java/alfio/manager/support/reservation/OrderSummaryGenerator.java +++ b/src/main/java/alfio/manager/support/reservation/OrderSummaryGenerator.java @@ -220,10 +220,10 @@ List extractSummary(PriceContainer.VatStatus reservationVatStatus, null, reservationVatStatus)); }); // - if(purchaseContext instanceof SubscriptionDescriptor) { + if(purchaseContext instanceof SubscriptionDescriptor descriptor) { if(!subscriptionsToInclude.isEmpty()) { var subscription = subscriptionsToInclude.get(0); - var priceContainer = new SubscriptionPriceContainer(subscription, promoCodeDiscount, (SubscriptionDescriptor) purchaseContext); + var priceContainer = new SubscriptionPriceContainer(subscription, promoCodeDiscount, descriptor); var priceBeforeVat = formatUnit(priceContainer.getNetPrice(), currencyCode); summary.add(new SummaryRow(purchaseContext.getTitle().get(locale.getLanguage()), formatCents(priceContainer.getSummarySrcPriceCts(), currencyCode), diff --git a/src/main/java/alfio/manager/support/response/ValidatedResponse.java b/src/main/java/alfio/manager/support/response/ValidatedResponse.java index 39a527b72d..1ebad242c3 100644 --- a/src/main/java/alfio/manager/support/response/ValidatedResponse.java +++ b/src/main/java/alfio/manager/support/response/ValidatedResponse.java @@ -39,15 +39,14 @@ public class ValidatedResponse { public static ValidatedResponse toResponse(BindingResult bindingResult, T value) { var transformed = bindingResult.getAllErrors().stream().map(objectError -> { - if (objectError instanceof FieldError) { - var fe = (FieldError) objectError; + if (objectError instanceof FieldError fe) { return new ValidationResult.ErrorDescriptor(fe.getField(), "", fe.getCode(), fe.getArguments()); } else { return new ValidationResult.ErrorDescriptor(objectError.getObjectName(), "", objectError.getCode(), objectError.getArguments()); } }).collect(Collectors.toList()); - List warnings = bindingResult instanceof CustomBindingResult ? ((CustomBindingResult)bindingResult).getWarnings() : List.of(); + List warnings = bindingResult instanceof CustomBindingResult cbr ? cbr.getWarnings() : List.of(); return new ValidatedResponse<>(ValidationResult.failed(transformed, warnings), value); } diff --git a/src/main/java/alfio/manager/system/ConfigurationManager.java b/src/main/java/alfio/manager/system/ConfigurationManager.java index a0cdf4f346..1b8d4a3865 100644 --- a/src/main/java/alfio/manager/system/ConfigurationManager.java +++ b/src/main/java/alfio/manager/system/ConfigurationManager.java @@ -54,7 +54,7 @@ import org.springframework.core.env.Profiles; import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import java.math.BigInteger; import java.security.SecureRandom; import java.util.*; @@ -99,8 +99,7 @@ private Optional findByConfigurationPathAndKey(ConfigurationPath return selectPath(configList); } case PURCHASE_CONTEXT: { - if (path instanceof EventConfigurationPath) { - EventConfigurationPath o = (EventConfigurationPath) path; + if (path instanceof EventConfigurationPath o) { configList.addAll(configurationRepository.findByEventAndKey(o.getOrganizationId(), o.getId(), keyAsString)); } else { @@ -143,8 +142,7 @@ public void saveConfig(ConfigurationPathKey pathKey, String value) { saveOrganizationConfiguration(orgPath.getId(), pathKey.getKey().name(), value); break; case PURCHASE_CONTEXT: - if (path instanceof EventConfigurationPath) { - var eventPath = (EventConfigurationPath) path; + if (path instanceof EventConfigurationPath eventPath) { saveEventConfiguration(eventPath.getId(), eventPath.getOrganizationId(), pathKey.getKey().name(), value); } else { var subscriptionDescriptorPath = (SubscriptionDescriptorConfigurationPath) path; @@ -594,9 +592,7 @@ public Map getFor(Collection getSingle(String key) { public List getAll(Collection keys) { return keys.stream() .map(this::getSingle) - .filter(Optional::isPresent) - .map(Optional::get) + .flatMap(Optional::stream) .map(c -> new ConfigurationKeyValuePathLevel(c.getKey(), c.getValue(), c.getConfigurationPathLevel())) .collect(Collectors.toList()); } diff --git a/src/main/java/alfio/manager/system/SendGridMailer.java b/src/main/java/alfio/manager/system/SendGridMailer.java index 677aa16678..189d71d8c7 100644 --- a/src/main/java/alfio/manager/system/SendGridMailer.java +++ b/src/main/java/alfio/manager/system/SendGridMailer.java @@ -21,8 +21,7 @@ import alfio.repository.user.OrganizationRepository; import alfio.util.HttpUtils; import alfio.util.Json; -import lombok.extern.log4j.Log4j2; -import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ArrayUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -73,7 +72,7 @@ public void send(Configurable configurable, final String fromName, final String //prepare request final var body = Json.GSON.toJson(payload); final var request = HttpRequest.newBuilder(URI.create("https://api.sendgrid.com/v3/mail/send")) - .header(HttpUtils.AUTHORIZATION, String.format("Bearer %s", config.get(ConfigurationKeys.SENDGRID_API_KEY).getRequiredValue())) + .header(HttpUtils.AUTHORIZATION, "Bearer %s".formatted(config.get(ConfigurationKeys.SENDGRID_API_KEY).getRequiredValue())) .header(HttpUtils.CONTENT_TYPE, HttpUtils.APPLICATION_JSON) .POST(HttpRequest.BodyPublishers.ofString(body)).build(); try { @@ -94,7 +93,7 @@ private List> createPersonalizations(final String to, final final var recipients = new ArrayList<>(); recipients.add(Map.of(EMAIL, to)); if (CollectionUtils.isNotEmpty(cc)) { - recipients.addAll(cc.stream().map(email -> Map.of(EMAIL, email)).collect(Collectors.toList())); + recipients.addAll(cc.stream().map(email -> Map.of(EMAIL, email)).toList()); } return List.of(Map.of("to", recipients, "subject", subject)); } diff --git a/src/main/java/alfio/manager/system/SmtpMailer.java b/src/main/java/alfio/manager/system/SmtpMailer.java index 2c7fc0aee3..534ee52ff6 100644 --- a/src/main/java/alfio/manager/system/SmtpMailer.java +++ b/src/main/java/alfio/manager/system/SmtpMailer.java @@ -32,10 +32,10 @@ import org.springframework.mail.javamail.MimeMessageHelper; import org.springframework.mail.javamail.MimeMessagePreparator; -import javax.activation.FileTypeMap; -import javax.mail.MessagingException; -import javax.mail.Session; -import javax.mail.internet.MimeMessage; +import jakarta.activation.FileTypeMap; +import jakarta.mail.MessagingException; +import jakarta.mail.Session; +import jakarta.mail.internet.MimeMessage; import java.io.IOException; import java.io.InputStream; import java.util.*; diff --git a/src/main/java/alfio/manager/user/UserManager.java b/src/main/java/alfio/manager/user/UserManager.java index aff89444c6..5c16e266ae 100644 --- a/src/main/java/alfio/manager/user/UserManager.java +++ b/src/main/java/alfio/manager/user/UserManager.java @@ -465,8 +465,8 @@ private void checkAccessToOrganizationId(Principal principal, int organizationId } private boolean isSystemApiUser(Principal principal) { - return principal instanceof APITokenAuthentication - && ((APITokenAuthentication)principal).getAuthorities().stream() + return principal instanceof APITokenAuthentication apita + && apita.getAuthorities().stream() .allMatch(authority -> authority.getAuthority().equals("ROLE_" + SYSTEM_API_CLIENT)); } } diff --git a/src/main/java/alfio/manager/wallet/GoogleWalletManager.java b/src/main/java/alfio/manager/wallet/GoogleWalletManager.java index c262a73aeb..e47df46b17 100644 --- a/src/main/java/alfio/manager/wallet/GoogleWalletManager.java +++ b/src/main/java/alfio/manager/wallet/GoogleWalletManager.java @@ -115,10 +115,10 @@ private void invalidateObject(String ticketId, String objectId, Map ContentLanguage.ALL_LANGUAGES.stream().filter(l-> l.getLanguage().equals(x.getLang())).findFirst()) - .filter(Optional::isPresent) - .map(Optional::get) + .flatMap(Optional::stream) .mapToInt(ContentLanguage::getValue).reduce(0,(x,y) -> x | y); return new EventModification( @@ -129,8 +128,7 @@ public EventModification toEventModificationUpdate(EventWithAdditionalInfo origi if(description != null){ locales = description.stream() .map(x -> ContentLanguage.ALL_LANGUAGES.stream().filter(l -> l.getLanguage().equals(x.getLang())).findFirst()) - .filter(Optional::isPresent) - .map(Optional::get) + .flatMap(Optional::stream) .mapToInt(ContentLanguage::getValue).reduce(0, (x, y) -> x | y); } diff --git a/src/main/java/alfio/model/result/Result.java b/src/main/java/alfio/model/result/Result.java index ad6386fa61..4f748d7745 100644 --- a/src/main/java/alfio/model/result/Result.java +++ b/src/main/java/alfio/model/result/Result.java @@ -19,7 +19,7 @@ import alfio.model.result.ValidationResult.ErrorDescriptor; import lombok.AllArgsConstructor; import lombok.Getter; -import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.tuple.Pair; import org.springframework.validation.ObjectError; diff --git a/src/main/java/alfio/repository/AdditionalServiceItemRepository.java b/src/main/java/alfio/repository/AdditionalServiceItemRepository.java index c22e3af697..18f6372c80 100644 --- a/src/main/java/alfio/repository/AdditionalServiceItemRepository.java +++ b/src/main/java/alfio/repository/AdditionalServiceItemRepository.java @@ -29,20 +29,24 @@ @QueryRepository public interface AdditionalServiceItemRepository { - String SELECT_BOOKED_ADDITIONAL_SERVICES = "select asd.value as as_name, ads.id as_id, count(ads.id) as qty from additional_service_item ai" + - " join additional_service ads on additional_service_id_fk = ads.id" + - " join additional_service_description asd on ads.id = asd.additional_service_id_fk" + - " where ai.event_id_fk = :eventId and ai.status in ('ACQUIRED', 'CHECKED_IN', 'TO_BE_PAID')" + - " and ads.service_type <> 'DONATION'" + - " and ads.supplement_policy <> 'MANDATORY_ONE_FOR_TICKET'" + - " and asd.locale = :language" + - " and asd.type = 'TITLE'" + - " and ai.tickets_reservation_uuid = :reservationId"; + String SELECT_BOOKED_ADDITIONAL_SERVICES = """ + select asd.value as as_name, ads.id as_id, count(ads.id) as qty from additional_service_item ai\ + join additional_service ads on additional_service_id_fk = ads.id\ + join additional_service_description asd on ads.id = asd.additional_service_id_fk\ + where ai.event_id_fk = :eventId and ai.status in ('ACQUIRED', 'CHECKED_IN', 'TO_BE_PAID')\ + and ads.service_type <> 'DONATION'\ + and ads.supplement_policy <> 'MANDATORY_ONE_FOR_TICKET'\ + and asd.locale = :language\ + and asd.type = 'TITLE'\ + and ai.tickets_reservation_uuid = :reservationId\ + """; String UPDATE_STATUS = "update additional_service_item set status = :status where event_id_fk = :eventId and tickets_reservation_uuid = :reservationUuid"; String FIND_BY_RESERVATION_ID = "select * from additional_service_item where event_id_fk = :eventId and tickets_reservation_uuid = :reservationUuid"; - @Query("insert into additional_service_item (uuid, creation, tickets_reservation_uuid, additional_service_id_fk, status, event_id_fk, src_price_cts, final_price_cts, vat_cts, discount_cts, currency_code) " + - "values(:uuid, :creation, :ticketsReservationUuid, :additionalServiceId, :status, :eventId, :srcPriceCts, :finalPriceCts, :vatCts, :discountCts, :currencyCode)") + @Query(""" + insert into additional_service_item (uuid, creation, tickets_reservation_uuid, additional_service_id_fk, status, event_id_fk, src_price_cts, final_price_cts, vat_cts, discount_cts, currency_code) \ + values(:uuid, :creation, :ticketsReservationUuid, :additionalServiceId, :status, :eventId, :srcPriceCts, :finalPriceCts, :vatCts, :discountCts, :currencyCode)\ + """) @AutoGeneratedKey("id") AffectedRowCountAndKey insert(@Bind("uuid") String uuid, @Bind("creation") ZonedDateTime creation, @@ -70,9 +74,11 @@ List findByTicketId(@Bind("eventId") int eventId, @Query(UPDATE_STATUS + " and ticket_id_fk = :ticketId") int updateItemsStatusWithTicketId(@Bind("eventId") int eventId, @Bind("reservationUuid") String reservationUuid, @Bind("ticketId") int ticketId, @Bind("status") AdditionalServiceItemStatus status); - @Query("select count(*) > 0 from additional_service_item " + - " inner join additional_service on additional_service_id_fk = additional_service.id " + - " where additional_service_item.event_id_fk = :eventId and service_type = 'SUPPLEMENT' and tickets_reservation_uuid = :reservationId and final_price_cts > 0") + @Query(""" + select count(*) > 0 from additional_service_item \ + inner join additional_service on additional_service_id_fk = additional_service.id \ + where additional_service_item.event_id_fk = :eventId and service_type = 'SUPPLEMENT' and tickets_reservation_uuid = :reservationId and final_price_cts > 0\ + """) boolean hasPaidSupplements(@Bind("eventId") int eventId, @Bind("reservationId") String reservationId); @Query("select count(*) from additional_service_item where event_id_fk = :eventId and tickets_reservation_uuid = :reservationId") @@ -93,19 +99,21 @@ List getAdditionalServicesBookedForTicket(@Bind("reserv @Query( - "select" + - " ai.uuid ai_uuid, ai.creation ai_creation, ai.last_modified ai_last_modified, ai.final_price_cts ai_final_price_cts, ai.currency_code ai_currency_code, ai.vat_cts ai_vat_cts, ai.discount_cts ai_discount_cts," + - " tr.id tr_uuid, tr.first_name tr_first_name, tr.last_name tr_last_name, tr.email_address tr_email_address," + - " asv.service_type as_type, asd.value as_title, ai.status as ai_status " + - " from additional_service_item ai" + - " join additional_service asv on ai.additional_service_id_fk = asv.id" + - " join tickets_reservation tr on ai.tickets_reservation_uuid = tr.id" + - " join additional_service_description asd on ai.additional_service_id_fk = asd.additional_service_id_fk" + - " where ai.event_id_fk = :eventId" + - " and asv.service_type = :additionalServiceType" + - " and asd.type = 'TITLE'" + - " and asd.locale = :locale " + - " and ai.status in ('ACQUIRED', 'CHECKED_IN', 'TO_BE_PAID') " + """ + select\ + ai.uuid ai_uuid, ai.creation ai_creation, ai.last_modified ai_last_modified, ai.final_price_cts ai_final_price_cts, ai.currency_code ai_currency_code, ai.vat_cts ai_vat_cts, ai.discount_cts ai_discount_cts,\ + tr.id tr_uuid, tr.first_name tr_first_name, tr.last_name tr_last_name, tr.email_address tr_email_address,\ + asv.service_type as_type, asd.value as_title, ai.status as ai_status \ + from additional_service_item ai\ + join additional_service asv on ai.additional_service_id_fk = asv.id\ + join tickets_reservation tr on ai.tickets_reservation_uuid = tr.id\ + join additional_service_description asd on ai.additional_service_id_fk = asd.additional_service_id_fk\ + where ai.event_id_fk = :eventId\ + and asv.service_type = :additionalServiceType\ + and asd.type = 'TITLE'\ + and asd.locale = :locale \ + and ai.status in ('ACQUIRED', 'CHECKED_IN', 'TO_BE_PAID') \ + """ ) List getAdditionalServicesOfTypeForEvent(@Bind("eventId") int eventId, @Bind("additionalServiceType") String additionalServiceType, @@ -114,12 +122,16 @@ List getAdditionalServicesOfTypeForEvent(@Bind("eve @Query("select count(*) from additional_service_item where additional_service_id_fk = :serviceId and status <> 'INVALIDATED'") int countItemsForService(@Bind("serviceId") int additionalServiceId); - @Query(type = QueryType.TEMPLATE, value = "insert into additional_service_item (uuid, creation, tickets_reservation_uuid, additional_service_id_fk, status, event_id_fk, src_price_cts, final_price_cts, vat_cts, discount_cts, currency_code) " + - "values(:uuid, now(), :ticketsReservationUuid, :additionalServiceId, :status, :eventId, :srcPriceCts, :finalPriceCts, :vatCts, :discountCts, :currencyCode)") + @Query(type = QueryType.TEMPLATE, value = """ + insert into additional_service_item (uuid, creation, tickets_reservation_uuid, additional_service_id_fk, status, event_id_fk, src_price_cts, final_price_cts, vat_cts, discount_cts, currency_code) \ + values(:uuid, now(), :ticketsReservationUuid, :additionalServiceId, :status, :eventId, :srcPriceCts, :finalPriceCts, :vatCts, :discountCts, :currencyCode)\ + """) String batchInsert(); - @Query(type = QueryType.TEMPLATE, value = "update additional_service_item set tickets_reservation_uuid = :ticketsReservationUuid, status = :status, src_price_cts = :srcPriceCts, final_price_cts = :finalPriceCts, vat_cts = :vatCts, discount_cts = :discountCts, currency_code = :currencyCode" + - " where id = :id and additional_service_id_fk = :additionalServiceId") + @Query(type = QueryType.TEMPLATE, value = """ + update additional_service_item set tickets_reservation_uuid = :ticketsReservationUuid, status = :status, src_price_cts = :srcPriceCts, final_price_cts = :finalPriceCts, vat_cts = :vatCts, discount_cts = :discountCts, currency_code = :currencyCode\ + where id = :id and additional_service_id_fk = :additionalServiceId\ + """) String batchUpdate(); @Query("update additional_service_item set status = 'INVALIDATED' where id in (select id from additional_service_item where additional_service_id_fk = :serviceId and status = 'FREE' limit :count)") @@ -128,24 +140,32 @@ List getAdditionalServicesOfTypeForEvent(@Bind("eve @Query("select id from additional_service_item where additional_service_id_fk = :serviceId and status = 'FREE' limit :count for update skip locked") List lockExistingItems(@Bind("serviceId") int additionalServiceId, @Bind("count") int count); - @Query(type = QueryType.TEMPLATE, value = "update additional_service_item set ticket_id_fk = :ticketId" + - " where id = :itemId and tickets_reservation_uuid = :reservationId and status = 'PENDING'") + @Query(type = QueryType.TEMPLATE, value = """ + update additional_service_item set ticket_id_fk = :ticketId\ + where id = :itemId and tickets_reservation_uuid = :reservationId and status = 'PENDING'\ + """) String batchLinkToTicket(); - @Query("delete from additional_service_item asi" + - " using additional_service adds" + - " where adds.id = asi.additional_service_id_fk and asi.event_id_fk = :eventId and asi.tickets_reservation_uuid = :reservationId" + - " and adds.available_qty = -1") + @Query(""" + delete from additional_service_item asi\ + using additional_service adds\ + where adds.id = asi.additional_service_id_fk and asi.event_id_fk = :eventId and asi.tickets_reservation_uuid = :reservationId\ + and adds.available_qty = -1\ + """) int deleteAdditionalServiceItemsByReservationId(@Bind("eventId") int eventId, @Bind("reservationId") String reservationId); - @Query("update additional_service_item asi set ticket_id_fk = null, status = 'FREE', tickets_reservation_uuid = null" + - " from additional_service adds where adds.id = asi.additional_service_id_fk" + - " and asi.event_id_fk = :eventId and asi.tickets_reservation_uuid = :reservationId" + - " and adds.available_qty > 0") + @Query(""" + update additional_service_item asi set ticket_id_fk = null, status = 'FREE', tickets_reservation_uuid = null\ + from additional_service adds where adds.id = asi.additional_service_id_fk\ + and asi.event_id_fk = :eventId and asi.tickets_reservation_uuid = :reservationId\ + and adds.available_qty > 0\ + """) int revertAdditionalServiceItemsByReservationId(@Bind("eventId") int eventId, @Bind("reservationId") String reservationId); - @Query("select count(*) from additional_service_item asi" + - " join ticket t on asi.ticket_id_fk = t.id and asi.event_id_fk = t.event_id" + - " where t.uuid = :ticketUUID and asi.id in (:additionalServiceIds)") + @Query(""" + select count(*) from additional_service_item asi\ + join ticket t on asi.ticket_id_fk = t.id and asi.event_id_fk = t.event_id\ + where t.uuid = :ticketUUID and asi.id in (:additionalServiceIds)\ + """) int countMatchingItemsForTicket(@Bind("ticketUUID") String ticketUuid, @Bind("additionalServiceIds") Collection ids); } diff --git a/src/main/java/alfio/repository/AdditionalServiceRepository.java b/src/main/java/alfio/repository/AdditionalServiceRepository.java index 63f1619583..11406ed6b4 100644 --- a/src/main/java/alfio/repository/AdditionalServiceRepository.java +++ b/src/main/java/alfio/repository/AdditionalServiceRepository.java @@ -58,8 +58,10 @@ default Map> getCount(int eve @Query("delete from additional_service where id = :id and event_id_fk = :eventId") int delete(@Bind("id") int id, @Bind("eventId") int eventId); - @Query("insert into additional_service (event_id_fk, fix_price, ordinal, available_qty, max_qty_per_order, inception_ts, expiration_ts, vat, vat_type, price_cts, src_price_cts, service_type, supplement_policy) " + - "values(:eventId, :fixPrice, :ordinal, :availableQty, :maxQtyPerOrder, :inceptionTs, :expirationTs, :vat, :vatType, 0, :srcPriceCts, :type, :supplementPolicy)") + @Query(""" + insert into additional_service (event_id_fk, fix_price, ordinal, available_qty, max_qty_per_order, inception_ts, expiration_ts, vat, vat_type, price_cts, src_price_cts, service_type, supplement_policy) \ + values(:eventId, :fixPrice, :ordinal, :availableQty, :maxQtyPerOrder, :inceptionTs, :expirationTs, :vat, :vatType, 0, :srcPriceCts, :type, :supplementPolicy)\ + """) @AutoGeneratedKey("id") AffectedRowCountAndKey insert(@Bind("eventId") int eventId, @Bind("srcPriceCts") int srcPriceCts, @Bind("fixPrice") boolean fixPrice, @Bind("ordinal") int ordinal, @Bind("availableQty") int availableQuantity, @Bind("maxQtyPerOrder") int maxQtyPerOrder, @@ -68,8 +70,10 @@ AffectedRowCountAndKey insert(@Bind("eventId") int eventId, @Bind("srcP @Bind("type")AdditionalService.AdditionalServiceType type, @Bind("supplementPolicy") AdditionalService.SupplementPolicy supplementPolicy); - @Query("update additional_service set fix_price = :fixPrice, ordinal = :ordinal, available_qty = :availableQty, max_qty_per_order = :maxQtyPerOrder," + - " inception_ts = :inceptionTs, expiration_ts = :expirationTs, vat = :vat, vat_type = :vatType, src_price_cts = :srcPriceCts, supplement_policy = :policy where id = :id") + @Query(""" + update additional_service set fix_price = :fixPrice, ordinal = :ordinal, available_qty = :availableQty, max_qty_per_order = :maxQtyPerOrder,\ + inception_ts = :inceptionTs, expiration_ts = :expirationTs, vat = :vat, vat_type = :vatType, src_price_cts = :srcPriceCts, supplement_policy = :policy where id = :id\ + """) int update(@Bind("id") int id, @Bind("fixPrice") boolean fixPrice, @Bind("ordinal") int ordinal, @Bind("availableQty") int availableQuantity, @Bind("maxQtyPerOrder") int maxQtyPerOrder, @Bind("inceptionTs") ZonedDateTime inception, @Bind("expirationTs") ZonedDateTime expiration, @Bind("vat") BigDecimal vat, diff --git a/src/main/java/alfio/repository/AuditingRepository.java b/src/main/java/alfio/repository/AuditingRepository.java index 34614fc49e..c1412c775f 100644 --- a/src/main/java/alfio/repository/AuditingRepository.java +++ b/src/main/java/alfio/repository/AuditingRepository.java @@ -35,8 +35,10 @@ @QueryRepository public interface AuditingRepository { - @Query("insert into auditing(reservation_id, user_id, event_id, event_type, event_time, entity_type, entity_id, modifications) " + - " values (:reservationId, :userId, :eventId, :eventType, :eventTime, :entityType, :entityId, :modifications)") + @Query(""" + insert into auditing(reservation_id, user_id, event_id, event_type, event_time, entity_type, entity_id, modifications) \ + values (:reservationId, :userId, :eventId, :eventType, :eventTime, :entityType, :entityId, :modifications)\ + """) int insert(@Bind("reservationId") String reservationId, @Bind("userId") Integer userId, @Bind("eventId") Integer eventId, @Bind("eventType") Audit.EventType eventType, @Bind("eventTime") Date eventTime, @@ -82,15 +84,21 @@ Integer countAuditsOfTypeForTicket(@Bind("reservationId") String reservationId, @Query("select count(*) from auditing_user where reservation_id = :reservationId and event_type in (:eventTypes) and date_trunc('day', :referenceDate::timestamp) = date_trunc('day', event_time)") Integer countAuditsOfTypesInTheSameDay(@Bind("reservationId") String reservationId, @Bind("eventTypes") Collection eventTypes, @Bind("referenceDate") ZonedDateTime date); - @Query("insert into auditing(reservation_id, user_id, event_id, event_type, event_time, entity_type, entity_id, modifications) " + - " select tickets_reservation_id, null, event_id, 'UPDATE_TICKET_CATEGORY', current_timestamp, 'TICKET', concat('', id), null from ticket where category_id = :ticketCategoryId and tickets_reservation_id is not null") + @Query(""" + insert into auditing(reservation_id, user_id, event_id, event_type, event_time, entity_type, entity_id, modifications) \ + select tickets_reservation_id, null, event_id, 'UPDATE_TICKET_CATEGORY', current_timestamp, 'TICKET', concat('', id), null from ticket where category_id = :ticketCategoryId and tickets_reservation_id is not null\ + """) int insertUpdateTicketInCategoryId(@Bind("ticketCategoryId") int id); - @Query("insert into auditing(reservation_id, user_id, event_id, event_type, event_time, entity_type, entity_id, modifications) " + - " select tickets_reservation_id, null, event_id, 'TAG_TICKET', current_timestamp, 'TICKET', concat('', id), :modifications from ticket where id in (:ticketIds)") + @Query(""" + insert into auditing(reservation_id, user_id, event_id, event_type, event_time, entity_type, entity_id, modifications) \ + select tickets_reservation_id, null, event_id, 'TAG_TICKET', current_timestamp, 'TICKET', concat('', id), :modifications from ticket where id in (:ticketIds)\ + """) int registerTicketTag(@Bind("ticketIds") List ids, @Bind("modifications") @JSONData List> modifications); - @Query("insert into auditing(reservation_id, user_id, event_id, event_type, event_time, entity_type, entity_id, modifications) " + - " select tickets_reservation_id, null, event_id, 'UNTAG_TICKET', current_timestamp, 'TICKET', concat('', id), :modifications from ticket where id in (:ticketIds)") + @Query(""" + insert into auditing(reservation_id, user_id, event_id, event_type, event_time, entity_type, entity_id, modifications) \ + select tickets_reservation_id, null, event_id, 'UNTAG_TICKET', current_timestamp, 'TICKET', concat('', id), :modifications from ticket where id in (:ticketIds)\ + """) int registerTicketUntag(@Bind("ticketIds") List ids, @Bind("modifications") @JSONData List> modifications); } diff --git a/src/main/java/alfio/repository/BillingDocumentRepository.java b/src/main/java/alfio/repository/BillingDocumentRepository.java index 3dd429a1b6..7e15d982dd 100644 --- a/src/main/java/alfio/repository/BillingDocumentRepository.java +++ b/src/main/java/alfio/repository/BillingDocumentRepository.java @@ -26,10 +26,12 @@ @QueryRepository public interface BillingDocumentRepository { - String LOAD_ALL_BY_EVENT_ID = "select a.* from billing_document a inner join" + - " (select max(generation_ts) as time,reservation_id_fk from billing_document where status = 'VALID' and type = 'INVOICE' and event_id_fk = :eventId group by reservation_id_fk) b" + - " on a.generation_ts = b.time and a.reservation_id_fk = b.reservation_id_fk" + - " union select * from billing_document where status = 'VALID' and event_id_fk = :eventId and type <> 'INVOICE'"; + String LOAD_ALL_BY_EVENT_ID = """ + select a.* from billing_document a inner join\ + (select max(generation_ts) as time,reservation_id_fk from billing_document where status = 'VALID' and type = 'INVOICE' and event_id_fk = :eventId group by reservation_id_fk) b\ + on a.generation_ts = b.time and a.reservation_id_fk = b.reservation_id_fk\ + union select * from billing_document where status = 'VALID' and event_id_fk = :eventId and type <> 'INVOICE'\ + """; @Query("select * from billing_document where reservation_id_fk = :reservationId and status = 'VALID' order by generation_ts desc limit 1") Optional findLatestByReservationId(@Bind("reservationId") String reservationId); @@ -51,8 +53,10 @@ int invalidateAllPreviousDocumentsOfType(@Bind("type") BillingDocument.Type type @Query("select * from billing_document where reservation_id_fk = :reservationId order by generation_ts desc, id desc") List findAllByReservationId(@Bind("reservationId") String reservationId); - @Query("insert into billing_document(event_id_fk, number, reservation_id_fk, type, model, generation_ts, status, organization_id_fk)" + - " values(:eventId, :number, :reservationId, :type, :model, :generationTimestamp, 'VALID', :organizationId)") + @Query(""" + insert into billing_document(event_id_fk, number, reservation_id_fk, type, model, generation_ts, status, organization_id_fk)\ + values(:eventId, :number, :reservationId, :type, :model, :generationTimestamp, 'VALID', :organizationId)\ + """) @AutoGeneratedKey("id") AffectedRowCountAndKey insert(@Bind("eventId") Integer eventId, @Bind("reservationId") String reservationId, @@ -62,9 +66,11 @@ AffectedRowCountAndKey insert(@Bind("eventId") Integer eventId, @Bind("generationTimestamp")ZonedDateTime generationTs, @Bind("organizationId") int organizationId); - @Query("select * from billing_document a inner join " + - "(select max(generation_ts) as time,reservation_id_fk from billing_document where status = 'VALID' and type = :type and event_id_fk = :eventId group by reservation_id_fk) b" + - " on a.generation_ts = b.time and a.reservation_id_fk = b.reservation_id_fk") + @Query(""" + select * from billing_document a inner join \ + (select max(generation_ts) as time,reservation_id_fk from billing_document where status = 'VALID' and type = :type and event_id_fk = :eventId group by reservation_id_fk) b\ + on a.generation_ts = b.time and a.reservation_id_fk = b.reservation_id_fk\ + """) List findAllOfTypeForEvent(@Bind("type") BillingDocument.Type type, @Bind("eventId") int eventId); @Query(LOAD_ALL_BY_EVENT_ID + " order by reservation_id_fk, generation_ts") @@ -79,10 +85,12 @@ AffectedRowCountAndKey insert(@Bind("eventId") Integer eventId, @Query("delete from billing_document where reservation_id_fk in (:reservationIds) and event_id_fk = :eventId") int deleteForReservations(@Bind("reservationIds") List reservationIds, @Bind("eventId") int eventId); - @Query("select id from billing_document a inner join" + - "(select max(generation_ts) as time,reservation_id_fk from billing_document where status = 'VALID' and type = 'INVOICE' and event_id_fk = :eventId group by reservation_id_fk) b " + - " on a.generation_ts = b.time and a.reservation_id_fk = b.reservation_id_fk "+ - " where a.event_id_fk = :eventId and a.type = 'INVOICE' and b.time between :start and :end") + @Query(""" + select id from billing_document a inner join\ + (select max(generation_ts) as time,reservation_id_fk from billing_document where status = 'VALID' and type = 'INVOICE' and event_id_fk = :eventId group by reservation_id_fk) b \ + on a.generation_ts = b.time and a.reservation_id_fk = b.reservation_id_fk \ + where a.event_id_fk = :eventId and a.type = 'INVOICE' and b.time between :start and :end\ + """) List findMatchingInvoiceIds(@Bind("eventId") int eventId, @Bind("start") ZonedDateTime start, @Bind("end") ZonedDateTime end); @Query("select min(generation_ts) from billing_document where event_id_fk = :eventId and type = 'INVOICE' and status = 'VALID'") diff --git a/src/main/java/alfio/repository/EmailMessageRepository.java b/src/main/java/alfio/repository/EmailMessageRepository.java index 947e847d5a..cda7a5cdf6 100644 --- a/src/main/java/alfio/repository/EmailMessageRepository.java +++ b/src/main/java/alfio/repository/EmailMessageRepository.java @@ -48,8 +48,10 @@ default Optional findIdByPurchaseContextAndChecksum(PurchaseContext pur } } - @Query("insert into email_message (event_id, organization_id_fk, subscription_descriptor_id_fk, reservation_id, status, recipient, subject, message, html_message, attachments, checksum, request_ts, email_cc)" + - " values(:eventId, :organizationId, :subscriptionDescriptorId, :reservationId, 'WAITING', :recipient, :subject, :message, :htmlMessage, :attachments, :checksum, :timestamp, :emailCC)") + @Query(""" + insert into email_message (event_id, organization_id_fk, subscription_descriptor_id_fk, reservation_id, status, recipient, subject, message, html_message, attachments, checksum, request_ts, email_cc)\ + values(:eventId, :organizationId, :subscriptionDescriptorId, :reservationId, 'WAITING', :recipient, :subject, :message, :htmlMessage, :attachments, :checksum, :timestamp, :emailCC)\ + """) int insert(@Bind("eventId") Integer eventId, @Bind("subscriptionDescriptorId") UUID subscriptionDescriptorId, @Bind("reservationId") String reservationId, @@ -78,11 +80,13 @@ int insert(@Bind("eventId") Integer eventId, @Query(type = QueryType.SELECT, - value = "select * from email_message" + - " where (" + - " (event_id is not null and event_id in (select id from event where end_ts > now())) or " + - " (subscription_descriptor_id_fk is not null and subscription_descriptor_id_fk in (select id from subscription_descriptor where validity_to is null or validity_to > now())) " + - ") and (status = 'WAITING' or status = 'RETRY') limit 100 for update skip locked") + value = """ + select * from email_message\ + where (\ + (event_id is not null and event_id in (select id from event where end_ts > now())) or \ + (subscription_descriptor_id_fk is not null and subscription_descriptor_id_fk in (select id from subscription_descriptor where validity_to is null or validity_to > now())) \ + ) and (status = 'WAITING' or status = 'RETRY') limit 100 for update skip locked\ + """) List loadAllWaitingForProcessing(); @Query("update email_message set status = 'SENT', sent_ts = :sentTimestamp, html_message = null where id = :id and checksum = :checksum and status in (:expectedStatuses)") diff --git a/src/main/java/alfio/repository/EventRepository.java b/src/main/java/alfio/repository/EventRepository.java index 94f9e8e267..fb7a9e999e 100644 --- a/src/main/java/alfio/repository/EventRepository.java +++ b/src/main/java/alfio/repository/EventRepository.java @@ -92,8 +92,10 @@ default ZoneId getZoneIdByEventId(int eventId) { @Query("select * from event where org_id in (:organizationIds) order by start_ts, end_ts") List findByOrganizationIds(@Bind("organizationIds") Collection organizationIds); - @Query("insert into event(short_name, format, display_name, website_url, external_url, website_t_c_url, website_p_p_url, image_url, file_blob_id, location, latitude, longitude, start_ts, end_ts, time_zone, regular_price_cts, currency, available_seats, vat_included, vat, allowed_payment_proxies, private_key, org_id, locales, vat_status, src_price_cts, version, status, metadata) " + - "values(:shortName, :format::event_format, :displayName, :websiteUrl, :externalUrl, :termsUrl, :privacyUrl, :imageUrl, :fileBlobId, :location, :latitude, :longitude, :start_ts, :end_ts, :time_zone, 0, :currency, :available_seats, :vat_included, :vat, :paymentProxies, :privateKey, :organizationId, :locales, :vatStatus, :srcPriceCts, :version, :status, :metadata::jsonb)") + @Query(""" + insert into event(short_name, format, display_name, website_url, external_url, website_t_c_url, website_p_p_url, image_url, file_blob_id, location, latitude, longitude, start_ts, end_ts, time_zone, regular_price_cts, currency, available_seats, vat_included, vat, allowed_payment_proxies, private_key, org_id, locales, vat_status, src_price_cts, version, status, metadata) \ + values(:shortName, :format::event_format, :displayName, :websiteUrl, :externalUrl, :termsUrl, :privacyUrl, :imageUrl, :fileBlobId, :location, :latitude, :longitude, :start_ts, :end_ts, :time_zone, 0, :currency, :available_seats, :vat_included, :vat, :paymentProxies, :privateKey, :organizationId, :locales, :vatStatus, :srcPriceCts, :version, :status, :metadata::jsonb)\ + """) @AutoGeneratedKey("id") AffectedRowCountAndKey insert(@Bind("shortName") String shortName, @Bind("format") Event.EventFormat format, @@ -127,9 +129,11 @@ AffectedRowCountAndKey insert(@Bind("shortName") String shortName, @Query("update event set status = :status where id = :id") int updateEventStatus(@Bind("id") int id, @Bind("status") Event.Status status); - @Query("update event set display_name = :displayName, website_url = :websiteUrl, external_url = :externalUrl, website_t_c_url = :termsUrl, website_p_p_url = :privacyUrl, image_url = :imageUrl, file_blob_id = :fileBlobId, " + - "location = :location, latitude = :latitude, longitude = :longitude, start_ts = :start_ts, " + - "end_ts = :end_ts, time_zone = :time_zone, org_id = :organizationId, locales = :locales, format = :format::event_format where id = :id") + @Query(""" + update event set display_name = :displayName, website_url = :websiteUrl, external_url = :externalUrl, website_t_c_url = :termsUrl, website_p_p_url = :privacyUrl, image_url = :imageUrl, file_blob_id = :fileBlobId, \ + location = :location, latitude = :latitude, longitude = :longitude, start_ts = :start_ts, \ + end_ts = :end_ts, time_zone = :time_zone, org_id = :organizationId, locales = :locales, format = :format::event_format where id = :id\ + """) int updateHeader(@Bind("id") int id, @Bind("displayName") String displayName, @Bind("websiteUrl") String websiteUrl, @@ -210,11 +214,13 @@ int updatePrices(@Bind("currency") String currency, @Query("update event set metadata = :metadata::jsonb where id = :eventId") int updateMetadata(@Bind("metadata") @JSONData AlfioMetadata metadata, @Bind("eventId") int eventId); - @Query("select * from event where id in (select distinct id from basic_event_with_optional_subscription where end_ts > now() and status = 'PUBLIC'" + - " and (:subscriptionId::uuid is null or subscription_id = :subscriptionId::uuid)" + - " and (:organizer::integer is null or org_id = :organizer)" + - " and (:organizerSlug::text is null or org_slug = :organizerSlug)" + - " and (:tags::text[] is null or tags @> ARRAY[ :tags ]::text[])) order by start_ts, end_ts") + @Query(""" + select * from event where id in (select distinct id from basic_event_with_optional_subscription where end_ts > now() and status = 'PUBLIC'\ + and (:subscriptionId::uuid is null or subscription_id = :subscriptionId::uuid)\ + and (:organizer::integer is null or org_id = :organizer)\ + and (:organizerSlug::text is null or org_slug = :organizerSlug)\ + and (:tags::text[] is null or tags @> ARRAY[ :tags ]::text[])) order by start_ts, end_ts\ + """) List findVisibleBySearchOptions(@Bind("subscriptionId") UUID subscriptionId, @Bind("organizer") Integer organizer, @Bind("organizerSlug") String organizerSlug, diff --git a/src/main/java/alfio/repository/ExportRepository.java b/src/main/java/alfio/repository/ExportRepository.java index 31ca8a6873..8e4b1b4f09 100644 --- a/src/main/java/alfio/repository/ExportRepository.java +++ b/src/main/java/alfio/repository/ExportRepository.java @@ -27,58 +27,60 @@ @QueryRepository public interface ExportRepository { - @Query(type = QueryType.SELECT, value = "with tickets as (" + - " select tr_id, jsonb_agg(jsonb_build_object(" + - " 'id', t_uuid," + - " 'firstName', t_first_name," + - " 'lastName', t_last_name," + - " 'type', tc_name," + - " 'status', t_status," + - " 'srcPriceCts', t_src_price_cts," + - " 'taxCts', t_vat_cts," + - " 'taxStatus', t_vat_status," + - " 'finalPriceCts', t_final_price_cts" + - " )) items" + - " from checkin_ticket_event_and_category_info" + - " group by 1)," + - " reservations as (" + - " select distinct event_id_fk, id, invoice_number, first_name," + - " billing_address_company, vat_nr, vat_country," + - " last_name, email_address, payment_method, currency_code, invoicing_additional_information#>>'{italianEInvoicing,fiscalCode}' as tax_code," + - " confirmation_ts, final_price_cts, src_price_cts, vat_cts, vat_status from tickets_reservation" + - " where status in ('OFFLINE_PAYMENT', 'DEFERRED_OFFLINE_PAYMENT', 'COMPLETE', 'CANCELLED')" + - " and confirmation_ts between :startTs and :endTs" + - " and event_id_fk is not null" + - " )," + - " reservations_event as (" + - " select tr.event_id_fk e_id, jsonb_agg(jsonb_build_object(" + - " 'id', tr.id," + - " 'invoiceNumber', tr.invoice_number," + - " 'firstName', tr.first_name," + - " 'lastName', tr.last_name," + - " 'email', tr.email_address," + - " 'paymentType', tr.payment_method," + - " 'finalPriceCts', tr.final_price_cts," + - " 'currency', tr.currency_code," + - " 'taxId', tr.vat_nr," + - " 'taxCountry', tr.vat_country," + - " 'companyName', tr.billing_address_company," + - " 'srcPriceCts', tr.src_price_cts," + - " 'taxCts', tr.vat_cts," + - " 'taxStatus', tr.vat_status," + - " 'taxCode', tr.tax_code," + - " 'confirmationTimestamp', to_char(tr.confirmation_ts at time zone 'UTC', 'YYYY-MM-DD') || 'T' || to_char(tr.confirmation_ts at time zone 'UTC', 'HH24:MI:SS.MSZ')," + - " 'tickets', t.items" + - " )) as reservations" + - " from reservations tr" + - " join tickets t on t.tr_id = tr.id" + - " group by 1" + - " )" + - " select e.id as event_id, e.short_name as event_short_name, e.display_name as event_display_name, tr.reservations" + - " from event e" + - " join reservations_event tr on e.id = tr.e_id" + - " where e.org_id in (:orgIds)" + - " order by 1") + @Query(type = QueryType.SELECT, value = """ + with tickets as (\ + select tr_id, jsonb_agg(jsonb_build_object(\ + 'id', t_uuid,\ + 'firstName', t_first_name,\ + 'lastName', t_last_name,\ + 'type', tc_name,\ + 'status', t_status,\ + 'srcPriceCts', t_src_price_cts,\ + 'taxCts', t_vat_cts,\ + 'taxStatus', t_vat_status,\ + 'finalPriceCts', t_final_price_cts\ + )) items\ + from checkin_ticket_event_and_category_info\ + group by 1),\ + reservations as (\ + select distinct event_id_fk, id, invoice_number, first_name,\ + billing_address_company, vat_nr, vat_country,\ + last_name, email_address, payment_method, currency_code, invoicing_additional_information#>>'{italianEInvoicing,fiscalCode}' as tax_code,\ + confirmation_ts, final_price_cts, src_price_cts, vat_cts, vat_status from tickets_reservation\ + where status in ('OFFLINE_PAYMENT', 'DEFERRED_OFFLINE_PAYMENT', 'COMPLETE', 'CANCELLED')\ + and confirmation_ts between :startTs and :endTs\ + and event_id_fk is not null\ + ),\ + reservations_event as (\ + select tr.event_id_fk e_id, jsonb_agg(jsonb_build_object(\ + 'id', tr.id,\ + 'invoiceNumber', tr.invoice_number,\ + 'firstName', tr.first_name,\ + 'lastName', tr.last_name,\ + 'email', tr.email_address,\ + 'paymentType', tr.payment_method,\ + 'finalPriceCts', tr.final_price_cts,\ + 'currency', tr.currency_code,\ + 'taxId', tr.vat_nr,\ + 'taxCountry', tr.vat_country,\ + 'companyName', tr.billing_address_company,\ + 'srcPriceCts', tr.src_price_cts,\ + 'taxCts', tr.vat_cts,\ + 'taxStatus', tr.vat_status,\ + 'taxCode', tr.tax_code,\ + 'confirmationTimestamp', to_char(tr.confirmation_ts at time zone 'UTC', 'YYYY-MM-DD') || 'T' || to_char(tr.confirmation_ts at time zone 'UTC', 'HH24:MI:SS.MSZ'),\ + 'tickets', t.items\ + )) as reservations\ + from reservations tr\ + join tickets t on t.tr_id = tr.id\ + group by 1\ + )\ + select e.id as event_id, e.short_name as event_short_name, e.display_name as event_display_name, tr.reservations\ + from event e\ + join reservations_event tr on e.id = tr.e_id\ + where e.org_id in (:orgIds)\ + order by 1\ + """) List allReservationsForInterval(@Bind("startTs") ZonedDateTime from, @Bind("endTs") ZonedDateTime to, @Bind("orgIds") List orgIds); diff --git a/src/main/java/alfio/repository/ExtensionRepository.java b/src/main/java/alfio/repository/ExtensionRepository.java index 958f0d8f65..62f6522f27 100644 --- a/src/main/java/alfio/repository/ExtensionRepository.java +++ b/src/main/java/alfio/repository/ExtensionRepository.java @@ -31,8 +31,10 @@ @QueryRepository public interface ExtensionRepository { - @Query("insert into extension_support(path, name, display_name, hash, enabled, async, script, metadata) values " + - " (:path, :name, :displayName, :hash, :enabled, :async, :script, :metadata::jsonb)") + @Query(""" + insert into extension_support(path, name, display_name, hash, enabled, async, script, metadata) values \ + (:path, :name, :displayName, :hash, :enabled, :async, :script, :metadata::jsonb)\ + """) int insert(@Bind("path") String path, @Bind("name") String name, @Bind("displayName") String displayName, @@ -42,9 +44,11 @@ int insert(@Bind("path") String path, @Bind("script") String script, @Bind("metadata") @JSONData ExtensionMetadata extensionMetadata); - @Query("update extension_support set display_name = :displayName," + - " hash = :hash, enabled = :enabled, async = :async, script = :script, metadata = :metadata::jsonb" + - " where path = :path and name = :name") + @Query(""" + update extension_support set display_name = :displayName,\ + hash = :hash, enabled = :enabled, async = :async, script = :script, metadata = :metadata::jsonb\ + where path = :path and name = :name\ + """) int update(@Bind("path") String path, @Bind("name") String name, @Bind("displayName") String displayName, @@ -57,8 +61,10 @@ int update(@Bind("path") String path, @Query("update extension_support set enabled = :enabled where path = :path and name = :name") int toggle(@Bind("path") String path, @Bind("name") String name, @Bind("enabled") boolean enabled); - @Query("insert into extension_event(es_id_fk, event) values " + - " (:extensionId, :event)") + @Query(""" + insert into extension_event(es_id_fk, event) values \ + (:extensionId, :event)\ + """) int insertEvent(@Bind("extensionId") int extensionId, @Bind("event") String event); @Query("select es_id from extension_support where path = :path and name = :name") @@ -82,12 +88,14 @@ int update(@Bind("path") String path, @Query("select * from extension_support order by path, name") List listAll(); - @Query("select a3.es_id, a3.path, a3.name, a3.hash from " + - " (select a1.* from " + - " (select es_id, path, name, hash from extension_support where enabled = true and async = :async and (path in (:possiblePaths))) a1 " + - " left outer join (select es_id, path, name from extension_support where enabled = true and async = :async and (path in (:possiblePaths))) a2 on " + - " (a1.es_id = a2.es_id) and length(a1.path) < length(a2.path) where a2.path is null) a3 " + - " inner join extension_event on es_id_fk = a3.es_id where event = :event order by a3.name, a3.path") + @Query(""" + select a3.es_id, a3.path, a3.name, a3.hash from \ + (select a1.* from \ + (select es_id, path, name, hash from extension_support where enabled = true and async = :async and (path in (:possiblePaths))) a1 \ + left outer join (select es_id, path, name from extension_support where enabled = true and async = :async and (path in (:possiblePaths))) a2 on \ + (a1.es_id = a2.es_id) and length(a1.path) < length(a2.path) where a2.path is null) a3 \ + inner join extension_event on es_id_fk = a3.es_id where event = :event order by a3.name, a3.path\ + """) List findActive(@Bind("possiblePaths") Set possiblePaths, @Bind("async") boolean async, @Bind("event") String event); @@ -95,13 +103,17 @@ List findActive(@Bind("possiblePaths") Set< @Query("delete from extension_configuration_metadata where ecm_es_id_fk = :extensionId") int deleteExtensionParameter(@Bind("extensionId") int extensionId); - @Query("select ecm_name, ecm_configuration_level, conf_path, conf_value from extension_configuration_metadata " + - " inner join extension_configuration_metadata_value on fk_ecm_id = ecm_id " + - " where ecm_es_id_fk = :extensionId ") + @Query(""" + select ecm_name, ecm_configuration_level, conf_path, conf_value from extension_configuration_metadata \ + inner join extension_configuration_metadata_value on fk_ecm_id = ecm_id \ + where ecm_es_id_fk = :extensionId \ + """) List findExtensionParameterKeyValue(@Bind("extensionId") int extensionId); - @Query("insert into extension_configuration_metadata(ecm_es_id_fk, ecm_name, ecm_description, ecm_type, ecm_configuration_level, ecm_mandatory) " + - " values (:extensionId, :name, :description, :type, :configurationLevel, :mandatory)") + @Query(""" + insert into extension_configuration_metadata(ecm_es_id_fk, ecm_name, ecm_description, ecm_type, ecm_configuration_level, ecm_mandatory) \ + values (:extensionId, :name, :description, :type, :configurationLevel, :mandatory)\ + """) @AutoGeneratedKey("ecm_id") AffectedRowCountAndKey registerExtensionConfigurationMetadata(@Bind("extensionId") int extensionId, @Bind("name") String name, @@ -111,11 +123,13 @@ AffectedRowCountAndKey registerExtensionConfigurationMetadata(@Bind("ex @Bind("mandatory") boolean mandatory); - @Query("select ecm_id, ecm_name, ecm_configuration_level, ecm_description, ecm_type, ecm_mandatory, path, es_id, name, display_name, conf_path, conf_value"+ - " from extension_configuration_metadata " + - " inner join extension_support on es_id = ecm_es_id_fk " + - " left outer join extension_configuration_metadata_value on ecm_id = fk_ecm_id and (conf_path is null or (conf_path in (:possiblePaths))) " + - " where ecm_configuration_level = :configurationLevel and (path in (:possiblePaths) or path like :pathPattern) order by es_id, name, ecm_id, ecm_name") + @Query(""" + select ecm_id, ecm_name, ecm_configuration_level, ecm_description, ecm_type, ecm_mandatory, path, es_id, name, display_name, conf_path, conf_value\ + from extension_configuration_metadata \ + inner join extension_support on es_id = ecm_es_id_fk \ + left outer join extension_configuration_metadata_value on ecm_id = fk_ecm_id and (conf_path is null or (conf_path in (:possiblePaths))) \ + where ecm_configuration_level = :configurationLevel and (path in (:possiblePaths) or path like :pathPattern) order by es_id, name, ecm_id, ecm_name\ + """) List getParametersForLevelAndPath( @Bind("configurationLevel") String configurationLevel, @Bind("possiblePaths") Set possiblePaths, @@ -134,20 +148,19 @@ List getParametersForLevelA @Query(type = QueryType.TEMPLATE, value = "insert into extension_configuration_metadata_value(fk_ecm_id, conf_path, conf_value) values (:ecmId, :confPath, :value)") String bulkInsertSettingValue(); - @Query("select ecm_name, conf_value from " + - "" + - "(select ecm_name, conf_value, ecm_configuration_level, conf_path, " + - "(case when ecm_configuration_level = 'EVENT' then 0 when ecm_configuration_level = 'ORGANIZATION' then 1 else 2 end) as priority from extension_configuration_metadata inner join " + - "extension_configuration_metadata_value on ecm_id = fk_ecm_id " + - "where ecm_es_id_fk = (SELECT es_id from extension_support where path = :path and name = :name) and conf_path in (:allPaths)) a1 " + - "" + - "where (ecm_name, priority) in " + - "" + - "(select ecm_name, min(priority) selected_priority from ( " + - "select ecm_name, conf_value, ecm_configuration_level, conf_path, " + - "(case when ecm_configuration_level = 'EVENT' then 0 when ecm_configuration_level = 'ORGANIZATION' then 1 else 2 end) as priority from extension_configuration_metadata inner join " + - "extension_configuration_metadata_value on ecm_id = fk_ecm_id " + - "where ecm_es_id_fk = (SELECT es_id from extension_support where path = :path and name = :name) and conf_path in (:allPaths)) a2 group by ecm_name)") + @Query(""" + select ecm_name, conf_value from \ + (select ecm_name, conf_value, ecm_configuration_level, conf_path, \ + (case when ecm_configuration_level = 'EVENT' then 0 when ecm_configuration_level = 'ORGANIZATION' then 1 else 2 end) as priority from extension_configuration_metadata inner join \ + extension_configuration_metadata_value on ecm_id = fk_ecm_id \ + where ecm_es_id_fk = (SELECT es_id from extension_support where path = :path and name = :name) and conf_path in (:allPaths)) a1 \ + where (ecm_name, priority) in \ + (select ecm_name, min(priority) selected_priority from ( \ + select ecm_name, conf_value, ecm_configuration_level, conf_path, \ + (case when ecm_configuration_level = 'EVENT' then 0 when ecm_configuration_level = 'ORGANIZATION' then 1 else 2 end) as priority from extension_configuration_metadata inner join \ + extension_configuration_metadata_value on ecm_id = fk_ecm_id \ + where ecm_es_id_fk = (SELECT es_id from extension_support where path = :path and name = :name) and conf_path in (:allPaths)) a2 group by ecm_name)\ + """) List findParametersForScript(@Bind("name") String name, @Bind("path") String path, @Bind("allPaths") Set allPaths); @Query("select distinct ecm_name from extension_configuration_metadata where ecm_es_id_fk = (SELECT es_id from extension_support where path = :path and name = :name) and ecm_mandatory is true") @@ -156,27 +169,33 @@ List getParametersForLevelA @Query("select ecm_id, ecm_name from extension_configuration_metadata where ecm_es_id_fk = :extensionId") List findAllParametersForExtension(@Bind("extensionId") int extensionId); - @Query("select count(a3.*) from " + - " (select a1.es_id from " + - " (select es_id, path from extension_capabilities where (path in (:possiblePaths)) and capability in(:capabilities)) a1 " + - " left outer join (select es_id, path from extension_capabilities where (path in (:possiblePaths)) and capability in(:capabilities)) a2 on " + - " (a1.es_id = a2.es_id) and length(a1.path) < length(a2.path) where a2.path is null) a3 ") + @Query(""" + select count(a3.*) from \ + (select a1.es_id from \ + (select es_id, path from extension_capabilities where (path in (:possiblePaths)) and capability in(:capabilities)) a1 \ + left outer join (select es_id, path from extension_capabilities where (path in (:possiblePaths)) and capability in(:capabilities)) a2 on \ + (a1.es_id = a2.es_id) and length(a1.path) < length(a2.path) where a2.path is null) a3 \ + """) int countScriptsSupportingCapability(@Bind("possiblePaths") Set paths, @Bind("capabilities") List capabilities); - @Query("select distinct a3.capability, a3.capability_detail from " + - " (select a1.es_id, a1.capability, a1.capability_detail from " + - " (select es_id, path, capability, capability_detail from extension_capabilities where (path in (:possiblePaths)) and capability in(:capabilities)) a1 " + - " left outer join (select es_id, path, capability, capability_detail from extension_capabilities where (path in (:possiblePaths)) and capability in(:capabilities)) a2 on " + - " (a1.es_id = a2.es_id) and length(a1.path) < length(a2.path) where a2.path is null) a3 ") + @Query(""" + select distinct a3.capability, a3.capability_detail from \ + (select a1.es_id, a1.capability, a1.capability_detail from \ + (select es_id, path, capability, capability_detail from extension_capabilities where (path in (:possiblePaths)) and capability in(:capabilities)) a1 \ + left outer join (select es_id, path, capability, capability_detail from extension_capabilities where (path in (:possiblePaths)) and capability in(:capabilities)) a2 on \ + (a1.es_id = a2.es_id) and length(a1.path) < length(a2.path) where a2.path is null) a3 \ + """) List getSupportedCapabilities(@Bind("possiblePaths") Set paths, @Bind("capabilities") Collection capabilities); - @Query("select a3.es_id, a3.path, a3.name, a3.hash from " + - " (select a1.es_id, a1.path, a1.name, a1.hash from " + - " (select es_id, path, name, hash from extension_capabilities where (path in (:possiblePaths)) and capability = :capability) a1 " + - " left outer join (select es_id, path, name, hash from extension_capabilities where (path in (:possiblePaths)) and capability = :capability) a2 on " + - " (a1.es_id = a2.es_id) and length(a1.path) < length(a2.path) where a2.path is null) a3 limit 1") + @Query(""" + select a3.es_id, a3.path, a3.name, a3.hash from \ + (select a1.es_id, a1.path, a1.name, a1.hash from \ + (select es_id, path, name, hash from extension_capabilities where (path in (:possiblePaths)) and capability = :capability) a1 \ + left outer join (select es_id, path, name, hash from extension_capabilities where (path in (:possiblePaths)) and capability = :capability) a2 on \ + (a1.es_id = a2.es_id) and length(a1.path) < length(a2.path) where a2.path is null) a3 limit 1\ + """) Optional getFirstScriptForCapability(@Bind("possiblePaths") Set paths, @Bind("capability") String capability); } diff --git a/src/main/java/alfio/repository/FieldRepository.java b/src/main/java/alfio/repository/FieldRepository.java index 30505574b4..42e8725fdc 100644 --- a/src/main/java/alfio/repository/FieldRepository.java +++ b/src/main/java/alfio/repository/FieldRepository.java @@ -26,8 +26,10 @@ @QueryRepository interface FieldRepository { - @Query("insert into purchase_context_field_configuration(event_id_fk, organization_id_fk, subscription_descriptor_id_fk, field_name, field_order, field_type, field_restricted_values, field_maxlength, field_minlength, field_required, context, additional_service_id, ticket_category_ids) " + - " values (:eventId, :organizationId, :subscriptionDescriptorId, :name, :order, :type, :restrictedValues, :maxLength, :minLength, :required, :context::ADDITIONAL_FIELD_CONTEXT, :additionalServiceId, :categoryIds)") + @Query(""" + insert into purchase_context_field_configuration(event_id_fk, organization_id_fk, subscription_descriptor_id_fk, field_name, field_order, field_type, field_restricted_values, field_maxlength, field_minlength, field_required, context, additional_service_id, ticket_category_ids) \ + values (:eventId, :organizationId, :subscriptionDescriptorId, :name, :order, :type, :restrictedValues, :maxLength, :minLength, :required, :context::ADDITIONAL_FIELD_CONTEXT, :additionalServiceId, :categoryIds)\ + """) @AutoGeneratedKey("id") AffectedRowCountAndKey insertConfiguration(@Bind("eventId") Integer eventId, @Bind("organizationId") int organizationId, @@ -51,8 +53,10 @@ int updateField(@Bind("id") long id, @Bind("disabledValues") String disabledValues, @Bind("categoryIds") String linkedCategoryIds); - @Query("insert into purchase_context_field_description(field_configuration_id_fk, field_locale, description, organization_id_fk)" + - " values (:configurationId, :locale, :description, :organizationId)") + @Query(""" + insert into purchase_context_field_description(field_configuration_id_fk, field_locale, description, organization_id_fk)\ + values (:configurationId, :locale, :description, :organizationId)\ + """) int insertDescription(@Bind("configurationId") long configurationId, @Bind("locale") String locale, @Bind("description") String description, diff --git a/src/main/java/alfio/repository/FileUploadRepository.java b/src/main/java/alfio/repository/FileUploadRepository.java index 7040edbddb..0f9ec0080e 100644 --- a/src/main/java/alfio/repository/FileUploadRepository.java +++ b/src/main/java/alfio/repository/FileUploadRepository.java @@ -46,11 +46,13 @@ public interface FileUploadRepository { @Query("select id, name, content_size, content_type, attributes from file_blob where id = :id") Optional findById(@Bind("id") String id); - @Query("delete from file_blob where creation_time <= :date and id not in (" + - "select file_blob_id from event where file_blob_id is not null" + - " union " + - "select file_blob_id_fk as file_blob_id from subscription_descriptor where file_blob_id_fk is not null" + - ")") + @Query(""" + delete from file_blob where creation_time <= :date and id not in (\ + select file_blob_id from event where file_blob_id is not null\ + union \ + select file_blob_id_fk as file_blob_id from subscription_descriptor where file_blob_id_fk is not null\ + )\ + """) int cleanupUnreferencedBlobFiles(@Bind("date") Date date); default void upload(UploadBase64FileModification file, String digest, Map attributes) { diff --git a/src/main/java/alfio/repository/GroupRepository.java b/src/main/java/alfio/repository/GroupRepository.java index 8fabb8f76b..c69cc76611 100644 --- a/src/main/java/alfio/repository/GroupRepository.java +++ b/src/main/java/alfio/repository/GroupRepository.java @@ -62,8 +62,10 @@ AffectedRowCountAndKey insert(@Bind("name") String name, @Query("select * from a_group where organization_id_fk = :organizationId order by name, description") List getAllForOrganization(@Bind("organizationId") int organizationId); - @Query("insert into group_link(a_group_id_fk, event_id_fk, ticket_category_id_fk, type, match_type, max_allocation)" + - " values(:groupId, :eventId, :ticketCategoryId, :type, :matchType, :maxAllocation)") + @Query(""" + insert into group_link(a_group_id_fk, event_id_fk, ticket_category_id_fk, type, match_type, max_allocation)\ + values(:groupId, :eventId, :ticketCategoryId, :type, :matchType, :maxAllocation)\ + """) @AutoGeneratedKey("id") AffectedRowCountAndKey createConfiguration(@Bind("groupId") int groupId, @Bind("eventId") int eventId, @@ -90,8 +92,10 @@ default int[] insert(int groupId, List members) { @Query("select value from group_member where a_group_id_fk = :groupId order by value") List getAllValuesIncludingNotActive(@Bind("groupId") int groupId); - @Query("insert into whitelisted_ticket(group_member_id_fk, group_link_id_fk, ticket_id_fk, requires_unique_value)" + - " values(:itemId, :configurationId, :ticketId, :requiresUniqueValue)") + @Query(""" + insert into whitelisted_ticket(group_member_id_fk, group_link_id_fk, ticket_id_fk, requires_unique_value)\ + values(:itemId, :configurationId, :ticketId, :requiresUniqueValue)\ + """) int insertWhitelistedTicket(@Bind("itemId") int itemId, @Bind("configurationId") int configurationId, @Bind("ticketId") int ticketId, @Bind("requiresUniqueValue") Boolean requiresUniqueValue); @Query(BY_EVENT_ID + diff --git a/src/main/java/alfio/repository/InvoiceSequencesRepository.java b/src/main/java/alfio/repository/InvoiceSequencesRepository.java index 197431961a..580c124f58 100644 --- a/src/main/java/alfio/repository/InvoiceSequencesRepository.java +++ b/src/main/java/alfio/repository/InvoiceSequencesRepository.java @@ -42,8 +42,10 @@ default int incrementSequenceFor(@Bind("orgId") int orgId) { - @Query("insert into invoice_sequences(organization_id_fk, invoice_sequence, document_type) values" + - " (:orgId, 1, 'INVOICE')," + - " (:orgId, 1, 'CREDIT_NOTE')") + @Query(""" + insert into invoice_sequences(organization_id_fk, invoice_sequence, document_type) values\ + (:orgId, 1, 'INVOICE'),\ + (:orgId, 1, 'CREDIT_NOTE')\ + """) int initFor(@Bind("orgId") int orgId); } diff --git a/src/main/java/alfio/repository/PollRepository.java b/src/main/java/alfio/repository/PollRepository.java index 7fa0ee5b59..725b35aea7 100644 --- a/src/main/java/alfio/repository/PollRepository.java +++ b/src/main/java/alfio/repository/PollRepository.java @@ -31,11 +31,15 @@ public interface PollRepository { - String INSERT_OPTION = "insert into poll_option(poll_id_fk, title, description, organization_id_fk) " + - " values(:pollId, (:title)::jsonb, (:description)::jsonb, :organizationId)"; - - @Query("insert into poll (title, description, allowed_tags, poll_order, event_id_fk, organization_id_fk) " + - "values(:title::jsonb, :description::jsonb, :allowedTags::text[], :pollOrder, :eventId, :orgId)") + String INSERT_OPTION = """ + insert into poll_option(poll_id_fk, title, description, organization_id_fk) \ + values(:pollId, (:title)::jsonb, (:description)::jsonb, :organizationId)\ + """; + + @Query(""" + insert into poll (title, description, allowed_tags, poll_order, event_id_fk, organization_id_fk) \ + values(:title::jsonb, :description::jsonb, :allowedTags::text[], :pollOrder, :eventId, :orgId)\ + """) @AutoGeneratedKey("id") AffectedRowCountAndKey insert(@Bind("title") @JSONData Map title, @Bind("description") @JSONData Map description, @@ -44,8 +48,10 @@ AffectedRowCountAndKey insert(@Bind("title") @JSONData Map @Bind("eventId") int eventId, @Bind("orgId") int organizationId); - @Query("update poll set title = :title::jsonb, description = :description::jsonb, allowed_tags = :allowedTags::text[]," + - " poll_order = :pollOrder where id = :id and event_id_fk = :eventId") + @Query(""" + update poll set title = :title::jsonb, description = :description::jsonb, allowed_tags = :allowedTags::text[],\ + poll_order = :pollOrder where id = :id and event_id_fk = :eventId\ + """) int update(@Bind("title") @JSONData Map title, @Bind("description") @JSONData Map description, @Bind("allowedTags") @Array List allowedTags, @@ -87,24 +93,30 @@ AffectedRowCountAndKey insertOption(@Bind("pollId") Long pollId, @Query("select * from poll_option where poll_id_fk = :pollId order by id") List getOptionsForPoll(@Bind("pollId") long pollId); - @Query("select count(*) from poll_option " + - " join poll on poll_option.poll_id_fk = poll.id" + - " where poll_option.id = :optionId and poll.id = :pollId and poll.event_id_fk = :eventId") + @Query(""" + select count(*) from poll_option \ + join poll on poll_option.poll_id_fk = poll.id\ + where poll_option.id = :optionId and poll.id = :pollId and poll.event_id_fk = :eventId\ + """) Integer checkPollOption(@Bind("optionId") long optionId, @Bind("pollId") long pollId, @Bind("eventId") int eventId); // answers - @Query("insert into poll_answer(poll_id_fk, poll_option_id_fk, ticket_id_fk, organization_id_fk)" + - " values(:pollId, :optionId, :ticketId, :orgId)" + - " on conflict(poll_id_fk, ticket_id_fk) do update set poll_option_id_fk = excluded.poll_option_id_fk") + @Query(""" + insert into poll_answer(poll_id_fk, poll_option_id_fk, ticket_id_fk, organization_id_fk)\ + values(:pollId, :optionId, :ticketId, :orgId)\ + on conflict(poll_id_fk, ticket_id_fk) do update set poll_option_id_fk = excluded.poll_option_id_fk\ + """) int registerAnswer(@Bind("pollId") long pollId, @Bind("optionId") long optionId, @Bind("ticketId") int ticketId, @Bind("orgId") int organizationId); - @Query("select pa.poll_option_id_fk, count(*) as votes from poll_answer pa" + - " join poll p on p.id = pa.poll_id_fk " + - " where p.id = :pollId and p.event_id_fk = :eventId group by 1") + @Query(""" + select pa.poll_option_id_fk, count(*) as votes from poll_answer pa\ + join poll p on p.id = pa.poll_id_fk \ + where p.id = :pollId and p.event_id_fk = :eventId group by 1\ + """) List getStatisticsFor(@Bind("pollId") Long pollId, @Bind("eventId") int eventId); @Query("delete from poll where id = :pollId and event_id_fk = :eventId and organization_id_fk = :orgId") diff --git a/src/main/java/alfio/repository/PromoCodeDiscountRepository.java b/src/main/java/alfio/repository/PromoCodeDiscountRepository.java index a4837c44ac..6febb0b86e 100644 --- a/src/main/java/alfio/repository/PromoCodeDiscountRepository.java +++ b/src/main/java/alfio/repository/PromoCodeDiscountRepository.java @@ -48,8 +48,10 @@ public interface PromoCodeDiscountRepository { @Query("select exists (select 1 from promo_code where id = :id and organization_id_fk = :orgId and (:eventId is null or event_id_fk = :eventId)") Boolean checkPromoCodeExists(@Bind("id") int id, @Bind("orgId") int organizationId, @Bind("eventId") Integer eventId); - @Query("insert into promo_code(promo_code, event_id_fk, organization_id_fk, valid_from, valid_to, discount_amount, discount_type, categories, max_usage, description, email_reference, code_type, hidden_category_id, currency_code) " - + " values (:promoCode, :eventId, :organizationId, :start, :end, :discountAmount, :discountType, :categories, :maxUsage, :description, :emailReference, :codeType, :hiddenCategoryId, :currencyCode)") + @Query(""" + insert into promo_code(promo_code, event_id_fk, organization_id_fk, valid_from, valid_to, discount_amount, discount_type, categories, max_usage, description, email_reference, code_type, hidden_category_id, currency_code) \ + values (:promoCode, :eventId, :organizationId, :start, :end, :discountAmount, :discountType, :categories, :maxUsage, :description, :emailReference, :codeType, :hiddenCategoryId, :currencyCode)\ + """) int addPromoCode(@Bind("promoCode") String promoCode, @Bind("eventId") Integer eventId, @Bind("organizationId") int organizationId, @@ -65,9 +67,11 @@ int addPromoCode(@Bind("promoCode") String promoCode, @Bind("hiddenCategoryId") Integer hiddenCategoryId, @Bind("currencyCode") String currencyCode); - @Query("insert into promo_code(promo_code, event_id_fk, organization_id_fk, valid_from, valid_to, discount_amount, discount_type, categories, max_usage, description, email_reference, code_type, hidden_category_id) " - + " values (:promoCode, :eventId, :organizationId, :start, :end, :discountAmount, :discountType, :categories, :maxUsage, :description, :emailReference, :codeType, :hiddenCategoryId) " - + " ON CONFLICT (promo_code, event_id_fk) where event_id_fk is not null do nothing" + @Query(""" + insert into promo_code(promo_code, event_id_fk, organization_id_fk, valid_from, valid_to, discount_amount, discount_type, categories, max_usage, description, email_reference, code_type, hidden_category_id) \ + values (:promoCode, :eventId, :organizationId, :start, :end, :discountAmount, :discountType, :categories, :maxUsage, :description, :emailReference, :codeType, :hiddenCategoryId) \ + ON CONFLICT (promo_code, event_id_fk) where event_id_fk is not null do nothing\ + """ ) int addPromoCodeIfNotExists(@Bind("promoCode") String promoCode, @Bind("eventId") Integer eventId, @@ -83,24 +87,30 @@ int addPromoCodeIfNotExists(@Bind("promoCode") String promoCode, @Bind("codeType") PromoCodeDiscount.CodeType codeType, @Bind("hiddenCategoryId") Integer hiddenCategoryId); - @Query("select * from promo_code where promo_code = :promoCode and (" - +" event_id_fk = :eventId or " - +" (event_id_fk is null and organization_id_fk = (select org_id from event where id = :eventId))) " - +" order by event_id_fk is null limit 1") + @Query(""" + select * from promo_code where promo_code = :promoCode and (\ + event_id_fk = :eventId or \ + (event_id_fk is null and organization_id_fk = (select org_id from event where id = :eventId))) \ + order by event_id_fk is null limit 1\ + """) Optional findPromoCodeInEventOrOrganization(@Bind("eventId") int eventId, @Bind("promoCode") String promoCode); - @Query("select * from promo_code where promo_code = :promoCode and code_type <> 'DYNAMIC' and (" - +" event_id_fk = :eventId or " - +" (event_id_fk is null and organization_id_fk = (select org_id from event where id = :eventId))) " - +" order by event_id_fk is null limit 1") + @Query(""" + select * from promo_code where promo_code = :promoCode and code_type <> 'DYNAMIC' and (\ + event_id_fk = :eventId or \ + (event_id_fk is null and organization_id_fk = (select org_id from event where id = :eventId))) \ + order by event_id_fk is null limit 1\ + """) Optional findPublicPromoCodeInEventOrOrganization(@Bind("eventId") int eventId, @Bind("promoCode") String promoCode); @Query("select count(*) from promo_code where event_id_fk = :eventId or (event_id_fk is null and organization_id_fk = :organizationId)") Integer countByEventAndOrganizationId(@Bind("eventId") int eventId, @Bind("organizationId") int organizationId); - @Query("select count(b.id) from tickets_reservation a, ticket b" + - " where (:currentId is null or a.id <> :currentId) and a.status in ('OFFLINE_PAYMENT', 'DEFERRED_OFFLINE_PAYMENT', 'COMPLETE', 'STUCK') and a.promo_code_id_fk = :id" + - " and b.tickets_reservation_id = a.id and (:categoriesJson is null or b.category_id in (:categories))") + @Query(""" + select count(b.id) from tickets_reservation a, ticket b\ + where (:currentId is null or a.id <> :currentId) and a.status in ('OFFLINE_PAYMENT', 'DEFERRED_OFFLINE_PAYMENT', 'COMPLETE', 'STUCK') and a.promo_code_id_fk = :id\ + and b.tickets_reservation_id = a.id and (:categoriesJson is null or b.category_id in (:categories))\ + """) Integer countConfirmedPromoCode(@Bind("id") int id, @Bind("categories") Collection categories, @Bind("currentId") String currentReservationId, @Bind("categoriesJson") String categoriesJson); @Query("update promo_code set valid_to = :end where id = :id") @@ -119,8 +129,10 @@ int updateEventPromoCode(@Bind("id") int id, @Query("select id from promo_code where code_type = 'ACCESS' and id = :id for update") Integer lockAccessCodeForUpdate(@Bind("id") int id); - @Query("select * from promocode_usage_details where promo_code = :promoCode" + - " and (:eventId is null or :eventId = event_id)") + @Query(""" + select * from promocode_usage_details where promo_code = :promoCode\ + and (:eventId is null or :eventId = event_id)\ + """) List findDetailedUsage(@Bind("promoCode") String promoCode, @Bind("eventId") Integer eventId); } diff --git a/src/main/java/alfio/repository/PurchaseContextFieldRepository.java b/src/main/java/alfio/repository/PurchaseContextFieldRepository.java index 92e7e2557b..2ea56a76e0 100644 --- a/src/main/java/alfio/repository/PurchaseContextFieldRepository.java +++ b/src/main/java/alfio/repository/PurchaseContextFieldRepository.java @@ -81,8 +81,10 @@ int insertValue(@Bind("ticketId") Integer ticketId, @Bind("context") PurchaseContextFieldConfiguration.Context context); @Query(type = QueryType.TEMPLATE, - value = "insert into purchase_context_field_value(context, additional_service_item_id_fk, field_configuration_id_fk, field_value, organization_id_fk)" + - " values ('ADDITIONAL_SERVICE'::ADDITIONAL_FIELD_CONTEXT, :additionalServiceItemId, :fieldConfigurationId, :value, :organizationId)") + value = """ + insert into purchase_context_field_value(context, additional_service_item_id_fk, field_configuration_id_fk, field_value, organization_id_fk)\ + values ('ADDITIONAL_SERVICE'::ADDITIONAL_FIELD_CONTEXT, :additionalServiceItemId, :fieldConfigurationId, :value, :organizationId)\ + """) String batchInsertAdditionalItemsFields(); @Query("delete from purchase_context_field_value where " + TICKET_ID_OR_SUBSCRIPTION_ID +" and field_configuration_id_fk = :fieldConfigurationId") @@ -97,9 +99,11 @@ int insertValue(@Bind("ticketId") Integer ticketId, @Query("delete from purchase_context_field_value where subscription_id_fk = :subscriptionId") int deleteAllValuesForSubscriptionId(@Bind("subscriptionId") UUID subscriptionId); - @Query("delete from purchase_context_field_value fv using ticket t, additional_service_item ai" + - " where fv.context = 'ADDITIONAL_SERVICE' and fv.additional_service_item_id_fk = ai.id" + - " and ai.ticket_id_fk = t.id and t.id in (:ticketIds) and t.event_id = :eventId") + @Query(""" + delete from purchase_context_field_value fv using ticket t, additional_service_item ai\ + where fv.context = 'ADDITIONAL_SERVICE' and fv.additional_service_item_id_fk = ai.id\ + and ai.ticket_id_fk = t.id and t.id in (:ticketIds) and t.event_id = :eventId\ + """) int deleteAllValuesForAdditionalItems(@Bind("ticketIds") Collection ticketIds, @Bind("eventId") int eventId); @@ -116,8 +120,10 @@ default int deleteAllValuesForReservations(List reservationIds) { return deleteAllTicketValuesForReservations(reservationIds) + deleteAllAdditionalItemsValuesForReservations(reservationIds) + deleteAllSubscriptionValuesForReservations(reservationIds); } - @Query("select field_configuration_id_fk, field_locale, description, purchase_context_field_configuration.field_name as field_name from purchase_context_field_description" + - " inner join purchase_context_field_configuration on field_configuration_id_fk = id where field_locale = :locale and event_id_fk = :eventId") + @Query(""" + select field_configuration_id_fk, field_locale, description, purchase_context_field_configuration.field_name as field_name from purchase_context_field_description\ + inner join purchase_context_field_configuration on field_configuration_id_fk = id where field_locale = :locale and event_id_fk = :eventId\ + """) List findDescriptionsForLocale(@Bind("eventId") int eventId, @Bind("locale") String locale); @Query("select field_configuration_id_fk, field_locale, description, purchase_context_field_configuration.field_name as field_name from purchase_context_field_description" + @@ -125,9 +131,11 @@ default int deleteAllValuesForReservations(List reservationIds) { " where "+ PURCHASE_CONTEXT_MATCHER) List findAllDescriptions(@Bind("eventId") Integer eventId, @Bind("subscriptionId") UUID subscriptionDescriptorId); - @Query("SELECT field_name FROM purchase_context_field_configuration" + - " inner join event on event.id = event_id_fk" + - " where short_name = :eventShortName order by field_order asc ") + @Query(""" + SELECT field_name FROM purchase_context_field_configuration\ + inner join event on event.id = event_id_fk\ + where short_name = :eventShortName order by field_order asc \ + """) List findFieldsForEvent(@Bind("eventShortName") String eventShortName); @Query("select field_name, field_value from field_value_w_additional where ticket_id_fk = :ticketId") @@ -231,8 +239,10 @@ default Map> findAdditionalFieldNamesForEvents(Collection findAdditionalFieldsForSubscriptionDescriptor(@Bind("subscriptionId") UUID subscriptionDescriptorId); - @Query("select * from purchase_context_field_configuration where event_id_fk = :eventId" + - " and field_type = :type order by field_order asc") + @Query(""" + select * from purchase_context_field_configuration where event_id_fk = :eventId\ + and field_type = :type order by field_order asc\ + """) List findAdditionalFieldsOfTypeForEvent(@Bind("eventId") int eventId, @Bind("type") String type); @Query("select * from purchase_context_field_configuration where id = :id") @@ -241,9 +251,11 @@ default Map> findAdditionalFieldNamesForEvents(Collection findAdditionalFieldsForEvent(@Bind("eventShortName") String eventName); @Query("select count(*) from purchase_context_field_configuration where event_id_fk = :eventId") diff --git a/src/main/java/alfio/repository/SpecialPriceRepository.java b/src/main/java/alfio/repository/SpecialPriceRepository.java index 08b394517c..d3b07ea75f 100644 --- a/src/main/java/alfio/repository/SpecialPriceRepository.java +++ b/src/main/java/alfio/repository/SpecialPriceRepository.java @@ -80,13 +80,17 @@ public interface SpecialPriceRepository { @Query("update special_price set status = :status where id in (select special_price_id_fk from ticket where tickets_reservation_id in (:reservationIds) and special_price_id_fk is not null)") int updateStatusForReservation(@Bind("reservationIds") List reservationIds, @Bind("status") String status); - @Query("update special_price set status = 'FREE', session_id = null, sent_ts = null, recipient_name = null, recipient_email = null, access_code_id_fk = null " + - "where id in (select special_price_id_fk from ticket where tickets_reservation_id in (:reservationIds) and special_price_id_fk is not null)") + @Query(""" + update special_price set status = 'FREE', session_id = null, sent_ts = null, recipient_name = null, recipient_email = null, access_code_id_fk = null \ + where id in (select special_price_id_fk from ticket where tickets_reservation_id in (:reservationIds) and special_price_id_fk is not null)\ + """) int resetToFreeAndCleanupForReservation(@Bind("reservationIds") List reservationIds); - @Query("update special_price set status = 'FREE', session_id = null, sent_ts = null, recipient_name = null, recipient_email = null, access_code_id_fk = null " + - " where id in (select special_price_id_fk from ticket where ticket.id in (:ticketIds) and special_price_id_fk is not null) ") + @Query(""" + update special_price set status = 'FREE', session_id = null, sent_ts = null, recipient_name = null, recipient_email = null, access_code_id_fk = null \ + where id in (select special_price_id_fk from ticket where ticket.id in (:ticketIds) and special_price_id_fk is not null) \ + """) int resetToFreeAndCleanupForTickets(@Bind("ticketIds") List ticketIds); @Query("update special_price set code = :code, status = 'FREE', sent_ts = null where id = :id") diff --git a/src/main/java/alfio/repository/SponsorScanRepository.java b/src/main/java/alfio/repository/SponsorScanRepository.java index ceba579ccd..cf6e9a7e56 100644 --- a/src/main/java/alfio/repository/SponsorScanRepository.java +++ b/src/main/java/alfio/repository/SponsorScanRepository.java @@ -53,13 +53,15 @@ int updateNotesAndLeadStatus(@Bind("userId") int userId, @Bind("leadStatus") SponsorScan.LeadStatus leadStatus, @Bind("operator") String operator); - @Query("select t.id t_id, t.uuid t_uuid, t.creation t_creation, t.category_id t_category_id, t.status t_status, t.event_id t_event_id," + - " t.src_price_cts t_src_price_cts, t.final_price_cts t_final_price_cts, t.vat_cts t_vat_cts, t.discount_cts t_discount_cts, t.tickets_reservation_id t_tickets_reservation_id," + - " t.full_name t_full_name, t.first_name t_first_name, t.last_name t_last_name, t.email_address t_email_address, t.locked_assignment t_locked_assignment," + - " t.user_language t_user_language, t.ext_reference t_ext_reference, t.currency_code t_currency_code, t.tags t_tags, t.subscription_id_fk t_subscription_id, t.vat_status t_vat_status," + - " s.user_id s_user_id, s.creation s_creation, s.event_id s_event_id, s.ticket_id s_ticket_id, s.notes s_notes, s.lead_status s_lead_status, s.operator s_operator, " + - " (case when s.lead_status = 'HOT' then 2 when s.lead_status = 'WARM' then 1 else 0 end) as priority"+ - " from sponsor_scan s, ticket t where s.event_id = :eventId and s.user_id = :userId and s.creation > :start and s.ticket_id = t.id order by priority desc, s.creation") + @Query(""" + select t.id t_id, t.uuid t_uuid, t.creation t_creation, t.category_id t_category_id, t.status t_status, t.event_id t_event_id,\ + t.src_price_cts t_src_price_cts, t.final_price_cts t_final_price_cts, t.vat_cts t_vat_cts, t.discount_cts t_discount_cts, t.tickets_reservation_id t_tickets_reservation_id,\ + t.full_name t_full_name, t.first_name t_first_name, t.last_name t_last_name, t.email_address t_email_address, t.locked_assignment t_locked_assignment,\ + t.user_language t_user_language, t.ext_reference t_ext_reference, t.currency_code t_currency_code, t.tags t_tags, t.subscription_id_fk t_subscription_id, t.vat_status t_vat_status,\ + s.user_id s_user_id, s.creation s_creation, s.event_id s_event_id, s.ticket_id s_ticket_id, s.notes s_notes, s.lead_status s_lead_status, s.operator s_operator, \ + (case when s.lead_status = 'HOT' then 2 when s.lead_status = 'WARM' then 1 else 0 end) as priority\ + from sponsor_scan s, ticket t where s.event_id = :eventId and s.user_id = :userId and s.creation > :start and s.ticket_id = t.id order by priority desc, s.creation\ + """) List loadSponsorData(@Bind("eventId") int eventId, @Bind("userId") int userId, @Bind("start") ZonedDateTime start); diff --git a/src/main/java/alfio/repository/SubscriptionRepository.java b/src/main/java/alfio/repository/SubscriptionRepository.java index d36de05b4b..4ed9d9fe42 100644 --- a/src/main/java/alfio/repository/SubscriptionRepository.java +++ b/src/main/java/alfio/repository/SubscriptionRepository.java @@ -40,28 +40,36 @@ @QueryRepository public interface SubscriptionRepository { - String FETCH_SUBSCRIPTION_LINK = "select sd.id subscription_descriptor_id, sd.title subscription_descriptor_title, e.id event_id," + - " e.short_name event_short_name, e.display_name event_display_name, e.currency event_currency, se.price_per_ticket price_per_ticket " + - " from subscription_event se" + - " join event e on e.id = se.event_id_fk and e.org_id = :organizationId" + - " join subscription_descriptor sd on sd.id = se.subscription_descriptor_id_fk and sd.organization_id_fk = :organizationId"; - - String INSERT_SUBSCRIPTION_LINK = "insert into subscription_event(event_id_fk, subscription_descriptor_id_fk, price_per_ticket, organization_id_fk)" + - " values(:eventId, :subscriptionId, :pricePerTicket, :organizationId) on conflict(subscription_descriptor_id_fk, event_id_fk) do update set price_per_ticket = excluded.price_per_ticket"; - - String INSERT_SUBSCRIPTION = "insert into subscription(id, subscription_descriptor_fk, reservation_id_fk, max_usage, " + - " valid_from, valid_to, organization_id_fk, status, src_price_cts, currency, max_entries, time_zone) " + - " values (:id, :subscriptionDescriptorId, :reservationId, :maxUsage, :validFrom, :validTo, :organizationId, :status::ALLOCATION_STATUS, " + - " :srcPriceCts, :currency, :maxEntries, :timeZone)"; - - @Query("insert into subscription_descriptor (" + - "id, title, description, max_available, on_sale_from, on_sale_to, price_cts, vat, vat_status, currency, is_public, organization_id_fk, " + - " max_entries, validity_type, validity_time_unit, validity_units, validity_from, validity_to, usage_type, terms_conditions_url, privacy_policy_url," + - " file_blob_id_fk, allowed_payment_proxies, private_key, time_zone, supports_tickets_generation, status) " + - " values(:id, :title::jsonb, :description::jsonb, :maxAvailable, :onSaleFrom, :onSaleTo, :priceCts, :vat, :vatStatus::VAT_STATUS, :currency, " + - " :isPublic, :organizationId, :maxEntries, :validityType::SUBSCRIPTION_VALIDITY_TYPE, :validityTimeUnit::SUBSCRIPTION_TIME_UNIT, " + - " :validityUnits, :validityFrom, :validityTo, :usageType::SUBSCRIPTION_USAGE_TYPE, :tcUrl, :privacyPolicyUrl," + - " :fileBlobId, :allowedPaymentProxies::text[], :privateKey, :timeZone, :supportsTicketsGeneration, 'ACTIVE')") + String FETCH_SUBSCRIPTION_LINK = """ + select sd.id subscription_descriptor_id, sd.title subscription_descriptor_title, e.id event_id,\ + e.short_name event_short_name, e.display_name event_display_name, e.currency event_currency, se.price_per_ticket price_per_ticket \ + from subscription_event se\ + join event e on e.id = se.event_id_fk and e.org_id = :organizationId\ + join subscription_descriptor sd on sd.id = se.subscription_descriptor_id_fk and sd.organization_id_fk = :organizationId\ + """; + + String INSERT_SUBSCRIPTION_LINK = """ + insert into subscription_event(event_id_fk, subscription_descriptor_id_fk, price_per_ticket, organization_id_fk)\ + values(:eventId, :subscriptionId, :pricePerTicket, :organizationId) on conflict(subscription_descriptor_id_fk, event_id_fk) do update set price_per_ticket = excluded.price_per_ticket\ + """; + + String INSERT_SUBSCRIPTION = """ + insert into subscription(id, subscription_descriptor_fk, reservation_id_fk, max_usage, \ + valid_from, valid_to, organization_id_fk, status, src_price_cts, currency, max_entries, time_zone) \ + values (:id, :subscriptionDescriptorId, :reservationId, :maxUsage, :validFrom, :validTo, :organizationId, :status::ALLOCATION_STATUS, \ + :srcPriceCts, :currency, :maxEntries, :timeZone)\ + """; + + @Query(""" + insert into subscription_descriptor (\ + id, title, description, max_available, on_sale_from, on_sale_to, price_cts, vat, vat_status, currency, is_public, organization_id_fk, \ + max_entries, validity_type, validity_time_unit, validity_units, validity_from, validity_to, usage_type, terms_conditions_url, privacy_policy_url,\ + file_blob_id_fk, allowed_payment_proxies, private_key, time_zone, supports_tickets_generation, status) \ + values(:id, :title::jsonb, :description::jsonb, :maxAvailable, :onSaleFrom, :onSaleTo, :priceCts, :vat, :vatStatus::VAT_STATUS, :currency, \ + :isPublic, :organizationId, :maxEntries, :validityType::SUBSCRIPTION_VALIDITY_TYPE, :validityTimeUnit::SUBSCRIPTION_TIME_UNIT, \ + :validityUnits, :validityFrom, :validityTo, :usageType::SUBSCRIPTION_USAGE_TYPE, :tcUrl, :privacyPolicyUrl,\ + :fileBlobId, :allowedPaymentProxies::text[], :privateKey, :timeZone, :supportsTicketsGeneration, 'ACTIVE')\ + """) int createSubscriptionDescriptor(@Bind("id") UUID id, @Bind("title") @JSONData Map title, @Bind("description") @JSONData Map description, @@ -91,14 +99,16 @@ int createSubscriptionDescriptor(@Bind("id") UUID id, @Bind("timeZone") String timeZone, @Bind("supportsTicketsGeneration") boolean supportsTicketsGeneration); - @Query("update subscription_descriptor set title = :title::jsonb, description = :description::jsonb, max_available = :maxAvailable," + - " on_sale_from = :onSaleFrom, on_sale_to = :onSaleTo, price_cts = :priceCts, vat = :vat, vat_status = :vatStatus::VAT_STATUS, " + - " currency = :currency, is_public = :isPublic, max_entries = :maxEntries, validity_type = :validityType::SUBSCRIPTION_VALIDITY_TYPE," + - " validity_time_unit = :validityTimeUnit::SUBSCRIPTION_TIME_UNIT, validity_units = :validityUnits, validity_from = :validityFrom," + - " validity_to = :validityTo, usage_type = :usageType::SUBSCRIPTION_USAGE_TYPE," + - " terms_conditions_url = :tcUrl, privacy_policy_url = :privacyPolicyUrl, file_blob_id_fk = :fileBlobId," + - " allowed_payment_proxies = :allowedPaymentProxies::text[], time_zone = :timeZone, supports_tickets_generation = :supportsTicketsGeneration " + - " where id = :id and organization_id_fk = :organizationId") + @Query(""" + update subscription_descriptor set title = :title::jsonb, description = :description::jsonb, max_available = :maxAvailable,\ + on_sale_from = :onSaleFrom, on_sale_to = :onSaleTo, price_cts = :priceCts, vat = :vat, vat_status = :vatStatus::VAT_STATUS, \ + currency = :currency, is_public = :isPublic, max_entries = :maxEntries, validity_type = :validityType::SUBSCRIPTION_VALIDITY_TYPE,\ + validity_time_unit = :validityTimeUnit::SUBSCRIPTION_TIME_UNIT, validity_units = :validityUnits, validity_from = :validityFrom,\ + validity_to = :validityTo, usage_type = :usageType::SUBSCRIPTION_USAGE_TYPE,\ + terms_conditions_url = :tcUrl, privacy_policy_url = :privacyPolicyUrl, file_blob_id_fk = :fileBlobId,\ + allowed_payment_proxies = :allowedPaymentProxies::text[], time_zone = :timeZone, supports_tickets_generation = :supportsTicketsGeneration \ + where id = :id and organization_id_fk = :organizationId\ + """) int updateSubscriptionDescriptor(@Bind("title") @JSONData Map title, @Bind("description") @JSONData Map description, @Bind("maxAvailable") int maxAvailable, @@ -134,18 +144,22 @@ int updateSubscriptionDescriptor(@Bind("title") @JSONData Map ti @Query("update subscription_descriptor set status = 'NOT_ACTIVE' where id = :id and organization_id_fk = :organizationId") int deactivateDescriptor(@Bind("id") UUID id, @Bind("organizationId") int organizationId); - @Query("select * from subscription_descriptor where organization_id_fk = :organizationId" + - " and status = 'ACTIVE'" + - " order by on_sale_from, on_sale_to nulls last") + @Query(""" + select * from subscription_descriptor where organization_id_fk = :organizationId\ + and status = 'ACTIVE'\ + order by on_sale_from, on_sale_to nulls last\ + """) List findAllByOrganizationIds(@Bind("organizationId") int organizationId); - @Query("select subscription_descriptor.* from subscription_descriptor" + - " join organization org on subscription_descriptor.organization_id_fk = org.id "+ - " where status = 'ACTIVE' and is_public = true and" + - " (max_entries > 0 or max_entries = -1) and (on_sale_from is null or :from >= on_sale_from) " + - " and (on_sale_to is null or :from <= on_sale_to)" + - " and (:orgSlug is null or org.slug = :orgSlug)"+ - " order by on_sale_from, on_sale_to nulls last") + @Query(""" + select subscription_descriptor.* from subscription_descriptor\ + join organization org on subscription_descriptor.organization_id_fk = org.id \ + where status = 'ACTIVE' and is_public = true and\ + (max_entries > 0 or max_entries = -1) and (on_sale_from is null or :from >= on_sale_from) \ + and (on_sale_to is null or :from <= on_sale_to)\ + and (:orgSlug is null or org.slug = :orgSlug)\ + order by on_sale_from, on_sale_to nulls last\ + """) List findAllActiveAndPublic(@Bind("from") ZonedDateTime from, @Bind("orgSlug") String organizerSlug); @Query("select * from subscription_descriptor where status = 'ACTIVE' and id = :id and organization_id_fk = :organizationId") @@ -177,8 +191,10 @@ Integer countDescriptorsBelongingToOrganization(@Bind("ids") Collection id Optional findOneWithStatistics(@Bind("subscriptionDescriptorId") UUID subscriptionDescriptorId, @Bind("organizationId") int organizationId); - @Query("select exists (select 1 from subscription_event where event_id_fk = :eventId" + - " and subscription_descriptor_id_fk = :subscriptionDescriptorId::uuid and organization_id_fk = :organizationId)") + @Query(""" + select exists (select 1 from subscription_event where event_id_fk = :eventId\ + and subscription_descriptor_id_fk = :subscriptionDescriptorId::uuid and organization_id_fk = :organizationId)\ + """) boolean isSubscriptionLinkedToEvent(@Bind("eventId") int eventId, @Bind("subscriptionDescriptorId") UUID subscriptionDescriptorId, @Bind("organizationId") int organizationId); @@ -199,18 +215,24 @@ List findLinkedEvents(@Bind("organizationId") int organiz @Query("select subscription_descriptor_id_fk from subscription_event where event_id_fk = :eventId and organization_id_fk = :organizationId") List findLinkedSubscriptionIds(@Bind("eventId") int eventId, @Bind("organizationId") int organizationId); - @Query("select * from subscription_descriptor where status = 'ACTIVE' and organization_id_fk = :organizationId" + - " and (on_sale_to is null or on_sale_to > now()) order by on_sale_from, on_sale_to nulls last") + @Query(""" + select * from subscription_descriptor where status = 'ACTIVE' and organization_id_fk = :organizationId\ + and (on_sale_to is null or on_sale_to > now()) order by on_sale_from, on_sale_to nulls last\ + """) List findActiveSubscriptionsForOrganization(@Bind("organizationId") int organizationId); - @Query("delete from subscription_event where event_id_fk = :eventId and organization_id_fk = :organizationId" + - " and subscription_descriptor_id_fk not in (:descriptorIds)") + @Query(""" + delete from subscription_event where event_id_fk = :eventId and organization_id_fk = :organizationId\ + and subscription_descriptor_id_fk not in (:descriptorIds)\ + """) int removeStaleSubscriptions(@Bind("eventId") int eventId, @Bind("organizationId") int organizationId, @Bind("descriptorIds") List currentDescriptors); - @Query("delete from subscription_event where subscription_descriptor_id_fk = :subscriptionId and organization_id_fk = :organizationId" + - " and event_id_fk not in (:eventIds)") + @Query(""" + delete from subscription_event where subscription_descriptor_id_fk = :subscriptionId and organization_id_fk = :organizationId\ + and event_id_fk not in (:eventIds)\ + """) int removeStaleEvents(@Bind("subscriptionId") UUID subscriptionId, @Bind("organizationId") int organizationId, @Bind("eventIds") List eventIds); @@ -246,8 +268,10 @@ int createSubscription(@Bind("id") UUID id, @Query("select count(*) from subscription where subscription_descriptor_fk = :descriptorId and status = 'FREE'") int countFreeSubscriptionForDescriptor(@Bind("descriptorId") UUID subscriptionDescriptorId); - @Query("update subscription set reservation_id_fk = :reservationId, status = :status::allocation_status," + - " src_price_cts = :srcPriceCts where id = :subscriptionId") + @Query(""" + update subscription set reservation_id_fk = :reservationId, status = :status::allocation_status,\ + src_price_cts = :srcPriceCts where id = :subscriptionId\ + """) int bindSubscriptionToReservation(@Bind("reservationId") String reservationId, @Bind("srcPriceCts") int price, @Bind("status") AllocationStatus allocationStatus, @Bind("subscriptionId") UUID subscriptionId); @Query("delete from subscription where reservation_id_fk in (:expiredReservationIds)") @@ -293,10 +317,12 @@ int createSubscription(@Bind("id") UUID id, @Query("select count(*) from subscription where id = :id") int countSubscriptionById(@Bind("id") UUID fromString); - @Query("update subscription set status = :status::allocation_status, first_name = :firstName, last_name = :lastName," + - " email_address = :email, max_entries = :maxEntries, confirmation_ts = :confirmationTs," + - " validity_from = :validityFrom, validity_to = :validityTo, time_zone = :timeZone " + - " where reservation_id_fk = :reservationId") + @Query(""" + update subscription set status = :status::allocation_status, first_name = :firstName, last_name = :lastName,\ + email_address = :email, max_entries = :maxEntries, confirmation_ts = :confirmationTs,\ + validity_from = :validityFrom, validity_to = :validityTo, time_zone = :timeZone \ + where reservation_id_fk = :reservationId\ + """) int confirmSubscription(@Bind("reservationId") String reservationId, @Bind("status") AllocationStatus status, @Bind("firstName") String firstName, @@ -308,8 +334,10 @@ int confirmSubscription(@Bind("reservationId") String reservationId, @Bind("confirmationTs") ZonedDateTime confirmationTimestamp, @Bind("timeZone") String timeZone); - @Query("update subscription set first_name = :firstName, last_name = :lastName, email_address = :email," + - " max_entries = :maxEntries, validity_from = :validityFrom, validity_to = :validityTo where id = :id::uuid") + @Query(""" + update subscription set first_name = :firstName, last_name = :lastName, email_address = :email,\ + max_entries = :maxEntries, validity_from = :validityFrom, validity_to = :validityTo where id = :id::uuid\ + """) int updateSubscription(@Bind("id") UUID subscriptionId, @Bind("firstName") String firstName, @Bind("lastName") String lastName, @@ -330,8 +358,10 @@ int assignSubscription(@Bind("reservationId") String reservationId, @Query("update subscription set status = 'CANCELLED' where reservation_id_fk = :reservationId") int cancelSubscriptions(@Bind("reservationId") String reservationId); - @Query("update subscription set status = 'CANCELLED' where reservation_id_fk = :reservationId" + - " and id = :subscriptionId and subscription_descriptor_fk = :descriptorId") + @Query(""" + update subscription set status = 'CANCELLED' where reservation_id_fk = :reservationId\ + and id = :subscriptionId and subscription_descriptor_fk = :descriptorId\ + """) int cancelSubscription(@Bind("reservationId") String reservationId, @Bind("subscriptionId") UUID subscriptionId, @Bind("descriptorId") UUID descriptorId); @@ -343,49 +373,51 @@ default Map> loadAvailableSubscript Map> result = new TreeMap<>(); var paramSource = new MapSqlParameterSource("eventId", eventId) .addValue("organizationId", organizationId); - getJdbcTemplate().query("with usage_by_subscription_id as ( " + - " select s.id subscription_id, " + - " sum(case when t.subscription_id_fk is not null then 1 else 0 end) usage " + - " from subscription s " + - " left join tickets_reservation t on t.subscription_id_fk = s.id " + - " group by 1 " + - " ), subscription_expiration as ( " + - " select id, " + - " coalesce(s.validity_from, 'yesterday'::timestamp) inception, " + - " coalesce(s.validity_to, 'tomorrow'::timestamp) expiration " + - " from subscription s " + - " ), subscription_additional as (" + - " select subscription_id_fk, jsonb_agg(jsonb_build_object('name', field_name, 'value', to_jsonb(field_value))) fields" + - " from field_value_w_additional where context = 'SUBSCRIPTION' group by 1" + - " ) " + - " select e.id event_id, " + - " e.org_id organization_id, " + - " s.id as subscription_id, " + - " s.email_address as email_address, " + - " s.first_name as first_name, " + - " s.last_name as last_name, " + - " r.user_language as user_language," + - " r.email_address as reservation_email," + - " fv.fields as additional_fields " + - " from event e " + - " join subscription_event se on se.event_id_fk = e.id " + - " join subscription_descriptor sd on se.subscription_descriptor_id_fk = sd.id " + - " join subscription s on sd.id = s.subscription_descriptor_fk " + - " join usage_by_subscription_id u on s.id = u.subscription_id " + - " join subscription_expiration exp on s.id = exp.id " + - " join tickets_reservation r on r.id = s.reservation_id_fk " + - " left join subscription_additional fv on s.id = fv.subscription_id_fk" + - " where e.end_ts > now() " + // make sure that the event has not expired - " and (:eventId::int is null or e.id = :eventId::int)" + - " and (:organizationId::int is null or e.org_id = :organizationId::int)" + - " and s.status = 'ACQUIRED' " + - " and not exists(select id from tickets_reservation tr where tr.subscription_id_fk = s.id and tr.event_id_fk = e.id) " + - " and sd.supports_tickets_generation is TRUE " + - " and exp.inception <= now() " + - " and exp.expiration > now() " + - " and (s.max_entries = -1 or s.max_entries > u.usage) " + - " and (select count(*) from ticket_category where event_id = e.id and tc_status = 'ACTIVE') > 0" + - " order by e.id", paramSource, rse -> { + getJdbcTemplate().query(""" + with usage_by_subscription_id as ( \ + select s.id subscription_id, \ + sum(case when t.subscription_id_fk is not null then 1 else 0 end) usage \ + from subscription s \ + left join tickets_reservation t on t.subscription_id_fk = s.id \ + group by 1 \ + ), subscription_expiration as ( \ + select id, \ + coalesce(s.validity_from, 'yesterday'::timestamp) inception, \ + coalesce(s.validity_to, 'tomorrow'::timestamp) expiration \ + from subscription s \ + ), subscription_additional as (\ + select subscription_id_fk, jsonb_agg(jsonb_build_object('name', field_name, 'value', to_jsonb(field_value))) fields\ + from field_value_w_additional where context = 'SUBSCRIPTION' group by 1\ + ) \ + select e.id event_id, \ + e.org_id organization_id, \ + s.id as subscription_id, \ + s.email_address as email_address, \ + s.first_name as first_name, \ + s.last_name as last_name, \ + r.user_language as user_language,\ + r.email_address as reservation_email,\ + fv.fields as additional_fields \ + from event e \ + join subscription_event se on se.event_id_fk = e.id \ + join subscription_descriptor sd on se.subscription_descriptor_id_fk = sd.id \ + join subscription s on sd.id = s.subscription_descriptor_fk \ + join usage_by_subscription_id u on s.id = u.subscription_id \ + join subscription_expiration exp on s.id = exp.id \ + join tickets_reservation r on r.id = s.reservation_id_fk \ + left join subscription_additional fv on s.id = fv.subscription_id_fk\ + where e.end_ts > now() \ + and (:eventId::int is null or e.id = :eventId::int)\ + and (:organizationId::int is null or e.org_id = :organizationId::int)\ + and s.status = 'ACQUIRED' \ + and not exists(select id from tickets_reservation tr where tr.subscription_id_fk = s.id and tr.event_id_fk = e.id) \ + and sd.supports_tickets_generation is TRUE \ + and exp.inception <= now() \ + and exp.expiration > now() \ + and (s.max_entries = -1 or s.max_entries > u.usage) \ + and (select count(*) from ticket_category where event_id = e.id and tc_status = 'ACTIVE') > 0\ + order by e.id\ + """, paramSource, rse -> { int eId = rse.getInt("event_id"); if (!result.containsKey(eId)) { result.put(eId, new ArrayList<>()); diff --git a/src/main/java/alfio/repository/TicketCategoryRepository.java b/src/main/java/alfio/repository/TicketCategoryRepository.java index 6162f9a2a8..a10f6551c7 100644 --- a/src/main/java/alfio/repository/TicketCategoryRepository.java +++ b/src/main/java/alfio/repository/TicketCategoryRepository.java @@ -33,8 +33,10 @@ public interface TicketCategoryRepository { String CHECK_ACTIVE = "event_id = :eventId and tc_status = 'ACTIVE'"; - @Query("insert into ticket_category(inception, expiration, name, max_tickets, price_cts, src_price_cts, access_restricted, tc_status, event_id, bounded, category_code, valid_checkin_from, valid_checkin_to, ticket_validity_start, ticket_validity_end, ordinal, ticket_checkin_strategy, metadata, ticket_access_type) " + - "values(:inception, :expiration, :name, :max_tickets, 0, :price, :accessRestricted, 'ACTIVE', :eventId, :bounded, :code, :validCheckInFrom, :validCheckInTo, :ticketValidityStart, :ticketValidityEnd, :ordinal, :ticketCheckInStrategy, :metadata::jsonb, :ticketAccessType::ticket_access_type)") + @Query(""" + insert into ticket_category(inception, expiration, name, max_tickets, price_cts, src_price_cts, access_restricted, tc_status, event_id, bounded, category_code, valid_checkin_from, valid_checkin_to, ticket_validity_start, ticket_validity_end, ordinal, ticket_checkin_strategy, metadata, ticket_access_type) \ + values(:inception, :expiration, :name, :max_tickets, 0, :price, :accessRestricted, 'ACTIVE', :eventId, :bounded, :code, :validCheckInFrom, :validCheckInTo, :ticketValidityStart, :ticketValidityEnd, :ordinal, :ticketCheckInStrategy, :metadata::jsonb, :ticketAccessType::ticket_access_type)\ + """) @AutoGeneratedKey("id") AffectedRowCountAndKey insert(@Bind("inception") ZonedDateTime inception, @Bind("expiration") ZonedDateTime expiration, @@ -90,14 +92,16 @@ AffectedRowCountAndKey insert(@Bind("inception") ZonedDateTime inceptio @Query("select * from ticket_category_with_currency where event_id = :eventId and tc_status = 'ACTIVE' order by ordinal asc, inception asc, expiration asc, id asc") List findAllTicketCategories(@Bind("eventId") int eventId); - @Query("select tc.* from ticket_category_with_currency tc" + - " join ticket_category_statistics tcs on tc.id = tcs.ticket_category_id" + - " where tc.event_id = :eventId" + - " and tcs.is_expired is FALSE" + - " and tcs.access_restricted is FALSE" + - " and (tcs.bounded is FALSE or tcs.not_sold_tickets > 0)" + - " order by tc.inception, tc.expiration, tc.id" + - " limit 1") + @Query(""" + select tc.* from ticket_category_with_currency tc\ + join ticket_category_statistics tcs on tc.id = tcs.ticket_category_id\ + where tc.event_id = :eventId\ + and tcs.is_expired is FALSE\ + and tcs.access_restricted is FALSE\ + and (tcs.bounded is FALSE or tcs.not_sold_tickets > 0)\ + order by tc.inception, tc.expiration, tc.id\ + limit 1\ + """) Optional findFirstWithAvailableTickets(@Bind("eventId") int eventId); default Map findByEventIdAsMap(int eventId) { @@ -116,10 +120,12 @@ default Map findCategoryMetadataForEventGroupByCategoryI @Query("select count(*) from ticket_category_with_currency where event_id = :eventId and access_restricted = true") Integer countAccessRestrictedRepositoryByEventId(@Bind("eventId") int eventId); - @Query("update ticket_category set name = :name, inception = :inception, expiration = :expiration, " + - "max_tickets = :max_tickets, src_price_cts = :price, access_restricted = :accessRestricted, category_code = :code, " + - " valid_checkin_from = :validCheckInFrom, valid_checkin_to = :validCheckInTo, ticket_validity_start = :ticketValidityStart," + - " ticket_validity_end = :ticketValidityEnd, ticket_checkin_strategy = :ticketCheckInStrategy, ticket_access_type = :ticketAccessType::ticket_access_type where id = :id") + @Query(""" + update ticket_category set name = :name, inception = :inception, expiration = :expiration, \ + max_tickets = :max_tickets, src_price_cts = :price, access_restricted = :accessRestricted, category_code = :code, \ + valid_checkin_from = :validCheckInFrom, valid_checkin_to = :validCheckInTo, ticket_validity_start = :ticketValidityStart,\ + ticket_validity_end = :ticketValidityEnd, ticket_checkin_strategy = :ticketCheckInStrategy, ticket_access_type = :ticketAccessType::ticket_access_type where id = :id\ + """) int update(@Bind("id") int id, @Bind("name") String name, @Bind("inception") ZonedDateTime inception, diff --git a/src/main/java/alfio/repository/TicketRepository.java b/src/main/java/alfio/repository/TicketRepository.java index 531882cd4d..1696171a53 100644 --- a/src/main/java/alfio/repository/TicketRepository.java +++ b/src/main/java/alfio/repository/TicketRepository.java @@ -57,8 +57,10 @@ public interface TicketRepository { //TODO: refactor, try to move the MapSqlParameterSource inside the default method! default void bulkTicketInitialization(MapSqlParameterSource[] args) { - getNamedParameterJdbcTemplate().batchUpdate("insert into ticket (uuid, creation, category_id, event_id, status, original_price_cts, paid_price_cts, src_price_cts)" - + "values(:uuid, :creation, :categoryId, :eventId, :status, 0, 0, :srcPriceCts)", args); + getNamedParameterJdbcTemplate().batchUpdate(""" + insert into ticket (uuid, creation, category_id, event_id, status, original_price_cts, paid_price_cts, src_price_cts)\ + values(:uuid, :creation, :categoryId, :eventId, :status, 0, 0, :srcPriceCts)\ + """, args); } default void bulkTicketUpdate(List ids, TicketCategory ticketCategory) { @@ -148,22 +150,28 @@ default int reserveTickets(String reservationId, } @Query(type = QueryType.TEMPLATE, - value = "update ticket set tickets_reservation_id = :reservationId, status = 'PENDING', category_id = :categoryId, " + - "user_language = :userLanguage, src_price_cts = :srcPriceCts, currency_code = :currencyCode, metadata = :ticketMetadata::jsonb, " + - "vat_status = :vatStatus::VAT_STATUS, first_name = :firstName, last_name = :lastName, email_address = :email, full_name = :fullName where id = :id") + value = """ + update ticket set tickets_reservation_id = :reservationId, status = 'PENDING', category_id = :categoryId, \ + user_language = :userLanguage, src_price_cts = :srcPriceCts, currency_code = :currencyCode, metadata = :ticketMetadata::jsonb, \ + vat_status = :vatStatus::VAT_STATUS, first_name = :firstName, last_name = :lastName, email_address = :email, full_name = :fullName where id = :id\ + """) String batchReserveTickets(); @Query(type = QueryType.TEMPLATE, - value = "update ticket set tickets_reservation_id = :reservationId, special_price_id_fk = :specialCodeId," + - " user_language = :userLanguage, status = 'PENDING', src_price_cts = :srcPriceCts," + - " currency_code = :currencyCode, vat_status = :vatStatus::VAT_STATUS," + - " metadata = :ticketMetadata::jsonb, first_name = :firstName, last_name = :lastName, email_address = :email, full_name = :fullName" + - " where id = :ticketId") + value = """ + update ticket set tickets_reservation_id = :reservationId, special_price_id_fk = :specialCodeId,\ + user_language = :userLanguage, status = 'PENDING', src_price_cts = :srcPriceCts,\ + currency_code = :currencyCode, vat_status = :vatStatus::VAT_STATUS,\ + metadata = :ticketMetadata::jsonb, first_name = :firstName, last_name = :lastName, email_address = :email, full_name = :fullName\ + where id = :ticketId\ + """) String batchReserveTicketsForSpecialPrice(); - @Query("update ticket set tickets_reservation_id = :reservationId, special_price_id_fk = :specialCodeId," + - " user_language = :userLanguage, status = 'PENDING', src_price_cts = :srcPriceCts, currency_code = :currencyCode," + - " vat_status = :vatStatus::VAT_STATUS, metadata = :ticketMetadata::jsonb where id = :ticketId") + @Query(""" + update ticket set tickets_reservation_id = :reservationId, special_price_id_fk = :specialCodeId,\ + user_language = :userLanguage, status = 'PENDING', src_price_cts = :srcPriceCts, currency_code = :currencyCode,\ + vat_status = :vatStatus::VAT_STATUS, metadata = :ticketMetadata::jsonb where id = :ticketId\ + """) void reserveTicket(@Bind("reservationId")String transactionId, @Bind("ticketId") int ticketId, @Bind("specialCodeId") int specialCodeId, @@ -182,9 +190,11 @@ void reserveTicket(@Bind("reservationId")String transactionId, @Query("update ticket set status = 'INVALIDATED' where id in (:ids)") int invalidateTickets(@Bind("ids") List ids); - @Query("update ticket set src_price_cts = :srcPriceCts, final_price_cts = :finalPriceCts," + - " vat_cts = :vatCts, discount_cts = :discountCts, currency_code = :currencyCode, vat_status = null" + - " where event_id = :eventId and category_id = :categoryId and status = 'FREE'") + @Query(""" + update ticket set src_price_cts = :srcPriceCts, final_price_cts = :finalPriceCts,\ + vat_cts = :vatCts, discount_cts = :discountCts, currency_code = :currencyCode, vat_status = null\ + where event_id = :eventId and category_id = :categoryId and status = 'FREE'\ + """) int updateTicketPrice(@Bind("categoryId") int categoryId, @Bind("eventId") int eventId, @Bind("srcPriceCts") int srcPriceCts, @@ -193,9 +203,11 @@ int updateTicketPrice(@Bind("categoryId") int categoryId, @Bind("discountCts") int discountCts, @Bind("currencyCode") String currencyCode); - @Query("update ticket set src_price_cts = :srcPriceCts, final_price_cts = :finalPriceCts," + - " vat_cts = :vatCts, discount_cts = :discountCts, currency_code = :currencyCode," + - " vat_status = :vatStatus::VAT_STATUS where event_id = :eventId and category_id = :categoryId and id in(:ids)") + @Query(""" + update ticket set src_price_cts = :srcPriceCts, final_price_cts = :finalPriceCts,\ + vat_cts = :vatCts, discount_cts = :discountCts, currency_code = :currencyCode,\ + vat_status = :vatStatus::VAT_STATUS where event_id = :eventId and category_id = :categoryId and id in(:ids)\ + """) int updateTicketPrice(@Bind("ids") List ids, @Bind("categoryId") int categoryId, @Bind("eventId") int eventId, @@ -304,34 +316,38 @@ int updateTicketPrice(@Bind("ids") List ids, @Query("select * from ticket where category_id in (:categories) and status = 'PENDING'") List findPendingTicketsInCategories(@Bind("categories") List categories); - String FIND_FULL_TICKET_INFO = "select " + - " t.id t_id, t.uuid t_uuid, t.creation t_creation, t.category_id t_category_id, t.status t_status, t.event_id t_event_id," + - " t.src_price_cts t_src_price_cts, t.final_price_cts t_final_price_cts, t.vat_cts t_vat_cts, t.discount_cts t_discount_cts, t.tickets_reservation_id t_tickets_reservation_id," + - " t.full_name t_full_name, t.first_name t_first_name, t.last_name t_last_name, t.email_address t_email_address, t.locked_assignment t_locked_assignment," + - " t.user_language t_user_language, t.ext_reference t_ext_reference, t.currency_code t_currency_code, t.tags t_tags, t.subscription_id_fk t_subscription_id, t.vat_status t_vat_status, " + - " tr.id tr_id, tr.validity tr_validity, tr.status tr_status, tr.full_name tr_full_name, tr.first_name tr_first_name, tr.last_name tr_last_name, tr.email_address tr_email_address, tr.billing_address tr_billing_address," + - " tr.confirmation_ts tr_confirmation_ts, tr.latest_reminder_ts tr_latest_reminder_ts, tr.payment_method tr_payment_method, " + - " tr.offline_payment_reminder_sent tr_offline_payment_reminder_sent, tr.promo_code_id_fk tr_promo_code_id_fk, tr.automatic tr_automatic, tr.user_language tr_user_language, tr.direct_assignment tr_direct_assignment, tr.invoice_number tr_invoice_number, tr.invoice_model tr_invoice_model, " + - " tr.vat_status tr_vat_status, tr.vat_nr tr_vat_nr, tr.vat_country tr_vat_country, tr.invoice_requested tr_invoice_requested, tr.used_vat_percent tr_used_vat_percent, tr.vat_included tr_vat_included, tr.creation_ts tr_creation_ts, tr.registration_ts tr_registration_ts, tr.customer_reference tr_customer_reference, " + - " tr.billing_address_company tr_billing_address_company, tr.billing_address_line1 tr_billing_address_line1, tr.billing_address_line2 tr_billing_address_line2, tr.billing_address_city tr_billing_address_city, tr.billing_address_state tr_billing_address_state, tr.billing_address_zip tr_billing_address_zip, tr.invoicing_additional_information tr_invoicing_additional_information, " + - " tr.src_price_cts tr_src_price_cts, tr.final_price_cts tr_final_price_cts, tr.vat_cts tr_vat_cts, tr.discount_cts tr_discount_cts, tr.currency_code tr_currency_code, " + - " tc.id tc_id, tc.inception tc_inception, tc.expiration tc_expiration, tc.max_tickets tc_max_tickets, tc.name tc_name, tc.src_price_cts tc_src_price_cts, tc.access_restricted tc_access_restricted, tc.tc_status tc_tc_status, tc.event_id tc_event_id, tc.bounded tc_bounded, tc.category_code tc_category_code, " + - " tc.valid_checkin_from tc_valid_checkin_from, tc.valid_checkin_to tc_valid_checkin_to, tc.ticket_validity_start tc_ticket_validity_start, tc.ticket_validity_end tc_ticket_validity_end, tc.currency_code tc_currency_code, tc.ordinal tc_ordinal, tc.ticket_checkin_strategy tc_ticket_checkin_strategy, tc.ticket_access_type tc_ticket_access_type" + - " from ticket t " + - " inner join tickets_reservation tr on t.tickets_reservation_id = tr.id " + - " inner join ticket_category_with_currency tc on t.category_id = tc.id "; + String FIND_FULL_TICKET_INFO = """ + select \ + t.id t_id, t.uuid t_uuid, t.creation t_creation, t.category_id t_category_id, t.status t_status, t.event_id t_event_id,\ + t.src_price_cts t_src_price_cts, t.final_price_cts t_final_price_cts, t.vat_cts t_vat_cts, t.discount_cts t_discount_cts, t.tickets_reservation_id t_tickets_reservation_id,\ + t.full_name t_full_name, t.first_name t_first_name, t.last_name t_last_name, t.email_address t_email_address, t.locked_assignment t_locked_assignment,\ + t.user_language t_user_language, t.ext_reference t_ext_reference, t.currency_code t_currency_code, t.tags t_tags, t.subscription_id_fk t_subscription_id, t.vat_status t_vat_status, \ + tr.id tr_id, tr.validity tr_validity, tr.status tr_status, tr.full_name tr_full_name, tr.first_name tr_first_name, tr.last_name tr_last_name, tr.email_address tr_email_address, tr.billing_address tr_billing_address,\ + tr.confirmation_ts tr_confirmation_ts, tr.latest_reminder_ts tr_latest_reminder_ts, tr.payment_method tr_payment_method, \ + tr.offline_payment_reminder_sent tr_offline_payment_reminder_sent, tr.promo_code_id_fk tr_promo_code_id_fk, tr.automatic tr_automatic, tr.user_language tr_user_language, tr.direct_assignment tr_direct_assignment, tr.invoice_number tr_invoice_number, tr.invoice_model tr_invoice_model, \ + tr.vat_status tr_vat_status, tr.vat_nr tr_vat_nr, tr.vat_country tr_vat_country, tr.invoice_requested tr_invoice_requested, tr.used_vat_percent tr_used_vat_percent, tr.vat_included tr_vat_included, tr.creation_ts tr_creation_ts, tr.registration_ts tr_registration_ts, tr.customer_reference tr_customer_reference, \ + tr.billing_address_company tr_billing_address_company, tr.billing_address_line1 tr_billing_address_line1, tr.billing_address_line2 tr_billing_address_line2, tr.billing_address_city tr_billing_address_city, tr.billing_address_state tr_billing_address_state, tr.billing_address_zip tr_billing_address_zip, tr.invoicing_additional_information tr_invoicing_additional_information, \ + tr.src_price_cts tr_src_price_cts, tr.final_price_cts tr_final_price_cts, tr.vat_cts tr_vat_cts, tr.discount_cts tr_discount_cts, tr.currency_code tr_currency_code, \ + tc.id tc_id, tc.inception tc_inception, tc.expiration tc_expiration, tc.max_tickets tc_max_tickets, tc.name tc_name, tc.src_price_cts tc_src_price_cts, tc.access_restricted tc_access_restricted, tc.tc_status tc_tc_status, tc.event_id tc_event_id, tc.bounded tc_bounded, tc.category_code tc_category_code, \ + tc.valid_checkin_from tc_valid_checkin_from, tc.valid_checkin_to tc_valid_checkin_to, tc.ticket_validity_start tc_ticket_validity_start, tc.ticket_validity_end tc_ticket_validity_end, tc.currency_code tc_currency_code, tc.ordinal tc_ordinal, tc.ticket_checkin_strategy tc_ticket_checkin_strategy, tc.ticket_access_type tc_ticket_access_type\ + from ticket t \ + inner join tickets_reservation tr on t.tickets_reservation_id = tr.id \ + inner join ticket_category_with_currency tc on t.category_id = tc.id \ + """; @Query(FIND_FULL_TICKET_INFO + " where t.event_id = :eventId and t.full_name is not null and t.email_address is not null and t.id in (:ids) order by t.id asc") List findAllFullTicketInfoAssignedByEventId(@Bind("eventId") int eventId, @Bind("ids") List ids); - @Query("select t.id " + - " from ticket t " + - " join ticket_category tc on t.category_id = tc.id" + - " left outer join latest_ticket_update ltu on t.id = ltu.ticket_id and ltu.event_id = :eventId " + - " where t.event_id = :eventId and tc.ticket_access_type <> 'ONLINE'" + - " and t.full_name is not null and t.email_address is not null and (coalesce(ltu.last_update, t.creation) > :changedSince) order by t.id asc") + @Query(""" + select t.id \ + from ticket t \ + join ticket_category tc on t.category_id = tc.id\ + left outer join latest_ticket_update ltu on t.id = ltu.ticket_id and ltu.event_id = :eventId \ + where t.event_id = :eventId and tc.ticket_access_type <> 'ONLINE'\ + and t.full_name is not null and t.email_address is not null and (coalesce(ltu.last_update, t.creation) > :changedSince) order by t.id asc\ + """) List findAllAssignedByEventIdForCheckIn(@Bind("eventId") int eventId, @Bind("changedSince") Date changedSince); @Query("select * from reservation_and_ticket_and_tx where t_id is not null and t_status in (" + CONFIRMED + ") and t_event_id = :eventId order by tr_confirmation_ts, t_id") @@ -451,8 +467,10 @@ AttendeeSearchResultsCount countSearchResults(@Bind("eventId") int eventId, @Query("update ticket set status = 'CHECKED_IN', locked_assignment = true where uuid = :uuid and event_id = :eventId and status = 'ACQUIRED'") int performCheckIn(@Bind("uuid") String ticketUUID, @Bind("eventId") int eventId); - @Query("select t.id as t_id, t.first_name as t_first_name, t.last_name as t_last_name, t.email_address as t_email_address, tc.name as tc_name from ticket t " + - " join ticket_category tc on t.category_id = tc.id where t.event_id = :eventId and t.status in ('ACQUIRED', 'TO_BE_PAID', 'CHECKED_IN') and t.tags @> ARRAY[ :tags ]::text[]") + @Query(""" + select t.id as t_id, t.first_name as t_first_name, t.last_name as t_last_name, t.email_address as t_email_address, tc.name as tc_name from ticket t \ + join ticket_category tc on t.category_id = tc.id where t.event_id = :eventId and t.status in ('ACQUIRED', 'TO_BE_PAID', 'CHECKED_IN') and t.tags @> ARRAY[ :tags ]::text[]\ + """) List getTicketsForEventByTags(@Bind("eventId") int eventId, @Bind("tags") List tags); @Query("select count(*) from ticket t where t.event_id = :eventId and t.status in (:statuses) and t.tags @> ARRAY[ :tags ]::text[]") @@ -464,9 +482,11 @@ AttendeeSearchResultsCount countSearchResults(@Bind("eventId") int eventId, @Query("update ticket set tags = array_remove(tags, :tag::text) where id in (:ticketIds) and event_id = :eventId") int untagTickets(@Bind("ticketIds") List ticketIds, @Bind("eventId") int eventId, @Bind("tag") String tag); - @Query("update ticket set subscription_id_fk = :subscriptionId from " + - " (select id from ticket where tickets_reservation_id = :reservationId order by final_price_cts limit :limit) t" + - " where ticket.id = t.id") + @Query(""" + update ticket set subscription_id_fk = :subscriptionId from \ + (select id from ticket where tickets_reservation_id = :reservationId order by final_price_cts limit :limit) t\ + where ticket.id = t.id\ + """) int applySubscriptionToTicketsInReservation(@Bind("reservationId") String reservationId, @Bind("subscriptionId") UUID subscriptionId, @Bind("limit") int limit); @@ -490,11 +510,13 @@ int applySubscriptionToTicketsInReservation(@Bind("reservationId") String reserv @Query(FIND_TICKETS_IN_RESERVATION) List findTicketsInReservationWithMetadata(@Bind("reservationId") String reservationId); - @Query("select t.id from ticket t" + - " join event e on t.event_id = e.id" + - " join tickets_reservation tr on t.tickets_reservation_id = tr.id" + - " join all_ticket_field_values tfv on t.id = tfv.ticket_id_fk" + - " where e.short_name = :eventPublicIdentifier and tr.id = :reservationId") + @Query(""" + select t.id from ticket t\ + join event e on t.event_id = e.id\ + join tickets_reservation tr on t.tickets_reservation_id = tr.id\ + join all_ticket_field_values tfv on t.id = tfv.ticket_id_fk\ + where e.short_name = :eventPublicIdentifier and tr.id = :reservationId\ + """) List findTicketsWithAdditionalData(@Bind("reservationId") String reservationId, @Bind("eventPublicIdentifier") String eventPublicIdentifier); diff --git a/src/main/java/alfio/repository/TicketReservationRepository.java b/src/main/java/alfio/repository/TicketReservationRepository.java index 833c791552..33b452564a 100644 --- a/src/main/java/alfio/repository/TicketReservationRepository.java +++ b/src/main/java/alfio/repository/TicketReservationRepository.java @@ -30,8 +30,10 @@ @QueryRepository public interface TicketReservationRepository { - @Query("insert into tickets_reservation(id, creation_ts, validity, promo_code_id_fk, status, user_language, event_id_fk, used_vat_percent, vat_included, currency_code, organization_id_fk, user_id_fk)" + - " values (:id, :creationTimestamp, :validity, :promotionCodeDiscountId, 'PENDING', :userLanguage, :eventId, :vatPercentage, :vatIncluded, :currencyCode, :organizationId, :userId)") + @Query(""" + insert into tickets_reservation(id, creation_ts, validity, promo_code_id_fk, status, user_language, event_id_fk, used_vat_percent, vat_included, currency_code, organization_id_fk, user_id_fk)\ + values (:id, :creationTimestamp, :validity, :promotionCodeDiscountId, 'PENDING', :userLanguage, :eventId, :vatPercentage, :vatIncluded, :currencyCode, :organizationId, :userId)\ + """) int createNewReservation(@Bind("id") String id, @Bind("creationTimestamp") ZonedDateTime creationTimestamp, @Bind("validity") Date validity, @@ -52,8 +54,10 @@ int createNewReservation(@Bind("id") String id, @Query("select * from tickets_reservation tr join ba_user u on u.id = tr.user_id_fk where u.username = :username") List loadByOwner(@Bind("username") String username); - @Query("update tickets_reservation set status = :status, full_name = :fullName, first_name = :firstName, last_name = :lastName, email_address = :email," + - " user_language = :userLanguage, billing_address = :billingAddress, confirmation_ts = :timestamp, payment_method = :paymentMethod, customer_reference = :customerReference where id = :reservationId") + @Query(""" + update tickets_reservation set status = :status, full_name = :fullName, first_name = :firstName, last_name = :lastName, email_address = :email,\ + user_language = :userLanguage, billing_address = :billingAddress, confirmation_ts = :timestamp, payment_method = :paymentMethod, customer_reference = :customerReference where id = :reservationId\ + """) int updateTicketReservation(@Bind("reservationId") String reservationId, @Bind("status") String status, @Bind("email") String email, @@ -66,8 +70,10 @@ int updateTicketReservation(@Bind("reservationId") String reservationId, @Bind("paymentMethod") String paymentMethod, @Bind("customerReference") String customerReference); - @Query("update tickets_reservation set validity = :validity, status = :status, payment_method = 'OFFLINE', full_name = :fullName, first_name = :firstName," + - " last_name = :lastName, email_address = :email, billing_address = :billingAddress, customer_reference = :customerReference where id = :reservationId") + @Query(""" + update tickets_reservation set validity = :validity, status = :status, payment_method = 'OFFLINE', full_name = :fullName, first_name = :firstName,\ + last_name = :lastName, email_address = :email, billing_address = :billingAddress, customer_reference = :customerReference where id = :reservationId\ + """) int postponePayment(@Bind("reservationId") String reservationId, @Bind("status") TicketReservation.TicketReservationStatus status, @Bind("validity") Date validity, @Bind("email") String email, @Bind("fullName") String fullName, @Bind("firstName") String firstName, @Bind("lastName") String lastName, @Bind("billingAddress") String billingAddress, @@ -149,9 +155,11 @@ int postponePayment(@Bind("reservationId") String reservationId, @Bind("status") int setInvoiceNumber(@Bind("reservationId") String reservationId, @Bind("invoiceNumber") String invoiceNumber); - @Query("update tickets_reservation set vat_status = :vatStatus, src_price_cts = :srcPriceCts, " + - " final_price_cts = :finalPriceCts, vat_cts = :vatCts, discount_cts = :discountCts, currency_code = :currencyCode, " + - " vat_nr = :vatNr, vat_country = :vatCountry, invoice_requested = :invoiceRequested where id = :reservationId") + @Query(""" + update tickets_reservation set vat_status = :vatStatus, src_price_cts = :srcPriceCts, \ + final_price_cts = :finalPriceCts, vat_cts = :vatCts, discount_cts = :discountCts, currency_code = :currencyCode, \ + vat_nr = :vatNr, vat_country = :vatCountry, invoice_requested = :invoiceRequested where id = :reservationId\ + """) int updateBillingData(@Bind("vatStatus") PriceContainer.VatStatus vatStatus, @Bind("srcPriceCts") int srcPriceCts, @Bind("finalPriceCts") int finalPriceCts, @@ -170,18 +178,22 @@ int updateBillingData(@Bind("vatStatus") PriceContainer.VatStatus vatStatus, @Query("select min(creation_ts) from tickets_reservation where event_id_fk = :eventId") Optional getFirstReservationCreatedTimestampForEvent(@Bind("eventId") int eventId); - @Query("select to_char(date_trunc(:granularity, d.day), 'YYYY-MM-DD') as day, count(ticket.id) ticket_count " + - " from (select generate_series(lower(r), upper(r), '1 day')::date as day, generate_series(lower(r), upper(r), '1 day')::timestamp as ts from tsrange(:fromDate::timestamp, :toDate::timestamp) r) as d " + - " left join (select id, confirmation_ts from tickets_reservation where confirmation_ts is not null and event_id_fk = :eventId) res on date_trunc('day', res.confirmation_ts) = d.day" + - " left join ticket on event_id = :eventId and tickets_reservation_id = res.id"+ - " group by 1 order by 1") + @Query(""" + select to_char(date_trunc(:granularity, d.day), 'YYYY-MM-DD') as day, count(ticket.id) ticket_count \ + from (select generate_series(lower(r), upper(r), '1 day')::date as day, generate_series(lower(r), upper(r), '1 day')::timestamp as ts from tsrange(:fromDate::timestamp, :toDate::timestamp) r) as d \ + left join (select id, confirmation_ts from tickets_reservation where confirmation_ts is not null and event_id_fk = :eventId) res on date_trunc('day', res.confirmation_ts) = d.day\ + left join ticket on event_id = :eventId and tickets_reservation_id = res.id\ + group by 1 order by 1\ + """) List getSoldStatistic(@Bind("eventId") int eventId, @Bind("fromDate") ZonedDateTime from, @Bind("toDate") ZonedDateTime to, @Bind("granularity") String granularity); - @Query("select to_char(date_trunc(:granularity, d.day), 'YYYY-MM-DD') as day, count(ticket.id) ticket_count " + - " from (select generate_series(lower(r), upper(r), '1 day')::date as day, generate_series(lower(r), upper(r), '1 day')::timestamp as ts from tsrange(:fromDate::timestamp, :toDate::timestamp) r) as d " + - " left join (select id, creation_ts from tickets_reservation where event_id_fk = :eventId and status in ('IN_PAYMENT', 'EXTERNAL_PROCESSING_PAYMENT', 'OFFLINE_PAYMENT', 'DEFERRED_OFFLINE_PAYMENT', 'COMPLETE', 'STUCK')) res on date_trunc('day', res.creation_ts) = d.day " + - " left join ticket on event_id = :eventId and tickets_reservation_id = res.id"+ - " group by 1 order by 1") + @Query(""" + select to_char(date_trunc(:granularity, d.day), 'YYYY-MM-DD') as day, count(ticket.id) ticket_count \ + from (select generate_series(lower(r), upper(r), '1 day')::date as day, generate_series(lower(r), upper(r), '1 day')::timestamp as ts from tsrange(:fromDate::timestamp, :toDate::timestamp) r) as d \ + left join (select id, creation_ts from tickets_reservation where event_id_fk = :eventId and status in ('IN_PAYMENT', 'EXTERNAL_PROCESSING_PAYMENT', 'OFFLINE_PAYMENT', 'DEFERRED_OFFLINE_PAYMENT', 'COMPLETE', 'STUCK')) res on date_trunc('day', res.creation_ts) = d.day \ + left join ticket on event_id = :eventId and tickets_reservation_id = res.id\ + group by 1 order by 1\ + """) List getReservedStatistic(@Bind("eventId") int eventId, @Bind("fromDate") ZonedDateTime from, @Bind("toDate") ZonedDateTime to, @Bind("granularity") String granularity); @@ -192,20 +204,22 @@ int updateBillingData(@Bind("vatStatus") PriceContainer.VatStatus vatStatus, @Query("select * from tickets_reservation where id in (:ids)") List findByIds(@Bind("ids") Collection ids); - @Query("update tickets_reservation set full_name = :fullName, first_name = :firstName, last_name = :lastName, email_address = :email, " + - " billing_address = :completeBillingAddress, vat_country = :vatCountry, vat_nr = :vatNr, " + - " invoice_requested = :invoiceRequested, " + - " billing_address_company = :billingAddressCompany, " + - " billing_address_line1 = :billingAddressLine1, " + - " billing_address_line2 = :billingAddressLine2, " + - " billing_address_zip = :billingAddressZip, " + - " billing_address_city = :billingAddressCity, " + - " billing_address_state = :billingAddressState, " + - " add_company_billing_details = :addCompanyBillingDetails, " + - " skip_vat_nr = :skipVatNr, " + - " customer_reference = :customerReference, "+ - " validated_for_overview = :validated " + - " where id = :reservationId") + @Query(""" + update tickets_reservation set full_name = :fullName, first_name = :firstName, last_name = :lastName, email_address = :email, \ + billing_address = :completeBillingAddress, vat_country = :vatCountry, vat_nr = :vatNr, \ + invoice_requested = :invoiceRequested, \ + billing_address_company = :billingAddressCompany, \ + billing_address_line1 = :billingAddressLine1, \ + billing_address_line2 = :billingAddressLine2, \ + billing_address_zip = :billingAddressZip, \ + billing_address_city = :billingAddressCity, \ + billing_address_state = :billingAddressState, \ + add_company_billing_details = :addCompanyBillingDetails, \ + skip_vat_nr = :skipVatNr, \ + customer_reference = :customerReference, \ + validated_for_overview = :validated \ + where id = :reservationId\ + """) int updateTicketReservationWithValidation(@Bind("reservationId") String reservationId, @Bind("fullName") String fullName, @Bind("firstName") String firstName, @@ -227,10 +241,12 @@ int updateTicketReservationWithValidation(@Bind("reservationId") String reservat @Bind("validated") boolean validated); - @Query("select billing_address_company, billing_address_line1, billing_address_line2, " + - " billing_address_zip, billing_address_city, billing_address_state, validated_for_overview, skip_vat_nr, " + - " add_company_billing_details, invoicing_additional_information, vat_country, vat_nr " + - " from tickets_reservation where id = :id") + @Query(""" + select billing_address_company, billing_address_line1, billing_address_line2, \ + billing_address_zip, billing_address_city, billing_address_state, validated_for_overview, skip_vat_nr, \ + add_company_billing_details, invoicing_additional_information, vat_country, vat_nr \ + from tickets_reservation where id = :id\ + """) TicketReservationAdditionalInfo getAdditionalInfo(@Bind("id") String reservationId); @Query("select metadata from tickets_reservation where id = :id") @@ -246,9 +262,11 @@ int updateTicketReservationWithValidation(@Bind("reservationId") String reservat @Query("update tickets_reservation set validated_for_overview = :validated where id = :reservationId") int updateValidationStatus(@Bind("reservationId") String reservationId, @Bind("validated") boolean validated); - @Query("update tickets_reservation set invoice_requested = :invoiceRequested, vat_status = :vatStatus, src_price_cts = :srcPriceCts, " + - " final_price_cts = :finalPriceCts, vat_cts = :vatCts, discount_cts = :discountCts, currency_code = :currencyCode" + - " where id = :reservationId") + @Query(""" + update tickets_reservation set invoice_requested = :invoiceRequested, vat_status = :vatStatus, src_price_cts = :srcPriceCts, \ + final_price_cts = :finalPriceCts, vat_cts = :vatCts, discount_cts = :discountCts, currency_code = :currencyCode\ + where id = :reservationId\ + """) int resetVat(@Bind("reservationId") String reservationId, @Bind("invoiceRequested") boolean invoiceRequested, @Bind("vatStatus") PriceContainer.VatStatus vatStatus, @@ -267,8 +285,10 @@ default Integer countTicketsInReservationForCategories(String reservationId, Col } } - @Query("select count(b.id) from tickets_reservation a, ticket b where a.id = :reservationId and b.tickets_reservation_id = a.id" + - " and (b.category_id in (:categories))") + @Query(""" + select count(b.id) from tickets_reservation a, ticket b where a.id = :reservationId and b.tickets_reservation_id = a.id\ + and (b.category_id in (:categories))\ + """) Integer countTicketsInReservationForExistingCategories(@Bind("reservationId") String reservationId, @Bind("categories") Collection categories); @Query("select count(b.id) from tickets_reservation a, ticket b where a.id = :reservationId and b.tickets_reservation_id = a.id") diff --git a/src/main/java/alfio/repository/TicketSearchRepository.java b/src/main/java/alfio/repository/TicketSearchRepository.java index 42f8055fd1..8d09c85eec 100644 --- a/src/main/java/alfio/repository/TicketSearchRepository.java +++ b/src/main/java/alfio/repository/TicketSearchRepository.java @@ -34,14 +34,18 @@ @QueryRepository public interface TicketSearchRepository { - String BASE_FILTER = ":search is null or (lower(tr_id) like lower(:search) or lower(t_uuid) like lower(:search) or lower(t_full_name) like lower(:search) or lower(t_first_name) like lower(:search) or lower(t_last_name) like lower(:search) or lower(t_email_address) like lower(:search) or " + - " lower(tr_full_name) like lower(:search) or lower(tr_first_name) like lower(:search) or lower(tr_last_name) like lower(:search) or lower(tr_email_address) like lower(:search) or lower(tr_customer_reference) like lower(:search) " + - " or (tr_invoice_number is not null and lower(tr_invoice_number) like lower(:search)) )"; + String BASE_FILTER = """ + :search is null or (lower(tr_id) like lower(:search) or lower(t_uuid) like lower(:search) or lower(t_full_name) like lower(:search) or lower(t_first_name) like lower(:search) or lower(t_last_name) like lower(:search) or lower(t_email_address) like lower(:search) or \ + lower(tr_full_name) like lower(:search) or lower(tr_first_name) like lower(:search) or lower(tr_last_name) like lower(:search) or lower(tr_email_address) like lower(:search) or lower(tr_customer_reference) like lower(:search) \ + or (tr_invoice_number is not null and lower(tr_invoice_number) like lower(:search)) )\ + """; String APPLY_FILTER = " (" + BASE_FILTER + " or lower(promo_code) like lower(:search) or lower(special_price_token) like lower(:search)) "; - String APPLY_FILTER_SUBSCRIPTION = " (:search is null or (lower(tr_id) like lower(:search) or lower(s_id::text) like lower(:search) or lower(s_first_name) like lower(:search) or lower(s_last_name) like lower(:search) or lower(s_email_address) like lower(:search) " + - " or lower(tr_first_name) like lower(:search) or lower(tr_last_name) like lower(:search) or lower(tr_email_address) like lower(:search) or lower(tr_customer_reference) like lower(:search) or lower(promo_code) like lower(:search) )) "; + String APPLY_FILTER_SUBSCRIPTION = """ + (:search is null or (lower(tr_id) like lower(:search) or lower(s_id::text) like lower(:search) or lower(s_first_name) like lower(:search) or lower(s_last_name) like lower(:search) or lower(s_email_address) like lower(:search) \ + or lower(tr_first_name) like lower(:search) or lower(tr_last_name) like lower(:search) or lower(tr_email_address) like lower(:search) or lower(tr_customer_reference) like lower(:search) or lower(promo_code) like lower(:search) )) \ + """; String FIND_ALL_MODIFIED_TICKETS_WITH_RESERVATION_AND_TRANSACTION = "select * from reservation_and_ticket_and_tx where t_id is not null and t_status in ('PENDING', 'ACQUIRED', 'TO_BE_PAID', 'CANCELLED', 'CHECKED_IN') and t_category_id = :categoryId and t_event_id = :eventId and " + APPLY_FILTER; @@ -53,18 +57,22 @@ public interface TicketSearchRepository { String FIND_ALL_SUBSCRIPTION_INCLUDING_NEW = "select * from reservation_and_subscription_and_tx where s_descriptor_id = :subscriptionDescriptorId::uuid and tr_id is not null and tr_status in (:status) and " + APPLY_FILTER_SUBSCRIPTION; - String RESERVATION_FIELDS = "tr_id id, tr_validity validity, tr_status status, tr_full_name full_name, tr_first_name first_name, tr_last_name last_name, tr_email_address email_address," + - "tr_billing_address billing_address, tr_confirmation_ts confirmation_ts, tr_latest_reminder_ts latest_reminder_ts, tr_payment_method payment_method," + - "tr_offline_payment_reminder_sent offline_payment_reminder_sent, tr_promo_code_id_fk promo_code_id_fk, tr_automatic automatic," + - "tr_user_language user_language, tr_direct_assignment direct_assignment, tr_invoice_number invoice_number, tr_invoice_model invoice_model," + - "tr_vat_status vat_status, tr_vat_nr vat_nr, tr_vat_country vat_country, tr_invoice_requested invoice_requested, tr_used_vat_percent used_vat_percent," + - "tr_vat_included vat_included, tr_creation_ts creation_ts, tr_registration_ts registration_ts, tr_customer_reference customer_reference, tr_billing_address_company billing_address_company, tr_invoicing_additional_information invoicing_additional_information," + - "tr_src_price_cts src_price_cts, tr_final_price_cts final_price_cts, tr_vat_cts vat_cts, tr_discount_cts discount_cts, tr_currency_code currency_code "; - - String RESERVATION_SEARCH_FIELD = "tr_id, tr_validity, tr_status, tr_full_name, tr_first_name, tr_last_name, tr_email_address, tr_billing_address, tr_confirmation_ts, tr_latest_reminder_ts, tr_payment_method, tr_offline_payment_reminder_sent, tr_promo_code_id_fk," + - " tr_automatic, tr_user_language, tr_direct_assignment, tr_invoice_number, tr_invoice_model, tr_vat_status, tr_vat_nr, tr_vat_country, tr_invoice_requested, tr_used_vat_percent, tr_vat_included, tr_creation_ts, tr_registration_ts, tr_customer_reference," + - " tr_billing_address_company, tr_invoicing_additional_information, tr_billing_address_line1, tr_billing_address_line2, tr_billing_address_city, tr_billing_address_state, tr_billing_address_zip, tickets_count," + - " tr_src_price_cts, tr_final_price_cts, tr_vat_cts, tr_discount_cts, tr_currency_code "; + String RESERVATION_FIELDS = """ + tr_id id, tr_validity validity, tr_status status, tr_full_name full_name, tr_first_name first_name, tr_last_name last_name, tr_email_address email_address,\ + tr_billing_address billing_address, tr_confirmation_ts confirmation_ts, tr_latest_reminder_ts latest_reminder_ts, tr_payment_method payment_method,\ + tr_offline_payment_reminder_sent offline_payment_reminder_sent, tr_promo_code_id_fk promo_code_id_fk, tr_automatic automatic,\ + tr_user_language user_language, tr_direct_assignment direct_assignment, tr_invoice_number invoice_number, tr_invoice_model invoice_model,\ + tr_vat_status vat_status, tr_vat_nr vat_nr, tr_vat_country vat_country, tr_invoice_requested invoice_requested, tr_used_vat_percent used_vat_percent,\ + tr_vat_included vat_included, tr_creation_ts creation_ts, tr_registration_ts registration_ts, tr_customer_reference customer_reference, tr_billing_address_company billing_address_company, tr_invoicing_additional_information invoicing_additional_information,\ + tr_src_price_cts src_price_cts, tr_final_price_cts final_price_cts, tr_vat_cts vat_cts, tr_discount_cts discount_cts, tr_currency_code currency_code \ + """; + + String RESERVATION_SEARCH_FIELD = """ + tr_id, tr_validity, tr_status, tr_full_name, tr_first_name, tr_last_name, tr_email_address, tr_billing_address, tr_confirmation_ts, tr_latest_reminder_ts, tr_payment_method, tr_offline_payment_reminder_sent, tr_promo_code_id_fk,\ + tr_automatic, tr_user_language, tr_direct_assignment, tr_invoice_number, tr_invoice_model, tr_vat_status, tr_vat_nr, tr_vat_country, tr_invoice_requested, tr_used_vat_percent, tr_vat_included, tr_creation_ts, tr_registration_ts, tr_customer_reference,\ + tr_billing_address_company, tr_invoicing_additional_information, tr_billing_address_line1, tr_billing_address_line2, tr_billing_address_city, tr_billing_address_state, tr_billing_address_zip, tickets_count,\ + tr_src_price_cts, tr_final_price_cts, tr_vat_cts, tr_discount_cts, tr_currency_code \ + """; String TRANSACTION_FIELDS = "bt_id, bt_gtw_tx_id, bt_gtw_payment_id, bt_reservation_id, bt_t_timestamp, bt_price_cts, bt_currency, bt_description, bt_payment_proxy, bt_gtw_fee, bt_plat_fee, bt_status, bt_metadata"; diff --git a/src/main/java/alfio/repository/TransactionRepository.java b/src/main/java/alfio/repository/TransactionRepository.java index 3eba3c46ba..436c289d6e 100644 --- a/src/main/java/alfio/repository/TransactionRepository.java +++ b/src/main/java/alfio/repository/TransactionRepository.java @@ -33,11 +33,15 @@ public interface TransactionRepository { String SELECT_BY_RESERVATION_ID = "select * from b_transaction where reservation_id = :reservationId"; String SELECT_VALID_BY_RESERVATION_ID = SELECT_BY_RESERVATION_ID + " and status not in ('INVALID', 'OFFLINE_DISABLE_MATCH')"; - String UPDATE_TRANSACTION_BY_ID = "update b_transaction set gtw_tx_id = :gatewayTransactionId, gtw_payment_id = :paymentId, " + - "t_timestamp = :timestamp, plat_fee = :platformFee, gtw_fee = :gatewayFee, status = :status, metadata = to_json(:metadata::json) where id = :transactionId"; - - @Query("insert into b_transaction(gtw_tx_id, gtw_payment_id, reservation_id, t_timestamp, price_cts, currency, description, payment_proxy, plat_fee, gtw_fee, status, metadata) " + - "values(:transactionId, :paymentId, :reservationId, :timestamp, :priceInCents, :currency, :description, :paymentProxy, :platformFee, :gatewayFee, :status, to_json(:metadata::json))") + String UPDATE_TRANSACTION_BY_ID = """ + update b_transaction set gtw_tx_id = :gatewayTransactionId, gtw_payment_id = :paymentId, \ + t_timestamp = :timestamp, plat_fee = :platformFee, gtw_fee = :gatewayFee, status = :status, metadata = to_json(:metadata::json) where id = :transactionId\ + """; + + @Query(""" + insert into b_transaction(gtw_tx_id, gtw_payment_id, reservation_id, t_timestamp, price_cts, currency, description, payment_proxy, plat_fee, gtw_fee, status, metadata) \ + values(:transactionId, :paymentId, :reservationId, :timestamp, :priceInCents, :currency, :description, :paymentProxy, :platformFee, :gatewayFee, :status, to_json(:metadata::json))\ + """) int insert(@Bind("transactionId") String transactionId, @Bind("paymentId") String paymentId, @Bind("reservationId") String reservationId, @@ -90,8 +94,10 @@ int updateIfStatus(@Bind("transactionId") int id, @Query("delete from b_transaction where reservation_id in (:reservationIds)") int deleteForReservations(@Bind("reservationIds") List reservationIds); - @Query("update b_transaction set status = 'INVALID' where reservation_id = :reservationId and status <> 'COMPLETE' and " + - " (:paymentProxy is null or (:paymentProxy is not null and payment_proxy = :paymentProxy)) ") + @Query(""" + update b_transaction set status = 'INVALID' where reservation_id = :reservationId and status <> 'COMPLETE' and \ + (:paymentProxy is null or (:paymentProxy is not null and payment_proxy = :paymentProxy)) \ + """) int invalidateForReservation(@Bind("reservationId") String reservationId, @Bind("paymentProxy") String paymentProxy); @Query("delete from b_transaction where reservation_id in (:reservationIds) and status = :status") diff --git a/src/main/java/alfio/repository/audit/ScanAuditRepository.java b/src/main/java/alfio/repository/audit/ScanAuditRepository.java index fce7a42d31..c696672595 100644 --- a/src/main/java/alfio/repository/audit/ScanAuditRepository.java +++ b/src/main/java/alfio/repository/audit/ScanAuditRepository.java @@ -39,12 +39,14 @@ Integer insert(@Bind("ticketUuid") String ticketUuid, @Query("select * from scan_audit where event_id_fk = :eventId") List findAllForEvent(@Bind("eventId") int eventId); - @Query("select t.uuid t_uuid, jsonb_build_object('firstName', t.first_name, 'lastName', t.last_name, 'email', t.email_address, 'metadata', coalesce(t.metadata::jsonb#>'{metadataMap, general, attributes}', '{}')) attendee_data, jsonb_agg(jsonb_build_object('ticketUuid', sa.ticket_uuid, 'scanTimestamp', sa.scan_ts, 'username', sa.username, 'checkInStatus', sa.check_in_status, 'operation', sa.operation)) scans from ticket t\n" + - " join event e on t.event_id = e.id" + - " join scan_audit sa on e.id = sa.event_id_fk and t.uuid = sa.ticket_uuid" + - " where e.id = :eventId" + - " and t.status = 'CHECKED_IN'" + - " group by 1,2") + @Query(""" + select t.uuid t_uuid, jsonb_build_object('firstName', t.first_name, 'lastName', t.last_name, 'email', t.email_address, 'metadata', coalesce(t.metadata::jsonb#>'{metadataMap, general, attributes}', '{}')) attendee_data, jsonb_agg(jsonb_build_object('ticketUuid', sa.ticket_uuid, 'scanTimestamp', sa.scan_ts, 'username', sa.username, 'checkInStatus', sa.check_in_status, 'operation', sa.operation)) scans from ticket t + join event e on t.event_id = e.id\ + join scan_audit sa on e.id = sa.event_id_fk and t.uuid = sa.ticket_uuid\ + where e.id = :eventId\ + and t.status = 'CHECKED_IN'\ + group by 1,2\ + """) List loadEntries(@Bind("eventId") int eventId); } \ No newline at end of file diff --git a/src/main/java/alfio/repository/system/AdminJobQueueRepository.java b/src/main/java/alfio/repository/system/AdminJobQueueRepository.java index 38d285ce11..d1be2afc4d 100644 --- a/src/main/java/alfio/repository/system/AdminJobQueueRepository.java +++ b/src/main/java/alfio/repository/system/AdminJobQueueRepository.java @@ -48,9 +48,11 @@ int updateSchedule(@Bind("id") long id, int scheduleRetry(@Bind("id") long id, @Bind("requestTs") ZonedDateTime requestTs); - @Query("insert into admin_job_queue(job_name, request_ts, metadata, status, attempts, allow_duplicates)" + - " values(:jobName, :requestTs, to_json(:metadata::json), 'SCHEDULED', 1, :allowDuplicates)" + - " on conflict do nothing") + @Query(""" + insert into admin_job_queue(job_name, request_ts, metadata, status, attempts, allow_duplicates)\ + values(:jobName, :requestTs, to_json(:metadata::json), 'SCHEDULED', 1, :allowDuplicates)\ + on conflict do nothing\ + """) int schedule(@Bind("jobName") JobName jobName, @Bind("requestTs") ZonedDateTime requestTimestamp, @Bind("metadata") @JSONData Map metadata, diff --git a/src/main/java/alfio/repository/system/ConfigurationRepository.java b/src/main/java/alfio/repository/system/ConfigurationRepository.java index bc84724926..fba99f2b62 100644 --- a/src/main/java/alfio/repository/system/ConfigurationRepository.java +++ b/src/main/java/alfio/repository/system/ConfigurationRepository.java @@ -64,15 +64,19 @@ List getCategoriesWithFlag(@Bind("categories") List categories @Bind("flagName") String flagName, @Bind("flagValue") String flagValue); - @Query("insert into configuration_purchase_context (c_key, c_value, description, event_id_fk, organization_id_fk)" + - " select c_key, c_value, description, :targetEventId, :targetOrgId from configuration_purchase_context where event_id_fk = :srcEventId and organization_id_fk = :srcOrgId") + @Query(""" + insert into configuration_purchase_context (c_key, c_value, description, event_id_fk, organization_id_fk)\ + select c_key, c_value, description, :targetEventId, :targetOrgId from configuration_purchase_context where event_id_fk = :srcEventId and organization_id_fk = :srcOrgId\ + """) int copyEventConfiguration(@Bind("targetEventId") int targetEventId, @Bind("targetOrgId") int targetOrgId, @Bind("srcEventId") int srcEventId, @Bind("srcOrgId") int srcOrgId); - @Query("insert into configuration_ticket_category (c_key, c_value, description, event_id_fk, organization_id_fk, ticket_category_id_fk)" + - " select c_key, c_value, description, :targetEventId, :targetOrgId, :targetCategoryId from configuration_ticket_category where event_id_fk = :srcEventId and organization_id_fk = :srcOrgId and ticket_category_id_fk = :srcCategoryId") + @Query(""" + insert into configuration_ticket_category (c_key, c_value, description, event_id_fk, organization_id_fk, ticket_category_id_fk)\ + select c_key, c_value, description, :targetEventId, :targetOrgId, :targetCategoryId from configuration_ticket_category where event_id_fk = :srcEventId and organization_id_fk = :srcOrgId and ticket_category_id_fk = :srcCategoryId\ + """) int copyCategoryConfiguration(@Bind("targetEventId") int targetEventId, @Bind("targetOrgId") int targetOrgId, @Bind("targetCategoryId") int targetCategoryId, @@ -225,14 +229,18 @@ int insertSubscriptionDescriptorLevel(@Bind("orgId") int orgId, @Query("select c_value::jsonb from configuration where c_key = 'TRANSLATION_OVERRIDE' union all select '{}'::jsonb limit 1") @JSONData Map> getSystemOverrideMessages(); - @Query("select coalesce(jsonb_recursive_merge(a.c_value, b.c_value), '{}'::jsonb) from "+ - "(select c_value::jsonb from configuration where c_key = 'TRANSLATION_OVERRIDE' union all select '{}'::jsonb limit 1) a, "+ - "(select c_value::jsonb from configuration_organization where organization_id_fk = :orgId and c_key = 'TRANSLATION_OVERRIDE' union all select '{}'::jsonb limit 1) b") + @Query(""" + select coalesce(jsonb_recursive_merge(a.c_value, b.c_value), '{}'::jsonb) from \ + (select c_value::jsonb from configuration where c_key = 'TRANSLATION_OVERRIDE' union all select '{}'::jsonb limit 1) a, \ + (select c_value::jsonb from configuration_organization where organization_id_fk = :orgId and c_key = 'TRANSLATION_OVERRIDE' union all select '{}'::jsonb limit 1) b\ + """) @JSONData Map> getOrganizationOverrideMessages(@Bind("orgId") int orgId); - @Query("select coalesce(jsonb_recursive_merge(jsonb_recursive_merge(a.c_value, b.c_value), c.c_value), '{}'::jsonb) from "+ - "(select c_value::jsonb from configuration where c_key = 'TRANSLATION_OVERRIDE' union all select '{}'::jsonb limit 1) a, "+ - "(select c_value::jsonb from configuration_organization where organization_id_fk = :orgId and c_key = 'TRANSLATION_OVERRIDE' union all select '{}'::jsonb limit 1) b,"+ - "(select c_value::jsonb from configuration_purchase_context where organization_id_fk = :orgId and event_id_fk = :eventId and c_key = 'TRANSLATION_OVERRIDE' union all select '{}'::jsonb limit 1) c") + @Query(""" + select coalesce(jsonb_recursive_merge(jsonb_recursive_merge(a.c_value, b.c_value), c.c_value), '{}'::jsonb) from \ + (select c_value::jsonb from configuration where c_key = 'TRANSLATION_OVERRIDE' union all select '{}'::jsonb limit 1) a, \ + (select c_value::jsonb from configuration_organization where organization_id_fk = :orgId and c_key = 'TRANSLATION_OVERRIDE' union all select '{}'::jsonb limit 1) b,\ + (select c_value::jsonb from configuration_purchase_context where organization_id_fk = :orgId and event_id_fk = :eventId and c_key = 'TRANSLATION_OVERRIDE' union all select '{}'::jsonb limit 1) c\ + """) @JSONData Map> getEventOverrideMessages(@Bind("orgId") int orgId, @Bind("eventId") int eventId); } diff --git a/src/main/java/alfio/repository/user/OrganizationRepository.java b/src/main/java/alfio/repository/user/OrganizationRepository.java index ef1a5a7524..e2bec71139 100644 --- a/src/main/java/alfio/repository/user/OrganizationRepository.java +++ b/src/main/java/alfio/repository/user/OrganizationRepository.java @@ -44,8 +44,10 @@ public interface OrganizationRepository { @Query("SELECT id FROM organization where name = :name") int getIdByName(@Bind("name") String name); - @Query("INSERT INTO organization(name, description, email, name_openid, slug)" + - " VALUES (:name, :description, :email, :externalId, :slug)") + @Query(""" + INSERT INTO organization(name, description, email, name_openid, slug)\ + VALUES (:name, :description, :email, :externalId, :slug)\ + """) @AutoGeneratedKey("id") AffectedRowCountAndKey create(@Bind("name") String name, @Bind("description") String description, @@ -61,14 +63,18 @@ int update(@Bind("id") int id, @Bind("externalId") String externalId, @Bind("slug") String slug); - @Query("select * from ((select organization.* from organization inner join j_user_organization on org_id = organization.id where j_user_organization.user_id = (select ba_user.id from ba_user where ba_user.username = :username)) " + - " union " + - "(select * from organization where 'ROLE_ADMIN' in (select role from ba_user inner join authority on ba_user.username = authority.username where ba_user.username = :username))) as found_users order by found_users.name, id") + @Query(""" + select * from ((select organization.* from organization inner join j_user_organization on org_id = organization.id where j_user_organization.user_id = (select ba_user.id from ba_user where ba_user.username = :username)) \ + union \ + (select * from organization where 'ROLE_ADMIN' in (select role from ba_user inner join authority on ba_user.username = authority.username where ba_user.username = :username))) as found_users order by found_users.name, id\ + """) List findAllForUser(@Bind("username") String username); - @Query("(select organization.* from organization inner join j_user_organization on org_id = organization.id where j_user_organization.user_id = (select ba_user.id from ba_user where ba_user.username = :username) and organization.id = :orgId) " + - " union " + - "(select * from organization where 'ROLE_ADMIN' in (select role from ba_user inner join authority on ba_user.username = authority.username where ba_user.username = :username) and id = :orgId)") + @Query(""" + (select organization.* from organization inner join j_user_organization on org_id = organization.id where j_user_organization.user_id = (select ba_user.id from ba_user where ba_user.username = :username) and organization.id = :orgId) \ + union \ + (select * from organization where 'ROLE_ADMIN' in (select role from ba_user inner join authority on ba_user.username = authority.username where ba_user.username = :username) and id = :orgId)\ + """) Optional findOrganizationForUser(@Bind("username") String username, @Bind("orgId") int orgId); } diff --git a/src/main/java/alfio/repository/user/UserRepository.java b/src/main/java/alfio/repository/user/UserRepository.java index b9f348744d..71b4c18e26 100644 --- a/src/main/java/alfio/repository/user/UserRepository.java +++ b/src/main/java/alfio/repository/user/UserRepository.java @@ -70,16 +70,20 @@ default Optional nullSafeFindIdByUserName(String username) { @Query("select password from ba_user where username = :username and enabled = true") Optional findPasswordByUsername(@Bind("username") String username); - @Query("INSERT INTO ba_user(username, password, first_name, last_name, email_address, enabled, user_type, valid_to, description) VALUES" - + " (:username, :password, :first_name, :last_name, :email_address, :enabled, :userType, :validTo, :description)") + @Query(""" + INSERT INTO ba_user(username, password, first_name, last_name, email_address, enabled, user_type, valid_to, description) VALUES\ + (:username, :password, :first_name, :last_name, :email_address, :enabled, :userType, :validTo, :description)\ + """) @AutoGeneratedKey("id") AffectedRowCountAndKey create(@Bind("username") String username, @Bind("password") String password, @Bind("first_name") String firstname, @Bind("last_name") String lastname, @Bind("email_address") String emailAddress, @Bind("enabled") boolean enabled, @Bind("userType") User.Type userType, @Bind("validTo") ZonedDateTime validTo, @Bind("description") String description); - @Query("INSERT INTO ba_user(username, password, first_name, last_name, email_address, enabled, user_type) VALUES" - + " (:username, :password, :first_name, :last_name, :email_address, :enabled, 'PUBLIC') on conflict(username) do nothing") + @Query(""" + INSERT INTO ba_user(username, password, first_name, last_name, email_address, enabled, user_type) VALUES\ + (:username, :password, :first_name, :last_name, :email_address, :enabled, 'PUBLIC') on conflict(username) do nothing\ + """) int createPublicUserIfNotExists(@Bind("username") String username, @Bind("password") String password, @Bind("first_name") String firstname, @@ -115,20 +119,22 @@ int update(@Bind("id") int id, @Bind("username") String username, @Bind("firstNa @Query("delete from authority where username = (select username from ba_user where id = :id)") int deleteUserFromAuthority(@Bind("id") int id); - @Query("insert into user_profile (user_id_fk, billing_address_company, billing_address_line1, billing_address_line2, billing_address_zip," + - "billing_address_city, billing_address_state, vat_country, vat_nr, invoicing_additional_information, additional_fields)" + - " values (:userId, :company, :line1, :line2, :zip, :city, :state, :country, :taxId, :invoiceInfo::jsonb, :addFields::jsonb)" + - " on conflict (user_id_fk) do update set " + - " billing_address_company = EXCLUDED.billing_address_company," + - " billing_address_line1 = EXCLUDED.billing_address_line1," + - " billing_address_line2 = EXCLUDED.billing_address_line2," + - " billing_address_zip = EXCLUDED.billing_address_zip," + - " billing_address_city = EXCLUDED.billing_address_city," + - " billing_address_state = EXCLUDED.billing_address_state," + - " vat_country = EXCLUDED.vat_country," + - " vat_nr = EXCLUDED.vat_nr," + - " invoicing_additional_information = EXCLUDED.invoicing_additional_information::jsonb," + - " additional_fields = EXCLUDED.additional_fields::jsonb") + @Query(""" + insert into user_profile (user_id_fk, billing_address_company, billing_address_line1, billing_address_line2, billing_address_zip,\ + billing_address_city, billing_address_state, vat_country, vat_nr, invoicing_additional_information, additional_fields)\ + values (:userId, :company, :line1, :line2, :zip, :city, :state, :country, :taxId, :invoiceInfo::jsonb, :addFields::jsonb)\ + on conflict (user_id_fk) do update set \ + billing_address_company = EXCLUDED.billing_address_company,\ + billing_address_line1 = EXCLUDED.billing_address_line1,\ + billing_address_line2 = EXCLUDED.billing_address_line2,\ + billing_address_zip = EXCLUDED.billing_address_zip,\ + billing_address_city = EXCLUDED.billing_address_city,\ + billing_address_state = EXCLUDED.billing_address_state,\ + vat_country = EXCLUDED.vat_country,\ + vat_nr = EXCLUDED.vat_nr,\ + invoicing_additional_information = EXCLUDED.invoicing_additional_information::jsonb,\ + additional_fields = EXCLUDED.additional_fields::jsonb\ + """) int persistUserProfile(@Bind("userId") int userId, @Bind("company") String companyName, @Bind("line1") String addressLine1, diff --git a/src/main/java/alfio/util/ExportUtils.java b/src/main/java/alfio/util/ExportUtils.java index ab3732894d..b4832f94f3 100644 --- a/src/main/java/alfio/util/ExportUtils.java +++ b/src/main/java/alfio/util/ExportUtils.java @@ -19,20 +19,18 @@ import ch.digitalfondue.basicxlsx.Cell; import ch.digitalfondue.basicxlsx.StreamingWorkbook; import ch.digitalfondue.basicxlsx.Style; -import com.opencsv.CSVWriter; +import com.fasterxml.jackson.dataformat.csv.CsvMapper; +import com.fasterxml.jackson.dataformat.csv.CsvSchema; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.io.OutputStreamWriter; import java.util.Arrays; import java.util.function.Consumer; import java.util.stream.Collectors; import java.util.stream.Stream; -import static java.nio.charset.StandardCharsets.UTF_8; - public class ExportUtils { private static final int[] BOM_MARKERS = new int[] {0xEF, 0xBB, 0xBF}; @@ -93,18 +91,25 @@ public static void exportCsv(String fileName, String[] header, Stream response.setHeader("Content-Disposition", "attachment; filename=" + fileName); markAsNoIndex(response); - try (ServletOutputStream out = response.getOutputStream(); CSVWriter writer = new CSVWriter(new OutputStreamWriter(out, UTF_8))) { + var headerBuilder = CsvSchema.builder().setUseHeader(true).setQuoteChar('"'); + Arrays.stream(header).forEach(headerBuilder::addColumn); + + try (ServletOutputStream out = response.getOutputStream()) { for (int marker : ExportUtils.BOM_MARKERS) { out.write(marker); } - writer.writeNext(header); + var writer = new CsvMapper().writer().with(headerBuilder.build()).writeValues(out); data.forEachOrdered(d -> { var copy = Arrays.copyOf(d, d.length); for (var i = 0; i < copy.length; i++) { var res = copy[i]; copy[i] = escapeFormulaChar(res); } - writer.writeNext(copy); + try { + writer.write(copy); + } catch (IOException e) { + throw new RuntimeException(e); + } }); writer.flush(); out.flush(); diff --git a/src/main/java/alfio/util/FileUtil.java b/src/main/java/alfio/util/FileUtil.java index 410b2c8cb1..2d6cadcb76 100644 --- a/src/main/java/alfio/util/FileUtil.java +++ b/src/main/java/alfio/util/FileUtil.java @@ -18,7 +18,7 @@ import alfio.model.BillingDocument; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; diff --git a/src/main/java/alfio/util/MustacheCustomTag.java b/src/main/java/alfio/util/MustacheCustomTag.java index d2dee113fd..e6765401c1 100644 --- a/src/main/java/alfio/util/MustacheCustomTag.java +++ b/src/main/java/alfio/util/MustacheCustomTag.java @@ -248,8 +248,7 @@ private static Pair> parseParams(String r) { private static class TargetBlankProvider implements AttributeProvider { @Override public void setAttributes(Node node, String tagName, Map attributes) { - if (node instanceof Link) { - Link l = (Link) node; + if (node instanceof Link l) { String destination = StringUtils.trimToEmpty(l.getDestination()); var scheme = getScheme(destination); scheme.ifPresent(resolvedScheme -> { diff --git a/src/main/java/alfio/util/RequestUtils.java b/src/main/java/alfio/util/RequestUtils.java index 062d43f9d4..47a8275e8b 100644 --- a/src/main/java/alfio/util/RequestUtils.java +++ b/src/main/java/alfio/util/RequestUtils.java @@ -27,8 +27,8 @@ import org.springframework.security.core.GrantedAuthority; import org.springframework.web.context.request.ServletWebRequest; -import javax.servlet.ServletInputStream; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.ServletInputStream; +import jakarta.servlet.http.HttpServletRequest; import java.nio.charset.StandardCharsets; import java.security.Principal; import java.util.*; @@ -81,8 +81,8 @@ public static Locale getMatchingLocale(ServletWebRequest request, Event event) { } public static boolean isAdmin(Principal principal) { - if (principal instanceof Authentication) { - return hasRole((Authentication) principal, "ROLE_ADMIN"); + if (principal instanceof Authentication authentication) { + return hasRole(authentication, "ROLE_ADMIN"); } return false; } @@ -94,8 +94,8 @@ private static boolean hasRole(Authentication principal, String role) { } public static boolean isSystemApiKey(Principal principal) { - if (principal instanceof Authentication) { - return hasRole((Authentication)principal, "ROLE_SYSTEM_API_CLIENT"); + if (principal instanceof Authentication authentication) { + return hasRole(authentication, "ROLE_SYSTEM_API_CLIENT"); } return false; } diff --git a/src/main/java/alfio/util/SqlUtils.java b/src/main/java/alfio/util/SqlUtils.java index 384a94a5ef..a6a2575edc 100644 --- a/src/main/java/alfio/util/SqlUtils.java +++ b/src/main/java/alfio/util/SqlUtils.java @@ -32,8 +32,8 @@ private SqlUtils() { public static Optional findServerError(UncategorizedSQLException exception) { for (var throwable : exception.getSQLException()) { - if(throwable instanceof PSQLException && ((PSQLException)throwable).getServerErrorMessage() != null) { - return Optional.ofNullable(((PSQLException)throwable).getServerErrorMessage()); + if(throwable instanceof PSQLException lException && lException.getServerErrorMessage() != null) { + return Optional.ofNullable(lException.getServerErrorMessage()); } } return Optional.empty(); diff --git a/src/main/java/alfio/util/TemplateManager.java b/src/main/java/alfio/util/TemplateManager.java index cbae0e8f74..02b192153c 100644 --- a/src/main/java/alfio/util/TemplateManager.java +++ b/src/main/java/alfio/util/TemplateManager.java @@ -100,8 +100,8 @@ public TemplateManager(MessageSourceManager messageSourceManager, } private static String dateFormatter(Object o) { - if(o instanceof ZonedDateTime) { - return DateTimeFormatter.ISO_ZONED_DATE_TIME.format((ZonedDateTime) o); + if(o instanceof ZonedDateTime time) { + return DateTimeFormatter.ISO_ZONED_DATE_TIME.format(time); } return String.valueOf(o); } diff --git a/src/main/java/alfio/util/Validator.java b/src/main/java/alfio/util/Validator.java index b13a0928d3..cae94de252 100644 --- a/src/main/java/alfio/util/Validator.java +++ b/src/main/java/alfio/util/Validator.java @@ -33,7 +33,7 @@ import alfio.model.result.Result; import alfio.model.result.ValidationResult; import lombok.RequiredArgsConstructor; -import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.springframework.validation.BindingResult; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index d77b7363ae..e05f53d2dc 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,4 +2,7 @@ server.forward-headers-strategy=native server.servlet.session.cookie.http-only=true server.servlet.session.timeout=2h server.compression.enabled=true -server.shutdown=graceful \ No newline at end of file +server.shutdown=graceful +spring.application.name=Alf.io +logging.level.root=warn +logging.level.alfio=info diff --git a/src/main/resources/log4j2-stdout.xml b/src/main/resources/log4j2-stdout.xml deleted file mode 100644 index 063c33e8fc..0000000000 --- a/src/main/resources/log4j2-stdout.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml deleted file mode 100644 index 79d5830656..0000000000 --- a/src/main/resources/log4j2.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - logs - - - - - - - - [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/test/java/alfio/BaseTestConfiguration.java b/src/test/java/alfio/BaseTestConfiguration.java index cf13a5aae6..1dd8eca02d 100644 --- a/src/test/java/alfio/BaseTestConfiguration.java +++ b/src/test/java/alfio/BaseTestConfiguration.java @@ -27,8 +27,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.stripe.Stripe; import com.zaxxer.hikari.HikariConfig; +import jakarta.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitialization; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; @@ -37,7 +39,6 @@ import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.PostgreSQLContainer; -import javax.annotation.PostConstruct; import java.io.ByteArrayOutputStream; import java.io.PrintWriter; import java.net.http.HttpClient; @@ -69,6 +70,7 @@ public PlatformProvider getCloudProvider() { private static GenericContainer stripeMock; @Bean + @DependsOnDatabaseInitialization @Profile("!travis") public RefreshableDataSource dataSource() { String postgresVersion = Objects.requireNonNullElse(System.getProperty("pgsql.version"), "10"); diff --git a/src/test/java/alfio/controller/IndexControllerTest.java b/src/test/java/alfio/controller/IndexControllerTest.java index 06c1eb7d39..d6e906aaa7 100644 --- a/src/test/java/alfio/controller/IndexControllerTest.java +++ b/src/test/java/alfio/controller/IndexControllerTest.java @@ -29,8 +29,8 @@ import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.web.context.request.ServletWebRequest; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpSession; import java.time.ZonedDateTime; import java.util.List; import java.util.Map; diff --git a/src/test/java/alfio/controller/api/CheckRestApiStability.java b/src/test/java/alfio/controller/api/CheckRestApiStability.java index 54c17288bd..07a503b524 100644 --- a/src/test/java/alfio/controller/api/CheckRestApiStability.java +++ b/src/test/java/alfio/controller/api/CheckRestApiStability.java @@ -25,10 +25,11 @@ import org.junit.jupiter.api.Test; import org.openapitools.openapidiff.core.OpenApiCompare; import org.openapitools.openapidiff.core.output.MarkdownRender; -import org.springdoc.core.Constants; -import org.springdoc.core.SpringDocConfigProperties; -import org.springdoc.core.SpringDocConfiguration; -import org.springdoc.webmvc.core.SpringDocWebMvcConfiguration; + +import org.springdoc.core.configuration.SpringDocConfiguration; +import org.springdoc.core.properties.SpringDocConfigProperties; +import org.springdoc.core.utils.Constants; +import org.springdoc.webmvc.core.configuration.SpringDocWebMvcConfiguration; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; @@ -41,11 +42,11 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.web.servlet.MockMvc; -import java.io.FileReader; -import java.io.StringReader; +import java.io.*; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; +import java.util.Base64; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -79,7 +80,9 @@ void checkRestApiStability() throws Exception { .andReturn(); var response = mvcResult.getResponse(); - var descriptor = response.getContentAsString(); + var content = response.getContentAsString(); + // for some reason we get a quoted base64 JSON: "ey..." + var descriptor = Base64.getDecoder().decode(content.substring(1, content.length() - 1)); // for generating the result if (updateDescriptor) { @@ -90,10 +93,12 @@ void checkRestApiStability() throws Exception { } var referenceDescriptor = IOUtils.toString(new FileReader(DESCRIPTOR_JSON_PATH)); - var currentDescriptor = IOUtils.toString(new StringReader(descriptor)); + var currentDescriptor = IOUtils.toString(descriptor, StandardCharsets.UTF_8.toString()); var compareResult = OpenApiCompare.fromContents(referenceDescriptor, currentDescriptor); if (compareResult.isDifferent()) { - Assertions.fail(new MarkdownRender().render(compareResult)); + var out = new ByteArrayOutputStream(); + new MarkdownRender().render(compareResult, new OutputStreamWriter(out)); + Assertions.fail(out.toString(StandardCharsets.UTF_8)); } } @@ -104,7 +109,7 @@ public static class DisableSecurity { @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { - return http.authorizeRequests((auth) -> auth.antMatchers("/**").permitAll()).build(); + return http.authorizeHttpRequests((auth) -> auth.requestMatchers("/**").permitAll()).build(); } } } diff --git a/src/test/java/alfio/controller/api/admin/EventApiControllerIntegrationTest.java b/src/test/java/alfio/controller/api/admin/EventApiControllerIntegrationTest.java index 8c250ae5f2..3328cf3b66 100644 --- a/src/test/java/alfio/controller/api/admin/EventApiControllerIntegrationTest.java +++ b/src/test/java/alfio/controller/api/admin/EventApiControllerIntegrationTest.java @@ -38,11 +38,9 @@ import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; -import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; import java.security.Principal; diff --git a/src/test/java/alfio/controller/api/v2/user/reservation/BaseReservationFlowTest.java b/src/test/java/alfio/controller/api/v2/user/reservation/BaseReservationFlowTest.java index 605f9192f4..da734e19e8 100644 --- a/src/test/java/alfio/controller/api/v2/user/reservation/BaseReservationFlowTest.java +++ b/src/test/java/alfio/controller/api/v2/user/reservation/BaseReservationFlowTest.java @@ -58,16 +58,22 @@ import ch.digitalfondue.jfiveparse.Element; import ch.digitalfondue.jfiveparse.Parser; import ch.digitalfondue.jfiveparse.Selector; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.MappingIterator; +import com.fasterxml.jackson.dataformat.csv.CsvMapper; +import com.fasterxml.jackson.dataformat.csv.CsvParser; +import com.fasterxml.jackson.dataformat.csv.CsvSchema; import com.google.zxing.BinaryBitmap; import com.google.zxing.DecodeHintType; import com.google.zxing.client.j2se.BufferedImageLuminanceSource; import com.google.zxing.common.HybridBinarizer; import com.google.zxing.qrcode.QRCodeReader; -import com.opencsv.CSVReader; import lombok.RequiredArgsConstructor; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.IOUtils; +import org.apache.commons.io.input.BOMInputStream; +import org.apache.commons.lang3.StringUtils; import org.junit.jupiter.api.Assertions; import org.mockito.Mockito; import org.slf4j.Logger; @@ -1268,15 +1274,34 @@ protected void testBasicFlow(Supplier contextSupplier) t MockHttpServletResponse response = new MockHttpServletResponse(); eventApiController.downloadSponsorScanExport(context.event.getShortName(), "csv", response, principal); response.getContentAsString(); - CSVReader csvReader = new CSVReader(new StringReader(response.getContentAsString())); - List csvSponsorScan = csvReader.readAll(); - assertEquals(2, csvSponsorScan.size()); - assertEquals("sponsor", csvSponsorScan.get(1)[0]); - assertEquals("Test Testson", csvSponsorScan.get(1)[3]); - assertEquals("testmctest@test.com", csvSponsorScan.get(1)[4]); - assertEquals("", csvSponsorScan.get(1)[8]); - assertEquals(SponsorScan.LeadStatus.WARM.name(), csvSponsorScan.get(1)[9]); - assertEquals(AttendeeManager.DEFAULT_OPERATOR_ID, csvSponsorScan.get(1)[10]); + var schema = CsvSchema.builder().setUseHeader(true).setQuoteChar('"').build(); + var mapper = new CsvMapper(); + record SponsorScanRecord( + @JsonProperty("Username/Api Key") String username, + @JsonProperty("Description") String description, + @JsonProperty("Timestamp") String timestamp, + @JsonProperty("Full name") String fullName, + @JsonProperty("Email") String email, + @JsonProperty("field1") String field1, + @JsonProperty("field2") String field2, + @JsonProperty("field3") String field3, + @JsonProperty("Sponsor notes") String notes, + @JsonProperty("Lead Status") SponsorScan.LeadStatus leadStatus, + @JsonProperty("Operator") String operator + ) {} + + MappingIterator values = mapper.readerFor(SponsorScanRecord.class) + .with(schema) + .readValues(BOMInputStream.builder().setReader(new StringReader(response.getContentAsString())).get()); + + List csvSponsorScan = values.readAll(); + assertEquals(1, csvSponsorScan.size()); + assertEquals("sponsor", csvSponsorScan.get(0).username); + assertEquals("Test Testson", csvSponsorScan.get(0).fullName); + assertEquals("testmctest@test.com", csvSponsorScan.get(0).email); + assertEquals("", csvSponsorScan.get(0).notes); + assertEquals(SponsorScan.LeadStatus.WARM, csvSponsorScan.get(0).leadStatus); + assertEquals(AttendeeManager.DEFAULT_OPERATOR_ID, csvSponsorScan.get(0).operator); // // check update notes @@ -1288,35 +1313,39 @@ protected void testBasicFlow(Supplier contextSupplier) t assertEquals(1, requireNonNull(scannedBadges).size()); response = new MockHttpServletResponse(); eventApiController.downloadSponsorScanExport(context.event.getShortName(), "csv", response, principal); - csvReader = new CSVReader(new StringReader(response.getContentAsString())); - csvSponsorScan = csvReader.readAll(); - assertEquals(2, csvSponsorScan.size()); - assertEquals("sponsor", csvSponsorScan.get(1)[0]); - assertEquals("Test Testson", csvSponsorScan.get(1)[3]); - assertEquals("testmctest@test.com", csvSponsorScan.get(1)[4]); - assertEquals("this is a very good lead!", csvSponsorScan.get(1)[8]); - assertEquals(SponsorScan.LeadStatus.HOT.name(), csvSponsorScan.get(1)[9]); - assertEquals(AttendeeManager.DEFAULT_OPERATOR_ID, csvSponsorScan.get(1)[10]); + values = mapper.readerFor(SponsorScanRecord.class) + .with(schema) + .readValues(BOMInputStream.builder().setReader(new StringReader(response.getContentAsString())).get()); + csvSponsorScan = values.readAll(); + assertEquals(1, csvSponsorScan.size()); + assertEquals("sponsor", csvSponsorScan.get(0).username); + assertEquals("Test Testson", csvSponsorScan.get(0).fullName); + assertEquals("testmctest@test.com", csvSponsorScan.get(0).email); + assertEquals("this is a very good lead!", csvSponsorScan.get(0).notes); + assertEquals(SponsorScan.LeadStatus.HOT, csvSponsorScan.get(0).leadStatus); + assertEquals(AttendeeManager.DEFAULT_OPERATOR_ID, csvSponsorScan.get(0).operator); // scan from a different operator response = new MockHttpServletResponse(); assertEquals(CheckInStatus.SUCCESS, attendeeApiController.scanBadge(new AttendeeApiController.SponsorScanRequest(eventName, ticketwc.getUuid(), null, null, null), sponsorPrincipal, "OP2").getBody().getResult().getStatus()); eventApiController.downloadSponsorScanExport(context.event.getShortName(), "csv", response, principal); - csvReader = new CSVReader(new StringReader(response.getContentAsString())); - csvSponsorScan = csvReader.readAll(); - assertEquals(3, csvSponsorScan.size()); - assertEquals("sponsor", csvSponsorScan.get(1)[0]); - assertEquals("Test Testson", csvSponsorScan.get(1)[3]); - assertEquals("testmctest@test.com", csvSponsorScan.get(1)[4]); - assertEquals("this is a very good lead!", csvSponsorScan.get(1)[8]); - assertEquals(SponsorScan.LeadStatus.HOT.name(), csvSponsorScan.get(1)[9]); - assertEquals(AttendeeManager.DEFAULT_OPERATOR_ID, csvSponsorScan.get(1)[10]); - - assertEquals("sponsor", csvSponsorScan.get(2)[0]); - assertEquals("Test Testson", csvSponsorScan.get(2)[3]); - assertEquals("testmctest@test.com", csvSponsorScan.get(2)[4]); - assertEquals("", csvSponsorScan.get(2)[8]); - assertEquals("OP2", csvSponsorScan.get(2)[10]); + values = mapper.readerFor(SponsorScanRecord.class) + .with(schema) + .readValues(BOMInputStream.builder().setReader(new StringReader(response.getContentAsString())).get()); + csvSponsorScan = values.readAll(); + assertEquals(2, csvSponsorScan.size()); + assertEquals("sponsor", csvSponsorScan.get(0).username); + assertEquals("Test Testson", csvSponsorScan.get(0).fullName); + assertEquals("testmctest@test.com", csvSponsorScan.get(0).email); + assertEquals("this is a very good lead!", csvSponsorScan.get(0).notes); + assertEquals(SponsorScan.LeadStatus.HOT, csvSponsorScan.get(0).leadStatus); + assertEquals(AttendeeManager.DEFAULT_OPERATOR_ID, csvSponsorScan.get(0).operator); + + assertEquals("sponsor", csvSponsorScan.get(1).username); + assertEquals("Test Testson", csvSponsorScan.get(1).fullName); + assertEquals("testmctest@test.com", csvSponsorScan.get(1).email); + assertEquals("", csvSponsorScan.get(1).notes); + assertEquals("OP2", csvSponsorScan.get(1).operator); // #742 - test multiple check-ins diff --git a/src/test/java/alfio/extension/ScriptingExecutionServiceTest.java b/src/test/java/alfio/extension/ScriptingExecutionServiceTest.java index 250af539bc..7dee3064d9 100644 --- a/src/test/java/alfio/extension/ScriptingExecutionServiceTest.java +++ b/src/test/java/alfio/extension/ScriptingExecutionServiceTest.java @@ -37,7 +37,6 @@ import java.util.function.Supplier; import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.startsWith; import static org.mockito.Mockito.*; diff --git a/src/test/java/alfio/manager/AccessServiceIntegrationTest.java b/src/test/java/alfio/manager/AccessServiceIntegrationTest.java index bce05d9ac4..d0f3733fdb 100644 --- a/src/test/java/alfio/manager/AccessServiceIntegrationTest.java +++ b/src/test/java/alfio/manager/AccessServiceIntegrationTest.java @@ -46,6 +46,7 @@ import org.springframework.session.security.SpringSessionBackedSessionRegistry; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; +import org.springframework.web.servlet.handler.HandlerMappingIntrospector; import javax.sql.DataSource; import java.security.Principal; @@ -63,6 +64,11 @@ static class AdHocMvcConfiguration { public SpringSessionBackedSessionRegistry sessionRegistry(FindByIndexNameSessionRepository sessionRepository) { return new SpringSessionBackedSessionRegistry<>(sessionRepository); } + + @Bean + public HandlerMappingIntrospector mvcHandlerMappingIntrospector() { + return new HandlerMappingIntrospector(); + } } diff --git a/src/test/java/alfio/manager/DemoModeDataManagerIntegrationTest.java b/src/test/java/alfio/manager/DemoModeDataManagerIntegrationTest.java index 7032ac602a..c5ba04abd7 100644 --- a/src/test/java/alfio/manager/DemoModeDataManagerIntegrationTest.java +++ b/src/test/java/alfio/manager/DemoModeDataManagerIntegrationTest.java @@ -33,12 +33,10 @@ import org.apache.commons.lang3.time.DateUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.jupiter.SpringExtension; +import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; @@ -54,8 +52,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -@ExtendWith(SpringExtension.class) -@ContextConfiguration(classes = {DataSourceConfiguration.class, TestConfiguration.class}) +@SpringJUnitConfig(classes = {DataSourceConfiguration.class, TestConfiguration.class}) @ActiveProfiles({Initializer.PROFILE_DEV, Initializer.PROFILE_DISABLE_JOBS, Initializer.PROFILE_INTEGRATION_TEST, Initializer.PROFILE_DEMO}) @Transactional class DemoModeDataManagerIntegrationTest extends BaseIntegrationTest { diff --git a/src/test/java/alfio/manager/EventManagerCategoriesTest.java b/src/test/java/alfio/manager/EventManagerCategoriesTest.java index 1da4eb0ce8..a55ead4172 100644 --- a/src/test/java/alfio/manager/EventManagerCategoriesTest.java +++ b/src/test/java/alfio/manager/EventManagerCategoriesTest.java @@ -58,7 +58,7 @@ void init() { EventRepository eventRepository = mock(EventRepository.class); event = mock(Event.class); when(event.getId()).thenReturn(eventId); - eventManager = new EventManager(null, eventRepository, null, ticketCategoryRepository, ticketCategoryDescriptionRepository, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, clockProvider(), mock(SubscriptionRepository.class), null); + eventManager = new EventManager(null, eventRepository, null, ticketCategoryRepository, ticketCategoryDescriptionRepository, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, clockProvider(), mock(SubscriptionRepository.class), null); when(eventRepository.countExistingTickets(0)).thenReturn(availableSeats); when(event.getZoneId()).thenReturn(ZoneId.systemDefault()); } diff --git a/src/test/java/alfio/manager/EventManagerCheckInConfigurationTest.java b/src/test/java/alfio/manager/EventManagerCheckInConfigurationTest.java index e6331e4a00..a8ef832d43 100644 --- a/src/test/java/alfio/manager/EventManagerCheckInConfigurationTest.java +++ b/src/test/java/alfio/manager/EventManagerCheckInConfigurationTest.java @@ -50,7 +50,7 @@ void init() { when(event.getOrganizationId()).thenReturn(1); configurationManager = mock(ConfigurationManager.class); configurationRepository = mock(ConfigurationRepository.class); - eventManager = new EventManager(null, null, null, null, null, null, null, null, configurationManager, null, null, null, null, null, null, null, null, null, null, configurationRepository, null, TestUtil.clockProvider(), mock(SubscriptionRepository.class), null); + eventManager = new EventManager(null, null, null, null, null, null, null, null, configurationManager, null, null, null, null, null, null, null, null, null, configurationRepository, null, TestUtil.clockProvider(), mock(SubscriptionRepository.class), null); when(event.getZoneId()).thenReturn(ZoneId.systemDefault()); configuration = mock(ConfigurationManager.MaybeConfiguration.class); when(configurationManager.getFor(eq(CHECK_IN_COLOR_CONFIGURATION), any())).thenReturn(configuration); diff --git a/src/test/java/alfio/manager/EventManagerHandleTicketModificationTest.java b/src/test/java/alfio/manager/EventManagerHandleTicketModificationTest.java index ace71901a7..dccec1edf4 100644 --- a/src/test/java/alfio/manager/EventManagerHandleTicketModificationTest.java +++ b/src/test/java/alfio/manager/EventManagerHandleTicketModificationTest.java @@ -34,7 +34,6 @@ import static alfio.test.util.TestUtil.clockProvider; import static java.util.Collections.singletonList; import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.anyString; import static org.mockito.Mockito.*; @@ -59,7 +58,7 @@ void init() { when(event.getId()).thenReturn(eventId); when(event.now(any(ClockProvider.class))).thenReturn(ZonedDateTime.now(clockProvider().getClock().withZone(ZoneId.systemDefault()))); - eventManager = new EventManager(null, null, null, null, null, ticketRepository, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, clockProvider(), mock(SubscriptionRepository.class), null); + eventManager = new EventManager(null, null, null, null, null, ticketRepository, null, null, null, null, null, null, null, null, null, null, null, null, null, null, clockProvider(), mock(SubscriptionRepository.class), null); when(original.getId()).thenReturn(originalCategoryId); when(updated.getId()).thenReturn(updatedCategoryId); when(original.getSrcPriceCts()).thenReturn(1000); diff --git a/src/test/java/alfio/manager/EventManagerHandleTokenModificationTest.java b/src/test/java/alfio/manager/EventManagerHandleTokenModificationTest.java index cbf8251b2c..6c84f97910 100644 --- a/src/test/java/alfio/manager/EventManagerHandleTokenModificationTest.java +++ b/src/test/java/alfio/manager/EventManagerHandleTokenModificationTest.java @@ -53,7 +53,7 @@ void init() { TicketRepository ticketRepository = mock(TicketRepository.class); when(event.getId()).thenReturn(eventId); eventManager = new EventManager(null, null, null, null, - null, ticketRepository, specialPriceRepository, null, null, null, null, null, null, null, null, null, null, null, null, null, null, TestUtil.clockProvider(), mock(SubscriptionRepository.class), null); + null, ticketRepository, specialPriceRepository, null, null, null, null, null, null, null, null, null, null, null, null, null, TestUtil.clockProvider(), mock(SubscriptionRepository.class), null); when(original.getId()).thenReturn(20); when(updated.getId()).thenReturn(30); when(original.getSrcPriceCts()).thenReturn(1000); diff --git a/src/test/java/alfio/manager/EventManagerUnbindTicketsTest.java b/src/test/java/alfio/manager/EventManagerUnbindTicketsTest.java index bdff75d872..7a0568e631 100644 --- a/src/test/java/alfio/manager/EventManagerUnbindTicketsTest.java +++ b/src/test/java/alfio/manager/EventManagerUnbindTicketsTest.java @@ -36,7 +36,6 @@ import static java.util.Collections.singletonList; import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; @DisplayName("EventManager: unbind tickets from category") @@ -86,9 +85,9 @@ void setUp() { eventDescriptionRepository, ticketCategoryRepository, ticketCategoryDescriptionRepository, ticketRepository, specialPriceRepository, null, null, null, null, null, null, - null, organizationRepository, - null, null, null, null, null, - null, TestUtil.clockProvider(), mock(SubscriptionRepository.class), null); + organizationRepository, + null, null, null, null, null, null, + TestUtil.clockProvider(), mock(SubscriptionRepository.class), null); } @Test diff --git a/src/test/java/alfio/manager/PaymentManagerTest.java b/src/test/java/alfio/manager/PaymentManagerTest.java index 962f19fc83..318b3a378c 100644 --- a/src/test/java/alfio/manager/PaymentManagerTest.java +++ b/src/test/java/alfio/manager/PaymentManagerTest.java @@ -23,7 +23,6 @@ import alfio.model.transaction.webhook.MollieWebhookPayload; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.mockito.Mockito; import java.util.EnumSet; import java.util.List; diff --git a/src/test/java/alfio/manager/SpecialPriceManagerTest.java b/src/test/java/alfio/manager/SpecialPriceManagerTest.java index a38957b0a3..5687bda8f2 100644 --- a/src/test/java/alfio/manager/SpecialPriceManagerTest.java +++ b/src/test/java/alfio/manager/SpecialPriceManagerTest.java @@ -43,7 +43,6 @@ import static alfio.model.system.ConfigurationKeys.USE_PARTNER_CODE_INSTEAD_OF_PROMOTIONAL; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; -import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; @SuppressWarnings("unchecked") diff --git a/src/test/java/alfio/manager/TicketReservationManagerTest.java b/src/test/java/alfio/manager/TicketReservationManagerTest.java index c18b5657d9..c1cf8230b1 100644 --- a/src/test/java/alfio/manager/TicketReservationManagerTest.java +++ b/src/test/java/alfio/manager/TicketReservationManagerTest.java @@ -81,7 +81,6 @@ import static java.util.Collections.singleton; import static java.util.Collections.singletonList; import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; class TicketReservationManagerTest { diff --git a/src/test/java/alfio/manager/TicketReservationManagerUnitTest.java b/src/test/java/alfio/manager/TicketReservationManagerUnitTest.java index f33e92d0c5..d820bdd296 100644 --- a/src/test/java/alfio/manager/TicketReservationManagerUnitTest.java +++ b/src/test/java/alfio/manager/TicketReservationManagerUnitTest.java @@ -45,7 +45,6 @@ import java.util.Locale; import java.util.Optional; -import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; class TicketReservationManagerUnitTest { @@ -236,7 +235,7 @@ void testExtractSummaryVatNotIncludedASInherited() { initReservationWithAdditionalServices(false, AdditionalService.VatType.INHERITED, 1000, 1000); List summaryRows = generator.extractSummary(TICKET_RESERVATION_ID, null, event, Locale.ENGLISH, null, new TotalPrice(2200, 200, 0, 0, "CHF")); Assertions.assertEquals(2, summaryRows.size()); - summaryRows.forEach(r -> Assertions.assertEquals("10.00", r.getPrice(), String.format("%s failed", r.getType()))); + summaryRows.forEach(r -> Assertions.assertEquals("10.00", r.getPrice(), "%s failed".formatted(r.getType()))); } @Test @@ -244,7 +243,7 @@ void testExtractSummaryVatIncludedASInherited() { initReservationWithAdditionalServices(true, AdditionalService.VatType.INHERITED, 1000, 1000); List summaryRows = generator.extractSummary(TICKET_RESERVATION_ID, null, event, Locale.ENGLISH, null, new TotalPrice(2000, 182, 0, 0, "CHF")); Assertions.assertEquals(2, summaryRows.size()); - summaryRows.forEach(r -> Assertions.assertEquals("10.00", r.getPrice(), String.format("%s failed", r.getType()))); + summaryRows.forEach(r -> Assertions.assertEquals("10.00", r.getPrice(), "%s failed".formatted(r.getType()))); } @Test @@ -252,7 +251,7 @@ void testExtractSummaryVatNotIncludedASNone() { initReservationWithAdditionalServices(false, AdditionalService.VatType.NONE, 1000, 1000); List summaryRows = generator.extractSummary(TICKET_RESERVATION_ID, null, event, Locale.ENGLISH, null, new TotalPrice(1000, 100, 0, 0, "CHF")); Assertions.assertEquals(2, summaryRows.size()); - summaryRows.forEach(r -> Assertions.assertEquals("10.00", r.getPrice(), String.format("%s failed", r.getType()))); + summaryRows.forEach(r -> Assertions.assertEquals("10.00", r.getPrice(), "%s failed".formatted(r.getType()))); } @Test diff --git a/src/test/java/alfio/manager/WaitingQueueSubscriptionProcessorTest.java b/src/test/java/alfio/manager/WaitingQueueSubscriptionProcessorTest.java index b1221e6137..1e19067d18 100644 --- a/src/test/java/alfio/manager/WaitingQueueSubscriptionProcessorTest.java +++ b/src/test/java/alfio/manager/WaitingQueueSubscriptionProcessorTest.java @@ -40,7 +40,6 @@ import static alfio.model.system.ConfigurationKeys.ENABLE_PRE_REGISTRATION; import static alfio.model.system.ConfigurationKeys.ENABLE_WAITING_QUEUE; import static alfio.test.util.TestUtil.clockProvider; -import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; public class WaitingQueueSubscriptionProcessorTest { diff --git a/src/test/java/alfio/manager/payment/DeferredBankTransferManagerTest.java b/src/test/java/alfio/manager/payment/DeferredBankTransferManagerTest.java index 97a2239936..8b2e50c1ed 100644 --- a/src/test/java/alfio/manager/payment/DeferredBankTransferManagerTest.java +++ b/src/test/java/alfio/manager/payment/DeferredBankTransferManagerTest.java @@ -36,7 +36,6 @@ import static alfio.model.TicketReservation.TicketReservationStatus.OFFLINE_PAYMENT; import static alfio.model.system.ConfigurationKeys.DEFERRED_BANK_TRANSFER_ENABLED; import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; class DeferredBankTransferManagerTest { diff --git a/src/test/java/alfio/manager/payment/RevolutBankTransferManagerTest.java b/src/test/java/alfio/manager/payment/RevolutBankTransferManagerTest.java index fce551e2a8..eea4927c30 100644 --- a/src/test/java/alfio/manager/payment/RevolutBankTransferManagerTest.java +++ b/src/test/java/alfio/manager/payment/RevolutBankTransferManagerTest.java @@ -40,7 +40,6 @@ import static alfio.test.util.TestUtil.clockProvider; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; class RevolutBankTransferManagerTest { diff --git a/src/test/java/alfio/manager/payment/SaferpayManagerTest.java b/src/test/java/alfio/manager/payment/SaferpayManagerTest.java index 6648bd6776..0085e93b6f 100644 --- a/src/test/java/alfio/manager/payment/SaferpayManagerTest.java +++ b/src/test/java/alfio/manager/payment/SaferpayManagerTest.java @@ -45,15 +45,17 @@ @ExtendWith(MockitoExtension.class) class SaferpayManagerTest { - private static final String CAPTURE_RESPONSE_BODY = "{\n" + - " \"ResponseHeader\": {\n" + - " \"SpecVersion\": \"[current Spec-Version]\",\n" + - " \"RequestId\": \"[your request id]\"\n" + - " },\n" + - " \"CaptureId\": \"captureId\",\n" + - " \"Status\": \"CAPTURED\",\n" + - " \"Date\": \"2015-01-30T12:45:22.258+01:00\"\n" + - "}"; + private static final String CAPTURE_RESPONSE_BODY = """ + { + "ResponseHeader": { + "SpecVersion": "[current Spec-Version]", + "RequestId": "[your request id]" + }, + "CaptureId": "captureId", + "Status": "CAPTURED", + "Date": "2015-01-30T12:45:22.258+01:00" + }\ + """; @Mock private TransactionRepository transactionRepository; diff --git a/src/test/java/alfio/model/PriceContainerTest.java b/src/test/java/alfio/model/PriceContainerTest.java index 5ab0c0c408..cc83e5e0d8 100644 --- a/src/test/java/alfio/model/PriceContainerTest.java +++ b/src/test/java/alfio/model/PriceContainerTest.java @@ -47,10 +47,10 @@ public void getFinalPriceInputDoNotApplyVat() { when(promoCodeDiscount.getDiscountType()).thenReturn(PromoCodeDiscount.DiscountType.FIXED_AMOUNT, PromoCodeDiscount.DiscountType.PERCENTAGE); vs = new PriceContainerImpl(1100, "CHF", new BigDecimal("30.00"), vatStatus, promoCodeDiscount); - assertEquals(new BigDecimal("10.00"), vs.getFinalPrice(), String.format("vatStatus: %s", vatStatus.name())); + assertEquals(new BigDecimal("10.00"), vs.getFinalPrice(), "vatStatus: %s".formatted(vatStatus.name())); vs = new PriceContainerImpl(1000, "CHF", new BigDecimal("30.00"), vatStatus, promoCodeDiscount); - assertEquals(new BigDecimal("9.00"), vs.getFinalPrice(), String.format("vatStatus: %s", vatStatus.name())); + assertEquals(new BigDecimal("9.00"), vs.getFinalPrice(), "vatStatus: %s".formatted(vatStatus.name())); }); } @@ -126,7 +126,7 @@ public void getFinalPriceInputVatNotIncluded() { int result = MonetaryUtil.unitToCents(vatAmount.subtract(MonetaryUtil.calcVat(netPrice, priceContainer.getVatPercentageOrZero())).abs(), "CHF"); if(result >= 2) { BigDecimal calcVatPerc = vatAmount.divide(finalPrice, 5, RoundingMode.HALF_UP).multiply(new BigDecimal("100.00")).setScale(2, RoundingMode.HALF_UP); - fail(String.format("Expected percentage: %s, got %s, vat %s v. %s", calcVatPerc, priceContainer.getOptionalVatPercentage(), vatAmount, MonetaryUtil.calcVat(netPrice, priceContainer.getVatPercentageOrZero()))); + fail("Expected percentage: %s, got %s, vat %s v. %s".formatted(calcVatPerc, priceContainer.getOptionalVatPercentage(), vatAmount, MonetaryUtil.calcVat(netPrice, priceContainer.getVatPercentageOrZero()))); } }); } diff --git a/src/test/java/alfio/util/RefreshableDataSource.java b/src/test/java/alfio/util/RefreshableDataSource.java index a9a42ae503..4b75659b55 100644 --- a/src/test/java/alfio/util/RefreshableDataSource.java +++ b/src/test/java/alfio/util/RefreshableDataSource.java @@ -41,5 +41,4 @@ public DataSource getTargetDataSource() { public void refresh() { this.dataSource.getAndSet(new HikariDataSource(config)).close(); } - } diff --git a/src/test/resources/api/descriptor.json b/src/test/resources/api/descriptor.json index 8744179681..35b7d802e8 100644 --- a/src/test/resources/api/descriptor.json +++ b/src/test/resources/api/descriptor.json @@ -49,16 +49,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -140,16 +130,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -221,16 +201,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -307,16 +277,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -393,16 +353,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -469,16 +419,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -557,16 +497,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -647,16 +577,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -752,16 +672,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -836,16 +746,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -928,16 +828,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1020,16 +910,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1102,16 +982,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1186,16 +1056,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1254,16 +1114,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1320,16 +1170,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1411,16 +1251,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1512,16 +1342,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1603,16 +1423,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1702,16 +1512,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1799,16 +1599,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1900,16 +1690,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -1984,16 +1764,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -2073,16 +1843,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -2149,92 +1909,72 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/AlfioMetadata" - } - } - } - } - } - }, - "put" : { - "tags" : [ "event-api-controller" ], - "operationId" : "updateMetadata", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MetadataModification" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/AlfioMetadata" + } + } + } + } + } + }, + "put" : { + "tags" : [ "event-api-controller" ], + "operationId" : "updateMetadata", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MetadataModification" + } + } + }, + "required" : true + }, + "responses" : { + "500" : { + "description" : "Internal Server Error", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -2317,16 +2057,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -2401,16 +2131,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -2493,16 +2213,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -2585,16 +2295,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -2663,16 +2363,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -2747,16 +2437,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -2826,16 +2506,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -2913,16 +2583,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3011,16 +2671,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3094,16 +2744,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3179,16 +2819,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3247,16 +2877,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3323,16 +2943,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3406,16 +3016,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3497,16 +3097,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3565,16 +3155,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3641,74 +3221,54 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ValidatedResponseUser" - } - } - } - } - } - }, - "delete" : { - "tags" : [ "user-api-v-2-controller" ], - "operationId" : "deleteCurrentUser", - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ValidatedResponseUser" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "user-api-v-2-controller" ], + "operationId" : "deleteCurrentUser", + "responses" : { + "500" : { + "description" : "Internal Server Error", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -3775,16 +3335,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3851,16 +3401,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3925,16 +3465,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -3968,10 +3498,10 @@ } } }, - "/api/v2/public/reservation/{reservationId}/validate-to-overview" : { - "post" : { + "/api/v2/public/reservation/{reservationId}" : { + "get" : { "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "validateToOverview", + "operationId" : "getReservationInfo", "parameters" : [ { "name" : "reservationId", "in" : "path", @@ -3979,32 +3509,7 @@ "schema" : { "type" : "string" } - }, { - "name" : "lang", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "ignoreWarnings", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactAndTicketsForm" - } - } - }, - "required" : true - }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -4026,16 +3531,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4061,18 +3556,16 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidatedResponseBoolean" + "$ref" : "#/components/schemas/ReservationInfo" } } } } } - } - }, - "/api/v2/public/event/{eventName}/reservation/{reservationId}/validate-to-overview" : { + }, "post" : { "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "validateToOverview_1", + "operationId" : "confirmOverview", "parameters" : [ { "name" : "reservationId", "in" : "path", @@ -4087,20 +3580,12 @@ "schema" : { "type" : "string" } - }, { - "name" : "ignoreWarnings", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ContactAndTicketsForm" + "$ref" : "#/components/schemas/PaymentForm" } } }, @@ -4127,16 +3612,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4162,18 +3637,16 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidatedResponseBoolean" + "$ref" : "#/components/schemas/ValidatedResponseReservationPaymentResult" } } } } } - } - }, - "/api/v2/public/reservation/{reservationId}/payment/{method}/init" : { - "post" : { + }, + "delete" : { "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "initTransaction", + "operationId" : "cancelPendingReservation", "parameters" : [ { "name" : "reservationId", "in" : "path", @@ -4181,20 +3654,6 @@ "schema" : { "type" : "string" } - }, { - "name" : "method", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "allParams", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/MultiValueMapStringString" - } } ], "responses" : { "500" : { @@ -4217,16 +3676,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4252,7 +3701,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/TransactionInitializationToken" + "type" : "boolean" } } } @@ -4260,10 +3709,10 @@ } } }, - "/api/v2/public/event/{eventName}/reservation/{reservationId}/payment/{method}/init" : { + "/api/v2/public/reservation/{reservationId}/validate-to-overview" : { "post" : { "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "initTransaction_1", + "operationId" : "validateToOverview", "parameters" : [ { "name" : "reservationId", "in" : "path", @@ -4272,20 +3721,31 @@ "type" : "string" } }, { - "name" : "method", - "in" : "path", + "name" : "lang", + "in" : "query", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "allParams", + "name" : "ignoreWarnings", "in" : "query", - "required" : true, + "required" : false, "schema" : { - "$ref" : "#/components/schemas/MultiValueMapStringString" + "type" : "boolean", + "default" : false } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContactAndTicketsForm" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -4307,16 +3767,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4342,7 +3792,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/TransactionInitializationToken" + "$ref" : "#/components/schemas/ValidatedResponseBoolean" } } } @@ -4350,10 +3800,10 @@ } } }, - "/api/v2/public/reservation/{reservationId}/back-to-booking" : { + "/api/v2/public/reservation/{reservationId}/payment/{method}/init" : { "post" : { "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "backToBooking", + "operationId" : "initTransaction", "parameters" : [ { "name" : "reservationId", "in" : "path", @@ -4361,6 +3811,20 @@ "schema" : { "type" : "string" } + }, { + "name" : "method", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "allParams", + "in" : "query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/MultiValueMapStringString" + } } ], "responses" : { "500" : { @@ -4383,16 +3847,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4418,7 +3872,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "$ref" : "#/components/schemas/TransactionInitializationToken" } } } @@ -4426,10 +3880,10 @@ } } }, - "/api/v2/public/event/{eventName}/reservation/{reservationId}/back-to-booking" : { + "/api/v2/public/reservation/{reservationId}/back-to-booking" : { "post" : { "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "backToBooking_1", + "operationId" : "backToBooking", "parameters" : [ { "name" : "reservationId", "in" : "path", @@ -4459,16 +3913,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4545,16 +3989,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4588,18 +4022,28 @@ } } }, - "/api/v2/public/reservation/{reservationId}" : { - "get" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "getReservationInfo", + "/api/v2/public/event/{eventName}/waiting-list/subscribe" : { + "post" : { + "tags" : [ "event-api-v-2-controller" ], + "operationId" : "subscribeToWaitingList", "parameters" : [ { - "name" : "reservationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/WaitingQueueSubscriptionForm" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -4621,16 +4065,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4656,41 +4090,33 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ReservationInfo" + "$ref" : "#/components/schemas/ValidatedResponseBoolean" } } } } } - }, + } + }, + "/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/send-ticket-by-email" : { "post" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "confirmOverview", + "tags" : [ "ticket-api-v-2-controller" ], + "operationId" : "sendTicketByEmail", "parameters" : [ { - "name" : "reservationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "lang", - "in" : "query", + "name" : "ticketIdentifier", + "in" : "path", "required" : true, "schema" : { "type" : "string" } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentForm" - } - } - }, - "required" : true - }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -4712,16 +4138,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4747,24 +4163,43 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidatedResponseReservationPaymentResult" + "type" : "boolean" } } } } } - }, - "delete" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "cancelPendingReservation", + } + }, + "/api/v2/public/event/{eventName}/reserve-tickets" : { + "post" : { + "tags" : [ "event-api-v-2-controller" ], + "operationId" : "reserveTickets", "parameters" : [ { - "name" : "reservationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "lang", + "in" : "query", + "required" : true, + "schema" : { + "type" : "string" + } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ReservationForm" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -4786,16 +4221,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4821,7 +4246,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "$ref" : "#/components/schemas/ValidatedResponseString" } } } @@ -4829,18 +4254,36 @@ } } }, - "/api/v2/public/event/{eventName}/reservation/{reservationId}" : { - "get" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "getReservationInfo_1", + "/api/v2/public/event/{eventName}/poll/{pollId}/answer" : { + "post" : { + "tags" : [ "poll-api-controller" ], + "operationId" : "registerAnswer", "parameters" : [ { - "name" : "reservationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "pollId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PollVoteForm" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -4862,16 +4305,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4897,36 +4330,31 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ReservationInfo" + "$ref" : "#/components/schemas/ValidatedResponseBoolean" } } } } } - }, + } + }, + "/api/v2/public/event/{eventName}/check-discount" : { "post" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "confirmOverview_1", + "tags" : [ "event-api-v-2-controller" ], + "operationId" : "checkDiscount", "parameters" : [ { - "name" : "reservationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } - }, { - "name" : "lang", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PaymentForm" + "$ref" : "#/components/schemas/ReservationForm" } } }, @@ -4953,16 +4381,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -4988,22 +4406,25 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidatedResponseReservationPaymentResult" + "$ref" : "#/components/schemas/DynamicDiscount" } } } } } - }, - "delete" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "cancelPendingReservation_1", + } + }, + "/api/v1/admin/system/organization/{id}" : { + "get" : { + "tags" : [ "organizations-api-v-1-controller" ], + "operationId" : "getSingleOrganization", "parameters" : [ { - "name" : "reservationId", + "name" : "id", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -5027,16 +4448,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -5062,31 +4473,30 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "$ref" : "#/components/schemas/Organization" } } } } } - } - }, - "/api/v2/public/event/{eventName}/waiting-list/subscribe" : { + }, "post" : { - "tags" : [ "event-api-v-2-controller" ], - "operationId" : "subscribeToWaitingList", + "tags" : [ "organizations-api-v-1-controller" ], + "operationId" : "update_1", "parameters" : [ { - "name" : "eventName", + "name" : "id", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/WaitingQueueSubscriptionForm" + "$ref" : "#/components/schemas/OrganizationModification" } } }, @@ -5113,8 +4523,63 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/Organization" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "organizations-api-v-1-controller" ], + "operationId" : "delete", + "parameters" : [ { + "name" : "id", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], + "responses" : { + "500" : { + "description" : "Internal Server Error", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -5144,37 +4609,25 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ValidatedResponseBoolean" - } - } - } + "description" : "OK" } } } }, - "/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/send-ticket-by-email" : { + "/api/v1/admin/system/organization/create" : { "post" : { - "tags" : [ "ticket-api-v-2-controller" ], - "operationId" : "sendTicketByEmail", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "ticketIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "organizations-api-v-1-controller" ], + "operationId" : "createOrganization", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/OrganizationModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -5196,16 +4649,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -5231,7 +4674,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "$ref" : "#/components/schemas/Organization" } } } @@ -5239,30 +4682,24 @@ } } }, - "/api/v2/public/event/{eventName}/reserve-tickets" : { + "/api/v1/admin/subscription/{subscriptionId}/update" : { "post" : { - "tags" : [ "event-api-v-2-controller" ], - "operationId" : "reserveTickets", + "tags" : [ "subscription-api-v-1-controller" ], + "operationId" : "update_2", "parameters" : [ { - "name" : "eventName", + "name" : "subscriptionId", "in" : "path", "required" : true, "schema" : { - "type" : "string" - } - }, { - "name" : "lang", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" + "type" : "string", + "format" : "uuid" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ReservationForm" + "$ref" : "#/components/schemas/SubscriptionDescriptorModificationRequest" } } }, @@ -5289,8 +4726,65 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + } + } + } + }, + "/api/v1/admin/subscription/{subscriptionId}/events" : { + "get" : { + "tags" : [ "subscription-api-v-1-controller" ], + "operationId" : "getLinkedEvents", + "parameters" : [ { + "name" : "subscriptionId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "format" : "uuid" + } + } ], + "responses" : { + "500" : { + "description" : "Internal Server Error", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -5324,39 +4818,36 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidatedResponseString" + "type" : "array", + "items" : { + "type" : "string" + } } } } } } - } - }, - "/api/v2/public/event/{eventName}/poll/{pollId}/answer" : { + }, "post" : { - "tags" : [ "poll-api-controller" ], - "operationId" : "registerAnswer", + "tags" : [ "subscription-api-v-1-controller" ], + "operationId" : "updateLinkedEvents", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "pollId", + "name" : "subscriptionId", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "type" : "string", + "format" : "uuid" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PollVoteForm" + "type" : "array", + "items" : { + "type" : "string" + } } } }, @@ -5383,16 +4874,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -5418,7 +4899,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidatedResponseBoolean" + "type" : "array", + "items" : { + "type" : "string" + } } } } @@ -5426,12 +4910,12 @@ } } }, - "/api/v2/public/event/{eventName}/check-discount" : { + "/api/v1/admin/subscription/{id}/reservation" : { "post" : { - "tags" : [ "event-api-v-2-controller" ], - "operationId" : "checkDiscount", + "tags" : [ "reservation-api-v-1-controller" ], + "operationId" : "createSubscriptionReservation", "parameters" : [ { - "name" : "eventName", + "name" : "id", "in" : "path", "required" : true, "schema" : { @@ -5442,7 +4926,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ReservationForm" + "$ref" : "#/components/schemas/SubscriptionReservationCreationRequest" } } }, @@ -5469,16 +4953,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -5504,7 +4978,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/DynamicDiscount" + "$ref" : "#/components/schemas/CreationResponse" } } } @@ -5512,19 +4986,20 @@ } } }, - "/api/v1/admin/system/organization/{id}" : { - "get" : { - "tags" : [ "organizations-api-v-1-controller" ], - "operationId" : "getSingleOrganization", - "parameters" : [ { - "name" : "id", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], + "/api/v1/admin/subscription/create" : { + "post" : { + "tags" : [ "subscription-api-v-1-controller" ], + "operationId" : "create", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SubscriptionDescriptorModificationRequest" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -5546,16 +5021,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -5581,30 +5046,31 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/Organization" + "type" : "string" } } } } } - }, + } + }, + "/api/v1/admin/event/{slug}/reservation" : { "post" : { - "tags" : [ "organizations-api-v-1-controller" ], - "operationId" : "update_1", + "tags" : [ "reservation-api-v-1-controller" ], + "operationId" : "createTicketsReservation", "parameters" : [ { - "name" : "id", + "name" : "slug", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/OrganizationModification" + "$ref" : "#/components/schemas/TicketReservationCreationRequest" } } }, @@ -5631,16 +5097,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -5666,23 +5122,24 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/Organization" + "$ref" : "#/components/schemas/CreationResponse" } } } } } - }, - "delete" : { - "tags" : [ "organizations-api-v-1-controller" ], - "operationId" : "delete", + } + }, + "/api/v1/admin/event/{slug}/generate-subscribers-tickets" : { + "post" : { + "tags" : [ "event-api-v-1-controller" ], + "operationId" : "generateTicketsForSubscribers", "parameters" : [ { - "name" : "id", + "name" : "slug", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } } ], "responses" : { @@ -5706,8 +5163,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -5716,8 +5173,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -5726,31 +5183,36 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "boolean" } } } - }, - "200" : { - "description" : "OK" } } } }, - "/api/v1/admin/system/organization/create" : { + "/api/v1/admin/event/update/{slug}" : { "post" : { - "tags" : [ "organizations-api-v-1-controller" ], - "operationId" : "createOrganization", + "tags" : [ "event-api-v-1-controller" ], + "operationId" : "update_3", + "parameters" : [ { + "name" : "slug", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/OrganizationModification" + "$ref" : "#/components/schemas/EventCreationRequest" } } }, @@ -5777,16 +5239,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -5812,7 +5264,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/Organization" + "type" : "string" } } } @@ -5820,24 +5272,15 @@ } } }, - "/api/v1/admin/subscription/{subscriptionId}/update" : { + "/api/v1/admin/event/create" : { "post" : { - "tags" : [ "subscription-api-v-1-controller" ], - "operationId" : "update_2", - "parameters" : [ { - "name" : "subscriptionId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "format" : "uuid" - } - } ], + "tags" : [ "event-api-v-1-controller" ], + "operationId" : "create_1", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SubscriptionDescriptorModificationRequest" + "$ref" : "#/components/schemas/EventCreationRequest" } } }, @@ -5864,16 +5307,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -5907,153 +5340,101 @@ } } }, - "/api/v1/admin/subscription/{subscriptionId}/events" : { - "get" : { - "tags" : [ "subscription-api-v-1-controller" ], - "operationId" : "getLinkedEvents", + "/api/events/{eventName}/reservation/{reservationId}/payment/{method}/init" : { + "post" : { + "tags" : [ "payment-api-controller" ], + "operationId" : "initTransaction_1", "parameters" : [ { - "name" : "subscriptionId", + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "format" : "uuid" + "type" : "string" + } + }, { + "name" : "method", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "allParams", + "in" : "query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/MultiValueMapStringString" } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "200" : { "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "$ref" : "#/components/schemas/TransactionInitializationToken" } } } } } - }, + } + }, + "/api/reservation/{reservationId}/payment/{method}/init" : { "post" : { - "tags" : [ "subscription-api-v-1-controller" ], - "operationId" : "updateLinkedEvents", + "tags" : [ "payment-api-controller" ], + "operationId" : "initTransaction_2", "parameters" : [ { - "name" : "subscriptionId", + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "format" : "uuid" + "type" : "string" + } + }, { + "name" : "method", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "allParams", + "in" : "query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/MultiValueMapStringString" } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - } - }, - "required" : true - }, "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/TransactionInitializationToken" } } } - }, - "403" : { - "description" : "Forbidden", + } + } + } + }, + "/api/payment/webhook/stripe/payment" : { + "post" : { + "tags" : [ "stripe-payment-webhook-controller" ], + "operationId" : "receivePaymentConfirmation", + "parameters" : [ { + "name" : "Stripe-Signature", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { @@ -6061,16 +5442,29 @@ } } } - }, + } + } + } + }, + "/api/payment/webhook/mollie/reservation/{reservationId}" : { + "post" : { + "tags" : [ "mollie-payment-webhook-controller" ], + "operationId" : "receivePaymentConfirmation_1", + "parameters" : [ { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { "200" : { "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "type" : "string" } } } @@ -6078,14 +5472,45 @@ } } }, - "/api/v1/admin/subscription/{id}/reservation" : { + "/api/pass/event/{eventName}/v1/log" : { "post" : { - "tags" : [ "reservation-api-v-1-controller" ], - "operationId" : "createSubscriptionReservation", + "tags" : [ "pass-kit-api-controller" ], + "operationId" : "log", + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/api/pass/event/{eventName}/v1/devices/*/registrations/*/*" : { + "post" : { + "tags" : [ "pass-kit-api-controller" ], + "operationId" : "register", + "responses" : { + "200" : { + "description" : "OK" + } + } + }, + "delete" : { + "tags" : [ "pass-kit-api-controller" ], + "operationId" : "deleteRegistration", + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/api/attendees/sponsor-scan" : { + "post" : { + "tags" : [ "attendee-api-controller" ], + "operationId" : "scanBadge", "parameters" : [ { - "name" : "id", - "in" : "path", - "required" : true, + "name" : "Alfio-Operator", + "in" : "header", + "required" : false, "schema" : { "type" : "string" } @@ -6094,7 +5519,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SubscriptionReservationCreationRequest" + "$ref" : "#/components/schemas/SponsorScanRequest" } } }, @@ -6121,16 +5546,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -6156,7 +5571,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/CreationResponse" + "$ref" : "#/components/schemas/TicketAndCheckInResult" } } } @@ -6164,15 +5579,26 @@ } } }, - "/api/v1/admin/subscription/create" : { + "/api/attendees/sponsor-scan/bulk" : { "post" : { - "tags" : [ "subscription-api-v-1-controller" ], - "operationId" : "create", + "tags" : [ "attendee-api-controller" ], + "operationId" : "scanBadges", + "parameters" : [ { + "name" : "Alfio-Operator", + "in" : "header", + "required" : false, + "schema" : { + "type" : "string" + } + } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SubscriptionDescriptorModificationRequest" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SponsorScanRequest" + } } } }, @@ -6199,16 +5625,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -6234,7 +5650,10 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TicketAndCheckInResult" + } } } } @@ -6242,23 +5661,39 @@ } } }, - "/api/v1/admin/event/{slug}/reservation" : { + "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/{id}" : { "post" : { - "tags" : [ "reservation-api-v-1-controller" ], - "operationId" : "createTicketsReservation", + "tags" : [ "additional-field-api-controller" ], + "operationId" : "updateAdditionalField", "parameters" : [ { - "name" : "slug", + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "id", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/TicketReservationCreationRequest" + "$ref" : "#/components/schemas/UpdateAdditionalField" } } }, @@ -6285,16 +5720,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -6316,29 +5741,36 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/CreationResponse" - } - } - } + "description" : "OK" } } - } - }, - "/api/v1/admin/event/{slug}/generate-subscribers-tickets" : { - "post" : { - "tags" : [ "event-api-v-1-controller" ], - "operationId" : "generateTicketsForSubscribers", + }, + "delete" : { + "tags" : [ "additional-field-api-controller" ], + "operationId" : "deleteAdditionalField", "parameters" : [ { - "name" : "slug", + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "id", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } } ], "responses" : { "500" : { @@ -6361,16 +5793,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -6392,2142 +5814,48 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "boolean" - } - } - } + "description" : "OK" } } } }, - "/api/v1/admin/event/update/{slug}" : { + "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/swap-position/{id1}/{id2}" : { "post" : { - "tags" : [ "event-api-v-1-controller" ], - "operationId" : "update_3", + "tags" : [ "additional-field-api-controller" ], + "operationId" : "swapAdditionalFieldPosition", "parameters" : [ { - "name" : "slug", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/EventCreationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - } - } - } - }, - "/api/v1/admin/event/create" : { - "post" : { - "tags" : [ "event-api-v-1-controller" ], - "operationId" : "create_1", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/EventCreationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - } - } - } - }, - "/api/reservation/{reservationId}/payment/{method}/init" : { - "post" : { - "tags" : [ "payment-api-controller" ], - "operationId" : "initTransaction_2", - "parameters" : [ { - "name" : "reservationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "method", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "allParams", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/MultiValueMapStringString" - } - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/TransactionInitializationToken" - } - } - } - } - } - } - }, - "/api/events/{eventName}/reservation/{reservationId}/payment/{method}/init" : { - "post" : { - "tags" : [ "payment-api-controller" ], - "operationId" : "initTransaction_3", - "parameters" : [ { - "name" : "reservationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "method", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "allParams", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/MultiValueMapStringString" - } - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/TransactionInitializationToken" - } - } - } - } - } - } - }, - "/api/payment/webhook/stripe/payment" : { - "post" : { - "tags" : [ "stripe-payment-webhook-controller" ], - "operationId" : "receivePaymentConfirmation", - "parameters" : [ { - "name" : "Stripe-Signature", - "in" : "header", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - } - } - } - }, - "/api/payment/webhook/mollie/reservation/{reservationId}" : { - "post" : { - "tags" : [ "mollie-payment-webhook-controller" ], - "operationId" : "receivePaymentConfirmation_1", - "parameters" : [ { - "name" : "reservationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - } - } - } - }, - "/api/pass/event/{eventName}/v1/log" : { - "post" : { - "tags" : [ "pass-kit-api-controller" ], - "operationId" : "log", - "responses" : { - "200" : { - "description" : "OK" - } - } - } - }, - "/api/pass/event/{eventName}/v1/devices/*/registrations/*/*" : { - "post" : { - "tags" : [ "pass-kit-api-controller" ], - "operationId" : "register", - "responses" : { - "200" : { - "description" : "OK" - } - } - }, - "delete" : { - "tags" : [ "pass-kit-api-controller" ], - "operationId" : "deleteRegistration", - "responses" : { - "200" : { - "description" : "OK" - } - } - } - }, - "/api/attendees/sponsor-scan" : { - "post" : { - "tags" : [ "attendee-api-controller" ], - "operationId" : "scanBadge", - "parameters" : [ { - "name" : "Alfio-Operator", - "in" : "header", - "required" : false, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SponsorScanRequest" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/TicketAndCheckInResult" - } - } - } - } - } - } - }, - "/api/attendees/sponsor-scan/bulk" : { - "post" : { - "tags" : [ "attendee-api-controller" ], - "operationId" : "scanBadges", - "parameters" : [ { - "name" : "Alfio-Operator", - "in" : "header", - "required" : false, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SponsorScanRequest" - } - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TicketAndCheckInResult" - } - } - } - } - } - } - } - }, - "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/{id}" : { - "post" : { - "tags" : [ "additional-field-api-controller" ], - "operationId" : "updateAdditionalField", - "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "id", + "name" : "id1", "in" : "path", "required" : true, "schema" : { "type" : "integer", "format" : "int64" } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateAdditionalField" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK" - } - } - }, - "delete" : { - "tags" : [ "additional-field-api-controller" ], - "operationId" : "deleteAdditionalField", - "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "id", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } ], - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK" - } - } - } - }, - "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/swap-position/{id1}/{id2}" : { - "post" : { - "tags" : [ "additional-field-api-controller" ], - "operationId" : "swapAdditionalFieldPosition", - "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "id1", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - }, { - "name" : "id2", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } ], - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK" - } - } - } - }, - "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/set-position/{id}" : { - "post" : { - "tags" : [ "additional-field-api-controller" ], - "operationId" : "setAdditionalFieldPosition", - "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "id", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - }, { - "name" : "newPosition", - "in" : "query", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK" - } - } - } - }, - "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/new" : { - "post" : { - "tags" : [ "additional-field-api-controller" ], - "operationId" : "addAdditionalField", - "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdditionalFieldRequest" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ValidationResult" - } - } - } - } - } - } - }, - "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/descriptions" : { - "post" : { - "tags" : [ "additional-field-api-controller" ], - "operationId" : "saveAdditionalFieldDescriptions", - "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/TicketFieldDescriptionModification" - } - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK" - } - } - } - }, - "/admin/api/{eventName}/poll" : { - "get" : { - "tags" : [ "poll-admin-api-controller" ], - "operationId" : "getAllForEvent", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PollModification" - } - } - } - } - } - } - }, - "post" : { - "tags" : [ "poll-admin-api-controller" ], - "operationId" : "createNewPoll", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PollModification" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - } - } - } - } - }, - "/admin/api/{eventName}/poll/{pollId}/allow" : { - "post" : { - "tags" : [ "poll-admin-api-controller" ], - "operationId" : "allowAttendees", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "pollId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateParticipantsForm" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "boolean" - } - } - } - } - } - } - }, - "/admin/api/utils/short-name/validate" : { - "post" : { - "tags" : [ "utils-api-controller" ], - "operationId" : "validateShortName", - "parameters" : [ { - "name" : "shortName", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "boolean" - } - } - } - } - } - } - }, - "/admin/api/users/{id}/enable/{enable}" : { - "post" : { - "tags" : [ "users-api-controller" ], - "operationId" : "enableUser", - "parameters" : [ { - "name" : "id", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "enable", - "in" : "path", - "required" : true, - "schema" : { - "type" : "boolean" - } - } ], - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - } - } - } - }, - "/admin/api/users/new" : { - "post" : { - "tags" : [ "users-api-controller" ], - "operationId" : "insertUser", - "parameters" : [ { - "name" : "baseUrl", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserModification" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/UserWithPasswordAndQRCode" - } - } - } - } - } - } - }, - "/admin/api/users/edit" : { - "post" : { - "tags" : [ "users-api-controller" ], - "operationId" : "editUser", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserModification" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - } - } - } - }, - "/admin/api/users/current/update-password" : { - "post" : { - "tags" : [ "users-api-controller" ], - "operationId" : "updateCurrentUserPassword", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PasswordModification" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ValidationResult" - } - } - } - } - } - } - }, - "/admin/api/users/current/edit" : { - "post" : { - "tags" : [ "users-api-controller" ], - "operationId" : "updateCurrentUser", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserModification" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK" - } - } - } - }, - "/admin/api/users/check" : { - "post" : { - "tags" : [ "users-api-controller" ], - "operationId" : "validateUser", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserModification" - } - } - }, - "required" : true - }, - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ValidationResult" - } - } - } - } - } - } - }, - "/admin/api/resource/" : { - "get" : { - "tags" : [ "resource-controller" ], - "operationId" : "findAll", - "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UploadedResource" - } - } - } - } - } - } - }, - "post" : { - "tags" : [ "resource-controller" ], - "operationId" : "uploadFile", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UploadBase64FileModification" - } - } - }, - "required" : true - }, - "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK" - } - } - } - }, - "/admin/api/resource-organization/{organizationId}/" : { - "post" : { - "tags" : [ "resource-controller" ], - "operationId" : "uploadFile_1", - "parameters" : [ { - "name" : "organizationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UploadBase64FileModification" - } - } - }, - "required" : true - }, - "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "403" : { - "description" : "Forbidden", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, - "200" : { - "description" : "OK" - } - } - } - }, - "/admin/api/resource-event/{organizationId}/{eventId}/" : { - "post" : { - "tags" : [ "resource-controller" ], - "operationId" : "uploadFile_2", - "parameters" : [ { - "name" : "organizationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "eventId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UploadBase64FileModification" - } - } - }, - "required" : true - }, + }, { + "name" : "id2", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } + } ], "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -8538,8 +5866,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -8574,10 +5902,10 @@ } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}" : { - "get" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "loadReservation", + "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/set-position/{id}" : { + "post" : { + "tags" : [ "additional-field-api-controller" ], + "operationId" : "setAdditionalFieldPosition", "parameters" : [ { "name" : "purchaseContextType", "in" : "path", @@ -8594,11 +5922,20 @@ "type" : "string" } }, { - "name" : "reservationId", + "name" : "id", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int64" + } + }, { + "name" : "newPosition", + "in" : "query", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -8622,16 +5959,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -8653,20 +5980,15 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ResultTicketReservationDescriptor" - } - } - } + "description" : "OK" } } - }, + } + }, + "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/new" : { "post" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "updateReservation", + "tags" : [ "additional-field-api-controller" ], + "operationId" : "addAdditionalField", "parameters" : [ { "name" : "purchaseContextType", "in" : "path", @@ -8682,19 +6004,12 @@ "schema" : { "type" : "string" } - }, { - "name" : "reservationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/AdminReservationModification" + "$ref" : "#/components/schemas/AdditionalFieldRequest" } } }, @@ -8721,16 +6036,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -8756,7 +6061,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ResultBoolean" + "$ref" : "#/components/schemas/ValidationResult" } } } @@ -8764,10 +6069,10 @@ } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/refund" : { + "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/descriptions" : { "post" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "refund", + "tags" : [ "additional-field-api-controller" ], + "operationId" : "saveAdditionalFieldDescriptions", "parameters" : [ { "name" : "purchaseContextType", "in" : "path", @@ -8783,19 +6088,15 @@ "schema" : { "type" : "string" } - }, { - "name" : "reservationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/RefundAmount" + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/TicketFieldDescriptionModification" + } } } }, @@ -8822,16 +6123,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -8853,59 +6144,22 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ResultBoolean" - } - } - } + "description" : "OK" } } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/credit" : { - "post" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "creditReservation", + "/admin/api/{eventName}/poll" : { + "get" : { + "tags" : [ "poll-admin-api-controller" ], + "operationId" : "getAllForEvent", "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "reservationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } - }, { - "name" : "refund", - "in" : "query", - "required" : true, - "schema" : { - "type" : "boolean" - } - }, { - "name" : "notify", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } } ], "responses" : { "500" : { @@ -8928,16 +6182,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -8963,64 +6207,37 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ResultBoolean" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PollModification" + } } } } } } - } - }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/cancel" : { + }, "post" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "removeReservation", + "tags" : [ "poll-admin-api-controller" ], + "operationId" : "createNewPoll", "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "reservationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } - }, { - "name" : "refund", - "in" : "query", - "required" : true, - "schema" : { - "type" : "boolean" - } - }, { - "name" : "notify", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "name" : "issueCreditNote", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PollModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -9042,16 +6259,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -9077,7 +6284,8 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ResultBoolean" + "type" : "integer", + "format" : "int64" } } } @@ -9085,31 +6293,31 @@ } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/new" : { + "/admin/api/{eventName}/poll/{pollId}/allow" : { "post" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "createNew", + "tags" : [ "poll-admin-api-controller" ], + "operationId" : "allowAttendees", "parameters" : [ { - "name" : "purchaseContextType", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] + "type" : "string" } }, { - "name" : "publicIdentifier", + "name" : "pollId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int64" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/AdminReservationModification" + "$ref" : "#/components/schemas/UpdateParticipantsForm" } } }, @@ -9136,16 +6344,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -9171,7 +6369,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ResultString" + "type" : "boolean" } } } @@ -9179,35 +6377,18 @@ } } }, - "/admin/api/reservation/event/{publicIdentifier}/{reservationId}/remove-tickets" : { + "/admin/api/utils/short-name/validate" : { "post" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "removeTickets", + "tags" : [ "utils-api-controller" ], + "operationId" : "validateShortName", "parameters" : [ { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "reservationId", - "in" : "path", + "name" : "shortName", + "in" : "query", "required" : true, "schema" : { "type" : "string" } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RemoveTicketsModification" - } - } - }, - "required" : true - }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -9229,16 +6410,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -9264,7 +6435,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ResultRemoveResult" + "type" : "boolean" } } } @@ -9272,20 +6443,26 @@ } } }, - "/admin/api/promo-code" : { + "/admin/api/users/{id}/enable/{enable}" : { "post" : { - "tags" : [ "promo-code-discount-api-controller" ], - "operationId" : "addPromoCode", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PromoCodeDiscountModification" - } - } - }, - "required" : true - }, + "tags" : [ "users-api-controller" ], + "operationId" : "enableUser", + "parameters" : [ { + "name" : "id", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "enable", + "in" : "path", + "required" : true, + "schema" : { + "type" : "boolean" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -9307,8 +6484,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -9317,8 +6494,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -9327,8 +6504,8 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { @@ -9336,31 +6513,27 @@ } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/promo-code/{promoCodeId}" : { + "/admin/api/users/new" : { "post" : { - "tags" : [ "promo-code-discount-api-controller" ], - "operationId" : "updatePromoCode", + "tags" : [ "users-api-controller" ], + "operationId" : "insertUser", "parameters" : [ { - "name" : "promoCodeId", - "in" : "path", + "name" : "baseUrl", + "in" : "query", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PromoCodeDiscountModification" + "$ref" : "#/components/schemas/UserModification" } } }, @@ -9387,8 +6560,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -9397,8 +6570,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -9407,33 +6580,33 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/UserWithPasswordAndQRCode" } } } - }, - "200" : { - "description" : "OK" } } - }, - "delete" : { - "tags" : [ "promo-code-discount-api-controller" ], - "operationId" : "removePromoCode", - "parameters" : [ { - "name" : "promoCodeId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], + } + }, + "/admin/api/users/edit" : { + "post" : { + "tags" : [ "users-api-controller" ], + "operationId" : "editUser", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -9455,8 +6628,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -9465,8 +6638,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -9475,8 +6648,8 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { @@ -9484,26 +6657,24 @@ } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/promo-code/{promoCodeId}/disable" : { + "/admin/api/users/current/update-password" : { "post" : { - "tags" : [ "promo-code-discount-api-controller" ], - "operationId" : "disablePromoCode", - "parameters" : [ { - "name" : "promoCodeId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], + "tags" : [ "users-api-controller" ], + "operationId" : "updateCurrentUserPassword", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PasswordModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -9525,8 +6696,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -9535,8 +6706,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -9545,87 +6716,34 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/ValidationResult" } } } - }, - "200" : { - "description" : "OK" - } - } - } - }, - "/admin/api/overridable-template/{name}/{locale}/preview" : { - "post" : { - "tags" : [ "resource-controller" ], - "operationId" : "previewTemplate", - "parameters" : [ { - "name" : "name", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "GOOGLE_ANALYTICS", "CONFIRMATION_EMAIL_FOR_ORGANIZER", "SEND_RESERVED_CODE", "CONFIRMATION_EMAIL", "CONFIRMATION_EMAIL_SUBSCRIPTION", "OFFLINE_RESERVATION_EXPIRED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL_FOR_ORGANIZER", "CREDIT_NOTE_ISSUED_EMAIL", "OFFLINE_RESERVATION_EXPIRING_EMAIL_FOR_ORGANIZER", "OFFLINE_PAYMENT_MATCHES_FOUND", "REMINDER_EMAIL", "REMINDER_TICKET_ADDITIONAL_INFO", "REMINDER_TICKETS_ASSIGNMENT_EMAIL", "TICKET_EMAIL", "TICKET_EMAIL_FOR_ONLINE_EVENT", "TICKET_HAS_CHANGED_OWNER", "TICKET_HAS_BEEN_CANCELLED", "TICKET_HAS_BEEN_CANCELLED_ADMIN", "TICKET_PDF", "RECEIPT_PDF", "INVOICE_PDF", "CREDIT_NOTE_PDF", "SUBSCRIPTION_PDF", "WAITING_QUEUE_JOINED", "WAITING_QUEUE_RESERVATION_EMAIL", "CUSTOM_MESSAGE" ] } - }, { - "name" : "locale", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "organizationId", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "eventId", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "subscriptionDescriptorId", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string", - "format" : "uuid" - } - } ], + } + } + }, + "/admin/api/users/current/edit" : { + "post" : { + "tags" : [ "users-api-controller" ], + "operationId" : "updateCurrentUser", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/UploadBase64FileModification" + "$ref" : "#/components/schemas/UserModification" } } }, "required" : true }, "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -9636,8 +6754,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -9672,15 +6790,15 @@ } } }, - "/admin/api/organizations/validate-slug" : { + "/admin/api/users/check" : { "post" : { "tags" : [ "users-api-controller" ], - "operationId" : "validateSlug", + "operationId" : "validateUser", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/OrganizationModification" + "$ref" : "#/components/schemas/UserModification" } } }, @@ -9707,16 +6825,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -9750,31 +6858,11 @@ } } }, - "/admin/api/organizations/update" : { - "post" : { - "tags" : [ "users-api-controller" ], - "operationId" : "updateOrganization", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OrganizationModification" - } - } - }, - "required" : true - }, + "/admin/api/resource/" : { + "get" : { + "tags" : [ "resource-controller" ], + "operationId" : "findAll", "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -9785,8 +6873,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -9820,29 +6908,40 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UploadedResource" + } } } } } } - } - }, - "/admin/api/organizations/new" : { + }, "post" : { - "tags" : [ "users-api-controller" ], - "operationId" : "insertOrganization", + "tags" : [ "resource-controller" ], + "operationId" : "uploadFile", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/OrganizationModification" + "$ref" : "#/components/schemas/UploadBase64FileModification" } } }, "required" : true }, "responses" : { + "400" : { + "description" : "Bad Request", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, "500" : { "description" : "Internal Server Error", "content" : { @@ -9853,8 +6952,8 @@ } } }, - "400" : { - "description" : "Bad Request", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -9863,8 +6962,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -9873,8 +6972,38 @@ } } }, - "401" : { - "description" : "Unauthorized", + "200" : { + "description" : "OK" + } + } + } + }, + "/admin/api/resource-organization/{organizationId}/" : { + "post" : { + "tags" : [ "resource-controller" ], + "operationId" : "uploadFile_1", + "parameters" : [ { + "name" : "organizationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UploadBase64FileModification" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -9883,8 +7012,8 @@ } } }, - "403" : { - "description" : "Forbidden", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -9893,8 +7022,18 @@ } } }, - "200" : { - "description" : "OK", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -9902,25 +7041,55 @@ } } } + }, + "200" : { + "description" : "OK" } } } }, - "/admin/api/organizations/check" : { + "/admin/api/resource-event/{organizationId}/{eventId}/" : { "post" : { - "tags" : [ "users-api-controller" ], - "operationId" : "validateOrganization", + "tags" : [ "resource-controller" ], + "operationId" : "uploadFile_2", + "parameters" : [ { + "name" : "organizationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "eventId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/OrganizationModification" + "$ref" : "#/components/schemas/UploadBase64FileModification" } } }, "required" : true }, "responses" : { + "400" : { + "description" : "Bad Request", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, "500" : { "description" : "Internal Server Error", "content" : { @@ -9931,8 +7100,62 @@ } } }, - "400" : { - "description" : "Bad Request", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK" + } + } + } + }, + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}" : { + "get" : { + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "loadReservation", + "parameters" : [ { + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -9941,8 +7164,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -9976,35 +7199,49 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidationResult" + "$ref" : "#/components/schemas/ResultTicketReservationDescriptor" } } } } } - } - }, - "/admin/api/organization/{organizationId}/subscription/{subscriptionId}" : { - "get" : { - "tags" : [ "subscription-api-controller" ], - "operationId" : "getSingle_1", + }, + "post" : { + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "updateReservation", "parameters" : [ { - "name" : "organizationId", + "name" : "purchaseContextType", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string", + "enum" : [ "subscription", "event" ] } }, { - "name" : "subscriptionId", + "name" : "publicIdentifier", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "format" : "uuid" + "type" : "string" + } + }, { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AdminReservationModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -10026,16 +7263,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -10061,38 +7288,46 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/SubscriptionDescriptorModification" + "$ref" : "#/components/schemas/ResultBoolean" } } } } } - }, + } + }, + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/refund" : { "post" : { - "tags" : [ "subscription-api-controller" ], - "operationId" : "update_4", + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "refund", "parameters" : [ { - "name" : "organizationId", + "name" : "purchaseContextType", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string", + "enum" : [ "subscription", "event" ] } }, { - "name" : "subscriptionId", + "name" : "publicIdentifier", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "format" : "uuid" + "type" : "string" + } + }, { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SubscriptionDescriptorModification" + "$ref" : "#/components/schemas/RefundAmount" } } }, @@ -10119,16 +7354,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -10154,32 +7379,54 @@ "content" : { "*/*" : { "schema" : { - "type" : "string", - "format" : "uuid" + "$ref" : "#/components/schemas/ResultBoolean" } } } } } - }, - "delete" : { - "tags" : [ "subscription-api-controller" ], - "operationId" : "deactivate_1", + } + }, + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/credit" : { + "post" : { + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "creditReservation", "parameters" : [ { - "name" : "organizationId", + "name" : "purchaseContextType", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string", + "enum" : [ "subscription", "event" ] } }, { - "name" : "subscriptionId", + "name" : "publicIdentifier", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "format" : "uuid" + "type" : "string" + } + }, { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "refund", + "in" : "query", + "required" : true, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "notify", + "in" : "query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false } } ], "responses" : { @@ -10203,8 +7450,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -10213,8 +7460,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -10223,45 +7470,69 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/ResultBoolean" } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/organization/{organizationId}/subscription/" : { + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/cancel" : { "post" : { - "tags" : [ "subscription-api-controller" ], - "operationId" : "create_2", + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "removeReservation", "parameters" : [ { - "name" : "organizationId", + "name" : "purchaseContextType", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "refund", + "in" : "query", + "required" : true, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "notify", + "in" : "query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "name" : "issueCreditNote", + "in" : "query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SubscriptionDescriptorModification" - } - } - }, - "required" : true - }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -10283,16 +7554,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -10318,8 +7579,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "string", - "format" : "uuid" + "$ref" : "#/components/schemas/ResultBoolean" } } } @@ -10327,40 +7587,37 @@ } } }, - "/admin/api/group/{groupId}/link" : { + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/new" : { "post" : { - "tags" : [ "group-api-controller" ], - "operationId" : "linkGroup", + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "createNew", "parameters" : [ { - "name" : "groupId", + "name" : "purchaseContextType", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/LinkedGroupModification" + "$ref" : "#/components/schemas/AdminReservationModification" } } }, "required" : true }, "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -10371,8 +7628,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -10406,8 +7663,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "integer", - "format" : "int32" + "$ref" : "#/components/schemas/ResultString" } } } @@ -10415,48 +7671,36 @@ } } }, - "/admin/api/group/for/{organizationId}/update/{groupId}" : { + "/admin/api/reservation/event/{publicIdentifier}/{reservationId}/remove-tickets" : { "post" : { - "tags" : [ "group-api-controller" ], - "operationId" : "updateGroup", + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "removeTickets", "parameters" : [ { - "name" : "organizationId", + "name" : "publicIdentifier", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } }, { - "name" : "groupId", + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/GroupModification" + "$ref" : "#/components/schemas/RemoveTicketsModification" } } }, "required" : true }, "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -10467,8 +7711,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -10502,7 +7746,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/GroupModification" + "$ref" : "#/components/schemas/ResultRemoveResult" } } } @@ -10510,40 +7754,21 @@ } } }, - "/admin/api/group/for/{organizationId}/new" : { + "/admin/api/promo-code" : { "post" : { - "tags" : [ "group-api-controller" ], - "operationId" : "createNew_1", - "parameters" : [ { - "name" : "organizationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], + "tags" : [ "promo-code-discount-api-controller" ], + "operationId" : "addPromoCode", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/GroupModification" + "$ref" : "#/components/schemas/PromoCodeDiscountModification" } } }, "required" : true }, "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -10554,8 +7779,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -10585,27 +7810,29 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } + "description" : "OK" } } } }, - "/admin/api/file/upload" : { + "/admin/api/promo-code/{promoCodeId}" : { "post" : { - "tags" : [ "file-upload-api-controller" ], - "operationId" : "uploadFile_3", + "tags" : [ "promo-code-discount-api-controller" ], + "operationId" : "updatePromoCode", + "parameters" : [ { + "name" : "promoCodeId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/UploadBase64FileModification" + "$ref" : "#/components/schemas/PromoCodeDiscountModification" } } }, @@ -10632,16 +7859,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -10663,22 +7880,22 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } + "description" : "OK" } } - } - }, - "/admin/api/extensions" : { - "get" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "listAll", + }, + "delete" : { + "tags" : [ "promo-code-discount-api-controller" ], + "operationId" : "removePromoCode", + "parameters" : [ { + "name" : "promoCodeId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -10700,16 +7917,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -10731,33 +7938,24 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExtensionSupport" - } - } - } - } + "description" : "OK" } } - }, + } + }, + "/admin/api/promo-code/{promoCodeId}/disable" : { "post" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "create_3", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Extension" - } - } - }, - "required" : true - }, + "tags" : [ "promo-code-discount-api-controller" ], + "operationId" : "disablePromoCode", + "parameters" : [ { + "name" : "promoCodeId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -10779,16 +7977,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -10810,48 +7998,66 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/SerializablePairBooleanString" - } - } - } + "description" : "OK" } } } }, - "/admin/api/extensions/{path}/{name}" : { - "get" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "loadSingle", + "/admin/api/overridable-template/{name}/{locale}/preview" : { + "post" : { + "tags" : [ "resource-controller" ], + "operationId" : "previewTemplate", "parameters" : [ { - "name" : "path", + "name" : "name", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "string", + "enum" : [ "GOOGLE_ANALYTICS", "CONFIRMATION_EMAIL_FOR_ORGANIZER", "SEND_RESERVED_CODE", "CONFIRMATION_EMAIL", "CONFIRMATION_EMAIL_SUBSCRIPTION", "OFFLINE_RESERVATION_EXPIRED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL_FOR_ORGANIZER", "CREDIT_NOTE_ISSUED_EMAIL", "OFFLINE_RESERVATION_EXPIRING_EMAIL_FOR_ORGANIZER", "OFFLINE_PAYMENT_MATCHES_FOUND", "REMINDER_EMAIL", "REMINDER_TICKET_ADDITIONAL_INFO", "REMINDER_TICKETS_ASSIGNMENT_EMAIL", "TICKET_EMAIL", "TICKET_EMAIL_FOR_ONLINE_EVENT", "TICKET_HAS_CHANGED_OWNER", "TICKET_HAS_BEEN_CANCELLED", "TICKET_HAS_BEEN_CANCELLED_ADMIN", "TICKET_PDF", "RECEIPT_PDF", "INVOICE_PDF", "CREDIT_NOTE_PDF", "SUBSCRIPTION_PDF", "WAITING_QUEUE_JOINED", "WAITING_QUEUE_RESERVATION_EMAIL", "CUSTOM_MESSAGE" ] } }, { - "name" : "name", + "name" : "locale", "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "organizationId", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "eventId", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "subscriptionDescriptorId", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string", + "format" : "uuid" + } } ], - "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UploadBase64FileModification" } } }, + "required" : true + }, + "responses" : { "400" : { "description" : "Bad Request", "content" : { @@ -10862,8 +8068,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -10893,40 +8099,20 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ExtensionSupport" - } - } - } + "description" : "OK" } } - }, + } + }, + "/admin/api/organizations/validate-slug" : { "post" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "update_5", - "parameters" : [ { - "name" : "path", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "name", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "users-api-controller" ], + "operationId" : "validateSlug", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Extension" + "$ref" : "#/components/schemas/OrganizationModification" } } }, @@ -10953,16 +8139,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -10988,31 +8164,28 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/SerializablePairBooleanString" + "$ref" : "#/components/schemas/ValidationResult" } } } } } - }, - "delete" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "delete_5", - "parameters" : [ { - "name" : "path", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "name", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + } + }, + "/admin/api/organizations/update" : { + "post" : { + "tags" : [ "users-api-controller" ], + "operationId" : "updateOrganization", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/OrganizationModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -11034,8 +8207,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -11044,8 +8217,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -11054,8 +8227,8 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { @@ -11063,39 +8236,24 @@ } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/extensions/{path}/{name}/toggle/{enable}" : { + "/admin/api/organizations/new" : { "post" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "toggle", - "parameters" : [ { - "name" : "path", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "name", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "enable", - "in" : "path", - "required" : true, - "schema" : { - "type" : "boolean" - } - } ], + "tags" : [ "users-api-controller" ], + "operationId" : "insertOrganization", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/OrganizationModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -11117,8 +8275,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -11127,8 +8285,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -11137,8 +8295,8 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { @@ -11146,25 +8304,19 @@ } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/extensions/setting/system/bulk-update" : { + "/admin/api/organizations/check" : { "post" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "bulkUpdateSystem", + "tags" : [ "users-api-controller" ], + "operationId" : "validateOrganization", "requestBody" : { "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExtensionMetadataValue" - } + "$ref" : "#/components/schemas/OrganizationModification" } } }, @@ -11191,8 +8343,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -11201,8 +8353,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -11211,28 +8363,25 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/ValidationResult" } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/extensions/setting/organization/{orgId}/event/{shortName}/bulk-update" : { - "post" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "bulkUpdateEvent", + "/admin/api/organization/{organizationId}/subscription/{subscriptionId}" : { + "get" : { + "tags" : [ "subscription-api-controller" ], + "operationId" : "getSingle_1", "parameters" : [ { - "name" : "orgId", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { @@ -11240,26 +8389,14 @@ "format" : "int32" } }, { - "name" : "shortName", + "name" : "subscriptionId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "string", + "format" : "uuid" } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExtensionMetadataValue" - } - } - } - }, - "required" : true - }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -11281,8 +8418,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -11291,8 +8428,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -11301,43 +8438,43 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/SubscriptionDescriptorModification" } } } - }, - "200" : { - "description" : "OK" } } - } - }, - "/admin/api/extensions/setting/organization/{orgId}/bulk-update" : { + }, "post" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "bulkUpdateOrganization", + "tags" : [ "subscription-api-controller" ], + "operationId" : "update_4", "parameters" : [ { - "name" : "orgId", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { "type" : "integer", "format" : "int32" } + }, { + "name" : "subscriptionId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "format" : "uuid" + } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExtensionMetadataValue" - } + "$ref" : "#/components/schemas/SubscriptionDescriptorModification" } } }, @@ -11364,8 +8501,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -11374,8 +8511,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -11384,45 +8521,39 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "string", + "format" : "uuid" } } } - }, - "200" : { - "description" : "OK" } } - } - }, - "/admin/api/events/{id}/prices/update" : { - "post" : { - "tags" : [ "event-api-controller" ], - "operationId" : "updatePrices", + }, + "delete" : { + "tags" : [ "subscription-api-controller" ], + "operationId" : "deactivate_1", "parameters" : [ { - "name" : "id", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { "type" : "integer", "format" : "int32" } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/EventModification" - } - } - }, - "required" : true - }, + }, { + "name" : "subscriptionId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "format" : "uuid" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -11444,16 +8575,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -11475,24 +8596,17 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ValidationResult" - } - } - } + "description" : "OK" } } } }, - "/admin/api/events/{id}/header/update" : { + "/admin/api/organization/{organizationId}/subscription/" : { "post" : { - "tags" : [ "event-api-controller" ], - "operationId" : "updateHeader", + "tags" : [ "subscription-api-controller" ], + "operationId" : "create_2", "parameters" : [ { - "name" : "id", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { @@ -11504,7 +8618,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/EventModification" + "$ref" : "#/components/schemas/SubscriptionDescriptorModification" } } }, @@ -11531,16 +8645,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -11566,7 +8670,8 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidationResult" + "type" : "string", + "format" : "uuid" } } } @@ -11574,46 +8679,30 @@ } } }, - "/admin/api/events/{eventName}/pending-payments/{reservationId}/confirm" : { + "/admin/api/group/{groupId}/link" : { "post" : { - "tags" : [ "event-api-controller" ], - "operationId" : "confirmPayment", + "tags" : [ "group-api-controller" ], + "operationId" : "linkGroup", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "reservationId", + "name" : "groupId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/TransactionMetadataModification" + "$ref" : "#/components/schemas/LinkedGroupModification" } } }, "required" : true }, "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -11624,8 +8713,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -11659,7 +8748,8 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } } @@ -11667,39 +8757,38 @@ } } }, - "/admin/api/events/{eventName}/pending-payments/bulk-confirmation" : { + "/admin/api/group/for/{organizationId}/update/{groupId}" : { "post" : { - "tags" : [ "event-api-controller" ], - "operationId" : "bulkConfirmation", + "tags" : [ "group-api-controller" ], + "operationId" : "updateGroup", "parameters" : [ { - "name" : "eventName", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "groupId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/UploadBase64FileModification" + "$ref" : "#/components/schemas/GroupModification" } } }, "required" : true }, "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -11710,8 +8799,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -11745,10 +8834,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TripleBooleanStringString" - } + "$ref" : "#/components/schemas/GroupModification" } } } @@ -11756,21 +8842,14 @@ } } }, - "/admin/api/events/{eventName}/messages/send" : { + "/admin/api/group/for/{organizationId}/new" : { "post" : { - "tags" : [ "custom-messages-api-controller" ], - "operationId" : "send", + "tags" : [ "group-api-controller" ], + "operationId" : "createNew_1", "parameters" : [ { - "name" : "eventName", + "name" : "organizationId", "in" : "path", "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "categoryId", - "in" : "query", - "required" : false, "schema" : { "type" : "integer", "format" : "int32" @@ -11780,10 +8859,7 @@ "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/MessageModification" - } + "$ref" : "#/components/schemas/GroupModification" } } }, @@ -11810,8 +8886,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -11820,8 +8896,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -11830,8 +8906,8 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { @@ -11839,57 +8915,25 @@ } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/events/{eventName}/messages/preview" : { + "/admin/api/file/upload" : { "post" : { - "tags" : [ "custom-messages-api-controller" ], - "operationId" : "preview", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "categoryId", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], + "tags" : [ "file-upload-api-controller" ], + "operationId" : "uploadFile_3", "requestBody" : { "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/MessageModification" - } + "$ref" : "#/components/schemas/UploadBase64FileModification" } } }, "required" : true }, "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -11900,8 +8944,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -11935,10 +8979,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "object" - } + "type" : "string" } } } @@ -11946,39 +8987,10 @@ } } }, - "/admin/api/events/{eventName}/categories/{categoryId}/send-codes" : { - "post" : { - "tags" : [ "special-price-api-controller" ], - "operationId" : "sendCodes", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "categoryId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SendCodeModification" - } - } - } - }, - "required" : true - }, + "/admin/api/extensions" : { + "get" : { + "tags" : [ "extension-api-controller" ], + "operationId" : "listAll", "responses" : { "500" : { "description" : "Internal Server Error", @@ -12000,16 +9012,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12035,39 +9037,24 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ExtensionSupport" + } } } } } } - } - }, - "/admin/api/events/{eventName}/categories/{categoryId}/link-codes" : { + }, "post" : { - "tags" : [ "special-price-api-controller" ], - "operationId" : "linkAssigneeToCodes", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "categoryId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], + "tags" : [ "extension-api-controller" ], + "operationId" : "create_3", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/UploadBase64FileModification" + "$ref" : "#/components/schemas/Extension" } } }, @@ -12094,16 +9081,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12129,10 +9106,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SendCodeModification" - } + "$ref" : "#/components/schemas/SerializablePairBooleanString" } } } @@ -12140,39 +9114,25 @@ } } }, - "/admin/api/events/{eventName}/capability/{capability}" : { - "post" : { - "tags" : [ "event-api-controller" ], - "operationId" : "executeCapabilityForEvent", + "/admin/api/extensions/{path}/{name}" : { + "get" : { + "tags" : [ "extension-api-controller" ], + "operationId" : "loadSingle", "parameters" : [ { - "name" : "eventName", + "name" : "path", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "capability", + "name" : "name", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "GENERATE_MEETING_LINK", "CREATE_VIRTUAL_ROOM", "CREATE_ANONYMOUS_GUEST_LINK", "CREATE_GUEST_LINK", "LINK_EXTERNAL_APPLICATION" ] + "type" : "string" } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - } - }, - "required" : true - }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -12194,16 +9154,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12229,40 +9179,36 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/ExtensionSupport" } } } } } - } - }, - "/admin/api/events/{eventId}/categories/{categoryId}/update" : { + }, "post" : { - "tags" : [ "event-api-controller" ], - "operationId" : "updateExistingCategory", + "tags" : [ "extension-api-controller" ], + "operationId" : "update_5", "parameters" : [ { - "name" : "eventId", + "name" : "path", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } }, { - "name" : "categoryId", + "name" : "name", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/TicketCategoryModification" + "$ref" : "#/components/schemas/Extension" } } }, @@ -12289,16 +9235,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12324,37 +9260,31 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidationResult" + "$ref" : "#/components/schemas/SerializablePairBooleanString" } } } } } - } - }, - "/admin/api/events/{eventId}/categories/new" : { - "post" : { - "tags" : [ "event-api-controller" ], - "operationId" : "createCategory", + }, + "delete" : { + "tags" : [ "extension-api-controller" ], + "operationId" : "delete_5", "parameters" : [ { - "name" : "eventId", + "name" : "path", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" + } + }, { + "name" : "name", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TicketCategoryModification" - } - } - }, - "required" : true - }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -12376,16 +9306,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12407,32 +9327,37 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ValidationResult" - } - } - } + "description" : "OK" } } } }, - "/admin/api/events/new" : { + "/admin/api/extensions/{path}/{name}/toggle/{enable}" : { "post" : { - "tags" : [ "event-api-controller" ], - "operationId" : "insertEvent", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/EventModification" - } - } - }, - "required" : true - }, + "tags" : [ "extension-api-controller" ], + "operationId" : "toggle", + "parameters" : [ { + "name" : "path", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "name", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "enable", + "in" : "path", + "required" : true, + "schema" : { + "type" : "boolean" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -12454,16 +9379,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12485,27 +9400,23 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } + "description" : "OK" } } } }, - "/admin/api/events/check" : { + "/admin/api/extensions/setting/system/bulk-update" : { "post" : { - "tags" : [ "event-api-controller" ], - "operationId" : "validateEventRequest", + "tags" : [ "extension-api-controller" ], + "operationId" : "bulkUpdateSystem", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/EventModification" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ExtensionMetadataValue" + } } } }, @@ -12532,16 +9443,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12563,43 +9464,39 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ValidationResult" - } - } - } + "description" : "OK" } } } }, - "/admin/api/event/{eventName}/attendees/import" : { + "/admin/api/extensions/setting/organization/{orgId}/event/{shortName}/bulk-update" : { "post" : { - "tags" : [ "attendee-bulk-import-api-controller" ], - "operationId" : "createReservations", + "tags" : [ "extension-api-controller" ], + "operationId" : "bulkUpdateEvent", "parameters" : [ { - "name" : "eventName", + "name" : "orgId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } }, { - "name" : "oneReservationPerAttendee", - "in" : "query", - "required" : false, + "name" : "shortName", + "in" : "path", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false + "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/AdminReservationModification" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ExtensionMetadataValue" + } } } }, @@ -12626,16 +9523,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12657,24 +9544,17 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ResultString" - } - } - } + "description" : "OK" } } } }, - "/admin/api/event/{eventId}/additional-services" : { - "get" : { - "tags" : [ "additional-service-api-controller" ], - "operationId" : "loadAll", + "/admin/api/extensions/setting/organization/{orgId}/bulk-update" : { + "post" : { + "tags" : [ "extension-api-controller" ], + "operationId" : "bulkUpdateOrganization", "parameters" : [ { - "name" : "eventId", + "name" : "orgId", "in" : "path", "required" : true, "schema" : { @@ -12682,6 +9562,19 @@ "format" : "int32" } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ExtensionMetadataValue" + } + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -12703,16 +9596,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12734,25 +9617,17 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdditionalService" - } - } - } - } + "description" : "OK" } } - }, + } + }, + "/admin/api/events/{id}/prices/update" : { "post" : { - "tags" : [ "additional-service-api-controller" ], - "operationId" : "insert", + "tags" : [ "event-api-controller" ], + "operationId" : "updatePrices", "parameters" : [ { - "name" : "eventId", + "name" : "id", "in" : "path", "required" : true, "schema" : { @@ -12764,7 +9639,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/AdditionalService" + "$ref" : "#/components/schemas/EventModification" } } }, @@ -12791,16 +9666,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12826,7 +9691,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/AdditionalService" + "$ref" : "#/components/schemas/ValidationResult" } } } @@ -12834,15 +9699,24 @@ } } }, - "/admin/api/configuration/update" : { + "/admin/api/events/{id}/header/update" : { "post" : { - "tags" : [ "configuration-api-controller" ], - "operationId" : "updateConfiguration", + "tags" : [ "event-api-controller" ], + "operationId" : "updateHeader", + "parameters" : [ { + "name" : "id", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ConfigurationModification" + "$ref" : "#/components/schemas/EventModification" } } }, @@ -12869,16 +9743,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12904,7 +9768,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "$ref" : "#/components/schemas/ValidationResult" } } } @@ -12912,21 +9776,30 @@ } } }, - "/admin/api/configuration/update-bulk" : { + "/admin/api/events/{eventName}/pending-payments/{reservationId}/confirm" : { "post" : { - "tags" : [ "configuration-api-controller" ], - "operationId" : "updateConfiguration_1", + "tags" : [ "event-api-controller" ], + "operationId" : "confirmPayment", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ConfigurationModification" - } - } + "$ref" : "#/components/schemas/TransactionMetadataModification" } } }, @@ -12953,16 +9826,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -12988,7 +9851,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "type" : "string" } } } @@ -12996,30 +9859,23 @@ } } }, - "/admin/api/configuration/organizations/{organizationId}/update" : { + "/admin/api/events/{eventName}/pending-payments/bulk-confirmation" : { "post" : { - "tags" : [ "configuration-api-controller" ], - "operationId" : "updateOrganizationConfiguration", + "tags" : [ "event-api-controller" ], + "operationId" : "bulkConfirmation", "parameters" : [ { - "name" : "organizationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ConfigurationModification" - } - } + "$ref" : "#/components/schemas/UploadBase64FileModification" } } }, @@ -13046,16 +9902,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -13081,7 +9927,10 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TripleBooleanStringString" + } } } } @@ -13089,22 +9938,21 @@ } } }, - "/admin/api/configuration/organizations/{organizationId}/events/{eventId}/update" : { + "/admin/api/events/{eventName}/messages/send" : { "post" : { - "tags" : [ "configuration-api-controller" ], - "operationId" : "updateEventConfiguration", + "tags" : [ "custom-messages-api-controller" ], + "operationId" : "send", "parameters" : [ { - "name" : "organizationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } }, { - "name" : "eventId", - "in" : "path", - "required" : true, + "name" : "categoryId", + "in" : "query", + "required" : false, "schema" : { "type" : "integer", "format" : "int32" @@ -13114,12 +9962,9 @@ "content" : { "application/json" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ConfigurationModification" - } + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MessageModification" } } } @@ -13127,16 +9972,6 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -13147,8 +9982,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -13178,34 +10013,26 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "boolean" - } - } - } + "description" : "OK" } } } }, - "/admin/api/configuration/events/{eventId}/categories/{categoryId}/update" : { + "/admin/api/events/{eventName}/messages/preview" : { "post" : { - "tags" : [ "configuration-api-controller" ], - "operationId" : "updateCategoryConfiguration", + "tags" : [ "custom-messages-api-controller" ], + "operationId" : "preview", "parameters" : [ { - "name" : "categoryId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } }, { - "name" : "eventId", - "in" : "path", - "required" : true, + "name" : "categoryId", + "in" : "query", + "required" : false, "schema" : { "type" : "integer", "format" : "int32" @@ -13215,12 +10042,9 @@ "content" : { "application/json" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ConfigurationModification" - } + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MessageModification" } } } @@ -13228,16 +10052,6 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -13248,8 +10062,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -13283,7 +10097,10 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "type" : "object", + "additionalProperties" : { + "type" : "object" + } } } } @@ -13291,12 +10108,19 @@ } } }, - "/admin/api/configuration/event/{eventId}/regenerate-invoices" : { + "/admin/api/events/{eventName}/categories/{categoryId}/send-codes" : { "post" : { - "tags" : [ "configuration-api-controller" ], - "operationId" : "regenerateInvoices", + "tags" : [ "special-price-api-controller" ], + "operationId" : "sendCodes", "parameters" : [ { - "name" : "eventId", + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "categoryId", "in" : "path", "required" : true, "schema" : { @@ -13310,8 +10134,7 @@ "schema" : { "type" : "array", "items" : { - "type" : "integer", - "format" : "int64" + "$ref" : "#/components/schemas/SendCodeModification" } } } @@ -13339,16 +10162,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -13382,10 +10195,10 @@ } } }, - "/admin/api/check-in/{eventName}/offline" : { + "/admin/api/events/{eventName}/categories/{categoryId}/link-codes" : { "post" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "getOfflineEncryptedInfo", + "tags" : [ "special-price-api-controller" ], + "operationId" : "linkAssigneeToCodes", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -13394,25 +10207,19 @@ "type" : "string" } }, { - "name" : "additionalField", - "in" : "query", - "required" : false, + "name" : "categoryId", + "in" : "path", + "required" : true, "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "type" : "integer", + "format" : "int32" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int32" - } + "$ref" : "#/components/schemas/UploadBase64FileModification" } } }, @@ -13439,16 +10246,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -13474,9 +10271,9 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SendCodeModification" } } } @@ -13485,27 +10282,33 @@ } } }, - "/admin/api/check-in/{eventId}/tickets" : { + "/admin/api/events/{eventName}/capability/{capability}" : { "post" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "findAllTicketsForAdminCheckIn", + "tags" : [ "event-api-controller" ], + "operationId" : "executeCapabilityForEvent", "parameters" : [ { - "name" : "eventId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" + } + }, { + "name" : "capability", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "GENERATE_MEETING_LINK", "CREATE_VIRTUAL_ROOM", "CREATE_ANONYMOUS_GUEST_LINK", "CREATE_GUEST_LINK", "LINK_EXTERNAL_APPLICATION" ] } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int32" + "type" : "object", + "additionalProperties" : { + "type" : "string" } } } @@ -13533,16 +10336,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -13568,10 +10361,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/FullTicketInfo" - } + "type" : "string" } } } @@ -13579,10 +10369,10 @@ } } }, - "/admin/api/check-in/{eventId}/ticket/{ticketIdentifier}" : { - "get" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "findTicketWithUUID", + "/admin/api/events/{eventId}/categories/{categoryId}/update" : { + "post" : { + "tags" : [ "event-api-controller" ], + "operationId" : "updateExistingCategory", "parameters" : [ { "name" : "eventId", "in" : "path", @@ -13592,20 +10382,24 @@ "format" : "int32" } }, { - "name" : "ticketIdentifier", + "name" : "categoryId", "in" : "path", "required" : true, "schema" : { - "type" : "string" - } - }, { - "name" : "qrCode", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TicketCategoryModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -13627,16 +10421,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -13662,16 +10446,18 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/TicketAndCheckInResult" + "$ref" : "#/components/schemas/ValidationResult" } } } } } - }, + } + }, + "/admin/api/events/{eventId}/categories/new" : { "post" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "checkIn", + "tags" : [ "event-api-controller" ], + "operationId" : "createCategory", "parameters" : [ { "name" : "eventId", "in" : "path", @@ -13680,19 +10466,12 @@ "type" : "integer", "format" : "int32" } - }, { - "name" : "ticketIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/TicketCode" + "$ref" : "#/components/schemas/TicketCategoryModification" } } }, @@ -13719,16 +10498,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -13754,7 +10523,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/TicketAndCheckInResult" + "$ref" : "#/components/schemas/ValidationResult" } } } @@ -13762,26 +10531,20 @@ } } }, - "/admin/api/check-in/{eventId}/ticket/{ticketIdentifier}/revert-check-in" : { + "/admin/api/events/new" : { "post" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "revertCheckIn", - "parameters" : [ { - "name" : "eventId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "ticketIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "event-api-controller" ], + "operationId" : "insertEvent", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EventModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -13803,16 +10566,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -13838,7 +10591,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "type" : "string" } } } @@ -13846,26 +10599,20 @@ } } }, - "/admin/api/check-in/{eventId}/ticket/{ticketIdentifier}/manual-check-in" : { + "/admin/api/events/check" : { "post" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "manualCheckIn", - "parameters" : [ { - "name" : "eventId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "ticketIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "event-api-controller" ], + "operationId" : "validateEventRequest", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EventModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -13887,16 +10634,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -13922,7 +10659,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "$ref" : "#/components/schemas/ValidationResult" } } } @@ -13930,26 +10667,36 @@ } } }, - "/admin/api/check-in/{eventId}/ticket/{ticketIdentifier}/confirm-on-site-payment" : { + "/admin/api/event/{eventName}/attendees/import" : { "post" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "confirmOnSitePayment", + "tags" : [ "attendee-bulk-import-api-controller" ], + "operationId" : "createReservations", "parameters" : [ { - "name" : "eventId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } }, { - "name" : "ticketIdentifier", - "in" : "path", - "required" : true, + "name" : "oneReservationPerAttendee", + "in" : "query", + "required" : false, "schema" : { - "type" : "string" + "type" : "boolean", + "default" : false } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AdminReservationModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -13971,16 +10718,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -14006,7 +10743,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/OnSitePaymentConfirmation" + "$ref" : "#/components/schemas/ResultString" } } } @@ -14014,30 +10751,17 @@ } } }, - "/admin/api/check-in/event/{eventName}/ticket/{ticketIdentifier}" : { + "/admin/api/event/{eventId}/additional-services" : { "get" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "findTicketWithUUID_1", + "tags" : [ "additional-service-api-controller" ], + "operationId" : "loadAll", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "ticketIdentifier", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" - } - }, { - "name" : "qrCode", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -14061,16 +10785,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -14096,7 +10810,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/TicketAndCheckInResult" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AdditionalService" + } } } } @@ -14104,35 +10821,22 @@ } }, "post" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "checkIn_1", + "tags" : [ "additional-service-api-controller" ], + "operationId" : "insert", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "ticketIdentifier", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" - } - }, { - "name" : "offlineUser", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/TicketCode" + "$ref" : "#/components/schemas/AdditionalService" } } }, @@ -14159,16 +10863,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -14194,7 +10888,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/TicketAndCheckInResult" + "$ref" : "#/components/schemas/AdditionalService" } } } @@ -14202,38 +10896,97 @@ } } }, - "/admin/api/check-in/event/{eventName}/ticket/{ticketIdentifier}/revert-check-in" : { + "/admin/api/configuration/update" : { "post" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "revertCheckIn_1", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "ticketIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "configuration-api-controller" ], + "operationId" : "updateConfiguration", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConfigurationModification" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad Request", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "type" : "boolean" + } + } + } + } + } + } + }, + "/admin/api/configuration/update-bulk" : { + "post" : { + "tags" : [ "configuration-api-controller" ], + "operationId" : "updateConfiguration_1", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ConfigurationModification" + } } } } }, - "400" : { - "description" : "Bad Request", + "required" : true + }, + "responses" : { + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -14242,8 +10995,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -14285,25 +11038,35 @@ } } }, - "/admin/api/check-in/event/{eventName}/ticket/{ticketIdentifier}/manual-check-in" : { + "/admin/api/configuration/organizations/{organizationId}/update" : { "post" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "manualCheckIn_1", + "tags" : [ "configuration-api-controller" ], + "operationId" : "updateOrganizationConfiguration", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "ticketIdentifier", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ConfigurationModification" + } + } + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -14325,16 +11088,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -14368,37 +11121,38 @@ } } }, - "/admin/api/check-in/event/{eventName}/ticket/{ticketIdentifier}/confirm-on-site-payment" : { + "/admin/api/configuration/organizations/{organizationId}/events/{eventId}/update" : { "post" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "confirmOnSitePayment_1", + "tags" : [ "configuration-api-controller" ], + "operationId" : "updateEventConfiguration", "parameters" : [ { - "name" : "eventName", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } }, { - "name" : "ticketIdentifier", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" - } - }, { - "name" : "offlineUser", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/TicketCode" + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ConfigurationModification" + } + } } } }, @@ -14425,16 +11179,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -14460,7 +11204,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/TicketAndCheckInResult" + "type" : "boolean" } } } @@ -14468,40 +11212,37 @@ } } }, - "/admin/api/check-in/event/{eventName}/bulk" : { + "/admin/api/configuration/events/{eventId}/categories/{categoryId}/update" : { "post" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "bulkCheckIn", + "tags" : [ "configuration-api-controller" ], + "operationId" : "updateCategoryConfiguration", "parameters" : [ { - "name" : "eventName", + "name" : "categoryId", "in" : "path", "required" : true, "schema" : { - "type" : "string" - } - }, { - "name" : "offlineUser", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } }, { - "name" : "forceCheckInPaymentOnSite", - "in" : "query", - "required" : false, + "name" : "eventId", + "in" : "path", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false + "type" : "integer", + "format" : "int32" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TicketIdentifierCode" + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ConfigurationModification" + } } } } @@ -14529,16 +11270,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -14564,10 +11295,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/TicketAndCheckInResult" - } + "type" : "boolean" } } } @@ -14575,15 +11303,28 @@ } } }, - "/admin/api/api-keys/bulk" : { + "/admin/api/configuration/event/{eventId}/regenerate-invoices" : { "post" : { - "tags" : [ "users-api-controller" ], - "operationId" : "bulkCreate", + "tags" : [ "configuration-api-controller" ], + "operationId" : "regenerateInvoices", + "parameters" : [ { + "name" : "eventId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/BulkApiKeyCreation" + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } } } }, @@ -14610,16 +11351,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -14645,7 +11376,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "boolean" } } } @@ -14653,15 +11384,37 @@ } } }, - "/admin/api/additional-services/validate" : { + "/admin/api/check-in/{eventName}/offline" : { "post" : { - "tags" : [ "additional-service-api-controller" ], - "operationId" : "checkAdditionalService", + "tags" : [ "check-in-api-controller" ], + "operationId" : "getOfflineEncryptedInfo", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "additionalField", + "in" : "query", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/AdditionalService" + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int32" + } } } }, @@ -14688,16 +11441,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -14723,7 +11466,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidationResult" + "type" : "object", + "additionalProperties" : { + "type" : "string" + } } } } @@ -14731,34 +11477,33 @@ } } }, - "/admin/api/organization/{organizationId}/subscription/{subscriptionId}/is-public" : { - "patch" : { - "tags" : [ "subscription-api-controller" ], - "operationId" : "setPublicState", + "/admin/api/check-in/{eventId}/tickets" : { + "post" : { + "tags" : [ "check-in-api-controller" ], + "operationId" : "findAllTicketsForAdminCheckIn", "parameters" : [ { - "name" : "organizationId", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { "type" : "integer", "format" : "int32" } - }, { - "name" : "subscriptionId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "format" : "uuid" - } - }, { - "name" : "status", - "in" : "query", - "required" : true, - "schema" : { - "type" : "boolean" - } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -14780,16 +11525,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -14815,7 +11550,10 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/FullTicketInfo" + } } } } @@ -14823,36 +11561,33 @@ } } }, - "/api/wallet/event/{eventName}/v1/version/passes/{uuid}" : { + "/admin/api/check-in/{eventId}/ticket/{ticketIdentifier}" : { "get" : { - "tags" : [ "google-wallet-api-controller" ], - "operationId" : "walletPass", + "tags" : [ "check-in-api-controller" ], + "operationId" : "findTicketWithUUID", "parameters" : [ { - "name" : "eventName", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } }, { - "name" : "uuid", + "name" : "ticketIdentifier", "in" : "path", "required" : true, "schema" : { "type" : "string" } - } ], - "responses" : { - "200" : { - "description" : "OK" + }, { + "name" : "qrCode", + "in" : "query", + "required" : true, + "schema" : { + "type" : "string" } - } - } - }, - "/api/v2/public/user/reservations" : { - "get" : { - "tags" : [ "user-api-v-2-controller" ], - "operationId" : "getUserReservations", + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -14874,16 +11609,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -14909,21 +11634,42 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PurchaseContextWithReservations" - } + "$ref" : "#/components/schemas/TicketAndCheckInResult" } } } } } - } - }, - "/api/v2/public/user/authentication-enabled" : { - "get" : { - "tags" : [ "user-api-v-2-controller" ], - "operationId" : "userAuthenticationEnabled", + }, + "post" : { + "tags" : [ "check-in-api-controller" ], + "operationId" : "checkIn", + "parameters" : [ { + "name" : "eventId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "ticketIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TicketCode" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -14945,16 +11691,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -14980,7 +11716,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "$ref" : "#/components/schemas/TicketAndCheckInResult" } } } @@ -14988,16 +11724,24 @@ } } }, - "/api/v2/public/subscriptions" : { - "get" : { - "tags" : [ "subscriptions-api-controller" ], - "operationId" : "listSubscriptions", + "/admin/api/check-in/{eventId}/ticket/{ticketIdentifier}/revert-check-in" : { + "post" : { + "tags" : [ "check-in-api-controller" ], + "operationId" : "revertCheckIn", "parameters" : [ { - "name" : "searchOptions", - "in" : "query", + "name" : "eventId", + "in" : "path", "required" : true, "schema" : { - "$ref" : "#/components/schemas/SearchOptions" + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "ticketIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } } ], "responses" : { @@ -15021,16 +11765,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15056,36 +11790,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BasicSubscriptionDescriptorInfo" - } - } - } - } - } - } - } - }, - "/api/v2/public/reservation/{reservationId}/transaction/force-check" : { - "get" : { - "tags" : [ "payment-api-controller" ], - "operationId" : "forceCheckStatus", - "parameters" : [ { - "name" : "reservationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentResult" + "type" : "boolean" } } } @@ -15093,38 +11798,20 @@ } } }, - "/api/v2/public/event/{eventName}/reservation/{reservationId}/transaction/force-check" : { - "get" : { - "tags" : [ "payment-api-controller" ], - "operationId" : "forceCheckStatus_1", + "/admin/api/check-in/{eventId}/ticket/{ticketIdentifier}/manual-check-in" : { + "post" : { + "tags" : [ "check-in-api-controller" ], + "operationId" : "manualCheckIn", "parameters" : [ { - "name" : "reservationId", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentResult" - } - } - } + "type" : "integer", + "format" : "int32" } - } - } - }, - "/api/v2/public/reservation/{reservationId}/status" : { - "get" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "getReservationStatus", - "parameters" : [ { - "name" : "reservationId", + }, { + "name" : "ticketIdentifier", "in" : "path", "required" : true, "schema" : { @@ -15152,16 +11839,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15187,7 +11864,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ReservationStatusInfo" + "type" : "boolean" } } } @@ -15195,12 +11872,20 @@ } } }, - "/api/v2/public/event/{eventName}/reservation/{reservationId}/status" : { - "get" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "getReservationStatus_1", + "/admin/api/check-in/{eventId}/ticket/{ticketIdentifier}/confirm-on-site-payment" : { + "post" : { + "tags" : [ "check-in-api-controller" ], + "operationId" : "confirmOnSitePayment", "parameters" : [ { - "name" : "reservationId", + "name" : "eventId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "ticketIdentifier", "in" : "path", "required" : true, "schema" : { @@ -15228,16 +11913,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15263,7 +11938,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ReservationStatusInfo" + "$ref" : "#/components/schemas/OnSitePaymentConfirmation" } } } @@ -15271,24 +11946,31 @@ } } }, - "/api/v2/public/reservation/{reservationId}/payment/{method}/status" : { + "/admin/api/check-in/event/{eventName}/ticket/{ticketIdentifier}" : { "get" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "getTransactionStatus", + "tags" : [ "check-in-api-controller" ], + "operationId" : "findTicketWithUUID_1", "parameters" : [ { - "name" : "reservationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "method", + "name" : "ticketIdentifier", "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "qrCode", + "in" : "query", + "required" : true, + "schema" : { + "type" : "string" + } } ], "responses" : { "500" : { @@ -15311,16 +11993,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15346,33 +12018,48 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ReservationPaymentResult" + "$ref" : "#/components/schemas/TicketAndCheckInResult" } } } } } - } - }, - "/api/v2/public/event/{eventName}/reservation/{reservationId}/payment/{method}/status" : { - "get" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "getTransactionStatus_1", + }, + "post" : { + "tags" : [ "check-in-api-controller" ], + "operationId" : "checkIn_1", "parameters" : [ { - "name" : "reservationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "method", + "name" : "ticketIdentifier", "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "offlineUser", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TicketCode" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -15394,16 +12081,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15429,7 +12106,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ReservationPaymentResult" + "$ref" : "#/components/schemas/TicketAndCheckInResult" } } } @@ -15437,10 +12114,25 @@ } } }, - "/api/v2/public/i18n/languages" : { - "get" : { - "tags" : [ "translations-api-controller" ], - "operationId" : "getSupportedLanguages", + "/admin/api/check-in/event/{eventName}/ticket/{ticketIdentifier}/revert-check-in" : { + "post" : { + "tags" : [ "check-in-api-controller" ], + "operationId" : "revertCheckIn_1", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ticketIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -15462,16 +12154,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15497,10 +12179,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Language" - } + "type" : "boolean" } } } @@ -15508,12 +12187,19 @@ } } }, - "/api/v2/public/i18n/eu-countries-vat/{lang}" : { - "get" : { - "tags" : [ "translations-api-controller" ], - "operationId" : "getEuCountriesForVat", + "/admin/api/check-in/event/{eventName}/ticket/{ticketIdentifier}/manual-check-in" : { + "post" : { + "tags" : [ "check-in-api-controller" ], + "operationId" : "manualCheckIn_1", "parameters" : [ { - "name" : "lang", + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ticketIdentifier", "in" : "path", "required" : true, "schema" : { @@ -15541,16 +12227,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15576,10 +12252,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/LocalizedCountry" - } + "type" : "boolean" } } } @@ -15587,18 +12260,42 @@ } } }, - "/api/v2/public/i18n/countries/{lang}" : { - "get" : { - "tags" : [ "translations-api-controller" ], - "operationId" : "getCountries", + "/admin/api/check-in/event/{eventName}/ticket/{ticketIdentifier}/confirm-on-site-payment" : { + "post" : { + "tags" : [ "check-in-api-controller" ], + "operationId" : "confirmOnSitePayment_1", "parameters" : [ { - "name" : "lang", + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ticketIdentifier", "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "offlineUser", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TicketCode" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -15620,16 +12317,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15655,10 +12342,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/LocalizedCountry" - } + "$ref" : "#/components/schemas/TicketAndCheckInResult" } } } @@ -15666,18 +12350,46 @@ } } }, - "/api/v2/public/i18n/countries-vat/{lang}" : { - "get" : { - "tags" : [ "translations-api-controller" ], - "operationId" : "getCountriesForVat", + "/admin/api/check-in/event/{eventName}/bulk" : { + "post" : { + "tags" : [ "check-in-api-controller" ], + "operationId" : "bulkCheckIn", "parameters" : [ { - "name" : "lang", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "offlineUser", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "forceCheckInPaymentOnSite", + "in" : "query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TicketIdentifierCode" + } + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -15699,16 +12411,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15734,9 +12436,9 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/LocalizedCountry" + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/TicketAndCheckInResult" } } } @@ -15745,26 +12447,20 @@ } } }, - "/api/v2/public/i18n/bundle/{lang}" : { - "get" : { - "tags" : [ "translations-api-controller" ], - "operationId" : "getPublicTranslations", - "parameters" : [ { - "name" : "lang", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "withSystemOverride", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : true - } - } ], + "/admin/api/api-keys/bulk" : { + "post" : { + "tags" : [ "users-api-controller" ], + "operationId" : "bulkCreate", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BulkApiKeyCreation" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -15786,16 +12482,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15821,10 +12507,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } + "type" : "string" } } } @@ -15832,18 +12515,20 @@ } } }, - "/api/v2/public/events" : { - "get" : { - "tags" : [ "event-api-v-2-controller" ], - "operationId" : "listEvents", - "parameters" : [ { - "name" : "searchOptions", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SearchOptions" - } - } ], + "/admin/api/additional-services/validate" : { + "post" : { + "tags" : [ "additional-service-api-controller" ], + "operationId" : "checkAdditionalService", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AdditionalService" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -15865,16 +12550,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15900,10 +12575,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BasicEventInfo" - } + "$ref" : "#/components/schemas/ValidationResult" } } } @@ -15911,16 +12583,32 @@ } } }, - "/api/v2/public/event/{eventName}" : { - "get" : { - "tags" : [ "event-api-v-2-controller" ], - "operationId" : "getEvent", + "/admin/api/organization/{organizationId}/subscription/{subscriptionId}/is-public" : { + "patch" : { + "tags" : [ "subscription-api-controller" ], + "operationId" : "setPublicState", "parameters" : [ { - "name" : "eventName", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "subscriptionId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "format" : "uuid" + } + }, { + "name" : "status", + "in" : "query", + "required" : true, + "schema" : { + "type" : "boolean" } } ], "responses" : { @@ -15944,16 +12632,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -15979,7 +12657,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/EventWithAdditionalInfo" + "type" : "boolean" } } } @@ -15987,10 +12665,10 @@ } } }, - "/api/v2/public/event/{eventName}/validate-code" : { + "/api/wallet/event/{eventName}/v1/version/passes/{uuid}" : { "get" : { - "tags" : [ "event-api-v-2-controller" ], - "operationId" : "validateCode", + "tags" : [ "google-wallet-api-controller" ], + "operationId" : "walletPass", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -15999,13 +12677,24 @@ "type" : "string" } }, { - "name" : "code", - "in" : "query", + "name" : "uuid", + "in" : "path", "required" : true, "schema" : { "type" : "string" } } ], + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/api/v2/public/user/reservations" : { + "get" : { + "tags" : [ "user-api-v-2-controller" ], + "operationId" : "getUserReservations", "responses" : { "500" : { "description" : "Internal Server Error", @@ -16027,16 +12716,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -16062,7 +12741,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidatedResponseEventCode" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PurchaseContextWithReservations" + } } } } @@ -16070,25 +12752,10 @@ } } }, - "/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/full" : { + "/api/v2/public/user/authentication-enabled" : { "get" : { - "tags" : [ "ticket-api-v-2-controller" ], - "operationId" : "getTicket", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "ticketIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "user-api-v-2-controller" ], + "operationId" : "userAuthenticationEnabled", "responses" : { "500" : { "description" : "Internal Server Error", @@ -16110,16 +12777,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -16145,7 +12802,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/TicketsByTicketCategory" + "type" : "boolean" } } } @@ -16153,23 +12810,16 @@ } } }, - "/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/download-ticket" : { + "/api/v2/public/subscriptions" : { "get" : { - "tags" : [ "ticket-api-v-2-controller" ], - "operationId" : "generateTicketPdf", + "tags" : [ "subscriptions-api-controller" ], + "operationId" : "listSubscriptions", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "ticketIdentifier", - "in" : "path", + "name" : "searchOptions", + "in" : "query", "required" : true, "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/SearchOptions" } } ], "responses" : { @@ -16193,8 +12843,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -16203,8 +12853,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -16213,54 +12863,85 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BasicSubscriptionDescriptorInfo" + } } } } - }, - "200" : { - "description" : "OK" } } } }, - "/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/code/{checkInCode}/check-in-info" : { + "/api/v2/public/reservation/{reservationId}/transaction/force-check" : { "get" : { - "tags" : [ "ticket-api-v-2-controller" ], - "operationId" : "getCheckInInfo", + "tags" : [ "payment-api-controller" ], + "operationId" : "forceCheckStatus", "parameters" : [ { - "name" : "eventName", + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { "type" : "string" } - }, { - "name" : "ticketIdentifier", + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentResult" + } + } + } + } + } + } + }, + "/api/v2/public/event/{eventName}/reservation/{reservationId}/transaction/force-check" : { + "get" : { + "tags" : [ "payment-api-controller" ], + "operationId" : "forceCheckStatus_1", + "parameters" : [ { + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { "type" : "string" } - }, { - "name" : "checkInCode", + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentResult" + } + } + } + } + } + } + }, + "/api/v2/public/reservation/{reservationId}/status" : { + "get" : { + "tags" : [ "reservation-api-v-2-controller" ], + "operationId" : "getReservationStatus", + "parameters" : [ { + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { "type" : "string" } - }, { - "name" : "tz", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } } ], "responses" : { "500" : { @@ -16283,16 +12964,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -16318,7 +12989,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/OnlineCheckInInfo" + "$ref" : "#/components/schemas/ReservationStatusInfo" } } } @@ -16326,19 +12997,19 @@ } } }, - "/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/code.png" : { + "/api/v2/public/reservation/{reservationId}/payment/{method}/status" : { "get" : { - "tags" : [ "ticket-api-v-2-controller" ], - "operationId" : "showQrCode", + "tags" : [ "reservation-api-v-2-controller" ], + "operationId" : "getTransactionStatus", "parameters" : [ { - "name" : "eventName", + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "ticketIdentifier", + "name" : "method", "in" : "path", "required" : true, "schema" : { @@ -16366,8 +13037,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -16376,8 +13047,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -16386,41 +13057,23 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/ReservationPaymentResult" } } } - }, - "200" : { - "description" : "OK" } } } }, - "/event/{eventName}/ticket/{ticketIdentifier}/code.png" : { + "/api/v2/public/i18n/languages" : { "get" : { - "tags" : [ "ticket-api-v-2-controller" ], - "operationId" : "showQrCode_1", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "ticketIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "translations-api-controller" ], + "operationId" : "getSupportedLanguages", "responses" : { "500" : { "description" : "Internal Server Error", @@ -16442,8 +13095,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -16452,8 +13105,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -16462,40 +13115,33 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Language" + } } } } - }, - "200" : { - "description" : "OK" } } } }, - "/api/v2/public/event/{eventName}/ticket-categories" : { + "/api/v2/public/i18n/eu-countries-vat/{lang}" : { "get" : { - "tags" : [ "event-api-v-2-controller" ], - "operationId" : "getTicketCategories", + "tags" : [ "translations-api-controller" ], + "operationId" : "getEuCountriesForVat", "parameters" : [ { - "name" : "eventName", + "name" : "lang", "in" : "path", "required" : true, "schema" : { "type" : "string" } - }, { - "name" : "code", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } } ], "responses" : { "500" : { @@ -16518,16 +13164,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -16553,7 +13189,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ItemsByCategory" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LocalizedCountry" + } } } } @@ -16561,19 +13200,12 @@ } } }, - "/api/v2/public/event/{eventName}/reservation/{reservationId}/receipt" : { + "/api/v2/public/i18n/countries/{lang}" : { "get" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "getReceipt", + "tags" : [ "translations-api-controller" ], + "operationId" : "getCountries", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "reservationId", + "name" : "lang", "in" : "path", "required" : true, "schema" : { @@ -16601,8 +13233,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -16611,8 +13243,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -16621,35 +13253,28 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LocalizedCountry" + } } } } - }, - "200" : { - "description" : "OK" } } } }, - "/api/v2/public/event/{eventName}/reservation/{reservationId}/invoice" : { + "/api/v2/public/i18n/countries-vat/{lang}" : { "get" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "getInvoice", + "tags" : [ "translations-api-controller" ], + "operationId" : "getCountriesForVat", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "reservationId", + "name" : "lang", "in" : "path", "required" : true, "schema" : { @@ -16677,16 +13302,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -16708,28 +13323,39 @@ } }, "200" : { - "description" : "OK" + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LocalizedCountry" + } + } + } + } } } } }, - "/api/v2/public/event/{eventName}/poll" : { + "/api/v2/public/i18n/bundle/{lang}" : { "get" : { - "tags" : [ "poll-api-controller" ], - "operationId" : "getAll", + "tags" : [ "translations-api-controller" ], + "operationId" : "getPublicTranslations", "parameters" : [ { - "name" : "eventName", + "name" : "lang", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "pin", + "name" : "withSystemOverride", "in" : "query", - "required" : true, + "required" : false, "schema" : { - "type" : "string" + "type" : "boolean", + "default" : true } } ], "responses" : { @@ -16753,16 +13379,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -16788,7 +13404,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidatedResponseListPoll" + "type" : "object", + "additionalProperties" : { + "type" : "string" + } } } } @@ -16796,31 +13415,16 @@ } } }, - "/api/v2/public/event/{eventName}/poll/{pollId}" : { + "/api/v2/public/events" : { "get" : { - "tags" : [ "poll-api-controller" ], - "operationId" : "getSingle", + "tags" : [ "event-api-v-2-controller" ], + "operationId" : "listEvents", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "pollId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - }, { - "name" : "pin", + "name" : "searchOptions", "in" : "query", "required" : true, "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/SearchOptions" } } ], "responses" : { @@ -16844,16 +13448,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -16879,7 +13473,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ValidatedResponsePollWithOptions" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BasicEventInfo" + } } } } @@ -16887,10 +13484,10 @@ } } }, - "/api/v2/public/event/{eventName}/code/{code}" : { + "/api/v2/public/event/{eventName}" : { "get" : { "tags" : [ "event-api-v-2-controller" ], - "operationId" : "handleCode", + "operationId" : "getEvent", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -16898,13 +13495,6 @@ "schema" : { "type" : "string" } - }, { - "name" : "code", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } } ], "responses" : { "500" : { @@ -16927,8 +13517,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -16937,8 +13527,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -16947,26 +13537,23 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/EventWithAdditionalInfo" } } } - }, - "200" : { - "description" : "OK" } } } }, - "/api/v2/public/event/{eventName}/calendar/{locale}" : { + "/api/v2/public/event/{eventName}/validate-code" : { "get" : { "tags" : [ "event-api-v-2-controller" ], - "operationId" : "getCalendar", + "operationId" : "validateCode", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -16975,23 +13562,9 @@ "type" : "string" } }, { - "name" : "locale", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "type", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "ticketId", + "name" : "code", "in" : "query", - "required" : false, + "required" : true, "schema" : { "type" : "string" } @@ -17017,8 +13590,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -17027,8 +13600,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -17037,26 +13610,38 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/ValidatedResponseEventCode" } } } - }, - "200" : { - "description" : "OK" } } } }, - "/api/v2/info" : { + "/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/full" : { "get" : { - "tags" : [ "info-api-controller" ], - "operationId" : "getInfo", + "tags" : [ "ticket-api-v-2-controller" ], + "operationId" : "getTicket", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ticketIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -17078,16 +13663,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -17113,7 +13688,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/AlfioInfo" + "$ref" : "#/components/schemas/TicketsByTicketCategory" } } } @@ -17121,24 +13696,23 @@ } } }, - "/api/v2/admin/i18n/bundle/{lang}" : { + "/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/download-ticket" : { "get" : { - "tags" : [ "translations-api-controller" ], - "operationId" : "getAdminTranslations", + "tags" : [ "ticket-api-v-2-controller" ], + "operationId" : "generateTicketPdf", "parameters" : [ { - "name" : "lang", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "withSystemOverride", - "in" : "query", - "required" : false, + "name" : "ticketIdentifier", + "in" : "path", + "required" : true, "schema" : { - "type" : "boolean", - "default" : true + "type" : "string" } } ], "responses" : { @@ -17162,16 +13736,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -17193,47 +13757,43 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - } - } + "description" : "OK" } } } }, - "/api/v1/admin/{purchaseContextType}/{publicIdentifier}/reservation/{id}" : { + "/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/code/{checkInCode}/check-in-info" : { "get" : { - "tags" : [ "reservation-api-v-1-controller" ], - "operationId" : "retrieveDetail", + "tags" : [ "ticket-api-v-2-controller" ], + "operationId" : "getCheckInInfo", "parameters" : [ { - "name" : "purchaseContextType", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] + "type" : "string" } }, { - "name" : "publicIdentifier", + "name" : "ticketIdentifier", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "id", + "name" : "checkInCode", "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "tz", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } } ], "responses" : { "500" : { @@ -17256,16 +13816,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -17291,7 +13841,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ReservationDetail" + "$ref" : "#/components/schemas/OnlineCheckInInfo" } } } @@ -17299,10 +13849,25 @@ } } }, - "/api/v1/admin/system/organization/list" : { + "/api/v2/public/event/{eventName}/ticket/{ticketIdentifier}/code.png" : { "get" : { - "tags" : [ "organizations-api-v-1-controller" ], - "operationId" : "getAllOrganizations", + "tags" : [ "ticket-api-v-2-controller" ], + "operationId" : "showQrCode", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ticketIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -17324,16 +13889,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -17355,32 +13910,28 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Organization" - } - } - } - } + "description" : "OK" } } } }, - "/api/v1/admin/subscription/{subscriptionId}" : { + "/event/{eventName}/ticket/{ticketIdentifier}/code.png" : { "get" : { - "tags" : [ "subscription-api-v-1-controller" ], - "operationId" : "get", + "tags" : [ "ticket-api-v-2-controller" ], + "operationId" : "showQrCode_1", "parameters" : [ { - "name" : "subscriptionId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "format" : "uuid" + "type" : "string" + } + }, { + "name" : "ticketIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } } ], "responses" : { @@ -17404,16 +13955,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -17435,29 +13976,29 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/SubscriptionDescriptorWithStatistics" - } - } - } + "description" : "OK" } } } }, - "/api/v1/admin/event/{slug}/stats" : { + "/api/v2/public/event/{eventName}/ticket-categories" : { "get" : { - "tags" : [ "event-api-v-1-controller" ], - "operationId" : "stats", + "tags" : [ "event-api-v-2-controller" ], + "operationId" : "getTicketCategories", "parameters" : [ { - "name" : "slug", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "code", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } } ], "responses" : { "500" : { @@ -17480,16 +14021,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -17515,7 +14046,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/EventWithAdditionalInfo" + "$ref" : "#/components/schemas/ItemsByCategory" } } } @@ -17523,12 +14054,19 @@ } } }, - "/api/v1/admin/event/{slug}/check-in-log" : { + "/api/v2/public/event/{eventName}/reservation/{reservationId}/receipt" : { "get" : { - "tags" : [ "event-api-v-1-controller" ], - "operationId" : "checkInLog", + "tags" : [ "reservation-api-v-2-controller" ], + "operationId" : "getReceipt", "parameters" : [ { - "name" : "slug", + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { @@ -17556,16 +14094,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -17587,34 +14115,24 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CheckInLogEntry" - } - } - } - } + "description" : "OK" } } } }, - "/api/reservation/{reservationId}/payment/{method}/status" : { + "/api/v2/public/event/{eventName}/reservation/{reservationId}/invoice" : { "get" : { - "tags" : [ "payment-api-controller" ], - "operationId" : "getTransactionStatus_2", + "tags" : [ "reservation-api-v-2-controller" ], + "operationId" : "getInvoice", "parameters" : [ { - "name" : "reservationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "method", + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { @@ -17622,67 +14140,28 @@ } } ], "responses" : { - "200" : { - "description" : "OK", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/PaymentResult" + "type" : "string" } } } - } - } - } - }, - "/api/events/{eventName}/reservation/{reservationId}/payment/{method}/status" : { - "get" : { - "tags" : [ "payment-api-controller" ], - "operationId" : "getTransactionStatus_3", - "parameters" : [ { - "name" : "reservationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "method", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "OK", + }, + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/PaymentResult" + "type" : "string" } } } - } - } - } - }, - "/api/payment/webhook/saferpay/reservation/{reservationId}/success" : { - "get" : { - "tags" : [ "saferpay-payment-webhook-controller" ], - "operationId" : "handleTransactionNotification", - "parameters" : [ { - "name" : "reservationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "OK", + }, + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -17690,40 +14169,27 @@ } } } - } - } - } - }, - "/api/pass/event/{eventName}/v1/version/passes/{ticketUuid}" : { - "get" : { - "tags" : [ "pass-kit-api-controller" ], - "operationId" : "downloadPassForTicket", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "ticketUuid", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, "200" : { "description" : "OK" } } } }, - "/api/pass/event/{eventName}/v1/version/passes/{passTypeIdentifier}/{serialNumber}" : { + "/api/v2/public/event/{eventName}/poll" : { "get" : { - "tags" : [ "pass-kit-api-controller" ], - "operationId" : "getLatestVersion", + "tags" : [ "poll-api-controller" ], + "operationId" : "getAll", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -17732,59 +14198,8 @@ "type" : "string" } }, { - "name" : "passTypeIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "serialNumber", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "Authorization", - "in" : "header", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "OK" - } - } - } - }, - "/api/pass/event/{eventName}/v1/devices/*/registrations/*" : { - "get" : { - "tags" : [ "pass-kit-api-controller" ], - "operationId" : "getRegisteredPasses", - "responses" : { - "200" : { - "description" : "OK" - } - } - } - }, - "/api/attendees/{eventKey}/ticket/{UUID}" : { - "get" : { - "tags" : [ "attendee-api-controller" ], - "operationId" : "getTicketDetails", - "parameters" : [ { - "name" : "eventKey", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "UUID", - "in" : "path", + "name" : "pin", + "in" : "query", "required" : true, "schema" : { "type" : "string" @@ -17811,16 +14226,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -17846,7 +14251,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ResultTicketWithAdditionalFields" + "$ref" : "#/components/schemas/ValidatedResponseListPoll" } } } @@ -17854,21 +14259,29 @@ } } }, - "/api/attendees/{eventKey}/sponsor-scan/mine" : { + "/api/v2/public/event/{eventName}/poll/{pollId}" : { "get" : { - "tags" : [ "attendee-api-controller" ], - "operationId" : "getScannedBadges", + "tags" : [ "poll-api-controller" ], + "operationId" : "getSingle", "parameters" : [ { - "name" : "eventKey", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "from", + "name" : "pollId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } + }, { + "name" : "pin", "in" : "query", - "required" : false, + "required" : true, "schema" : { "type" : "string" } @@ -17894,16 +14307,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -17929,10 +14332,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SponsorAttendeeData" - } + "$ref" : "#/components/schemas/ValidatedResponsePollWithOptions" } } } @@ -17940,32 +14340,23 @@ } } }, - "/admin/api/{purchaseContextType}/{publicIdentifier}/email/{messageId}" : { + "/api/v2/public/event/{eventName}/code/{code}" : { "get" : { - "tags" : [ "email-message-api-controller" ], - "operationId" : "loadEmailMessage", + "tags" : [ "event-api-v-2-controller" ], + "operationId" : "handleCode", "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "messageId", + "name" : "code", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } } ], "responses" : { @@ -17989,16 +14380,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -18020,47 +14401,38 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/LightweightEmailMessage" - } - } - } + "description" : "OK" } } } }, - "/admin/api/{purchaseContextType}/{publicIdentifier}/email/" : { + "/api/v2/public/event/{eventName}/calendar/{locale}" : { "get" : { - "tags" : [ "email-message-api-controller" ], - "operationId" : "loadEmailMessages", + "tags" : [ "event-api-v-2-controller" ], + "operationId" : "getCalendar", "parameters" : [ { - "name" : "purchaseContextType", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] + "type" : "string" } }, { - "name" : "publicIdentifier", + "name" : "locale", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "page", + "name" : "type", "in" : "query", "required" : false, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } }, { - "name" : "search", + "name" : "ticketId", "in" : "query", "required" : false, "schema" : { @@ -18088,8 +14460,49 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK" + } + } + } + }, + "/api/v2/info" : { + "get" : { + "tags" : [ "info-api-controller" ], + "operationId" : "getInfo", + "responses" : { + "500" : { + "description" : "Internal Server Error", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -18123,7 +14536,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/PageAndContentListLightweightEmailMessage" + "$ref" : "#/components/schemas/AlfioInfo" } } } @@ -18131,24 +14544,24 @@ } } }, - "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field" : { + "/api/v2/admin/i18n/bundle/{lang}" : { "get" : { - "tags" : [ "additional-field-api-controller" ], - "operationId" : "getAllAdditionalField", + "tags" : [ "translations-api-controller" ], + "operationId" : "getAdminTranslations", "parameters" : [ { - "name" : "purchaseContextType", + "name" : "lang", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] + "type" : "string" } }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, + "name" : "withSystemOverride", + "in" : "query", + "required" : false, "schema" : { - "type" : "string" + "type" : "boolean", + "default" : true } } ], "responses" : { @@ -18172,16 +14585,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -18207,9 +14610,9 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/FieldConfigurationAndAllDescriptions" + "type" : "object", + "additionalProperties" : { + "type" : "string" } } } @@ -18218,10 +14621,10 @@ } } }, - "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/{id}/stats" : { + "/api/v1/admin/{purchaseContextType}/{publicIdentifier}/reservation/{id}" : { "get" : { - "tags" : [ "additional-field-api-controller" ], - "operationId" : "getStats", + "tags" : [ "reservation-api-v-1-controller" ], + "operationId" : "retrieveDetail", "parameters" : [ { "name" : "purchaseContextType", "in" : "path", @@ -18242,8 +14645,7 @@ "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "type" : "string" } } ], "responses" : { @@ -18267,8 +14669,56 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ReservationDetail" + } + } + } + } + } + } + }, + "/api/v1/admin/system/organization/list" : { + "get" : { + "tags" : [ "organizations-api-v-1-controller" ], + "operationId" : "getAllOrganizations", + "responses" : { + "500" : { + "description" : "Internal Server Error", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -18304,7 +14754,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/RestrictedValueStats" + "$ref" : "#/components/schemas/Organization" } } } @@ -18313,24 +14763,17 @@ } } }, - "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/templates" : { + "/api/v1/admin/subscription/{subscriptionId}" : { "get" : { - "tags" : [ "additional-field-api-controller" ], - "operationId" : "loadTemplates", + "tags" : [ "subscription-api-v-1-controller" ], + "operationId" : "get", "parameters" : [ { - "name" : "purchaseContextType", + "name" : "subscriptionId", "in" : "path", "required" : true, "schema" : { "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "format" : "uuid" } } ], "responses" : { @@ -18354,16 +14797,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -18389,10 +14822,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DynamicFieldTemplate" - } + "$ref" : "#/components/schemas/SubscriptionDescriptorWithStatistics" } } } @@ -18400,25 +14830,17 @@ } } }, - "/admin/api/{eventName}/poll/{pollId}/stats" : { + "/api/v1/admin/event/{slug}/stats" : { "get" : { - "tags" : [ "poll-admin-api-controller" ], - "operationId" : "getStatisticsForEvent", + "tags" : [ "event-api-v-1-controller" ], + "operationId" : "stats", "parameters" : [ { - "name" : "eventName", + "name" : "slug", "in" : "path", "required" : true, "schema" : { "type" : "string" } - }, { - "name" : "pollId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } } ], "responses" : { "500" : { @@ -18441,16 +14863,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -18476,7 +14888,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/PollStatistics" + "$ref" : "#/components/schemas/EventWithAdditionalInfo" } } } @@ -18484,29 +14896,14 @@ } } }, - "/admin/api/{eventName}/poll/{pollId}/filter-tickets" : { + "/api/v1/admin/event/{slug}/check-in-log" : { "get" : { - "tags" : [ "poll-admin-api-controller" ], - "operationId" : "findAdditionalAttendees", + "tags" : [ "event-api-v-1-controller" ], + "operationId" : "checkInLog", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "pollId", + "name" : "slug", "in" : "path", "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - }, { - "name" : "filter", - "in" : "query", - "required" : true, "schema" : { "type" : "string" } @@ -18532,16 +14929,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -18569,7 +14956,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/PollParticipant" + "$ref" : "#/components/schemas/CheckInLogEntry" } } } @@ -18578,29 +14965,87 @@ } } }, - "/admin/api/{eventName}/poll/{pollId}/allowed" : { + "/api/reservation/{reservationId}/payment/{method}/status" : { "get" : { - "tags" : [ "poll-admin-api-controller" ], - "operationId" : "getAllowedAttendees", + "tags" : [ "payment-api-controller" ], + "operationId" : "getTransactionStatus_1", "parameters" : [ { - "name" : "eventName", + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "pollId", + "name" : "method", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "type" : "string" } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentResult" + } + } + } + } + } + } + }, + "/api/events/{eventName}/reservation/{reservationId}/payment/{method}/status" : { + "get" : { + "tags" : [ "payment-api-controller" ], + "operationId" : "getTransactionStatus_2", + "parameters" : [ { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "method", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentResult" + } + } + } + } + } + } + }, + "/api/payment/webhook/saferpay/reservation/{reservationId}/success" : { + "get" : { + "tags" : [ "saferpay-payment-webhook-controller" ], + "operationId" : "handleTransactionNotification", + "parameters" : [ { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { @@ -18608,9 +15053,109 @@ } } } - }, - "400" : { - "description" : "Bad Request", + } + } + } + }, + "/api/pass/event/{eventName}/v1/version/passes/{ticketUuid}" : { + "get" : { + "tags" : [ "pass-kit-api-controller" ], + "operationId" : "downloadPassForTicket", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ticketUuid", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/api/pass/event/{eventName}/v1/version/passes/{passTypeIdentifier}/{serialNumber}" : { + "get" : { + "tags" : [ "pass-kit-api-controller" ], + "operationId" : "getLatestVersion", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "passTypeIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "serialNumber", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "Authorization", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/api/pass/event/{eventName}/v1/devices/*/registrations/*" : { + "get" : { + "tags" : [ "pass-kit-api-controller" ], + "operationId" : "getRegisteredPasses", + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/api/attendees/{eventKey}/ticket/{UUID}" : { + "get" : { + "tags" : [ "attendee-api-controller" ], + "operationId" : "getTicketDetails", + "parameters" : [ { + "name" : "eventKey", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "UUID", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -18619,8 +15164,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -18654,45 +15199,33 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PollParticipant" - } + "$ref" : "#/components/schemas/ResultTicketWithAdditionalFields" } } } } } - }, - "delete" : { - "tags" : [ "poll-admin-api-controller" ], - "operationId" : "forbidAttendees", + } + }, + "/api/attendees/{eventKey}/sponsor-scan/mine" : { + "get" : { + "tags" : [ "attendee-api-controller" ], + "operationId" : "getScannedBadges", "parameters" : [ { - "name" : "eventName", + "name" : "eventKey", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "pollId", - "in" : "path", - "required" : true, + "name" : "from", + "in" : "query", + "required" : false, "schema" : { - "type" : "integer", - "format" : "int64" + "type" : "string" } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateParticipantsForm" - } - } - }, - "required" : true - }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -18714,16 +15247,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -18751,7 +15274,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/PollParticipant" + "$ref" : "#/components/schemas/SponsorAttendeeData" } } } @@ -18760,17 +15283,33 @@ } } }, - "/admin/api/utils/short-name/generate" : { + "/admin/api/{purchaseContextType}/{publicIdentifier}/email/{messageId}" : { "get" : { - "tags" : [ "utils-api-controller" ], - "operationId" : "generateShortName", + "tags" : [ "email-message-api-controller" ], + "operationId" : "loadEmailMessage", "parameters" : [ { - "name" : "displayName", - "in" : "query", + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "messageId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } } ], "responses" : { "500" : { @@ -18793,16 +15332,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -18828,7 +15357,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/LightweightEmailMessage" } } } @@ -18836,17 +15365,40 @@ } } }, - "/admin/api/utils/render-commonmark" : { + "/admin/api/{purchaseContextType}/{publicIdentifier}/email/" : { "get" : { - "tags" : [ "utils-api-controller" ], - "operationId" : "renderCommonmark", + "tags" : [ "email-message-api-controller" ], + "operationId" : "loadEmailMessages", "parameters" : [ { - "name" : "text", - "in" : "query", + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "page", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "search", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } } ], "responses" : { "500" : { @@ -18869,16 +15421,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -18904,7 +15446,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/PageAndContentListLightweightEmailMessage" } } } @@ -18912,10 +15454,26 @@ } } }, - "/admin/api/utils/currencies" : { + "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field" : { "get" : { - "tags" : [ "utils-api-controller" ], - "operationId" : "getCurrencies", + "tags" : [ "additional-field-api-controller" ], + "operationId" : "getAllAdditionalField", + "parameters" : [ { + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -18937,16 +15495,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -18974,7 +15522,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/CurrencyDescriptor" + "$ref" : "#/components/schemas/FieldConfigurationAndAllDescriptions" } } } @@ -18983,10 +15531,34 @@ } } }, - "/admin/api/utils/countriesForVat" : { + "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/{id}/stats" : { "get" : { - "tags" : [ "utils-api-controller" ], - "operationId" : "getCountriesForVat_1", + "tags" : [ "additional-field-api-controller" ], + "operationId" : "getStats", + "parameters" : [ { + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "id", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -19008,16 +15580,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -19043,9 +15605,9 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/RestrictedValueStats" } } } @@ -19054,10 +15616,26 @@ } } }, - "/admin/api/utils/alfio/info" : { + "/admin/api/{purchaseContextType}/{publicIdentifier}/additional-field/templates" : { "get" : { - "tags" : [ "utils-api-controller" ], - "operationId" : "getApplicationInfo", + "tags" : [ "additional-field-api-controller" ], + "operationId" : "loadTemplates", + "parameters" : [ { + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -19079,16 +15657,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -19114,9 +15682,9 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "object" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/DynamicFieldTemplate" } } } @@ -19125,10 +15693,26 @@ } } }, - "/admin/api/users" : { + "/admin/api/{eventName}/poll/{pollId}/stats" : { "get" : { - "tags" : [ "users-api-controller" ], - "operationId" : "getAllUsers", + "tags" : [ "poll-admin-api-controller" ], + "operationId" : "getStatisticsForEvent", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "pollId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -19150,16 +15734,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -19185,10 +15759,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserWithOrganizations" - } + "$ref" : "#/components/schemas/PollStatistics" } } } @@ -19196,17 +15767,31 @@ } } }, - "/admin/api/users/{id}" : { + "/admin/api/{eventName}/poll/{pollId}/filter-tickets" : { "get" : { - "tags" : [ "users-api-controller" ], - "operationId" : "loadUser", + "tags" : [ "poll-admin-api-controller" ], + "operationId" : "findAdditionalAttendees", "parameters" : [ { - "name" : "id", + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "pollId", "in" : "path", "required" : true, "schema" : { "type" : "integer", - "format" : "int32" + "format" : "int64" + } + }, { + "name" : "filter", + "in" : "query", + "required" : true, + "schema" : { + "type" : "string" } } ], "responses" : { @@ -19230,16 +15815,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -19265,23 +15840,35 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/UserModification" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PollParticipant" + } } } } } } - }, - "delete" : { - "tags" : [ "users-api-controller" ], - "operationId" : "deleteUser", + } + }, + "/admin/api/{eventName}/poll/{pollId}/allowed" : { + "get" : { + "tags" : [ "poll-admin-api-controller" ], + "operationId" : "getAllowedAttendees", "parameters" : [ { - "name" : "id", + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "pollId", "in" : "path", "required" : true, "schema" : { "type" : "integer", - "format" : "int32" + "format" : "int64" } } ], "responses" : { @@ -19305,16 +15892,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -19340,18 +15917,45 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PollParticipant" + } } } } } } - } - }, - "/admin/api/users/current" : { - "get" : { - "tags" : [ "users-api-controller" ], - "operationId" : "loadCurrentUser", + }, + "delete" : { + "tags" : [ "poll-admin-api-controller" ], + "operationId" : "forbidAttendees", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "pollId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateParticipantsForm" + } + } + }, + "required" : true + }, "responses" : { "500" : { "description" : "Internal Server Error", @@ -19373,16 +15977,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -19408,7 +16002,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/UserModification" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PollParticipant" + } } } } @@ -19416,10 +16013,18 @@ } } }, - "/admin/api/user/details" : { + "/admin/api/utils/short-name/generate" : { "get" : { - "tags" : [ "users-api-controller" ], - "operationId" : "retrieveDetails", + "tags" : [ "utils-api-controller" ], + "operationId" : "generateShortName", + "parameters" : [ { + "name" : "displayName", + "in" : "query", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -19441,16 +16046,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -19476,10 +16071,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } + "type" : "string" } } } @@ -19487,10 +16079,18 @@ } } }, - "/admin/api/user-type" : { + "/admin/api/utils/render-commonmark" : { "get" : { - "tags" : [ "users-api-controller" ], - "operationId" : "getLoggedUserType", + "tags" : [ "utils-api-controller" ], + "operationId" : "renderCommonmark", + "parameters" : [ { + "name" : "text", + "in" : "query", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -19512,16 +16112,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -19555,10 +16145,10 @@ } } }, - "/admin/api/roles" : { + "/admin/api/utils/currencies" : { "get" : { - "tags" : [ "users-api-controller" ], - "operationId" : "getAllRoles", + "tags" : [ "utils-api-controller" ], + "operationId" : "getCurrencies", "responses" : { "500" : { "description" : "Internal Server Error", @@ -19580,16 +16170,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -19617,7 +16197,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/RoleDescriptor" + "$ref" : "#/components/schemas/CurrencyDescriptor" } } } @@ -19626,29 +16206,11 @@ } } }, - "/admin/api/resource/{name}/metadata" : { + "/admin/api/utils/countriesForVat" : { "get" : { - "tags" : [ "resource-controller" ], - "operationId" : "getMetadata", - "parameters" : [ { - "name" : "name", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "utils-api-controller" ], + "operationId" : "getCountriesForVat_1", "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -19659,8 +16221,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -19694,7 +16256,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/UploadedResource" + "type" : "object", + "additionalProperties" : { + "type" : "string" + } } } } @@ -19702,29 +16267,11 @@ } } }, - "/admin/api/resource/{name}" : { + "/admin/api/utils/alfio/info" : { "get" : { - "tags" : [ "resource-controller" ], - "operationId" : "outputContent", - "parameters" : [ { - "name" : "name", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "utils-api-controller" ], + "operationId" : "getApplicationInfo", "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -19735,8 +16282,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -19766,32 +16313,26 @@ } }, "200" : { - "description" : "OK" - } - } - }, - "delete" : { - "tags" : [ "resource-controller" ], - "operationId" : "delete_2", - "parameters" : [ { - "name" : "name", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "400" : { - "description" : "Bad Request", + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "object", + "additionalProperties" : { + "type" : "object" + } } } } - }, + } + } + } + }, + "/admin/api/users" : { + "get" : { + "tags" : [ "users-api-controller" ], + "operationId" : "getAllUsers", + "responses" : { "500" : { "description" : "Internal Server Error", "content" : { @@ -19802,8 +16343,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -19833,17 +16374,27 @@ } }, "200" : { - "description" : "OK" + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UserWithOrganizations" + } + } + } + } } } } }, - "/admin/api/resource-organization/{organizationId}" : { + "/admin/api/users/{id}" : { "get" : { - "tags" : [ "resource-controller" ], - "operationId" : "findAllForOrganization", + "tags" : [ "users-api-controller" ], + "operationId" : "loadUser", "parameters" : [ { - "name" : "organizationId", + "name" : "id", "in" : "path", "required" : true, "schema" : { @@ -19852,16 +16403,6 @@ } } ], "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -19872,8 +16413,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -19907,48 +16448,26 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UploadedResource" - } + "$ref" : "#/components/schemas/UserModification" } } } } } - } - }, - "/admin/api/resource-organization/{organizationId}/{name}/metadata" : { - "get" : { - "tags" : [ "resource-controller" ], - "operationId" : "getMetadata_1", + }, + "delete" : { + "tags" : [ "users-api-controller" ], + "operationId" : "deleteUser", "parameters" : [ { - "name" : "organizationId", + "name" : "id", "in" : "path", "required" : true, "schema" : { "type" : "integer", "format" : "int32" } - }, { - "name" : "name", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } } ], "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -19959,8 +16478,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -19994,7 +16513,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/UploadedResource" + "type" : "string" } } } @@ -20002,37 +16521,11 @@ } } }, - "/admin/api/resource-organization/{organizationId}/{name}" : { + "/admin/api/users/current" : { "get" : { - "tags" : [ "resource-controller" ], - "operationId" : "outputContent_1", - "parameters" : [ { - "name" : "organizationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "name", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "users-api-controller" ], + "operationId" : "loadCurrentUser", "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -20043,8 +16536,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -20074,40 +16567,23 @@ } }, "200" : { - "description" : "OK" - } - } - }, - "delete" : { - "tags" : [ "resource-controller" ], - "operationId" : "delete_3", - "parameters" : [ { - "name" : "organizationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "name", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "400" : { - "description" : "Bad Request", + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/UserModification" } } } - }, + } + } + } + }, + "/admin/api/user/details" : { + "get" : { + "tags" : [ "users-api-controller" ], + "operationId" : "retrieveDetails", + "responses" : { "500" : { "description" : "Internal Server Error", "content" : { @@ -20118,8 +16594,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -20149,43 +16625,26 @@ } }, "200" : { - "description" : "OK" - } - } - } - }, - "/admin/api/resource-event/{organizationId}/{eventId}" : { - "get" : { - "tags" : [ "resource-controller" ], - "operationId" : "findAllForEvent", - "parameters" : [ { - "name" : "organizationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "eventId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], - "responses" : { - "400" : { - "description" : "Bad Request", + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "object", + "additionalProperties" : { + "type" : "string" + } } } } - }, + } + } + } + }, + "/admin/api/user-type" : { + "get" : { + "tags" : [ "users-api-controller" ], + "operationId" : "getLoggedUserType", + "responses" : { "500" : { "description" : "Internal Server Error", "content" : { @@ -20196,8 +16655,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -20231,10 +16690,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UploadedResource" - } + "type" : "string" } } } @@ -20242,45 +16698,11 @@ } } }, - "/admin/api/resource-event/{organizationId}/{eventId}/{name}/metadata" : { + "/admin/api/roles" : { "get" : { - "tags" : [ "resource-controller" ], - "operationId" : "getMetadata_2", - "parameters" : [ { - "name" : "organizationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "eventId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "name", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "users-api-controller" ], + "operationId" : "getAllRoles", "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -20291,8 +16713,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -20326,7 +16748,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/UploadedResource" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/RoleDescriptor" + } } } } @@ -20334,27 +16759,11 @@ } } }, - "/admin/api/resource-event/{organizationId}/{eventId}/{name}" : { + "/admin/api/resource/{name}/metadata" : { "get" : { "tags" : [ "resource-controller" ], - "operationId" : "outputContent_2", + "operationId" : "getMetadata", "parameters" : [ { - "name" : "organizationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "eventId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { "name" : "name", "in" : "path", "required" : true, @@ -20383,8 +16792,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -20393,8 +16802,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -20403,41 +16812,24 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/UploadedResource" } } } - }, - "200" : { - "description" : "OK" } } - }, - "delete" : { + } + }, + "/admin/api/resource/{name}" : { + "get" : { "tags" : [ "resource-controller" ], - "operationId" : "delete_4", + "operationId" : "outputContent", "parameters" : [ { - "name" : "organizationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "eventId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { "name" : "name", "in" : "path", "required" : true, @@ -20466,16 +16858,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -20500,29 +16882,12 @@ "description" : "OK" } } - } - }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/tickets-with-additional-data" : { - "get" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "ticketsWithAdditionalData", + }, + "delete" : { + "tags" : [ "resource-controller" ], + "operationId" : "delete_2", "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "reservationId", + "name" : "name", "in" : "path", "required" : true, "schema" : { @@ -20530,16 +16895,6 @@ } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -20550,8 +16905,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -20581,50 +16936,17 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int32" - } - } - } - } + "description" : "OK" } } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/ticket/{ticketId}" : { + "/admin/api/resource-organization/{organizationId}" : { "get" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "loadTicket", + "tags" : [ "resource-controller" ], + "operationId" : "findAllForOrganization", "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "reservationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "ticketId", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { @@ -20633,16 +16955,6 @@ } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -20653,8 +16965,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -20688,7 +17000,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ResultTicket" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UploadedResource" + } } } } @@ -20696,34 +17011,20 @@ } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/ticket/{ticketId}/full-data" : { + "/admin/api/resource-organization/{organizationId}/{name}/metadata" : { "get" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "loadFullTicketData", + "tags" : [ "resource-controller" ], + "operationId" : "getMetadata_1", "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "reservationId", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } }, { - "name" : "ticketId", + "name" : "name", "in" : "path", "required" : true, "schema" : { @@ -20731,16 +17032,6 @@ } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -20751,8 +17042,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -20786,7 +17077,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/BookingInfoTicket" + "$ref" : "#/components/schemas/UploadedResource" } } } @@ -20794,27 +17085,20 @@ } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/payment-info" : { + "/admin/api/resource-organization/{organizationId}/{name}" : { "get" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "getPaymentInfo", + "tags" : [ "resource-controller" ], + "operationId" : "outputContent_1", "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } }, { - "name" : "reservationId", + "name" : "name", "in" : "path", "required" : true, "schema" : { @@ -20822,6 +17106,16 @@ } } ], "responses" : { + "400" : { + "description" : "Bad Request", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, "500" : { "description" : "Internal Server Error", "content" : { @@ -20832,6 +17126,51 @@ } } }, + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK" + } + } + }, + "delete" : { + "tags" : [ "resource-controller" ], + "operationId" : "delete_3", + "parameters" : [ { + "name" : "organizationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "name", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { "400" : { "description" : "Bad Request", "content" : { @@ -20842,8 +17181,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -20873,56 +17212,33 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/ResultTransactionAndPaymentInfo" - } - } - } + "description" : "OK" } } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/email-list" : { + "/admin/api/resource-event/{organizationId}/{eventId}" : { "get" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "getEmailList", + "tags" : [ "resource-controller" ], + "operationId" : "findAllForEvent", "parameters" : [ { - "name" : "purchaseContextType", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] - } - }, { - "name" : "publicIdentifier", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } }, { - "name" : "reservationId", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -20933,8 +17249,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -20968,7 +17284,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ResultListLightweightMailMessage" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UploadedResource" + } } } } @@ -20976,27 +17295,28 @@ } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/billing-documents" : { + "/admin/api/resource-event/{organizationId}/{eventId}/{name}/metadata" : { "get" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "getBillingDocuments", + "tags" : [ "resource-controller" ], + "operationId" : "getMetadata_2", "parameters" : [ { - "name" : "purchaseContextType", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] + "type" : "integer", + "format" : "int32" } }, { - "name" : "publicIdentifier", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } }, { - "name" : "reservationId", + "name" : "name", "in" : "path", "required" : true, "schema" : { @@ -21004,16 +17324,6 @@ } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -21024,8 +17334,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -21059,7 +17369,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ResultListBillingDocument" + "$ref" : "#/components/schemas/UploadedResource" } } } @@ -21067,52 +17377,35 @@ } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/billing-document/{documentId}" : { + "/admin/api/resource-event/{organizationId}/{eventId}/{name}" : { "get" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "getBillingDocument", + "tags" : [ "resource-controller" ], + "operationId" : "outputContent_2", "parameters" : [ { - "name" : "purchaseContextType", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] + "type" : "integer", + "format" : "int32" } }, { - "name" : "publicIdentifier", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } }, { - "name" : "reservationId", + "name" : "name", "in" : "path", "required" : true, "schema" : { "type" : "string" } - }, { - "name" : "documentId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -21123,8 +17416,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -21159,50 +17452,33 @@ } }, "delete" : { - "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "invalidateBillingDocument", + "tags" : [ "resource-controller" ], + "operationId" : "delete_4", "parameters" : [ { - "name" : "purchaseContextType", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "subscription", "event" ] + "type" : "integer", + "format" : "int32" } }, { - "name" : "publicIdentifier", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } }, { - "name" : "reservationId", + "name" : "name", "in" : "path", "required" : true, "schema" : { "type" : "string" } - }, { - "name" : "documentId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -21213,8 +17489,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -21244,22 +17520,15 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "boolean" - } - } - } + "description" : "OK" } } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/audit" : { + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/tickets-with-additional-data" : { "get" : { "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "getAudit", + "operationId" : "ticketsWithAdditionalData", "parameters" : [ { "name" : "purchaseContextType", "in" : "path", @@ -21304,16 +17573,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -21339,7 +17598,11 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ResultListAudit" + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int32" + } } } } @@ -21347,10 +17610,10 @@ } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/reservations/list" : { + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/ticket/{ticketId}" : { "get" : { "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "findAll_1", + "operationId" : "loadTicket", "parameters" : [ { "name" : "purchaseContextType", "in" : "path", @@ -21367,30 +17630,19 @@ "type" : "string" } }, { - "name" : "page", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "search", - "in" : "query", - "required" : false, + "name" : "reservationId", + "in" : "path", + "required" : true, "schema" : { "type" : "string" } }, { - "name" : "status", - "in" : "query", - "required" : false, + "name" : "ticketId", + "in" : "path", + "required" : true, "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "PENDING", "IN_PAYMENT", "EXTERNAL_PROCESSING_PAYMENT", "WAITING_EXTERNAL_CONFIRMATION", "OFFLINE_PAYMENT", "DEFERRED_OFFLINE_PAYMENT", "FINALIZING", "OFFLINE_FINALIZING", "COMPLETE", "STUCK", "CANCELLED", "CREDIT_NOTE_ISSUED" ] - } + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -21414,16 +17666,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -21449,7 +17691,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/PageAndContentListTicketReservation" + "$ref" : "#/components/schemas/ResultTicket" } } } @@ -21457,10 +17699,10 @@ } } }, - "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/reservations/all-status" : { + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/ticket/{ticketId}/full-data" : { "get" : { "tags" : [ "admin-reservation-api-controller" ], - "operationId" : "getAllStatus", + "operationId" : "loadFullTicketData", "parameters" : [ { "name" : "purchaseContextType", "in" : "path", @@ -21476,6 +17718,20 @@ "schema" : { "type" : "string" } + }, { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ticketId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } } ], "responses" : { "500" : { @@ -21498,16 +17754,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -21533,11 +17779,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "PENDING", "IN_PAYMENT", "EXTERNAL_PROCESSING_PAYMENT", "WAITING_EXTERNAL_CONFIRMATION", "OFFLINE_PAYMENT", "DEFERRED_OFFLINE_PAYMENT", "FINALIZING", "OFFLINE_FINALIZING", "COMPLETE", "STUCK", "CANCELLED", "CREDIT_NOTE_ISSUED" ] - } + "$ref" : "#/components/schemas/BookingInfoTicket" } } } @@ -21545,22 +17787,29 @@ } } }, - "/admin/api/promo-code/{promoCodeId}/detailed-usage" : { + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/payment-info" : { "get" : { - "tags" : [ "promo-code-discount-api-controller" ], - "operationId" : "retrieveDetailedUsage", + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "getPaymentInfo", "parameters" : [ { - "name" : "promoCodeId", + "name" : "purchaseContextType", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string", + "enum" : [ "subscription", "event" ] } }, { - "name" : "eventShortName", - "in" : "query", - "required" : false, + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "reservationId", + "in" : "path", + "required" : true, "schema" : { "type" : "string" } @@ -21586,16 +17835,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -21621,10 +17860,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PromoCodeUsageResult" - } + "$ref" : "#/components/schemas/ResultTransactionAndPaymentInfo" } } } @@ -21632,17 +17868,31 @@ } } }, - "/admin/api/promo-code/{promoCodeId}/count-use" : { + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/email-list" : { "get" : { - "tags" : [ "promo-code-discount-api-controller" ], - "operationId" : "countPromoCodeUse", + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "getEmailList", "parameters" : [ { - "name" : "promoCodeId", + "name" : "purchaseContextType", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } } ], "responses" : { @@ -21666,16 +17916,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -21701,8 +17941,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "integer", - "format" : "int32" + "$ref" : "#/components/schemas/ResultListLightweightMailMessage" } } } @@ -21710,10 +17949,10 @@ } } }, - "/admin/api/payments/{purchaseContextType}/{publicIdentifier}/list" : { + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/billing-documents" : { "get" : { - "tags" : [ "admin-payments-api-controller" ], - "operationId" : "getPaymentsForPurchaseContext", + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "getBillingDocuments", "parameters" : [ { "name" : "purchaseContextType", "in" : "path", @@ -21730,17 +17969,9 @@ "type" : "string" } }, { - "name" : "page", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "search", - "in" : "query", - "required" : false, + "name" : "reservationId", + "in" : "path", + "required" : true, "schema" : { "type" : "string" } @@ -21766,16 +17997,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -21801,7 +18022,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/PageAndContentListReservationPaymentDetail" + "$ref" : "#/components/schemas/ResultListBillingDocument" } } } @@ -21809,10 +18030,10 @@ } } }, - "/admin/api/payments/{purchaseContextType}/{publicIdentifier}/download" : { + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/billing-document/{documentId}" : { "get" : { - "tags" : [ "admin-payments-api-controller" ], - "operationId" : "exportPayments", + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "getBillingDocument", "parameters" : [ { "name" : "purchaseContextType", "in" : "path", @@ -21829,12 +18050,20 @@ "type" : "string" } }, { - "name" : "search", - "in" : "query", - "required" : false, + "name" : "reservationId", + "in" : "path", + "required" : true, "schema" : { "type" : "string" } + }, { + "name" : "documentId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } } ], "responses" : { "500" : { @@ -21857,16 +18086,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -21891,19 +18110,39 @@ "description" : "OK" } } - } - }, - "/admin/api/paymentProxies/{organizationId}" : { - "get" : { - "tags" : [ "event-api-controller" ], - "operationId" : "getPaymentProxies", + }, + "delete" : { + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "invalidateBillingDocument", "parameters" : [ { - "name" : "organizationId", + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "reservationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "documentId", "in" : "path", "required" : true, "schema" : { "type" : "integer", - "format" : "int32" + "format" : "int64" } } ], "responses" : { @@ -21927,16 +18166,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -21962,10 +18191,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentMethodDTO" - } + "type" : "boolean" } } } @@ -21973,20 +18199,27 @@ } } }, - "/admin/api/overridable-template/{name}/{locale}" : { + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/{reservationId}/audit" : { "get" : { - "tags" : [ "resource-controller" ], - "operationId" : "getTemplate", + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "getAudit", "parameters" : [ { - "name" : "name", + "name" : "purchaseContextType", "in" : "path", "required" : true, "schema" : { "type" : "string", - "enum" : [ "GOOGLE_ANALYTICS", "CONFIRMATION_EMAIL_FOR_ORGANIZER", "SEND_RESERVED_CODE", "CONFIRMATION_EMAIL", "CONFIRMATION_EMAIL_SUBSCRIPTION", "OFFLINE_RESERVATION_EXPIRED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL_FOR_ORGANIZER", "CREDIT_NOTE_ISSUED_EMAIL", "OFFLINE_RESERVATION_EXPIRING_EMAIL_FOR_ORGANIZER", "OFFLINE_PAYMENT_MATCHES_FOUND", "REMINDER_EMAIL", "REMINDER_TICKET_ADDITIONAL_INFO", "REMINDER_TICKETS_ASSIGNMENT_EMAIL", "TICKET_EMAIL", "TICKET_EMAIL_FOR_ONLINE_EVENT", "TICKET_HAS_CHANGED_OWNER", "TICKET_HAS_BEEN_CANCELLED", "TICKET_HAS_BEEN_CANCELLED_ADMIN", "TICKET_PDF", "RECEIPT_PDF", "INVOICE_PDF", "CREDIT_NOTE_PDF", "SUBSCRIPTION_PDF", "WAITING_QUEUE_JOINED", "WAITING_QUEUE_RESERVATION_EMAIL", "CUSTOM_MESSAGE" ] + "enum" : [ "subscription", "event" ] } }, { - "name" : "locale", + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { @@ -21994,16 +18227,6 @@ } } ], "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -22014,8 +18237,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -22045,26 +18268,65 @@ } }, "200" : { - "description" : "OK" - } - } - } - }, - "/admin/api/overridable-template/" : { - "get" : { - "tags" : [ "resource-controller" ], - "operationId" : "getOverridableTemplates", - "responses" : { - "400" : { - "description" : "Bad Request", + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/ResultListAudit" } } } - }, + } + } + } + }, + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/reservations/list" : { + "get" : { + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "findAll_1", + "parameters" : [ { + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "page", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "search", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "status", + "in" : "query", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "PENDING", "IN_PAYMENT", "EXTERNAL_PROCESSING_PAYMENT", "WAITING_EXTERNAL_CONFIRMATION", "OFFLINE_PAYMENT", "DEFERRED_OFFLINE_PAYMENT", "FINALIZING", "OFFLINE_FINALIZING", "COMPLETE", "STUCK", "CANCELLED", "CREDIT_NOTE_ISSUED" ] + } + } + } ], + "responses" : { "500" : { "description" : "Internal Server Error", "content" : { @@ -22075,8 +18337,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -22110,11 +18372,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "GOOGLE_ANALYTICS", "CONFIRMATION_EMAIL_FOR_ORGANIZER", "SEND_RESERVED_CODE", "CONFIRMATION_EMAIL", "CONFIRMATION_EMAIL_SUBSCRIPTION", "OFFLINE_RESERVATION_EXPIRED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL_FOR_ORGANIZER", "CREDIT_NOTE_ISSUED_EMAIL", "OFFLINE_RESERVATION_EXPIRING_EMAIL_FOR_ORGANIZER", "OFFLINE_PAYMENT_MATCHES_FOUND", "REMINDER_EMAIL", "REMINDER_TICKET_ADDITIONAL_INFO", "REMINDER_TICKETS_ASSIGNMENT_EMAIL", "TICKET_EMAIL", "TICKET_EMAIL_FOR_ONLINE_EVENT", "TICKET_HAS_CHANGED_OWNER", "TICKET_HAS_BEEN_CANCELLED", "TICKET_HAS_BEEN_CANCELLED_ADMIN", "TICKET_PDF", "RECEIPT_PDF", "INVOICE_PDF", "CREDIT_NOTE_PDF", "SUBSCRIPTION_PDF", "WAITING_QUEUE_JOINED", "WAITING_QUEUE_RESERVATION_EMAIL", "CUSTOM_MESSAGE" ] - } + "$ref" : "#/components/schemas/PageAndContentListTicketReservation" } } } @@ -22122,10 +18380,26 @@ } } }, - "/admin/api/organizations" : { + "/admin/api/reservation/{purchaseContextType}/{publicIdentifier}/reservations/all-status" : { "get" : { - "tags" : [ "users-api-controller" ], - "operationId" : "getAllOrganizations_1", + "tags" : [ "admin-reservation-api-controller" ], + "operationId" : "getAllStatus", + "parameters" : [ { + "name" : "purchaseContextType", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -22147,16 +18421,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -22184,7 +18448,8 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/Organization" + "type" : "string", + "enum" : [ "PENDING", "IN_PAYMENT", "EXTERNAL_PROCESSING_PAYMENT", "WAITING_EXTERNAL_CONFIRMATION", "OFFLINE_PAYMENT", "DEFERRED_OFFLINE_PAYMENT", "FINALIZING", "OFFLINE_FINALIZING", "COMPLETE", "STUCK", "CANCELLED", "CREDIT_NOTE_ISSUED" ] } } } @@ -22193,18 +18458,25 @@ } } }, - "/admin/api/organizations/{id}" : { + "/admin/api/promo-code/{promoCodeId}/detailed-usage" : { "get" : { - "tags" : [ "users-api-controller" ], - "operationId" : "getOrganization", + "tags" : [ "promo-code-discount-api-controller" ], + "operationId" : "retrieveDetailedUsage", "parameters" : [ { - "name" : "id", + "name" : "promoCodeId", "in" : "path", "required" : true, "schema" : { "type" : "integer", "format" : "int32" } + }, { + "name" : "eventShortName", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } } ], "responses" : { "500" : { @@ -22227,16 +18499,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -22262,7 +18524,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/Organization" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PromoCodeUsageResult" + } } } } @@ -22270,26 +18535,18 @@ } } }, - "/admin/api/organization/{organizationId}/subscription/{subscriptionId}/events" : { + "/admin/api/promo-code/{promoCodeId}/count-use" : { "get" : { - "tags" : [ "subscription-api-controller" ], - "operationId" : "getLinkedEvents_1", + "tags" : [ "promo-code-discount-api-controller" ], + "operationId" : "countPromoCodeUse", "parameters" : [ { - "name" : "organizationId", + "name" : "promoCodeId", "in" : "path", "required" : true, "schema" : { "type" : "integer", "format" : "int32" } - }, { - "name" : "subscriptionId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "format" : "uuid" - } } ], "responses" : { "500" : { @@ -22312,16 +18569,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -22347,10 +18594,8 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EventSubscriptionLink" - } + "type" : "integer", + "format" : "int32" } } } @@ -22358,18 +18603,40 @@ } } }, - "/admin/api/organization/{organizationId}/subscription/list" : { + "/admin/api/payments/{purchaseContextType}/{publicIdentifier}/list" : { "get" : { - "tags" : [ "subscription-api-controller" ], - "operationId" : "findAll_2", + "tags" : [ "admin-payments-api-controller" ], + "operationId" : "getPaymentsForPurchaseContext", "parameters" : [ { - "name" : "organizationId", + "name" : "purchaseContextType", "in" : "path", "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "page", + "in" : "query", + "required" : false, "schema" : { "type" : "integer", "format" : "int32" } + }, { + "name" : "search", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } } ], "responses" : { "500" : { @@ -22392,16 +18659,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -22427,10 +18684,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SubscriptionDescriptorWithStatistics" - } + "$ref" : "#/components/schemas/PageAndContentListReservationPaymentDetail" } } } @@ -22438,17 +18692,31 @@ } } }, - "/admin/api/organization/{organizationId}/subscription/active" : { + "/admin/api/payments/{purchaseContextType}/{publicIdentifier}/download" : { "get" : { - "tags" : [ "subscription-api-controller" ], - "operationId" : "findActive", + "tags" : [ "admin-payments-api-controller" ], + "operationId" : "exportPayments", "parameters" : [ { - "name" : "organizationId", + "name" : "purchaseContextType", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string", + "enum" : [ "subscription", "event" ] + } + }, { + "name" : "publicIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "search", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" } } ], "responses" : { @@ -22472,16 +18740,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -22503,25 +18761,15 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SubscriptionDescriptor" - } - } - } - } + "description" : "OK" } } } }, - "/admin/api/organization/{organizationId}/promo-code" : { + "/admin/api/paymentProxies/{organizationId}" : { "get" : { - "tags" : [ "promo-code-discount-api-controller" ], - "operationId" : "listPromoCodeInOrganization", + "tags" : [ "event-api-controller" ], + "operationId" : "getPaymentProxies", "parameters" : [ { "name" : "organizationId", "in" : "path", @@ -22552,16 +18800,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -22589,7 +18827,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/PromoCodeDiscountWithFormattedTimeAndAmount" + "$ref" : "#/components/schemas/PaymentMethodDTO" } } } @@ -22598,11 +18836,37 @@ } } }, - "/admin/api/location/timezones" : { + "/admin/api/overridable-template/{name}/{locale}" : { "get" : { - "tags" : [ "location-api-controller" ], - "operationId" : "getTimezones", + "tags" : [ "resource-controller" ], + "operationId" : "getTemplate", + "parameters" : [ { + "name" : "name", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "GOOGLE_ANALYTICS", "CONFIRMATION_EMAIL_FOR_ORGANIZER", "SEND_RESERVED_CODE", "CONFIRMATION_EMAIL", "CONFIRMATION_EMAIL_SUBSCRIPTION", "OFFLINE_RESERVATION_EXPIRED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL_FOR_ORGANIZER", "CREDIT_NOTE_ISSUED_EMAIL", "OFFLINE_RESERVATION_EXPIRING_EMAIL_FOR_ORGANIZER", "OFFLINE_PAYMENT_MATCHES_FOUND", "REMINDER_EMAIL", "REMINDER_TICKET_ADDITIONAL_INFO", "REMINDER_TICKETS_ASSIGNMENT_EMAIL", "TICKET_EMAIL", "TICKET_EMAIL_FOR_ONLINE_EVENT", "TICKET_HAS_CHANGED_OWNER", "TICKET_HAS_BEEN_CANCELLED", "TICKET_HAS_BEEN_CANCELLED_ADMIN", "TICKET_PDF", "RECEIPT_PDF", "INVOICE_PDF", "CREDIT_NOTE_PDF", "SUBSCRIPTION_PDF", "WAITING_QUEUE_JOINED", "WAITING_QUEUE_RESERVATION_EMAIL", "CUSTOM_MESSAGE" ] + } + }, { + "name" : "locale", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { + "400" : { + "description" : "Bad Request", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, "500" : { "description" : "Internal Server Error", "content" : { @@ -22613,6 +18877,37 @@ } } }, + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK" + } + } + } + }, + "/admin/api/overridable-template/" : { + "get" : { + "tags" : [ "resource-controller" ], + "operationId" : "getOverridableTemplates", + "responses" : { "400" : { "description" : "Bad Request", "content" : { @@ -22623,8 +18918,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -22660,7 +18955,8 @@ "schema" : { "type" : "array", "items" : { - "type" : "string" + "type" : "string", + "enum" : [ "GOOGLE_ANALYTICS", "CONFIRMATION_EMAIL_FOR_ORGANIZER", "SEND_RESERVED_CODE", "CONFIRMATION_EMAIL", "CONFIRMATION_EMAIL_SUBSCRIPTION", "OFFLINE_RESERVATION_EXPIRED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL", "CHARGE_ATTEMPT_FAILED_EMAIL_FOR_ORGANIZER", "CREDIT_NOTE_ISSUED_EMAIL", "OFFLINE_RESERVATION_EXPIRING_EMAIL_FOR_ORGANIZER", "OFFLINE_PAYMENT_MATCHES_FOUND", "REMINDER_EMAIL", "REMINDER_TICKET_ADDITIONAL_INFO", "REMINDER_TICKETS_ASSIGNMENT_EMAIL", "TICKET_EMAIL", "TICKET_EMAIL_FOR_ONLINE_EVENT", "TICKET_HAS_CHANGED_OWNER", "TICKET_HAS_BEEN_CANCELLED", "TICKET_HAS_BEEN_CANCELLED_ADMIN", "TICKET_PDF", "RECEIPT_PDF", "INVOICE_PDF", "CREDIT_NOTE_PDF", "SUBSCRIPTION_PDF", "WAITING_QUEUE_JOINED", "WAITING_QUEUE_RESERVATION_EMAIL", "CUSTOM_MESSAGE" ] } } } @@ -22669,27 +18965,10 @@ } } }, - "/admin/api/location/timezone" : { + "/admin/api/organizations" : { "get" : { - "tags" : [ "location-api-controller" ], - "operationId" : "getTimezone", - "parameters" : [ { - "name" : "lat", - "in" : "query", - "required" : true, - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "lng", - "in" : "query", - "required" : true, - "schema" : { - "type" : "number", - "format" : "double" - } - } ], + "tags" : [ "users-api-controller" ], + "operationId" : "getAllOrganizations_1", "responses" : { "500" : { "description" : "Internal Server Error", @@ -22711,16 +18990,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -22746,7 +19015,10 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Organization" + } } } } @@ -22754,23 +19026,17 @@ } } }, - "/admin/api/location/static-map-image" : { + "/admin/api/organizations/{id}" : { "get" : { - "tags" : [ "location-api-controller" ], - "operationId" : "getMapImage", + "tags" : [ "users-api-controller" ], + "operationId" : "getOrganization", "parameters" : [ { - "name" : "lat", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "lng", - "in" : "query", - "required" : false, + "name" : "id", + "in" : "path", + "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -22794,16 +19060,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -22829,7 +19085,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/Organization" } } } @@ -22837,10 +19093,27 @@ } } }, - "/admin/api/location/map-provider-client-api-key" : { + "/admin/api/organization/{organizationId}/subscription/{subscriptionId}/events" : { "get" : { - "tags" : [ "location-api-controller" ], - "operationId" : "getGeoInfoProviderAndKeys", + "tags" : [ "subscription-api-controller" ], + "operationId" : "getLinkedEvents_1", + "parameters" : [ { + "name" : "organizationId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "subscriptionId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "format" : "uuid" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -22862,16 +19135,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -22897,7 +19160,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ProviderAndKeys" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EventSubscriptionLink" + } } } } @@ -22905,10 +19171,10 @@ } } }, - "/admin/api/group/for/{organizationId}" : { + "/admin/api/organization/{organizationId}/subscription/list" : { "get" : { - "tags" : [ "group-api-controller" ], - "operationId" : "loadAllGroupsForOrganization", + "tags" : [ "subscription-api-controller" ], + "operationId" : "findAll_2", "parameters" : [ { "name" : "organizationId", "in" : "path", @@ -22917,26 +19183,8 @@ "type" : "integer", "format" : "int32" } - }, { - "name" : "showAll", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } } ], "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -22947,8 +19195,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -22984,7 +19232,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/Group" + "$ref" : "#/components/schemas/SubscriptionDescriptorWithStatistics" } } } @@ -22993,10 +19241,10 @@ } } }, - "/admin/api/group/for/{organizationId}/detail/{listId}" : { + "/admin/api/organization/{organizationId}/subscription/active" : { "get" : { - "tags" : [ "group-api-controller" ], - "operationId" : "loadDetail", + "tags" : [ "subscription-api-controller" ], + "operationId" : "findActive", "parameters" : [ { "name" : "organizationId", "in" : "path", @@ -23005,26 +19253,8 @@ "type" : "integer", "format" : "int32" } - }, { - "name" : "listId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } } ], "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -23035,8 +19265,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -23070,7 +19300,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/GroupModification" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SubscriptionDescriptor" + } } } } @@ -23078,19 +19311,30 @@ } } }, - "/admin/api/group/for/event/{eventName}" : { + "/admin/api/organization/{organizationId}/promo-code" : { "get" : { - "tags" : [ "group-api-controller" ], - "operationId" : "findActiveGroup", + "tags" : [ "promo-code-discount-api-controller" ], + "operationId" : "listPromoCodeInOrganization", "parameters" : [ { - "name" : "eventName", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { + "500" : { + "description" : "Internal Server Error", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, "400" : { "description" : "Bad Request", "content" : { @@ -23101,6 +19345,47 @@ } } }, + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PromoCodeDiscountWithFormattedTimeAndAmount" + } + } + } + } + } + } + } + }, + "/admin/api/location/timezones" : { + "get" : { + "tags" : [ "location-api-controller" ], + "operationId" : "getTimezones", + "responses" : { "500" : { "description" : "Internal Server Error", "content" : { @@ -23111,8 +19396,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -23146,7 +19431,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/LinkedGroup" + "type" : "array", + "items" : { + "type" : "string" + } } } } @@ -23154,37 +19442,28 @@ } } }, - "/admin/api/group/for/event/{eventName}/category/{categoryId}" : { + "/admin/api/location/timezone" : { "get" : { - "tags" : [ "group-api-controller" ], - "operationId" : "findActiveGroup_1", + "tags" : [ "location-api-controller" ], + "operationId" : "getTimezone", "parameters" : [ { - "name" : "eventName", - "in" : "path", + "name" : "lat", + "in" : "query", "required" : true, "schema" : { - "type" : "string" + "type" : "number", + "format" : "double" } }, { - "name" : "categoryId", - "in" : "path", + "name" : "lng", + "in" : "query", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "number", + "format" : "double" } } ], "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -23195,8 +19474,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -23230,7 +19509,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/LinkedGroup" + "type" : "string" } } } @@ -23238,29 +19517,26 @@ } } }, - "/admin/api/group/for/event/{eventName}/all" : { + "/admin/api/location/static-map-image" : { "get" : { - "tags" : [ "group-api-controller" ], - "operationId" : "findLinked", + "tags" : [ "location-api-controller" ], + "operationId" : "getMapImage", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, + "name" : "lat", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "lng", + "in" : "query", + "required" : false, "schema" : { "type" : "string" } } ], "responses" : { - "400" : { - "description" : "Bad Request", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "500" : { "description" : "Internal Server Error", "content" : { @@ -23271,8 +19547,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -23306,10 +19582,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/LinkedGroup" - } + "type" : "string" } } } @@ -23317,10 +19590,10 @@ } } }, - "/admin/api/extensions/setting/system" : { + "/admin/api/location/map-provider-client-api-key" : { "get" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "getParametersFor", + "tags" : [ "location-api-controller" ], + "operationId" : "getGeoInfoProviderAndKeys", "responses" : { "500" : { "description" : "Internal Server Error", @@ -23342,16 +19615,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -23377,13 +19640,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExtensionParameterMetadataAndValue" - } - } + "$ref" : "#/components/schemas/ProviderAndKeys" } } } @@ -23391,30 +19648,28 @@ } } }, - "/admin/api/extensions/setting/organization/{orgId}" : { + "/admin/api/group/for/{organizationId}" : { "get" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "getParametersFor_1", + "tags" : [ "group-api-controller" ], + "operationId" : "loadAllGroupsForOrganization", "parameters" : [ { - "name" : "orgId", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { "type" : "integer", "format" : "int32" } + }, { + "name" : "showAll", + "in" : "query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -23425,8 +19680,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -23460,12 +19715,9 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExtensionParameterMetadataAndValue" - } + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Group" } } } @@ -23474,12 +19726,12 @@ } } }, - "/admin/api/extensions/setting/organization/{orgId}/event/{shortName}" : { + "/admin/api/group/for/{organizationId}/detail/{listId}" : { "get" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "getParametersFor_2", + "tags" : [ "group-api-controller" ], + "operationId" : "loadDetail", "parameters" : [ { - "name" : "orgId", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { @@ -23487,24 +19739,15 @@ "format" : "int32" } }, { - "name" : "shortName", + "name" : "listId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -23515,8 +19758,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -23550,13 +19793,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExtensionParameterMetadataAndValue" - } - } + "$ref" : "#/components/schemas/GroupModification" } } } @@ -23564,21 +19801,19 @@ } } }, - "/admin/api/extensions/sample" : { + "/admin/api/group/for/event/{eventName}" : { "get" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "getSample", + "tags" : [ "group-api-controller" ], + "operationId" : "findActiveGroup", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -23589,8 +19824,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -23624,7 +19859,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ExtensionSupport" + "$ref" : "#/components/schemas/LinkedGroup" } } } @@ -23632,53 +19867,27 @@ } } }, - "/admin/api/extensions/log" : { + "/admin/api/group/for/event/{eventName}/category/{categoryId}" : { "get" : { - "tags" : [ "extension-api-controller" ], - "operationId" : "getLog", + "tags" : [ "group-api-controller" ], + "operationId" : "findActiveGroup_1", "parameters" : [ { - "name" : "path", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "name", - "in" : "query", - "required" : false, + "name" : "eventName", + "in" : "path", + "required" : true, "schema" : { "type" : "string" } }, { - "name" : "type", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "SUCCESS", "ERROR", "INFO", "WARNING" ] - } - }, { - "name" : "page", - "in" : "query", - "required" : false, + "name" : "categoryId", + "in" : "path", + "required" : true, "schema" : { "type" : "integer", - "format" : "int32", - "default" : 0 + "format" : "int32" } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -23689,8 +19898,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -23724,7 +19933,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/PageAndContentListExtensionLog" + "$ref" : "#/components/schemas/LinkedGroup" } } } @@ -23732,36 +19941,19 @@ } } }, - "/admin/api/export/reservations" : { + "/admin/api/group/for/event/{eventName}/all" : { "get" : { - "tags" : [ "export-api-controller" ], - "operationId" : "downloadAllEvents", + "tags" : [ "group-api-controller" ], + "operationId" : "findLinked", "parameters" : [ { - "name" : "from", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "to", - "in" : "query", + "name" : "eventName", + "in" : "path", "required" : true, "schema" : { "type" : "string" } } ], "responses" : { - "500" : { - "description" : "Internal Server Error", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "400" : { "description" : "Bad Request", "content" : { @@ -23772,8 +19964,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "500" : { + "description" : "Internal Server Error", "content" : { "*/*" : { "schema" : { @@ -23803,15 +19995,25 @@ } }, "200" : { - "description" : "OK" + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LinkedGroup" + } + } + } + } } } } }, - "/admin/api/expired-events" : { + "/admin/api/extensions/setting/system" : { "get" : { - "tags" : [ "event-api-controller" ], - "operationId" : "getAllExpiredEvents", + "tags" : [ "extension-api-controller" ], + "operationId" : "getParametersFor", "responses" : { "500" : { "description" : "Internal Server Error", @@ -23833,16 +20035,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -23868,9 +20060,12 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EventStatistic" + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ExtensionParameterMetadataAndValue" + } } } } @@ -23879,23 +20074,17 @@ } } }, - "/admin/api/events" : { + "/admin/api/extensions/setting/organization/{orgId}" : { "get" : { - "tags" : [ "event-api-controller" ], - "operationId" : "getAllEvents_1", + "tags" : [ "extension-api-controller" ], + "operationId" : "getParametersFor_1", "parameters" : [ { - "name" : "includeOnline", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "name" : "Authorization", - "in" : "header", + "name" : "orgId", + "in" : "path", + "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -23919,16 +20108,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -23954,17 +20133,13 @@ "content" : { "*/*" : { "schema" : { - "oneOf" : [ { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EventListItem" - } - }, { + "type" : "object", + "additionalProperties" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/EventStatistic" + "$ref" : "#/components/schemas/ExtensionParameterMetadataAndValue" } - } ] + } } } } @@ -23972,12 +20147,20 @@ } } }, - "/admin/api/events/{name}" : { + "/admin/api/extensions/setting/organization/{orgId}/event/{shortName}" : { "get" : { - "tags" : [ "event-api-controller" ], - "operationId" : "getSingleEvent", + "tags" : [ "extension-api-controller" ], + "operationId" : "getParametersFor_2", "parameters" : [ { - "name" : "name", + "name" : "orgId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "shortName", "in" : "path", "required" : true, "schema" : { @@ -24005,16 +20188,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -24040,7 +20213,13 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/EventAndOrganization" + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ExtensionParameterMetadataAndValue" + } + } } } } @@ -24048,32 +20227,10 @@ } } }, - "/admin/api/events/{eventName}/ticket-sold-statistics" : { + "/admin/api/extensions/sample" : { "get" : { - "tags" : [ "event-api-controller" ], - "operationId" : "getTicketsStatistics", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "from", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "to", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "extension-api-controller" ], + "operationId" : "getSample", "responses" : { "500" : { "description" : "Internal Server Error", @@ -24095,16 +20252,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -24130,7 +20277,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/TicketsStatistics" + "$ref" : "#/components/schemas/ExtensionSupport" } } } @@ -24138,24 +20285,40 @@ } } }, - "/admin/api/events/{eventName}/sponsor-scan/export" : { + "/admin/api/extensions/log" : { "get" : { - "tags" : [ "event-api-controller" ], - "operationId" : "downloadSponsorScanExport", + "tags" : [ "extension-api-controller" ], + "operationId" : "getLog", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, + "name" : "path", + "in" : "query", + "required" : false, "schema" : { "type" : "string" } }, { - "name" : "format", + "name" : "name", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "type", "in" : "query", "required" : false, "schema" : { "type" : "string", - "default" : "excel" + "enum" : [ "SUCCESS", "ERROR", "INFO", "WARNING" ] + } + }, { + "name" : "page", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 0 } } ], "responses" : { @@ -24179,8 +20342,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -24189,8 +20352,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -24199,29 +20362,33 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/PageAndContentListExtensionLog" } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/events/{eventName}/pending-payments" : { + "/admin/api/export/reservations" : { "get" : { - "tags" : [ "event-api-controller" ], - "operationId" : "getPendingPayments", + "tags" : [ "export-api-controller" ], + "operationId" : "downloadAllEvents", "parameters" : [ { - "name" : "eventName", - "in" : "path", + "name" : "from", + "in" : "query", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "to", + "in" : "query", "required" : true, "schema" : { "type" : "string" @@ -24248,16 +20415,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -24279,33 +20436,15 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TicketReservationWithTransaction" - } - } - } - } + "description" : "OK" } } } }, - "/admin/api/events/{eventName}/pending-payments-count" : { + "/admin/api/expired-events" : { "get" : { "tags" : [ "event-api-controller" ], - "operationId" : "getPendingPaymentsCount", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "operationId" : "getAllExpiredEvents", "responses" : { "500" : { "description" : "Internal Server Error", @@ -24327,16 +20466,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -24362,8 +20491,10 @@ "content" : { "*/*" : { "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EventStatistic" + } } } } @@ -24371,14 +20502,21 @@ } } }, - "/admin/api/events/{eventName}/languages" : { + "/admin/api/events" : { "get" : { "tags" : [ "event-api-controller" ], - "operationId" : "getAvailableLocales", + "operationId" : "getAllEvents_1", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, + "name" : "includeOnline", + "in" : "query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "name" : "Authorization", + "in" : "header", "schema" : { "type" : "string" } @@ -24404,16 +20542,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -24439,10 +20567,17 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContentLanguage" - } + "oneOf" : [ { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EventListItem" + } + }, { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EventStatistic" + } + } ] } } } @@ -24450,12 +20585,12 @@ } } }, - "/admin/api/events/{eventName}/invoices/count" : { + "/admin/api/events/{name}" : { "get" : { "tags" : [ "event-api-controller" ], - "operationId" : "countBillingDocumentsForEvent", + "operationId" : "getSingleEvent", "parameters" : [ { - "name" : "eventName", + "name" : "name", "in" : "path", "required" : true, "schema" : { @@ -24483,16 +20618,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -24518,8 +20643,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "integer", - "format" : "int32" + "$ref" : "#/components/schemas/EventAndOrganization" } } } @@ -24527,10 +20651,10 @@ } } }, - "/admin/api/events/{eventName}/fields" : { + "/admin/api/events/{eventName}/ticket-sold-statistics" : { "get" : { "tags" : [ "event-api-controller" ], - "operationId" : "getAllFields", + "operationId" : "getTicketsStatistics", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -24538,6 +20662,20 @@ "schema" : { "type" : "string" } + }, { + "name" : "from", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "to", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } } ], "responses" : { "500" : { @@ -24560,16 +20698,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -24595,10 +20723,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SerializablePairStringString" - } + "$ref" : "#/components/schemas/TicketsStatistics" } } } @@ -24606,10 +20731,10 @@ } } }, - "/admin/api/events/{eventName}/export" : { + "/admin/api/events/{eventName}/sponsor-scan/export" : { "get" : { "tags" : [ "event-api-controller" ], - "operationId" : "downloadAllTicketsCSV", + "operationId" : "downloadSponsorScanExport", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -24647,16 +20772,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -24683,10 +20798,10 @@ } } }, - "/admin/api/events/{eventName}/category/{categoryId}/ticket" : { + "/admin/api/events/{eventName}/pending-payments" : { "get" : { "tags" : [ "event-api-controller" ], - "operationId" : "getTicketsInCategory", + "operationId" : "getPendingPayments", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -24694,29 +20809,6 @@ "schema" : { "type" : "string" } - }, { - "name" : "categoryId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "search", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } } ], "responses" : { "500" : { @@ -24739,16 +20831,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -24774,7 +20856,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/PageAndContentListTicketWithStatistic" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TicketReservationWithTransaction" + } } } } @@ -24782,10 +20867,10 @@ } } }, - "/admin/api/events/{eventName}/categories/{categoryId}/sent-codes" : { + "/admin/api/events/{eventName}/pending-payments-count" : { "get" : { - "tags" : [ "special-price-api-controller" ], - "operationId" : "loadSentCodes", + "tags" : [ "event-api-controller" ], + "operationId" : "getPendingPaymentsCount", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -24793,14 +20878,6 @@ "schema" : { "type" : "string" } - }, { - "name" : "categoryId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } } ], "responses" : { "500" : { @@ -24823,16 +20900,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -24858,10 +20925,8 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SpecialPrice" - } + "type" : "integer", + "format" : "int32" } } } @@ -24869,10 +20934,10 @@ } } }, - "/admin/api/events/{eventName}/all-documents" : { + "/admin/api/events/{eventName}/languages" : { "get" : { "tags" : [ "event-api-controller" ], - "operationId" : "getAllInvoices", + "operationId" : "getAvailableLocales", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -24902,8 +20967,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -24912,8 +20977,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -24922,26 +20987,26 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ContentLanguage" + } } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/events/{eventName}/all-documents-xls" : { + "/admin/api/events/{eventName}/invoices/count" : { "get" : { "tags" : [ "event-api-controller" ], - "operationId" : "getAllDocumentsXls", + "operationId" : "countBillingDocumentsForEvent", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -24971,8 +21036,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -24981,8 +21046,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -24991,26 +21056,24 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/events/{eventName}/additional-services/{type}/export" : { + "/admin/api/events/{eventName}/fields" : { "get" : { - "tags" : [ "additional-service-api-controller" ], - "operationId" : "exportAdditionalServices", + "tags" : [ "event-api-controller" ], + "operationId" : "getAllFields", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -25018,14 +21081,6 @@ "schema" : { "type" : "string" } - }, { - "name" : "type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "DONATION", "SUPPLEMENT" ] - } } ], "responses" : { "500" : { @@ -25048,8 +21103,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -25058,8 +21113,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -25068,33 +21123,40 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SerializablePairStringString" + } } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/events/{eventId}/promo-code" : { + "/admin/api/events/{eventName}/export" : { "get" : { - "tags" : [ "promo-code-discount-api-controller" ], - "operationId" : "listPromoCodeInEvent", + "tags" : [ "event-api-controller" ], + "operationId" : "downloadAllTicketsCSV", "parameters" : [ { - "name" : "eventId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" + } + }, { + "name" : "format", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string", + "default" : "excel" } } ], "responses" : { @@ -25118,16 +21180,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -25149,33 +21201,45 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PromoCodeDiscountWithFormattedTimeAndAmount" - } - } - } - } + "description" : "OK" } } } }, - "/admin/api/events/names-in-organization/{orgId}" : { + "/admin/api/events/{eventName}/category/{categoryId}/ticket" : { "get" : { "tags" : [ "event-api-controller" ], - "operationId" : "getEventsNameInOrganization", + "operationId" : "getTicketsInCategory", "parameters" : [ { - "name" : "orgId", + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "categoryId", "in" : "path", "required" : true, "schema" : { "type" : "integer", "format" : "int32" } + }, { + "name" : "page", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "search", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } } ], "responses" : { "500" : { @@ -25198,16 +21262,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -25233,10 +21287,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } + "$ref" : "#/components/schemas/PageAndContentListTicketWithStatistic" } } } @@ -25244,20 +21295,24 @@ } } }, - "/admin/api/events/name-by-ids" : { + "/admin/api/events/{eventName}/categories/{categoryId}/sent-codes" : { "get" : { - "tags" : [ "event-api-controller" ], - "operationId" : "getEventNamesByIds", + "tags" : [ "special-price-api-controller" ], + "operationId" : "loadSentCodes", "parameters" : [ { - "name" : "eventIds", - "in" : "query", + "name" : "eventName", + "in" : "path", "required" : true, "schema" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int32" - } + "type" : "string" + } + }, { + "name" : "categoryId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -25281,16 +21336,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -25316,9 +21361,9 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SpecialPrice" } } } @@ -25327,17 +21372,16 @@ } } }, - "/admin/api/events/id/{eventId}" : { + "/admin/api/events/{eventName}/all-documents" : { "get" : { "tags" : [ "event-api-controller" ], - "operationId" : "getSingleEventById", + "operationId" : "getAllInvoices", "parameters" : [ { - "name" : "eventId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } } ], "responses" : { @@ -25361,16 +21405,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -25392,22 +21426,23 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/Event" - } - } - } + "description" : "OK" } } } }, - "/admin/api/events-supported-languages" : { + "/admin/api/events/{eventName}/all-documents-xls" : { "get" : { "tags" : [ "event-api-controller" ], - "operationId" : "getSupportedLanguages_1", + "operationId" : "getAllDocumentsXls", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -25429,16 +21464,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -25460,25 +21485,31 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContentLanguage" - } - } - } - } + "description" : "OK" } } } }, - "/admin/api/events-count" : { + "/admin/api/events/{eventName}/additional-services/{type}/export" : { "get" : { - "tags" : [ "event-api-controller" ], - "operationId" : "getEventsCount", + "tags" : [ "additional-service-api-controller" ], + "operationId" : "exportAdditionalServices", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "type", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "DONATION", "SUPPLEMENT" ] + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -25500,16 +21531,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -25531,23 +21552,24 @@ } }, "200" : { - "description" : "OK", - "content" : { - "*/*" : { - "schema" : { - "type" : "integer", - "format" : "int32" - } - } - } + "description" : "OK" } } } }, - "/admin/api/events-all-languages" : { + "/admin/api/events/{eventId}/promo-code" : { "get" : { - "tags" : [ "event-api-controller" ], - "operationId" : "getAllLanguages", + "tags" : [ "promo-code-discount-api-controller" ], + "operationId" : "listPromoCodeInEvent", + "parameters" : [ { + "name" : "eventId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -25569,16 +21591,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -25606,7 +21618,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/ContentLanguage" + "$ref" : "#/components/schemas/PromoCodeDiscountWithFormattedTimeAndAmount" } } } @@ -25615,16 +21627,17 @@ } } }, - "/admin/api/event/{eventName}/waiting-queue/load" : { + "/admin/api/events/names-in-organization/{orgId}" : { "get" : { - "tags" : [ "admin-waiting-queue-api-controller" ], - "operationId" : "loadAllSubscriptions", + "tags" : [ "event-api-controller" ], + "operationId" : "getEventsNameInOrganization", "parameters" : [ { - "name" : "eventName", + "name" : "orgId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -25648,16 +21661,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -25683,9 +21686,9 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/WaitingQueueSubscription" + "type" : "object", + "additionalProperties" : { + "type" : "string" } } } @@ -25694,24 +21697,20 @@ } } }, - "/admin/api/event/{eventName}/waiting-queue/download" : { + "/admin/api/events/name-by-ids" : { "get" : { - "tags" : [ "admin-waiting-queue-api-controller" ], - "operationId" : "downloadAllSubscriptions", + "tags" : [ "event-api-controller" ], + "operationId" : "getEventNamesByIds", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "format", + "name" : "eventIds", "in" : "query", - "required" : false, + "required" : true, "schema" : { - "type" : "string", - "default" : "excel" + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int32" + } } } ], "responses" : { @@ -25735,8 +21734,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -25745,8 +21744,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -25755,32 +21754,33 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "object", + "additionalProperties" : { + "type" : "string" + } } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/event/{eventName}/waiting-queue/count" : { + "/admin/api/events/id/{eventId}" : { "get" : { - "tags" : [ "admin-waiting-queue-api-controller" ], - "operationId" : "countWaitingPeople", + "tags" : [ "event-api-controller" ], + "operationId" : "getSingleEventById", "parameters" : [ { - "name" : "eventName", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -25804,16 +21804,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -25839,8 +21829,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "integer", - "format" : "int32" + "$ref" : "#/components/schemas/Event" } } } @@ -25848,25 +21837,10 @@ } } }, - "/admin/api/event/{eventName}/attendees/import/{requestId}/status" : { + "/admin/api/events-supported-languages" : { "get" : { - "tags" : [ "attendee-bulk-import-api-controller" ], - "operationId" : "getRequestsStatus", - "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "requestId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "event-api-controller" ], + "operationId" : "getSupportedLanguages_1", "responses" : { "500" : { "description" : "Internal Server Error", @@ -25888,16 +21862,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -25923,7 +21887,10 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ResultAdminReservationRequestStats" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ContentLanguage" + } } } } @@ -25931,19 +21898,10 @@ } } }, - "/admin/api/event/{eventId}/additional-services/count" : { + "/admin/api/events-count" : { "get" : { - "tags" : [ "additional-service-api-controller" ], - "operationId" : "countUse", - "parameters" : [ { - "name" : "eventId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - } ], + "tags" : [ "event-api-controller" ], + "operationId" : "getEventsCount", "responses" : { "500" : { "description" : "Internal Server Error", @@ -25965,16 +21923,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -26000,14 +21948,8 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } + "type" : "integer", + "format" : "int32" } } } @@ -26015,10 +21957,10 @@ } } }, - "/admin/api/configuration/setting-categories" : { + "/admin/api/events-all-languages" : { "get" : { - "tags" : [ "configuration-api-controller" ], - "operationId" : "getSettingCategories", + "tags" : [ "event-api-controller" ], + "operationId" : "getAllLanguages", "responses" : { "500" : { "description" : "Internal Server Error", @@ -26040,16 +21982,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -26077,8 +22009,7 @@ "schema" : { "type" : "array", "items" : { - "type" : "string", - "enum" : [ "GENERAL", "RESERVATION_UI", "RESERVATION_EMBED", "PAYMENT", "PAYMENT_STRIPE", "PAYMENT_SAFERPAY", "PAYMENT_PAYPAL", "PAYMENT_OFFLINE", "PAYMENT_MOLLIE", "INVOICE", "INVOICE_EU", "MAIL", "ALFIO_PI", "MAP", "TRANSLATIONS", "PASS_INTEGRATION", "WALLET_INTEGRATION", "WAITING_LIST", "IMPORT_ATTENDEE", "OPENID", "SUBSCRIPTIONS" ] + "$ref" : "#/components/schemas/ContentLanguage" } } } @@ -26087,17 +22018,16 @@ } } }, - "/admin/api/configuration/platform-mode/status/{organizationId}" : { + "/admin/api/event/{eventName}/waiting-queue/load" : { "get" : { - "tags" : [ "configuration-api-controller" ], - "operationId" : "loadPlatformModeStatus", + "tags" : [ "admin-waiting-queue-api-controller" ], + "operationId" : "loadAllSubscriptions", "parameters" : [ { - "name" : "organizationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } } ], "responses" : { @@ -26121,16 +22051,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -26156,9 +22076,9 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "boolean" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/WaitingQueueSubscription" } } } @@ -26167,24 +22087,24 @@ } } }, - "/admin/api/configuration/organizations/{organizationId}/single/{key}" : { + "/admin/api/event/{eventName}/waiting-queue/download" : { "get" : { - "tags" : [ "configuration-api-controller" ], - "operationId" : "getSingleConfigForOrganization", + "tags" : [ "admin-waiting-queue-api-controller" ], + "operationId" : "downloadAllSubscriptions", "parameters" : [ { - "name" : "organizationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } }, { - "name" : "key", - "in" : "path", - "required" : true, + "name" : "format", + "in" : "query", + "required" : false, "schema" : { - "type" : "string" + "type" : "string", + "default" : "excel" } } ], "responses" : { @@ -26208,8 +22128,57 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK" + } + } + } + }, + "/admin/api/event/{eventName}/waiting-queue/count" : { + "get" : { + "tags" : [ "admin-waiting-queue-api-controller" ], + "operationId" : "countWaitingPeople", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Internal Server Error", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -26243,7 +22212,8 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } } @@ -26251,17 +22221,23 @@ } } }, - "/admin/api/configuration/organizations/{organizationId}/load" : { + "/admin/api/event/{eventName}/attendees/import/{requestId}/status" : { "get" : { - "tags" : [ "configuration-api-controller" ], - "operationId" : "loadOrganizationConfiguration", + "tags" : [ "attendee-bulk-import-api-controller" ], + "operationId" : "getRequestsStatus", "parameters" : [ { - "name" : "organizationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" + } + }, { + "name" : "requestId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } } ], "responses" : { @@ -26285,16 +22261,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -26320,13 +22286,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Configuration" - } - } + "$ref" : "#/components/schemas/ResultAdminReservationRequestStats" } } } @@ -26334,10 +22294,19 @@ } } }, - "/admin/api/configuration/load" : { + "/admin/api/event/{eventId}/additional-services/count" : { "get" : { - "tags" : [ "configuration-api-controller" ], - "operationId" : "loadConfiguration", + "tags" : [ "additional-service-api-controller" ], + "operationId" : "countUse", + "parameters" : [ { + "name" : "eventId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -26359,16 +22328,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -26396,9 +22355,10 @@ "schema" : { "type" : "object", "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Configuration" + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" } } } @@ -26408,10 +22368,10 @@ } } }, - "/admin/api/configuration/instance-settings" : { + "/admin/api/configuration/setting-categories" : { "get" : { "tags" : [ "configuration-api-controller" ], - "operationId" : "loadInstanceSettings", + "operationId" : "getSettingCategories", "responses" : { "500" : { "description" : "Internal Server Error", @@ -26433,16 +22393,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -26468,7 +22418,11 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/InstanceSettings" + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "GENERAL", "RESERVATION_UI", "RESERVATION_EMBED", "PAYMENT", "PAYMENT_STRIPE", "PAYMENT_SAFERPAY", "PAYMENT_PAYPAL", "PAYMENT_OFFLINE", "PAYMENT_MOLLIE", "INVOICE", "INVOICE_EU", "MAIL", "ALFIO_PI", "MAP", "TRANSLATIONS", "PASS_INTEGRATION", "WALLET_INTEGRATION", "WAITING_LIST", "IMPORT_ATTENDEE", "OPENID", "SUBSCRIPTIONS" ] + } } } } @@ -26476,23 +22430,17 @@ } } }, - "/admin/api/configuration/events/{eventName}/single/{key}" : { + "/admin/api/configuration/platform-mode/status/{organizationId}" : { "get" : { "tags" : [ "configuration-api-controller" ], - "operationId" : "getSingleConfigForEvent", + "operationId" : "loadPlatformModeStatus", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "key", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -26516,16 +22464,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -26551,7 +22489,10 @@ "content" : { "*/*" : { "schema" : { - "type" : "string" + "type" : "object", + "additionalProperties" : { + "type" : "boolean" + } } } } @@ -26559,18 +22500,25 @@ } } }, - "/admin/api/configuration/events/{eventId}/load" : { + "/admin/api/configuration/organizations/{organizationId}/single/{key}" : { "get" : { "tags" : [ "configuration-api-controller" ], - "operationId" : "loadEventConfiguration", + "operationId" : "getSingleConfigForOrganization", "parameters" : [ { - "name" : "eventId", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { "type" : "integer", "format" : "int32" } + }, { + "name" : "key", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } } ], "responses" : { "500" : { @@ -26593,16 +22541,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -26628,13 +22566,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Configuration" - } - } + "type" : "string" } } } @@ -26642,20 +22574,12 @@ } } }, - "/admin/api/configuration/events/{eventId}/categories/{categoryId}/load" : { + "/admin/api/configuration/organizations/{organizationId}/load" : { "get" : { "tags" : [ "configuration-api-controller" ], - "operationId" : "loadCategoryConfiguration", + "operationId" : "loadOrganizationConfiguration", "parameters" : [ { - "name" : "eventId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "categoryId", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { @@ -26684,16 +22608,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -26733,35 +22647,10 @@ } } }, - "/admin/api/configuration/event/{eventId}/matching-invoices" : { + "/admin/api/configuration/load" : { "get" : { "tags" : [ "configuration-api-controller" ], - "operationId" : "getMatchingInvoicesForEvent", - "parameters" : [ { - "name" : "eventId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "from", - "in" : "query", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - }, { - "name" : "to", - "in" : "query", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } ], + "operationId" : "loadConfiguration", "responses" : { "500" : { "description" : "Internal Server Error", @@ -26783,8 +22672,62 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Configuration" + } + } + } + } + } + } + } + } + }, + "/admin/api/configuration/instance-settings" : { + "get" : { + "tags" : [ "configuration-api-controller" ], + "operationId" : "loadInstanceSettings", + "responses" : { + "500" : { + "description" : "Internal Server Error", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -26818,11 +22761,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int32" - } + "$ref" : "#/components/schemas/InstanceSettings" } } } @@ -26830,17 +22769,23 @@ } } }, - "/admin/api/configuration/event/{eventId}/invoice-first-date" : { + "/admin/api/configuration/events/{eventName}/single/{key}" : { "get" : { "tags" : [ "configuration-api-controller" ], - "operationId" : "getFirstInvoiceDate", + "operationId" : "getSingleConfigForEvent", "parameters" : [ { - "name" : "eventId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" + } + }, { + "name" : "key", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } } ], "responses" : { @@ -26864,16 +22809,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -26899,8 +22834,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "string", - "format" : "date-time" + "type" : "string" } } } @@ -26908,10 +22842,19 @@ } } }, - "/admin/api/configuration/eu-countries" : { + "/admin/api/configuration/events/{eventId}/load" : { "get" : { "tags" : [ "configuration-api-controller" ], - "operationId" : "loadEUCountries", + "operationId" : "loadEventConfiguration", + "parameters" : [ { + "name" : "eventId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -26933,16 +22876,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -26968,9 +22901,12 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PairStringString" + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Configuration" + } } } } @@ -26979,10 +22915,27 @@ } } }, - "/admin/api/configuration/basic-configuration-needed" : { + "/admin/api/configuration/events/{eventId}/categories/{categoryId}/load" : { "get" : { "tags" : [ "configuration-api-controller" ], - "operationId" : "isBasicConfigurationNeeded", + "operationId" : "loadCategoryConfiguration", + "parameters" : [ { + "name" : "eventId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "categoryId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -27004,16 +22957,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -27039,7 +22982,13 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Configuration" + } + } } } } @@ -27047,21 +22996,30 @@ } } }, - "/admin/api/check-in/{eventName}/offline-identifiers" : { + "/admin/api/configuration/event/{eventId}/matching-invoices" : { "get" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "getOfflineIdentifiers", + "tags" : [ "configuration-api-controller" ], + "operationId" : "getMatchingInvoicesForEvent", "parameters" : [ { - "name" : "eventName", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } }, { - "name" : "changedSince", + "name" : "from", "in" : "query", - "required" : false, + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } + }, { + "name" : "to", + "in" : "query", + "required" : true, "schema" : { "type" : "integer", "format" : "int64" @@ -27088,16 +23046,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -27135,16 +23083,17 @@ } } }, - "/admin/api/check-in/{eventName}/label-layout" : { + "/admin/api/configuration/event/{eventId}/invoice-first-date" : { "get" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "getLabelLayoutForEvent", + "tags" : [ "configuration-api-controller" ], + "operationId" : "getFirstInvoiceDate", "parameters" : [ { - "name" : "eventName", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -27168,16 +23117,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -27203,7 +23142,8 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/LabelLayout" + "type" : "string", + "format" : "date-time" } } } @@ -27211,27 +23151,10 @@ } } }, - "/admin/api/check-in/{eventId}/ticket-identifiers" : { + "/admin/api/configuration/eu-countries" : { "get" : { - "tags" : [ "check-in-api-controller" ], - "operationId" : "findAllIdentifiersForAdminCheckIn", - "parameters" : [ { - "name" : "eventId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, { - "name" : "changedSince", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } ], + "tags" : [ "configuration-api-controller" ], + "operationId" : "loadEUCountries", "responses" : { "500" : { "description" : "Internal Server Error", @@ -27253,8 +23176,59 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK", + "content" : { + "*/*" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PairStringString" + } + } + } + } + } + } + } + }, + "/admin/api/configuration/basic-configuration-needed" : { + "get" : { + "tags" : [ "configuration-api-controller" ], + "operationId" : "isBasicConfigurationNeeded", + "responses" : { + "500" : { + "description" : "Internal Server Error", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -27288,11 +23262,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int32" - } + "type" : "boolean" } } } @@ -27300,32 +23270,24 @@ } } }, - "/admin/api/check-in/event/{publicIdentifier}/attendees" : { + "/admin/api/check-in/{eventName}/offline-identifiers" : { "get" : { "tags" : [ "check-in-api-controller" ], - "operationId" : "searchAttendees", + "operationId" : "getOfflineIdentifiers", "parameters" : [ { - "name" : "publicIdentifier", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "query", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "page", + "name" : "changedSince", "in" : "query", "required" : false, "schema" : { "type" : "integer", - "format" : "int32", - "default" : 0 + "format" : "int64" } } ], "responses" : { @@ -27349,16 +23311,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -27384,7 +23336,11 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/AttendeeSearchResults" + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int32" + } } } } @@ -27392,10 +23348,10 @@ } } }, - "/admin/api/check-in/event/{eventName}/ticket/{ticketIdentifier}/status" : { + "/admin/api/check-in/{eventName}/label-layout" : { "get" : { "tags" : [ "check-in-api-controller" ], - "operationId" : "getTicketStatus", + "operationId" : "getLabelLayoutForEvent", "parameters" : [ { "name" : "eventName", "in" : "path", @@ -27403,13 +23359,6 @@ "schema" : { "type" : "string" } - }, { - "name" : "ticketIdentifier", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } } ], "responses" : { "500" : { @@ -27432,16 +23381,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -27467,7 +23406,7 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/TicketCheckInStatusResult" + "$ref" : "#/components/schemas/LabelLayout" } } } @@ -27475,16 +23414,25 @@ } } }, - "/admin/api/check-in/event/{eventName}/statistics" : { + "/admin/api/check-in/{eventId}/ticket-identifiers" : { "get" : { "tags" : [ "check-in-api-controller" ], - "operationId" : "getStatistics", + "operationId" : "findAllIdentifiersForAdminCheckIn", "parameters" : [ { - "name" : "eventName", + "name" : "eventId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "changedSince", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int64" } } ], "responses" : { @@ -27508,16 +23456,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -27543,7 +23481,11 @@ "content" : { "*/*" : { "schema" : { - "$ref" : "#/components/schemas/CheckInStatistics" + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int32" + } } } } @@ -27551,17 +23493,32 @@ } } }, - "/admin/api/api-keys/organization/{organizationId}/all" : { + "/admin/api/check-in/event/{publicIdentifier}/attendees" : { "get" : { - "tags" : [ "users-api-controller" ], - "operationId" : "getAllApiKeys", + "tags" : [ "check-in-api-controller" ], + "operationId" : "searchAttendees", "parameters" : [ { - "name" : "organizationId", + "name" : "publicIdentifier", "in" : "path", "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "query", + "in" : "query", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "page", + "in" : "query", + "required" : false, "schema" : { "type" : "integer", - "format" : "int32" + "format" : "int32", + "default" : 0 } } ], "responses" : { @@ -27585,8 +23542,8 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", "content" : { "*/*" : { "schema" : { @@ -27595,8 +23552,8 @@ } } }, - "401" : { - "description" : "Unauthorized", + "403" : { + "description" : "Forbidden", "content" : { "*/*" : { "schema" : { @@ -27605,26 +23562,38 @@ } } }, - "403" : { - "description" : "Forbidden", + "200" : { + "description" : "OK", "content" : { "*/*" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/AttendeeSearchResults" } } } - }, - "200" : { - "description" : "OK" } } } }, - "/admin/api/active-events" : { + "/admin/api/check-in/event/{eventName}/ticket/{ticketIdentifier}/status" : { "get" : { - "tags" : [ "event-api-controller" ], - "operationId" : "getAllActiveEvents", + "tags" : [ "check-in-api-controller" ], + "operationId" : "getTicketStatus", + "parameters" : [ { + "name" : "eventName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ticketIdentifier", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { "500" : { "description" : "Internal Server Error", @@ -27646,16 +23615,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -27681,10 +23640,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EventStatistic" - } + "$ref" : "#/components/schemas/TicketCheckInStatusResult" } } } @@ -27692,25 +23648,17 @@ } } }, - "/api/v2/public/reservation/{reservationId}/remove-code" : { - "delete" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "removeCode", + "/admin/api/check-in/event/{eventName}/statistics" : { + "get" : { + "tags" : [ "check-in-api-controller" ], + "operationId" : "getStatistics", "parameters" : [ { - "name" : "reservationId", + "name" : "eventName", "in" : "path", "required" : true, "schema" : { "type" : "string" } - }, { - "name" : "type", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "SUBSCRIPTION" ] - } } ], "responses" : { "500" : { @@ -27733,16 +23681,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -27768,7 +23706,7 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "$ref" : "#/components/schemas/CheckInStatistics" } } } @@ -27776,23 +23714,17 @@ } } }, - "/api/v2/public/reservation/{reservationId}/payment/token" : { - "delete" : { - "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "removeToken", + "/admin/api/api-keys/organization/{organizationId}/all" : { + "get" : { + "tags" : [ "users-api-controller" ], + "operationId" : "getAllApiKeys", "parameters" : [ { - "name" : "eventName", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "reservationId", + "name" : "organizationId", "in" : "path", "required" : true, "schema" : { - "type" : "string" + "type" : "integer", + "format" : "int32" } } ], "responses" : { @@ -27816,8 +23748,49 @@ } } }, - "405" : { - "description" : "Method Not Allowed", + "401" : { + "description" : "Unauthorized", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "403" : { + "description" : "Forbidden", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "200" : { + "description" : "OK" + } + } + } + }, + "/admin/api/active-events" : { + "get" : { + "tags" : [ "event-api-controller" ], + "operationId" : "getAllActiveEvents", + "responses" : { + "500" : { + "description" : "Internal Server Error", + "content" : { + "*/*" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad Request", "content" : { "*/*" : { "schema" : { @@ -27851,7 +23824,10 @@ "content" : { "*/*" : { "schema" : { - "type" : "boolean" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EventStatistic" + } } } } @@ -27859,23 +23835,24 @@ } } }, - "/api/v2/public/event/{eventName}/reservation/{reservationId}/payment/token" : { + "/api/v2/public/reservation/{reservationId}/remove-code" : { "delete" : { "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "removeToken_1", + "operationId" : "removeCode", "parameters" : [ { - "name" : "eventName", + "name" : "reservationId", "in" : "path", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "reservationId", - "in" : "path", + "name" : "type", + "in" : "query", "required" : true, "schema" : { - "type" : "string" + "type" : "string", + "enum" : [ "SUBSCRIPTION" ] } } ], "responses" : { @@ -27899,16 +23876,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -27975,16 +23942,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28018,10 +23975,10 @@ } } }, - "/api/v2/public/event/{eventName}/reservation/{reservationId}/payment" : { + "/api/v2/public/reservation/{reservationId}/payment/token" : { "delete" : { "tags" : [ "reservation-api-v-2-controller" ], - "operationId" : "deletePaymentAttempt_1", + "operationId" : "removeToken", "parameters" : [ { "name" : "reservationId", "in" : "path", @@ -28051,16 +24008,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28135,16 +24082,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28212,16 +24149,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28289,16 +24216,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28365,16 +24282,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28448,16 +24355,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28540,16 +24437,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28625,16 +24512,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28718,16 +24595,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28819,16 +24686,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28896,16 +24753,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -28974,16 +24821,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -29059,16 +24896,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -29143,16 +24970,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -29242,16 +25059,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -29326,16 +25133,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -29418,16 +25215,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -29495,16 +25282,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -29572,16 +25349,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -29660,16 +25427,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -29736,16 +25493,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -29821,16 +25568,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -29914,16 +25651,6 @@ } } }, - "405" : { - "description" : "Method Not Allowed", - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - } - }, "401" : { "description" : "Unauthorized", "content" : { @@ -30358,15 +26085,15 @@ "location" : { "type" : "string" }, - "description" : { - "type" : "string" - }, "arguments" : { "type" : "array", "items" : { "type" : "object" } }, + "description" : { + "type" : "string" + }, "code" : { "type" : "string" } @@ -30752,6 +26479,20 @@ "refundedAmount" : { "type" : "string" }, + "notYetPaid" : { + "type" : "boolean" + }, + "vatExempt" : { + "type" : "boolean" + }, + "priceInCents" : { + "type" : "integer", + "format" : "int32" + }, + "ticketAmount" : { + "type" : "integer", + "format" : "int32" + }, "singleTicketOrder" : { "type" : "boolean" }, @@ -30769,20 +26510,6 @@ }, "priceBeforeTaxes" : { "type" : "string" - }, - "ticketAmount" : { - "type" : "integer", - "format" : "int32" - }, - "notYetPaid" : { - "type" : "boolean" - }, - "vatExempt" : { - "type" : "boolean" - }, - "priceInCents" : { - "type" : "integer", - "format" : "int32" } } }, @@ -31508,12 +27235,22 @@ "invoiceNumber" : { "type" : "string" }, + "paymentMethod" : { + "type" : "string", + "enum" : [ "STRIPE", "ON_SITE", "OFFLINE", "NONE", "ADMIN", "PAYPAL", "MOLLIE", "SAFERPAY" ] + }, "firstName" : { "type" : "string" }, "lastName" : { "type" : "string" }, + "userLanguage" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, "vatStatus" : { "type" : "string", "enum" : [ "NONE", "INCLUDED", "NOT_INCLUDED", "INCLUDED_EXEMPT", "NOT_INCLUDED_EXEMPT", "CUSTOM_INCLUDED_EXEMPT", "CUSTOM_NOT_INCLUDED_EXEMPT", "INCLUDED_NOT_CHARGED", "NOT_INCLUDED_NOT_CHARGED" ] @@ -31524,16 +27261,6 @@ "discount" : { "$ref" : "#/components/schemas/PromoCodeDiscount" }, - "userLanguage" : { - "type" : "string" - }, - "paymentMethod" : { - "type" : "string", - "enum" : [ "STRIPE", "ON_SITE", "OFFLINE", "NONE", "ADMIN", "PAYPAL", "MOLLIE", "SAFERPAY" ] - }, - "email" : { - "type" : "string" - }, "srcPriceCts" : { "type" : "integer", "format" : "int32" @@ -32218,6 +27945,84 @@ } } }, + "PaymentForm" : { + "type" : "object", + "properties" : { + "gatewayToken" : { + "type" : "string" + }, + "paymentProxy" : { + "type" : "string", + "enum" : [ "STRIPE", "ON_SITE", "OFFLINE", "NONE", "ADMIN", "PAYPAL", "MOLLIE", "SAFERPAY" ] + }, + "selectedPaymentMethod" : { + "type" : "string", + "enum" : [ "CREDIT_CARD", "PAYPAL", "IDEAL", "BANK_TRANSFER", "ON_SITE", "NONE", "APPLE_PAY", "BANCONTACT", "ING_HOME_PAY", "BELFIUS", "KBC", "PRZELEWY_24", "ALIPAY", "POSTFINANCE", "TWINT" ] + }, + "termAndConditionsAccepted" : { + "type" : "boolean" + }, + "privacyPolicyAccepted" : { + "type" : "boolean" + }, + "hmac" : { + "type" : "string" + }, + "captcha" : { + "type" : "string" + } + } + }, + "ReservationPaymentResult" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean" + }, + "redirect" : { + "type" : "boolean" + }, + "redirectUrl" : { + "type" : "string" + }, + "failure" : { + "type" : "boolean" + }, + "gatewayIdOrNull" : { + "type" : "string" + } + } + }, + "ValidatedResponseReservationPaymentResult" : { + "type" : "object", + "properties" : { + "validationResult" : { + "$ref" : "#/components/schemas/ValidationResult" + }, + "value" : { + "$ref" : "#/components/schemas/ReservationPaymentResult" + }, + "warnings" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/WarningMessage" + } + }, + "success" : { + "type" : "boolean" + }, + "errorCount" : { + "type" : "integer", + "format" : "int32" + }, + "validationErrors" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ErrorDescriptor" + } + } + } + }, "ContactAndTicketsForm" : { "type" : "object", "properties" : { @@ -32389,84 +28194,6 @@ } } }, - "PaymentForm" : { - "type" : "object", - "properties" : { - "gatewayToken" : { - "type" : "string" - }, - "paymentProxy" : { - "type" : "string", - "enum" : [ "STRIPE", "ON_SITE", "OFFLINE", "NONE", "ADMIN", "PAYPAL", "MOLLIE", "SAFERPAY" ] - }, - "selectedPaymentMethod" : { - "type" : "string", - "enum" : [ "CREDIT_CARD", "PAYPAL", "IDEAL", "BANK_TRANSFER", "ON_SITE", "NONE", "APPLE_PAY", "BANCONTACT", "ING_HOME_PAY", "BELFIUS", "KBC", "PRZELEWY_24", "ALIPAY", "POSTFINANCE", "TWINT" ] - }, - "termAndConditionsAccepted" : { - "type" : "boolean" - }, - "privacyPolicyAccepted" : { - "type" : "boolean" - }, - "hmac" : { - "type" : "string" - }, - "captcha" : { - "type" : "string" - } - } - }, - "ReservationPaymentResult" : { - "type" : "object", - "properties" : { - "success" : { - "type" : "boolean" - }, - "redirect" : { - "type" : "boolean" - }, - "redirectUrl" : { - "type" : "string" - }, - "failure" : { - "type" : "boolean" - }, - "gatewayIdOrNull" : { - "type" : "string" - } - } - }, - "ValidatedResponseReservationPaymentResult" : { - "type" : "object", - "properties" : { - "validationResult" : { - "$ref" : "#/components/schemas/ValidationResult" - }, - "value" : { - "$ref" : "#/components/schemas/ReservationPaymentResult" - }, - "warnings" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/WarningMessage" - } - }, - "success" : { - "type" : "boolean" - }, - "errorCount" : { - "type" : "integer", - "format" : "int32" - }, - "validationErrors" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ErrorDescriptor" - } - } - } - }, "WaitingQueueSubscriptionForm" : { "type" : "object", "properties" : { @@ -33507,10 +29234,6 @@ "assigned" : { "type" : "boolean" }, - "categoryId" : { - "type" : "integer", - "format" : "int32" - }, "eventId" : { "type" : "integer", "format" : "int32" @@ -33521,13 +29244,13 @@ "lastName" : { "type" : "string" }, - "vatStatus" : { - "type" : "string", - "enum" : [ "NONE", "INCLUDED", "NOT_INCLUDED", "INCLUDED_EXEMPT", "NOT_INCLUDED_EXEMPT", "CUSTOM_INCLUDED_EXEMPT", "CUSTOM_NOT_INCLUDED_EXEMPT", "INCLUDED_NOT_CHARGED", "NOT_INCLUDED_NOT_CHARGED" ] - }, "userLanguage" : { "type" : "string" }, + "categoryId" : { + "type" : "integer", + "format" : "int32" + }, "subscriptionId" : { "type" : "string", "format" : "uuid" @@ -33538,6 +29261,10 @@ "ticketsReservationId" : { "type" : "string" }, + "vatStatus" : { + "type" : "string", + "enum" : [ "NONE", "INCLUDED", "NOT_INCLUDED", "INCLUDED_EXEMPT", "NOT_INCLUDED_EXEMPT", "CUSTOM_INCLUDED_EXEMPT", "CUSTOM_NOT_INCLUDED_EXEMPT", "INCLUDED_NOT_CHARGED", "NOT_INCLUDED_NOT_CHARGED" ] + }, "srcPriceCts" : { "type" : "integer", "format" : "int32" @@ -34812,10 +30539,6 @@ "assigned" : { "type" : "boolean" }, - "categoryId" : { - "type" : "integer", - "format" : "int32" - }, "eventId" : { "type" : "integer", "format" : "int32" @@ -34826,13 +30549,13 @@ "lastName" : { "type" : "string" }, - "vatStatus" : { - "type" : "string", - "enum" : [ "NONE", "INCLUDED", "NOT_INCLUDED", "INCLUDED_EXEMPT", "NOT_INCLUDED_EXEMPT", "CUSTOM_INCLUDED_EXEMPT", "CUSTOM_NOT_INCLUDED_EXEMPT", "INCLUDED_NOT_CHARGED", "NOT_INCLUDED_NOT_CHARGED" ] - }, "userLanguage" : { "type" : "string" }, + "categoryId" : { + "type" : "integer", + "format" : "int32" + }, "subscriptionId" : { "type" : "string", "format" : "uuid" @@ -34843,6 +30566,10 @@ "ticketsReservationId" : { "type" : "string" }, + "vatStatus" : { + "type" : "string", + "enum" : [ "NONE", "INCLUDED", "NOT_INCLUDED", "INCLUDED_EXEMPT", "NOT_INCLUDED_EXEMPT", "CUSTOM_INCLUDED_EXEMPT", "CUSTOM_NOT_INCLUDED_EXEMPT", "INCLUDED_NOT_CHARGED", "NOT_INCLUDED_NOT_CHARGED" ] + }, "srcPriceCts" : { "type" : "integer", "format" : "int32" @@ -35669,12 +31396,6 @@ "formattedPrice" : { "type" : "string" }, - "contentLanguages" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContentLanguage" - } - }, "publicIdentifier" : { "type" : "string" }, @@ -35685,6 +31406,12 @@ "enum" : [ "STRIPE", "ON_SITE", "OFFLINE", "NONE", "ADMIN", "PAYPAL", "MOLLIE", "SAFERPAY" ] } }, + "contentLanguages" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ContentLanguage" + } + }, "begin" : { "type" : "string", "format" : "date-time" @@ -35773,9 +31500,6 @@ "currency" : { "type" : "string" }, - "vat" : { - "type" : "string" - }, "formattedPrice" : { "type" : "string" }, @@ -35791,6 +31515,9 @@ "type" : "string" } }, + "vat" : { + "type" : "string" + }, "maxEntries" : { "type" : "integer", "format" : "int32" @@ -35846,41 +31573,6 @@ } } }, - "PaymentResult" : { - "type" : "object", - "properties" : { - "redirectUrl" : { - "type" : "string" - }, - "initialized" : { - "type" : "boolean" - }, - "successful" : { - "type" : "boolean" - }, - "failed" : { - "type" : "boolean" - }, - "redirect" : { - "type" : "boolean" - }, - "gatewayIdOrNull" : { - "type" : "string" - } - } - }, - "ReservationStatusInfo" : { - "type" : "object", - "properties" : { - "status" : { - "type" : "string", - "enum" : [ "PENDING", "IN_PAYMENT", "EXTERNAL_PROCESSING_PAYMENT", "WAITING_EXTERNAL_CONFIRMATION", "OFFLINE_PAYMENT", "DEFERRED_OFFLINE_PAYMENT", "FINALIZING", "OFFLINE_FINALIZING", "COMPLETE", "STUCK", "CANCELLED", "CREDIT_NOTE_ISSUED" ] - }, - "validatedBookingInformation" : { - "type" : "boolean" - } - } - }, "AdditionalField" : { "type" : "object", "properties" : { @@ -36307,6 +31999,41 @@ } } }, + "PaymentResult" : { + "type" : "object", + "properties" : { + "redirectUrl" : { + "type" : "string" + }, + "initialized" : { + "type" : "boolean" + }, + "successful" : { + "type" : "boolean" + }, + "failed" : { + "type" : "boolean" + }, + "redirect" : { + "type" : "boolean" + }, + "gatewayIdOrNull" : { + "type" : "string" + } + } + }, + "ReservationStatusInfo" : { + "type" : "object", + "properties" : { + "status" : { + "type" : "string", + "enum" : [ "PENDING", "IN_PAYMENT", "EXTERNAL_PROCESSING_PAYMENT", "WAITING_EXTERNAL_CONFIRMATION", "OFFLINE_PAYMENT", "DEFERRED_OFFLINE_PAYMENT", "FINALIZING", "OFFLINE_FINALIZING", "COMPLETE", "STUCK", "CANCELLED", "CREDIT_NOTE_ISSUED" ] + }, + "validatedBookingInformation" : { + "type" : "boolean" + } + } + }, "LocalizedCountry" : { "type" : "object", "properties" : { @@ -36476,12 +32203,6 @@ "type" : "string", "enum" : [ "subscription", "event" ] }, - "contentLanguages" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContentLanguage" - } - }, "title" : { "type" : "object", "additionalProperties" : { @@ -36494,6 +32215,12 @@ "free" : { "type" : "boolean" }, + "contentLanguages" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ContentLanguage" + } + }, "regularPrice" : { "type" : "number" }, @@ -36506,6 +32233,12 @@ "online" : { "type" : "boolean" }, + "privacyPolicyLinkOrNull" : { + "type" : "string" + }, + "fileBlobIdIsPresent" : { + "type" : "boolean" + }, "imageIsPresent" : { "type" : "boolean" }, @@ -36530,12 +32263,6 @@ "isOnline" : { "type" : "boolean" }, - "privacyPolicyLinkOrNull" : { - "type" : "string" - }, - "fileBlobIdIsPresent" : { - "type" : "boolean" - }, "firstContentLanguage" : { "$ref" : "#/components/schemas/ContentLanguage" } @@ -36648,9 +32375,6 @@ "currency" : { "type" : "string" }, - "vat" : { - "type" : "string" - }, "shortName" : { "type" : "string" }, @@ -36660,6 +32384,9 @@ "type" : "string" } }, + "vat" : { + "type" : "string" + }, "vatIncluded" : { "type" : "boolean" }, @@ -37159,12 +32886,12 @@ "descriptor" : { "$ref" : "#/components/schemas/SubscriptionDescriptor" }, + "unitPrice" : { + "type" : "number" + }, "availableCount" : { "type" : "integer", "format" : "int32" - }, - "unitPrice" : { - "type" : "number" } } }, @@ -37265,15 +32992,15 @@ "currencyCode" : { "type" : "string" }, - "stuck" : { - "type" : "boolean" - }, "formattedNetPrice" : { "type" : "string" }, "extReference" : { "type" : "string" }, + "stuck" : { + "type" : "boolean" + }, "status" : { "type" : "string", "enum" : [ "FREE", "PENDING", "TO_BE_PAID", "ACQUIRED", "CANCELLED", "CHECKED_IN", "EXPIRED", "INVALIDATED", "RELEASED", "PRE_RESERVED" ] @@ -37290,10 +33017,6 @@ "transaction" : { "$ref" : "#/components/schemas/Transaction" }, - "categoryId" : { - "type" : "integer", - "format" : "int32" - }, "eventId" : { "type" : "integer", "format" : "int32" @@ -37304,13 +33027,13 @@ "lastName" : { "type" : "string" }, - "vatStatus" : { - "type" : "string", - "enum" : [ "NONE", "INCLUDED", "NOT_INCLUDED", "INCLUDED_EXEMPT", "NOT_INCLUDED_EXEMPT", "CUSTOM_INCLUDED_EXEMPT", "CUSTOM_NOT_INCLUDED_EXEMPT", "INCLUDED_NOT_CHARGED", "NOT_INCLUDED_NOT_CHARGED" ] - }, "userLanguage" : { "type" : "string" }, + "categoryId" : { + "type" : "integer", + "format" : "int32" + }, "subscriptionId" : { "type" : "string", "format" : "uuid" @@ -37321,6 +33044,10 @@ "ticketsReservationId" : { "type" : "string" }, + "vatStatus" : { + "type" : "string", + "enum" : [ "NONE", "INCLUDED", "NOT_INCLUDED", "INCLUDED_EXEMPT", "NOT_INCLUDED_EXEMPT", "CUSTOM_INCLUDED_EXEMPT", "CUSTOM_NOT_INCLUDED_EXEMPT", "INCLUDED_NOT_CHARGED", "NOT_INCLUDED_NOT_CHARGED" ] + }, "srcPriceCts" : { "type" : "integer", "format" : "int32" @@ -37530,12 +33257,6 @@ "type" : "string", "enum" : [ "FREE", "PENDING", "TO_BE_PAID", "ACQUIRED", "CANCELLED", "CHECKED_IN", "EXPIRED", "INVALIDATED", "RELEASED", "PRE_RESERVED" ] }, - "additionalFields" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, "tags" : { "type" : "array", "items" : { @@ -37545,10 +33266,6 @@ "assigned" : { "type" : "boolean" }, - "categoryId" : { - "type" : "integer", - "format" : "int32" - }, "eventId" : { "type" : "integer", "format" : "int32" @@ -37559,13 +33276,13 @@ "lastName" : { "type" : "string" }, - "vatStatus" : { - "type" : "string", - "enum" : [ "NONE", "INCLUDED", "NOT_INCLUDED", "INCLUDED_EXEMPT", "NOT_INCLUDED_EXEMPT", "CUSTOM_INCLUDED_EXEMPT", "CUSTOM_NOT_INCLUDED_EXEMPT", "INCLUDED_NOT_CHARGED", "NOT_INCLUDED_NOT_CHARGED" ] - }, "userLanguage" : { "type" : "string" }, + "categoryId" : { + "type" : "integer", + "format" : "int32" + }, "subscriptionId" : { "type" : "string", "format" : "uuid" @@ -37576,6 +33293,10 @@ "ticketsReservationId" : { "type" : "string" }, + "vatStatus" : { + "type" : "string", + "enum" : [ "NONE", "INCLUDED", "NOT_INCLUDED", "INCLUDED_EXEMPT", "NOT_INCLUDED_EXEMPT", "CUSTOM_INCLUDED_EXEMPT", "CUSTOM_NOT_INCLUDED_EXEMPT", "INCLUDED_NOT_CHARGED", "NOT_INCLUDED_NOT_CHARGED" ] + }, "srcPriceCts" : { "type" : "integer", "format" : "int32" @@ -37592,6 +33313,12 @@ "type" : "integer", "format" : "int32" }, + "additionalFields" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, "uuid" : { "type" : "string" }, @@ -37882,11 +33609,11 @@ "type" : "string", "enum" : [ "WAITING", "RETRY", "IN_PROCESS", "SENT", "ERROR" ] }, - "organizationId" : { + "eventId" : { "type" : "integer", "format" : "int32" }, - "eventId" : { + "organizationId" : { "type" : "integer", "format" : "int32" }, @@ -37984,10 +33711,6 @@ "inputType" : { "type" : "string" }, - "order" : { - "type" : "integer", - "format" : "int32" - }, "inputField" : { "type" : "boolean" }, @@ -38012,6 +33735,10 @@ "textField" : { "type" : "boolean" }, + "order" : { + "type" : "integer", + "format" : "int32" + }, "minLength" : { "type" : "integer", "format" : "int32" @@ -38023,6 +33750,10 @@ "required" : { "type" : "boolean" }, + "eventId" : { + "type" : "integer", + "format" : "int32" + }, "additionalServiceId" : { "type" : "integer", "format" : "int32" @@ -38037,23 +33768,19 @@ "dateOfBirth" : { "type" : "boolean" }, - "eventId" : { - "type" : "integer", - "format" : "int32" - }, "subscriptionDescriptorId" : { "type" : "string", "format" : "uuid" }, + "countryField" : { + "type" : "boolean" + }, "restrictedValues" : { "type" : "array", "items" : { "type" : "string" } }, - "countryField" : { - "type" : "boolean" - }, "editable" : { "type" : "boolean" }, @@ -38276,14 +34003,14 @@ "$ref" : "#/components/schemas/PollOptionStatistics" } }, - "participationPercentage" : { - "type" : "string" - }, "optionStatistics" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/StatisticDetail" } + }, + "participationPercentage" : { + "type" : "string" } } }, @@ -38876,7 +34603,8 @@ "type" : "array", "deprecated" : true, "items" : { - "type" : "string" + "type" : "string", + "deprecated" : true } } } @@ -38932,20 +34660,11 @@ "description" : { "type" : "string" }, - "formattedStart" : { - "type" : "string" - }, - "formattedEnd" : { - "type" : "string" - }, - "formattedDiscountAmount" : { - "type" : "string" - }, - "organizationId" : { + "eventId" : { "type" : "integer", "format" : "int32" }, - "eventId" : { + "organizationId" : { "type" : "integer", "format" : "int32" }, @@ -38999,6 +34718,15 @@ }, "fixedAmount" : { "type" : "boolean" + }, + "formattedStart" : { + "type" : "string" + }, + "formattedEnd" : { + "type" : "string" + }, + "formattedDiscountAmount" : { + "type" : "string" } } }, @@ -39281,13 +35009,6 @@ "displayName" : { "type" : "string" }, - "status" : { - "type" : "string", - "enum" : [ "DRAFT", "PUBLIC", "DISABLED" ] - }, - "shortName" : { - "type" : "string" - }, "notSoldTickets" : { "type" : "integer", "format" : "int32" @@ -39308,7 +35029,11 @@ "type" : "integer", "format" : "int32" }, - "formattedEnd" : { + "status" : { + "type" : "string", + "enum" : [ "DRAFT", "PUBLIC", "DISABLED" ] + }, + "shortName" : { "type" : "string" }, "organizationId" : { @@ -39340,15 +35065,18 @@ "expired" : { "type" : "boolean" }, + "formattedEnd" : { + "type" : "string" + }, "warningNeeded" : { "type" : "boolean" }, - "formattedBegin" : { - "type" : "string" - }, "visibleForCurrentUser" : { "type" : "boolean" }, + "formattedBegin" : { + "type" : "string" + }, "displayStatistics" : { "type" : "boolean" }