Skip to content

Commit

Permalink
CI: regenerate [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
H1rono authored and actions-user committed Jul 3, 2024
1 parent 30d1953 commit 21143f4
Show file tree
Hide file tree
Showing 26 changed files with 364 additions and 68 deletions.
8 changes: 6 additions & 2 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ docs/Oauth2Api.md
docs/Ogp.md
docs/OgpApi.md
docs/OgpMedia.md
docs/OidcTraqUserInfo.md
docs/OidcUserInfo.md
docs/ParentChangedEvent.md
docs/PatchBotRequest.md
docs/PatchChannelRequest.md
Expand Down Expand Up @@ -106,6 +108,7 @@ docs/PutChannelTopicRequest.md
docs/PutMyPasswordRequest.md
docs/PutNotifyCitationRequest.md
docs/PutUserPasswordRequest.md
docs/Session.md
docs/Stamp.md
docs/StampApi.md
docs/StampHistoryEntry.md
Expand Down Expand Up @@ -137,7 +140,6 @@ docs/VersionFlags.md
docs/VisibilityChangedEvent.md
docs/WebRtcAuthenticateResult.md
docs/WebRtcUserState.md
docs/WebRtcUserStateSessionsInner.md
docs/Webhook.md
docs/WebhookApi.md
docs/WebrtcApi.md
Expand Down Expand Up @@ -214,6 +216,8 @@ src/models/o_auth2_scope.rs
src/models/o_auth2_token.rs
src/models/ogp.rs
src/models/ogp_media.rs
src/models/oidc_traq_user_info.rs
src/models/oidc_user_info.rs
src/models/parent_changed_event.rs
src/models/patch_bot_request.rs
src/models/patch_channel_request.rs
Expand Down Expand Up @@ -258,6 +262,7 @@ src/models/put_channel_topic_request.rs
src/models/put_my_password_request.rs
src/models/put_notify_citation_request.rs
src/models/put_user_password_request.rs
src/models/session.rs
src/models/stamp.rs
src/models/stamp_history_entry.rs
src/models/stamp_palette.rs
Expand Down Expand Up @@ -285,5 +290,4 @@ src/models/version_flags.rs
src/models/visibility_changed_event.rs
src/models/web_rtc_authenticate_result.rs
src/models/web_rtc_user_state.rs
src/models/web_rtc_user_state_sessions_inner.rs
src/models/webhook.rs
28 changes: 28 additions & 0 deletions docs/MeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Method | HTTP request | Description
[**get_my_unread_channels**](MeApi.md#get_my_unread_channels) | **GET** /users/me/unread | 未読チャンネルを取得
[**get_my_user_tags**](MeApi.md#get_my_user_tags) | **GET** /users/me/tags | 自分のタグリストを取得
[**get_my_view_states**](MeApi.md#get_my_view_states) | **GET** /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得
[**get_oidc_user_info**](MeApi.md#get_oidc_user_info) | **GET** /users/me/oidc | 自分のユーザー詳細を取得 (OIDC UserInfo)
[**get_user_settings**](MeApi.md#get_user_settings) | **GET** /users/me/settings | ユーザー設定を取得
[**link_external_account**](MeApi.md#link_external_account) | **POST** /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける
[**read_channel**](MeApi.md#read_channel) | **DELETE** /users/me/unread/{channelId} | チャンネルを既読にする
Expand Down Expand Up @@ -605,6 +606,33 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_oidc_user_info

> crate::models::OidcUserInfo get_oidc_user_info()
自分のユーザー詳細を取得 (OIDC UserInfo)

OIDCトークンを用いてユーザー詳細を取得します。 OIDC UserInfo Endpointです。

### Parameters

This endpoint does not need any parameter.

### Return type

[**crate::models::OidcUserInfo**](OIDCUserInfo.md)

### Authorization

[OAuth2](../README.md#OAuth2), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_user_settings

> crate::models::UserSettings get_user_settings()
Expand Down
21 changes: 21 additions & 0 deletions docs/OidcTraqUserInfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# OidcTraqUserInfo

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bio** | **String** | 自己紹介(biography) |
**groups** | [**Vec<uuid::Uuid>**](uuid::Uuid.md) | 所属グループのUUIDの配列 |
**tags** | [**Vec<crate::models::UserTag>**](UserTag.md) | タグリスト |
**last_online** | Option<**String**> | 最終オンライン日時 |
**twitter_id** | **String** | Twitter ID |
**display_name** | **String** | ユーザー表示名 |
**icon_file_id** | [**uuid::Uuid**](uuid::Uuid.md) | アイコンファイルUUID |
**bot** | **bool** | BOTかどうか |
**state** | [**crate::models::UserAccountState**](UserAccountState.md) | |
**permissions** | [**Vec<crate::models::UserPermission>**](UserPermission.md) | 所有している権限の配列 |
**home_channel** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | ホームチャンネル |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


16 changes: 16 additions & 0 deletions docs/OidcUserInfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# OidcUserInfo

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sub** | [**uuid::Uuid**](uuid::Uuid.md) | ユーザーUUID |
**name** | **String** | ユーザー名 |
**preferred_username** | **String** | ユーザー名 |
**picture** | **String** | アイコン画像URL |
**updated_at** | Option<**i64**> | 更新日時 | [optional]
**traq** | Option<[**crate::models::OidcTraqUserInfo**](OIDCTraqUserInfo.md)> | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


5 changes: 4 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Class | Method | HTTP request | Description
*MeApi* | [**get_my_unread_channels**](MeApi.md#get_my_unread_channels) | **GET** /users/me/unread | 未読チャンネルを取得
*MeApi* | [**get_my_user_tags**](MeApi.md#get_my_user_tags) | **GET** /users/me/tags | 自分のタグリストを取得
*MeApi* | [**get_my_view_states**](MeApi.md#get_my_view_states) | **GET** /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得
*MeApi* | [**get_oidc_user_info**](MeApi.md#get_oidc_user_info) | **GET** /users/me/oidc | 自分のユーザー詳細を取得 (OIDC UserInfo)
*MeApi* | [**get_user_settings**](MeApi.md#get_user_settings) | **GET** /users/me/settings | ユーザー設定を取得
*MeApi* | [**link_external_account**](MeApi.md#link_external_account) | **POST** /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける
*MeApi* | [**read_channel**](MeApi.md#read_channel) | **DELETE** /users/me/unread/{channelId} | チャンネルを既読にする
Expand Down Expand Up @@ -278,6 +279,8 @@ Class | Method | HTTP request | Description
- [OAuth2Token](OAuth2Token.md)
- [Ogp](Ogp.md)
- [OgpMedia](OgpMedia.md)
- [OidcTraqUserInfo](OidcTraqUserInfo.md)
- [OidcUserInfo](OidcUserInfo.md)
- [ParentChangedEvent](ParentChangedEvent.md)
- [PatchBotRequest](PatchBotRequest.md)
- [PatchChannelRequest](PatchChannelRequest.md)
Expand Down Expand Up @@ -322,6 +325,7 @@ Class | Method | HTTP request | Description
- [PutMyPasswordRequest](PutMyPasswordRequest.md)
- [PutNotifyCitationRequest](PutNotifyCitationRequest.md)
- [PutUserPasswordRequest](PutUserPasswordRequest.md)
- [Session](Session.md)
- [Stamp](Stamp.md)
- [StampHistoryEntry](StampHistoryEntry.md)
- [StampPalette](StampPalette.md)
Expand Down Expand Up @@ -349,7 +353,6 @@ Class | Method | HTTP request | Description
- [VisibilityChangedEvent](VisibilityChangedEvent.md)
- [WebRtcAuthenticateResult](WebRtcAuthenticateResult.md)
- [WebRtcUserState](WebRtcUserState.md)
- [WebRtcUserStateSessionsInner](WebRtcUserStateSessionsInner.md)
- [Webhook](Webhook.md)


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

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**state** | **String** | 状態 |
**session_id** | **String** | セッションID |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 1 addition & 1 deletion docs/WebRtcUserState.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**user_id** | [**uuid::Uuid**](uuid::Uuid.md) | ユーザーUUID |
**channel_id** | [**uuid::Uuid**](uuid::Uuid.md) | チャンネルUUID |
**sessions** | [**Vec<crate::models::WebRtcUserStateSessionsInner>**](WebRTCUserState_sessions_inner.md) | セッションの配列 |
**sessions** | [**Vec<crate::models::Session>**](Session.md) | セッションの配列 |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
4 changes: 2 additions & 2 deletions src/apis/bot_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ pub async fn activate_bot(
pub async fn change_bot_icon(
configuration: &configuration::Configuration,
bot_id: &str,
_file: std::path::PathBuf,
file: std::path::PathBuf,
) -> Result<(), Error<ChangeBotIconError>> {
let local_var_configuration = configuration;

Expand All @@ -223,7 +223,7 @@ pub async fn change_bot_icon(
if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
let local_var_form = reqwest::multipart::Form::new();
let mut local_var_form = reqwest::multipart::Form::new();
// TODO: support file upload for 'file' parameter
local_var_req_builder = local_var_req_builder.multipart(local_var_form);

Expand Down
4 changes: 2 additions & 2 deletions src/apis/file_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use reqwest;

use super::{configuration, Error};
use crate::{apis::ResponseContent, models::ThumbnailType};
use crate::apis::ResponseContent;

/// struct for typed errors of method [`delete_file`]
#[derive(Debug, Clone, Serialize, Deserialize)]
Expand Down Expand Up @@ -352,7 +352,7 @@ pub async fn get_thumbnail_image(
/// 指定したチャンネルにファイルをアップロードします。 アーカイブされているチャンネルにはアップロード出来ません。
pub async fn post_file(
configuration: &configuration::Configuration,
_file: std::path::PathBuf,
file: std::path::PathBuf,
channel_id: &str,
) -> Result<crate::models::FileInfo, Error<PostFileError>> {
let local_var_configuration = configuration;
Expand Down
4 changes: 2 additions & 2 deletions src/apis/group_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ pub async fn add_user_group_member(
pub async fn change_user_group_icon(
configuration: &configuration::Configuration,
group_id: &str,
_file: std::path::PathBuf,
file: std::path::PathBuf,
) -> Result<(), Error<ChangeUserGroupIconError>> {
let local_var_configuration = configuration;

Expand All @@ -261,7 +261,7 @@ pub async fn change_user_group_icon(
if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
let local_var_form = reqwest::multipart::Form::new();
let mut local_var_form = reqwest::multipart::Form::new();
// TODO: support file upload for 'file' parameter
local_var_req_builder = local_var_req_builder.multipart(local_var_form);

Expand Down
54 changes: 52 additions & 2 deletions src/apis/me_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ pub enum GetMyViewStatesError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`get_oidc_user_info`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetOidcUserInfoError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`get_user_settings`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
Expand Down Expand Up @@ -336,7 +343,7 @@ pub async fn add_my_user_tag(
/// 自分のアイコン画像を変更します。
pub async fn change_my_icon(
configuration: &configuration::Configuration,
_file: std::path::PathBuf,
file: std::path::PathBuf,
) -> Result<(), Error<ChangeMyIconError>> {
let local_var_configuration = configuration;

Expand All @@ -356,7 +363,7 @@ pub async fn change_my_icon(
if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
let local_var_form = reqwest::multipart::Form::new();
let mut local_var_form = reqwest::multipart::Form::new();
// TODO: support file upload for 'file' parameter
local_var_req_builder = local_var_req_builder.multipart(local_var_form);

Expand Down Expand Up @@ -1144,6 +1151,49 @@ pub async fn get_my_view_states(
}
}

/// OIDCトークンを用いてユーザー詳細を取得します。 OIDC UserInfo Endpointです。
pub async fn get_oidc_user_info(
configuration: &configuration::Configuration,
) -> Result<crate::models::OidcUserInfo, Error<GetOidcUserInfoError>> {
let local_var_configuration = configuration;

let local_var_client = &local_var_configuration.client;

let local_var_uri_str = format!("{}/users/me/oidc", local_var_configuration.base_path);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());

if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder =
local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};

let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;

let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text().await?;

if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetOidcUserInfoError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}

/// ユーザー設定を取得します。
pub async fn get_user_settings(
configuration: &configuration::Configuration,
Expand Down
5 changes: 1 addition & 4 deletions src/apis/oauth2_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
use reqwest;

use super::{configuration, Error};
use crate::{
apis::ResponseContent,
models::{OAuth2Prompt, OAuth2ResponseType},
};
use crate::apis::ResponseContent;

/// struct for typed errors of method [`create_client`]
#[derive(Debug, Clone, Serialize, Deserialize)]
Expand Down
6 changes: 3 additions & 3 deletions src/apis/stamp_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ pub async fn add_message_stamp(
pub async fn change_stamp_image(
configuration: &configuration::Configuration,
stamp_id: &str,
_file: std::path::PathBuf,
file: std::path::PathBuf,
) -> Result<(), Error<ChangeStampImageError>> {
let local_var_configuration = configuration;

Expand All @@ -238,7 +238,7 @@ pub async fn change_stamp_image(
if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
let local_var_form = reqwest::multipart::Form::new();
let mut local_var_form = reqwest::multipart::Form::new();
// TODO: support file upload for 'file' parameter
local_var_req_builder = local_var_req_builder.multipart(local_var_form);

Expand Down Expand Up @@ -266,7 +266,7 @@ pub async fn change_stamp_image(
pub async fn create_stamp(
configuration: &configuration::Configuration,
name: &str,
_file: std::path::PathBuf,
file: std::path::PathBuf,
) -> Result<crate::models::Stamp, Error<CreateStampError>> {
let local_var_configuration = configuration;

Expand Down
4 changes: 2 additions & 2 deletions src/apis/user_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ pub async fn add_user_tag(
pub async fn change_user_icon(
configuration: &configuration::Configuration,
user_id: &str,
_file: std::path::PathBuf,
file: std::path::PathBuf,
) -> Result<(), Error<ChangeUserIconError>> {
let local_var_configuration = configuration;

Expand All @@ -227,7 +227,7 @@ pub async fn change_user_icon(
if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
let local_var_form = reqwest::multipart::Form::new();
let mut local_var_form = reqwest::multipart::Form::new();
// TODO: support file upload for 'file' parameter
local_var_req_builder = local_var_req_builder.multipart(local_var_form);

Expand Down
4 changes: 2 additions & 2 deletions src/apis/webhook_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub enum PostWebhookError {
pub async fn change_webhook_icon(
configuration: &configuration::Configuration,
webhook_id: &str,
_file: std::path::PathBuf,
file: std::path::PathBuf,
) -> Result<(), Error<ChangeWebhookIconError>> {
let local_var_configuration = configuration;

Expand All @@ -117,7 +117,7 @@ pub async fn change_webhook_icon(
if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
let local_var_form = reqwest::multipart::Form::new();
let mut local_var_form = reqwest::multipart::Form::new();
// TODO: support file upload for 'file' parameter
local_var_req_builder = local_var_req_builder.multipart(local_var_form);

Expand Down
Loading

0 comments on commit 21143f4

Please sign in to comment.