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.js CHANGED
@@ -1329,6 +1329,44 @@ var TwitchApi = class {
1329
1329
  body,
1330
1330
  options
1331
1331
  }),
1332
+ /**
1333
+ * BETA Retrieves emotes available to the user across all channels.
1334
+ *
1335
+ * __Authorization:__
1336
+ *
1337
+ * * Requires a user access token that includes the **user:read:emotes** scope.
1338
+ * * Query parameter `user_id` must match the `user_id` in the user access token.
1339
+ *
1340
+ * __URL:__
1341
+ *
1342
+ * `GET https://api.twitch.tv/helix/chat/emotes/user`
1343
+ *
1344
+ * __Response Codes:__
1345
+ *
1346
+ * _200 OK_
1347
+ *
1348
+ * Successfully retrieved the emotes.
1349
+ *
1350
+ * _400 Bad Request_
1351
+ *
1352
+ * * The _user\_id_ query parameter is required.
1353
+ * * The ID in the _user\_id_ query parameter is not valid.
1354
+ *
1355
+ * _401 Unauthorized_
1356
+ *
1357
+ * * The ID in _user\_id_ must match the user ID in the user access token.
1358
+ * * The Authorization header is required and must contain a user access token.
1359
+ * * The user access token must include the **user:read:emotes** scope.
1360
+ * * The access token is not valid.
1361
+ * * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
1362
+ *
1363
+ * @see https://dev.twitch.tv/docs/api/reference#get-user-emotes
1364
+ */
1365
+ getUserEmotes: async (params, options = {}) => this.callApi({
1366
+ path: "/chat/emotes/user",
1367
+ params,
1368
+ options
1369
+ }),
1332
1370
  /**
1333
1371
  * Sends an announcement to the broadcaster’s chat room.
1334
1372
  *
@@ -1905,6 +1943,8 @@ var TwitchApi = class {
1905
1943
  /**
1906
1944
  * Gets an organization’s list of entitlements that have been granted to a game, a user, or both.
1907
1945
  *
1946
+ * **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.
1947
+ *
1908
1948
  * The following table identifies the request parameters that you may specify based on the type of access token used.
1909
1949
  *
1910
1950
  * | Access token type | Parameter | Description |
@@ -2618,7 +2658,7 @@ var TwitchApi = class {
2618
2658
  *
2619
2659
  * __Authorization:__
2620
2660
  *
2621
- * 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.
2661
+ * 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.
2622
2662
  *
2623
2663
  * 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.
2624
2664
  *
@@ -3599,6 +3639,95 @@ var TwitchApi = class {
3599
3639
  params,
3600
3640
  options
3601
3641
  }),
3642
+ /**
3643
+ * BETA Gets a list of unban requests for a broadcaster’s channel.
3644
+ *
3645
+ * __Authorization:__
3646
+ *
3647
+ * * Requires a user access token that includes the **moderator:read:unban\_requests** or **moderator:manage:unban\_requests** scope.
3648
+ * * Query parameter `moderator_id` must match the `user_id` in the [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
3649
+ *
3650
+ * __URL:__
3651
+ *
3652
+ * `GET https://api.twitch.tv/helix/moderation/unban_requests`
3653
+ *
3654
+ * __Response Codes:__
3655
+ *
3656
+ * _200 OK_
3657
+ *
3658
+ * Successfully retrieved the list of unban requests.
3659
+ *
3660
+ * _400 Bad Request_
3661
+ *
3662
+ * * The _broadcaster\_id_ query parameter is required.
3663
+ * * The ID in the _broadcaster\_id_ query parameter is not valid.
3664
+ * * The _moderator\_id_ query parameter is required.
3665
+ * * The ID in the _moderator\_id_ query parameter is not valid.
3666
+ * * The pagination cursor is not valid.
3667
+ *
3668
+ * _401 Unauthorized_
3669
+ *
3670
+ * * The ID in _moderator\_id_ must match the user ID in the user access token.
3671
+ * * The Authorization header is required and must contain a user access token.
3672
+ * * The user access token must include the **moderator:read:unban\_requests** or **moderator:manage:unban\_requests** scope.
3673
+ * * The access token is not valid.
3674
+ * * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
3675
+ *
3676
+ * @see https://dev.twitch.tv/docs/api/reference#get-unban-requests
3677
+ */
3678
+ getUnbanRequests: async (params, options = {}) => this.callApi({
3679
+ path: "/moderation/unban_requests",
3680
+ params,
3681
+ options
3682
+ }),
3683
+ /**
3684
+ * BETA Resolves an unban request by approving or denying it.
3685
+ *
3686
+ * __Authorization:__
3687
+ *
3688
+ * * Requires a user access token that includes the **moderator:manage:unban\_requests** scope.
3689
+ * * Query parameter `moderator_id` must match the `user_id` in the [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
3690
+ *
3691
+ * __URL:__
3692
+ *
3693
+ * `PATCH https://api.twitch.tv/helix/moderation/unban_requests`
3694
+ *
3695
+ * __Response Codes:__
3696
+ *
3697
+ * _200 OK_
3698
+ *
3699
+ * Successfully resolved the unban request.
3700
+ *
3701
+ * _400 Bad Request_
3702
+ *
3703
+ * * The _broadcaster\_id_ query parameter is required.
3704
+ * * The ID in the _broadcaster\_id_ query parameter is not valid.
3705
+ * * The _moderator\_id_ query parameter is required.
3706
+ * * The ID in the _moderator\_id_ query parameter is not valid.
3707
+ * * The pagination cursor is not valid.
3708
+ * * The broadcaster is not receiving unban requests
3709
+ * * Invalid requested update
3710
+ *
3711
+ * _401 Unauthorized_
3712
+ *
3713
+ * * The ID in _moderator\_id_ must match the user ID in the user access token.
3714
+ * * The Authorization header is required and must contain a user access token.
3715
+ * * The user access token must include the **moderator:manage:unban\_requests** scope.
3716
+ * * The access token is not valid.
3717
+ * * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
3718
+ *
3719
+ * _404 Not Found_
3720
+ *
3721
+ * The unban request ID was not found.
3722
+ *
3723
+ * @see https://dev.twitch.tv/docs/api/reference#resolve-unban-requests
3724
+ */
3725
+ resolveUnbanRequests: async (params, options = {}) => this.callApi({
3726
+ path: "/moderation/unban_requests",
3727
+ method: "PATCH",
3728
+ params,
3729
+ options
3730
+ }),
3602
3731
  /**
3603
3732
  * 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.
3604
3733
  *
@@ -4209,7 +4338,7 @@ var TwitchApi = class {
4209
4338
  *
4210
4339
  * _200 OK_
4211
4340
  *
4212
- * Successfully retrieved the broadcaster’s polls.
4341
+ * Successfully retrieved the broadcaster's polls.
4213
4342
  *
4214
4343
  * _400 Bad Request_
4215
4344
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-twitch-api",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Very simple TwitchApi class and TypeScript interfaces for all Twitch API endpoints",
5
5
  "author": "DmitryScaletta",
6
6
  "license": "MIT",