Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ plugins {
val generateFilcApiClient by tasks.registering(GenerateTask::class) {
generatorName.set("kotlin")
library.set("multiplatform")
inputSpec.set(rootProject.file("openapi/filc-openapi.json").absolutePath)
inputSpec.set(rootProject.file("openapi/chronos-openapi.json").absolutePath)
outputDir.set(projectDir.absolutePath)
packageName.set("hu.petrik.filcapp.api")
apiPackage.set("hu.petrik.filcapp.api.client")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response
import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetAdminApiKeys200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyIdRequest

import hu.petrik.filcapp.api.infrastructure.*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/**
*
* Please note:
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit this file manually.
*
*/

@file:Suppress(
"ArrayInDataClass",
"DuplicatedCode",
"EnumEntryName",
"RemoveRedundantQualifierName",
"RemoveRedundantCallsOfConversionMethods",
"REDUNDANT_CALL_OF_CONVERSION_METHOD",
"RedundantUnitReturnType",
"RemoveEmptyClassBody",
"UnnecessaryVariable",
"UnusedImport",
"UnnecessaryVariable",
"unused"
)

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.GetActivityLog200Response
import hu.petrik.filcapp.api.model.GetActivityLog400Response

import hu.petrik.filcapp.api.infrastructure.*
import io.ktor.client.HttpClient
import io.ktor.client.HttpClientConfig
import io.ktor.client.request.forms.formData
import io.ktor.client.engine.HttpClientEngine
import kotlinx.serialization.json.Json
import io.ktor.http.ParametersBuilder
import io.ktor.http.Headers
import io.ktor.http.HttpHeaders
import io.ktor.http.ContentType
import io.ktor.http.content.PartData
import kotlinx.serialization.*
import kotlinx.serialization.descriptors.*
import kotlinx.serialization.encoding.*

open class ActivityLogApi : ApiClient {

constructor(
baseUrl: String = ApiClient.BASE_URL,
httpClientEngine: HttpClientEngine? = null,
httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null,
jsonSerializer: Json = ApiClient.JSON_DEFAULT
) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer)

constructor(
baseUrl: String,
httpClient: HttpClient
): super(baseUrl = baseUrl, httpClient = httpClient)

/**
*
* List generic admin activity log entries
* @param action (optional)
* @param actorId (optional)
* @param entityType (optional)
* @param from (optional)
* @param limit (optional, default to 50)
* @param offset (optional, default to 0)
* @param search (optional)
* @param to (optional)
* @return GetActivityLog200Response
*/
@Suppress("UNCHECKED_CAST")
open suspend fun getActivityLog(action: kotlin.String? = null, actorId: kotlin.String? = null, entityType: kotlin.String? = null, from: kotlin.String? = null, limit: kotlin.Int? = 50, offset: kotlin.Int? = 0, search: kotlin.String? = null, to: kotlin.String? = null): HttpResponse<GetActivityLog200Response> {

val localVariableAuthNames = listOf<String>("sessionAuth")

val localVariableBody =
io.ktor.client.utils.EmptyContent

val localVariableQuery = mutableMapOf<String, List<String>>()
action?.apply { localVariableQuery["action"] = listOf("$action") }
actorId?.apply { localVariableQuery["actorId"] = listOf("$actorId") }
entityType?.apply { localVariableQuery["entityType"] = listOf("$entityType") }
from?.apply { localVariableQuery["from"] = listOf("$from") }
limit?.apply { localVariableQuery["limit"] = listOf("$limit") }
offset?.apply { localVariableQuery["offset"] = listOf("$offset") }
search?.apply { localVariableQuery["search"] = listOf("$search") }
to?.apply { localVariableQuery["to"] = listOf("$to") }
val localVariableHeaders = mutableMapOf<String, String>()

val localVariableConfig = RequestConfig<kotlin.Any?>(
RequestMethod.GET,
"/activity-log",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
)

return request(
localVariableConfig,
localVariableBody,
localVariableAuthNames
).wrap()
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ package hu.petrik.filcapp.api.client
import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response
import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetBugReport200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200Response
import hu.petrik.filcapp.api.model.PatchBugReportByIdStatusRequest
import hu.petrik.filcapp.api.model.PostBugReport201Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetNavigatorClassrooms200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response

import hu.petrik.filcapp.api.infrastructure.*
import io.ktor.client.HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetCohort200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response

import hu.petrik.filcapp.api.infrastructure.*
import io.ktor.client.HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetDashboardStats200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response

import hu.petrik.filcapp.api.infrastructure.*
import io.ktor.client.HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import hu.petrik.filcapp.api.model.GetDoorlockDevices200Response
import hu.petrik.filcapp.api.model.GetDoorlockDevicesByIdStats200Response
import hu.petrik.filcapp.api.model.GetDoorlockLogs200Response
import hu.petrik.filcapp.api.model.GetDoorlockStatsOverview200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PostDoorlockCards201Response
import hu.petrik.filcapp.api.model.PostDoorlockCardsRequest
import hu.petrik.filcapp.api.model.PostDoorlockDevices201Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetTimetableGroupsGetForCohortByCohortId200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PostTimetableGroupsSelect200Response
import hu.petrik.filcapp.api.model.PostTimetableGroupsSelectRequest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetHealth200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response

import hu.petrik.filcapp.api.infrastructure.*
import io.ktor.client.HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PostDoorlockDevicesByIdUpdate200Response
import hu.petrik.filcapp.api.model.PostTimetableImportRequest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import hu.petrik.filcapp.api.model.GetKiosk200Response
import hu.petrik.filcapp.api.model.GetKioskNews200Response
import hu.petrik.filcapp.api.model.GetKioskPetrikNews200Response
import hu.petrik.filcapp.api.model.GetKioskWeather200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PostKiosk201Response
import hu.petrik.filcapp.api.model.PostKioskDepartures200Response
import hu.petrik.filcapp.api.model.PostKioskDeparturesRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200Response
import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForIdByLessonId200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PostTimetableLessonsGetForTeachers200Response
import hu.petrik.filcapp.api.model.PostTimetableLessonsGetForTeachersRequest
import hu.petrik.filcapp.api.model.PostTimetableLessonsGetSubstitutionCandidates200Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ package hu.petrik.filcapp.api.client
import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response
import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetTimetableMovedLessons200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PostTimetableMovedLessons200Response
import hu.petrik.filcapp.api.model.PostTimetableMovedLessonsRequest
import hu.petrik.filcapp.api.model.PutTimetableMovedLessonsByIdRequest
Expand Down Expand Up @@ -261,7 +260,7 @@ open class MovedLessonApi : ApiClient {

/**
*
* Create a moved lesson.
* Create a moved lesson: linked to existing lessons, or manual (a subject plus cohorts, with no source lessons).
* @param postTimetableMovedLessonsRequest
* @return PostTimetableMovedLessons200Response
*/
Expand Down Expand Up @@ -294,7 +293,7 @@ open class MovedLessonApi : ApiClient {

/**
*
* Update a moved lesson.
* Update a moved lesson. Every field is optional and an omitted one keeps its stored value. A moved lesson still has exactly one source, so switching sources must clear the other one explicitly: send &#x60;lessonIds: []&#x60; together with the manual fields to switch to manual, or &#x60;manualCohortIds: []&#x60; together with &#x60;lessonIds&#x60; to switch to linked.
* @param id
* @param putTimetableMovedLessonsByIdRequest (optional)
* @return PostTimetableMovedLessons200Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.DeleteNavigatorBuildingsById200Response
import hu.petrik.filcapp.api.model.GetNavigatorBuildings200Response
import hu.petrik.filcapp.api.model.GetNavigatorClassroomTypes200Response
Expand All @@ -35,7 +36,6 @@ import hu.petrik.filcapp.api.model.GetNavigatorStairs200Response
import hu.petrik.filcapp.api.model.GetNavigatorStairs200ResponseItemsInner
import hu.petrik.filcapp.api.model.GetNavigatorTranslations200Response
import hu.petrik.filcapp.api.model.GetNavigatorTranslationsAvailable200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PostNavigatorBuildings201Response
import hu.petrik.filcapp.api.model.PostNavigatorBuildingsRequest
import hu.petrik.filcapp.api.model.PostNavigatorClassroomTypes201Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response
import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetNewsAnnouncements200Response
import hu.petrik.filcapp.api.model.GetNewsAnnouncementsById200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PatchNewsAnnouncementsById200Response
import hu.petrik.filcapp.api.model.PatchNewsAnnouncementsByIdRequest
import hu.petrik.filcapp.api.model.PostNavigatorImportRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response
import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetNewsBlogs200Response
import hu.petrik.filcapp.api.model.GetNewsBlogsBySlug200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PatchNewsBlogsById200Response
import hu.petrik.filcapp.api.model.PatchNewsBlogsByIdRequest
import hu.petrik.filcapp.api.model.PostNewsBlogs201Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response
import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetNewsSystemMessages200Response
import hu.petrik.filcapp.api.model.GetNewsSystemMessagesById200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PatchNewsSystemMessagesById200Response
import hu.petrik.filcapp.api.model.PatchNewsSystemMessagesByIdRequest
import hu.petrik.filcapp.api.model.PostNewsSystemMessages201Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetNotifications200Response
import hu.petrik.filcapp.api.model.GetNotificationsSettings200Response
import hu.petrik.filcapp.api.model.GetNotificationsUnreadCount200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PatchNotificationsSettingsRequest
import hu.petrik.filcapp.api.model.PostDoorlockDevicesByIdUpdate200Response
import hu.petrik.filcapp.api.model.PostNotificationsByIdRead200Response
Expand Down Expand Up @@ -355,7 +355,7 @@ open class NotificationsApi : ApiClient {

/**
*
* Development helper: drop a test notification into the caller&#39;s own inbox (needs CHRONOS_ENABLE_TEST_NOTIFICATIONS)
* Development helper: drop a test notification into the caller&#39;s own inbox (needs CHRONOS_ENABLE_TEST_NOTIFICATIONS).
* @return PostNotificationsByIdRead200Response
*/
@Suppress("UNCHECKED_CAST")
Expand Down Expand Up @@ -387,7 +387,7 @@ open class NotificationsApi : ApiClient {

/**
*
* Development helper: render a notification template without sending it (needs CHRONOS_ENABLE_TEST_NOTIFICATIONS)
* Development helper: render a notification template without sending it (needs CHRONOS_ENABLE_TEST_NOTIFICATIONS). When entityId is given, a real record is rendered through the same builders as the live pipeline instead of the supplied text: substitution, substitution_teacher, moved_lesson, moved_lesson_teacher, announcement, system_message and blog_post; every other type answers 400.
* @param postNotificationsTestPreviewRequest
* @return PostNotificationsTestPreview200Response
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetTimetablePeriodsGetAll200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response

import hu.petrik.filcapp.api.infrastructure.*
import io.ktor.client.HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetPing200Response
import hu.petrik.filcapp.api.model.GetPingTime200Response
import hu.petrik.filcapp.api.model.GetPingUptime200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response

import hu.petrik.filcapp.api.infrastructure.*
import io.ktor.client.HttpClient
Expand Down Expand Up @@ -88,6 +89,38 @@ open class PingApi : ApiClient {
}


/**
*
* Returns the current server time in the school&#39;s configured timezone (Europe/Budapest by default), so a client can render the authoritative local date and UTC offset without trusting its own clock.
* @return GetPingTime200Response
*/
@Suppress("UNCHECKED_CAST")
open suspend fun getPingTime(): HttpResponse<GetPingTime200Response> {

val localVariableAuthNames = listOf<String>()

val localVariableBody =
io.ktor.client.utils.EmptyContent

val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()

val localVariableConfig = RequestConfig<kotlin.Any?>(
RequestMethod.GET,
"/ping/time",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
)

return request(
localVariableConfig,
localVariableBody,
localVariableAuthNames
).wrap()
}


/**
*
* Get the uptime.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetNavigatorTranslationsAvailable200Response
import hu.petrik.filcapp.api.model.GetRoles200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.PatchRolesByNameRequest
import hu.petrik.filcapp.api.model.PostDoorlockDevicesByIdUpdate200Response
import hu.petrik.filcapp.api.model.PostRoles201Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

package hu.petrik.filcapp.api.client

import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response
import hu.petrik.filcapp.api.model.GetTimetableSubjects200Response
import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response

import hu.petrik.filcapp.api.infrastructure.*
import io.ktor.client.HttpClient
Expand Down
Loading
Loading