From 656060184698eb77d443d16861a1c25d8e5e23ed Mon Sep 17 00:00:00 2001 From: VRCCat Date: Mon, 27 May 2024 18:33:15 +0000 Subject: [PATCH] Upgrade Rust SDK to spec 1.17.5 --- .openapi-generator/FILES | 6 ++ Cargo.toml | 2 +- docs/AuthenticationApi.md | 2 +- docs/AvatarsApi.md | 2 +- docs/Badge.md | 18 ++++++ docs/CreateInstanceRequest.md | 7 ++- docs/CurrentUser.md | 6 +- docs/EconomyApi.md | 2 +- docs/FavoritesApi.md | 2 +- docs/FilesApi.md | 2 +- docs/FriendsApi.md | 2 +- docs/GroupsApi.md | 5 +- docs/Instance.md | 2 +- docs/InstanceRegion.md | 10 +++ docs/InstancesApi.md | 2 +- docs/InviteApi.md | 2 +- docs/LimitedUser.md | 3 + docs/LimitedUserGroups.md | 28 +++++++++ docs/LimitedWorld.md | 2 + docs/NotificationsApi.md | 2 +- docs/PermissionsApi.md | 2 +- docs/PlayermoderationApi.md | 2 +- docs/RespondGroupJoinRequest.md | 1 + docs/SentNotification.md | 4 +- docs/Subscription.md | 4 ++ docs/SystemApi.md | 2 +- docs/Transaction.md | 4 ++ docs/UnityPackage.md | 1 + docs/UpdateUserRequest.md | 1 + docs/User.md | 3 + docs/UsersApi.md | 6 +- docs/WorldPublishStatus.md | 2 +- docs/WorldsApi.md | 2 +- src/apis/configuration.rs | 2 +- src/apis/groups_api.rs | 5 +- src/apis/users_api.rs | 2 +- src/models/badge.rs | 51 ++++++++++++++++ src/models/create_instance_request.rs | 17 +++++- src/models/current_user.rs | 21 +++++-- src/models/group_access_type.rs | 6 +- src/models/instance.rs | 4 +- src/models/instance_region.rs | 44 +++++++++++++ src/models/limited_user.rs | 10 +++ src/models/limited_user_groups.rs | 78 ++++++++++++++++++++++++ src/models/limited_world.rs | 6 ++ src/models/mod.rs | 6 ++ src/models/respond_group_join_request.rs | 4 ++ src/models/sent_notification.rs | 11 ++-- src/models/subscription.rs | 12 ++++ src/models/transaction.rs | 13 ++++ src/models/unity_package.rs | 3 + src/models/update_user_request.rs | 3 + src/models/user.rs | 12 +++- src/models/world_publish_status.rs | 8 +-- 54 files changed, 407 insertions(+), 52 deletions(-) create mode 100644 docs/Badge.md create mode 100644 docs/InstanceRegion.md create mode 100644 docs/LimitedUserGroups.md create mode 100644 src/models/badge.rs create mode 100644 src/models/instance_region.rs create mode 100644 src/models/limited_user_groups.rs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f8ddb8b..873d216 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -12,6 +12,7 @@ docs/AuthenticationApi.md docs/Avatar.md docs/AvatarUnityPackageUrlObject.md docs/AvatarsApi.md +docs/Badge.md docs/BanGroupMemberRequest.md docs/CreateAvatarRequest.md docs/CreateFileRequest.md @@ -76,6 +77,7 @@ docs/InfoPushDataArticleContent.md docs/InfoPushDataClickable.md docs/Instance.md docs/InstancePlatforms.md +docs/InstanceRegion.md docs/InstanceShortNameResponse.md docs/InstanceType.md docs/InstancesApi.md @@ -91,6 +93,7 @@ docs/LicenseType.md docs/LimitedGroup.md docs/LimitedUnityPackage.md docs/LimitedUser.md +docs/LimitedUserGroups.md docs/LimitedWorld.md docs/MimeType.md docs/ModerateUserRequest.md @@ -181,6 +184,7 @@ src/models/api_config_events.rs src/models/api_health.rs src/models/avatar.rs src/models/avatar_unity_package_url_object.rs +src/models/badge.rs src/models/ban_group_member_request.rs src/models/create_avatar_request.rs src/models/create_file_request.rs @@ -240,6 +244,7 @@ src/models/info_push_data_article_content.rs src/models/info_push_data_clickable.rs src/models/instance.rs src/models/instance_platforms.rs +src/models/instance_region.rs src/models/instance_short_name_response.rs src/models/instance_type.rs src/models/invite_message.rs @@ -253,6 +258,7 @@ src/models/license_type.rs src/models/limited_group.rs src/models/limited_unity_package.rs src/models/limited_user.rs +src/models/limited_user_groups.rs src/models/limited_world.rs src/models/mime_type.rs src/models/mod.rs diff --git a/Cargo.toml b/Cargo.toml index a74ee31..ff9df4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vrchatapi" -version = "1.17.3" +version = "1.17.5" authors = ["vrchatapi.lpv0t@aries.fyi"] description = "VRChat API Client for Rust" license = "MIT" diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md index fb7c0c4..2198348 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationApi.md @@ -1,6 +1,6 @@ # \AuthenticationApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/AvatarsApi.md b/docs/AvatarsApi.md index 3aba20c..052a76f 100644 --- a/docs/AvatarsApi.md +++ b/docs/AvatarsApi.md @@ -1,6 +1,6 @@ # \AvatarsApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/Badge.md b/docs/Badge.md new file mode 100644 index 0000000..bd2f338 --- /dev/null +++ b/docs/Badge.md @@ -0,0 +1,18 @@ +# Badge + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assigned_at** | Option<**String**> | only present in CurrentUser badges | [optional] +**badge_description** | **String** | | +**badge_id** | **String** | | +**badge_image_url** | **String** | direct url to image | +**badge_name** | **String** | | +**hidden** | Option<**bool**> | only present in CurrentUser badges | [optional] +**showcased** | **bool** | | +**updated_at** | Option<**String**> | only present in CurrentUser badges | [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/CreateInstanceRequest.md b/docs/CreateInstanceRequest.md index 74ff2aa..bde91f0 100644 --- a/docs/CreateInstanceRequest.md +++ b/docs/CreateInstanceRequest.md @@ -6,12 +6,15 @@ 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) | | +**region** | [**crate::models::InstanceRegion**](InstanceRegion.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] +**closed_at** | Option<**String**> | The time after which users won't be allowed to join the instance. This doesn't work for public instances. | [optional] +**can_request_invite** | Option<**bool**> | Only applies to invite type instances to make them invite+ | [optional][default to false] +**hard_close** | Option<**bool**> | Currently unused, but will eventually be a flag to set if the closing of the instance should kick people. | [optional][default to false] +**invite_only** | Option<**bool**> | | [optional][default to false] [[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/CurrentUser.md b/docs/CurrentUser.md index 66e0da6..f3f13a6 100644 --- a/docs/CurrentUser.md +++ b/docs/CurrentUser.md @@ -10,13 +10,14 @@ Name | Type | Description | Notes **account_deletion_log** | Option<[**Vec**](AccountDeletionLog.md)> | | [optional] **active_friends** | Option<**Vec**> | | [optional] **allow_avatar_copying** | **bool** | | +**badges** | Option<[**Vec**](Badge.md)> | | [optional] **bio** | **String** | | **bio_links** | **Vec** | | **current_avatar** | **String** | | **current_avatar_asset_url** | **String** | | **current_avatar_image_url** | **String** | When profilePicOverride is not empty, use it instead. | **current_avatar_thumbnail_image_url** | **String** | When profilePicOverride is not empty, use it instead. | -**current_avatar_tags** | Option<**Vec**> | | [optional] +**current_avatar_tags** | **Vec** | | **date_joined** | [**String**](string.md) | | **developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | | **display_name** | **String** | | @@ -37,11 +38,13 @@ Name | Type | Description | Notes **is_friend** | **bool** | | [default to false] **last_activity** | Option<**String**> | | [optional] **last_login** | **String** | | +**last_mobile** | Option<**String**> | | **last_platform** | **String** | This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | **obfuscated_email** | **String** | | **obfuscated_pending_email** | **String** | | **oculus_id** | **String** | | **google_id** | Option<**String**> | | [optional] +**google_details** | Option<[**serde_json::Value**](.md)> | | [optional] **pico_id** | Option<**String**> | | [optional] **vive_id** | Option<**String**> | | [optional] **offline_friends** | Option<**Vec**> | | [optional] @@ -49,6 +52,7 @@ Name | Type | Description | Notes **past_display_names** | [**Vec**](PastDisplayName.md) | | **presence** | Option<[**crate::models::CurrentUserPresence**](CurrentUserPresence.md)> | | [optional] **profile_pic_override** | **String** | | +**pronouns** | **String** | | **state** | [**crate::models::UserState**](UserState.md) | | **status** | [**crate::models::UserStatus**](UserStatus.md) | | **status_description** | **String** | | diff --git a/docs/EconomyApi.md b/docs/EconomyApi.md index eb4b3c6..21baf74 100644 --- a/docs/EconomyApi.md +++ b/docs/EconomyApi.md @@ -1,6 +1,6 @@ # \EconomyApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/FavoritesApi.md b/docs/FavoritesApi.md index b9333e0..19db4d6 100644 --- a/docs/FavoritesApi.md +++ b/docs/FavoritesApi.md @@ -1,6 +1,6 @@ # \FavoritesApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/FilesApi.md b/docs/FilesApi.md index fa47ebb..131130b 100644 --- a/docs/FilesApi.md +++ b/docs/FilesApi.md @@ -1,6 +1,6 @@ # \FilesApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/FriendsApi.md b/docs/FriendsApi.md index 6720790..9f21807 100644 --- a/docs/FriendsApi.md +++ b/docs/FriendsApi.md @@ -1,6 +1,6 @@ # \FriendsApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md index 8d64ca9..556465f 100644 --- a/docs/GroupsApi.md +++ b/docs/GroupsApi.md @@ -1,6 +1,6 @@ # \GroupsApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -927,7 +927,7 @@ Name | Type | Description | Required | Notes ## get_group_requests -> Vec get_group_requests(group_id, n, offset) +> Vec get_group_requests(group_id, n, offset, blocked) Get Group Join Requests Returns a list of members that have requested to join the Group. @@ -940,6 +940,7 @@ Name | Type | Description | Required | Notes **group_id** | **String** | Must be a valid group ID. | [required] | **n** | Option<**i32**> | The number of objects to return. | |[default to 60] **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | +**blocked** | Option<**bool**> | See blocked join requests | | ### Return type diff --git a/docs/Instance.md b/docs/Instance.md index 7e432cd..e56eebd 100644 --- a/docs/Instance.md +++ b/docs/Instance.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **permanent** | **bool** | | [default to false] **photon_region** | [**crate::models::Region**](Region.md) | | **platforms** | [**crate::models::InstancePlatforms**](InstancePlatforms.md) | | -**region** | [**crate::models::Region**](Region.md) | | +**region** | [**crate::models::InstanceRegion**](InstanceRegion.md) | | **secure_name** | **String** | | **short_name** | Option<**String**> | | [optional] **tags** | **Vec** | The tags array on Instances usually contain the language tags of the people in the instance. | diff --git a/docs/InstanceRegion.md b/docs/InstanceRegion.md new file mode 100644 index 0000000..c49946e --- /dev/null +++ b/docs/InstanceRegion.md @@ -0,0 +1,10 @@ +# InstanceRegion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/InstancesApi.md b/docs/InstancesApi.md index 3fdf348..dba75aa 100644 --- a/docs/InstancesApi.md +++ b/docs/InstancesApi.md @@ -1,6 +1,6 @@ # \InstancesApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/InviteApi.md b/docs/InviteApi.md index f98ecf9..35bce15 100644 --- a/docs/InviteApi.md +++ b/docs/InviteApi.md @@ -1,6 +1,6 @@ # \InviteApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/LimitedUser.md b/docs/LimitedUser.md index 241c5d3..41de062 100644 --- a/docs/LimitedUser.md +++ b/docs/LimitedUser.md @@ -5,8 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **bio** | Option<**String**> | | [optional] +**bio_links** | Option<**Vec**> | | [optional] **current_avatar_image_url** | Option<**String**> | When profilePicOverride is not empty, use it instead. | [optional] **current_avatar_thumbnail_image_url** | Option<**String**> | When profilePicOverride is not empty, use it instead. | [optional] +**current_avatar_tags** | Option<**Vec**> | | [optional] **developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | | **display_name** | **String** | | **fallback_avatar** | Option<**String**> | | [optional] @@ -14,6 +16,7 @@ Name | Type | Description | Notes **is_friend** | **bool** | | **last_platform** | **String** | This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | **profile_pic_override** | Option<**String**> | | [optional] +**pronouns** | Option<**String**> | | [optional] **status** | [**crate::models::UserStatus**](UserStatus.md) | | **status_description** | **String** | | **tags** | **Vec** | <- Always empty. | diff --git a/docs/LimitedUserGroups.md b/docs/LimitedUserGroups.md new file mode 100644 index 0000000..488e010 --- /dev/null +++ b/docs/LimitedUserGroups.md @@ -0,0 +1,28 @@ +# LimitedUserGroups + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**short_code** | Option<**String**> | | [optional] +**discriminator** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**icon_id** | Option<**String**> | | [optional] +**icon_url** | Option<**String**> | | [optional] +**banner_id** | Option<**String**> | | [optional] +**banner_url** | Option<**String**> | | [optional] +**privacy** | Option<**String**> | | [optional] +**last_post_created_at** | Option<**String**> | | [optional] +**owner_id** | Option<**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. | [optional] +**member_count** | Option<**i32**> | | [optional] +**group_id** | Option<**String**> | | [optional] +**member_visibility** | Option<**String**> | | [optional] +**is_representing** | Option<**bool**> | | [optional] +**mutual_group** | Option<**bool**> | | [optional] +**last_post_read_at** | Option<**String**> | | [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/LimitedWorld.md b/docs/LimitedWorld.md index 489441d..0fbea58 100644 --- a/docs/LimitedWorld.md +++ b/docs/LimitedWorld.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **recommended_capacity** | Option<**i32**> | | [optional] **created_at** | **String** | | **favorites** | **i32** | | [default to 0] +**visits** | Option<**i32**> | | [optional][default to 0] **heat** | **i32** | | [default to 0] **id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | **image_url** | **String** | | @@ -18,6 +19,7 @@ Name | Type | Description | Notes **occupants** | **i32** | | [default to 0] **organization** | **String** | | [default to vrchat] **popularity** | **i32** | | [default to 0] +**preview_youtube_id** | Option<**String**> | | [optional] **publication_date** | **String** | | **release_status** | [**crate::models::ReleaseStatus**](ReleaseStatus.md) | | **tags** | **Vec** | | diff --git a/docs/NotificationsApi.md b/docs/NotificationsApi.md index 541374b..2c08cb3 100644 --- a/docs/NotificationsApi.md +++ b/docs/NotificationsApi.md @@ -1,6 +1,6 @@ # \NotificationsApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/PermissionsApi.md b/docs/PermissionsApi.md index bd2aae6..409b656 100644 --- a/docs/PermissionsApi.md +++ b/docs/PermissionsApi.md @@ -1,6 +1,6 @@ # \PermissionsApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/PlayermoderationApi.md b/docs/PlayermoderationApi.md index 8b55cfc..5e14892 100644 --- a/docs/PlayermoderationApi.md +++ b/docs/PlayermoderationApi.md @@ -1,6 +1,6 @@ # \PlayermoderationApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/RespondGroupJoinRequest.md b/docs/RespondGroupJoinRequest.md index d03d95b..a8cce60 100644 --- a/docs/RespondGroupJoinRequest.md +++ b/docs/RespondGroupJoinRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action** | [**crate::models::GroupJoinRequestAction**](GroupJoinRequestAction.md) | | +**block** | Option<**bool**> | Whether to block the user from requesting again | [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/SentNotification.md b/docs/SentNotification.md index 1a8d02e..e0d74c1 100644 --- a/docs/SentNotification.md +++ b/docs/SentNotification.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_at** | **String** | | -**details** | **String** | **NOTICE:** This is not a JSON object, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. | [default to {}] +**details** | [**serde_json::Value**](.md) | | **id** | **String** | | **message** | **String** | | -**reciever_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. | +**receiver_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. | **sender_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. | **sender_username** | Option<**String**> | -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). | [optional] **r#type** | [**crate::models::NotificationType**](NotificationType.md) | | diff --git a/docs/Subscription.md b/docs/Subscription.md index bca85e6..fd0aa10 100644 --- a/docs/Subscription.md +++ b/docs/Subscription.md @@ -6,6 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | **steam_item_id** | **String** | | +**oculus_sku** | Option<**String**> | | [optional] +**google_product_id** | Option<**String**> | | [optional] +**google_plan_id** | Option<**String**> | | [optional] +**pico_sku** | Option<**String**> | | [optional] **amount** | **f32** | | **description** | **String** | | **period** | [**crate::models::SubscriptionPeriod**](SubscriptionPeriod.md) | | diff --git a/docs/SystemApi.md b/docs/SystemApi.md index 3a25824..d1c0cee 100644 --- a/docs/SystemApi.md +++ b/docs/SystemApi.md @@ -1,6 +1,6 @@ # \SystemApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/Transaction.md b/docs/Transaction.md index d808dd1..c1f7e01 100644 --- a/docs/Transaction.md +++ b/docs/Transaction.md @@ -5,6 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | +**user_id** | Option<**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. | [optional] +**user_display_name** | Option<**String**> | | [optional] **status** | [**crate::models::TransactionStatus**](TransactionStatus.md) | | **subscription** | [**crate::models::Subscription**](Subscription.md) | | **sandbox** | **bool** | | [default to false] @@ -13,6 +15,8 @@ Name | Type | Description | Notes **steam** | Option<[**crate::models::TransactionSteamInfo**](TransactionSteamInfo.md)> | | [optional] **agreement** | Option<[**crate::models::TransactionAgreement**](TransactionAgreement.md)> | | [optional] **error** | **String** | | +**is_gift** | Option<**bool**> | | [optional][default to false] +**is_tokens** | Option<**bool**> | | [optional][default to false] [[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/UnityPackage.md b/docs/UnityPackage.md index 256362d..0878989 100644 --- a/docs/UnityPackage.md +++ b/docs/UnityPackage.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **unity_version** | **String** | | [default to 5.3.4p1] **impostor_url** | Option<**String**> | | [optional] **scan_status** | Option<**String**> | | [optional] +**variant** | Option<**String**> | | [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/UpdateUserRequest.md b/docs/UpdateUserRequest.md index 1c0e877..0e861e0 100644 --- a/docs/UpdateUserRequest.md +++ b/docs/UpdateUserRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **status_description** | Option<**String**> | | [optional] **bio** | Option<**String**> | | [optional] **bio_links** | Option<**Vec**> | | [optional] +**pronouns** | Option<**String**> | | [optional] **user_icon** | Option<**String**> | MUST be a valid VRChat /file/ url. | [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/User.md b/docs/User.md index 637406b..6403f7c 100644 --- a/docs/User.md +++ b/docs/User.md @@ -5,10 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allow_avatar_copying** | **bool** | | [default to true] +**badges** | Option<[**Vec**](Badge.md)> | | [optional] **bio** | **String** | | **bio_links** | **Vec** | | **current_avatar_image_url** | **String** | When profilePicOverride is not empty, use it instead. | **current_avatar_thumbnail_image_url** | **String** | When profilePicOverride is not empty, use it instead. | +**current_avatar_tags** | **Vec** | | **date_joined** | [**String**](string.md) | | **developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | | **display_name** | **String** | A users visual display name. This is what shows up in-game, and can different from their `username`. Changing display name is restricted to a cooldown period. | @@ -23,6 +25,7 @@ Name | Type | Description | Notes **location** | Option<**String**> | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] **note** | Option<**String**> | | [optional] **profile_pic_override** | **String** | | +**pronouns** | **String** | | **state** | [**crate::models::UserState**](UserState.md) | | **status** | [**crate::models::UserStatus**](UserStatus.md) | | **status_description** | **String** | | diff --git a/docs/UsersApi.md b/docs/UsersApi.md index b5af8b3..1b77c4c 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -1,6 +1,6 @@ # \UsersApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -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**](LimitedGroup.md) +[**Vec**](LimitedUserGroups.md) ### Authorization diff --git a/docs/WorldPublishStatus.md b/docs/WorldPublishStatus.md index d10aa18..4afdcb6 100644 --- a/docs/WorldPublishStatus.md +++ b/docs/WorldPublishStatus.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**can_pubilsh** | **bool** | | [default to true] +**can_publish** | **bool** | | [default to true] [[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/WorldsApi.md b/docs/WorldsApi.md index 64b42f5..67ef9e3 100644 --- a/docs/WorldsApi.md +++ b/docs/WorldsApi.md @@ -1,6 +1,6 @@ # \WorldsApi -All URIs are relative to *https://api.vrchat.cloud/api/1* +All URIs are relative to *https://vrchat.com/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/src/apis/configuration.rs b/src/apis/configuration.rs index 2b373c8..d080762 100644 --- a/src/apis/configuration.rs +++ b/src/apis/configuration.rs @@ -40,7 +40,7 @@ impl Configuration { impl Default for Configuration { fn default() -> Self { Configuration { - base_path: "https://api.vrchat.cloud/api/1".to_owned(), + base_path: "https://vrchat.com/api/1".to_owned(), user_agent: Some("vrchatapi-rust".to_owned()), client: reqwest::Client::builder().cookie_store(true).build().unwrap(), basic_auth: None, diff --git a/src/apis/groups_api.rs b/src/apis/groups_api.rs index 00069cc..6dcaa21 100644 --- a/src/apis/groups_api.rs +++ b/src/apis/groups_api.rs @@ -1245,7 +1245,7 @@ pub fn get_group_post(configuration: &configuration::Configuration, group_id: &s } /// Returns a list of members that have requested to join the Group. -pub fn get_group_requests(configuration: &configuration::Configuration, group_id: &str, n: Option, offset: Option) -> Result, Error> { +pub fn get_group_requests(configuration: &configuration::Configuration, group_id: &str, n: Option, offset: Option, blocked: Option) -> Result, Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -1259,6 +1259,9 @@ pub fn get_group_requests(configuration: &configuration::Configuration, group_id if let Some(ref local_var_str) = offset { local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); } + if let Some(ref local_var_str) = blocked { + local_var_req_builder = local_var_req_builder.query(&[("blocked", &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()); } diff --git a/src/apis/users_api.rs b/src/apis/users_api.rs index 4358c3b..3df6448 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/badge.rs b/src/models/badge.rs new file mode 100644 index 0000000..aef5e26 --- /dev/null +++ b/src/models/badge.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 Badge { + /// only present in CurrentUser badges + #[serde(rename = "assignedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub assigned_at: Option>, + #[serde(rename = "badgeDescription")] + pub badge_description: String, + #[serde(rename = "badgeId")] + pub badge_id: String, + /// direct url to image + #[serde(rename = "badgeImageUrl")] + pub badge_image_url: String, + #[serde(rename = "badgeName")] + pub badge_name: String, + /// only present in CurrentUser badges + #[serde(rename = "hidden", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub hidden: Option>, + #[serde(rename = "showcased")] + pub showcased: bool, + /// only present in CurrentUser badges + #[serde(rename = "updatedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub updated_at: Option>, +} + +impl Badge { + pub fn new(badge_description: String, badge_id: String, badge_image_url: String, badge_name: String, showcased: bool) -> Badge { + Badge { + assigned_at: None, + badge_description, + badge_id, + badge_image_url, + badge_name, + hidden: None, + showcased, + updated_at: None, + } + } +} + + diff --git a/src/models/create_instance_request.rs b/src/models/create_instance_request.rs index 6bb4424..84bb275 100644 --- a/src/models/create_instance_request.rs +++ b/src/models/create_instance_request.rs @@ -17,7 +17,7 @@ pub struct CreateInstanceRequest { #[serde(rename = "type")] pub r#type: crate::models::InstanceType, #[serde(rename = "region")] - pub region: crate::models::Region, + pub region: crate::models::InstanceRegion, /// 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>, @@ -28,13 +28,21 @@ pub struct CreateInstanceRequest { 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 + /// The time after which users won't be allowed to join the instance. This doesn't work for public instances. #[serde(rename = "closedAt", skip_serializing_if = "Option::is_none")] pub closed_at: Option, + /// Only applies to invite type instances to make them invite+ + #[serde(rename = "canRequestInvite", skip_serializing_if = "Option::is_none")] + pub can_request_invite: Option, + /// Currently unused, but will eventually be a flag to set if the closing of the instance should kick people. + #[serde(rename = "hardClose", skip_serializing_if = "Option::is_none")] + pub hard_close: Option, + #[serde(rename = "inviteOnly", skip_serializing_if = "Option::is_none")] + pub invite_only: Option, } impl CreateInstanceRequest { - pub fn new(world_id: String, r#type: crate::models::InstanceType, region: crate::models::Region) -> CreateInstanceRequest { + pub fn new(world_id: String, r#type: crate::models::InstanceType, region: crate::models::InstanceRegion) -> CreateInstanceRequest { CreateInstanceRequest { world_id, r#type, @@ -44,6 +52,9 @@ impl CreateInstanceRequest { group_access_type: None, queue_enabled: None, closed_at: None, + can_request_invite: None, + hard_close: None, + invite_only: None, } } } diff --git a/src/models/current_user.rs b/src/models/current_user.rs index 97a7cce..4da9bdf 100644 --- a/src/models/current_user.rs +++ b/src/models/current_user.rs @@ -25,6 +25,9 @@ pub struct CurrentUser { pub active_friends: Option>, #[serde(rename = "allowAvatarCopying")] pub allow_avatar_copying: bool, + /// + #[serde(rename = "badges", skip_serializing_if = "Option::is_none")] + pub badges: Option>, #[serde(rename = "bio")] pub bio: String, /// @@ -40,8 +43,8 @@ pub struct CurrentUser { /// When profilePicOverride is not empty, use it instead. #[serde(rename = "currentAvatarThumbnailImageUrl")] pub current_avatar_thumbnail_image_url: String, - #[serde(rename = "currentAvatarTags", skip_serializing_if = "Option::is_none")] - pub current_avatar_tags: Option>, + #[serde(rename = "currentAvatarTags")] + pub current_avatar_tags: Vec, #[serde(rename = "date_joined")] pub date_joined: String, #[serde(rename = "developerType")] @@ -85,6 +88,8 @@ pub struct CurrentUser { pub last_activity: Option, #[serde(rename = "last_login")] pub last_login: String, + #[serde(rename = "last_mobile", deserialize_with = "Option::deserialize")] + pub last_mobile: Option, /// This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. #[serde(rename = "last_platform")] pub last_platform: String, @@ -96,6 +101,8 @@ pub struct CurrentUser { pub oculus_id: String, #[serde(rename = "googleId", skip_serializing_if = "Option::is_none")] pub google_id: Option, + #[serde(rename = "googleDetails", skip_serializing_if = "Option::is_none")] + pub google_details: Option, #[serde(rename = "picoId", skip_serializing_if = "Option::is_none")] pub pico_id: Option, #[serde(rename = "viveId", skip_serializing_if = "Option::is_none")] @@ -111,6 +118,8 @@ pub struct CurrentUser { pub presence: Option>, #[serde(rename = "profilePicOverride")] pub profile_pic_override: String, + #[serde(rename = "pronouns")] + pub pronouns: String, #[serde(rename = "state")] pub state: crate::models::UserState, #[serde(rename = "status")] @@ -143,7 +152,7 @@ pub struct CurrentUser { } impl CurrentUser { - pub fn new(accepted_tos_version: i32, allow_avatar_copying: bool, bio: String, bio_links: Vec, current_avatar: String, current_avatar_asset_url: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, date_joined: String, developer_type: crate::models::DeveloperType, display_name: String, email_verified: bool, friend_group_names: Vec, friend_key: String, friends: Vec, has_birthday: bool, has_email: bool, has_logged_in_from_client: bool, has_pending_email: bool, home_location: String, id: String, is_friend: bool, last_login: String, last_platform: String, obfuscated_email: String, obfuscated_pending_email: String, oculus_id: String, past_display_names: Vec, profile_pic_override: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, status_first_time: bool, status_history: Vec, steam_details: serde_json::Value, steam_id: String, tags: Vec, two_factor_auth_enabled: bool, unsubscribe: bool, user_icon: String) -> CurrentUser { + pub fn new(accepted_tos_version: i32, allow_avatar_copying: bool, bio: String, bio_links: Vec, current_avatar: String, current_avatar_asset_url: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, current_avatar_tags: Vec, date_joined: String, developer_type: crate::models::DeveloperType, display_name: String, email_verified: bool, friend_group_names: Vec, friend_key: String, friends: Vec, has_birthday: bool, has_email: bool, has_logged_in_from_client: bool, has_pending_email: bool, home_location: String, id: String, is_friend: bool, last_login: String, last_mobile: Option, last_platform: String, obfuscated_email: String, obfuscated_pending_email: String, oculus_id: String, past_display_names: Vec, profile_pic_override: String, pronouns: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, status_first_time: bool, status_history: Vec, steam_details: serde_json::Value, steam_id: String, tags: Vec, two_factor_auth_enabled: bool, unsubscribe: bool, user_icon: String) -> CurrentUser { CurrentUser { accepted_tos_version, accepted_privacy_version: None, @@ -151,13 +160,14 @@ impl CurrentUser { account_deletion_log: None, active_friends: None, allow_avatar_copying, + badges: None, bio, bio_links, current_avatar, current_avatar_asset_url, current_avatar_image_url, current_avatar_thumbnail_image_url, - current_avatar_tags: None, + current_avatar_tags, date_joined, developer_type, display_name, @@ -178,11 +188,13 @@ impl CurrentUser { is_friend, last_activity: None, last_login, + last_mobile, last_platform, obfuscated_email, obfuscated_pending_email, oculus_id, google_id: None, + google_details: None, pico_id: None, vive_id: None, offline_friends: None, @@ -190,6 +202,7 @@ impl CurrentUser { past_display_names, presence: None, profile_pic_override, + pronouns, state, status, status_description, diff --git a/src/models/group_access_type.rs b/src/models/group_access_type.rs index 3343f97..0e6d1ec 100644 --- a/src/models/group_access_type.rs +++ b/src/models/group_access_type.rs @@ -15,8 +15,8 @@ pub enum GroupAccessType { Public, #[serde(rename = "plus")] Plus, - #[serde(rename = "member")] - Member, + #[serde(rename = "members")] + Members, } @@ -25,7 +25,7 @@ impl ToString for GroupAccessType { match self { Self::Public => String::from("public"), Self::Plus => String::from("plus"), - Self::Member => String::from("member"), + Self::Members => String::from("members"), } } } diff --git a/src/models/instance.rs b/src/models/instance.rs index c1c1a33..76a881b 100644 --- a/src/models/instance.rs +++ b/src/models/instance.rs @@ -45,7 +45,7 @@ pub struct Instance { #[serde(rename = "platforms")] pub platforms: Box, #[serde(rename = "region")] - pub region: crate::models::Region, + pub region: crate::models::InstanceRegion, #[serde(rename = "secureName")] pub secure_name: String, #[serde(rename = "shortName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -98,7 +98,7 @@ pub struct Instance { impl Instance { /// * `hidden` field is only present if InstanceType is `hidden` aka \"Friends+\", and is instance creator. * `friends` field is only present if InstanceType is `friends` aka \"Friends\", and is instance creator. * `private` field is only present if InstanceType is `private` aka \"Invite\" or \"Invite+\", and is instance creator. - pub fn new(active: bool, can_request_invite: bool, capacity: i32, client_number: String, full: bool, id: String, instance_id: String, location: String, n_users: i32, name: String, permanent: bool, photon_region: crate::models::Region, platforms: crate::models::InstancePlatforms, region: crate::models::Region, secure_name: String, tags: Vec, r#type: crate::models::InstanceType, world_id: String, queue_enabled: bool, queue_size: i32, recommended_capacity: i32, strict: bool, user_count: i32, world: crate::models::World) -> Instance { + pub fn new(active: bool, can_request_invite: bool, capacity: i32, client_number: String, full: bool, id: String, instance_id: String, location: String, n_users: i32, name: String, permanent: bool, photon_region: crate::models::Region, platforms: crate::models::InstancePlatforms, region: crate::models::InstanceRegion, secure_name: String, tags: Vec, r#type: crate::models::InstanceType, world_id: String, queue_enabled: bool, queue_size: i32, recommended_capacity: i32, strict: bool, user_count: i32, world: crate::models::World) -> Instance { Instance { active, can_request_invite, diff --git a/src/models/instance_region.rs b/src/models/instance_region.rs new file mode 100644 index 0000000..2e6f53d --- /dev/null +++ b/src/models/instance_region.rs @@ -0,0 +1,44 @@ +/* + * VRChat API Documentation + * + * + * Contact: vrchatapi.lpv0t@aries.fyi + * Generated by: https://openapi-generator.tech + */ + +/// InstanceRegion : Instance region + +/// Instance region +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum InstanceRegion { + #[serde(rename = "us")] + Us, + #[serde(rename = "use")] + Use, + #[serde(rename = "eu")] + Eu, + #[serde(rename = "jp")] + Jp, + +} + +impl ToString for InstanceRegion { + fn to_string(&self) -> String { + match self { + Self::Us => String::from("us"), + Self::Use => String::from("use"), + Self::Eu => String::from("eu"), + Self::Jp => String::from("jp"), + } + } +} + +impl Default for InstanceRegion { + fn default() -> InstanceRegion { + Self::Us + } +} + + + + diff --git a/src/models/limited_user.rs b/src/models/limited_user.rs index 4ab71bd..22ecbcd 100644 --- a/src/models/limited_user.rs +++ b/src/models/limited_user.rs @@ -14,12 +14,17 @@ pub struct LimitedUser { #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] pub bio: Option, + /// + #[serde(rename = "bioLinks", skip_serializing_if = "Option::is_none")] + pub bio_links: Option>, /// When profilePicOverride is not empty, use it instead. #[serde(rename = "currentAvatarImageUrl", skip_serializing_if = "Option::is_none")] pub current_avatar_image_url: Option, /// When profilePicOverride is not empty, use it instead. #[serde(rename = "currentAvatarThumbnailImageUrl", skip_serializing_if = "Option::is_none")] pub current_avatar_thumbnail_image_url: Option, + #[serde(rename = "currentAvatarTags", skip_serializing_if = "Option::is_none")] + pub current_avatar_tags: Option>, #[serde(rename = "developerType")] pub developer_type: crate::models::DeveloperType, #[serde(rename = "displayName")] @@ -36,6 +41,8 @@ pub struct LimitedUser { pub last_platform: String, #[serde(rename = "profilePicOverride", skip_serializing_if = "Option::is_none")] pub profile_pic_override: Option, + #[serde(rename = "pronouns", skip_serializing_if = "Option::is_none")] + pub pronouns: Option, #[serde(rename = "status")] pub status: crate::models::UserStatus, #[serde(rename = "statusDescription")] @@ -59,8 +66,10 @@ impl LimitedUser { pub fn new(developer_type: crate::models::DeveloperType, display_name: String, id: String, is_friend: bool, last_platform: String, status: crate::models::UserStatus, status_description: String, tags: Vec) -> LimitedUser { LimitedUser { bio: None, + bio_links: None, current_avatar_image_url: None, current_avatar_thumbnail_image_url: None, + current_avatar_tags: None, developer_type, display_name, fallback_avatar: None, @@ -68,6 +77,7 @@ impl LimitedUser { is_friend, last_platform, profile_pic_override: None, + pronouns: None, status, status_description, tags, diff --git a/src/models/limited_user_groups.rs b/src/models/limited_user_groups.rs new file mode 100644 index 0000000..d185672 --- /dev/null +++ b/src/models/limited_user_groups.rs @@ -0,0 +1,78 @@ +/* + * VRChat API Documentation + * + * + * Contact: vrchatapi.lpv0t@aries.fyi + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct LimitedUserGroups { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "shortCode", skip_serializing_if = "Option::is_none")] + pub short_code: Option, + #[serde(rename = "discriminator", skip_serializing_if = "Option::is_none")] + pub discriminator: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "iconId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub icon_id: Option>, + #[serde(rename = "iconUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub icon_url: Option>, + #[serde(rename = "bannerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub banner_id: Option>, + #[serde(rename = "bannerUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub banner_url: Option>, + #[serde(rename = "privacy", skip_serializing_if = "Option::is_none")] + pub privacy: Option, + #[serde(rename = "lastPostCreatedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub last_post_created_at: Option>, + /// 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 = "ownerId", skip_serializing_if = "Option::is_none")] + pub owner_id: Option, + #[serde(rename = "memberCount", skip_serializing_if = "Option::is_none")] + pub member_count: Option, + #[serde(rename = "groupId", skip_serializing_if = "Option::is_none")] + pub group_id: Option, + #[serde(rename = "memberVisibility", skip_serializing_if = "Option::is_none")] + pub member_visibility: Option, + #[serde(rename = "isRepresenting", skip_serializing_if = "Option::is_none")] + pub is_representing: Option, + #[serde(rename = "mutualGroup", skip_serializing_if = "Option::is_none")] + pub mutual_group: Option, + #[serde(rename = "lastPostReadAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub last_post_read_at: Option>, +} + +impl LimitedUserGroups { + pub fn new() -> LimitedUserGroups { + LimitedUserGroups { + id: None, + name: None, + short_code: None, + discriminator: None, + description: None, + icon_id: None, + icon_url: None, + banner_id: None, + banner_url: None, + privacy: None, + last_post_created_at: None, + owner_id: None, + member_count: None, + group_id: None, + member_visibility: None, + is_representing: None, + mutual_group: None, + last_post_read_at: None, + } + } +} + + diff --git a/src/models/limited_world.rs b/src/models/limited_world.rs index 5b91377..6138bcf 100644 --- a/src/models/limited_world.rs +++ b/src/models/limited_world.rs @@ -25,6 +25,8 @@ pub struct LimitedWorld { pub created_at: String, #[serde(rename = "favorites")] pub favorites: i32, + #[serde(rename = "visits", skip_serializing_if = "Option::is_none")] + pub visits: Option, #[serde(rename = "heat")] pub heat: i32, /// WorldID be \"offline\" on User profiles if you are not friends with that user. @@ -42,6 +44,8 @@ pub struct LimitedWorld { pub organization: String, #[serde(rename = "popularity")] pub popularity: i32, + #[serde(rename = "previewYoutubeId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub preview_youtube_id: Option>, #[serde(rename = "publicationDate")] pub publication_date: String, #[serde(rename = "releaseStatus")] @@ -70,6 +74,7 @@ impl LimitedWorld { recommended_capacity: None, created_at, favorites, + visits: None, heat, id, image_url, @@ -78,6 +83,7 @@ impl LimitedWorld { occupants, organization, popularity, + preview_youtube_id: None, publication_date, release_status, tags, diff --git a/src/models/mod.rs b/src/models/mod.rs index b6d8276..fb46a5d 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -18,6 +18,8 @@ pub mod avatar; pub use self::avatar::Avatar; pub mod avatar_unity_package_url_object; pub use self::avatar_unity_package_url_object::AvatarUnityPackageUrlObject; +pub mod badge; +pub use self::badge::Badge; pub mod ban_group_member_request; pub use self::ban_group_member_request::BanGroupMemberRequest; pub mod create_avatar_request; @@ -136,6 +138,8 @@ pub mod instance; pub use self::instance::Instance; pub mod instance_platforms; pub use self::instance_platforms::InstancePlatforms; +pub mod instance_region; +pub use self::instance_region::InstanceRegion; pub mod instance_short_name_response; pub use self::instance_short_name_response::InstanceShortNameResponse; pub mod instance_type; @@ -162,6 +166,8 @@ pub mod limited_unity_package; pub use self::limited_unity_package::LimitedUnityPackage; pub mod limited_user; pub use self::limited_user::LimitedUser; +pub mod limited_user_groups; +pub use self::limited_user_groups::LimitedUserGroups; pub mod limited_world; pub use self::limited_world::LimitedWorld; pub mod mime_type; diff --git a/src/models/respond_group_join_request.rs b/src/models/respond_group_join_request.rs index 7a00956..b32086c 100644 --- a/src/models/respond_group_join_request.rs +++ b/src/models/respond_group_join_request.rs @@ -13,12 +13,16 @@ pub struct RespondGroupJoinRequest { #[serde(rename = "action")] pub action: crate::models::GroupJoinRequestAction, + /// Whether to block the user from requesting again + #[serde(rename = "block", skip_serializing_if = "Option::is_none")] + pub block: Option, } impl RespondGroupJoinRequest { pub fn new(action: crate::models::GroupJoinRequestAction) -> RespondGroupJoinRequest { RespondGroupJoinRequest { action, + block: None, } } } diff --git a/src/models/sent_notification.rs b/src/models/sent_notification.rs index adc7584..b69d039 100644 --- a/src/models/sent_notification.rs +++ b/src/models/sent_notification.rs @@ -14,17 +14,16 @@ pub struct SentNotification { #[serde(rename = "created_at")] pub created_at: String, - /// **NOTICE:** This is not a JSON object, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. #[serde(rename = "details")] - pub details: String, + pub details: serde_json::Value, #[serde(rename = "id")] pub id: String, /// #[serde(rename = "message")] pub message: 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 = "recieverUserId")] - pub reciever_user_id: String, + #[serde(rename = "receiverUserId")] + pub receiver_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 = "senderUserId")] pub sender_user_id: String, @@ -37,13 +36,13 @@ pub struct SentNotification { impl SentNotification { /// - pub fn new(created_at: String, details: String, id: String, message: String, reciever_user_id: String, sender_user_id: String, r#type: crate::models::NotificationType) -> SentNotification { + pub fn new(created_at: String, details: serde_json::Value, id: String, message: String, receiver_user_id: String, sender_user_id: String, r#type: crate::models::NotificationType) -> SentNotification { SentNotification { created_at, details, id, message, - reciever_user_id, + receiver_user_id, sender_user_id, sender_username: None, r#type, diff --git a/src/models/subscription.rs b/src/models/subscription.rs index cdc2559..fd2d672 100644 --- a/src/models/subscription.rs +++ b/src/models/subscription.rs @@ -16,6 +16,14 @@ pub struct Subscription { pub id: String, #[serde(rename = "steamItemId")] pub steam_item_id: String, + #[serde(rename = "oculusSku", skip_serializing_if = "Option::is_none")] + pub oculus_sku: Option, + #[serde(rename = "googleProductId", skip_serializing_if = "Option::is_none")] + pub google_product_id: Option, + #[serde(rename = "googlePlanId", skip_serializing_if = "Option::is_none")] + pub google_plan_id: Option, + #[serde(rename = "picoSku", skip_serializing_if = "Option::is_none")] + pub pico_sku: Option, #[serde(rename = "amount")] pub amount: f32, #[serde(rename = "description")] @@ -32,6 +40,10 @@ impl Subscription { Subscription { id, steam_item_id, + oculus_sku: None, + google_product_id: None, + google_plan_id: None, + pico_sku: None, amount, description, period, diff --git a/src/models/transaction.rs b/src/models/transaction.rs index b58d0ca..ec2b71e 100644 --- a/src/models/transaction.rs +++ b/src/models/transaction.rs @@ -14,6 +14,11 @@ pub struct Transaction { #[serde(rename = "id")] pub 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 = "userId", skip_serializing_if = "Option::is_none")] + pub user_id: Option, + #[serde(rename = "userDisplayName", skip_serializing_if = "Option::is_none")] + pub user_display_name: Option, #[serde(rename = "status")] pub status: crate::models::TransactionStatus, #[serde(rename = "subscription")] @@ -30,6 +35,10 @@ pub struct Transaction { pub agreement: Option>, #[serde(rename = "error")] pub error: String, + #[serde(rename = "isGift", skip_serializing_if = "Option::is_none")] + pub is_gift: Option, + #[serde(rename = "isTokens", skip_serializing_if = "Option::is_none")] + pub is_tokens: Option, } impl Transaction { @@ -37,6 +46,8 @@ impl Transaction { pub fn new(id: String, status: crate::models::TransactionStatus, subscription: crate::models::Subscription, sandbox: bool, created_at: String, updated_at: String, error: String) -> Transaction { Transaction { id, + user_id: None, + user_display_name: None, status, subscription: Box::new(subscription), sandbox, @@ -45,6 +56,8 @@ impl Transaction { steam: None, agreement: None, error, + is_gift: None, + is_tokens: None, } } } diff --git a/src/models/unity_package.rs b/src/models/unity_package.rs index d73db9f..7d7479d 100644 --- a/src/models/unity_package.rs +++ b/src/models/unity_package.rs @@ -37,6 +37,8 @@ pub struct UnityPackage { pub impostor_url: Option>, #[serde(rename = "scanStatus", skip_serializing_if = "Option::is_none")] pub scan_status: Option, + #[serde(rename = "variant", skip_serializing_if = "Option::is_none")] + pub variant: Option, } impl UnityPackage { @@ -55,6 +57,7 @@ impl UnityPackage { unity_version, impostor_url: None, scan_status: None, + variant: None, } } } diff --git a/src/models/update_user_request.rs b/src/models/update_user_request.rs index 9e2c520..c02a6e3 100644 --- a/src/models/update_user_request.rs +++ b/src/models/update_user_request.rs @@ -28,6 +28,8 @@ pub struct UpdateUserRequest { pub bio: Option, #[serde(rename = "bioLinks", skip_serializing_if = "Option::is_none")] pub bio_links: Option>, + #[serde(rename = "pronouns", skip_serializing_if = "Option::is_none")] + pub pronouns: Option, /// MUST be a valid VRChat /file/ url. #[serde(rename = "userIcon", skip_serializing_if = "Option::is_none")] pub user_icon: Option, @@ -44,6 +46,7 @@ impl UpdateUserRequest { status_description: None, bio: None, bio_links: None, + pronouns: None, user_icon: None, } } diff --git a/src/models/user.rs b/src/models/user.rs index 1e3d394..f19ac53 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -13,6 +13,9 @@ pub struct User { #[serde(rename = "allowAvatarCopying")] pub allow_avatar_copying: bool, + /// + #[serde(rename = "badges", skip_serializing_if = "Option::is_none")] + pub badges: Option>, #[serde(rename = "bio")] pub bio: String, #[serde(rename = "bioLinks")] @@ -23,6 +26,8 @@ pub struct User { /// When profilePicOverride is not empty, use it instead. #[serde(rename = "currentAvatarThumbnailImageUrl")] pub current_avatar_thumbnail_image_url: String, + #[serde(rename = "currentAvatarTags")] + pub current_avatar_tags: Vec, #[serde(rename = "date_joined")] pub date_joined: String, #[serde(rename = "developerType")] @@ -59,6 +64,8 @@ pub struct User { pub note: Option, #[serde(rename = "profilePicOverride")] pub profile_pic_override: String, + #[serde(rename = "pronouns")] + pub pronouns: String, #[serde(rename = "state")] pub state: crate::models::UserState, #[serde(rename = "status")] @@ -85,13 +92,15 @@ pub struct User { } impl User { - pub fn new(allow_avatar_copying: bool, bio: String, bio_links: Vec, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, date_joined: String, developer_type: crate::models::DeveloperType, display_name: String, friend_key: String, id: String, is_friend: bool, last_activity: String, last_login: String, last_platform: String, profile_pic_override: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, tags: Vec, user_icon: String) -> User { + pub fn new(allow_avatar_copying: bool, bio: String, bio_links: Vec, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, current_avatar_tags: Vec, date_joined: String, developer_type: crate::models::DeveloperType, display_name: String, friend_key: String, id: String, is_friend: bool, last_activity: String, last_login: String, last_platform: String, profile_pic_override: String, pronouns: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, tags: Vec, user_icon: String) -> User { User { allow_avatar_copying, + badges: None, bio, bio_links, current_avatar_image_url, current_avatar_thumbnail_image_url, + current_avatar_tags, date_joined, developer_type, display_name, @@ -106,6 +115,7 @@ impl User { location: None, note: None, profile_pic_override, + pronouns, state, status, status_description, diff --git a/src/models/world_publish_status.rs b/src/models/world_publish_status.rs index 346fa64..8b63c4a 100644 --- a/src/models/world_publish_status.rs +++ b/src/models/world_publish_status.rs @@ -11,14 +11,14 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct WorldPublishStatus { - #[serde(rename = "canPubilsh")] - pub can_pubilsh: bool, + #[serde(rename = "canPublish")] + pub can_publish: bool, } impl WorldPublishStatus { - pub fn new(can_pubilsh: bool) -> WorldPublishStatus { + pub fn new(can_publish: bool) -> WorldPublishStatus { WorldPublishStatus { - can_pubilsh, + can_publish, } } }