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.js CHANGED
@@ -12,7 +12,7 @@ var Keyv__default = /*#__PURE__*/_interopDefault(Keyv);
12
12
 
13
13
  // package.json
14
14
  var displayName = "VRChat.js";
15
- var version = "2.22.8";
15
+ var version = "2.22.9-nightly.6";
16
16
  var homepage = "https://vrchat.community/javascript";
17
17
 
18
18
  // src/lib/metadata.ts
@@ -1015,10 +1015,6 @@ var getNotificationResponseTransformer = async (data) => {
1015
1015
  data = notificationSchemaResponseTransformer(data);
1016
1016
  return data;
1017
1017
  };
1018
- var deleteNotificationResponseTransformer = async (data) => {
1019
- data = notificationSchemaResponseTransformer(data);
1020
- return data;
1021
- };
1022
1018
  var markNotificationAsReadResponseTransformer = async (data) => {
1023
1019
  data = notificationSchemaResponseTransformer(data);
1024
1020
  return data;
@@ -1779,6 +1775,9 @@ var inviteUserWithPhotoResponseTransformer = async (data) => {
1779
1775
  return data;
1780
1776
  };
1781
1777
  var jamSchemaResponseTransformer = (data) => {
1778
+ if (data.created_at) {
1779
+ data.created_at = new Date(data.created_at);
1780
+ }
1782
1781
  if (data.stateChangeDates.closed) {
1783
1782
  data.stateChangeDates.closed = new Date(data.stateChangeDates.closed);
1784
1783
  }
@@ -2075,17 +2074,6 @@ var getUserNoteResponseTransformer = async (data) => {
2075
2074
  data = userNoteSchemaResponseTransformer(data);
2076
2075
  return data;
2077
2076
  };
2078
- var userSchemaResponseTransformer = (data) => {
2079
- if (data.badges) {
2080
- data.badges = data.badges.map((item) => badgeSchemaResponseTransformer(item));
2081
- }
2082
- data.date_joined = new Date(data.date_joined);
2083
- return data;
2084
- };
2085
- var getUserResponseTransformer = async (data) => {
2086
- data = userSchemaResponseTransformer(data);
2087
- return data;
2088
- };
2089
2077
  var updateUserResponseTransformer = async (data) => {
2090
2078
  data = currentUserSchemaResponseTransformer(data);
2091
2079
  return data;
@@ -2153,10 +2141,6 @@ var removeTagsResponseTransformer = async (data) => {
2153
2141
  data = currentUserSchemaResponseTransformer(data);
2154
2142
  return data;
2155
2143
  };
2156
- var getUserByNameResponseTransformer = async (data) => {
2157
- data = userSchemaResponseTransformer(data);
2158
- return data;
2159
- };
2160
2144
  var limitedWorldSchemaResponseTransformer = (data) => {
2161
2145
  data.created_at = new Date(data.created_at);
2162
2146
  data.unityPackages = data.unityPackages.map((item) => limitedUnityPackageSchemaResponseTransformer(item));
@@ -2265,8 +2249,6 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
2265
2249
  * Get Steam Transaction
2266
2250
  *
2267
2251
  * Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint.
2268
- *
2269
- * @deprecated
2270
2252
  */
2271
2253
  getSteamTransaction(options) {
2272
2254
  return (options.client ?? this.client).get({
@@ -2386,11 +2368,11 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
2386
2368
  /**
2387
2369
  * Register User Account
2388
2370
  *
2389
- * ~~Register a new user account.~~
2371
+ * Register a new user account.
2390
2372
  *
2391
- * **DEPRECATED:** Automated creation of accounts has no legitimate public third-party use case, and would be in violation of ToS §13.2:
2373
+ * Automated creation of accounts has no legitimate public third-party use case, and would violate ToS §13.2:
2392
2374
  * *By using the Platform, you agree not to: i. [...] use the Platform in a manner inconsistent with individual human usage*
2393
- * This endpoint is documented in the interest of completeness
2375
+ * This endpoint is documented in the interest of completeness.
2394
2376
  *
2395
2377
  * @deprecated
2396
2378
  */
@@ -2614,11 +2596,7 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
2614
2596
  * Delete a notification.
2615
2597
  */
2616
2598
  deleteNotification(options) {
2617
- return (options.client ?? this.client).put({
2618
- responseTransformer: deleteNotificationResponseTransformer,
2619
- url: "/auth/user/notifications/{notificationId}/hide",
2620
- ...options
2621
- });
2599
+ return (options.client ?? this.client).put({ url: "/auth/user/notifications/{notificationId}/hide", ...options });
2622
2600
  }
2623
2601
  /**
2624
2602
  * Mark Notification As Read
@@ -2867,8 +2845,6 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
2867
2845
  * Select Fallback Avatar
2868
2846
  *
2869
2847
  * Switches into that avatar as your fallback avatar.
2870
- *
2871
- * @deprecated
2872
2848
  */
2873
2849
  selectFallbackAvatar(options) {
2874
2850
  return (options.client ?? this.client).put({
@@ -2971,7 +2947,7 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
2971
2947
  /**
2972
2948
  * Get next calendar event
2973
2949
  *
2974
- * Get the closest future calendar event scheduled for a group
2950
+ * Return the closest future calendar event scheduled for a group. A group with no future scheduled events answers 404.
2975
2951
  */
2976
2952
  getGroupNextCalendarEvent(options) {
2977
2953
  return (options.client ?? this.client).get({
@@ -3076,7 +3052,7 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
3076
3052
  * Gets earnings totals and breakdown metrics for the currently authenticated user.
3077
3053
  */
3078
3054
  getEarningsMetrics(options) {
3079
- return (options.client ?? this.client).get({ url: "/economy/metrics/earnings", ...options });
3055
+ return (options?.client ?? this.client).get({ url: "/economy/metrics/earnings", ...options });
3080
3056
  }
3081
3057
  /**
3082
3058
  * Purchase Product Listing
@@ -3129,7 +3105,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
3129
3105
  /**
3130
3106
  * Get Seller Eligibility
3131
3107
  *
3132
- * Get the eligibility of the currently authenticated user to become a seller
3108
+ * Return the current user's eligibility to become a seller.
3109
+ *
3110
+ * @deprecated
3133
3111
  */
3134
3112
  getSellerEligibility(options) {
3135
3113
  return (options?.client ?? this.client).get({ url: "/economy/seller/eligibility", ...options });
@@ -3161,10 +3139,10 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
3161
3139
  /**
3162
3140
  * List Stores
3163
3141
  *
3164
- * Lists stores, optionally filtered to a seller and adjusted for management views.
3142
+ * List a seller's stores, adjusted for management views.
3165
3143
  */
3166
3144
  listStores(options) {
3167
- return (options?.client ?? this.client).get({
3145
+ return (options.client ?? this.client).get({
3168
3146
  responseTransformer: listStoresResponseTransformer,
3169
3147
  url: "/economy/stores",
3170
3148
  ...options
@@ -4038,9 +4016,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
4038
4016
  /**
4039
4017
  * Check API Health
4040
4018
  *
4041
- * ~~Gets the overall health status, the server name, and the current build version tag of the API.~~
4019
+ * Gets the overall health status, the server name, and the current build version tag of the API.
4042
4020
  *
4043
- * **DEPRECATED:** VRChat has suddenly restricted this endpoint for unknown reasons, and now always return 401 Unauthorized.
4021
+ * VRChat has restricted this endpoint, which now always returns 401 Unauthorized.
4044
4022
  *
4045
4023
  * @deprecated
4046
4024
  */
@@ -4731,6 +4709,14 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
4731
4709
  ...options
4732
4710
  });
4733
4711
  }
4712
+ /**
4713
+ * Get OAuth Redirect Code
4714
+ *
4715
+ * Generate a short-lived OAuth redirect code for the current session.
4716
+ */
4717
+ getOAuthRedirectCode(options) {
4718
+ return (options?.client ?? this.client).get({ url: "/oauth/redirectCode", ...options });
4719
+ }
4734
4720
  /**
4735
4721
  * Get Permission
4736
4722
  *
@@ -4946,7 +4932,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
4946
4932
  /**
4947
4933
  * Unpublish Prop
4948
4934
  *
4949
- * Unpublish a Prop and return the updated PropPublishStatus object.
4935
+ * Unpublish a prop and return the updated PropPublishStatus object. `/props/{propId}` is still served.
4936
+ *
4937
+ * @deprecated
4950
4938
  */
4951
4939
  unpublishProp(options) {
4952
4940
  return (options.client ?? this.client).delete({ url: "/props/{propId}/publish", ...options });
@@ -4954,7 +4942,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
4954
4942
  /**
4955
4943
  * Get Prop Publish Status
4956
4944
  *
4957
- * Returns a PropPublishStatus object.
4945
+ * Return the PropPublishStatus object. `/props/{propId}` is still served.
4946
+ *
4947
+ * @deprecated
4958
4948
  */
4959
4949
  getPropPublishStatus(options) {
4960
4950
  return (options.client ?? this.client).get({ url: "/props/{propId}/publish", ...options });
@@ -4962,7 +4952,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
4962
4952
  /**
4963
4953
  * Publish Prop
4964
4954
  *
4965
- * Publish a Prop and return the updated PropPublishStatus object.
4955
+ * Publish a prop and return the updated PropPublishStatus object. `/props/{propId}` is still served.
4956
+ *
4957
+ * @deprecated
4966
4958
  */
4967
4959
  publishProp(options) {
4968
4960
  return (options.client ?? this.client).put({ url: "/props/{propId}/publish", ...options });
@@ -5016,6 +5008,14 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5016
5008
  }
5017
5009
  });
5018
5010
  }
5011
+ /**
5012
+ * Get SSO Token
5013
+ *
5014
+ * Generate a token for the specified third-party service.
5015
+ */
5016
+ getSsoToken(options) {
5017
+ return (options.client ?? this.client).get({ url: "/sso/{provider}", ...options });
5018
+ }
5019
5019
  /**
5020
5020
  * List Subscriptions
5021
5021
  *
@@ -5027,7 +5027,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5027
5027
  /**
5028
5028
  * Get Tilia Status
5029
5029
  *
5030
- * Gets the status of Tilia integration
5030
+ * Return the Tilia integration status.
5031
+ *
5032
+ * @deprecated
5031
5033
  */
5032
5034
  getTiliaStatus(options) {
5033
5035
  return (options?.client ?? this.client).get({
@@ -5081,7 +5083,7 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5081
5083
  /**
5082
5084
  * Get Balance
5083
5085
  *
5084
- * Gets the balance of a user
5086
+ * Return the balance of a user.
5085
5087
  */
5086
5088
  getBalance(options) {
5087
5089
  return (options.client ?? this.client).get({ url: "/user/{userId}/balance", ...options });
@@ -5089,7 +5091,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5089
5091
  /**
5090
5092
  * Get Balance Earnings
5091
5093
  *
5092
- * Gets the balance of a user from earnings
5094
+ * Return the user's balance from earnings.
5095
+ *
5096
+ * @deprecated
5093
5097
  */
5094
5098
  getBalanceEarnings(options) {
5095
5099
  return (options.client ?? this.client).get({ url: "/user/{userId}/balance/earnings", ...options });
@@ -5225,7 +5229,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5225
5229
  /**
5226
5230
  * Get Tilia TOS Agreement Status
5227
5231
  *
5228
- * Gets the status of the agreement of a user to the Tilia TOS
5232
+ * Return the user's Tilia TOS agreement status.
5233
+ *
5234
+ * @deprecated
5229
5235
  */
5230
5236
  getTiliaTos(options) {
5231
5237
  return (options.client ?? this.client).get({ url: "/user/{userId}/tilia/tos", ...options });
@@ -5233,7 +5239,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5233
5239
  /**
5234
5240
  * Update Tilia TOS Agreement Status
5235
5241
  *
5236
- * Updates the status of the agreement of a user to the Tilia TOS
5242
+ * Update the user's Tilia TOS agreement status.
5243
+ *
5244
+ * @deprecated
5237
5245
  */
5238
5246
  updateTiliaTos(options) {
5239
5247
  return (options.client ?? this.client).put({
@@ -5299,11 +5307,7 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5299
5307
  * Get public user information about a specific user using their ID.
5300
5308
  */
5301
5309
  getUser(options) {
5302
- return (options.client ?? this.client).get({
5303
- responseTransformer: getUserResponseTransformer,
5304
- url: "/users/{userId}",
5305
- ...options
5306
- });
5310
+ return (options.client ?? this.client).get({ url: "/users/{userId}", ...options });
5307
5311
  }
5308
5312
  /**
5309
5313
  * Update User Info
@@ -5382,7 +5386,9 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5382
5386
  /**
5383
5387
  * Get User Credits Eligibility
5384
5388
  *
5385
- * Get the user's eligibility status for subscriptions based on available credits.
5389
+ * Return the user's subscription credit eligibility.
5390
+ *
5391
+ * @deprecated
5386
5392
  */
5387
5393
  getUserCreditsEligible(options) {
5388
5394
  return (options.client ?? this.client).get({ url: "/users/{userId}/credits/eligible", ...options });
@@ -5407,8 +5413,6 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5407
5413
  * Get User Feedback
5408
5414
  *
5409
5415
  * Get user's submitted feedback
5410
- *
5411
- * @deprecated
5412
5416
  */
5413
5417
  getUserFeedback(options) {
5414
5418
  return (options.client ?? this.client).get({ url: "/users/{userId}/feedback", ...options });
@@ -5588,19 +5592,15 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5588
5592
  /**
5589
5593
  * Get User by Username
5590
5594
  *
5591
- * ~~Get public user information about a specific user using their name.~~
5595
+ * Get public user information about a specific user using their name.
5592
5596
  *
5593
- * **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).
5594
- * This endpoint now require Admin Credentials.
5597
+ * VRChat no longer returns the usernames of other users, and this endpoint
5598
+ * now requires admin credentials. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).
5595
5599
  *
5596
5600
  * @deprecated
5597
5601
  */
5598
5602
  getUserByName(options) {
5599
- return (options.client ?? this.client).get({
5600
- responseTransformer: getUserByNameResponseTransformer,
5601
- url: "/users/{username}/name",
5602
- ...options
5603
- });
5603
+ return (options.client ?? this.client).get({ url: "/users/{username}/name", ...options });
5604
5604
  }
5605
5605
  /**
5606
5606
  * Current Online Users
@@ -5729,12 +5729,28 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5729
5729
  }
5730
5730
  });
5731
5731
  }
5732
+ /**
5733
+ * Remove World Tags
5734
+ *
5735
+ * Remove tags from the world's profile.
5736
+ *
5737
+ * The path is `deleteTags`, not `removeTags` as the user equivalent uses.
5738
+ */
5739
+ removeWorldTags(options) {
5740
+ return (options.client ?? this.client).post({
5741
+ responseTransformer: removeWorldTagsResponseTransformer,
5742
+ url: "/worlds/{worldId}/deleteTags",
5743
+ ...options,
5744
+ headers: {
5745
+ "Content-Type": "application/json",
5746
+ ...options.headers
5747
+ }
5748
+ });
5749
+ }
5732
5750
  /**
5733
5751
  * Get World Metadata
5734
5752
  *
5735
5753
  * Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object.
5736
- *
5737
- * @deprecated
5738
5754
  */
5739
5755
  getWorldMetadata(options) {
5740
5756
  return (options.client ?? this.client).get({ url: "/worlds/{worldId}/metadata", ...options });
@@ -5771,22 +5787,6 @@ var VRChatInternal = class _VRChatInternal extends HeyApiClient {
5771
5787
  publishWorld(options) {
5772
5788
  return (options.client ?? this.client).put({ url: "/worlds/{worldId}/publish", ...options });
5773
5789
  }
5774
- /**
5775
- * Remove World Tags
5776
- *
5777
- * Removes tags from the world's profile
5778
- */
5779
- removeWorldTags(options) {
5780
- return (options.client ?? this.client).post({
5781
- responseTransformer: removeWorldTagsResponseTransformer,
5782
- url: "/worlds/{worldId}/removeTags",
5783
- ...options,
5784
- headers: {
5785
- "Content-Type": "application/json",
5786
- ...options.headers
5787
- }
5788
- });
5789
- }
5790
5790
  /**
5791
5791
  * Get World Instance
5792
5792
  *