From 2f90047c3830a7f042be7d9dde87e547dcf6c58e Mon Sep 17 00:00:00 2001 From: VRCCat Date: Mon, 29 Apr 2024 22:01:05 +0000 Subject: [PATCH] Upgrade Rust SDK to spec 1.17.3 --- .openapi-generator/FILES | 12 +++++ Cargo.toml | 2 +- docs/CreateInstanceRequest.md | 18 +++++++ docs/GroupsApi.md | 33 ++++++++++++ docs/InstancesApi.md | 36 ++++++++++++- docs/NotificationDetailInvite.md | 13 +++++ docs/NotificationDetailInviteResponse.md | 12 +++++ docs/NotificationDetailRequestInvite.md | 12 +++++ ...NotificationDetailRequestInviteResponse.md | 12 +++++ docs/NotificationDetailVoteToKick.md | 12 +++++ docs/UsersApi.md | 4 +- src/apis/groups_api.rs | 38 ++++++++++++++ src/apis/instances_api.rs | 44 +++++++++++++++- src/apis/users_api.rs | 2 +- src/models/create_instance_request.rs | 51 +++++++++++++++++++ src/models/mod.rs | 12 +++++ src/models/notification_detail_invite.rs | 33 ++++++++++++ .../notification_detail_invite_response.rs | 29 +++++++++++ .../notification_detail_request_invite.rs | 31 +++++++++++ ...fication_detail_request_invite_response.rs | 30 +++++++++++ .../notification_detail_vote_to_kick.rs | 31 +++++++++++ 21 files changed, 459 insertions(+), 8 deletions(-) create mode 100644 docs/CreateInstanceRequest.md create mode 100644 docs/NotificationDetailInvite.md create mode 100644 docs/NotificationDetailInviteResponse.md create mode 100644 docs/NotificationDetailRequestInvite.md create mode 100644 docs/NotificationDetailRequestInviteResponse.md create mode 100644 docs/NotificationDetailVoteToKick.md create mode 100644 src/models/create_instance_request.rs create mode 100644 src/models/notification_detail_invite.rs create mode 100644 src/models/notification_detail_invite_response.rs create mode 100644 src/models/notification_detail_request_invite.rs create mode 100644 src/models/notification_detail_request_invite_response.rs create mode 100644 src/models/notification_detail_vote_to_kick.rs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d93c286..f8ddb8b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -22,6 +22,7 @@ docs/CreateGroupInviteRequest.md docs/CreateGroupPostRequest.md docs/CreateGroupRequest.md docs/CreateGroupRoleRequest.md +docs/CreateInstanceRequest.md docs/CreateWorldRequest.md docs/CurrentUser.md docs/CurrentUserPresence.md @@ -94,6 +95,11 @@ docs/LimitedWorld.md docs/MimeType.md docs/ModerateUserRequest.md docs/Notification.md +docs/NotificationDetailInvite.md +docs/NotificationDetailInviteResponse.md +docs/NotificationDetailRequestInvite.md +docs/NotificationDetailRequestInviteResponse.md +docs/NotificationDetailVoteToKick.md docs/NotificationType.md docs/NotificationsApi.md docs/OrderOption.md @@ -185,6 +191,7 @@ src/models/create_group_invite_request.rs src/models/create_group_post_request.rs src/models/create_group_request.rs src/models/create_group_role_request.rs +src/models/create_instance_request.rs src/models/create_world_request.rs src/models/current_user.rs src/models/current_user_presence.rs @@ -251,6 +258,11 @@ src/models/mime_type.rs src/models/mod.rs src/models/moderate_user_request.rs src/models/notification.rs +src/models/notification_detail_invite.rs +src/models/notification_detail_invite_response.rs +src/models/notification_detail_request_invite.rs +src/models/notification_detail_request_invite_response.rs +src/models/notification_detail_vote_to_kick.rs src/models/notification_type.rs src/models/order_option.rs src/models/paginated_group_audit_log_entry_list.rs diff --git a/Cargo.toml b/Cargo.toml index 70c296c..a74ee31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vrchatapi" -version = "1.17.2" +version = "1.17.3" authors = ["vrchatapi.lpv0t@aries.fyi"] description = "VRChat API Client for Rust" license = "MIT" diff --git a/docs/CreateInstanceRequest.md b/docs/CreateInstanceRequest.md new file mode 100644 index 0000000..74ff2aa --- /dev/null +++ b/docs/CreateInstanceRequest.md @@ -0,0 +1,18 @@ +# CreateInstanceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | +**r#type** | [**crate::models::InstanceType**](InstanceType.md) | | +**region** | [**crate::models::Region**](Region.md) | | +**owner_id** | Option<**String**> | A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise | [optional] +**role_ids** | Option<**Vec**> | Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\" | [optional] +**group_access_type** | Option<[**crate::models::GroupAccessType**](GroupAccessType.md)> | | [optional] +**queue_enabled** | Option<**bool**> | | [optional][default to false] +**closed_at** | Option<**String**> | The time after which users won't be allowed to join the instance | [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) + + diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md index a12b3de..8d64ca9 100644 --- a/docs/GroupsApi.md +++ b/docs/GroupsApi.md @@ -44,6 +44,7 @@ Method | HTTP request | Description [**update_group**](GroupsApi.md#update_group) | **PUT** /groups/{groupId} | Update Group [**update_group_gallery**](GroupsApi.md#update_group_gallery) | **PUT** /groups/{groupId}/galleries/{groupGalleryId} | Update Group Gallery [**update_group_member**](GroupsApi.md#update_group_member) | **PUT** /groups/{groupId}/members/{userId} | Update Group Member +[**update_group_post**](GroupsApi.md#update_group_post) | **PUT** /groups/{groupId}/posts/{notificationId} | Edits a Group post [**update_group_role**](GroupsApi.md#update_group_role) | **PUT** /groups/{groupId}/roles/{groupRoleId} | Update Group Role @@ -1299,6 +1300,38 @@ Name | Type | Description | Required | Notes [[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) +## update_group_post + +> crate::models::GroupPost update_group_post(group_id, notification_id, create_group_post_request) +Edits a Group post + +Edits a Group post + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | +**notification_id** | **String** | Must be a valid notification ID. | [required] | +**create_group_post_request** | [**CreateGroupPostRequest**](CreateGroupPostRequest.md) | | [required] | + +### Return type + +[**crate::models::GroupPost**](GroupPost.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **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) + + ## update_group_role > Vec update_group_role(group_id, group_role_id, update_group_role_request) diff --git a/docs/InstancesApi.md b/docs/InstancesApi.md index a27ec0d..3fdf348 100644 --- a/docs/InstancesApi.md +++ b/docs/InstancesApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- [**close_instance**](InstancesApi.md#close_instance) | **DELETE** /instances/{worldId}:{instanceId} | Close Instance +[**create_instance**](InstancesApi.md#create_instance) | **POST** /instances | Create Instance [**get_instance**](InstancesApi.md#get_instance) | **GET** /instances/{worldId}:{instanceId} | Get Instance [**get_instance_by_short_name**](InstancesApi.md#get_instance_by_short_name) | **GET** /instances/s/{shortName} | Get Instance By Short Name [**get_short_name**](InstancesApi.md#get_short_name) | **GET** /instances/{worldId}:{instanceId}/shortName | Get Instance Short Name @@ -14,10 +15,10 @@ Method | HTTP request | Description ## close_instance -> crate::models::Instance close_instance(world_id, instance_id, hard_close) +> crate::models::Instance close_instance(world_id, instance_id, hard_close, closed_at) Close Instance -Close an instance. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission. +Close an instance or update the closedAt time when it will be closed. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission. ### Parameters @@ -27,6 +28,7 @@ Name | Type | Description | Required | Notes **world_id** | **String** | Must be a valid world ID. | [required] | **instance_id** | **String** | Must be a valid instance ID. | [required] | **hard_close** | Option<**bool**> | Whether to hard close the instance. Defaults to false. | | +**closed_at** | Option<**String**> | The time after which users won't be allowed to join the instances. If omitted, the instance will be closed immediately. | | ### Return type @@ -44,6 +46,36 @@ Name | Type | Description | Required | Notes [[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) +## create_instance + +> crate::models::Instance create_instance(create_instance_request) +Create Instance + +Create an instance + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**create_instance_request** | [**CreateInstanceRequest**](CreateInstanceRequest.md) | | [required] | + +### Return type + +[**crate::models::Instance**](Instance.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **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_instance > crate::models::Instance get_instance(world_id, instance_id) diff --git a/docs/NotificationDetailInvite.md b/docs/NotificationDetailInvite.md new file mode 100644 index 0000000..9da07b3 --- /dev/null +++ b/docs/NotificationDetailInvite.md @@ -0,0 +1,13 @@ +# NotificationDetailInvite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_message** | Option<**String**> | | [optional] +**world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | +**world_name** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotificationDetailInviteResponse.md b/docs/NotificationDetailInviteResponse.md new file mode 100644 index 0000000..8be49a3 --- /dev/null +++ b/docs/NotificationDetailInviteResponse.md @@ -0,0 +1,12 @@ +# NotificationDetailInviteResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**in_response_to** | **String** | | +**response_message** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotificationDetailRequestInvite.md b/docs/NotificationDetailRequestInvite.md new file mode 100644 index 0000000..41a2bde --- /dev/null +++ b/docs/NotificationDetailRequestInvite.md @@ -0,0 +1,12 @@ +# NotificationDetailRequestInvite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**platform** | Option<**String**> | TODO: Does this still exist? | [optional] +**request_message** | Option<**String**> | Used when using InviteMessage Slot. | [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) + + diff --git a/docs/NotificationDetailRequestInviteResponse.md b/docs/NotificationDetailRequestInviteResponse.md new file mode 100644 index 0000000..ed5086b --- /dev/null +++ b/docs/NotificationDetailRequestInviteResponse.md @@ -0,0 +1,12 @@ +# NotificationDetailRequestInviteResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**in_response_to** | **String** | | +**request_message** | Option<**String**> | Used when using InviteMessage Slot. | [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) + + diff --git a/docs/NotificationDetailVoteToKick.md b/docs/NotificationDetailVoteToKick.md new file mode 100644 index 0000000..8177d89 --- /dev/null +++ b/docs/NotificationDetailVoteToKick.md @@ -0,0 +1,12 @@ +# NotificationDetailVoteToKick + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**initiator_user_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | +**user_to_kick_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsersApi.md b/docs/UsersApi.md index e840b38..b5af8b3 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -106,7 +106,7 @@ Name | Type | Description | Required | Notes ## get_user_groups -> Vec get_user_groups(user_id) +> Vec get_user_groups(user_id) Get User Groups Get user's public groups @@ -120,7 +120,7 @@ Name | Type | Description | Required | Notes ### Return type -[**Vec**](Group.md) +[**Vec**](LimitedGroup.md) ### Authorization diff --git a/src/apis/groups_api.rs b/src/apis/groups_api.rs index 1c89dd4..00069cc 100644 --- a/src/apis/groups_api.rs +++ b/src/apis/groups_api.rs @@ -380,6 +380,15 @@ pub enum UpdateGroupMemberError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`update_group_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGroupPostError { + Status401(crate::models::Error), + Status404(crate::models::Success), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`update_group_role`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -1590,6 +1599,35 @@ pub fn update_group_member(configuration: &configuration::Configuration, group_i } } +/// Edits a Group post +pub fn update_group_post(configuration: &configuration::Configuration, group_id: &str, notification_id: &str, create_group_post_request: crate::models::CreateGroupPostRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/posts/{notificationId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), notificationId=crate::apis::urlencode(notification_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, 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()); + } + local_var_req_builder = local_var_req_builder.json(&create_group_post_request); + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + 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 = 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)) + } +} + /// Updates a group role by ID. pub fn update_group_role(configuration: &configuration::Configuration, group_id: &str, group_role_id: &str, update_group_role_request: Option) -> Result, Error> { let local_var_configuration = configuration; diff --git a/src/apis/instances_api.rs b/src/apis/instances_api.rs index 9af5f3a..ec85710 100644 --- a/src/apis/instances_api.rs +++ b/src/apis/instances_api.rs @@ -23,6 +23,14 @@ pub enum CloseInstanceError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`create_instance`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateInstanceError { + Status401(crate::models::Error), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`get_instance`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -57,8 +65,8 @@ pub enum SendSelfInviteError { } -/// Close an instance. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission. -pub fn close_instance(configuration: &configuration::Configuration, world_id: &str, instance_id: &str, hard_close: Option) -> Result> { +/// Close an instance or update the closedAt time when it will be closed. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission. +pub fn close_instance(configuration: &configuration::Configuration, world_id: &str, instance_id: &str, hard_close: Option, closed_at: Option) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -69,6 +77,9 @@ pub fn close_instance(configuration: &configuration::Configuration, world_id: &s if let Some(ref local_var_str) = hard_close { local_var_req_builder = local_var_req_builder.query(&[("hardClose", &local_var_str.to_string())]); } + if let Some(ref local_var_str) = closed_at { + local_var_req_builder = local_var_req_builder.query(&[("closedAt", &local_var_str.to_string())]); + } 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()); } @@ -88,6 +99,35 @@ pub fn close_instance(configuration: &configuration::Configuration, world_id: &s } } +/// Create an instance +pub fn create_instance(configuration: &configuration::Configuration, create_instance_request: crate::models::CreateInstanceRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/instances", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, 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()); + } + local_var_req_builder = local_var_req_builder.json(&create_instance_request); + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + 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 = 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)) + } +} + /// Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return \"null\"! pub fn get_instance(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result> { let local_var_configuration = configuration; diff --git a/src/apis/users_api.rs b/src/apis/users_api.rs index dc9c240..4358c3b 100644 --- a/src/apis/users_api.rs +++ b/src/apis/users_api.rs @@ -156,7 +156,7 @@ pub fn get_user_group_requests(configuration: &configuration::Configuration, use } /// Get user's public groups -pub fn get_user_groups(configuration: &configuration::Configuration, user_id: &str) -> Result, Error> { +pub fn get_user_groups(configuration: &configuration::Configuration, user_id: &str) -> Result, Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; diff --git a/src/models/create_instance_request.rs b/src/models/create_instance_request.rs new file mode 100644 index 0000000..6bb4424 --- /dev/null +++ b/src/models/create_instance_request.rs @@ -0,0 +1,51 @@ +/* + * VRChat API Documentation + * + * + * Contact: vrchatapi.lpv0t@aries.fyi + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct CreateInstanceRequest { + /// WorldID be \"offline\" on User profiles if you are not friends with that user. + #[serde(rename = "worldId")] + pub world_id: String, + #[serde(rename = "type")] + pub r#type: crate::models::InstanceType, + #[serde(rename = "region")] + pub region: crate::models::Region, + /// A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise + #[serde(rename = "ownerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub owner_id: Option>, + /// Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\" + #[serde(rename = "roleIds", skip_serializing_if = "Option::is_none")] + pub role_ids: Option>, + #[serde(rename = "groupAccessType", skip_serializing_if = "Option::is_none")] + pub group_access_type: Option, + #[serde(rename = "queueEnabled", skip_serializing_if = "Option::is_none")] + pub queue_enabled: Option, + /// The time after which users won't be allowed to join the instance + #[serde(rename = "closedAt", skip_serializing_if = "Option::is_none")] + pub closed_at: Option, +} + +impl CreateInstanceRequest { + pub fn new(world_id: String, r#type: crate::models::InstanceType, region: crate::models::Region) -> CreateInstanceRequest { + CreateInstanceRequest { + world_id, + r#type, + region, + owner_id: None, + role_ids: None, + group_access_type: None, + queue_enabled: None, + closed_at: None, + } + } +} + + diff --git a/src/models/mod.rs b/src/models/mod.rs index a1970f9..b6d8276 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -38,6 +38,8 @@ pub mod create_group_request; pub use self::create_group_request::CreateGroupRequest; pub mod create_group_role_request; pub use self::create_group_role_request::CreateGroupRoleRequest; +pub mod create_instance_request; +pub use self::create_instance_request::CreateInstanceRequest; pub mod create_world_request; pub use self::create_world_request::CreateWorldRequest; pub mod current_user; @@ -168,6 +170,16 @@ pub mod moderate_user_request; pub use self::moderate_user_request::ModerateUserRequest; pub mod notification; pub use self::notification::Notification; +pub mod notification_detail_invite; +pub use self::notification_detail_invite::NotificationDetailInvite; +pub mod notification_detail_invite_response; +pub use self::notification_detail_invite_response::NotificationDetailInviteResponse; +pub mod notification_detail_request_invite; +pub use self::notification_detail_request_invite::NotificationDetailRequestInvite; +pub mod notification_detail_request_invite_response; +pub use self::notification_detail_request_invite_response::NotificationDetailRequestInviteResponse; +pub mod notification_detail_vote_to_kick; +pub use self::notification_detail_vote_to_kick::NotificationDetailVoteToKick; pub mod notification_type; pub use self::notification_type::NotificationType; pub mod order_option; diff --git a/src/models/notification_detail_invite.rs b/src/models/notification_detail_invite.rs new file mode 100644 index 0000000..4b75c47 --- /dev/null +++ b/src/models/notification_detail_invite.rs @@ -0,0 +1,33 @@ +/* + * VRChat API Documentation + * + * + * Contact: vrchatapi.lpv0t@aries.fyi + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct NotificationDetailInvite { + #[serde(rename = "inviteMessage", skip_serializing_if = "Option::is_none")] + pub invite_message: Option, + /// WorldID be \"offline\" on User profiles if you are not friends with that user. + #[serde(rename = "worldId")] + pub world_id: String, + #[serde(rename = "worldName")] + pub world_name: String, +} + +impl NotificationDetailInvite { + pub fn new(world_id: String, world_name: String) -> NotificationDetailInvite { + NotificationDetailInvite { + invite_message: None, + world_id, + world_name, + } + } +} + + diff --git a/src/models/notification_detail_invite_response.rs b/src/models/notification_detail_invite_response.rs new file mode 100644 index 0000000..72b2166 --- /dev/null +++ b/src/models/notification_detail_invite_response.rs @@ -0,0 +1,29 @@ +/* + * VRChat API Documentation + * + * + * Contact: vrchatapi.lpv0t@aries.fyi + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct NotificationDetailInviteResponse { + #[serde(rename = "inResponseTo")] + pub in_response_to: String, + #[serde(rename = "responseMessage")] + pub response_message: String, +} + +impl NotificationDetailInviteResponse { + pub fn new(in_response_to: String, response_message: String) -> NotificationDetailInviteResponse { + NotificationDetailInviteResponse { + in_response_to, + response_message, + } + } +} + + diff --git a/src/models/notification_detail_request_invite.rs b/src/models/notification_detail_request_invite.rs new file mode 100644 index 0000000..f511c5d --- /dev/null +++ b/src/models/notification_detail_request_invite.rs @@ -0,0 +1,31 @@ +/* + * VRChat API Documentation + * + * + * Contact: vrchatapi.lpv0t@aries.fyi + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct NotificationDetailRequestInvite { + /// TODO: Does this still exist? + #[serde(rename = "platform", skip_serializing_if = "Option::is_none")] + pub platform: Option, + /// Used when using InviteMessage Slot. + #[serde(rename = "requestMessage", skip_serializing_if = "Option::is_none")] + pub request_message: Option, +} + +impl NotificationDetailRequestInvite { + pub fn new() -> NotificationDetailRequestInvite { + NotificationDetailRequestInvite { + platform: None, + request_message: None, + } + } +} + + diff --git a/src/models/notification_detail_request_invite_response.rs b/src/models/notification_detail_request_invite_response.rs new file mode 100644 index 0000000..37c8cb7 --- /dev/null +++ b/src/models/notification_detail_request_invite_response.rs @@ -0,0 +1,30 @@ +/* + * VRChat API Documentation + * + * + * Contact: vrchatapi.lpv0t@aries.fyi + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct NotificationDetailRequestInviteResponse { + #[serde(rename = "inResponseTo")] + pub in_response_to: String, + /// Used when using InviteMessage Slot. + #[serde(rename = "requestMessage", skip_serializing_if = "Option::is_none")] + pub request_message: Option, +} + +impl NotificationDetailRequestInviteResponse { + pub fn new(in_response_to: String) -> NotificationDetailRequestInviteResponse { + NotificationDetailRequestInviteResponse { + in_response_to, + request_message: None, + } + } +} + + diff --git a/src/models/notification_detail_vote_to_kick.rs b/src/models/notification_detail_vote_to_kick.rs new file mode 100644 index 0000000..8af004a --- /dev/null +++ b/src/models/notification_detail_vote_to_kick.rs @@ -0,0 +1,31 @@ +/* + * VRChat API Documentation + * + * + * Contact: vrchatapi.lpv0t@aries.fyi + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct NotificationDetailVoteToKick { + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + #[serde(rename = "initiatorUserId")] + pub initiator_user_id: String, + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + #[serde(rename = "userToKickId")] + pub user_to_kick_id: String, +} + +impl NotificationDetailVoteToKick { + pub fn new(initiator_user_id: String, user_to_kick_id: String) -> NotificationDetailVoteToKick { + NotificationDetailVoteToKick { + initiator_user_id, + user_to_kick_id, + } + } +} + +