ts-twitch-api 0.2.1 → 0.2.2

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.cjs CHANGED
@@ -1355,6 +1355,44 @@ var TwitchApi = class {
1355
1355
  body,
1356
1356
  options
1357
1357
  }),
1358
+ /**
1359
+ * BETA Retrieves emotes available to the user across all channels.
1360
+ *
1361
+ * __Authorization:__
1362
+ *
1363
+ * * Requires a user access token that includes the **user:read:emotes** scope.
1364
+ * * Query parameter `user_id` must match the `user_id` in the user access token.
1365
+ *
1366
+ * __URL:__
1367
+ *
1368
+ * `GET https://api.twitch.tv/helix/chat/emotes/user`
1369
+ *
1370
+ * __Response Codes:__
1371
+ *
1372
+ * _200 OK_
1373
+ *
1374
+ * Successfully retrieved the emotes.
1375
+ *
1376
+ * _400 Bad Request_
1377
+ *
1378
+ * * The _user\_id_ query parameter is required.
1379
+ * * The ID in the _user\_id_ query parameter is not valid.
1380
+ *
1381
+ * _401 Unauthorized_
1382
+ *
1383
+ * * The ID in _user\_id_ must match the user ID in the user access token.
1384
+ * * The Authorization header is required and must contain a user access token.
1385
+ * * The user access token must include the **user:read:emotes** scope.
1386
+ * * The access token is not valid.
1387
+ * * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
1388
+ *
1389
+ * @see https://dev.twitch.tv/docs/api/reference#get-user-emotes
1390
+ */
1391
+ getUserEmotes: async (params, options = {}) => this.callApi({
1392
+ path: "/chat/emotes/user",
1393
+ params,
1394
+ options
1395
+ }),
1358
1396
  /**
1359
1397
  * Sends an announcement to the broadcaster’s chat room.
1360
1398
  *
@@ -1931,6 +1969,8 @@ var TwitchApi = class {
1931
1969
  /**
1932
1970
  * Gets an organization’s list of entitlements that have been granted to a game, a user, or both.
1933
1971
  *
1972
+ * **NOTE:** Entitlements returned in the response body data are not guaranteed to be sorted by any field returned by the API. To retrieve **CLAIMED** or **FULFILLED** entitlements, use the `fulfillment_status` query parameter to filter results. To retrieve entitlements for a specific game, use the `game_id` query parameter to filter results.
1973
+ *
1934
1974
  * The following table identifies the request parameters that you may specify based on the type of access token used.
1935
1975
  *
1936
1976
  * | Access token type | Parameter | Description |
@@ -2644,7 +2684,7 @@ var TwitchApi = class {
2644
2684
  *
2645
2685
  * __Authorization:__
2646
2686
  *
2647
- * If you use [webhooks to receive events](https://dev.twitch.tv/docs/eventsub/handling-webhook-events), the request must specify an app access token. The request will fail if you use a user access token.
2687
+ * If you use [Webhooks](https://dev.twitch.tv/docs/eventsub/handling-webhook-events) or [Conduits](https://dev.twitch.tv/docs/eventsub/handling-conduit-events) to receive events, the request must specify an app access token. The request will fail if you use a user access token.
2648
2688
  *
2649
2689
  * If you use [WebSockets to receive events](https://dev.twitch.tv/docs/eventsub/handling-websocket-events), the request must specify a user access token. The request will fail if you use an app access token. The token may include any scopes.
2650
2690
  *
@@ -3625,6 +3665,95 @@ var TwitchApi = class {
3625
3665
  params,
3626
3666
  options
3627
3667
  }),
3668
+ /**
3669
+ * BETA Gets a list of unban requests for a broadcaster’s channel.
3670
+ *
3671
+ * __Authorization:__
3672
+ *
3673
+ * * Requires a user access token that includes the **moderator:read:unban\_requests** or **moderator:manage:unban\_requests** scope.
3674
+ * * Query parameter `moderator_id` must match the `user_id` in the [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
3675
+ *
3676
+ * __URL:__
3677
+ *
3678
+ * `GET https://api.twitch.tv/helix/moderation/unban_requests`
3679
+ *
3680
+ * __Response Codes:__
3681
+ *
3682
+ * _200 OK_
3683
+ *
3684
+ * Successfully retrieved the list of unban requests.
3685
+ *
3686
+ * _400 Bad Request_
3687
+ *
3688
+ * * The _broadcaster\_id_ query parameter is required.
3689
+ * * The ID in the _broadcaster\_id_ query parameter is not valid.
3690
+ * * The _moderator\_id_ query parameter is required.
3691
+ * * The ID in the _moderator\_id_ query parameter is not valid.
3692
+ * * The pagination cursor is not valid.
3693
+ *
3694
+ * _401 Unauthorized_
3695
+ *
3696
+ * * The ID in _moderator\_id_ must match the user ID in the user access token.
3697
+ * * The Authorization header is required and must contain a user access token.
3698
+ * * The user access token must include the **moderator:read:unban\_requests** or **moderator:manage:unban\_requests** scope.
3699
+ * * The access token is not valid.
3700
+ * * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
3701
+ *
3702
+ * @see https://dev.twitch.tv/docs/api/reference#get-unban-requests
3703
+ */
3704
+ getUnbanRequests: async (params, options = {}) => this.callApi({
3705
+ path: "/moderation/unban_requests",
3706
+ params,
3707
+ options
3708
+ }),
3709
+ /**
3710
+ * BETA Resolves an unban request by approving or denying it.
3711
+ *
3712
+ * __Authorization:__
3713
+ *
3714
+ * * Requires a user access token that includes the **moderator:manage:unban\_requests** scope.
3715
+ * * Query parameter `moderator_id` must match the `user_id` in the [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
3716
+ *
3717
+ * __URL:__
3718
+ *
3719
+ * `PATCH https://api.twitch.tv/helix/moderation/unban_requests`
3720
+ *
3721
+ * __Response Codes:__
3722
+ *
3723
+ * _200 OK_
3724
+ *
3725
+ * Successfully resolved the unban request.
3726
+ *
3727
+ * _400 Bad Request_
3728
+ *
3729
+ * * The _broadcaster\_id_ query parameter is required.
3730
+ * * The ID in the _broadcaster\_id_ query parameter is not valid.
3731
+ * * The _moderator\_id_ query parameter is required.
3732
+ * * The ID in the _moderator\_id_ query parameter is not valid.
3733
+ * * The pagination cursor is not valid.
3734
+ * * The broadcaster is not receiving unban requests
3735
+ * * Invalid requested update
3736
+ *
3737
+ * _401 Unauthorized_
3738
+ *
3739
+ * * The ID in _moderator\_id_ must match the user ID in the user access token.
3740
+ * * The Authorization header is required and must contain a user access token.
3741
+ * * The user access token must include the **moderator:manage:unban\_requests** scope.
3742
+ * * The access token is not valid.
3743
+ * * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
3744
+ *
3745
+ * _404 Not Found_
3746
+ *
3747
+ * The unban request ID was not found.
3748
+ *
3749
+ * @see https://dev.twitch.tv/docs/api/reference#resolve-unban-requests
3750
+ */
3751
+ resolveUnbanRequests: async (params, options = {}) => this.callApi({
3752
+ path: "/moderation/unban_requests",
3753
+ method: "PATCH",
3754
+ params,
3755
+ options
3756
+ }),
3628
3757
  /**
3629
3758
  * Gets the broadcaster’s list of non-private, blocked words or phrases. These are the terms that the broadcaster or moderator added manually or that were denied by AutoMod.
3630
3759
  *
@@ -4235,7 +4364,7 @@ var TwitchApi = class {
4235
4364
  *
4236
4365
  * _200 OK_
4237
4366
  *
4238
- * Successfully retrieved the broadcaster’s polls.
4367
+ * Successfully retrieved the broadcaster's polls.
4239
4368
  *
4240
4369
  * _400 Bad Request_
4241
4370
  *