@distilled.cloud/twitch 0.0.0-stage → 1.0.0-rc.21

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.
Files changed (214) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +83 -2
  3. package/lib/.lazy.json +1 -0
  4. package/lib/_bundle/lazy.js +4 -0
  5. package/lib/_bundle/sdk.js +2 -0
  6. package/lib/_bundle/sdk.js.map +1 -0
  7. package/lib/credentials.d.ts +31 -0
  8. package/lib/credentials.d.ts.map +1 -0
  9. package/lib/credentials.js +1 -0
  10. package/lib/errors.d.ts +49 -0
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/errors.js +1 -0
  13. package/lib/index.d.ts +46 -0
  14. package/lib/index.d.ts.map +1 -0
  15. package/lib/index.js +6 -0
  16. package/lib/pagination.d.ts +10 -0
  17. package/lib/pagination.d.ts.map +1 -0
  18. package/lib/pagination.js +1 -0
  19. package/lib/protocol.d.ts +19 -0
  20. package/lib/protocol.d.ts.map +1 -0
  21. package/lib/protocol.js +1 -0
  22. package/lib/retry.d.ts +50 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +1 -0
  25. package/lib/services/ads.d.ts +75 -0
  26. package/lib/services/ads.d.ts.map +1 -0
  27. package/lib/services/ads.js +2 -0
  28. package/lib/services/ads.js.map +1 -0
  29. package/lib/services/analytics.d.ts +90 -0
  30. package/lib/services/analytics.d.ts.map +1 -0
  31. package/lib/services/analytics.js +2 -0
  32. package/lib/services/analytics.js.map +1 -0
  33. package/lib/services/bits.d.ts +284 -0
  34. package/lib/services/bits.d.ts.map +1 -0
  35. package/lib/services/bits.js +2 -0
  36. package/lib/services/bits.js.map +1 -0
  37. package/lib/services/ccls.d.ts +26 -0
  38. package/lib/services/ccls.d.ts.map +1 -0
  39. package/lib/services/ccls.js +2 -0
  40. package/lib/services/ccls.js.map +1 -0
  41. package/lib/services/channel_points.d.ts +416 -0
  42. package/lib/services/channel_points.d.ts.map +1 -0
  43. package/lib/services/channel_points.js +2 -0
  44. package/lib/services/channel_points.js.map +1 -0
  45. package/lib/services/channels.d.ts +173 -0
  46. package/lib/services/channels.d.ts.map +1 -0
  47. package/lib/services/channels.js +2 -0
  48. package/lib/services/channels.js.map +1 -0
  49. package/lib/services/charity.d.ts +97 -0
  50. package/lib/services/charity.d.ts.map +1 -0
  51. package/lib/services/charity.js +2 -0
  52. package/lib/services/charity.js.map +1 -0
  53. package/lib/services/chat.d.ts +638 -0
  54. package/lib/services/chat.d.ts.map +1 -0
  55. package/lib/services/chat.js +33 -0
  56. package/lib/services/chat.js.map +1 -0
  57. package/lib/services/clips.d.ts +153 -0
  58. package/lib/services/clips.d.ts.map +1 -0
  59. package/lib/services/clips.js +2 -0
  60. package/lib/services/clips.js.map +1 -0
  61. package/lib/services/conduits.d.ts +172 -0
  62. package/lib/services/conduits.d.ts.map +1 -0
  63. package/lib/services/conduits.js +2 -0
  64. package/lib/services/conduits.js.map +1 -0
  65. package/lib/services/entitlements.d.ts +76 -0
  66. package/lib/services/entitlements.d.ts.map +1 -0
  67. package/lib/services/entitlements.js +2 -0
  68. package/lib/services/entitlements.js.map +1 -0
  69. package/lib/services/eventsub.d.ts +158 -0
  70. package/lib/services/eventsub.d.ts.map +1 -0
  71. package/lib/services/eventsub.js +2 -0
  72. package/lib/services/eventsub.js.map +1 -0
  73. package/lib/services/extensions.d.ts +497 -0
  74. package/lib/services/extensions.d.ts.map +1 -0
  75. package/lib/services/extensions.js +2 -0
  76. package/lib/services/extensions.js.map +1 -0
  77. package/lib/services/games.d.ts +57 -0
  78. package/lib/services/games.d.ts.map +1 -0
  79. package/lib/services/games.js +2 -0
  80. package/lib/services/games.js.map +1 -0
  81. package/lib/services/goals.d.ts +37 -0
  82. package/lib/services/goals.d.ts.map +1 -0
  83. package/lib/services/goals.js +2 -0
  84. package/lib/services/goals.js.map +1 -0
  85. package/lib/services/guest_star.d.ts +314 -0
  86. package/lib/services/guest_star.d.ts.map +1 -0
  87. package/lib/services/guest_star.js +2 -0
  88. package/lib/services/guest_star.js.map +1 -0
  89. package/lib/services/hype_train.d.ts +91 -0
  90. package/lib/services/hype_train.d.ts.map +1 -0
  91. package/lib/services/hype_train.js +2 -0
  92. package/lib/services/hype_train.js.map +1 -0
  93. package/lib/services/index.d.ts +30 -0
  94. package/lib/services/index.d.ts.map +1 -0
  95. package/lib/services/index.js +29 -0
  96. package/lib/services/moderation.d.ts +731 -0
  97. package/lib/services/moderation.d.ts.map +1 -0
  98. package/lib/services/moderation.js +41 -0
  99. package/lib/services/moderation.js.map +1 -0
  100. package/lib/services/polls.d.ts +173 -0
  101. package/lib/services/polls.d.ts.map +1 -0
  102. package/lib/services/polls.js +2 -0
  103. package/lib/services/polls.js.map +1 -0
  104. package/lib/services/predictions.d.ts +221 -0
  105. package/lib/services/predictions.d.ts.map +1 -0
  106. package/lib/services/predictions.js +2 -0
  107. package/lib/services/predictions.js.map +1 -0
  108. package/lib/services/raids.d.ts +34 -0
  109. package/lib/services/raids.d.ts.map +1 -0
  110. package/lib/services/raids.js +2 -0
  111. package/lib/services/raids.js.map +1 -0
  112. package/lib/services/schedule.d.ts +223 -0
  113. package/lib/services/schedule.d.ts.map +1 -0
  114. package/lib/services/schedule.js +2 -0
  115. package/lib/services/schedule.js.map +1 -0
  116. package/lib/services/search.d.ts +89 -0
  117. package/lib/services/search.d.ts.map +1 -0
  118. package/lib/services/search.js +2 -0
  119. package/lib/services/search.js.map +1 -0
  120. package/lib/services/streams.d.ts +235 -0
  121. package/lib/services/streams.d.ts.map +1 -0
  122. package/lib/services/streams.js +2 -0
  123. package/lib/services/streams.js.map +1 -0
  124. package/lib/services/subscriptions.d.ts +96 -0
  125. package/lib/services/subscriptions.d.ts.map +1 -0
  126. package/lib/services/subscriptions.js +2 -0
  127. package/lib/services/subscriptions.js.map +1 -0
  128. package/lib/services/teams.d.ts +90 -0
  129. package/lib/services/teams.d.ts.map +1 -0
  130. package/lib/services/teams.js +2 -0
  131. package/lib/services/teams.js.map +1 -0
  132. package/lib/services/users.d.ts +324 -0
  133. package/lib/services/users.d.ts.map +1 -0
  134. package/lib/services/users.js +2 -0
  135. package/lib/services/users.js.map +1 -0
  136. package/lib/services/videos.d.ts +101 -0
  137. package/lib/services/videos.d.ts.map +1 -0
  138. package/lib/services/videos.js +2 -0
  139. package/lib/services/videos.js.map +1 -0
  140. package/lib/services/whispers.d.ts +17 -0
  141. package/lib/services/whispers.d.ts.map +1 -0
  142. package/lib/services/whispers.js +2 -0
  143. package/lib/services/whispers.js.map +1 -0
  144. package/lib/services.lazy/ads.js +1 -0
  145. package/lib/services.lazy/analytics.js +1 -0
  146. package/lib/services.lazy/bits.js +1 -0
  147. package/lib/services.lazy/ccls.js +1 -0
  148. package/lib/services.lazy/channel_points.js +1 -0
  149. package/lib/services.lazy/channels.js +1 -0
  150. package/lib/services.lazy/charity.js +1 -0
  151. package/lib/services.lazy/chat.js +3 -0
  152. package/lib/services.lazy/clips.js +1 -0
  153. package/lib/services.lazy/conduits.js +1 -0
  154. package/lib/services.lazy/entitlements.js +1 -0
  155. package/lib/services.lazy/eventsub.js +1 -0
  156. package/lib/services.lazy/extensions.js +1 -0
  157. package/lib/services.lazy/games.js +1 -0
  158. package/lib/services.lazy/goals.js +1 -0
  159. package/lib/services.lazy/guest_star.js +1 -0
  160. package/lib/services.lazy/hype_train.js +1 -0
  161. package/lib/services.lazy/index.js +3 -0
  162. package/lib/services.lazy/moderation.js +3 -0
  163. package/lib/services.lazy/polls.js +1 -0
  164. package/lib/services.lazy/predictions.js +1 -0
  165. package/lib/services.lazy/raids.js +1 -0
  166. package/lib/services.lazy/schedule.js +1 -0
  167. package/lib/services.lazy/search.js +1 -0
  168. package/lib/services.lazy/streams.js +1 -0
  169. package/lib/services.lazy/subscriptions.js +1 -0
  170. package/lib/services.lazy/teams.js +1 -0
  171. package/lib/services.lazy/users.js +1 -0
  172. package/lib/services.lazy/videos.js +1 -0
  173. package/lib/services.lazy/whispers.js +1 -0
  174. package/lib/traits.d.ts +10 -0
  175. package/lib/traits.d.ts.map +1 -0
  176. package/lib/traits.js +1 -0
  177. package/package.json +88 -3
  178. package/src/credentials.ts +79 -0
  179. package/src/errors.ts +78 -0
  180. package/src/index.ts +45 -0
  181. package/src/pagination.ts +9 -0
  182. package/src/protocol.ts +43 -0
  183. package/src/retry.ts +69 -0
  184. package/src/services/ads.ts +228 -0
  185. package/src/services/analytics.ts +253 -0
  186. package/src/services/bits.ts +631 -0
  187. package/src/services/ccls.ts +96 -0
  188. package/src/services/channel_points.ts +804 -0
  189. package/src/services/channels.ts +471 -0
  190. package/src/services/charity.ts +250 -0
  191. package/src/services/chat.ts +1547 -0
  192. package/src/services/clips.ts +385 -0
  193. package/src/services/conduits.ts +453 -0
  194. package/src/services/entitlements.ts +219 -0
  195. package/src/services/eventsub.ts +372 -0
  196. package/src/services/extensions.ts +1098 -0
  197. package/src/services/games.ts +184 -0
  198. package/src/services/goals.ts +110 -0
  199. package/src/services/guest_star.ts +762 -0
  200. package/src/services/hype_train.ts +214 -0
  201. package/src/services/index.ts +30 -0
  202. package/src/services/moderation.ts +1817 -0
  203. package/src/services/polls.ts +363 -0
  204. package/src/services/predictions.ts +432 -0
  205. package/src/services/raids.ts +127 -0
  206. package/src/services/schedule.ts +539 -0
  207. package/src/services/search.ts +248 -0
  208. package/src/services/streams.ts +579 -0
  209. package/src/services/subscriptions.ts +247 -0
  210. package/src/services/teams.ts +225 -0
  211. package/src/services/users.ts +729 -0
  212. package/src/services/videos.ts +257 -0
  213. package/src/services/whispers.ts +71 -0
  214. package/src/traits.ts +47 -0
@@ -0,0 +1,762 @@
1
+ import * as API from "@distilled.cloud/core/api";
2
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-twitch/specs/api/reference). Do not edit.
3
+ import * as S from "@distilled.cloud/core/schema-lite";
4
+ import * as __L from "@distilled.cloud/core/schema-lite";
5
+ import type * as Redacted from "effect/Redacted";
6
+ import { TwitchServiceErrors } from "../errors.ts";
7
+ import { TwitchProtocol, type TwitchOpError, type TwitchOpContext } from "../protocol.ts";
8
+ import * as Retry from "../retry.ts";
9
+ import * as T from "../traits.ts";
10
+ // Schema table, filled on first reach (see __S at the end).
11
+ const __s: any[] = [];
12
+
13
+ export type { TwitchOpError, TwitchOpContext };
14
+
15
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
16
+ const TELEMETRY = {
17
+ system: "twitch-api",
18
+ responseHeaders: [
19
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
20
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
21
+ ],
22
+ prefix: "Twitch",
23
+ service: "GuestStar",
24
+ propagate: "w3c",
25
+ } as const;
26
+
27
+ export interface AssignGuestStarSlotRequest {
28
+ /** The ID of the broadcaster running the Guest Star session. */
29
+ broadcaster_id: string;
30
+ /** The ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the `user_id` in the user access token. */
31
+ moderator_id: string;
32
+ /** The ID of the Guest Star session in which to assign the slot. */
33
+ session_id: string;
34
+ /** The Twitch User ID corresponding to the guest to assign a slot in the session. This user must already have an invite to this session, and have indicated that they are ready to join. */
35
+ guest_id: string;
36
+ /** The slot assignment to give to the user. Must be a numeric identifier between "1" and "N" where N is the max number of slots for the session. Max number of slots allowed for the session is reported by [Get Channel Guest Star Settings](#get-channel-guest-star-settings). If another guest already holds the slot, that guest is removed from the slot and replaced. */
37
+ slot_id: string;
38
+ }
39
+ export interface AssignGuestStarSlotResponse {}
40
+ export interface CreateGuestStarSessionRequest {
41
+ /** The ID of the broadcaster you want to create a Guest Star session for. Provided _broadcaster_id_ must match the `user_id` in the authentication token. */
42
+ broadcaster_id: string;
43
+ }
44
+ /** Information about the guest's audio settings */
45
+ export interface CreateGuestStarSessionResponseDataItemGuestsItemAudio {
46
+ /** Flag determining whether the host is allowing the guest's audio to be seen or heard within the session. */
47
+ is_host_enabled?: boolean | undefined;
48
+ /** Flag determining whether the guest is allowing their audio to be transmitted to the session. */
49
+ is_guest_enabled?: boolean | undefined;
50
+ /** Flag determining whether the guest has an appropriate audio device available to be transmitted to the session. */
51
+ is_available?: boolean | undefined;
52
+ }
53
+ /** Information about the guest's video settings */
54
+ export interface CreateGuestStarSessionResponseDataItemGuestsItemVideo {
55
+ /** Flag determining whether the host is allowing the guest's video to be seen or heard within the session. */
56
+ is_host_enabled?: boolean | undefined;
57
+ /** Flag determining whether the guest is allowing their video to be transmitted to the session. */
58
+ is_guest_enabled?: boolean | undefined;
59
+ /** Flag determining whether the guest has an appropriate video device available to be transmitted to the session. */
60
+ is_available?: boolean | undefined;
61
+ }
62
+ export interface CreateGuestStarSessionResponseDataItemGuestsItem {
63
+ /** ID representing this guest's slot assignment. - Host is always in slot "0" - Guests are assigned the following consecutive IDs (e.g, "1", "2", "3", etc) - Screen Share is represented as a special guest with the ID "SCREENSHARE" - The identifier here matches the ID referenced in browser source links used in broadcasting software. */
64
+ slot_id?: string | undefined;
65
+ /** Flag determining whether or not the guest is visible in the browser source in the host's streaming software. */
66
+ is_live?: boolean | undefined;
67
+ /** User ID of the guest assigned to this slot. */
68
+ user_id?: string | undefined;
69
+ /** Value from 0 to 200 representing the host's volume setting for this guest. The default is **100**. */
70
+ volume?: number | undefined;
71
+ /** Timestamp when this guest was assigned a slot in the session. */
72
+ assigned_at?: string | undefined;
73
+ /** Information about the guest's audio settings */
74
+ audio?: CreateGuestStarSessionResponseDataItemGuestsItemAudio | undefined;
75
+ /** Information about the guest's video settings */
76
+ video?: CreateGuestStarSessionResponseDataItemGuestsItemVideo | undefined;
77
+ }
78
+ /** List of guests currently interacting with the Guest Star session. On creation, the session will contain the broadcaster as a solo guest. */
79
+ export type CreateGuestStarSessionResponseDataItemGuestsList =
80
+ Array<CreateGuestStarSessionResponseDataItemGuestsItem>;
81
+ export interface CreateGuestStarSessionResponseDataItem {
82
+ /** ID uniquely representing the Guest Star session. */
83
+ id?: string | undefined;
84
+ /** List of guests currently interacting with the Guest Star session. On creation, the session will contain the broadcaster as a solo guest. */
85
+ guests?: CreateGuestStarSessionResponseDataItemGuestsList | undefined;
86
+ }
87
+ /** Summary of the session details. */
88
+ export type CreateGuestStarSessionResponseDataList = Array<CreateGuestStarSessionResponseDataItem>;
89
+ export interface CreateGuestStarSessionResponse {
90
+ /** Summary of the session details. */
91
+ data?: CreateGuestStarSessionResponseDataList | undefined;
92
+ }
93
+ export interface DeleteGuestStarInviteRequest {
94
+ /** The ID of the broadcaster running the Guest Star session. */
95
+ broadcaster_id: string;
96
+ /** The ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the `user_id` in the user access token. */
97
+ moderator_id: string;
98
+ /** The ID of the session for the invite to be revoked on behalf of the broadcaster. */
99
+ session_id: string;
100
+ /** Twitch User ID for the guest to revoke the Guest Star session invite from. */
101
+ guest_id: string;
102
+ }
103
+ export interface DeleteGuestStarInviteResponse {}
104
+ export interface DeleteGuestStarSlotRequest {
105
+ /** The ID of the broadcaster running the Guest Star session. */
106
+ broadcaster_id: string;
107
+ /** The ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user ID in the user access token. */
108
+ moderator_id: string;
109
+ /** The ID of the Guest Star session in which to remove the slot assignment. */
110
+ session_id: string;
111
+ /** The Twitch User ID corresponding to the guest to remove from the session. */
112
+ guest_id: string;
113
+ /** The slot ID representing the slot assignment to remove from the session. */
114
+ slot_id: string;
115
+ /** Flag signaling that the guest should be reinvited to the session, sending them back to the invite queue. */
116
+ should_reinvite_guest?: boolean | undefined;
117
+ }
118
+ export interface DeleteGuestStarSlotResponse {}
119
+ export interface EndGuestStarSessionRequest {
120
+ /** The ID of the broadcaster you want to end a Guest Star session for. Provided _broadcaster_id_ must match the `user_id` in the authentication token. */
121
+ broadcaster_id: string;
122
+ /** ID for the session to end on behalf of the broadcaster. */
123
+ session_id: string;
124
+ }
125
+ /** Information about the guest's audio settings */
126
+ export type EndGuestStarSessionResponseDataItemGuestsItemAudio =
127
+ CreateGuestStarSessionResponseDataItemGuestsItemAudio;
128
+ /** Information about the guest's video settings */
129
+ export type EndGuestStarSessionResponseDataItemGuestsItemVideo =
130
+ CreateGuestStarSessionResponseDataItemGuestsItemVideo;
131
+ export type EndGuestStarSessionResponseDataItemGuestsItem =
132
+ CreateGuestStarSessionResponseDataItemGuestsItem;
133
+ /** List of guests currently interacting with the Guest Star session. */
134
+ export type EndGuestStarSessionResponseDataItemGuestsList =
135
+ Array<CreateGuestStarSessionResponseDataItemGuestsItem>;
136
+ export interface EndGuestStarSessionResponseDataItem {
137
+ /** ID uniquely representing the Guest Star session. */
138
+ id?: string | undefined;
139
+ /** List of guests currently interacting with the Guest Star session. */
140
+ guests?: EndGuestStarSessionResponseDataItemGuestsList | undefined;
141
+ }
142
+ /** Summary of the session details when the session was ended. */
143
+ export type EndGuestStarSessionResponseDataList = Array<EndGuestStarSessionResponseDataItem>;
144
+ export interface EndGuestStarSessionResponse {
145
+ /** Summary of the session details when the session was ended. */
146
+ data?: EndGuestStarSessionResponseDataList | undefined;
147
+ }
148
+ export interface GetChannelGuestStarSettingsRequest {
149
+ /** The ID of the broadcaster you want to get guest star settings for. */
150
+ broadcaster_id: string;
151
+ /** The ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user ID in the user access token. */
152
+ moderator_id: string;
153
+ }
154
+ export interface GetChannelGuestStarSettingsResponseDataItem {
155
+ /** Flag determining if [Guest Star moderators](https://help.twitch.tv/s/article/stream-together#settings:~:text=Stream%20Together%20mods%20can%20take%20actions%20like%20inviting%20guests%2C%20reporting%20guests%2C%20removing%20guests%2C%20muting%20guests%2C%20and%20turning%20off%20guests%20video.) can make a guest live once the guest is assigned to a slot. */
156
+ is_moderator_send_live_enabled?: boolean | undefined;
157
+ /** Number of slots the Guest Star call interface will allow the host to add to a call. Required to be between 1 and 6. */
158
+ slot_count?: number | undefined;
159
+ /** Flag determining if Browser Sources subscribed to sessions on this channel should output audio */
160
+ is_browser_source_audio_enabled?: boolean | undefined;
161
+ /** This setting determines how the guests within a session should be laid out within the browser source. Layouts other than the ones listed here are reported as "TILED". Possible values: - `TILED`: All live guests are tiled within the browser source with the same size. - `SCREENSHARE`: All live guests are tiled within the browser source with the same size. If there is an active screen share, it is sized larger than the other guests. */
162
+ group_layout?: string | undefined;
163
+ /** View only token to generate browser source URLs. Is **null** if the user in *moderator_id* isn't the broadcaster. */
164
+ browser_source_token?: string | Redacted.Redacted<string> | null | undefined;
165
+ }
166
+ /** A list that contains the channel's Guest Star settings. */
167
+ export type GetChannelGuestStarSettingsResponseDataList =
168
+ Array<GetChannelGuestStarSettingsResponseDataItem>;
169
+ export interface GetChannelGuestStarSettingsResponse {
170
+ /** A list that contains the channel's Guest Star settings. */
171
+ data?: GetChannelGuestStarSettingsResponseDataList | undefined;
172
+ }
173
+ export interface GetGuestStarInvitesRequest {
174
+ /** The ID of the broadcaster running the Guest Star session. */
175
+ broadcaster_id: string;
176
+ /** The ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the `user_id` in the user access token. */
177
+ moderator_id: string;
178
+ /** The session ID to query for invite status. */
179
+ session_id: string;
180
+ }
181
+ export interface GetGuestStarInvitesResponseDataItem {
182
+ /** Twitch User ID corresponding to the invited guest */
183
+ user_id?: string | undefined;
184
+ /** Timestamp when the invite was created or last updated. */
185
+ invited_at?: string | undefined;
186
+ /** Status representing the invited user's join state. The list includes only users still in the "INVITED" state. Possible values: - `INVITED`: The user has been invited to the session but has not acknowledged it. */
187
+ status?: string | undefined;
188
+ /** Flag signaling that the invited user has chosen to disable their local video device. The user has hidden themselves, but they may choose to reveal their video feed upon joining the session. */
189
+ is_video_enabled?: boolean | undefined;
190
+ /** Flag signaling that the invited user has chosen to disable their local audio device. The user has muted themselves, but they may choose to unmute their audio feed upon joining the session. */
191
+ is_audio_enabled?: boolean | undefined;
192
+ /** Flag signaling that the invited user has a video device available for sharing. */
193
+ is_video_available?: boolean | undefined;
194
+ /** Flag signaling that the invited user has an audio device available for sharing. */
195
+ is_audio_available?: boolean | undefined;
196
+ }
197
+ /** A list of invite objects describing the invited users. */
198
+ export type GetGuestStarInvitesResponseDataList = Array<GetGuestStarInvitesResponseDataItem>;
199
+ export interface GetGuestStarInvitesResponse {
200
+ /** A list of invite objects describing the invited users. */
201
+ data?: GetGuestStarInvitesResponseDataList | undefined;
202
+ }
203
+ export interface GetGuestStarSessionRequest {
204
+ /** ID for the user hosting the Guest Star session. */
205
+ broadcaster_id: string;
206
+ /** The ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user ID in the user access token. */
207
+ moderator_id: string;
208
+ }
209
+ /** Information about the guest's audio settings */
210
+ export type GetGuestStarSessionResponseDataItemGuestsItemAudio =
211
+ CreateGuestStarSessionResponseDataItemGuestsItemAudio;
212
+ /** Information about the guest's video settings */
213
+ export type GetGuestStarSessionResponseDataItemGuestsItemVideo =
214
+ CreateGuestStarSessionResponseDataItemGuestsItemVideo;
215
+ export interface GetGuestStarSessionResponseDataItemGuestsItem {
216
+ /** ID representing this guest's slot assignment. - Host is in slot "0", except when the user in *moderator_id* holds a guest slot in the session. Slots are then numbered from that guest's point of view, with the guest in slot "0". - Guests are assigned the following consecutive IDs (e.g, "1", "2", "3", etc) - Screen Share is represented as a special guest with the ID "SCREENSHARE" - The identifier here matches the ID referenced in browser source links used in broadcasting software. */
217
+ slot_id?: string | undefined;
218
+ /** Flag determining whether or not the guest is visible in the browser source in the host's streaming software. */
219
+ is_live?: boolean | undefined;
220
+ /** User ID of the guest assigned to this slot. */
221
+ user_id?: string | undefined;
222
+ /** Value from 0 to 200 representing the host's volume setting for this guest. The default is **100**. */
223
+ volume?: number | undefined;
224
+ /** Timestamp when this guest was assigned a slot in the session. */
225
+ assigned_at?: string | undefined;
226
+ /** Information about the guest's audio settings */
227
+ audio?: CreateGuestStarSessionResponseDataItemGuestsItemAudio | undefined;
228
+ /** Information about the guest's video settings */
229
+ video?: CreateGuestStarSessionResponseDataItemGuestsItemVideo | undefined;
230
+ }
231
+ /** List of guests currently interacting with the Guest Star session. */
232
+ export type GetGuestStarSessionResponseDataItemGuestsList =
233
+ Array<GetGuestStarSessionResponseDataItemGuestsItem>;
234
+ export interface GetGuestStarSessionResponseDataItem {
235
+ /** ID uniquely representing the Guest Star session. */
236
+ id?: string | undefined;
237
+ /** List of guests currently interacting with the Guest Star session. */
238
+ guests?: GetGuestStarSessionResponseDataItemGuestsList | undefined;
239
+ }
240
+ /** Summary of the session details. The list is empty if the broadcaster has no active session, or if the user in *moderator_id* isn't the broadcaster, a guest or invited user in the session, or one of the broadcaster's [Guest Star moderators](https://help.twitch.tv/s/article/stream-together#settings:~:text=Stream%20Together%20mods%20can%20take%20actions%20like%20inviting%20guests%2C%20reporting%20guests%2C%20removing%20guests%2C%20muting%20guests%2C%20and%20turning%20off%20guests%20video.). */
241
+ export type GetGuestStarSessionResponseDataList = Array<GetGuestStarSessionResponseDataItem>;
242
+ export interface GetGuestStarSessionResponse {
243
+ /** Summary of the session details. The list is empty if the broadcaster has no active session, or if the user in *moderator_id* isn't the broadcaster, a guest or invited user in the session, or one of the broadcaster's [Guest Star moderators](https://help.twitch.tv/s/article/stream-together#settings:~:text=Stream%20Together%20mods%20can%20take%20actions%20like%20inviting%20guests%2C%20reporting%20guests%2C%20removing%20guests%2C%20muting%20guests%2C%20and%20turning%20off%20guests%20video.). */
244
+ data?: GetGuestStarSessionResponseDataList | undefined;
245
+ }
246
+ export interface SendGuestStarInviteRequest {
247
+ /** The ID of the broadcaster running the Guest Star session. */
248
+ broadcaster_id: string;
249
+ /** The ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the `user_id` in the user access token. */
250
+ moderator_id: string;
251
+ /** The session ID for the invite to be sent on behalf of the broadcaster. */
252
+ session_id: string;
253
+ /** Twitch User ID for the guest to invite to the Guest Star session. */
254
+ guest_id: string;
255
+ }
256
+ export interface SendGuestStarInviteResponse {}
257
+ export interface UpdateChannelGuestStarSettingsRequest {
258
+ /** The ID of the broadcaster you want to update Guest Star settings for. */
259
+ broadcaster_id: string;
260
+ /** Flag determining if [Guest Star moderators](https://help.twitch.tv/s/article/stream-together#settings:~:text=Stream%20Together%20mods%20can%20take%20actions%20like%20inviting%20guests%2C%20reporting%20guests%2C%20removing%20guests%2C%20muting%20guests%2C%20and%20turning%20off%20guests%20video.) can make a guest live once the guest is assigned to a slot. */
261
+ is_moderator_send_live_enabled?: boolean | undefined;
262
+ /** Number of slots the Guest Star call interface will allow the host to add to a call. Required to be between 1 and 6. */
263
+ slot_count?: number | undefined;
264
+ /** Flag determining if Browser Sources subscribed to sessions on this channel should output audio */
265
+ is_browser_source_audio_enabled?: boolean | undefined;
266
+ /** This setting determines how the guests within a session should be laid out within the browser source. Possible values: - `TILED`: All live guests are tiled within the browser source with the same size. - `SCREENSHARE`: All live guests are tiled within the browser source with the same size. If there is an active screen share, it is sized larger than the other guests. */
267
+ group_layout?: string | undefined;
268
+ /** Flag determining if Guest Star should regenerate the auth token associated with the channel's browser sources. Providing a true value for this will immediately invalidate all browser sources previously configured in your streaming software. */
269
+ regenerate_browser_sources?: boolean | undefined;
270
+ }
271
+ export interface UpdateChannelGuestStarSettingsResponse {}
272
+ export interface UpdateGuestStarSlotRequest {
273
+ /** The ID of the broadcaster running the Guest Star session. */
274
+ broadcaster_id: string;
275
+ /** The ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the `user_id` in the user access token. */
276
+ moderator_id: string;
277
+ /** The ID of the Guest Star session in which to update slot settings. */
278
+ session_id: string;
279
+ /** The slot assignment previously assigned to a user. */
280
+ source_slot_id: string;
281
+ /** The slot to move this user assignment to. If the destination slot is occupied, the user assigned will be swapped into *source_slot_id*. */
282
+ destination_slot_id: string;
283
+ }
284
+ export interface UpdateGuestStarSlotResponse {}
285
+ export interface UpdateGuestStarSlotSettingsRequest {
286
+ /** The ID of the broadcaster running the Guest Star session. */
287
+ broadcaster_id: string;
288
+ /** The ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user ID in the user access token. */
289
+ moderator_id: string;
290
+ /** The ID of the Guest Star session in which to update a slot's settings. */
291
+ session_id: string;
292
+ /** The slot assignment that has previously been assigned to a user. */
293
+ slot_id: string;
294
+ /** Flag indicating whether the slot is allowed to share their audio with the rest of the session. If false, the slot will be muted in any views containing the slot. */
295
+ is_audio_enabled?: boolean | undefined;
296
+ /** Flag indicating whether the slot is allowed to share their video with the rest of the session. If false, the slot will have no video shared in any views containing the slot. */
297
+ is_video_enabled?: boolean | undefined;
298
+ /** Flag indicating whether the user assigned to this slot is visible/can be heard from any public subscriptions. Generally, this determines whether or not the slot is enabled in any broadcasting software integrations. */
299
+ is_live?: boolean | undefined;
300
+ }
301
+ export interface UpdateGuestStarSlotSettingsResponse {}
302
+ export type AssignGuestStarSlotError = TwitchOpError;
303
+ /** Assign Guest Star Slot Allows a previously invited user to be assigned a slot within the active Guest Star session, once that guest has indicated they are ready to join. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:manage:guest_star** scope. For requests by the broadcaster (*moderator_id* matches *broadcaster_id*). - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **moderator:manage:guest_star** scope. For requests by a moderator (*moderator_id* doesn't match *broadcaster_id*). Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#assign-guest-star-slot */
304
+ export const assignGuestStarSlot: API.OperationMethod<
305
+ AssignGuestStarSlotRequest,
306
+ AssignGuestStarSlotResponse,
307
+ AssignGuestStarSlotError,
308
+ TwitchOpContext
309
+ > = /*@__PURE__*/ API.make(() => ({
310
+ input: __S(0, __c0, 0) as any as S.Schema<AssignGuestStarSlotRequest>,
311
+ output: __S(8, __c1, 0) as any as S.Schema<AssignGuestStarSlotResponse>,
312
+ errors: [],
313
+ serviceErrors: TwitchServiceErrors,
314
+ protocol: TwitchProtocol,
315
+ retry: Retry.Retry,
316
+ telemetry: TELEMETRY,
317
+ span: "AssignGuestStarSlot",
318
+ }));
319
+
320
+ export type CreateGuestStarSessionError = TwitchOpError;
321
+ /** Create Guest Star Session Requires the broadcaster to be present in the call interface. The session ends automatically when no one in it is connected to the call interface, for example, if the broadcaster doesn't join after creating the session. If guests are connected but the broadcaster isn't, the broadcaster is removed from their slot and the session continues until the last participant leaves. > **Note** Query parameter _broadcaster_id_ must match the `user_id` in the [User-Access > token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:manage:guest_star** scope. Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#create-guest-star-session */
322
+ export const createGuestStarSession: API.OperationMethod<
323
+ CreateGuestStarSessionRequest,
324
+ CreateGuestStarSessionResponse,
325
+ CreateGuestStarSessionError,
326
+ TwitchOpContext
327
+ > = /*@__PURE__*/ API.make(() => ({
328
+ input: __S(16, __c2, 0) as any as S.Schema<CreateGuestStarSessionRequest>,
329
+ output: __S(29, __c3, 5) as any as S.Schema<CreateGuestStarSessionResponse>,
330
+ errors: [],
331
+ serviceErrors: TwitchServiceErrors,
332
+ protocol: TwitchProtocol,
333
+ retry: Retry.Retry,
334
+ telemetry: TELEMETRY,
335
+ span: "CreateGuestStarSession",
336
+ }));
337
+
338
+ export type DeleteGuestStarInviteError = TwitchOpError;
339
+ /** Delete Guest Star Invite Revokes a previously sent invite for a Guest Star session. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:manage:guest_star** scope. For requests by the broadcaster (*moderator_id* matches *broadcaster_id*). - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **moderator:manage:guest_star** scope. For requests by a moderator (*moderator_id* doesn't match *broadcaster_id*). Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#delete-guest-star-invite */
340
+ export const deleteGuestStarInvite: API.OperationMethod<
341
+ DeleteGuestStarInviteRequest,
342
+ DeleteGuestStarInviteResponse,
343
+ DeleteGuestStarInviteError,
344
+ TwitchOpContext
345
+ > = /*@__PURE__*/ API.make(() => ({
346
+ input: __S(48, __c6, 0) as any as S.Schema<DeleteGuestStarInviteRequest>,
347
+ output: __S(8, __c1, 0) as any as S.Schema<DeleteGuestStarInviteResponse>,
348
+ errors: [],
349
+ serviceErrors: TwitchServiceErrors,
350
+ protocol: TwitchProtocol,
351
+ retry: Retry.Retry,
352
+ telemetry: TELEMETRY,
353
+ span: "DeleteGuestStarInvite",
354
+ }));
355
+
356
+ export type DeleteGuestStarSlotError = TwitchOpError;
357
+ /** Delete Guest Star Slot Allows a caller to remove a slot assignment from a user participating in an active Guest Star session. This revokes their access to the session immediately and disables their access to publish or subscribe to media within the session. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:manage:guest_star** scope. For requests by the broadcaster (*moderator_id* matches *broadcaster_id*). - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **moderator:manage:guest_star** scope. For requests by a moderator (*moderator_id* doesn't match *broadcaster_id*). Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#delete-guest-star-slot */
358
+ export const deleteGuestStarSlot: API.OperationMethod<
359
+ DeleteGuestStarSlotRequest,
360
+ DeleteGuestStarSlotResponse,
361
+ DeleteGuestStarSlotError,
362
+ TwitchOpContext
363
+ > = /*@__PURE__*/ API.make(() => ({
364
+ input: __S(56, __c7, 0) as any as S.Schema<DeleteGuestStarSlotRequest>,
365
+ output: __S(8, __c1, 0) as any as S.Schema<DeleteGuestStarSlotResponse>,
366
+ errors: [],
367
+ serviceErrors: TwitchServiceErrors,
368
+ protocol: TwitchProtocol,
369
+ retry: Retry.Retry,
370
+ telemetry: TELEMETRY,
371
+ span: "DeleteGuestStarSlot",
372
+ }));
373
+
374
+ export type EndGuestStarSessionError = TwitchOpError;
375
+ /** End Guest Star Session Performs the same action as if the host clicked the "End Call" button in the Guest Star UI. Programmatically ends a Guest Star session on behalf of the broadcaster. > **Note** Query parameter _broadcaster_id_ must match the `user_id` in the [User-Access > token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:manage:guest_star** scope. Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#end-guest-star-session */
376
+ export const endGuestStarSession: API.OperationMethod<
377
+ EndGuestStarSessionRequest,
378
+ EndGuestStarSessionResponse,
379
+ EndGuestStarSessionError,
380
+ TwitchOpContext
381
+ > = /*@__PURE__*/ API.make(() => ({
382
+ input: __S(64, __c8, 0) as any as S.Schema<EndGuestStarSessionRequest>,
383
+ output: __S(29, __c3, 5) as any as S.Schema<EndGuestStarSessionResponse>,
384
+ errors: [],
385
+ serviceErrors: TwitchServiceErrors,
386
+ protocol: TwitchProtocol,
387
+ retry: Retry.Retry,
388
+ telemetry: TELEMETRY,
389
+ span: "EndGuestStarSession",
390
+ }));
391
+
392
+ export type GetChannelGuestStarSettingsError = TwitchOpError;
393
+ /** Get Channel Guest Star Settings Gets the channel settings for configuration of the Guest Star feature for a particular host. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:read:guest_star** or **channel:manage:guest_star** scope. For requests by the broadcaster (*moderator_id* matches *broadcaster_id*). - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **moderator:read:guest_star** or **moderator:manage:guest_star** scope. For requests by a moderator (*moderator_id* doesn't match *broadcaster_id*). Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#get-channel-guest-star-settings */
394
+ export const getChannelGuestStarSettings: API.OperationMethod<
395
+ GetChannelGuestStarSettingsRequest,
396
+ GetChannelGuestStarSettingsResponse,
397
+ GetChannelGuestStarSettingsError,
398
+ TwitchOpContext
399
+ > = /*@__PURE__*/ API.make(() => ({
400
+ input: __S(72, __c9, 0) as any as S.Schema<GetChannelGuestStarSettingsRequest>,
401
+ output: __S(75, __c9, 3) as any as S.Schema<GetChannelGuestStarSettingsResponse>,
402
+ errors: [],
403
+ serviceErrors: TwitchServiceErrors,
404
+ protocol: TwitchProtocol,
405
+ retry: Retry.Retry,
406
+ telemetry: TELEMETRY,
407
+ span: "GetChannelGuestStarSettings",
408
+ }));
409
+
410
+ export type GetGuestStarInvitesError = TwitchOpError;
411
+ /** Get Guest Star Invites Provides the caller with a list of pending invites to a Guest Star session. > **Note** Query parameter _moderator_id_ must match the `user_id` in the [User-Access > token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:read:guest_star** or **channel:manage:guest_star** scope. For requests by the broadcaster (*moderator_id* matches *broadcaster_id*). - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **moderator:read:guest_star** or **moderator:manage:guest_star** scope. For requests by a moderator (*moderator_id* doesn't match *broadcaster_id*). Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#get-guest-star-invites */
412
+ export const getGuestStarInvites: API.OperationMethod<
413
+ GetGuestStarInvitesRequest,
414
+ GetGuestStarInvitesResponse,
415
+ GetGuestStarInvitesError,
416
+ TwitchOpContext
417
+ > = /*@__PURE__*/ API.make(() => ({
418
+ input: __S(80, __c10, 0) as any as S.Schema<GetGuestStarInvitesRequest>,
419
+ output: __S(83, __c10, 3) as any as S.Schema<GetGuestStarInvitesResponse>,
420
+ errors: [],
421
+ serviceErrors: TwitchServiceErrors,
422
+ protocol: TwitchProtocol,
423
+ retry: Retry.Retry,
424
+ telemetry: TELEMETRY,
425
+ span: "GetGuestStarInvites",
426
+ }));
427
+
428
+ export type GetGuestStarSessionError = TwitchOpError;
429
+ /** Get Guest Star Session Gets information about an ongoing Guest Star session for a particular channel. > **Note** Guests must be either invited or assigned a slot within the session Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:read:guest_star** or **channel:manage:guest_star** scope. For requests by the broadcaster (*moderator_id* matches *broadcaster_id*). - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **moderator:read:guest_star** or **moderator:manage:guest_star** scope. For requests by a moderator (*moderator_id* doesn't match *broadcaster_id*). Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#get-guest-star-session */
430
+ export const getGuestStarSession: API.OperationMethod<
431
+ GetGuestStarSessionRequest,
432
+ GetGuestStarSessionResponse,
433
+ GetGuestStarSessionError,
434
+ TwitchOpContext
435
+ > = /*@__PURE__*/ API.make(() => ({
436
+ input: __S(88, __c11, 0) as any as S.Schema<GetGuestStarSessionRequest>,
437
+ output: __S(29, __c3, 5) as any as S.Schema<GetGuestStarSessionResponse>,
438
+ errors: [],
439
+ serviceErrors: TwitchServiceErrors,
440
+ protocol: TwitchProtocol,
441
+ retry: Retry.Retry,
442
+ telemetry: TELEMETRY,
443
+ span: "GetGuestStarSession",
444
+ }));
445
+
446
+ export type SendGuestStarInviteError = TwitchOpError;
447
+ /** Send Guest Star Invite Sends an invite to a specified guest on behalf of the broadcaster for a Guest Star session in progress. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:manage:guest_star** scope. For requests by the broadcaster (*moderator_id* matches *broadcaster_id*). - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **moderator:manage:guest_star** scope. For requests by a moderator (*moderator_id* doesn't match *broadcaster_id*). Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#send-guest-star-invite */
448
+ export const sendGuestStarInvite: API.OperationMethod<
449
+ SendGuestStarInviteRequest,
450
+ SendGuestStarInviteResponse,
451
+ SendGuestStarInviteError,
452
+ TwitchOpContext
453
+ > = /*@__PURE__*/ API.make(() => ({
454
+ input: __S(96, __c12, 0) as any as S.Schema<SendGuestStarInviteRequest>,
455
+ output: __S(8, __c1, 0) as any as S.Schema<SendGuestStarInviteResponse>,
456
+ errors: [],
457
+ serviceErrors: TwitchServiceErrors,
458
+ protocol: TwitchProtocol,
459
+ retry: Retry.Retry,
460
+ telemetry: TELEMETRY,
461
+ span: "SendGuestStarInvite",
462
+ }));
463
+
464
+ export type UpdateChannelGuestStarSettingsError = TwitchOpError;
465
+ /** Update Channel Guest Star Settings Mutates the channel settings for configuration of the Guest Star feature for a particular host. > **Note** Query parameter _broadcaster_id_ must match the `user_id` in the [User-Access > token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:manage:guest_star** scope. Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#update-channel-guest-star-settings */
466
+ export const updateChannelGuestStarSettings: API.OperationMethod<
467
+ UpdateChannelGuestStarSettingsRequest,
468
+ UpdateChannelGuestStarSettingsResponse,
469
+ UpdateChannelGuestStarSettingsError,
470
+ TwitchOpContext
471
+ > = /*@__PURE__*/ API.make(() => ({
472
+ input: __S(104, __c13, 0) as any as S.Schema<UpdateChannelGuestStarSettingsRequest>,
473
+ output: __S(8, __c1, 0) as any as S.Schema<UpdateChannelGuestStarSettingsResponse>,
474
+ errors: [],
475
+ serviceErrors: TwitchServiceErrors,
476
+ protocol: TwitchProtocol,
477
+ retry: Retry.Retry,
478
+ telemetry: TELEMETRY,
479
+ span: "UpdateChannelGuestStarSettings",
480
+ }));
481
+
482
+ export type UpdateGuestStarSlotError = TwitchOpError;
483
+ /** Update Guest Star Slot Allows a user to update the assigned slot for a particular user within the active Guest Star session. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:manage:guest_star** scope. For requests by the broadcaster (*moderator_id* matches *broadcaster_id*). - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **moderator:manage:guest_star** scope. For requests by a moderator (*moderator_id* doesn't match *broadcaster_id*). Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#update-guest-star-slot */
484
+ export const updateGuestStarSlot: API.OperationMethod<
485
+ UpdateGuestStarSlotRequest,
486
+ UpdateGuestStarSlotResponse,
487
+ UpdateGuestStarSlotError,
488
+ TwitchOpContext
489
+ > = /*@__PURE__*/ API.make(() => ({
490
+ input: __S(32, __c4, 0) as any as S.Schema<UpdateGuestStarSlotRequest>,
491
+ output: __S(8, __c1, 0) as any as S.Schema<UpdateGuestStarSlotResponse>,
492
+ errors: [],
493
+ serviceErrors: TwitchServiceErrors,
494
+ protocol: TwitchProtocol,
495
+ retry: Retry.Retry,
496
+ telemetry: TELEMETRY,
497
+ span: "UpdateGuestStarSlot",
498
+ }));
499
+
500
+ export type UpdateGuestStarSlotSettingsError = TwitchOpError;
501
+ /** Update Guest Star Slot Settings Allows a user to update slot settings for a particular guest within a Guest Star session, such as allowing the user to share audio or video within the call as a host. These settings will be broadcasted to all subscribers which control their view of the guest in that slot. One or more of the optional parameters to this API can be specified at any time. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:manage:guest_star** scope. For requests by the broadcaster (*moderator_id* matches *broadcaster_id*). - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **moderator:manage:guest_star** scope. For requests by a moderator (*moderator_id* doesn't match *broadcaster_id*). Reference: https://dev.twitch.tv/docs/api/reference/guest-star/#update-guest-star-slot-settings */
502
+ export const updateGuestStarSlotSettings: API.OperationMethod<
503
+ UpdateGuestStarSlotSettingsRequest,
504
+ UpdateGuestStarSlotSettingsResponse,
505
+ UpdateGuestStarSlotSettingsError,
506
+ TwitchOpContext
507
+ > = /*@__PURE__*/ API.make(() => ({
508
+ input: __S(40, __c5, 0) as any as S.Schema<UpdateGuestStarSlotSettingsRequest>,
509
+ output: __S(8, __c1, 0) as any as S.Schema<UpdateGuestStarSlotSettingsResponse>,
510
+ errors: [],
511
+ serviceErrors: TwitchServiceErrors,
512
+ protocol: TwitchProtocol,
513
+ retry: Retry.Retry,
514
+ telemetry: TELEMETRY,
515
+ span: "UpdateGuestStarSlotSettings",
516
+ }));
517
+
518
+ // Schema builders: each runs one schema initializer, on that schema's first use.
519
+ function __c0(j: number): any {
520
+ switch (j) {
521
+ case 0:
522
+ return S.suspend(() =>
523
+ S.Struct({
524
+ broadcaster_id: S.String.pipe(T.Query()),
525
+ moderator_id: S.String.pipe(T.Query()),
526
+ session_id: S.String.pipe(T.Query()),
527
+ guest_id: S.String.pipe(T.Query()),
528
+ slot_id: S.String.pipe(T.Query()),
529
+ }).pipe(T.Http({ method: "POST", uri: "/guest_star/slot", code: 200 })),
530
+ ).annotate({ identifier: "AssignGuestStarSlotRequest" });
531
+ }
532
+ }
533
+ function __c1(j: number): any {
534
+ switch (j) {
535
+ case 0:
536
+ return S.suspend(() => S.Struct({})).annotate({ identifier: "AssignGuestStarSlotResponse" });
537
+ }
538
+ }
539
+ function __c2(j: number): any {
540
+ switch (j) {
541
+ case 0:
542
+ return S.suspend(() =>
543
+ S.Struct({
544
+ broadcaster_id: S.String.pipe(T.Query()),
545
+ }).pipe(T.Http({ method: "POST", uri: "/guest_star/session", code: 200 })),
546
+ ).annotate({ identifier: "CreateGuestStarSessionRequest" });
547
+ }
548
+ }
549
+ function __c3(j: number): any {
550
+ switch (j) {
551
+ case 0:
552
+ return S.suspend(() =>
553
+ S.Struct({
554
+ is_host_enabled: S.optional(S.Boolean),
555
+ is_guest_enabled: S.optional(S.Boolean),
556
+ is_available: S.optional(S.Boolean),
557
+ }),
558
+ ).annotate({ identifier: "CreateGuestStarSessionResponseDataItemGuestsItemAudio" });
559
+ case 1:
560
+ return S.suspend(() =>
561
+ S.Struct({
562
+ slot_id: S.optional(S.String),
563
+ is_live: S.optional(S.Boolean),
564
+ user_id: S.optional(S.String),
565
+ volume: S.optional(S.Number),
566
+ assigned_at: S.optional(S.String),
567
+ audio: S.optional(__S(24, __c3, 0)),
568
+ video: S.optional(__S(24, __c3, 0)),
569
+ }),
570
+ ).annotate({ identifier: "CreateGuestStarSessionResponseDataItemGuestsItem" });
571
+ case 2:
572
+ return S.Array(__S(25, __c3, 1));
573
+ case 3:
574
+ return S.suspend(() =>
575
+ S.Struct({
576
+ id: S.optional(S.String),
577
+ guests: S.optional(__S(26, __c3, 2)),
578
+ }),
579
+ ).annotate({ identifier: "CreateGuestStarSessionResponseDataItem" });
580
+ case 4:
581
+ return S.Array(__S(27, __c3, 3));
582
+ case 5:
583
+ return S.suspend(() =>
584
+ S.Struct({
585
+ data: S.optional(__S(28, __c3, 4)),
586
+ }),
587
+ ).annotate({ identifier: "CreateGuestStarSessionResponse" });
588
+ }
589
+ }
590
+ function __c4(j: number): any {
591
+ switch (j) {
592
+ case 0:
593
+ return S.suspend(() =>
594
+ S.Struct({
595
+ broadcaster_id: S.String.pipe(T.Query()),
596
+ moderator_id: S.String.pipe(T.Query()),
597
+ session_id: S.String.pipe(T.Query()),
598
+ source_slot_id: S.String.pipe(T.Query()),
599
+ destination_slot_id: S.String.pipe(T.Query()),
600
+ }).pipe(T.Http({ method: "PATCH", uri: "/guest_star/slot", code: 200 })),
601
+ ).annotate({ identifier: "UpdateGuestStarSlotRequest" });
602
+ }
603
+ }
604
+ function __c5(j: number): any {
605
+ switch (j) {
606
+ case 0:
607
+ return S.suspend(() =>
608
+ S.Struct({
609
+ broadcaster_id: S.String.pipe(T.Query()),
610
+ moderator_id: S.String.pipe(T.Query()),
611
+ session_id: S.String.pipe(T.Query()),
612
+ slot_id: S.String.pipe(T.Query()),
613
+ is_audio_enabled: S.optional(S.Boolean.pipe(T.Query())),
614
+ is_video_enabled: S.optional(S.Boolean.pipe(T.Query())),
615
+ is_live: S.optional(S.Boolean.pipe(T.Query())),
616
+ }).pipe(T.Http({ method: "PATCH", uri: "/guest_star/slot_settings", code: 200 })),
617
+ ).annotate({ identifier: "UpdateGuestStarSlotSettingsRequest" });
618
+ }
619
+ }
620
+ function __c6(j: number): any {
621
+ switch (j) {
622
+ case 0:
623
+ return S.suspend(() =>
624
+ S.Struct({
625
+ broadcaster_id: S.String.pipe(T.Query()),
626
+ moderator_id: S.String.pipe(T.Query()),
627
+ session_id: S.String.pipe(T.Query()),
628
+ guest_id: S.String.pipe(T.Query()),
629
+ }).pipe(T.Http({ method: "DELETE", uri: "/guest_star/invites", code: 200 })),
630
+ ).annotate({ identifier: "DeleteGuestStarInviteRequest" });
631
+ }
632
+ }
633
+ function __c7(j: number): any {
634
+ switch (j) {
635
+ case 0:
636
+ return S.suspend(() =>
637
+ S.Struct({
638
+ broadcaster_id: S.String.pipe(T.Query()),
639
+ moderator_id: S.String.pipe(T.Query()),
640
+ session_id: S.String.pipe(T.Query()),
641
+ guest_id: S.String.pipe(T.Query()),
642
+ slot_id: S.String.pipe(T.Query()),
643
+ should_reinvite_guest: S.optional(S.Boolean.pipe(T.Query())),
644
+ }).pipe(T.Http({ method: "DELETE", uri: "/guest_star/slot", code: 200 })),
645
+ ).annotate({ identifier: "DeleteGuestStarSlotRequest" });
646
+ }
647
+ }
648
+ function __c8(j: number): any {
649
+ switch (j) {
650
+ case 0:
651
+ return S.suspend(() =>
652
+ S.Struct({
653
+ broadcaster_id: S.String.pipe(T.Query()),
654
+ session_id: S.String.pipe(T.Query()),
655
+ }).pipe(T.Http({ method: "DELETE", uri: "/guest_star/session", code: 200 })),
656
+ ).annotate({ identifier: "EndGuestStarSessionRequest" });
657
+ }
658
+ }
659
+ function __c9(j: number): any {
660
+ switch (j) {
661
+ case 0:
662
+ return S.suspend(() =>
663
+ S.Struct({
664
+ broadcaster_id: S.String.pipe(T.Query()),
665
+ moderator_id: S.String.pipe(T.Query()),
666
+ }).pipe(T.Http({ method: "GET", uri: "/guest_star/channel_settings", code: 200 })),
667
+ ).annotate({ identifier: "GetChannelGuestStarSettingsRequest" });
668
+ case 1:
669
+ return S.suspend(() =>
670
+ S.Struct({
671
+ is_moderator_send_live_enabled: S.optional(S.Boolean),
672
+ slot_count: S.optional(S.Number),
673
+ is_browser_source_audio_enabled: S.optional(S.Boolean),
674
+ group_layout: S.optional(S.String),
675
+ browser_source_token: S.optional(S.NullOr(S.String).pipe(T.SensitiveValue({}))),
676
+ }),
677
+ ).annotate({ identifier: "GetChannelGuestStarSettingsResponseDataItem" });
678
+ case 2:
679
+ return S.Array(__S(73, __c9, 1));
680
+ case 3:
681
+ return S.suspend(() =>
682
+ S.Struct({
683
+ data: S.optional(__S(74, __c9, 2)),
684
+ }),
685
+ ).annotate({ identifier: "GetChannelGuestStarSettingsResponse" });
686
+ }
687
+ }
688
+ function __c10(j: number): any {
689
+ switch (j) {
690
+ case 0:
691
+ return S.suspend(() =>
692
+ S.Struct({
693
+ broadcaster_id: S.String.pipe(T.Query()),
694
+ moderator_id: S.String.pipe(T.Query()),
695
+ session_id: S.String.pipe(T.Query()),
696
+ }).pipe(T.Http({ method: "GET", uri: "/guest_star/invites", code: 200 })),
697
+ ).annotate({ identifier: "GetGuestStarInvitesRequest" });
698
+ case 1:
699
+ return S.suspend(() =>
700
+ S.Struct({
701
+ user_id: S.optional(S.String),
702
+ invited_at: S.optional(S.String),
703
+ status: S.optional(S.String),
704
+ is_video_enabled: S.optional(S.Boolean),
705
+ is_audio_enabled: S.optional(S.Boolean),
706
+ is_video_available: S.optional(S.Boolean),
707
+ is_audio_available: S.optional(S.Boolean),
708
+ }),
709
+ ).annotate({ identifier: "GetGuestStarInvitesResponseDataItem" });
710
+ case 2:
711
+ return S.Array(__S(81, __c10, 1));
712
+ case 3:
713
+ return S.suspend(() =>
714
+ S.Struct({
715
+ data: S.optional(__S(82, __c10, 2)),
716
+ }),
717
+ ).annotate({ identifier: "GetGuestStarInvitesResponse" });
718
+ }
719
+ }
720
+ function __c11(j: number): any {
721
+ switch (j) {
722
+ case 0:
723
+ return S.suspend(() =>
724
+ S.Struct({
725
+ broadcaster_id: S.String.pipe(T.Query()),
726
+ moderator_id: S.String.pipe(T.Query()),
727
+ }).pipe(T.Http({ method: "GET", uri: "/guest_star/session", code: 200 })),
728
+ ).annotate({ identifier: "GetGuestStarSessionRequest" });
729
+ }
730
+ }
731
+ function __c12(j: number): any {
732
+ switch (j) {
733
+ case 0:
734
+ return S.suspend(() =>
735
+ S.Struct({
736
+ broadcaster_id: S.String.pipe(T.Query()),
737
+ moderator_id: S.String.pipe(T.Query()),
738
+ session_id: S.String.pipe(T.Query()),
739
+ guest_id: S.String.pipe(T.Query()),
740
+ }).pipe(T.Http({ method: "POST", uri: "/guest_star/invites", code: 200 })),
741
+ ).annotate({ identifier: "SendGuestStarInviteRequest" });
742
+ }
743
+ }
744
+ function __c13(j: number): any {
745
+ switch (j) {
746
+ case 0:
747
+ return S.suspend(() =>
748
+ S.Struct({
749
+ broadcaster_id: S.String.pipe(T.Query()),
750
+ is_moderator_send_live_enabled: S.optional(S.Boolean),
751
+ slot_count: S.optional(S.Number),
752
+ is_browser_source_audio_enabled: S.optional(S.Boolean),
753
+ group_layout: S.optional(S.String),
754
+ regenerate_browser_sources: S.optional(S.Boolean),
755
+ }).pipe(T.Http({ method: "PATCH", uri: "/guest_star/channel_settings", code: 200 })),
756
+ ).annotate({ identifier: "UpdateChannelGuestStarSettingsRequest" });
757
+ }
758
+ }
759
+ // Schema table: entry i is schema j of builder f, made on first reach.
760
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
761
+ return (__s[i] ??= __L.at(f, j));
762
+ }