ts-twitch-api 0.2.0 → 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
@@ -52,10 +52,10 @@ var TwitchApi = class {
52
52
  body,
53
53
  requiresAuth = true,
54
54
  options: {
55
- clientId = null,
56
- accessToken = null,
55
+ clientId,
56
+ accessToken,
57
57
  requestInit = {}
58
- }
58
+ } = {}
59
59
  }) {
60
60
  const url = params ? `${BASE_URL}${path}?${getSearchParams(params)}` : `${BASE_URL}${path}`;
61
61
  const options = { ...requestInit, method };
@@ -127,7 +127,7 @@ var TwitchApi = class {
127
127
  *
128
128
  * @see https://dev.twitch.tv/docs/api/reference#start-commercial
129
129
  */
130
- startCommercial: async (body, options) => this.callApi({
130
+ startCommercial: async (body, options = {}) => this.callApi({
131
131
  path: "/channels/commercial",
132
132
  method: "POST",
133
133
  body,
@@ -158,7 +158,7 @@ var TwitchApi = class {
158
158
  *
159
159
  * @see https://dev.twitch.tv/docs/api/reference#get-ad-schedule
160
160
  */
161
- getAdSchedule: async (params, options) => this.callApi({
161
+ getAdSchedule: async (params, options = {}) => this.callApi({
162
162
  path: "/channels/ads",
163
163
  params,
164
164
  options
@@ -194,7 +194,7 @@ var TwitchApi = class {
194
194
  *
195
195
  * @see https://dev.twitch.tv/docs/api/reference#snooze-next-ad
196
196
  */
197
- snoozeNextAd: async (params, options) => this.callApi({
197
+ snoozeNextAd: async (params, options = {}) => this.callApi({
198
198
  path: "/channels/ads/schedule/snooze",
199
199
  method: "POST",
200
200
  params,
@@ -241,7 +241,7 @@ var TwitchApi = class {
241
241
  *
242
242
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-analytics
243
243
  */
244
- getExtensionAnalytics: async (params = null, options) => this.callApi({
244
+ getExtensionAnalytics: async (params = null, options = {}) => this.callApi({
245
245
  path: "/analytics/extensions",
246
246
  params,
247
247
  options
@@ -285,7 +285,7 @@ var TwitchApi = class {
285
285
  *
286
286
  * @see https://dev.twitch.tv/docs/api/reference#get-game-analytics
287
287
  */
288
- getGameAnalytics: async (params = null, options) => this.callApi({
288
+ getGameAnalytics: async (params = null, options = {}) => this.callApi({
289
289
  path: "/analytics/games",
290
290
  params,
291
291
  options
@@ -326,7 +326,7 @@ var TwitchApi = class {
326
326
  *
327
327
  * @see https://dev.twitch.tv/docs/api/reference#get-bits-leaderboard
328
328
  */
329
- getBitsLeaderboard: async (params = null, options) => this.callApi({
329
+ getBitsLeaderboard: async (params = null, options = {}) => this.callApi({
330
330
  path: "/bits/leaderboard",
331
331
  params,
332
332
  options
@@ -355,7 +355,7 @@ var TwitchApi = class {
355
355
  *
356
356
  * @see https://dev.twitch.tv/docs/api/reference#get-cheermotes
357
357
  */
358
- getCheermotes: async (params = null, options) => this.callApi({
358
+ getCheermotes: async (params = null, options = {}) => this.callApi({
359
359
  path: "/bits/cheermotes",
360
360
  params,
361
361
  options
@@ -396,7 +396,7 @@ var TwitchApi = class {
396
396
  *
397
397
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-transactions
398
398
  */
399
- getExtensionTransactions: async (params, options) => this.callApi({
399
+ getExtensionTransactions: async (params, options = {}) => this.callApi({
400
400
  path: "/extensions/transactions",
401
401
  params,
402
402
  options
@@ -440,7 +440,7 @@ var TwitchApi = class {
440
440
  *
441
441
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-information
442
442
  */
443
- getChannelInformation: async (params, options) => this.callApi({
443
+ getChannelInformation: async (params, options = {}) => this.callApi({
444
444
  path: "/channels",
445
445
  params,
446
446
  options
@@ -502,7 +502,7 @@ var TwitchApi = class {
502
502
  *
503
503
  * @see https://dev.twitch.tv/docs/api/reference#modify-channel-information
504
504
  */
505
- modifyChannelInformation: async (params, body = null, options) => this.callApi({
505
+ modifyChannelInformation: async (params, body = null, options = {}) => this.callApi({
506
506
  path: "/channels",
507
507
  method: "PATCH",
508
508
  params,
@@ -524,7 +524,7 @@ var TwitchApi = class {
524
524
  *
525
525
  * _200 OK_
526
526
  *
527
- * Successfully retrieved the broadcaster’s list of editors.
527
+ * Successfully retrieved the broadcaster's list of editors.
528
528
  *
529
529
  * _400 Bad Request_
530
530
  *
@@ -540,7 +540,7 @@ var TwitchApi = class {
540
540
  *
541
541
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-editors
542
542
  */
543
- getChannelEditors: async (params, options) => this.callApi({
543
+ getChannelEditors: async (params, options = {}) => this.callApi({
544
544
  path: "/channels/editors",
545
545
  params,
546
546
  options
@@ -560,7 +560,7 @@ var TwitchApi = class {
560
560
  *
561
561
  * _200 OK_
562
562
  *
563
- * Successfully retrieved the broadcaster’s list of followers.
563
+ * Successfully retrieved the broadcaster's list of followers.
564
564
  *
565
565
  * _400 Bad Request_
566
566
  *
@@ -582,7 +582,7 @@ var TwitchApi = class {
582
582
  *
583
583
  * @see https://dev.twitch.tv/docs/api/reference#get-followed-channels
584
584
  */
585
- getFollowedChannels: async (params, options) => this.callApi({
585
+ getFollowedChannels: async (params, options = {}) => this.callApi({
586
586
  path: "/channels/followed",
587
587
  params,
588
588
  options
@@ -627,7 +627,7 @@ var TwitchApi = class {
627
627
  *
628
628
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-followers
629
629
  */
630
- getChannelFollowers: async (params, options) => this.callApi({
630
+ getChannelFollowers: async (params, options = {}) => this.callApi({
631
631
  path: "/channels/followers",
632
632
  params,
633
633
  options
@@ -680,7 +680,7 @@ var TwitchApi = class {
680
680
  *
681
681
  * @see https://dev.twitch.tv/docs/api/reference#create-custom-rewards
682
682
  */
683
- createCustomRewards: async (params, body, options) => this.callApi({
683
+ createCustomRewards: async (params, body, options = {}) => this.callApi({
684
684
  path: "/channel_points/custom_rewards",
685
685
  method: "POST",
686
686
  params,
@@ -731,7 +731,7 @@ var TwitchApi = class {
731
731
  *
732
732
  * @see https://dev.twitch.tv/docs/api/reference#delete-custom-reward
733
733
  */
734
- deleteCustomReward: async (params, options) => this.callApi({
734
+ deleteCustomReward: async (params, options = {}) => this.callApi({
735
735
  path: "/channel_points/custom_rewards",
736
736
  method: "DELETE",
737
737
  params,
@@ -780,7 +780,7 @@ var TwitchApi = class {
780
780
  *
781
781
  * @see https://dev.twitch.tv/docs/api/reference#get-custom-reward
782
782
  */
783
- getCustomReward: async (params, options) => this.callApi({
783
+ getCustomReward: async (params, options = {}) => this.callApi({
784
784
  path: "/channel_points/custom_rewards",
785
785
  params,
786
786
  options
@@ -838,7 +838,7 @@ var TwitchApi = class {
838
838
  *
839
839
  * @see https://dev.twitch.tv/docs/api/reference#update-custom-reward
840
840
  */
841
- updateCustomReward: async (params, body = null, options) => this.callApi({
841
+ updateCustomReward: async (params, body = null, options = {}) => this.callApi({
842
842
  path: "/channel_points/custom_rewards",
843
843
  method: "PATCH",
844
844
  params,
@@ -890,7 +890,7 @@ var TwitchApi = class {
890
890
  *
891
891
  * @see https://dev.twitch.tv/docs/api/reference#get-custom-reward-redemption
892
892
  */
893
- getCustomRewardRedemption: async (params, options) => this.callApi({
893
+ getCustomRewardRedemption: async (params, options = {}) => this.callApi({
894
894
  path: "/channel_points/custom_rewards/redemptions",
895
895
  params,
896
896
  options
@@ -940,7 +940,7 @@ var TwitchApi = class {
940
940
  *
941
941
  * @see https://dev.twitch.tv/docs/api/reference#update-redemption-status
942
942
  */
943
- updateRedemptionStatus: async (params, body, options) => this.callApi({
943
+ updateRedemptionStatus: async (params, body, options = {}) => this.callApi({
944
944
  path: "/channel_points/custom_rewards/redemptions",
945
945
  method: "PATCH",
946
946
  params,
@@ -987,7 +987,7 @@ var TwitchApi = class {
987
987
  *
988
988
  * @see https://dev.twitch.tv/docs/api/reference#get-charity-campaign
989
989
  */
990
- getCharityCampaign: async (params, options) => this.callApi({
990
+ getCharityCampaign: async (params, options = {}) => this.callApi({
991
991
  path: "/charity/campaigns",
992
992
  params,
993
993
  options
@@ -1030,7 +1030,7 @@ var TwitchApi = class {
1030
1030
  *
1031
1031
  * @see https://dev.twitch.tv/docs/api/reference#get-charity-campaign-donations
1032
1032
  */
1033
- getCharityCampaignDonations: async (params, options) => this.callApi({
1033
+ getCharityCampaignDonations: async (params, options = {}) => this.callApi({
1034
1034
  path: "/charity/donations",
1035
1035
  params,
1036
1036
  options
@@ -1079,7 +1079,7 @@ var TwitchApi = class {
1079
1079
  *
1080
1080
  * @see https://dev.twitch.tv/docs/api/reference#get-chatters
1081
1081
  */
1082
- getChatters: async (params, options) => this.callApi({
1082
+ getChatters: async (params, options = {}) => this.callApi({
1083
1083
  path: "/chat/chatters",
1084
1084
  params,
1085
1085
  options
@@ -1103,7 +1103,7 @@ var TwitchApi = class {
1103
1103
  *
1104
1104
  * _200 OK_
1105
1105
  *
1106
- * Successfully retrieved broadcaster’s list of custom emotes.
1106
+ * Successfully retrieved broadcaster's list of custom emotes.
1107
1107
  *
1108
1108
  * _400 Bad Request_
1109
1109
  *
@@ -1117,7 +1117,7 @@ var TwitchApi = class {
1117
1117
  *
1118
1118
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-emotes
1119
1119
  */
1120
- getChannelEmotes: async (params, options) => this.callApi({
1120
+ getChannelEmotes: async (params, options = {}) => this.callApi({
1121
1121
  path: "/chat/emotes",
1122
1122
  params,
1123
1123
  options
@@ -1143,7 +1143,7 @@ var TwitchApi = class {
1143
1143
  *
1144
1144
  * _200 OK_
1145
1145
  *
1146
- * Successfully retrieved Twitch’s list of global emotes.
1146
+ * Successfully retrieved Twitch's list of global emotes.
1147
1147
  *
1148
1148
  * _401 Unauthorized_
1149
1149
  *
@@ -1153,7 +1153,7 @@ var TwitchApi = class {
1153
1153
  *
1154
1154
  * @see https://dev.twitch.tv/docs/api/reference#get-global-emotes
1155
1155
  */
1156
- getGlobalEmotes: async (options) => this.callApi({
1156
+ getGlobalEmotes: async (options = {}) => this.callApi({
1157
1157
  path: "/chat/emotes/global",
1158
1158
  options
1159
1159
  }),
@@ -1191,7 +1191,7 @@ var TwitchApi = class {
1191
1191
  *
1192
1192
  * @see https://dev.twitch.tv/docs/api/reference#get-emote-sets
1193
1193
  */
1194
- getEmoteSets: async (params, options) => this.callApi({
1194
+ getEmoteSets: async (params, options = {}) => this.callApi({
1195
1195
  path: "/chat/emotes/set",
1196
1196
  params,
1197
1197
  options
@@ -1225,7 +1225,7 @@ var TwitchApi = class {
1225
1225
  *
1226
1226
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-chat-badges
1227
1227
  */
1228
- getChannelChatBadges: async (params, options) => this.callApi({
1228
+ getChannelChatBadges: async (params, options = {}) => this.callApi({
1229
1229
  path: "/chat/badges",
1230
1230
  params,
1231
1231
  options
@@ -1259,7 +1259,7 @@ var TwitchApi = class {
1259
1259
  *
1260
1260
  * @see https://dev.twitch.tv/docs/api/reference#get-global-chat-badges
1261
1261
  */
1262
- getGlobalChatBadges: async (options) => this.callApi({
1262
+ getGlobalChatBadges: async (options = {}) => this.callApi({
1263
1263
  path: "/chat/badges/global",
1264
1264
  options
1265
1265
  }),
@@ -1294,7 +1294,7 @@ var TwitchApi = class {
1294
1294
  *
1295
1295
  * @see https://dev.twitch.tv/docs/api/reference#get-chat-settings
1296
1296
  */
1297
- getChatSettings: async (params, options) => this.callApi({
1297
+ getChatSettings: async (params, options = {}) => this.callApi({
1298
1298
  path: "/chat/settings",
1299
1299
  params,
1300
1300
  options
@@ -1348,13 +1348,51 @@ var TwitchApi = class {
1348
1348
  *
1349
1349
  * @see https://dev.twitch.tv/docs/api/reference#update-chat-settings
1350
1350
  */
1351
- updateChatSettings: async (params, body = null, options) => this.callApi({
1351
+ updateChatSettings: async (params, body = null, options = {}) => this.callApi({
1352
1352
  path: "/chat/settings",
1353
1353
  method: "PATCH",
1354
1354
  params,
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
  *
@@ -1388,7 +1426,7 @@ var TwitchApi = class {
1388
1426
  *
1389
1427
  * @see https://dev.twitch.tv/docs/api/reference#send-chat-announcement
1390
1428
  */
1391
- sendChatAnnouncement: async (params, body, options) => this.callApi({
1429
+ sendChatAnnouncement: async (params, body, options = {}) => this.callApi({
1392
1430
  path: "/chat/announcements",
1393
1431
  method: "POST",
1394
1432
  params,
@@ -1447,7 +1485,7 @@ var TwitchApi = class {
1447
1485
  *
1448
1486
  * @see https://dev.twitch.tv/docs/api/reference#send-a-shoutout
1449
1487
  */
1450
- sendShoutout: async (params, options) => this.callApi({
1488
+ sendShoutout: async (params, options = {}) => this.callApi({
1451
1489
  path: "/chat/shoutouts",
1452
1490
  method: "POST",
1453
1491
  params,
@@ -1497,7 +1535,7 @@ var TwitchApi = class {
1497
1535
  *
1498
1536
  * @see https://dev.twitch.tv/docs/api/reference#send-chat-message
1499
1537
  */
1500
- sendChatMessage: async (body, options) => this.callApi({
1538
+ sendChatMessage: async (body, options = {}) => this.callApi({
1501
1539
  path: "/chat/messages",
1502
1540
  method: "POST",
1503
1541
  body,
@@ -1532,7 +1570,7 @@ var TwitchApi = class {
1532
1570
  *
1533
1571
  * @see https://dev.twitch.tv/docs/api/reference#get-user-chat-color
1534
1572
  */
1535
- getUserChatColor: async (params, options) => this.callApi({
1573
+ getUserChatColor: async (params, options = {}) => this.callApi({
1536
1574
  path: "/chat/color",
1537
1575
  params,
1538
1576
  options
@@ -1571,7 +1609,7 @@ var TwitchApi = class {
1571
1609
  *
1572
1610
  * @see https://dev.twitch.tv/docs/api/reference#update-user-chat-color
1573
1611
  */
1574
- updateUserChatColor: async (params, options) => this.callApi({
1612
+ updateUserChatColor: async (params, options = {}) => this.callApi({
1575
1613
  path: "/chat/color",
1576
1614
  method: "PUT",
1577
1615
  params,
@@ -1625,7 +1663,7 @@ var TwitchApi = class {
1625
1663
  *
1626
1664
  * @see https://dev.twitch.tv/docs/api/reference#create-clip
1627
1665
  */
1628
- createClip: async (params, options) => this.callApi({
1666
+ createClip: async (params, options = {}) => this.callApi({
1629
1667
  path: "/clips",
1630
1668
  method: "POST",
1631
1669
  params,
@@ -1669,7 +1707,7 @@ var TwitchApi = class {
1669
1707
  *
1670
1708
  * @see https://dev.twitch.tv/docs/api/reference#get-clips
1671
1709
  */
1672
- getClips: async (params = null, options) => this.callApi({
1710
+ getClips: async (params = null, options = {}) => this.callApi({
1673
1711
  path: "/clips",
1674
1712
  params,
1675
1713
  options
@@ -1699,7 +1737,7 @@ var TwitchApi = class {
1699
1737
  *
1700
1738
  * @see https://dev.twitch.tv/docs/api/reference#get-conduits
1701
1739
  */
1702
- getConduits: async (options) => this.callApi({
1740
+ getConduits: async (options = {}) => this.callApi({
1703
1741
  path: "/eventsub/conduits",
1704
1742
  options
1705
1743
  }),
@@ -1734,7 +1772,7 @@ var TwitchApi = class {
1734
1772
  *
1735
1773
  * @see https://dev.twitch.tv/docs/api/reference#create-conduits
1736
1774
  */
1737
- createConduits: async (body, options) => this.callApi({
1775
+ createConduits: async (body, options = {}) => this.callApi({
1738
1776
  path: "/eventsub/conduits",
1739
1777
  method: "POST",
1740
1778
  body,
@@ -1773,7 +1811,7 @@ var TwitchApi = class {
1773
1811
  *
1774
1812
  * @see https://dev.twitch.tv/docs/api/reference#update-conduits
1775
1813
  */
1776
- updateConduits: async (body, options) => this.callApi({
1814
+ updateConduits: async (body, options = {}) => this.callApi({
1777
1815
  path: "/eventsub/conduits",
1778
1816
  method: "PATCH",
1779
1817
  body,
@@ -1811,7 +1849,7 @@ var TwitchApi = class {
1811
1849
  *
1812
1850
  * @see https://dev.twitch.tv/docs/api/reference#delete-conduit
1813
1851
  */
1814
- deleteConduit: async (params, options) => this.callApi({
1852
+ deleteConduit: async (params, options = {}) => this.callApi({
1815
1853
  path: "/eventsub/conduits",
1816
1854
  method: "DELETE",
1817
1855
  params,
@@ -1849,7 +1887,7 @@ var TwitchApi = class {
1849
1887
  *
1850
1888
  * @see https://dev.twitch.tv/docs/api/reference#get-conduit-shards
1851
1889
  */
1852
- getConduitShards: async (params, options) => this.callApi({
1890
+ getConduitShards: async (params, options = {}) => this.callApi({
1853
1891
  path: "/eventsub/conduits/shards",
1854
1892
  params,
1855
1893
  options
@@ -1888,7 +1926,7 @@ var TwitchApi = class {
1888
1926
  *
1889
1927
  * @see https://dev.twitch.tv/docs/api/reference#update-conduit-shards
1890
1928
  */
1891
- updateConduitShards: async (body, options) => this.callApi({
1929
+ updateConduitShards: async (body, options = {}) => this.callApi({
1892
1930
  path: "/eventsub/conduits/shards",
1893
1931
  method: "PATCH",
1894
1932
  body,
@@ -1921,7 +1959,7 @@ var TwitchApi = class {
1921
1959
  *
1922
1960
  * @see https://dev.twitch.tv/docs/api/reference#get-content-classification-labels
1923
1961
  */
1924
- getContentClassificationLabels: async (params = null, options) => this.callApi({
1962
+ getContentClassificationLabels: async (params = null, options = {}) => this.callApi({
1925
1963
  path: "/content_classification_labels",
1926
1964
  params,
1927
1965
  options
@@ -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 |
@@ -1981,7 +2021,7 @@ var TwitchApi = class {
1981
2021
  *
1982
2022
  * @see https://dev.twitch.tv/docs/api/reference#get-drops-entitlements
1983
2023
  */
1984
- getDropsEntitlements: async (params = null, options) => this.callApi({
2024
+ getDropsEntitlements: async (params = null, options = {}) => this.callApi({
1985
2025
  path: "/entitlements/drops",
1986
2026
  params,
1987
2027
  options
@@ -2027,7 +2067,7 @@ var TwitchApi = class {
2027
2067
  *
2028
2068
  * @see https://dev.twitch.tv/docs/api/reference#update-drops-entitlements
2029
2069
  */
2030
- updateDropsEntitlements: async (body = null, options) => this.callApi({
2070
+ updateDropsEntitlements: async (body = null, options = {}) => this.callApi({
2031
2071
  path: "/entitlements/drops",
2032
2072
  method: "PATCH",
2033
2073
  body,
@@ -2072,7 +2112,7 @@ var TwitchApi = class {
2072
2112
  *
2073
2113
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-configuration-segment
2074
2114
  */
2075
- getExtensionConfigurationSegment: async (params, options) => this.callApi({
2115
+ getExtensionConfigurationSegment: async (params, options = {}) => this.callApi({
2076
2116
  path: "/extensions/configurations",
2077
2117
  params,
2078
2118
  options
@@ -2108,7 +2148,7 @@ var TwitchApi = class {
2108
2148
  *
2109
2149
  * @see https://dev.twitch.tv/docs/api/reference#set-extension-configuration-segment
2110
2150
  */
2111
- setExtensionConfigurationSegment: async (body, options) => this.callApi({
2151
+ setExtensionConfigurationSegment: async (body, options = {}) => this.callApi({
2112
2152
  path: "/extensions/configurations",
2113
2153
  method: "PUT",
2114
2154
  body,
@@ -2146,7 +2186,7 @@ var TwitchApi = class {
2146
2186
  *
2147
2187
  * @see https://dev.twitch.tv/docs/api/reference#set-extension-required-configuration
2148
2188
  */
2149
- setExtensionRequiredConfiguration: async (params, body, options) => this.callApi({
2189
+ setExtensionRequiredConfiguration: async (params, body, options = {}) => this.callApi({
2150
2190
  path: "/extensions/required_configuration",
2151
2191
  method: "PUT",
2152
2192
  params,
@@ -2222,7 +2262,7 @@ var TwitchApi = class {
2222
2262
  *
2223
2263
  * @see https://dev.twitch.tv/docs/api/reference#send-extension-pubsub-message
2224
2264
  */
2225
- sendExtensionPubSubMessage: async (body, options) => this.callApi({
2265
+ sendExtensionPubSubMessage: async (body, options = {}) => this.callApi({
2226
2266
  path: "/extensions/pubsub",
2227
2267
  method: "POST",
2228
2268
  body,
@@ -2264,7 +2304,7 @@ var TwitchApi = class {
2264
2304
  *
2265
2305
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-live-channels
2266
2306
  */
2267
- getExtensionLiveChannels: async (params, options) => this.callApi({
2307
+ getExtensionLiveChannels: async (params, options = {}) => this.callApi({
2268
2308
  path: "/extensions/live",
2269
2309
  params,
2270
2310
  options
@@ -2298,7 +2338,7 @@ var TwitchApi = class {
2298
2338
  *
2299
2339
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-secrets
2300
2340
  */
2301
- getExtensionSecrets: async (options) => this.callApi({
2341
+ getExtensionSecrets: async (options = {}) => this.callApi({
2302
2342
  path: "/extensions/jwt/secrets",
2303
2343
  options
2304
2344
  }),
@@ -2332,7 +2372,7 @@ var TwitchApi = class {
2332
2372
  *
2333
2373
  * @see https://dev.twitch.tv/docs/api/reference#create-extension-secret
2334
2374
  */
2335
- createExtensionSecret: async (params, options) => this.callApi({
2375
+ createExtensionSecret: async (params, options = {}) => this.callApi({
2336
2376
  path: "/extensions/jwt/secrets",
2337
2377
  method: "POST",
2338
2378
  params,
@@ -2374,7 +2414,7 @@ var TwitchApi = class {
2374
2414
  *
2375
2415
  * @see https://dev.twitch.tv/docs/api/reference#send-extension-chat-message
2376
2416
  */
2377
- sendExtensionChatMessage: async (params, body, options) => this.callApi({
2417
+ sendExtensionChatMessage: async (params, body, options = {}) => this.callApi({
2378
2418
  path: "/extensions/chat",
2379
2419
  method: "POST",
2380
2420
  params,
@@ -2415,7 +2455,7 @@ var TwitchApi = class {
2415
2455
  *
2416
2456
  * @see https://dev.twitch.tv/docs/api/reference#get-extensions
2417
2457
  */
2418
- getExtensions: async (params, options) => this.callApi({
2458
+ getExtensions: async (params, options = {}) => this.callApi({
2419
2459
  path: "/extensions",
2420
2460
  params,
2421
2461
  options
@@ -2453,7 +2493,7 @@ var TwitchApi = class {
2453
2493
  *
2454
2494
  * @see https://dev.twitch.tv/docs/api/reference#get-released-extensions
2455
2495
  */
2456
- getReleasedExtensions: async (params, options) => this.callApi({
2496
+ getReleasedExtensions: async (params, options = {}) => this.callApi({
2457
2497
  path: "/extensions/released",
2458
2498
  params,
2459
2499
  options
@@ -2487,7 +2527,7 @@ var TwitchApi = class {
2487
2527
  *
2488
2528
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-bits-products
2489
2529
  */
2490
- getExtensionBitsProducts: async (params = null, options) => this.callApi({
2530
+ getExtensionBitsProducts: async (params = null, options = {}) => this.callApi({
2491
2531
  path: "/bits/extensions",
2492
2532
  params,
2493
2533
  options
@@ -2528,7 +2568,7 @@ var TwitchApi = class {
2528
2568
  *
2529
2569
  * @see https://dev.twitch.tv/docs/api/reference#update-extension-bits-product
2530
2570
  */
2531
- updateExtensionBitsProduct: async (body, options) => this.callApi({
2571
+ updateExtensionBitsProduct: async (body, options = {}) => this.callApi({
2532
2572
  path: "/bits/extensions",
2533
2573
  method: "PUT",
2534
2574
  body,
@@ -2592,7 +2632,7 @@ var TwitchApi = class {
2592
2632
  *
2593
2633
  * @see https://dev.twitch.tv/docs/api/reference#create-eventsub-subscription
2594
2634
  */
2595
- createEventSubSubscription: async (body, options) => this.callApi({
2635
+ createEventSubSubscription: async (body, options = {}) => this.callApi({
2596
2636
  path: "/eventsub/subscriptions",
2597
2637
  method: "POST",
2598
2638
  body,
@@ -2633,7 +2673,7 @@ var TwitchApi = class {
2633
2673
  *
2634
2674
  * @see https://dev.twitch.tv/docs/api/reference#delete-eventsub-subscription
2635
2675
  */
2636
- deleteEventSubSubscription: async (params, options) => this.callApi({
2676
+ deleteEventSubSubscription: async (params, options = {}) => this.callApi({
2637
2677
  path: "/eventsub/subscriptions",
2638
2678
  method: "DELETE",
2639
2679
  params,
@@ -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
  *
@@ -2677,7 +2717,7 @@ var TwitchApi = class {
2677
2717
  *
2678
2718
  * @see https://dev.twitch.tv/docs/api/reference#get-eventsub-subscriptions
2679
2719
  */
2680
- getEventSubSubscriptions: async (params = null, options) => this.callApi({
2720
+ getEventSubSubscriptions: async (params = null, options = {}) => this.callApi({
2681
2721
  path: "/eventsub/subscriptions",
2682
2722
  params,
2683
2723
  options
@@ -2714,7 +2754,7 @@ var TwitchApi = class {
2714
2754
  *
2715
2755
  * @see https://dev.twitch.tv/docs/api/reference#get-top-games
2716
2756
  */
2717
- getTopGames: async (params = null, options) => this.callApi({
2757
+ getTopGames: async (params = null, options = {}) => this.callApi({
2718
2758
  path: "/games/top",
2719
2759
  params,
2720
2760
  options
@@ -2751,7 +2791,7 @@ var TwitchApi = class {
2751
2791
  *
2752
2792
  * @see https://dev.twitch.tv/docs/api/reference#get-games
2753
2793
  */
2754
- getGames: async (params = null, options) => this.callApi({
2794
+ getGames: async (params = null, options = {}) => this.callApi({
2755
2795
  path: "/games",
2756
2796
  params,
2757
2797
  options
@@ -2791,7 +2831,7 @@ var TwitchApi = class {
2791
2831
  *
2792
2832
  * @see https://dev.twitch.tv/docs/api/reference#get-creator-goals
2793
2833
  */
2794
- getCreatorGoals: async (params, options) => this.callApi({
2834
+ getCreatorGoals: async (params, options = {}) => this.callApi({
2795
2835
  path: "/goals",
2796
2836
  params,
2797
2837
  options
@@ -2825,7 +2865,7 @@ var TwitchApi = class {
2825
2865
  *
2826
2866
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-guest-star-settings
2827
2867
  */
2828
- getChannelGuestStarSettings: async (params, options) => this.callApi({
2868
+ getChannelGuestStarSettings: async (params, options = {}) => this.callApi({
2829
2869
  path: "/guest_star/channel_settings",
2830
2870
  params,
2831
2871
  options
@@ -2856,7 +2896,7 @@ var TwitchApi = class {
2856
2896
  *
2857
2897
  * @see https://dev.twitch.tv/docs/api/reference#update-channel-guest-star-settings
2858
2898
  */
2859
- updateChannelGuestStarSettings: async (params, body = null, options) => this.callApi({
2899
+ updateChannelGuestStarSettings: async (params, body = null, options = {}) => this.callApi({
2860
2900
  path: "/guest_star/channel_settings",
2861
2901
  method: "PUT",
2862
2902
  params,
@@ -2890,7 +2930,7 @@ var TwitchApi = class {
2890
2930
  *
2891
2931
  * @see https://dev.twitch.tv/docs/api/reference#get-guest-star-session
2892
2932
  */
2893
- getGuestStarSession: async (params, options) => this.callApi({
2933
+ getGuestStarSession: async (params, options = {}) => this.callApi({
2894
2934
  path: "/guest_star/session",
2895
2935
  params,
2896
2936
  options
@@ -2926,7 +2966,7 @@ var TwitchApi = class {
2926
2966
  *
2927
2967
  * @see https://dev.twitch.tv/docs/api/reference#create-guest-star-session
2928
2968
  */
2929
- createGuestStarSession: async (params, options) => this.callApi({
2969
+ createGuestStarSession: async (params, options = {}) => this.callApi({
2930
2970
  path: "/guest_star/session",
2931
2971
  method: "POST",
2932
2972
  params,
@@ -2960,7 +3000,7 @@ var TwitchApi = class {
2960
3000
  *
2961
3001
  * @see https://dev.twitch.tv/docs/api/reference#end-guest-star-session
2962
3002
  */
2963
- endGuestStarSession: async (params, options) => this.callApi({
3003
+ endGuestStarSession: async (params, options = {}) => this.callApi({
2964
3004
  path: "/guest_star/session",
2965
3005
  method: "DELETE",
2966
3006
  params,
@@ -2989,7 +3029,7 @@ var TwitchApi = class {
2989
3029
  *
2990
3030
  * @see https://dev.twitch.tv/docs/api/reference#get-guest-star-invites
2991
3031
  */
2992
- getGuestStarInvites: async (params, options) => this.callApi({
3032
+ getGuestStarInvites: async (params, options = {}) => this.callApi({
2993
3033
  path: "/guest_star/invites",
2994
3034
  params,
2995
3035
  options
@@ -3025,7 +3065,7 @@ var TwitchApi = class {
3025
3065
  *
3026
3066
  * @see https://dev.twitch.tv/docs/api/reference#send-guest-star-invite
3027
3067
  */
3028
- sendGuestStarInvite: async (params, options) => this.callApi({
3068
+ sendGuestStarInvite: async (params, options = {}) => this.callApi({
3029
3069
  path: "/guest_star/invites",
3030
3070
  method: "POST",
3031
3071
  params,
@@ -3060,7 +3100,7 @@ var TwitchApi = class {
3060
3100
  *
3061
3101
  * @see https://dev.twitch.tv/docs/api/reference#delete-guest-star-invite
3062
3102
  */
3063
- deleteGuestStarInvite: async (params, options) => this.callApi({
3103
+ deleteGuestStarInvite: async (params, options = {}) => this.callApi({
3064
3104
  path: "/guest_star/invites",
3065
3105
  method: "DELETE",
3066
3106
  params,
@@ -3105,7 +3145,7 @@ var TwitchApi = class {
3105
3145
  *
3106
3146
  * @see https://dev.twitch.tv/docs/api/reference#assign-guest-star-slot
3107
3147
  */
3108
- assignGuestStarSlot: async (params, options) => this.callApi({
3148
+ assignGuestStarSlot: async (params, options = {}) => this.callApi({
3109
3149
  path: "/guest_star/slot",
3110
3150
  method: "POST",
3111
3151
  params,
@@ -3137,7 +3177,7 @@ var TwitchApi = class {
3137
3177
  *
3138
3178
  * @see https://dev.twitch.tv/docs/api/reference#update-guest-star-slot
3139
3179
  */
3140
- updateGuestStarSlot: async (params, options) => this.callApi({
3180
+ updateGuestStarSlot: async (params, options = {}) => this.callApi({
3141
3181
  path: "/guest_star/slot",
3142
3182
  method: "PATCH",
3143
3183
  params,
@@ -3179,7 +3219,7 @@ var TwitchApi = class {
3179
3219
  *
3180
3220
  * @see https://dev.twitch.tv/docs/api/reference#delete-guest-star-slot
3181
3221
  */
3182
- deleteGuestStarSlot: async (params, options) => this.callApi({
3222
+ deleteGuestStarSlot: async (params, options = {}) => this.callApi({
3183
3223
  path: "/guest_star/slot",
3184
3224
  method: "DELETE",
3185
3225
  params,
@@ -3217,7 +3257,7 @@ var TwitchApi = class {
3217
3257
  *
3218
3258
  * @see https://dev.twitch.tv/docs/api/reference#update-guest-star-slot-settings
3219
3259
  */
3220
- updateGuestStarSlotSettings: async (params, options) => this.callApi({
3260
+ updateGuestStarSlotSettings: async (params, options = {}) => this.callApi({
3221
3261
  path: "/guest_star/slot_settings",
3222
3262
  method: "PATCH",
3223
3263
  params,
@@ -3254,7 +3294,7 @@ var TwitchApi = class {
3254
3294
  *
3255
3295
  * @see https://dev.twitch.tv/docs/api/reference#get-hype-train-events
3256
3296
  */
3257
- getHypeTrainEvents: async (params, options) => this.callApi({
3297
+ getHypeTrainEvents: async (params, options = {}) => this.callApi({
3258
3298
  path: "/hypetrain/events",
3259
3299
  params,
3260
3300
  options
@@ -3315,7 +3355,7 @@ var TwitchApi = class {
3315
3355
  *
3316
3356
  * @see https://dev.twitch.tv/docs/api/reference#check-automod-status
3317
3357
  */
3318
- checkAutoModStatus: async (params, body, options) => this.callApi({
3358
+ checkAutoModStatus: async (params, body, options = {}) => this.callApi({
3319
3359
  path: "/moderation/enforcements/status",
3320
3360
  method: "POST",
3321
3361
  params,
@@ -3366,7 +3406,7 @@ var TwitchApi = class {
3366
3406
  *
3367
3407
  * @see https://dev.twitch.tv/docs/api/reference#manage-held-automod-messages
3368
3408
  */
3369
- manageHeldAutoModMessages: async (body, options) => this.callApi({
3409
+ manageHeldAutoModMessages: async (body, options = {}) => this.callApi({
3370
3410
  path: "/moderation/automod/message",
3371
3411
  method: "POST",
3372
3412
  body,
@@ -3408,7 +3448,7 @@ var TwitchApi = class {
3408
3448
  *
3409
3449
  * @see https://dev.twitch.tv/docs/api/reference#get-automod-settings
3410
3450
  */
3411
- getAutoModSettings: async (params, options) => this.callApi({
3451
+ getAutoModSettings: async (params, options = {}) => this.callApi({
3412
3452
  path: "/moderation/automod/settings",
3413
3453
  params,
3414
3454
  options
@@ -3465,7 +3505,7 @@ var TwitchApi = class {
3465
3505
  *
3466
3506
  * @see https://dev.twitch.tv/docs/api/reference#update-automod-settings
3467
3507
  */
3468
- updateAutoModSettings: async (params, body = null, options) => this.callApi({
3508
+ updateAutoModSettings: async (params, body = null, options = {}) => this.callApi({
3469
3509
  path: "/moderation/automod/settings",
3470
3510
  method: "PUT",
3471
3511
  params,
@@ -3503,7 +3543,7 @@ var TwitchApi = class {
3503
3543
  *
3504
3544
  * @see https://dev.twitch.tv/docs/api/reference#get-banned-users
3505
3545
  */
3506
- getBannedUsers: async (params, options) => this.callApi({
3546
+ getBannedUsers: async (params, options = {}) => this.callApi({
3507
3547
  path: "/moderation/banned",
3508
3548
  params,
3509
3549
  options
@@ -3564,7 +3604,7 @@ var TwitchApi = class {
3564
3604
  *
3565
3605
  * @see https://dev.twitch.tv/docs/api/reference#ban-user
3566
3606
  */
3567
- banUser: async (params, body, options) => this.callApi({
3607
+ banUser: async (params, body, options = {}) => this.callApi({
3568
3608
  path: "/moderation/bans",
3569
3609
  method: "POST",
3570
3610
  params,
@@ -3619,12 +3659,101 @@ var TwitchApi = class {
3619
3659
  *
3620
3660
  * @see https://dev.twitch.tv/docs/api/reference#unban-user
3621
3661
  */
3622
- unbanUser: async (params, options) => this.callApi({
3662
+ unbanUser: async (params, options = {}) => this.callApi({
3623
3663
  path: "/moderation/bans",
3624
3664
  method: "DELETE",
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
  *
@@ -3661,7 +3790,7 @@ var TwitchApi = class {
3661
3790
  *
3662
3791
  * @see https://dev.twitch.tv/docs/api/reference#get-blocked-terms
3663
3792
  */
3664
- getBlockedTerms: async (params, options) => this.callApi({
3793
+ getBlockedTerms: async (params, options = {}) => this.callApi({
3665
3794
  path: "/moderation/blocked_terms",
3666
3795
  params,
3667
3796
  options
@@ -3704,7 +3833,7 @@ var TwitchApi = class {
3704
3833
  *
3705
3834
  * @see https://dev.twitch.tv/docs/api/reference#add-blocked-term
3706
3835
  */
3707
- addBlockedTerm: async (params, body, options) => this.callApi({
3836
+ addBlockedTerm: async (params, body, options = {}) => this.callApi({
3708
3837
  path: "/moderation/blocked_terms",
3709
3838
  method: "POST",
3710
3839
  params,
@@ -3748,7 +3877,7 @@ var TwitchApi = class {
3748
3877
  *
3749
3878
  * @see https://dev.twitch.tv/docs/api/reference#remove-blocked-term
3750
3879
  */
3751
- removeBlockedTerm: async (params, options) => this.callApi({
3880
+ removeBlockedTerm: async (params, options = {}) => this.callApi({
3752
3881
  path: "/moderation/blocked_terms",
3753
3882
  method: "DELETE",
3754
3883
  params,
@@ -3794,14 +3923,14 @@ var TwitchApi = class {
3794
3923
  *
3795
3924
  * @see https://dev.twitch.tv/docs/api/reference#delete-chat-messages
3796
3925
  */
3797
- deleteChatMessages: async (params, options) => this.callApi({
3926
+ deleteChatMessages: async (params, options = {}) => this.callApi({
3798
3927
  path: "/moderation/chat",
3799
3928
  method: "DELETE",
3800
3929
  params,
3801
3930
  options
3802
3931
  }),
3803
3932
  /**
3804
- * BETA Gets a list of channels that the specified user has moderator privileges in.
3933
+ * Gets a list of channels that the specified user has moderator privileges in.
3805
3934
  *
3806
3935
  * __Authorization:__
3807
3936
  *
@@ -3826,7 +3955,7 @@ var TwitchApi = class {
3826
3955
  *
3827
3956
  * @see https://dev.twitch.tv/docs/api/reference#get-moderated-channels
3828
3957
  */
3829
- getModeratedChannels: async (params, options) => this.callApi({
3958
+ getModeratedChannels: async (params, options = {}) => this.callApi({
3830
3959
  path: "/moderation/channels",
3831
3960
  params,
3832
3961
  options
@@ -3862,7 +3991,7 @@ var TwitchApi = class {
3862
3991
  *
3863
3992
  * @see https://dev.twitch.tv/docs/api/reference#get-moderators
3864
3993
  */
3865
- getModerators: async (params, options) => this.callApi({
3994
+ getModerators: async (params, options = {}) => this.callApi({
3866
3995
  path: "/moderation/moderators",
3867
3996
  params,
3868
3997
  options
@@ -3911,7 +4040,7 @@ var TwitchApi = class {
3911
4040
  *
3912
4041
  * @see https://dev.twitch.tv/docs/api/reference#add-channel-moderator
3913
4042
  */
3914
- addChannelModerator: async (params, options) => this.callApi({
4043
+ addChannelModerator: async (params, options = {}) => this.callApi({
3915
4044
  path: "/moderation/moderators",
3916
4045
  method: "POST",
3917
4046
  params,
@@ -3956,7 +4085,7 @@ var TwitchApi = class {
3956
4085
  *
3957
4086
  * @see https://dev.twitch.tv/docs/api/reference#remove-channel-moderator
3958
4087
  */
3959
- removeChannelModerator: async (params, options) => this.callApi({
4088
+ removeChannelModerator: async (params, options = {}) => this.callApi({
3960
4089
  path: "/moderation/moderators",
3961
4090
  method: "DELETE",
3962
4091
  params,
@@ -3995,7 +4124,7 @@ var TwitchApi = class {
3995
4124
  *
3996
4125
  * @see https://dev.twitch.tv/docs/api/reference#get-vips
3997
4126
  */
3998
- getVIPs: async (params, options) => this.callApi({
4127
+ getVIPs: async (params, options = {}) => this.callApi({
3999
4128
  path: "/channels/vips",
4000
4129
  params,
4001
4130
  options
@@ -4061,7 +4190,7 @@ var TwitchApi = class {
4061
4190
  *
4062
4191
  * @see https://dev.twitch.tv/docs/api/reference#add-channel-vip
4063
4192
  */
4064
- addChannelVIP: async (params, options) => this.callApi({
4193
+ addChannelVIP: async (params, options = {}) => this.callApi({
4065
4194
  path: "/channels/vips",
4066
4195
  method: "POST",
4067
4196
  params,
@@ -4120,7 +4249,7 @@ var TwitchApi = class {
4120
4249
  *
4121
4250
  * @see https://dev.twitch.tv/docs/api/reference#remove-channel-vip
4122
4251
  */
4123
- removeChannelVIP: async (params, options) => this.callApi({
4252
+ removeChannelVIP: async (params, options = {}) => this.callApi({
4124
4253
  path: "/channels/vips",
4125
4254
  method: "DELETE",
4126
4255
  params,
@@ -4166,7 +4295,7 @@ var TwitchApi = class {
4166
4295
  *
4167
4296
  * @see https://dev.twitch.tv/docs/api/reference#update-shield-mode-status
4168
4297
  */
4169
- updateShieldModeStatus: async (params, body, options) => this.callApi({
4298
+ updateShieldModeStatus: async (params, body, options = {}) => this.callApi({
4170
4299
  path: "/moderation/shield_mode",
4171
4300
  method: "PUT",
4172
4301
  params,
@@ -4211,7 +4340,7 @@ var TwitchApi = class {
4211
4340
  *
4212
4341
  * @see https://dev.twitch.tv/docs/api/reference#get-shield-mode-status
4213
4342
  */
4214
- getShieldModeStatus: async (params, options) => this.callApi({
4343
+ getShieldModeStatus: async (params, options = {}) => this.callApi({
4215
4344
  path: "/moderation/shield_mode",
4216
4345
  params,
4217
4346
  options
@@ -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
  *
@@ -4255,7 +4384,7 @@ var TwitchApi = class {
4255
4384
  *
4256
4385
  * @see https://dev.twitch.tv/docs/api/reference#get-polls
4257
4386
  */
4258
- getPolls: async (params, options) => this.callApi({
4387
+ getPolls: async (params, options = {}) => this.callApi({
4259
4388
  path: "/polls",
4260
4389
  params,
4261
4390
  options
@@ -4304,7 +4433,7 @@ var TwitchApi = class {
4304
4433
  *
4305
4434
  * @see https://dev.twitch.tv/docs/api/reference#create-poll
4306
4435
  */
4307
- createPoll: async (body, options) => this.callApi({
4436
+ createPoll: async (body, options = {}) => this.callApi({
4308
4437
  path: "/polls",
4309
4438
  method: "POST",
4310
4439
  body,
@@ -4345,7 +4474,7 @@ var TwitchApi = class {
4345
4474
  *
4346
4475
  * @see https://dev.twitch.tv/docs/api/reference#end-poll
4347
4476
  */
4348
- endPoll: async (body, options) => this.callApi({
4477
+ endPoll: async (body, options = {}) => this.callApi({
4349
4478
  path: "/polls",
4350
4479
  method: "PATCH",
4351
4480
  body,
@@ -4384,7 +4513,7 @@ var TwitchApi = class {
4384
4513
  *
4385
4514
  * @see https://dev.twitch.tv/docs/api/reference#get-predictions
4386
4515
  */
4387
- getPredictions: async (params, options) => this.callApi({
4516
+ getPredictions: async (params, options = {}) => this.callApi({
4388
4517
  path: "/predictions",
4389
4518
  params,
4390
4519
  options
@@ -4433,7 +4562,7 @@ var TwitchApi = class {
4433
4562
  *
4434
4563
  * @see https://dev.twitch.tv/docs/api/reference#create-prediction
4435
4564
  */
4436
- createPrediction: async (body, options) => this.callApi({
4565
+ createPrediction: async (body, options = {}) => this.callApi({
4437
4566
  path: "/predictions",
4438
4567
  method: "POST",
4439
4568
  body,
@@ -4481,7 +4610,7 @@ var TwitchApi = class {
4481
4610
  *
4482
4611
  * @see https://dev.twitch.tv/docs/api/reference#end-prediction
4483
4612
  */
4484
- endPrediction: async (body, options) => this.callApi({
4613
+ endPrediction: async (body, options = {}) => this.callApi({
4485
4614
  path: "/predictions",
4486
4615
  method: "PATCH",
4487
4616
  body,
@@ -4545,7 +4674,7 @@ var TwitchApi = class {
4545
4674
  *
4546
4675
  * @see https://dev.twitch.tv/docs/api/reference#start-a-raid
4547
4676
  */
4548
- startRaid: async (params = null, options) => this.callApi({
4677
+ startRaid: async (params = null, options = {}) => this.callApi({
4549
4678
  path: "/raids",
4550
4679
  method: "POST",
4551
4680
  params,
@@ -4594,7 +4723,7 @@ var TwitchApi = class {
4594
4723
  *
4595
4724
  * @see https://dev.twitch.tv/docs/api/reference#cancel-a-raid
4596
4725
  */
4597
- cancelRaid: async (params, options) => this.callApi({
4726
+ cancelRaid: async (params, options = {}) => this.callApi({
4598
4727
  path: "/raids",
4599
4728
  method: "DELETE",
4600
4729
  params,
@@ -4642,7 +4771,7 @@ var TwitchApi = class {
4642
4771
  *
4643
4772
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-stream-schedule
4644
4773
  */
4645
- getChannelStreamSchedule: async (params, options) => this.callApi({
4774
+ getChannelStreamSchedule: async (params, options = {}) => this.callApi({
4646
4775
  path: "/schedule",
4647
4776
  params,
4648
4777
  options
@@ -4677,7 +4806,7 @@ var TwitchApi = class {
4677
4806
  *
4678
4807
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-icalendar
4679
4808
  */
4680
- getChannelICalendar: async (params, options) => this.callApi({
4809
+ getChannelICalendar: async (params, options = {}) => this.callApi({
4681
4810
  path: "/schedule/icalendar",
4682
4811
  params,
4683
4812
  options
@@ -4721,7 +4850,7 @@ var TwitchApi = class {
4721
4850
  *
4722
4851
  * @see https://dev.twitch.tv/docs/api/reference#update-channel-stream-schedule
4723
4852
  */
4724
- updateChannelStreamSchedule: async (params, options) => this.callApi({
4853
+ updateChannelStreamSchedule: async (params, options = {}) => this.callApi({
4725
4854
  path: "/schedule/settings",
4726
4855
  method: "PATCH",
4727
4856
  params,
@@ -4768,7 +4897,7 @@ var TwitchApi = class {
4768
4897
  *
4769
4898
  * @see https://dev.twitch.tv/docs/api/reference#create-channel-stream-schedule-segment
4770
4899
  */
4771
- createChannelStreamScheduleSegment: async (params, body, options) => this.callApi({
4900
+ createChannelStreamScheduleSegment: async (params, body, options = {}) => this.callApi({
4772
4901
  path: "/schedule/segment",
4773
4902
  method: "POST",
4774
4903
  params,
@@ -4820,7 +4949,7 @@ var TwitchApi = class {
4820
4949
  *
4821
4950
  * @see https://dev.twitch.tv/docs/api/reference#update-channel-stream-schedule-segment
4822
4951
  */
4823
- updateChannelStreamScheduleSegment: async (params, body = null, options) => this.callApi({
4952
+ updateChannelStreamScheduleSegment: async (params, body = null, options = {}) => this.callApi({
4824
4953
  path: "/schedule/segment",
4825
4954
  method: "PATCH",
4826
4955
  params,
@@ -4863,7 +4992,7 @@ var TwitchApi = class {
4863
4992
  *
4864
4993
  * @see https://dev.twitch.tv/docs/api/reference#delete-channel-stream-schedule-segment
4865
4994
  */
4866
- deleteChannelStreamScheduleSegment: async (params, options) => this.callApi({
4995
+ deleteChannelStreamScheduleSegment: async (params, options = {}) => this.callApi({
4867
4996
  path: "/schedule/segment",
4868
4997
  method: "DELETE",
4869
4998
  params,
@@ -4902,7 +5031,7 @@ var TwitchApi = class {
4902
5031
  *
4903
5032
  * @see https://dev.twitch.tv/docs/api/reference#search-categories
4904
5033
  */
4905
- searchCategories: async (params, options) => this.callApi({
5034
+ searchCategories: async (params, options = {}) => this.callApi({
4906
5035
  path: "/search/categories",
4907
5036
  params,
4908
5037
  options
@@ -4942,7 +5071,7 @@ var TwitchApi = class {
4942
5071
  *
4943
5072
  * @see https://dev.twitch.tv/docs/api/reference#search-channels
4944
5073
  */
4945
- searchChannels: async (params, options) => this.callApi({
5074
+ searchChannels: async (params, options = {}) => this.callApi({
4946
5075
  path: "/search/channels",
4947
5076
  params,
4948
5077
  options
@@ -4981,7 +5110,7 @@ var TwitchApi = class {
4981
5110
  *
4982
5111
  * @see https://dev.twitch.tv/docs/api/reference#get-stream-key
4983
5112
  */
4984
- getStreamKey: async (params, options) => this.callApi({
5113
+ getStreamKey: async (params, options = {}) => this.callApi({
4985
5114
  path: "/streams/key",
4986
5115
  params,
4987
5116
  options
@@ -5015,7 +5144,7 @@ var TwitchApi = class {
5015
5144
  *
5016
5145
  * @see https://dev.twitch.tv/docs/api/reference#get-streams
5017
5146
  */
5018
- getStreams: async (params = null, options) => this.callApi({
5147
+ getStreams: async (params = null, options = {}) => this.callApi({
5019
5148
  path: "/streams",
5020
5149
  params,
5021
5150
  options
@@ -5051,7 +5180,7 @@ var TwitchApi = class {
5051
5180
  *
5052
5181
  * @see https://dev.twitch.tv/docs/api/reference#get-followed-streams
5053
5182
  */
5054
- getFollowedStreams: async (params, options) => this.callApi({
5183
+ getFollowedStreams: async (params, options = {}) => this.callApi({
5055
5184
  path: "/streams/followed",
5056
5185
  params,
5057
5186
  options
@@ -5104,7 +5233,7 @@ var TwitchApi = class {
5104
5233
  *
5105
5234
  * @see https://dev.twitch.tv/docs/api/reference#create-stream-marker
5106
5235
  */
5107
- createStreamMarker: async (body, options) => this.callApi({
5236
+ createStreamMarker: async (body, options = {}) => this.callApi({
5108
5237
  path: "/streams/markers",
5109
5238
  method: "POST",
5110
5239
  body,
@@ -5148,7 +5277,7 @@ var TwitchApi = class {
5148
5277
  *
5149
5278
  * @see https://dev.twitch.tv/docs/api/reference#get-stream-markers
5150
5279
  */
5151
- getStreamMarkers: async (params = null, options) => this.callApi({
5280
+ getStreamMarkers: async (params = null, options = {}) => this.callApi({
5152
5281
  path: "/streams/markers",
5153
5282
  params,
5154
5283
  options
@@ -5188,7 +5317,7 @@ var TwitchApi = class {
5188
5317
  *
5189
5318
  * @see https://dev.twitch.tv/docs/api/reference#get-broadcaster-subscriptions
5190
5319
  */
5191
- getBroadcasterSubscriptions: async (params, options) => this.callApi({
5320
+ getBroadcasterSubscriptions: async (params, options = {}) => this.callApi({
5192
5321
  path: "/subscriptions",
5193
5322
  params,
5194
5323
  options
@@ -5231,7 +5360,7 @@ var TwitchApi = class {
5231
5360
  *
5232
5361
  * @see https://dev.twitch.tv/docs/api/reference#check-user-subscription
5233
5362
  */
5234
- checkUserSubscription: async (params, options) => this.callApi({
5363
+ checkUserSubscription: async (params, options = {}) => this.callApi({
5235
5364
  path: "/subscriptions/user",
5236
5365
  params,
5237
5366
  options
@@ -5270,7 +5399,7 @@ var TwitchApi = class {
5270
5399
  *
5271
5400
  * @see https://dev.twitch.tv/docs/api/reference#get-all-stream-tags
5272
5401
  */
5273
- getAllStreamTags: async (params = null, options) => this.callApi({
5402
+ getAllStreamTags: async (params = null, options = {}) => this.callApi({
5274
5403
  path: "/tags/streams",
5275
5404
  params,
5276
5405
  options
@@ -5307,7 +5436,7 @@ var TwitchApi = class {
5307
5436
  *
5308
5437
  * @see https://dev.twitch.tv/docs/api/reference#get-stream-tags
5309
5438
  */
5310
- getStreamTags: async (params, options) => this.callApi({
5439
+ getStreamTags: async (params, options = {}) => this.callApi({
5311
5440
  path: "/streams/tags",
5312
5441
  params,
5313
5442
  options
@@ -5347,7 +5476,7 @@ var TwitchApi = class {
5347
5476
  *
5348
5477
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-teams
5349
5478
  */
5350
- getChannelTeams: async (params, options) => this.callApi({
5479
+ getChannelTeams: async (params, options = {}) => this.callApi({
5351
5480
  path: "/teams/channel",
5352
5481
  params,
5353
5482
  options
@@ -5367,7 +5496,7 @@ var TwitchApi = class {
5367
5496
  *
5368
5497
  * _200 OK_
5369
5498
  *
5370
- * Successfully retrieved the team’s information.
5499
+ * Successfully retrieved the team's information.
5371
5500
  *
5372
5501
  * _400 Bad Request_
5373
5502
  *
@@ -5387,7 +5516,7 @@ var TwitchApi = class {
5387
5516
  *
5388
5517
  * @see https://dev.twitch.tv/docs/api/reference#get-teams
5389
5518
  */
5390
- getTeams: async (params = null, options) => this.callApi({
5519
+ getTeams: async (params = null, options = {}) => this.callApi({
5391
5520
  path: "/teams",
5392
5521
  params,
5393
5522
  options
@@ -5415,7 +5544,7 @@ var TwitchApi = class {
5415
5544
  *
5416
5545
  * _200 OK_
5417
5546
  *
5418
- * Successfully retrieved the specified users’ information.
5547
+ * Successfully retrieved the specified users' information.
5419
5548
  *
5420
5549
  * _400 Bad Request_
5421
5550
  *
@@ -5430,7 +5559,7 @@ var TwitchApi = class {
5430
5559
  *
5431
5560
  * @see https://dev.twitch.tv/docs/api/reference#get-users
5432
5561
  */
5433
- getUsers: async (params = null, options) => this.callApi({
5562
+ getUsers: async (params = null, options = {}) => this.callApi({
5434
5563
  path: "/users",
5435
5564
  params,
5436
5565
  options
@@ -5452,7 +5581,7 @@ var TwitchApi = class {
5452
5581
  *
5453
5582
  * _200 OK_
5454
5583
  *
5455
- * Successfully updated the specified user’s information.
5584
+ * Successfully updated the specified user's information.
5456
5585
  *
5457
5586
  * _400 Bad Request_
5458
5587
  *
@@ -5467,7 +5596,7 @@ var TwitchApi = class {
5467
5596
  *
5468
5597
  * @see https://dev.twitch.tv/docs/api/reference#update-user
5469
5598
  */
5470
- updateUser: async (params = null, options) => this.callApi({
5599
+ updateUser: async (params = null, options = {}) => this.callApi({
5471
5600
  path: "/users",
5472
5601
  method: "PUT",
5473
5602
  params,
@@ -5488,7 +5617,7 @@ var TwitchApi = class {
5488
5617
  *
5489
5618
  * _200 OK_
5490
5619
  *
5491
- * Successfully retrieved the broadcaster’s list of blocked users.
5620
+ * Successfully retrieved the broadcaster's list of blocked users.
5492
5621
  *
5493
5622
  * _400 Bad Request_
5494
5623
  *
@@ -5504,7 +5633,7 @@ var TwitchApi = class {
5504
5633
  *
5505
5634
  * @see https://dev.twitch.tv/docs/api/reference#get-user-block-list
5506
5635
  */
5507
- getUserBlockList: async (params, options) => this.callApi({
5636
+ getUserBlockList: async (params, options = {}) => this.callApi({
5508
5637
  path: "/users/blocks",
5509
5638
  params,
5510
5639
  options
@@ -5544,7 +5673,7 @@ var TwitchApi = class {
5544
5673
  *
5545
5674
  * @see https://dev.twitch.tv/docs/api/reference#block-user
5546
5675
  */
5547
- blockUser: async (params, options) => this.callApi({
5676
+ blockUser: async (params, options = {}) => this.callApi({
5548
5677
  path: "/users/blocks",
5549
5678
  method: "PUT",
5550
5679
  params,
@@ -5580,7 +5709,7 @@ var TwitchApi = class {
5580
5709
  *
5581
5710
  * @see https://dev.twitch.tv/docs/api/reference#unblock-user
5582
5711
  */
5583
- unblockUser: async (params, options) => this.callApi({
5712
+ unblockUser: async (params, options = {}) => this.callApi({
5584
5713
  path: "/users/blocks",
5585
5714
  method: "DELETE",
5586
5715
  params,
@@ -5601,7 +5730,7 @@ var TwitchApi = class {
5601
5730
  *
5602
5731
  * _200 OK_
5603
5732
  *
5604
- * Successfully retrieved the user’s installed extensions.
5733
+ * Successfully retrieved the user's installed extensions.
5605
5734
  *
5606
5735
  * _401 Unauthorized_
5607
5736
  *
@@ -5612,7 +5741,7 @@ var TwitchApi = class {
5612
5741
  *
5613
5742
  * @see https://dev.twitch.tv/docs/api/reference#get-user-extensions
5614
5743
  */
5615
- getUserExtensions: async (options) => this.callApi({
5744
+ getUserExtensions: async (options = {}) => this.callApi({
5616
5745
  path: "/users/extensions/list",
5617
5746
  options
5618
5747
  }),
@@ -5633,7 +5762,7 @@ var TwitchApi = class {
5633
5762
  *
5634
5763
  * _200 OK_
5635
5764
  *
5636
- * Successfully retrieved the user’s active extensions.
5765
+ * Successfully retrieved the user's active extensions.
5637
5766
  *
5638
5767
  * _400 Bad Request_
5639
5768
  *
@@ -5647,7 +5776,7 @@ var TwitchApi = class {
5647
5776
  *
5648
5777
  * @see https://dev.twitch.tv/docs/api/reference#get-user-active-extensions
5649
5778
  */
5650
- getUserActiveExtensions: async (params = null, options) => this.callApi({
5779
+ getUserActiveExtensions: async (params = null, options = {}) => this.callApi({
5651
5780
  path: "/users/extensions",
5652
5781
  params,
5653
5782
  options
@@ -5688,7 +5817,7 @@ var TwitchApi = class {
5688
5817
  *
5689
5818
  * @see https://dev.twitch.tv/docs/api/reference#update-user-extensions
5690
5819
  */
5691
- updateUserExtensions: async (body, options) => this.callApi({
5820
+ updateUserExtensions: async (body, options = {}) => this.callApi({
5692
5821
  path: "/users/extensions",
5693
5822
  method: "PUT",
5694
5823
  body,
@@ -5738,7 +5867,7 @@ var TwitchApi = class {
5738
5867
  *
5739
5868
  * @see https://dev.twitch.tv/docs/api/reference#get-videos
5740
5869
  */
5741
- getVideos: async (params = null, options) => this.callApi({
5870
+ getVideos: async (params = null, options = {}) => this.callApi({
5742
5871
  path: "/videos",
5743
5872
  params,
5744
5873
  options
@@ -5775,7 +5904,7 @@ var TwitchApi = class {
5775
5904
  *
5776
5905
  * @see https://dev.twitch.tv/docs/api/reference#delete-videos
5777
5906
  */
5778
- deleteVideos: async (params, options) => this.callApi({
5907
+ deleteVideos: async (params, options = {}) => this.callApi({
5779
5908
  path: "/videos",
5780
5909
  method: "DELETE",
5781
5910
  params,
@@ -5839,7 +5968,7 @@ var TwitchApi = class {
5839
5968
  *
5840
5969
  * @see https://dev.twitch.tv/docs/api/reference#send-whisper
5841
5970
  */
5842
- sendWhisper: async (params, body, options) => this.callApi({
5971
+ sendWhisper: async (params, body, options = {}) => this.callApi({
5843
5972
  path: "/whispers",
5844
5973
  method: "POST",
5845
5974
  params,