ts-twitch-api 0.2.5 → 0.2.7

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
@@ -1545,6 +1545,11 @@ var TwitchApi = class {
1545
1545
  /**
1546
1546
  * NEW Sends a message to the broadcaster’s chat room.
1547
1547
  *
1548
+ * **NOTE:** When sending messages to a Shared Chat session, behaviors differ depending on your authentication token type:
1549
+ *
1550
+ * * When using an _App Access Token_, messages will only be sent to the source channel (defined by the `broadcaster_id` parameter) by default starting on May 19, 2025\. Messages can be sent to all channels by using the `for_source_only` parameter and setting it to `false`.
1551
+ * * When using a _User Access Token_, messages will be sent to all channels in the shared chat session, including the source channel. This behavior cannot be changed with this token type.
1552
+ *
1548
1553
  * __Authorization:__
1549
1554
  *
1550
1555
  * Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens) or [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the `user:write:chat` scope. If app access token used, then additionally requires `user:bot` scope from chatting user, and either `channel:bot` scope from broadcaster or moderator status.
@@ -1567,6 +1572,7 @@ var TwitchApi = class {
1567
1572
  * * The ID in the _sender\_id_ query parameter is not valid.
1568
1573
  * * The _text_ query parameter is required.
1569
1574
  * * The ID in the _reply\_parent\_message\_id_ query parameter is not valid.
1575
+ * * Cannot set \*for\_source\_only\* if User Access Token is used.
1570
1576
  *
1571
1577
  * _401 Unauthorized_
1572
1578
  *
@@ -1764,6 +1770,52 @@ var TwitchApi = class {
1764
1770
  path: "/clips",
1765
1771
  params,
1766
1772
  options
1773
+ }),
1774
+ /**
1775
+ * NEW Provides URLs to download the video file(s) for the specified clips. For information about clips, see [How to use clips](https://help.twitch.tv/s/article/how-to-use-clips).
1776
+ *
1777
+ * **Rate Limits**: Limited to 100 requests per minute.
1778
+ *
1779
+ * __Authorization:__
1780
+ *
1781
+ * Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens) or [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the `editor:manage:clips` or `channel:manage:clips` scope.
1782
+ *
1783
+ * __URL:__
1784
+ *
1785
+ * `GET https://api.twitch.tv/helix/clips/downloads`
1786
+ *
1787
+ * __Response Codes:__
1788
+ *
1789
+ * _200 OK_
1790
+ *
1791
+ * Successfully retrieved the clip download URL(s).
1792
+ *
1793
+ * _400 Bad Request_
1794
+ *
1795
+ * The ID in the broadcaster\_id, editor\_id, or clip\_id query parameter is not valid.
1796
+ *
1797
+ * _401 Unauthorized_
1798
+ *
1799
+ * * The OAuth token is not valid.
1800
+ * * The Authorization header is required and must contain a user access token or app access token.
1801
+ * * The access token must include the editor:manage:clips or channel:manage:clips scope
1802
+ * * The access token is not valid
1803
+ * * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
1804
+ *
1805
+ * _403 Forbidden_
1806
+ *
1807
+ * The user is not an editor for the specified broadcaster.
1808
+ *
1809
+ * _500 Internal Server Error_
1810
+ *
1811
+ * Internal Server Error.
1812
+ *
1813
+ * @see https://dev.twitch.tv/docs/api/reference#get-clips-download
1814
+ */
1815
+ getClipsDownload: (params, options = {}) => this.callApi({
1816
+ path: "/clips/downloads",
1817
+ params,
1818
+ options
1767
1819
  })
1768
1820
  };
1769
1821
  conduits = {
@@ -2040,7 +2092,7 @@ var TwitchApi = class {
2040
2092
  *
2041
2093
  * __Authorization:__
2042
2094
  *
2043
- * Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens) or [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens). The client ID in the access token must own the game.
2095
+ * Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens) or [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens). The Client ID associated with the access token must be owned by a user who is a member of the [organization](https://dev.twitch.tv/docs/docs/companies/) that holds ownership of the game.
2044
2096
  *
2045
2097
  * __URL:__
2046
2098
  *
@@ -2092,7 +2144,7 @@ var TwitchApi = class {
2092
2144
  *
2093
2145
  * __Authorization:__
2094
2146
  *
2095
- * Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens) or [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens). The client ID in the access token must own the game.
2147
+ * Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens) or [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens). The Client ID associated with the access token must be owned by a user who is a member of the [organization](https://dev.twitch.tv/docs/docs/companies/) that holds ownership of the game.
2096
2148
  *
2097
2149
  * __URL:__
2098
2150
  *
@@ -2743,7 +2795,7 @@ var TwitchApi = class {
2743
2795
  *
2744
2796
  * __Request Query Parameters:__
2745
2797
  *
2746
- * Use the _status_, _type_, and _user\_id_ query parameters to filter the list of subscriptions that are returned. The filters are mutually exclusive; the request fails if you specify more than one filter.
2798
+ * Use the _status_, _type_, _user\_id_, and _subscription\_id_ query parameters to filter the list of subscriptions that are returned. The filters are mutually exclusive; the request fails if you specify more than one filter.
2747
2799
  *
2748
2800
  * __URL:__
2749
2801
  *
@@ -3319,6 +3371,8 @@ var TwitchApi = class {
3319
3371
  };
3320
3372
  hypeTrain = {
3321
3373
  /**
3374
+ * DEPRECATED Scheduled for removal on December 4, 2025\. Use “Get Hype Train Status” instead. See [announcement](https://discuss.dev.twitch.com/t/legacy-get-hype-train-events-api-and-eventsub-hype-train-v1-subscription-types-deprecation-and-withdrawal-timeline/64299).
3375
+ *
3322
3376
  * Gets information about the broadcaster’s current or most recent Hype Train event.
3323
3377
  *
3324
3378
  * Instead of polling for events, consider [subscribing](https://dev.twitch.tv/docs/eventsub/manage-subscriptions) to Hype Train events ([Begin](https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#channelhype%5Ftrainbegin), [Progress](https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#channelhype%5Ftrainprogress), [End](https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#channelhype%5Ftrainend)).
@@ -3351,6 +3405,45 @@ var TwitchApi = class {
3351
3405
  path: "/hypetrain/events",
3352
3406
  params,
3353
3407
  options
3408
+ }),
3409
+ /**
3410
+ * NEW Get the status of a Hype Train for the specified broadcaster.
3411
+ *
3412
+ * __Authorization:__
3413
+ *
3414
+ * * Requires an [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
3415
+ * * Requires OAuth Scope: `channel:read:hype_train`.
3416
+ * * Requires that `broadcaster_id` and `user_id` match in the User-Access token.
3417
+ *
3418
+ * __URL:__
3419
+ *
3420
+ * `GET https://api.twitch.tv/helix/hypetrain/status`
3421
+ *
3422
+ * __Response Codes:__
3423
+ *
3424
+ * _200 OK_
3425
+ *
3426
+ * Successfully retrieved the status object.
3427
+ *
3428
+ * _400 Bad Request_
3429
+ *
3430
+ * The ID in the `broadcaster_id` query parameter is not valid.
3431
+ *
3432
+ * _401 Unauthorized_
3433
+ *
3434
+ * * The OAuth token is not valid.
3435
+ * * The Authorization header is required and must contain a user access token.
3436
+ *
3437
+ * _500 Internal Server Error_
3438
+ *
3439
+ * Internal Server Error.
3440
+ *
3441
+ * @see https://dev.twitch.tv/docs/api/reference#get-hype-train-status
3442
+ */
3443
+ getHypeTrainStatus: (params, options = {}) => this.callApi({
3444
+ path: "/hypetrain/status",
3445
+ params,
3446
+ options
3354
3447
  })
3355
3448
  };
3356
3449
  moderation = {
@@ -5710,6 +5803,10 @@ var TwitchApi = class {
5710
5803
  * * The access token is not valid.
5711
5804
  * * The ID specified in the Client-Id header does not match the client ID specified in the access token.
5712
5805
  *
5806
+ * _429 Too Many Requests_
5807
+ *
5808
+ * The app exceeded the number of requests that it may make.
5809
+ *
5713
5810
  * @see https://dev.twitch.tv/docs/api/reference#update-user
5714
5811
  */
5715
5812
  updateUser: (params = null, options = {}) => this.callApi({
@@ -5718,6 +5815,47 @@ var TwitchApi = class {
5718
5815
  params,
5719
5816
  options
5720
5817
  }),
5818
+ /**
5819
+ * NEW Gets the authorization scopes that the specified user(s) have granted the application.
5820
+ *
5821
+ * __Authorization:__
5822
+ *
5823
+ * Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens).
5824
+ *
5825
+ * __URL:__
5826
+ *
5827
+ * `GET https://api.twitch.tv/helix/authorization/users`
5828
+ *
5829
+ * __Response Codes:__
5830
+ *
5831
+ * _200 OK_
5832
+ *
5833
+ * Successfully retrieved user authorization.
5834
+ *
5835
+ * _400 Bad Request_
5836
+ *
5837
+ * Request is malformed - invalid parameters or missing parameters.
5838
+ *
5839
+ * _401 Unauthorized_
5840
+ *
5841
+ * * The access token is not valid.
5842
+ * * Authorization header is required and must specify an app access token.
5843
+ *
5844
+ * _403 Forbidden_
5845
+ *
5846
+ * The client-id in the header must match the client ID in the access token.
5847
+ *
5848
+ * _500 Internal Server Error_
5849
+ *
5850
+ * Internal Server Error.
5851
+ *
5852
+ * @see https://dev.twitch.tv/docs/api/reference#get-authorization-by-user
5853
+ */
5854
+ getAuthorizationByUser: (params, options = {}) => this.callApi({
5855
+ path: "/authorization/users",
5856
+ params,
5857
+ options
5858
+ }),
5721
5859
  /**
5722
5860
  * Gets the list of users that the broadcaster has blocked. [Read More](https://help.twitch.tv/s/article/how-to-manage-harassment-in-chat?language=en%5FUS#BlockWhispersandMessagesfromStrangers)
5723
5861
  *