@distilled.cloud/twitch 0.0.0 → 1.0.0-rc.22

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 +79 -4
  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 +82 -2
  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,34 @@
1
+ import * as API from "@distilled.cloud/core/api";
2
+ import { type TwitchOpError, type TwitchOpContext } from "../protocol.ts";
3
+ export type { TwitchOpError, TwitchOpContext };
4
+ export interface CancelARaidRequest {
5
+ /** The ID of the broadcaster that initiated the raid. This ID must match the user ID in the user access token. */
6
+ broadcaster_id: string;
7
+ }
8
+ export interface CancelARaidResponse {
9
+ }
10
+ export interface StartARaidRequest {
11
+ /** The ID of the broadcaster that's sending the raiding party. This ID must match the user ID in the user access token. */
12
+ from_broadcaster_id: string;
13
+ /** The ID of the broadcaster to raid. */
14
+ to_broadcaster_id: string;
15
+ }
16
+ export interface StartARaidResponseDataItem {
17
+ /** The UTC date and time, in RFC3339 format, of when the raid was requested. */
18
+ created_at?: string | undefined;
19
+ /** **IMPORTANT** This field is deprecated and returns only **false**. A Boolean value that indicates whether the channel being raided contains mature content. */
20
+ is_mature?: boolean | undefined;
21
+ }
22
+ /** A list that contains a single object with information about the pending raid. */
23
+ export type StartARaidResponseDataList = Array<StartARaidResponseDataItem>;
24
+ export interface StartARaidResponse {
25
+ /** A list that contains a single object with information about the pending raid. */
26
+ data?: StartARaidResponseDataList | undefined;
27
+ }
28
+ export type CancelARaidError = TwitchOpError;
29
+ /** Cancel a raid Cancel a pending raid. You can cancel a raid at any point up until the broadcaster clicks **Raid Now** in the Twitch UX or the 90-second countdown expires. **Rate Limit**: The limit is 10 requests within a 10-minute window. 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:raids** scope. Reference: https://dev.twitch.tv/docs/api/reference/raids/#cancel-a-raid */
30
+ export declare const cancelARaid: API.OperationMethod<CancelARaidRequest, CancelARaidResponse, CancelARaidError, TwitchOpContext>;
31
+ export type StartARaidError = TwitchOpError;
32
+ /** Start a raid Raid another channel by sending the broadcaster's viewers to the targeted channel. When you call the API from a chat bot or extension, the Twitch UX pops up a window at the top of the chat room that identifies the number of viewers in the raid. The raid occurs when the broadcaster clicks **Raid Now** or after the 90-second countdown expires. To determine whether the raid successfully occurred, you must subscribe to the [Channel Raid](https://dev.twitch.tv/docs/eventsub/reference/channel.md#channel-raid) event. For more information, see [Get notified when a raid begins](https://dev.twitch.tv/docs/api/raids.md#get-notified-when-a-raid-begins). To cancel a pending raid, use the [Cancel a raid](#cancel-a-raid) endpoint. **Rate Limit**: The limit is 10 requests within a 10-minute window. 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:raids** scope. Reference: https://dev.twitch.tv/docs/api/reference/raids/#start-a-raid */
33
+ export declare const startARaid: API.OperationMethod<StartARaidRequest, StartARaidResponse, StartARaidError, TwitchOpContext>;
34
+ //# sourceMappingURL=raids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raids.d.ts","sources":["../../src/services/raids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAKjD,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAM1F,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAc/C,MAAM,WAAW,kBAAkB;IACjC,kHAAkH;IAClH,cAAc,EAAE,MAAM,CAAC;CACxB;AACD,MAAM,WAAW,mBAAmB;CAAG;AACvC,MAAM,WAAW,iBAAiB;IAChC,2HAA2H;IAC3H,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yCAAyC;IACzC,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AACD,MAAM,WAAW,0BAA0B;IACzC,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,kKAAkK;IAClK,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC;AACD,oFAAoF;AACpF,MAAM,MAAM,0BAA0B,GAAG,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAC3E,MAAM,WAAW,kBAAkB;IACjC,oFAAoF;IACpF,IAAI,CAAC,EAAE,0BAA0B,GAAG,SAAS,CAAC;CAC/C;AACD,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAC7C,sfAAsf;AACtf,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,eAAe,CAC3C,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,CAUd,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC;AAC5C,8iCAA8iC;AAC9iC,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,eAAe,CAC1C,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,eAAe,CAUd,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{Jc as e,Kc as t,Rc as n,Wc as r,Xc as i,a,b as o,errors$TwitchServiceErrors as s,l as c,n as l,protocol$TwitchProtocol as u,retry$Retry as d,traits$Http as f,traits$Query as p,wc as m,xc as h}from"../_bundle/sdk.js";const g={system:`twitch-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Twitch`,service:`Raids`,propagate:`w3c`};const _=/*@__PURE__*/ l(r=>r===a?c(`CancelARaid`,`{input:#1,output:#2,errors:[],serviceErrors:$6,protocol:$7,retry:$8,telemetry:$9,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({broadcaster_id:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/raids",code:200}));$4({})`,[n,f,p,e,t,i,s,u,d,g]):o(_,r));const v=/*@__PURE__*/ l(l=>l===a?c(`StartARaid`,`{input:#1,output:#4,errors:[],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$5(>5)@"%Request";$5(>6)@"%ResponseDataItem";$8(#2);$5(>7)@"%Response";$4({from_broadcaster_id:$3.pipe($2()),to_broadcaster_id:$3.pipe($2())}).pipe($1({method:"POST",uri:"/raids",code:200}));$4({created_at:$6($3),is_mature:$6($7)});$4({data:$6(#3)})`,[n,f,p,e,t,i,r,h,m,s,u,d,g]):o(v,l));export{_ as cancelARaid,v as startARaid};
2
+ //# sourceMappingURL=raids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raids.js","names":["API.D","API.named","__L.at","T.Http","T.Query","S.String","S.Struct","S.suspend","Retry.Retry","API.call","S.optional","S.Boolean","S.Array","String","Struct","at","optional","suspend","call","TwitchServiceErrors","named","op","TwitchProtocol","Retry","Http","Query","Array","Boolean","TELEMETRY","cancelARaid","i","D","startARaid"],"sources":["../../src/services/raids.ts"],"mappings":"+NAYA,MAAM4B,EAAY,CAChB,OAAQ,aACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,SACR,QAAS,QACT,UAAW,KACb,EA2BA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAM9B,EAAQC,EAAU,cAAe,8NAA+N,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAWY,EAAqBG,EAAgBd,EAAaoB,CAAS,CAAC,EAAInB,EAASoB,EAAaC,CAAC,CAAC,EAIjc,MAAaE,EAKK,gBAAQ,GAAgBF,IAAM9B,EAAQC,EAAU,aAAc,0VAA2V,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAWG,EAAYC,EAAWC,EAASO,EAAqBG,EAAgBd,EAAaoB,CAAS,CAAC,EAAInB,EAASuB,EAAYF,CAAC,CAAC"}
@@ -0,0 +1,223 @@
1
+ import * as API from "@distilled.cloud/core/api";
2
+ import { type TwitchOpError, type TwitchOpContext } from "../protocol.ts";
3
+ export type { TwitchOpError, TwitchOpContext };
4
+ export interface CreateChannelStreamScheduleSegmentRequest {
5
+ /** The ID of the broadcaster that owns the schedule to add the broadcast segment to. This ID must match the user ID in the user access token. */
6
+ broadcaster_id: string;
7
+ /** The date and time that the broadcast segment starts. Specify the date and time in RFC3339 format (for example, 2021-07-01T18:00:00Z). */
8
+ start_time: string;
9
+ /** The time zone where the broadcast takes place. Specify the time zone using [IANA time zone database](https://www.iana.org/time-zones)format (for example, America/New_York). */
10
+ timezone: string;
11
+ /** The length of time, in minutes, that the broadcast is scheduled to run. The duration must be in the range 30 through 1380 (23 hours). */
12
+ duration: number;
13
+ /** A Boolean value that determines whether the broadcast recurs weekly. Is **true** if the broadcast recurs weekly. The default is **false**. Only partners and affiliates may add non-recurring broadcasts. */
14
+ is_recurring?: boolean | undefined;
15
+ /** The ID of the category that best represents the broadcast's content. To get the category ID, use the [Search Categories](https://dev.twitch.tv/docs/api/reference/search.md#search-categories) endpoint. */
16
+ category_id?: string | undefined;
17
+ /** The broadcast's title. The title may contain a maximum of 140 characters. */
18
+ title?: string | undefined;
19
+ }
20
+ /** The type of content that the broadcaster plans to stream or **null** if not specified. */
21
+ export interface CreateChannelStreamScheduleSegmentResponseDataSegmentsItemCategory {
22
+ /** An ID that identifies the category that best represents the content that the broadcaster plans to stream. For example, the game's ID if the broadcaster will play a game or the Just Chatting ID if the broadcaster will host a talk show. */
23
+ id?: string | undefined;
24
+ /** The name of the category. For example, the game's title if the broadcaster will play a game or Just Chatting if the broadcaster will host a talk show. */
25
+ name?: string | undefined;
26
+ }
27
+ export interface CreateChannelStreamScheduleSegmentResponseDataSegmentsItem {
28
+ /** An ID that identifies this broadcast segment. */
29
+ id?: string | undefined;
30
+ /** The UTC date and time (in RFC3339 format) of when the broadcast starts. */
31
+ start_time?: string | undefined;
32
+ /** The UTC date and time (in RFC3339 format) of when the broadcast ends. */
33
+ end_time?: string | undefined;
34
+ /** The broadcast segment's title. */
35
+ title?: string | undefined;
36
+ /** Indicates whether the broadcaster canceled this segment of a recurring broadcast. If the broadcaster canceled this segment, this field is set to the same value that's in the `end_time` field; otherwise, it's set to **null**. */
37
+ canceled_until?: string | undefined;
38
+ /** The type of content that the broadcaster plans to stream or **null** if not specified. */
39
+ category?: CreateChannelStreamScheduleSegmentResponseDataSegmentsItemCategory | undefined;
40
+ /** A Boolean value that determines whether the broadcast is part of a recurring series that streams at the same time each week or is a one-time broadcast. Is **true** if the broadcast is part of a recurring series. */
41
+ is_recurring?: boolean | undefined;
42
+ }
43
+ /** A list that contains the single broadcast segment that you added. */
44
+ export type CreateChannelStreamScheduleSegmentResponseDataSegmentsList = Array<CreateChannelStreamScheduleSegmentResponseDataSegmentsItem>;
45
+ /** The dates when the broadcaster is on vacation and not streaming. Is set to **null** if vacation mode is not enabled. */
46
+ export interface CreateChannelStreamScheduleSegmentResponseDataVacation {
47
+ /** The UTC date and time (in RFC3339 format) of when the broadcaster's vacation starts. */
48
+ start_time?: string | undefined;
49
+ /** The UTC date and time (in RFC3339 format) of when the broadcaster's vacation ends. */
50
+ end_time?: string | undefined;
51
+ }
52
+ /** The broadcaster's streaming scheduled. */
53
+ export interface CreateChannelStreamScheduleSegmentResponseData {
54
+ /** A list that contains the single broadcast segment that you added. */
55
+ segments?: CreateChannelStreamScheduleSegmentResponseDataSegmentsList | undefined;
56
+ /** The ID of the broadcaster that owns the broadcast schedule. */
57
+ broadcaster_id?: string | undefined;
58
+ /** The broadcaster's display name. */
59
+ broadcaster_name?: string | undefined;
60
+ /** The broadcaster's login name. */
61
+ broadcaster_login?: string | undefined;
62
+ /** The dates when the broadcaster is on vacation and not streaming. Is set to **null** if vacation mode is not enabled. */
63
+ vacation?: CreateChannelStreamScheduleSegmentResponseDataVacation | undefined;
64
+ }
65
+ export interface CreateChannelStreamScheduleSegmentResponse {
66
+ /** The broadcaster's streaming scheduled. */
67
+ data?: CreateChannelStreamScheduleSegmentResponseData | undefined;
68
+ }
69
+ export interface DeleteChannelStreamScheduleSegmentRequest {
70
+ /** The ID of the broadcaster that owns the streaming schedule. This ID must match the user ID in the user access token. */
71
+ broadcaster_id: string;
72
+ /** The ID of the broadcast segment to remove. */
73
+ id: string;
74
+ }
75
+ export interface DeleteChannelStreamScheduleSegmentResponse {
76
+ }
77
+ export interface GetChannelIcalendarRequest {
78
+ /** The ID of the broadcaster that owns the streaming schedule you want to get. */
79
+ broadcaster_id: string;
80
+ }
81
+ export interface GetChannelIcalendarResponse {
82
+ }
83
+ export type GetChannelStreamScheduleRequestIdList = Array<string>;
84
+ export interface GetChannelStreamScheduleRequest {
85
+ /** The ID of the broadcaster that owns the streaming schedule you want to get. */
86
+ broadcaster_id: string;
87
+ /** The ID of the scheduled segment to return. To specify more than one segment, include the ID of each segment you want to get. For example, 'id=1234&id=5678'. You may specify a maximum of 100 IDs. The response omits IDs that don't match a segment. If you specify *id*, the request ignores the *first* and *after* query parameters, and the response doesn't include a cursor. */
88
+ id?: GetChannelStreamScheduleRequestIdList | undefined;
89
+ /** The UTC date and time that identifies when in the broadcaster's schedule to start returning segments. The response includes the segments that end after this time, including a segment that's in progress. If not specified, the request uses the current UTC date and time. Specify the date and time in RFC3339 format (for example, '2022-09-01T00:00:00Z'). */
90
+ start_time?: string | undefined;
91
+ /** Not supported. */
92
+ utc_offset?: number | undefined;
93
+ /** The maximum number of items to return per page in the response. The minimum page size is 1 item per page and the maximum is 25 items per page. The default is 20. */
94
+ first?: number | undefined;
95
+ /** The cursor used to get the next page of results. The **Pagination** object in the response contains the cursor's value. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
96
+ after?: string | undefined;
97
+ }
98
+ /** The type of content that the broadcaster plans to stream or **null** if not specified. */
99
+ export interface GetChannelStreamScheduleResponseDataSegmentsItemCategory {
100
+ /** An ID that identifies the category that best represents the content that the broadcaster plans to stream. For example, the game's ID if the broadcaster will play a game or the Just Chatting ID if the broadcaster will host a talk show. */
101
+ id?: string | undefined;
102
+ /** The name of the category. For example, the game's title if the broadcaster will playing a game or Just Chatting if the broadcaster will host a talk show. */
103
+ name?: string | undefined;
104
+ }
105
+ export interface GetChannelStreamScheduleResponseDataSegmentsItem {
106
+ /** An ID that identifies this broadcast segment. */
107
+ id?: string | undefined;
108
+ /** The UTC date and time (in RFC3339 format) of when the broadcast starts. */
109
+ start_time?: string | undefined;
110
+ /** The UTC date and time (in RFC3339 format) of when the broadcast ends. Is **null** if the segment doesn't have a duration. */
111
+ end_time?: string | null | undefined;
112
+ /** The broadcast segment's title. */
113
+ title?: string | undefined;
114
+ /** Indicates whether the broadcaster canceled this segment of a recurring broadcast. If the broadcaster canceled this segment, this field is set to the same value that's in the `end_time` field; otherwise, it's set to **null**. */
115
+ canceled_until?: string | undefined;
116
+ /** The type of content that the broadcaster plans to stream or **null** if not specified. */
117
+ category?: GetChannelStreamScheduleResponseDataSegmentsItemCategory | undefined;
118
+ /** A Boolean value that determines whether the broadcast is part of a recurring series that streams at the same time each week or is a one-time broadcast. Is **true** if the broadcast is part of a recurring series. */
119
+ is_recurring?: boolean | undefined;
120
+ }
121
+ /** The list of broadcasts in the broadcaster's streaming schedule. */
122
+ export type GetChannelStreamScheduleResponseDataSegmentsList = Array<GetChannelStreamScheduleResponseDataSegmentsItem>;
123
+ /** The dates when the broadcaster is on vacation and not streaming. Is set to **null** if vacation mode is not enabled. */
124
+ export type GetChannelStreamScheduleResponseDataVacation = CreateChannelStreamScheduleSegmentResponseDataVacation;
125
+ /** The broadcaster's streaming schedule. */
126
+ export interface GetChannelStreamScheduleResponseData {
127
+ /** The list of broadcasts in the broadcaster's streaming schedule. */
128
+ segments?: GetChannelStreamScheduleResponseDataSegmentsList | undefined;
129
+ /** The ID of the broadcaster that owns the broadcast schedule. */
130
+ broadcaster_id?: string | undefined;
131
+ /** The broadcaster's display name. */
132
+ broadcaster_name?: string | undefined;
133
+ /** The broadcaster's login name. */
134
+ broadcaster_login?: string | undefined;
135
+ /** The dates when the broadcaster is on vacation and not streaming. Is set to **null** if vacation mode is not enabled. */
136
+ vacation?: CreateChannelStreamScheduleSegmentResponseDataVacation | undefined;
137
+ }
138
+ /** The information used to page through a list of results. The object is empty if there are no more pages left to page through. [Read more](https://dev.twitch.tv/docs/api/guide.md#pagination). */
139
+ export interface GetChannelStreamScheduleResponsePagination {
140
+ /** The cursor used to get the next page of results. Set the request's *after* query parameter to this value. */
141
+ cursor?: string | undefined;
142
+ }
143
+ export interface GetChannelStreamScheduleResponse {
144
+ /** The broadcaster's streaming schedule. */
145
+ data: GetChannelStreamScheduleResponseData;
146
+ /** The information used to page through a list of results. The object is empty if there are no more pages left to page through. [Read more](https://dev.twitch.tv/docs/api/guide.md#pagination). */
147
+ pagination?: GetChannelStreamScheduleResponsePagination | undefined;
148
+ }
149
+ export interface UpdateChannelStreamScheduleRequest {
150
+ /** The ID of the broadcaster whose schedule settings you want to update. The ID must match the user ID in the user access token. */
151
+ broadcaster_id: string;
152
+ /** A Boolean value that indicates whether the broadcaster has scheduled a vacation. Set to **true** to enable Vacation Mode and add vacation dates, or **false** to cancel a previously scheduled vacation. If you omit this parameter, the request ignores the other vacation parameters and doesn't change the schedule settings. */
153
+ is_vacation_enabled?: boolean | undefined;
154
+ /** The UTC date and time of when the broadcaster's vacation starts. Specify the date and time in RFC3339 format (for example, 2021-05-16T00:00:00Z). Required if *is_vacation_enabled* is **true**. */
155
+ vacation_start_time?: string | undefined;
156
+ /** The UTC date and time of when the broadcaster's vacation ends. Specify the date and time in RFC3339 format (for example, 2021-05-30T23:59:59Z). The vacation may end no more than 5 years in the future. Required if *is_vacation_enabled* is **true**. */
157
+ vacation_end_time?: string | undefined;
158
+ /** The time zone that the broadcaster broadcasts from. Specify the time zone using [IANA time zone database](https://www.iana.org/time-zones) format (for example, America/New_York). Required if *is_vacation_enabled* is **true**. */
159
+ timezone?: string | undefined;
160
+ }
161
+ export interface UpdateChannelStreamScheduleResponse {
162
+ }
163
+ export interface UpdateChannelStreamScheduleSegmentRequest {
164
+ /** The ID of the broadcaster who owns the broadcast segment to update. This ID must match the user ID in the user access token. */
165
+ broadcaster_id: string;
166
+ /** The ID of the broadcast segment to update. */
167
+ id: string;
168
+ /** The date and time that the broadcast segment starts. Specify the date and time in RFC3339 format (for example, 2022-08-02T06:00:00Z). **NOTE**: Only partners and affiliates may update a broadcast's start time and only for non-recurring segments. */
169
+ start_time?: string | undefined;
170
+ /** The length of time, in minutes, that the broadcast is scheduled to run. The duration must be in the range 30 through 1380 (23 hours). */
171
+ duration?: number | undefined;
172
+ /** The ID of the category that best represents the broadcast's content. To get the category ID, use the [Search Categories](https://dev.twitch.tv/docs/api/reference/search.md#search-categories) endpoint. To remove the segment's category, set this field to an empty string. */
173
+ category_id?: string | undefined;
174
+ /** The broadcast's title. The title may contain a maximum of 140 characters. */
175
+ title?: string | undefined;
176
+ /** A Boolean value that indicates whether the broadcast is canceled. Set to **true** to cancel the segment. **NOTE**: For recurring segments, the API cancels the first segment after the current UTC date and time and not the specified segment (unless the specified segment is the next segment after the current UTC date and time). */
177
+ is_canceled?: boolean | undefined;
178
+ /** The time zone where the broadcast takes place. Specify the time zone using [IANA time zone database](https://www.iana.org/time-zones) format (for example, America/New_York). */
179
+ timezone?: string | undefined;
180
+ }
181
+ /** The type of content that the broadcaster plans to stream or **null** if not specified. */
182
+ export type UpdateChannelStreamScheduleSegmentResponseDataSegmentsItemCategory = CreateChannelStreamScheduleSegmentResponseDataSegmentsItemCategory;
183
+ export type UpdateChannelStreamScheduleSegmentResponseDataSegmentsItem = CreateChannelStreamScheduleSegmentResponseDataSegmentsItem;
184
+ /** A list that contains the single broadcast segment that you updated. */
185
+ export type UpdateChannelStreamScheduleSegmentResponseDataSegmentsList = Array<CreateChannelStreamScheduleSegmentResponseDataSegmentsItem>;
186
+ /** The dates when the broadcaster is on vacation and not streaming. Is set to **null** if vacation mode is not enabled. */
187
+ export type UpdateChannelStreamScheduleSegmentResponseDataVacation = CreateChannelStreamScheduleSegmentResponseDataVacation;
188
+ /** The broadcaster's streaming scheduled. */
189
+ export interface UpdateChannelStreamScheduleSegmentResponseData {
190
+ /** A list that contains the single broadcast segment that you updated. */
191
+ segments?: UpdateChannelStreamScheduleSegmentResponseDataSegmentsList | undefined;
192
+ /** The ID of the broadcaster that owns the broadcast schedule. */
193
+ broadcaster_id?: string | undefined;
194
+ /** The broadcaster's display name. */
195
+ broadcaster_name?: string | undefined;
196
+ /** The broadcaster's login name. */
197
+ broadcaster_login?: string | undefined;
198
+ /** The dates when the broadcaster is on vacation and not streaming. Is set to **null** if vacation mode is not enabled. */
199
+ vacation?: CreateChannelStreamScheduleSegmentResponseDataVacation | undefined;
200
+ }
201
+ export interface UpdateChannelStreamScheduleSegmentResponse {
202
+ /** The broadcaster's streaming scheduled. */
203
+ data?: UpdateChannelStreamScheduleSegmentResponseData | undefined;
204
+ }
205
+ export type CreateChannelStreamScheduleSegmentError = TwitchOpError;
206
+ /** Create Channel Stream Schedule Segment Adds a single or recurring broadcast to the broadcaster's streaming schedule. For information about scheduling broadcasts, see [Stream Schedule](https://help.twitch.tv/s/article/channel-page-setup#Schedule). 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:schedule** scope. Reference: https://dev.twitch.tv/docs/api/reference/schedule/#create-channel-stream-schedule-segment */
207
+ export declare const createChannelStreamScheduleSegment: API.OperationMethod<CreateChannelStreamScheduleSegmentRequest, CreateChannelStreamScheduleSegmentResponse, CreateChannelStreamScheduleSegmentError, TwitchOpContext>;
208
+ export type DeleteChannelStreamScheduleSegmentError = TwitchOpError;
209
+ /** Delete Channel Stream Schedule Segment Removes a broadcast segment from the broadcaster's streaming schedule. > **Note** For recurring segments, removing a segment removes all segments in the recurring schedule. 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:schedule** scope. Reference: https://dev.twitch.tv/docs/api/reference/schedule/#delete-channel-stream-schedule-segment */
210
+ export declare const deleteChannelStreamScheduleSegment: API.OperationMethod<DeleteChannelStreamScheduleSegmentRequest, DeleteChannelStreamScheduleSegmentResponse, DeleteChannelStreamScheduleSegmentError, TwitchOpContext>;
211
+ export type GetChannelIcalendarError = TwitchOpError;
212
+ /** Get Channel iCalendar Gets the broadcaster's streaming schedule as an [iCalendar](https://datatracker.ietf.org/doc/html/rfc5545). > **Note** The Client-Id and Authorization headers are not required. Authorization: No authorization required. Reference: https://dev.twitch.tv/docs/api/reference/schedule/#get-channel-icalendar */
213
+ export declare const getChannelIcalendar: API.OperationMethod<GetChannelIcalendarRequest, GetChannelIcalendarResponse, GetChannelIcalendarError, TwitchOpContext>;
214
+ export type GetChannelStreamScheduleError = TwitchOpError;
215
+ /** Get Channel Stream Schedule Gets the broadcaster's streaming schedule. You can get the entire schedule or specific segments of the schedule. [Learn More](https://help.twitch.tv/s/article/channel-page-setup#Schedule) Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens). - An [app access token](https://dev.twitch.tv/docs/authentication.md#app-access-tokens). Reference: https://dev.twitch.tv/docs/api/reference/schedule/#get-channel-stream-schedule */
216
+ export declare const getChannelStreamSchedule: API.PaginatedOperationMethod<GetChannelStreamScheduleRequest, GetChannelStreamScheduleResponse, GetChannelStreamScheduleError, TwitchOpContext, GetChannelStreamScheduleResponseDataSegmentsItem>;
217
+ export type UpdateChannelStreamScheduleError = TwitchOpError;
218
+ /** Update Channel Stream Schedule Updates the broadcaster's schedule settings, such as scheduling a vacation. 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:schedule** scope. Reference: https://dev.twitch.tv/docs/api/reference/schedule/#update-channel-stream-schedule */
219
+ export declare const updateChannelStreamSchedule: API.OperationMethod<UpdateChannelStreamScheduleRequest, UpdateChannelStreamScheduleResponse, UpdateChannelStreamScheduleError, TwitchOpContext>;
220
+ export type UpdateChannelStreamScheduleSegmentError = TwitchOpError;
221
+ /** Update Channel Stream Schedule Segment Updates a scheduled broadcast segment. For recurring segments, updating a segment's title, category, duration, and timezone, changes all segments in the recurring schedule, not just the specified segment. 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:schedule** scope. Reference: https://dev.twitch.tv/docs/api/reference/schedule/#update-channel-stream-schedule-segment */
222
+ export declare const updateChannelStreamScheduleSegment: API.OperationMethod<UpdateChannelStreamScheduleSegmentRequest, UpdateChannelStreamScheduleSegmentResponse, UpdateChannelStreamScheduleSegmentError, TwitchOpContext>;
223
+ //# sourceMappingURL=schedule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule.d.ts","sources":["../../src/services/schedule.ts"],"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UAA2U;AAC3U,eAAO,MAAM,mBAAmB,EAAE,GAAG,CAAC,eAAe,CACnD,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,eAAe,CAUd,CAAC;AAEJ,MAAM,MAAM,6BAA6B,GAAG,aAAa,CAAC;AAC1D,yhBAAyhB;AACzhB,eAAO,MAAM,wBAAwB,EAAE,GAAG,CAAC,wBAAwB,CACjE,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,eAAe,EACf,gDAAgD,CAoB1C,CAAC;AAET,MAAM,MAAM,gCAAgC,GAAG,aAAa,CAAC;AAC7D,0YAA0Y;AAC1Y,eAAO,MAAM,2BAA2B,EAAE,GAAG,CAAC,eAAe,CAC3D,kCAAkC,EAClC,mCAAmC,EACnC,gCAAgC,EAChC,eAAe,CAUd,CAAC;AAEJ,MAAM,MAAM,uCAAuC,GAAG,aAAa,CAAC;AACpE,2hBAA2hB;AAC3hB,eAAO,MAAM,kCAAkC,EAAE,GAAG,CAAC,eAAe,CAClE,yCAAyC,EACzC,0CAA0C,EAC1C,uCAAuC,EACvC,eAAe,CAUd,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{Fc as e,Gc as t,Jc as n,Kc as r,Rc as i,Wc as a,Xc as o,a as s,b as c,errors$TwitchServiceErrors as l,l as u,n as d,o as f,pagination$paginateCursor as p,protocol$TwitchProtocol as m,retry$Retry as h,traits$Http as g,traits$Query as _,wc as v,xc as y}from"../_bundle/sdk.js";const b={system:`twitch-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Twitch`,service:`Schedule`,propagate:`w3c`};const x=/*@__PURE__*/ d(e=>e===s?u(`CreateChannelStreamScheduleSegment`,`{input:#1,output:#9:3,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({broadcaster_id:$3.pipe($2()),start_time:$3,timezone:$3,duration:$4,is_recurring:$6($5),category_id:$6($3),title:$6($3)}).pipe($1({method:"POST",uri:"/schedule/segment",code:200}))`,[i,g,_,n,t,y,a,r,o,__d1,l,m,h,b]):c(x,e));const S=/*@__PURE__*/ d(e=>e===s?u(`DeleteChannelStreamScheduleSegment`,`{input:#1,output:#6:0,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>2)@"%Request";$4({broadcaster_id:$3.pipe($2()),id:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/schedule/segment",code:200}))`,[i,g,_,n,r,o,__d2,l,m,h,b]):c(S,e));const C=/*@__PURE__*/ d(e=>e===s?u(`GetChannelIcalendar`,`{input:#1,output:#6:0,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>2)@"%Request";$4({broadcaster_id:$3.pipe($2())}).pipe($1({method:"GET",uri:"/schedule/icalendar",code:200}))`,[i,g,_,n,r,o,__d2,l,m,h,b]):c(C,e));const w=/*@__PURE__*/ f(d=>d===s?u(`GetChannelStreamSchedule`,`{input:#2,output:#7,errors:[],serviceErrors:$12,protocol:$13,retry:$14,telemetry:$15,span:"%",pagination:{mode:"cursor",inputToken:"after",outputToken:"pagination.cursor",items:"data.segments",pageSize:"first"},strategy:$16};$2($1);$8(>8)@"%Request";$8(>9)@"%ResponseDataSegmentsItem";$2(#3);$8(>10)@"%ResponseData";$8(>11)@"%ResponsePagination";$8(>12)@"%Response";$7({broadcaster_id:$1.pipe($4()),id:$5(#1.pipe($4())),start_time:$5($1.pipe($4())),utc_offset:$5($6.pipe($4())),first:$5($6.pipe($4())),after:$5($1.pipe($4()))}).pipe($3({method:"GET",uri:"/schedule",code:200}));$7({id:$5($1),start_time:$5($1),end_time:$5($9($1)),title:$5($1),canceled_until:$5($1),category:$5(#10:0),is_recurring:$5($11)});$7({segments:$5(#4),broadcaster_id:$5($1),broadcaster_name:$5($1),broadcaster_login:$5($1),vacation:$5(#10:1)});$7({cursor:$5($1)});$7({data:#5,pagination:$5(#6)})`,[i,n,v,g,_,a,t,r,o,e,__d0,y,l,m,h,b,p]):c(w,d));const T=/*@__PURE__*/ d(e=>e===s?u(`UpdateChannelStreamSchedule`,`{input:#1,output:#8:0,errors:[],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$7(>2)@"%Request";$6({broadcaster_id:$3.pipe($2()),is_vacation_enabled:$5($4.pipe($2())),vacation_start_time:$5($3.pipe($2())),vacation_end_time:$5($3.pipe($2())),timezone:$5($3.pipe($2()))}).pipe($1({method:"PATCH",uri:"/schedule/settings",code:200}))`,[i,g,_,n,y,a,r,o,__d2,l,m,h,b]):c(T,e));const E=/*@__PURE__*/ d(e=>e===s?u(`UpdateChannelStreamScheduleSegment`,`{input:#1,output:#9:3,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({broadcaster_id:$3.pipe($2()),id:$3.pipe($2()),start_time:$4($3),duration:$4($5),category_id:$4($3),title:$4($3),is_canceled:$4($6),timezone:$4($3)}).pipe($1({method:"PATCH",uri:"/schedule/segment",code:200}))`,[i,g,_,n,a,t,y,r,o,__d1,l,m,h,b]):c(E,e));function __d0(){return[`$4(>2)@"CreateChannelStreamScheduleSegmentResponseDataSegmentsItemCategory";$4(>3)@"CreateChannelStreamScheduleSegmentResponseDataVacation";$3({id:$2($1),name:$2($1)});$3({start_time:$2($1),end_time:$2($1)})`,[i,n,a,r,o]]}function __d1(){return[`$6(>4)@"CreateChannelStreamScheduleSegmentResponseDataSegmentsItem";$7(#0);$6(>5)@"CreateChannelStreamScheduleSegmentResponseData";$6(>6)@"CreateChannelStreamScheduleSegmentResponse";$5({id:$2($1),start_time:$2($1),end_time:$2($1),title:$2($1),canceled_until:$2($1),category:$2(#3:0),is_recurring:$2($4)});$5({segments:$2(#1),broadcaster_id:$2($1),broadcaster_name:$2($1),broadcaster_login:$2($1),vacation:$2(#3:1)});$5({data:$2(#2)})`,[i,n,a,__d0,y,r,o,v]]}function __d2(){return[`$2(>1)@"DeleteChannelStreamScheduleSegmentResponse";$1({})`,[i,r,o]]}export{x as createChannelStreamScheduleSegment,S as deleteChannelStreamScheduleSegment,C as getChannelIcalendar,w as getChannelStreamSchedule,T as updateChannelStreamSchedule,E as updateChannelStreamScheduleSegment};
2
+ //# sourceMappingURL=schedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule.js","names":["API.D","API.named","__L.at","T.Http","T.Query","S.String","S.Number","S.Boolean","S.optional","S.Struct","S.suspend","Retry.Retry","API.call","S.Array","S.NullOr","NullOr","Number","String","Struct","at","optional","suspend","D","call","TwitchServiceErrors","named","op","opPaginated","paginateCursor","TwitchProtocol","Retry","Http","Query","Array","Boolean","TELEMETRY","createChannelStreamScheduleSegment","i","deleteChannelStreamScheduleSegment","getChannelIcalendar","getChannelStreamSchedule","updateChannelStreamSchedule","updateChannelStreamScheduleSegment"],"sources":["../../src/services/schedule.ts"],"mappings":"0RAaA,MAAMmC,EAAY,CAChB,OAAQ,aACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,SACR,QAAS,WACT,UAAW,KACb,EAiNA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAMrC,EAAQC,EAAU,qCAAsC,6SAA8S,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAWC,EAAYC,EAAUC,EAAW,KAAMc,EAAqBK,EAAgBlB,EAAawB,CAAS,CAAC,EAAIvB,EAASwB,EAAoCC,CAAC,CAAC,EAIrmB,MAAaC,EAKK,gBAAQ,GAAgBD,IAAMrC,EAAQC,EAAU,qCAAsC,mOAAoO,CAACC,EAAQC,EAAQC,EAASC,EAAUI,EAAUC,EAAW,KAAMc,EAAqBK,EAAgBlB,EAAawB,CAAS,CAAC,EAAIvB,EAAS0B,EAAoCD,CAAC,CAAC,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import * as API from "@distilled.cloud/core/api";
2
+ import { type TwitchOpError, type TwitchOpContext } from "../protocol.ts";
3
+ export type { TwitchOpError, TwitchOpContext };
4
+ export interface SearchCategoriesRequest {
5
+ /** The URI-encoded search string. For example, encode *#archery* as '%23archery' and search strings like *angel of death* as 'angel%20of%20death'. */
6
+ query: string;
7
+ /** The maximum number of items to return per page in the response. The minimum page size is 1 item per page and the maximum is 100 items per page. The default is 20. */
8
+ first?: number | undefined;
9
+ /** The cursor used to get the next page of results. The **Pagination** object in the response contains the cursor's value. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
10
+ after?: string | undefined;
11
+ }
12
+ export interface SearchCategoriesResponseDataItem {
13
+ /** A URL to an image of the game's box art or streaming category. */
14
+ box_art_url?: string | undefined;
15
+ /** The name of the game or category. */
16
+ name?: string | undefined;
17
+ /** An ID that uniquely identifies the game or category. */
18
+ id?: string | undefined;
19
+ }
20
+ /** The list of games or categories that match the query. The list is empty if there are no matches. */
21
+ export type SearchCategoriesResponseDataList = Array<SearchCategoriesResponseDataItem>;
22
+ /** Contains the information used to page through the list of results. The object is empty if there are no more pages left to page through. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination). */
23
+ export interface SearchCategoriesResponsePagination {
24
+ /** The cursor used to get the next page of results. Use the cursor to set the request's *after* query parameter. */
25
+ cursor?: string | undefined;
26
+ }
27
+ export interface SearchCategoriesResponse {
28
+ /** The list of games or categories that match the query. The list is empty if there are no matches. */
29
+ data: SearchCategoriesResponseDataList;
30
+ /** Contains the information used to page through the list of results. The object is empty if there are no more pages left to page through. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination). */
31
+ pagination?: SearchCategoriesResponsePagination | undefined;
32
+ }
33
+ export interface SearchChannelsRequest {
34
+ /** The URI-encoded search string. For example, encode search strings like *angel of death* as 'angel%20of%20death'. */
35
+ query: string;
36
+ /** A Boolean value that determines whether the response includes only channels that are currently streaming live. Set to **true** to get only channels that are streaming live; otherwise, **false** to get live and offline channels. The default is **false**. */
37
+ live_only?: boolean | undefined;
38
+ /** The maximum number of items to return per page in the response. The minimum page size is 1 item per page and the maximum is 100 items per page. The default is 20. */
39
+ first?: number | undefined;
40
+ /** The cursor used to get the next page of results. The **Pagination** object in the response contains the cursor's value. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
41
+ after?: string | undefined;
42
+ }
43
+ /** **IMPORTANT** As of February 28, 2023, this field is deprecated and returns only an empty array. If you use this field, please update your code to use the `tags` field. The list of tags that apply to the stream. The list contains IDs only when the channel is steaming live. For a list of possible tags, see [List of All Tags](https://www.twitch.tv/directory/all/tags). The list doesn't include Category Tags. */
44
+ export type SearchChannelsResponseDataItemTagIdsList = Array<string>;
45
+ /** The tags applied to the channel. */
46
+ export type SearchChannelsResponseDataItemTagsList = Array<string>;
47
+ export interface SearchChannelsResponseDataItem {
48
+ /** The ISO 639-1 two-letter language code of the language used by the broadcaster. For example, *en* for English. If the broadcaster uses a language not in the list of [supported stream languages](https://help.twitch.tv/s/article/languages-on-twitch#streamlang), the value is *other*. */
49
+ broadcaster_language?: string | undefined;
50
+ /** The broadcaster's login name. */
51
+ broadcaster_login?: string | undefined;
52
+ /** The broadcaster's display name. */
53
+ display_name?: string | undefined;
54
+ /** The ID of the game that the broadcaster is playing or last played. */
55
+ game_id?: string | undefined;
56
+ /** The name of the game that the broadcaster is playing or last played. */
57
+ game_name?: string | undefined;
58
+ /** An ID that uniquely identifies the channel (this is the broadcaster's ID). */
59
+ id?: string | undefined;
60
+ /** A Boolean value that determines whether the broadcaster is streaming live. Is **true** if the broadcaster is streaming live; otherwise, **false**. */
61
+ is_live?: boolean | undefined;
62
+ /** **IMPORTANT** As of February 28, 2023, this field is deprecated and returns only an empty array. If you use this field, please update your code to use the `tags` field. The list of tags that apply to the stream. The list contains IDs only when the channel is steaming live. For a list of possible tags, see [List of All Tags](https://www.twitch.tv/directory/all/tags). The list doesn't include Category Tags. */
63
+ tag_ids?: SearchChannelsResponseDataItemTagIdsList | undefined;
64
+ /** The tags applied to the channel. */
65
+ tags?: SearchChannelsResponseDataItemTagsList | undefined;
66
+ /** A URL to a thumbnail of the broadcaster's profile image. */
67
+ thumbnail_url?: string | undefined;
68
+ /** The stream's title. Is an empty string if the broadcaster didn't set it. */
69
+ title?: string | undefined;
70
+ /** The UTC date and time (in RFC3339 format) of when the broadcaster started streaming. The string is empty if the broadcaster is not streaming live. */
71
+ started_at?: string | undefined;
72
+ }
73
+ /** The list of channels that match the query. The list is empty if there are no matches. */
74
+ export type SearchChannelsResponseDataList = Array<SearchChannelsResponseDataItem>;
75
+ /** Contains the information used to page through the list of results. The object is empty if there are no more pages left to page through. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination). */
76
+ export type SearchChannelsResponsePagination = SearchCategoriesResponsePagination;
77
+ export interface SearchChannelsResponse {
78
+ /** The list of channels that match the query. The list is empty if there are no matches. */
79
+ data: SearchChannelsResponseDataList;
80
+ /** Contains the information used to page through the list of results. The object is empty if there are no more pages left to page through. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination). */
81
+ pagination?: SearchCategoriesResponsePagination | undefined;
82
+ }
83
+ export type SearchCategoriesError = TwitchOpError;
84
+ /** Search Categories Gets the games or categories that match the specified query. A category matches if its name or one of its alternative names begins with the query string, if any word in its name begins with the query string, or if each word in the query string matches the beginning of a word in its name. For example, if the query string is *love computer*, the response includes any category whose name contains words that begin with love and computer. The comparison is case insensitive, and close misspellings can also match. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens). - An [app access token](https://dev.twitch.tv/docs/authentication.md#app-access-tokens). Reference: https://dev.twitch.tv/docs/api/reference/search/#search-categories */
85
+ export declare const searchCategories: API.PaginatedOperationMethod<SearchCategoriesRequest, SearchCategoriesResponse, SearchCategoriesError, TwitchOpContext, SearchCategoriesResponseDataItem>;
86
+ export type SearchChannelsError = TwitchOpError;
87
+ /** Search Channels Gets the channels that match the specified query. The fields that the API uses for comparison depends on the value that the *live_only* query parameter is set to. If *live_only* is **false**, the API matches on the broadcaster's login name and display name. However, if *live_only* is **true**, the API matches on the broadcaster's login name, display name, and the name of the category they're streaming. If *live_only* is **false**, the broadcaster's login name or display name must begin with the query string. If *live_only* is **true**, the query string can also match the beginning of any word in those names or in the category name, and a phrase matches if each of its words does. The comparison is case insensitive, and close misspellings can also match. For example, the query string *angel of death* can match names that begin with angelofdeath or angel_of_death. By default, the results include both live and offline channels. To get only live channels set the *live_only* query parameter to **true**. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens). - An [app access token](https://dev.twitch.tv/docs/authentication.md#app-access-tokens). Reference: https://dev.twitch.tv/docs/api/reference/search/#search-channels */
88
+ export declare const searchChannels: API.PaginatedOperationMethod<SearchChannelsRequest, SearchChannelsResponse, SearchChannelsError, TwitchOpContext, SearchChannelsResponseDataItem>;
89
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sources":["../../src/services/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAMjD,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAM1F,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAc/C,MAAM,WAAW,uBAAuB;IACtC,sJAAsJ;IACtJ,KAAK,EAAE,MAAM,CAAC;IACd,yKAAyK;IACzK,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,8LAA8L;IAC9L,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AACD,MAAM,WAAW,gCAAgC;IAC/C,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,2DAA2D;IAC3D,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CA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AAG,SAAS,CAAC;IAC9B,+ZAA+Z;IAC/Z,OAAO,CAAC,EAAE,wCAAwC,GAAG,SAAS,CAAC;IAC/D,uCAAuC;IACvC,IAAI,CAAC,EAAE,sCAAsC,GAAG,SAAS,CAAC;IAC1D,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,yJAAyJ;IACzJ,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AACD,4FAA4F;AAC5F,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAAC,8BAA8B,CAAC,CAAC;AACnF,+MAA+M;AAC/M,MAAM,MAAM,gCAAgC,GAAG,kCAAkC,CAAC;AAClF,MAAM,WAAW,sBAAsB;IACrC,4FAA4F;IAC5F,IAAI,EAAE,8BAA8B,CAAC;IACrC,+MAA+M;IAC/M,UAAU,CAAC,EAAE,kCAAkC,GAAG,SAAS,CAAC;CAC7D;AACD,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAClD,w0BAAw0B;AACx0B,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,wBAAwB,CACzD,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,eAAe,EACf,gCAAgC,CAoB1B,CAAC;AAET,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAChD,wzCAAwzC;AACxzC,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,wBAAwB,CACvD,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,8BAA8B,CAoBxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{Gc as e,Jc as t,Kc as n,Rc as r,Wc as i,Xc as a,a as o,b as s,errors$TwitchServiceErrors as c,l,o as u,pagination$paginateCursor as d,protocol$TwitchProtocol as f,retry$Retry as p,traits$Http as m,traits$Query as h,wc as g,xc as _}from"../_bundle/sdk.js";const v={system:`twitch-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Twitch`,service:`Search`,propagate:`w3c`};const y=/*@__PURE__*/ u(u=>u===o?l(`SearchCategories`,`{input:#1,output:#4,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%",pagination:{mode:"cursor",inputToken:"after",outputToken:"pagination.cursor",items:"data",pageSize:"first"},strategy:$14};$7(>5)@"%Request";$7(>6)@"%ResponseDataItem";$8(#2);$7(>7)@"%Response";$6({query:$3.pipe($2()),first:$5($4.pipe($2())),after:$5($3.pipe($2()))}).pipe($1({method:"GET",uri:"/search/categories",code:200}));$6({box_art_url:$5($3),name:$5($3),id:$5($3)});$6({data:#3,pagination:$5(#9:0)})`,[r,m,h,t,e,i,n,a,g,__d0,c,f,p,v,d]):s(y,u));const b=/*@__PURE__*/ u(u=>u===o?l(`SearchChannels`,`{input:#1,output:#5,errors:[],serviceErrors:$11,protocol:$12,retry:$13,telemetry:$14,span:"%",pagination:{mode:"cursor",inputToken:"after",outputToken:"pagination.cursor",items:"data",pageSize:"first"},strategy:$15};$8(>6)@"%Request";$9($3);$8(>7)@"%ResponseDataItem";$9(#3);$8(>8)@"%Response";$7({query:$3.pipe($2()),live_only:$5($4.pipe($2())),first:$5($6.pipe($2())),after:$5($3.pipe($2()))}).pipe($1({method:"GET",uri:"/search/channels",code:200}));$7({broadcaster_language:$5($3),broadcaster_login:$5($3),display_name:$5($3),game_id:$5($3),game_name:$5($3),id:$5($3),is_live:$5($4),tag_ids:$5(#2),tags:$5(#2),thumbnail_url:$5($3),title:$5($3),started_at:$5($3)});$7({data:#4,pagination:$5(#10:0)})`,[r,m,h,t,_,i,e,n,a,g,__d0,c,f,p,v,d]):s(b,u));function __d0(){return[`$4(>1)@"SearchCategoriesResponsePagination";$3({cursor:$2($1)})`,[r,t,i,n,a]]}export{y as searchCategories,b as searchChannels};
2
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","names":["API.D","API.named","__L.at","T.Http","T.Query","S.String","S.Number","S.optional","S.Struct","S.suspend","S.Array","Retry.Retry","API.call","S.Boolean","Number","String","Struct","at","optional","suspend","D","call","TwitchServiceErrors","opPaginated","paginateCursor","TwitchProtocol","Retry","Http","Query","Array","Boolean","TELEMETRY","searchCategories","i","named","searchChannels"],"sources":["../../src/services/search.ts"],"mappings":"sQAaA,MAAM+B,EAAY,CAChB,OAAQ,aACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,SACR,QAAS,SACT,UAAW,KACb,EAmFA,MAAaC,EAMK,gBAAiB,GAAgBC,IAAMjC,EAAQC,EAAU,mBAAoB,ufAAwf,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAYC,EAAUC,EAAWC,EAAS,KAAMY,EAAqBG,EAAgBd,EAAaoB,EAAWP,CAAc,CAAC,EAAIZ,EAASoB,EAAkBC,CAAC,CAAC,EAIlyB,MAAaE,EAMK,gBAAiB,GAAgBF,IAAMjC,EAAQC,EAAU,iBAAkB,isBAAksB,CAACC,EAAQC,EAAQC,EAASC,EAAUQ,EAAWN,EAAYD,EAAUE,EAAUC,EAAWC,EAAS,KAAMY,EAAqBG,EAAgBd,EAAaoB,EAAWP,CAAc,CAAC,EAAIZ,EAASuB,EAAgBF,CAAC,CAAC,EAMn/B,SAAS,MAAY,CACnB,MAAO,CAAC,kEAAmE,CAAC/B,EAAQG,EAAUE,EAAYC,EAAUC,CAAS,CAAC,CAChI"}