vrchat 2.22.8 → 2.22.9-nightly.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import { TOTP } from 'totp-generator';
6
6
 
7
7
  // package.json
8
8
  var displayName = "VRChat.js";
9
- var version = "2.22.8";
9
+ var version = "2.22.9-nightly.6";
10
10
  var homepage = "https://vrchat.community/javascript";
11
11
 
12
12
  // src/lib/metadata.ts
@@ -1009,10 +1009,6 @@ var getNotificationResponseTransformer = async (data) => {
1009
1009
  data = notificationSchemaResponseTransformer(data);
1010
1010
  return data;
1011
1011
  };
1012
- var deleteNotificationResponseTransformer = async (data) => {
1013
- data = notificationSchemaResponseTransformer(data);
1014
- return data;
1015
- };
1016
1012
  var markNotificationAsReadResponseTransformer = async (data) => {
1017
1013
  data = notificationSchemaResponseTransformer(data);
1018
1014
  return data;
@@ -1773,6 +1769,9 @@ var inviteUserWithPhotoResponseTransformer = async (data) => {
1773
1769
  return data;
1774
1770
  };
1775
1771
  var jamSchemaResponseTransformer = (data) => {
1772
+ if (data.created_at) {
1773
+ data.created_at = new Date(data.created_at);
1774
+ }
1776
1775
  if (data.stateChangeDates.closed) {
1777
1776
  data.stateChangeDates.closed = new Date(data.stateChangeDates.closed);
1778
1777
  }
@@ -2069,17 +2068,6 @@ var getUserNoteResponseTransformer = async (data) => {
2069
2068
  data = userNoteSchemaResponseTransformer(data);
2070
2069
  return data;
2071
2070
  };
2072
- var userSchemaResponseTransformer = (data) => {
2073
- if (data.badges) {
2074
- data.badges = data.badges.map((item) => badgeSchemaResponseTransformer(item));
2075
- }
2076
- data.date_joined = new Date(data.date_joined);
2077
- return data;
2078
- };
2079
- var getUserResponseTransformer = async (data) => {
2080
- data = userSchemaResponseTransformer(data);
2081
- return data;
2082
- };
2083
2071
  var updateUserResponseTransformer = async (data) => {
2084
2072
  data = currentUserSchemaResponseTransformer(data);
2085
2073
  return data;
@@ -2147,10 +2135,6 @@ var removeTagsResponseTransformer = async (data) => {
2147
2135
  data = currentUserSchemaResponseTransformer(data);
2148
2136
  return data;
2149
2137
  };
2150
- var getUserByNameResponseTransformer = async (data) => {
2151
- data = userSchemaResponseTransformer(data);
2152
- return data;
2153
- };
2154
2138
  var limitedWorldSchemaResponseTransformer = (data) => {
2155
2139
  data.created_at = new Date(data.created_at);
2156
2140
  data.unityPackages = data.unityPackages.map((item) => limitedUnityPackageSchemaResponseTransformer(item));
@@ -2259,8 +2243,6 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
2259
2243
  * Get Steam Transaction
2260
2244
  *
2261
2245
  * Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint.
2262
- *
2263
- * @deprecated
2264
2246
  */
2265
2247
  getSteamTransaction(options) {
2266
2248
  return (options.client ?? this.client).get({
@@ -2380,11 +2362,11 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
2380
2362
  /**
2381
2363
  * Register User Account
2382
2364
  *
2383
- * ~~Register a new user account.~~
2365
+ * Register a new user account.
2384
2366
  *
2385
- * **DEPRECATED:** Automated creation of accounts has no legitimate public third-party use case, and would be in violation of ToS §13.2:
2367
+ * Automated creation of accounts has no legitimate public third-party use case, and would violate ToS §13.2:
2386
2368
  * *By using the Platform, you agree not to: i. [...] use the Platform in a manner inconsistent with individual human usage*
2387
- * This endpoint is documented in the interest of completeness
2369
+ * This endpoint is documented in the interest of completeness.
2388
2370
  *
2389
2371
  * @deprecated
2390
2372
  */
@@ -2608,11 +2590,7 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
2608
2590
  * Delete a notification.
2609
2591
  */
2610
2592
  deleteNotification(options) {
2611
- return (options.client ?? this.client).put({
2612
- responseTransformer: deleteNotificationResponseTransformer,
2613
- url: "/auth/user/notifications/{notificationId}/hide",
2614
- ...options
2615
- });
2593
+ return (options.client ?? this.client).put({ url: "/auth/user/notifications/{notificationId}/hide", ...options });
2616
2594
  }
2617
2595
  /**
2618
2596
  * Mark Notification As Read
@@ -2861,8 +2839,6 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
2861
2839
  * Select Fallback Avatar
2862
2840
  *
2863
2841
  * Switches into that avatar as your fallback avatar.
2864
- *
2865
- * @deprecated
2866
2842
  */
2867
2843
  selectFallbackAvatar(options) {
2868
2844
  return (options.client ?? this.client).put({
@@ -2965,7 +2941,7 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
2965
2941
  /**
2966
2942
  * Get next calendar event
2967
2943
  *
2968
- * Get the closest future calendar event scheduled for a group
2944
+ * Return the closest future calendar event scheduled for a group. A group with no future scheduled events answers 404.
2969
2945
  */
2970
2946
  getGroupNextCalendarEvent(options) {
2971
2947
  return (options.client ?? this.client).get({
@@ -3070,7 +3046,7 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
3070
3046
  * Gets earnings totals and breakdown metrics for the currently authenticated user.
3071
3047
  */
3072
3048
  getEarningsMetrics(options) {
3073
- return (options.client ?? this.client).get({ url: "/economy/metrics/earnings", ...options });
3049
+ return (options?.client ?? this.client).get({ url: "/economy/metrics/earnings", ...options });
3074
3050
  }
3075
3051
  /**
3076
3052
  * Purchase Product Listing
@@ -3123,7 +3099,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
3123
3099
  /**
3124
3100
  * Get Seller Eligibility
3125
3101
  *
3126
- * Get the eligibility of the currently authenticated user to become a seller
3102
+ * Return the current user's eligibility to become a seller.
3103
+ *
3104
+ * @deprecated
3127
3105
  */
3128
3106
  getSellerEligibility(options) {
3129
3107
  return (options?.client ?? this.client).get({ url: "/economy/seller/eligibility", ...options });
@@ -3155,10 +3133,10 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
3155
3133
  /**
3156
3134
  * List Stores
3157
3135
  *
3158
- * Lists stores, optionally filtered to a seller and adjusted for management views.
3136
+ * List a seller's stores, adjusted for management views.
3159
3137
  */
3160
3138
  listStores(options) {
3161
- return (options?.client ?? this.client).get({
3139
+ return (options.client ?? this.client).get({
3162
3140
  responseTransformer: listStoresResponseTransformer,
3163
3141
  url: "/economy/stores",
3164
3142
  ...options
@@ -4032,9 +4010,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
4032
4010
  /**
4033
4011
  * Check API Health
4034
4012
  *
4035
- * ~~Gets the overall health status, the server name, and the current build version tag of the API.~~
4013
+ * Gets the overall health status, the server name, and the current build version tag of the API.
4036
4014
  *
4037
- * **DEPRECATED:** VRChat has suddenly restricted this endpoint for unknown reasons, and now always return 401 Unauthorized.
4015
+ * VRChat has restricted this endpoint, which now always returns 401 Unauthorized.
4038
4016
  *
4039
4017
  * @deprecated
4040
4018
  */
@@ -4725,6 +4703,14 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
4725
4703
  ...options
4726
4704
  });
4727
4705
  }
4706
+ /**
4707
+ * Get OAuth Redirect Code
4708
+ *
4709
+ * Generate a short-lived OAuth redirect code for the current session.
4710
+ */
4711
+ getOAuthRedirectCode(options) {
4712
+ return (options?.client ?? this.client).get({ url: "/oauth/redirectCode", ...options });
4713
+ }
4728
4714
  /**
4729
4715
  * Get Permission
4730
4716
  *
@@ -4940,7 +4926,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
4940
4926
  /**
4941
4927
  * Unpublish Prop
4942
4928
  *
4943
- * Unpublish a Prop and return the updated PropPublishStatus object.
4929
+ * Unpublish a prop and return the updated PropPublishStatus object. `/props/{propId}` is still served.
4930
+ *
4931
+ * @deprecated
4944
4932
  */
4945
4933
  unpublishProp(options) {
4946
4934
  return (options.client ?? this.client).delete({ url: "/props/{propId}/publish", ...options });
@@ -4948,7 +4936,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
4948
4936
  /**
4949
4937
  * Get Prop Publish Status
4950
4938
  *
4951
- * Returns a PropPublishStatus object.
4939
+ * Return the PropPublishStatus object. `/props/{propId}` is still served.
4940
+ *
4941
+ * @deprecated
4952
4942
  */
4953
4943
  getPropPublishStatus(options) {
4954
4944
  return (options.client ?? this.client).get({ url: "/props/{propId}/publish", ...options });
@@ -4956,7 +4946,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
4956
4946
  /**
4957
4947
  * Publish Prop
4958
4948
  *
4959
- * Publish a Prop and return the updated PropPublishStatus object.
4949
+ * Publish a prop and return the updated PropPublishStatus object. `/props/{propId}` is still served.
4950
+ *
4951
+ * @deprecated
4960
4952
  */
4961
4953
  publishProp(options) {
4962
4954
  return (options.client ?? this.client).put({ url: "/props/{propId}/publish", ...options });
@@ -5010,6 +5002,14 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5010
5002
  }
5011
5003
  });
5012
5004
  }
5005
+ /**
5006
+ * Get SSO Token
5007
+ *
5008
+ * Generate a token for the specified third-party service.
5009
+ */
5010
+ getSsoToken(options) {
5011
+ return (options.client ?? this.client).get({ url: "/sso/{provider}", ...options });
5012
+ }
5013
5013
  /**
5014
5014
  * List Subscriptions
5015
5015
  *
@@ -5021,7 +5021,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5021
5021
  /**
5022
5022
  * Get Tilia Status
5023
5023
  *
5024
- * Gets the status of Tilia integration
5024
+ * Return the Tilia integration status.
5025
+ *
5026
+ * @deprecated
5025
5027
  */
5026
5028
  getTiliaStatus(options) {
5027
5029
  return (options?.client ?? this.client).get({
@@ -5075,7 +5077,7 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5075
5077
  /**
5076
5078
  * Get Balance
5077
5079
  *
5078
- * Gets the balance of a user
5080
+ * Return the balance of a user.
5079
5081
  */
5080
5082
  getBalance(options) {
5081
5083
  return (options.client ?? this.client).get({ url: "/user/{userId}/balance", ...options });
@@ -5083,7 +5085,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5083
5085
  /**
5084
5086
  * Get Balance Earnings
5085
5087
  *
5086
- * Gets the balance of a user from earnings
5088
+ * Return the user's balance from earnings.
5089
+ *
5090
+ * @deprecated
5087
5091
  */
5088
5092
  getBalanceEarnings(options) {
5089
5093
  return (options.client ?? this.client).get({ url: "/user/{userId}/balance/earnings", ...options });
@@ -5219,7 +5223,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5219
5223
  /**
5220
5224
  * Get Tilia TOS Agreement Status
5221
5225
  *
5222
- * Gets the status of the agreement of a user to the Tilia TOS
5226
+ * Return the user's Tilia TOS agreement status.
5227
+ *
5228
+ * @deprecated
5223
5229
  */
5224
5230
  getTiliaTos(options) {
5225
5231
  return (options.client ?? this.client).get({ url: "/user/{userId}/tilia/tos", ...options });
@@ -5227,7 +5233,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5227
5233
  /**
5228
5234
  * Update Tilia TOS Agreement Status
5229
5235
  *
5230
- * Updates the status of the agreement of a user to the Tilia TOS
5236
+ * Update the user's Tilia TOS agreement status.
5237
+ *
5238
+ * @deprecated
5231
5239
  */
5232
5240
  updateTiliaTos(options) {
5233
5241
  return (options.client ?? this.client).put({
@@ -5293,11 +5301,7 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5293
5301
  * Get public user information about a specific user using their ID.
5294
5302
  */
5295
5303
  getUser(options) {
5296
- return (options.client ?? this.client).get({
5297
- responseTransformer: getUserResponseTransformer,
5298
- url: "/users/{userId}",
5299
- ...options
5300
- });
5304
+ return (options.client ?? this.client).get({ url: "/users/{userId}", ...options });
5301
5305
  }
5302
5306
  /**
5303
5307
  * Update User Info
@@ -5376,7 +5380,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5376
5380
  /**
5377
5381
  * Get User Credits Eligibility
5378
5382
  *
5379
- * Get the user's eligibility status for subscriptions based on available credits.
5383
+ * Return the user's subscription credit eligibility.
5384
+ *
5385
+ * @deprecated
5380
5386
  */
5381
5387
  getUserCreditsEligible(options) {
5382
5388
  return (options.client ?? this.client).get({ url: "/users/{userId}/credits/eligible", ...options });
@@ -5401,8 +5407,6 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5401
5407
  * Get User Feedback
5402
5408
  *
5403
5409
  * Get user's submitted feedback
5404
- *
5405
- * @deprecated
5406
5410
  */
5407
5411
  getUserFeedback(options) {
5408
5412
  return (options.client ?? this.client).get({ url: "/users/{userId}/feedback", ...options });
@@ -5582,19 +5586,15 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5582
5586
  /**
5583
5587
  * Get User by Username
5584
5588
  *
5585
- * ~~Get public user information about a specific user using their name.~~
5589
+ * Get public user information about a specific user using their name.
5586
5590
  *
5587
- * **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).
5588
- * This endpoint now require Admin Credentials.
5591
+ * VRChat no longer returns the usernames of other users, and this endpoint
5592
+ * now requires admin credentials. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).
5589
5593
  *
5590
5594
  * @deprecated
5591
5595
  */
5592
5596
  getUserByName(options) {
5593
- return (options.client ?? this.client).get({
5594
- responseTransformer: getUserByNameResponseTransformer,
5595
- url: "/users/{username}/name",
5596
- ...options
5597
- });
5597
+ return (options.client ?? this.client).get({ url: "/users/{username}/name", ...options });
5598
5598
  }
5599
5599
  /**
5600
5600
  * Current Online Users
@@ -5723,12 +5723,28 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5723
5723
  }
5724
5724
  });
5725
5725
  }
5726
+ /**
5727
+ * Remove World Tags
5728
+ *
5729
+ * Remove tags from the world's profile.
5730
+ *
5731
+ * The path is `deleteTags`, not `removeTags` as the user equivalent uses.
5732
+ */
5733
+ removeWorldTags(options) {
5734
+ return (options.client ?? this.client).post({
5735
+ responseTransformer: removeWorldTagsResponseTransformer,
5736
+ url: "/worlds/{worldId}/deleteTags",
5737
+ ...options,
5738
+ headers: {
5739
+ "Content-Type": "application/json",
5740
+ ...options.headers
5741
+ }
5742
+ });
5743
+ }
5726
5744
  /**
5727
5745
  * Get World Metadata
5728
5746
  *
5729
5747
  * Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object.
5730
- *
5731
- * @deprecated
5732
5748
  */
5733
5749
  getWorldMetadata(options) {
5734
5750
  return (options.client ?? this.client).get({ url: "/worlds/{worldId}/metadata", ...options });
@@ -5765,22 +5781,6 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5765
5781
  publishWorld(options) {
5766
5782
  return (options.client ?? this.client).put({ url: "/worlds/{worldId}/publish", ...options });
5767
5783
  }
5768
- /**
5769
- * Remove World Tags
5770
- *
5771
- * Removes tags from the world's profile
5772
- */
5773
- removeWorldTags(options) {
5774
- return (options.client ?? this.client).post({
5775
- responseTransformer: removeWorldTagsResponseTransformer,
5776
- url: "/worlds/{worldId}/removeTags",
5777
- ...options,
5778
- headers: {
5779
- "Content-Type": "application/json",
5780
- ...options.headers
5781
- }
5782
- });
5783
- }
5784
5784
  /**
5785
5785
  * Get World Instance
5786
5786
  *