Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Update API Client
Browse files Browse the repository at this point in the history
#### What's Changed
---

##### `GET` /providers/scim/{id}/sync_status/

###### Return Type:

Changed response : **200 OK**

* Changed content type : `application/json`

    New required properties:
    - `is_running`
    - `tasks`

    New optional properties:
    - `messages`
    - `status`
    - `task_description`
    - `task_duration`
    - `task_finish_timestamp`
    - `task_name`

    * Added property `is_running` (boolean)

    * Added property `tasks` (array)

        Items (object):
            > Serialize TaskInfo and TaskResult

        * Property `task_name` (string)

        * Property `task_description` (string)

        * Property `task_finish_timestamp` (string)

        * Property `task_duration` (integer)
            > Get the duration a task took to run

        * Property `status` (string)
            > * `SUCCESSFUL` - SUCCESSFUL
            > * `WARNING` - WARNING
            > * `ERROR` - ERROR
            > * `UNKNOWN` - UNKNOWN

            Enum values:

            * `SUCCESSFUL`
            * `WARNING`
            * `ERROR`
            * `UNKNOWN`
        * Property `messages` (array)

            Items (object):

    * Deleted property `task_name` (string)

    * Deleted property `task_description` (string)

    * Deleted property `task_finish_timestamp` (string)

    * Deleted property `task_duration` (integer)
        > Get the duration a task took to run

    * Deleted property `status` (string)
        > * `SUCCESSFUL` - SUCCESSFUL
        > * `WARNING` - WARNING
        > * `ERROR` - ERROR
        > * `UNKNOWN` - UNKNOWN

    * Deleted property `messages` (array)
  • Loading branch information
authentik-automation[bot] committed Dec 21, 2023
1 parent 2ef8d85 commit e4a0f34
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ docs/SCIMMapping.md
docs/SCIMMappingRequest.md
docs/SCIMProvider.md
docs/SCIMProviderRequest.md
docs/SCIMSyncStatus.md
docs/SMSDevice.md
docs/SMSDeviceRequest.md
docs/SchemaApi.md
Expand Down Expand Up @@ -987,6 +988,7 @@ src/main/kotlin/io/goauthentik/api/models/SCIMMapping.kt
src/main/kotlin/io/goauthentik/api/models/SCIMMappingRequest.kt
src/main/kotlin/io/goauthentik/api/models/SCIMProvider.kt
src/main/kotlin/io/goauthentik/api/models/SCIMProviderRequest.kt
src/main/kotlin/io/goauthentik/api/models/SCIMSyncStatus.kt
src/main/kotlin/io/goauthentik/api/models/SMSDevice.kt
src/main/kotlin/io/goauthentik/api/models/SMSDeviceRequest.kt
src/main/kotlin/io/goauthentik/api/models/ScopeMapping.kt
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,7 @@ Class | Method | HTTP request | Description
- [SCIMMappingRequest](docs/SCIMMappingRequest.md)
- [SCIMProvider](docs/SCIMProvider.md)
- [SCIMProviderRequest](docs/SCIMProviderRequest.md)
- [SCIMSyncStatus](docs/SCIMSyncStatus.md)
- [SMSDevice](docs/SMSDevice.md)
- [SMSDeviceRequest](docs/SMSDeviceRequest.md)
- [ScopeMapping](docs/ScopeMapping.md)
Expand Down
6 changes: 3 additions & 3 deletions docs/ProvidersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2761,7 +2761,7 @@ Configure authentik:

<a id="providersScimSyncStatusRetrieve"></a>
# **providersScimSyncStatusRetrieve**
> Task providersScimSyncStatusRetrieve(id)
> SCIMSyncStatus providersScimSyncStatusRetrieve(id)


Expand All @@ -2776,7 +2776,7 @@ Get provider&#39;s sync status
val apiInstance = ProvidersApi()
val id : kotlin.Int = 56 // kotlin.Int | A unique integer value identifying this SCIM Provider.
try {
val result : Task = apiInstance.providersScimSyncStatusRetrieve(id)
val result : SCIMSyncStatus = apiInstance.providersScimSyncStatusRetrieve(id)
println(result)
} catch (e: ClientException) {
println("4xx response calling ProvidersApi#providersScimSyncStatusRetrieve")
Expand All @@ -2795,7 +2795,7 @@ Name | Type | Description | Notes

### Return type

[**Task**](Task.md)
[**SCIMSyncStatus**](SCIMSyncStatus.md)

### Authorization

Expand Down
11 changes: 11 additions & 0 deletions docs/SCIMSyncStatus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

# SCIMSyncStatus

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**isRunning** | **kotlin.Boolean** | | [readonly]
**tasks** | [**kotlin.collections.List&lt;Task&gt;**](Task.md) | | [readonly]



17 changes: 16 additions & 1 deletion schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17079,7 +17079,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
$ref: '#/components/schemas/SCIMSyncStatus'
description: ''
'404':
description: Task not found
Expand Down Expand Up @@ -40645,6 +40645,21 @@ components:
- name
- token
- url
SCIMSyncStatus:
type: object
description: SCIM Provider sync status
properties:
is_running:
type: boolean
readOnly: true
tasks:
type: array
items:
$ref: '#/components/schemas/Task'
readOnly: true
required:
- is_running
- tasks
SMSDevice:
type: object
description: Serializer for sms authenticator devices
Expand Down
14 changes: 7 additions & 7 deletions src/main/kotlin/io/goauthentik/api/apis/ProvidersApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import io.goauthentik.api.models.SAMLProvider
import io.goauthentik.api.models.SAMLProviderRequest
import io.goauthentik.api.models.SCIMProvider
import io.goauthentik.api.models.SCIMProviderRequest
import io.goauthentik.api.models.Task
import io.goauthentik.api.models.SCIMSyncStatus
import io.goauthentik.api.models.TypeCreate
import io.goauthentik.api.models.UsedBy
import io.goauthentik.api.models.ValidationError
Expand Down Expand Up @@ -4332,7 +4332,7 @@ class ProvidersApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClie
*
* Get provider&#39;s sync status
* @param id A unique integer value identifying this SCIM Provider.
* @return Task
* @return SCIMSyncStatus
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
* @throws UnsupportedOperationException If the API returns an informational or redirection response
Expand All @@ -4341,11 +4341,11 @@ class ProvidersApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClie
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
fun providersScimSyncStatusRetrieve(id: kotlin.Int) : Task {
fun providersScimSyncStatusRetrieve(id: kotlin.Int) : SCIMSyncStatus {
val localVarResponse = providersScimSyncStatusRetrieveWithHttpInfo(id = id)

return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Task
ResponseType.Success -> (localVarResponse as Success<*>).data as SCIMSyncStatus
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> {
Expand All @@ -4363,16 +4363,16 @@ class ProvidersApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClie
*
* Get provider&#39;s sync status
* @param id A unique integer value identifying this SCIM Provider.
* @return ApiResponse<Task?>
* @return ApiResponse<SCIMSyncStatus?>
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class)
fun providersScimSyncStatusRetrieveWithHttpInfo(id: kotlin.Int) : ApiResponse<Task?> {
fun providersScimSyncStatusRetrieveWithHttpInfo(id: kotlin.Int) : ApiResponse<SCIMSyncStatus?> {
val localVariableConfig = providersScimSyncStatusRetrieveRequestConfig(id = id)

return request<Unit, Task>(
return request<Unit, SCIMSyncStatus>(
localVariableConfig
)
}
Expand Down
40 changes: 40 additions & 0 deletions src/main/kotlin/io/goauthentik/api/models/SCIMSyncStatus.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
*
* Please note:
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit this file manually.
*
*/

@file:Suppress(
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
)

package io.goauthentik.api.models

import io.goauthentik.api.models.Task

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
* SCIM Provider sync status
*
* @param isRunning
* @param tasks
*/


data class SCIMSyncStatus (

@Json(name = "is_running")
val isRunning: kotlin.Boolean,

@Json(name = "tasks")
val tasks: kotlin.collections.List<Task>

)

0 comments on commit e4a0f34

Please sign in to comment.