dev.crashteam.openapi.keanalytics.api.ReportApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openapi-ke-analytics Show documentation
Show all versions of openapi-ke-analytics Show documentation
Generates jar artifact containing compiled openapi classes based on generated openapi yaml files
The newest version!
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.6.0).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package dev.crashteam.openapi.keanalytics.api;
import dev.crashteam.openapi.keanalytics.model.Error;
import dev.crashteam.openapi.keanalytics.model.GetReportBySeller200Response;
import dev.crashteam.openapi.keanalytics.model.GetReportStateByJobId200Response;
import dev.crashteam.openapi.keanalytics.model.ProductSkuHistory400Response;
import java.util.UUID;
import io.swagger.v3.oas.annotations.ExternalDocumentation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import org.springframework.http.codec.multipart.Part;
import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Generated;
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-03-26T08:59:12.399131532Z[Etc/UTC]")
@Validated
@Tag(name = "report", description = "the report API")
public interface ReportApi {
/**
* GET /report/category/{categoryId} : Сгенерировать отчет по категории
*
* @param categoryId (required)
* @param period (required)
* @param idempotenceKey (required)
* @return Идентификатор созданной job (status code 200)
* or Переданы ошибочные данные (status code 400)
* or Несанкционированный доступ, использовались неверные учетные данные. (status code 401)
* or Access forbidden. (status code 403)
*/
@Operation(
operationId = "getReportByCategory",
summary = "Сгенерировать отчет по категории",
tags = { "report" },
responses = {
@ApiResponse(responseCode = "200", description = "Идентификатор созданной job", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = GetReportBySeller200Response.class))
}),
@ApiResponse(responseCode = "400", description = "Переданы ошибочные данные", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = ProductSkuHistory400Response.class))
}),
@ApiResponse(responseCode = "401", description = "Несанкционированный доступ, использовались неверные учетные данные.", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
}),
@ApiResponse(responseCode = "403", description = "Access forbidden.", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
})
},
security = {
@SecurityRequirement(name = "apiKey")
}
)
@RequestMapping(
method = RequestMethod.GET,
value = "/report/category/{categoryId}",
produces = { "application/json" }
)
default Mono> getReportByCategory(
@Parameter(name = "categoryId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("categoryId") Long categoryId,
@NotNull @Parameter(name = "period", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "period", required = true) Integer period,
@NotNull @Parameter(name = "Idempotence-Key", description = "", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "Idempotence-Key", required = true) String idempotenceKey,
@Parameter(hidden = true) final ServerWebExchange exchange
) {
Mono result = Mono.empty();
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
String exampleString = "{ \"jobId\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"reportId\" : \"61dc6a6a453cd26524fd42b4\" }";
result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString);
break;
}
}
return result.then(Mono.empty());
}
/**
* GET /report/{reportId} : Скачать файл по идентификатору отчета
*
* @param reportId (required)
* @return Файл отчета (status code 200)
* or Переданы ошибочные данные (status code 400)
* or Несанкционированный доступ, использовались неверные учетные данные. (status code 401)
* or Access forbidden. (status code 403)
*/
@Operation(
operationId = "getReportByReportId",
summary = "Скачать файл по идентификатору отчета",
tags = { "report" },
responses = {
@ApiResponse(responseCode = "200", description = "Файл отчета", content = {
@Content(mediaType = "application/xlsx", schema = @Schema(implementation = org.springframework.core.io.Resource.class)),
@Content(mediaType = "application/json", schema = @Schema(implementation = org.springframework.core.io.Resource.class))
}),
@ApiResponse(responseCode = "400", description = "Переданы ошибочные данные", content = {
@Content(mediaType = "application/xlsx", schema = @Schema(implementation = ProductSkuHistory400Response.class)),
@Content(mediaType = "application/json", schema = @Schema(implementation = ProductSkuHistory400Response.class))
}),
@ApiResponse(responseCode = "401", description = "Несанкционированный доступ, использовались неверные учетные данные.", content = {
@Content(mediaType = "application/xlsx", schema = @Schema(implementation = Error.class)),
@Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
}),
@ApiResponse(responseCode = "403", description = "Access forbidden.", content = {
@Content(mediaType = "application/xlsx", schema = @Schema(implementation = Error.class)),
@Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
})
},
security = {
@SecurityRequirement(name = "apiKey")
}
)
@RequestMapping(
method = RequestMethod.GET,
value = "/report/{reportId}",
produces = { "application/xlsx", "application/json" }
)
default Mono> getReportByReportId(
@Parameter(name = "reportId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("reportId") String reportId,
@Parameter(hidden = true) final ServerWebExchange exchange
) {
Mono result = Mono.empty();
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
return result.then(Mono.empty());
}
/**
* GET /report/seller/{sellerLink} : Сгенерировать отчет по магазину
*
* @param sellerLink (required)
* @param period (required)
* @param idempotenceKey (required)
* @return Идентификатор созданной job (status code 200)
* or Переданы ошибочные данные (status code 400)
* or Несанкционированный доступ, использовались неверные учетные данные. (status code 401)
* or Access forbidden. (status code 403)
*/
@Operation(
operationId = "getReportBySeller",
summary = "Сгенерировать отчет по магазину",
tags = { "report" },
responses = {
@ApiResponse(responseCode = "200", description = "Идентификатор созданной job", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = GetReportBySeller200Response.class))
}),
@ApiResponse(responseCode = "400", description = "Переданы ошибочные данные", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = ProductSkuHistory400Response.class))
}),
@ApiResponse(responseCode = "401", description = "Несанкционированный доступ, использовались неверные учетные данные.", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
}),
@ApiResponse(responseCode = "403", description = "Access forbidden.", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
})
},
security = {
@SecurityRequirement(name = "apiKey")
}
)
@RequestMapping(
method = RequestMethod.GET,
value = "/report/seller/{sellerLink}",
produces = { "application/json" }
)
default Mono> getReportBySeller(
@Parameter(name = "sellerLink", description = "", required = true, in = ParameterIn.PATH) @PathVariable("sellerLink") String sellerLink,
@NotNull @Parameter(name = "period", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "period", required = true) Integer period,
@NotNull @Parameter(name = "Idempotence-Key", description = "", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "Idempotence-Key", required = true) String idempotenceKey,
@Parameter(hidden = true) final ServerWebExchange exchange
) {
Mono result = Mono.empty();
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
String exampleString = "{ \"jobId\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"reportId\" : \"61dc6a6a453cd26524fd42b4\" }";
result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString);
break;
}
}
return result.then(Mono.empty());
}
/**
* GET /report/state/{jobId} : Статус генерации отчета
*
* @param jobId (required)
* @return Статус отчета (status code 200)
* or Переданы ошибочные данные (status code 400)
* or Несанкционированный доступ, использовались неверные учетные данные. (status code 401)
* or Access forbidden. (status code 403)
*/
@Operation(
operationId = "getReportStateByJobId",
summary = "Статус генерации отчета",
tags = { "report" },
responses = {
@ApiResponse(responseCode = "200", description = "Статус отчета", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = GetReportStateByJobId200Response.class))
}),
@ApiResponse(responseCode = "400", description = "Переданы ошибочные данные", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = ProductSkuHistory400Response.class))
}),
@ApiResponse(responseCode = "401", description = "Несанкционированный доступ, использовались неверные учетные данные.", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
}),
@ApiResponse(responseCode = "403", description = "Access forbidden.", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
})
},
security = {
@SecurityRequirement(name = "apiKey")
}
)
@RequestMapping(
method = RequestMethod.GET,
value = "/report/state/{jobId}",
produces = { "application/json" }
)
default Mono> getReportStateByJobId(
@Parameter(name = "jobId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("jobId") UUID jobId,
@Parameter(hidden = true) final ServerWebExchange exchange
) {
Mono result = Mono.empty();
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
String exampleString = "{ \"reportType\" : \"SELLER\", \"jobId\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"createdAt\" : \"2000-01-23T04:56:07.000+00:00\", \"reportId\" : \"61dc6a6a453cd26524fd42b4\", \"sellerLink\" : \"mimaximum\", \"interval\" : 30, \"categoryId\" : 0, \"status\" : \"COMPLETED\" }";
result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString);
break;
}
}
return result.then(Mono.empty());
}
}