From 0003bf34fe4b91da072e4a62f55a540f8eae3ba8 Mon Sep 17 00:00:00 2001 From: VRCCat Date: Tue, 19 Sep 2023 20:05:18 +0000 Subject: [PATCH] Upgrade Rust SDK to spec 1.13.0 --- .openapi-generator/FILES | 2 + Cargo.toml | 2 +- docs/CurrentUser.md | 4 + docs/CurrentUserPresence.md | 23 +++ docs/LimitedUser.md | 2 +- docs/World.md | 1 + package-lock.json | 231 ++++++++++------------------ package.json | 2 +- src/models/current_user.rs | 12 ++ src/models/current_user_presence.rs | 68 ++++++++ src/models/limited_user.rs | 8 +- src/models/mod.rs | 2 + src/models/world.rs | 5 +- 13 files changed, 201 insertions(+), 161 deletions(-) create mode 100644 docs/CurrentUserPresence.md create mode 100644 src/models/current_user_presence.rs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index fd8f706..c12d03d 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -23,6 +23,7 @@ docs/CreateGroupRequest.md docs/CreateGroupRoleRequest.md docs/CreateWorldRequest.md docs/CurrentUser.md +docs/CurrentUserPresence.md docs/DeploymentGroup.md docs/DeveloperType.md docs/DynamicContentRow.md @@ -176,6 +177,7 @@ src/models/create_group_request.rs src/models/create_group_role_request.rs src/models/create_world_request.rs src/models/current_user.rs +src/models/current_user_presence.rs src/models/deployment_group.rs src/models/developer_type.rs src/models/dynamic_content_row.rs diff --git a/Cargo.toml b/Cargo.toml index 3d1407f..f1bc5ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vrchatapi" -version = "1.12.0" +version = "1.13.0" authors = ["vrchatapi.lpv0t@aries.fyi"] description = "VRChat API Client for Rust" license = "MIT" diff --git a/docs/CurrentUser.md b/docs/CurrentUser.md index 96fd8e3..b0994c7 100644 --- a/docs/CurrentUser.md +++ b/docs/CurrentUser.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **accepted_tos_version** | **i32** | | +**accepted_privacy_version** | Option<**i32**> | | [optional] **account_deletion_date** | Option<[**String**](string.md)> | | [optional] **account_deletion_log** | Option<[**Vec**](AccountDeletionLog.md)> | | [optional] **active_friends** | Option<**Vec**> | | [optional] @@ -30,6 +31,7 @@ Name | Type | Description | Notes **home_location** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that 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. | **is_friend** | **bool** | | [default to false] +**last_activity** | Option<**String**> | | [optional] **last_login** | **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** | | @@ -38,6 +40,7 @@ Name | Type | Description | Notes **offline_friends** | Option<**Vec**> | | [optional] **online_friends** | Option<**Vec**> | | [optional] **past_display_names** | [**Vec**](PastDisplayName.md) | | +**presence** | Option<[**crate::models::CurrentUserPresence**](CurrentUserPresence.md)> | | [optional] **profile_pic_override** | **String** | | **state** | [**crate::models::UserState**](UserState.md) | | **status** | [**crate::models::UserStatus**](UserStatus.md) | | @@ -50,6 +53,7 @@ Name | Type | Description | Notes **two_factor_auth_enabled** | **bool** | | **two_factor_auth_enabled_date** | Option<**String**> | | [optional] **unsubscribe** | **bool** | | +**updated_at** | Option<**String**> | | [optional] **user_icon** | **String** | | **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] diff --git a/docs/CurrentUserPresence.md b/docs/CurrentUserPresence.md new file mode 100644 index 0000000..ab871ce --- /dev/null +++ b/docs/CurrentUserPresence.md @@ -0,0 +1,23 @@ +# CurrentUserPresence + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avatar_thumbnail** | Option<**String**> | | [optional] +**display_name** | Option<**String**> | | [optional] +**groups** | Option<**Vec**> | | [optional] +**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] +**instance** | Option<**String**> | | [optional] +**instance_type** | Option<**String**> | either an InstanceType or an empty string | [optional] +**is_rejoining** | Option<**String**> | | [optional] +**platform** | Option<**String**> | either a Platform or an empty string | [optional] +**profile_pic_override** | Option<**String**> | | [optional] +**status** | Option<**String**> | either a UserStatus or empty string | [optional] +**traveling_to_instance** | Option<**String**> | | [optional] +**traveling_to_world** | Option<**String**> | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] +**world** | Option<**String**> | WorldID be \"offline\" on User profiles if you are not friends with that user. | [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/LimitedUser.md b/docs/LimitedUser.md index 5caac3e..0d68c2d 100644 --- a/docs/LimitedUser.md +++ b/docs/LimitedUser.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **current_avatar_thumbnail_image_url** | **String** | When profilePicOverride is not empty, use it instead. | **developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | | **display_name** | **String** | | -**fallback_avatar** | **String** | | +**fallback_avatar** | Option<**String**> | | [optional] **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. | **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`. | diff --git a/docs/World.md b/docs/World.md index 68a2f2f..ae7de72 100644 --- a/docs/World.md +++ b/docs/World.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **author_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. | **author_name** | **String** | | **capacity** | **i32** | | +**recommended_capacity** | **i32** | | **created_at** | **String** | | **description** | **String** | | **favorites** | Option<**i32**> | | [optional][default to 0] diff --git a/package-lock.json b/package-lock.json index 6cef49d..2db8dd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@openapitools/openapi-generator-cli": "^2.6.0" + "@openapitools/openapi-generator-cli": "^2.7.0" } }, "node_modules/@lukeed/csprng": { @@ -17,110 +17,19 @@ } }, "node_modules/@nestjs/axios": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.0.8.tgz", - "integrity": "sha512-oJyfR9/h9tVk776il0829xyj3b2e81yTu6HjPraxynwNtMNGqZBHHmAQL24yMB3tVbBM0RvG3eUXH8+pRCGwlg==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.1.0.tgz", + "integrity": "sha512-b2TT2X6BFbnNoeteiaxCIiHaFcSbVW+S5yygYqiIq5i6H77yIU3IVuLdpQkHq8/EqOWFwMopLN8jdkUT71Am9w==", "dependencies": { "axios": "0.27.2" }, "peerDependencies": { - "@nestjs/common": "^7.0.0 || ^8.0.0", + "@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0", "reflect-metadata": "^0.1.12", "rxjs": "^6.0.0 || ^7.0.0" } }, "node_modules/@nestjs/common": { - "version": "8.4.7", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.7.tgz", - "integrity": "sha512-m/YsbcBal+gA5CFrDpqXqsSfylo+DIQrkFY3qhVIltsYRfu8ct8J9pqsTO6OPf3mvqdOpFGrV5sBjoyAzOBvsw==", - "peer": true, - "dependencies": { - "axios": "0.27.2", - "iterare": "1.2.1", - "tslib": "2.4.0", - "uuid": "8.3.2" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nest" - }, - "peerDependencies": { - "cache-manager": "*", - "class-transformer": "*", - "class-validator": "*", - "reflect-metadata": "^0.1.12", - "rxjs": "^7.1.0" - }, - "peerDependenciesMeta": { - "cache-manager": { - "optional": true - }, - "class-transformer": { - "optional": true - }, - "class-validator": { - "optional": true - } - } - }, - "node_modules/@nestjs/common/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "peer": true - }, - "node_modules/@nuxtjs/opencollective": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", - "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", - "dependencies": { - "chalk": "^4.1.0", - "consola": "^2.15.0", - "node-fetch": "^2.6.1" - }, - "bin": { - "opencollective": "bin/opencollective.js" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "node_modules/@openapitools/openapi-generator-cli": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.6.0.tgz", - "integrity": "sha512-M/aOpR7G+Y1nMf+ofuar8pGszajgfhs1aSPSijkcr2tHTxKAI3sA3YYcOGbszxaNRKFyvOcDq+KP9pcJvKoCHg==", - "hasInstallScript": true, - "dependencies": { - "@nestjs/axios": "0.0.8", - "@nestjs/common": "9.3.11", - "@nestjs/core": "9.3.11", - "@nuxtjs/opencollective": "0.3.2", - "chalk": "4.1.2", - "commander": "8.3.0", - "compare-versions": "4.1.4", - "concurrently": "6.5.1", - "console.table": "0.10.0", - "fs-extra": "10.1.0", - "glob": "7.1.6", - "inquirer": "8.2.5", - "lodash": "4.17.21", - "reflect-metadata": "0.1.13", - "rxjs": "7.8.0", - "tslib": "2.0.3" - }, - "bin": { - "openapi-generator-cli": "main.js" - }, - "engines": { - "node": ">=10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/openapi_generator" - } - }, - "node_modules/@openapitools/openapi-generator-cli/node_modules/@nestjs/common": { "version": "9.3.11", "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.3.11.tgz", "integrity": "sha512-IFZ2G/5UKWC2Uo7tJ4SxGed2+aiA+sJyWeWsGTogKVDhq90oxVBToh+uCDeI31HNUpqYGoWmkletfty42zUd8A==", @@ -152,11 +61,62 @@ } } }, - "node_modules/@openapitools/openapi-generator-cli/node_modules/@nestjs/common/node_modules/tslib": { + "node_modules/@nestjs/common/node_modules/tslib": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" }, + "node_modules/@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.7.0.tgz", + "integrity": "sha512-ieEpHTA/KsDz7ANw03lLPYyjdedDEXYEyYoGBRWdduqXWSX65CJtttjqa8ZaB1mNmIjMtchUHwAYQmTLVQ8HYg==", + "hasInstallScript": true, + "dependencies": { + "@nestjs/axios": "0.1.0", + "@nestjs/common": "9.3.11", + "@nestjs/core": "9.3.11", + "@nuxtjs/opencollective": "0.3.2", + "chalk": "4.1.2", + "commander": "8.3.0", + "compare-versions": "4.1.4", + "concurrently": "6.5.1", + "console.table": "0.10.0", + "fs-extra": "10.1.0", + "glob": "7.1.6", + "inquirer": "8.2.5", + "lodash": "4.17.21", + "reflect-metadata": "0.1.13", + "rxjs": "7.8.0", + "tslib": "2.0.3" + }, + "bin": { + "openapi-generator-cli": "main.js" + }, + "engines": { + "node": ">=10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/openapi_generator" + } + }, "node_modules/@openapitools/openapi-generator-cli/node_modules/@nestjs/core": { "version": "9.3.11", "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.3.11.tgz", @@ -585,9 +545,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "funding": [ { "type": "individual", @@ -1141,15 +1101,6 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "peer": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -1234,30 +1185,27 @@ "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==" }, "@nestjs/axios": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.0.8.tgz", - "integrity": "sha512-oJyfR9/h9tVk776il0829xyj3b2e81yTu6HjPraxynwNtMNGqZBHHmAQL24yMB3tVbBM0RvG3eUXH8+pRCGwlg==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.1.0.tgz", + "integrity": "sha512-b2TT2X6BFbnNoeteiaxCIiHaFcSbVW+S5yygYqiIq5i6H77yIU3IVuLdpQkHq8/EqOWFwMopLN8jdkUT71Am9w==", "requires": { "axios": "0.27.2" } }, "@nestjs/common": { - "version": "8.4.7", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.7.tgz", - "integrity": "sha512-m/YsbcBal+gA5CFrDpqXqsSfylo+DIQrkFY3qhVIltsYRfu8ct8J9pqsTO6OPf3mvqdOpFGrV5sBjoyAzOBvsw==", - "peer": true, + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.3.11.tgz", + "integrity": "sha512-IFZ2G/5UKWC2Uo7tJ4SxGed2+aiA+sJyWeWsGTogKVDhq90oxVBToh+uCDeI31HNUpqYGoWmkletfty42zUd8A==", "requires": { - "axios": "0.27.2", "iterare": "1.2.1", - "tslib": "2.4.0", - "uuid": "8.3.2" + "tslib": "2.5.0", + "uid": "2.0.1" }, "dependencies": { "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "peer": true + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" } } }, @@ -1272,11 +1220,11 @@ } }, "@openapitools/openapi-generator-cli": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.6.0.tgz", - "integrity": "sha512-M/aOpR7G+Y1nMf+ofuar8pGszajgfhs1aSPSijkcr2tHTxKAI3sA3YYcOGbszxaNRKFyvOcDq+KP9pcJvKoCHg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.7.0.tgz", + "integrity": "sha512-ieEpHTA/KsDz7ANw03lLPYyjdedDEXYEyYoGBRWdduqXWSX65CJtttjqa8ZaB1mNmIjMtchUHwAYQmTLVQ8HYg==", "requires": { - "@nestjs/axios": "0.0.8", + "@nestjs/axios": "0.1.0", "@nestjs/common": "9.3.11", "@nestjs/core": "9.3.11", "@nuxtjs/opencollective": "0.3.2", @@ -1294,23 +1242,6 @@ "tslib": "2.0.3" }, "dependencies": { - "@nestjs/common": { - "version": "9.3.11", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.3.11.tgz", - "integrity": "sha512-IFZ2G/5UKWC2Uo7tJ4SxGed2+aiA+sJyWeWsGTogKVDhq90oxVBToh+uCDeI31HNUpqYGoWmkletfty42zUd8A==", - "requires": { - "iterare": "1.2.1", - "tslib": "2.5.0", - "uid": "2.0.1" - }, - "dependencies": { - "tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" - } - } - }, "@nestjs/core": { "version": "9.3.11", "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.3.11.tgz", @@ -1605,9 +1536,9 @@ } }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==" }, "form-data": { "version": "4.0.0", @@ -1994,12 +1925,6 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "peer": true - }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", diff --git a/package.json b/package.json index aec4413..612d441 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "@openapitools/openapi-generator-cli": "^2.6.0" + "@openapitools/openapi-generator-cli": "^2.7.0" } } diff --git a/src/models/current_user.rs b/src/models/current_user.rs index a657d4d..7b042b0 100644 --- a/src/models/current_user.rs +++ b/src/models/current_user.rs @@ -13,6 +13,8 @@ pub struct CurrentUser { #[serde(rename = "acceptedTOSVersion")] pub accepted_tos_version: i32, + #[serde(rename = "acceptedPrivacyVersion", skip_serializing_if = "Option::is_none")] + pub accepted_privacy_version: Option, #[serde(rename = "accountDeletionDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub account_deletion_date: Option>, /// @@ -71,6 +73,8 @@ pub struct CurrentUser { pub id: String, #[serde(rename = "isFriend")] pub is_friend: bool, + #[serde(rename = "last_activity", skip_serializing_if = "Option::is_none")] + pub last_activity: Option, #[serde(rename = "last_login")] pub last_login: 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`. @@ -89,6 +93,8 @@ pub struct CurrentUser { /// #[serde(rename = "pastDisplayNames")] pub past_display_names: Vec, + #[serde(rename = "presence", skip_serializing_if = "Option::is_none")] + pub presence: Option>, #[serde(rename = "profilePicOverride")] pub profile_pic_override: String, #[serde(rename = "state")] @@ -113,6 +119,8 @@ pub struct CurrentUser { pub two_factor_auth_enabled_date: Option>, #[serde(rename = "unsubscribe")] pub unsubscribe: bool, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, #[serde(rename = "userIcon")] pub user_icon: 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). @@ -124,6 +132,7 @@ 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 { CurrentUser { accepted_tos_version, + accepted_privacy_version: None, account_deletion_date: None, account_deletion_log: None, active_friends: None, @@ -149,6 +158,7 @@ impl CurrentUser { home_location, id, is_friend, + last_activity: None, last_login, last_platform, obfuscated_email, @@ -157,6 +167,7 @@ impl CurrentUser { offline_friends: None, online_friends: None, past_display_names, + presence: None, profile_pic_override, state, status, @@ -169,6 +180,7 @@ impl CurrentUser { two_factor_auth_enabled, two_factor_auth_enabled_date: None, unsubscribe, + updated_at: None, user_icon, username: None, } diff --git a/src/models/current_user_presence.rs b/src/models/current_user_presence.rs new file mode 100644 index 0000000..e93c8c7 --- /dev/null +++ b/src/models/current_user_presence.rs @@ -0,0 +1,68 @@ +/* + * VRChat API Documentation + * + * + * Contact: vrchatapi.lpv0t@aries.fyi + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct CurrentUserPresence { + #[serde(rename = "avatarThumbnail", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub avatar_thumbnail: Option>, + #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")] + pub display_name: Option, + #[serde(rename = "groups", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub groups: 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 = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "instance", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub instance: Option>, + /// either an InstanceType or an empty string + #[serde(rename = "instanceType", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub instance_type: Option>, + #[serde(rename = "isRejoining", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub is_rejoining: Option>, + /// either a Platform or an empty string + #[serde(rename = "platform", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub platform: Option>, + #[serde(rename = "profilePicOverride", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub profile_pic_override: Option>, + /// either a UserStatus or empty string + #[serde(rename = "status", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub status: Option>, + #[serde(rename = "travelingToInstance", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub traveling_to_instance: Option>, + /// WorldID be \"offline\" on User profiles if you are not friends with that user. + #[serde(rename = "travelingToWorld", skip_serializing_if = "Option::is_none")] + pub traveling_to_world: Option, + /// WorldID be \"offline\" on User profiles if you are not friends with that user. + #[serde(rename = "world", skip_serializing_if = "Option::is_none")] + pub world: Option, +} + +impl CurrentUserPresence { + pub fn new() -> CurrentUserPresence { + CurrentUserPresence { + avatar_thumbnail: None, + display_name: None, + groups: None, + id: None, + instance: None, + instance_type: None, + is_rejoining: None, + platform: None, + profile_pic_override: None, + status: None, + traveling_to_instance: None, + traveling_to_world: None, + world: None, + } + } +} + + diff --git a/src/models/limited_user.rs b/src/models/limited_user.rs index 5713c12..bcb998a 100644 --- a/src/models/limited_user.rs +++ b/src/models/limited_user.rs @@ -24,8 +24,8 @@ pub struct LimitedUser { pub developer_type: crate::models::DeveloperType, #[serde(rename = "displayName")] pub display_name: String, - #[serde(rename = "fallbackAvatar")] - pub fallback_avatar: String, + #[serde(rename = "fallbackAvatar", skip_serializing_if = "Option::is_none")] + pub fallback_avatar: 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 = "id")] pub id: String, @@ -56,14 +56,14 @@ pub struct LimitedUser { impl LimitedUser { /// - pub fn new(current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, developer_type: crate::models::DeveloperType, display_name: String, fallback_avatar: String, id: String, is_friend: bool, last_platform: String, profile_pic_override: String, status: crate::models::UserStatus, status_description: String, tags: Vec, user_icon: String) -> LimitedUser { + pub fn new(current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, developer_type: crate::models::DeveloperType, display_name: String, id: String, is_friend: bool, last_platform: String, profile_pic_override: String, status: crate::models::UserStatus, status_description: String, tags: Vec, user_icon: String) -> LimitedUser { LimitedUser { bio: None, current_avatar_image_url, current_avatar_thumbnail_image_url, developer_type, display_name, - fallback_avatar, + fallback_avatar: None, id, is_friend, last_platform, diff --git a/src/models/mod.rs b/src/models/mod.rs index 44c274a..1a36e83 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -40,6 +40,8 @@ pub mod create_world_request; pub use self::create_world_request::CreateWorldRequest; pub mod current_user; pub use self::current_user::CurrentUser; +pub mod current_user_presence; +pub use self::current_user_presence::CurrentUserPresence; pub mod deployment_group; pub use self::deployment_group::DeploymentGroup; pub mod developer_type; diff --git a/src/models/world.rs b/src/models/world.rs index 0f53fe3..0a0cbf3 100644 --- a/src/models/world.rs +++ b/src/models/world.rs @@ -19,6 +19,8 @@ pub struct World { pub author_name: String, #[serde(rename = "capacity")] pub capacity: i32, + #[serde(rename = "recommendedCapacity")] + pub recommended_capacity: i32, #[serde(rename = "created_at")] pub created_at: String, #[serde(rename = "description")] @@ -80,11 +82,12 @@ pub struct World { impl World { /// - pub fn new(author_id: String, author_name: String, capacity: i32, created_at: String, description: String, featured: bool, heat: i32, id: String, image_url: String, labs_publication_date: String, name: String, namespace: String, organization: String, popularity: i32, publication_date: String, release_status: crate::models::ReleaseStatus, tags: Vec, thumbnail_image_url: String, unity_packages: Vec, updated_at: String, version: i32, visits: i32) -> World { + pub fn new(author_id: String, author_name: String, capacity: i32, recommended_capacity: i32, created_at: String, description: String, featured: bool, heat: i32, id: String, image_url: String, labs_publication_date: String, name: String, namespace: String, organization: String, popularity: i32, publication_date: String, release_status: crate::models::ReleaseStatus, tags: Vec, thumbnail_image_url: String, unity_packages: Vec, updated_at: String, version: i32, visits: i32) -> World { World { author_id, author_name, capacity, + recommended_capacity, created_at, description, favorites: None,