@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,75 @@
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 GetAdScheduleRequest {
5
+ /** Provided _broadcaster_id_ must match the `user_id` in the authentication token. */
6
+ broadcaster_id: string;
7
+ }
8
+ export interface GetAdScheduleResponseDataItem {
9
+ /** The number of snoozes available for the broadcaster. */
10
+ snooze_count?: number | undefined;
11
+ /** The time when the broadcaster will gain an additional snooze, as a Unix timestamp in seconds. Is 0 if the broadcaster already has the maximum number of snoozes. */
12
+ snooze_refresh_at?: number | undefined;
13
+ /** The time of the broadcaster's next scheduled ad, as a Unix timestamp in seconds. Is 0 if the channel has no ad scheduled or is not live. */
14
+ next_ad_at?: number | undefined;
15
+ /** The length in seconds of the scheduled upcoming ad break. */
16
+ duration?: number | undefined;
17
+ /** The time of the broadcaster's last ad-break, as a Unix timestamp in seconds. Is 0 if the channel has not run an ad or is not live. */
18
+ last_ad_at?: number | undefined;
19
+ /** The amount of pre-roll free time remaining for the channel in seconds. Returns 0 if they are currently not pre-roll free. */
20
+ preroll_free_time?: number | undefined;
21
+ }
22
+ /** A list that contains information related to the channel's ad schedule. */
23
+ export type GetAdScheduleResponseDataList = Array<GetAdScheduleResponseDataItem>;
24
+ export interface GetAdScheduleResponse {
25
+ /** A list that contains information related to the channel's ad schedule. */
26
+ data?: GetAdScheduleResponseDataList | undefined;
27
+ }
28
+ export interface SnoozeNextAdRequest {
29
+ /** Provided _broadcaster_id_ must match the `user_id` in the authentication token. */
30
+ broadcaster_id: string;
31
+ }
32
+ export interface SnoozeNextAdResponseDataItem {
33
+ /** The number of snoozes available for the broadcaster. */
34
+ snooze_count?: number | undefined;
35
+ /** The time when the broadcaster will gain an additional snooze, as a Unix timestamp in seconds. */
36
+ snooze_refresh_at?: number | undefined;
37
+ /** The time of the broadcaster's next scheduled ad, as a Unix timestamp in seconds. */
38
+ next_ad_at?: number | undefined;
39
+ }
40
+ /** A list that contains information about the channel's snoozes and next upcoming ad after successfully snoozing. */
41
+ export type SnoozeNextAdResponseDataList = Array<SnoozeNextAdResponseDataItem>;
42
+ export interface SnoozeNextAdResponse {
43
+ /** A list that contains information about the channel's snoozes and next upcoming ad after successfully snoozing. */
44
+ data?: SnoozeNextAdResponseDataList | undefined;
45
+ }
46
+ export interface StartCommercialRequest {
47
+ /** The ID of the partner or affiliate broadcaster that wants to run the commercial. This ID must match the user ID found in the OAuth token. */
48
+ broadcaster_id: string;
49
+ /** The length of the commercial to run, in seconds. Twitch tries to serve a commercial that's the requested length, but it may be shorter or longer. If you request a commercial that's longer than the channel's maximum ad break length, the API uses the maximum. For most channels, the maximum is 180 seconds. */
50
+ length: number;
51
+ }
52
+ export interface StartCommercialResponseDataItem {
53
+ /** The length of the commercial, in seconds. If you requested a commercial that's longer than the channel's maximum ad break length, this is the maximum length. */
54
+ length?: number | undefined;
55
+ /** A message that indicates whether Twitch was able to serve an ad. */
56
+ message?: string | undefined;
57
+ /** The number of seconds you must wait before running another commercial. */
58
+ retry_after?: number | undefined;
59
+ }
60
+ /** An array that contains a single object with the status of your start commercial request. */
61
+ export type StartCommercialResponseDataList = Array<StartCommercialResponseDataItem>;
62
+ export interface StartCommercialResponse {
63
+ /** An array that contains a single object with the status of your start commercial request. */
64
+ data?: StartCommercialResponseDataList | undefined;
65
+ }
66
+ export type GetAdScheduleError = TwitchOpError;
67
+ /** Get Ad Schedule Returns ad schedule related information, including snooze, when the last ad was run, when the next ad is scheduled, and if the channel is currently in pre-roll free time. > **Note** After an ad starts, a new ad cannot be run until the cooldown period ends. The cooldown is 8 > minutes by default and is never shorter than the ad. 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:ads** scope. The User ID associated with the token must match the _broadcaster_id_ in the query parameter. - An [app access token](https://dev.twitch.tv/docs/authentication.md#app-access-tokens). The application, through prior authorization, must have been granted: - The **channel:read:ads** scope for the user represented by the *broadcaster_id* query parameter. Reference: https://dev.twitch.tv/docs/api/reference/ads/#get-ad-schedule */
68
+ export declare const getAdSchedule: API.OperationMethod<GetAdScheduleRequest, GetAdScheduleResponse, GetAdScheduleError, TwitchOpContext>;
69
+ export type SnoozeNextAdError = TwitchOpError;
70
+ /** Snooze Next Ad If available, pushes back the timestamp of the upcoming automatic mid-roll ad by 5 minutes. This endpoint duplicates the snooze functionality in the creator dashboard's Ads Manager. 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:ads** scope. The user ID associated with the token must match the _broadcaster_id_ in the query parameter. - An [app access token](https://dev.twitch.tv/docs/authentication.md#app-access-tokens). The application, through prior authorization, must have been granted: - The **channel:manage:ads** scope for the user represented by the *broadcaster_id* query parameter. Reference: https://dev.twitch.tv/docs/api/reference/ads/#snooze-next-ad */
71
+ export declare const snoozeNextAd: API.OperationMethod<SnoozeNextAdRequest, SnoozeNextAdResponse, SnoozeNextAdError, TwitchOpContext>;
72
+ export type StartCommercialError = TwitchOpError;
73
+ /** Start Commercial Starts a commercial on the specified channel. > **Note** Only partners and affiliates may run commercials and they must be streaming live at the time. > **Note** Only the broadcaster may start a commercial; the broadcaster's editors and moderators may not start commercials on behalf of the broadcaster. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:edit:commercial** scope. - An [app access token](https://dev.twitch.tv/docs/authentication.md#app-access-tokens). The application, through prior authorization, must have been granted: - The **channel:edit:commercial** scope for the user represented by the *broadcaster_id* body field. Reference: https://dev.twitch.tv/docs/api/reference/ads/#start-commercial */
74
+ export declare const startCommercial: API.OperationMethod<StartCommercialRequest, StartCommercialResponse, StartCommercialError, TwitchOpContext>;
75
+ //# sourceMappingURL=ads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ads.d.ts","sources":["../../src/services/ads.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,oBAAoB;IACnC,sFAAsF;IACtF,cAAc,EAAE,MAAM,CAAC;CACxB;AACD,MAAM,WAAW,6BAA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EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AACD,+FAA+F;AAC/F,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC,+BAA+B,CAAC,CAAC;AACrF,MAAM,WAAW,uBAAuB;IACtC,+FAA+F;IAC/F,IAAI,CAAC,EAAE,+BAA+B,GAAG,SAAS,CAAC;CACpD;AACD,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAC/C,87BAA87B;AAC97B,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,eAAe,CAC7C,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,CAUd,CAAC;AAEJ,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAC9C,4yBAA4yB;AAC5yB,eAAO,MAAM,YAAY,EAAE,GAAG,CAAC,eAAe,CAC5C,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,CAUd,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC;AACjD,i1BAAi1B;AACj1B,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,eAAe,CAC/C,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,CAUd,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,n as u,protocol$TwitchProtocol as d,retry$Retry as f,traits$Http as p,traits$Query as m,wc 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:`Ads`,propagate:`w3c`};const _=/*@__PURE__*/ u(u=>u===o?l(`GetAdSchedule`,`{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({broadcaster_id:$3.pipe($2())}).pipe($1({method:"GET",uri:"/channels/ads",code:200}));$4({snooze_count:$7($6),snooze_refresh_at:$7($6),next_ad_at:$7($6),duration:$7($6),last_ad_at:$7($6),preroll_free_time:$7($6)});$4({data:$7(#3)})`,[r,p,m,t,n,a,e,i,h,c,d,f,g]):s(_,u));const v=/*@__PURE__*/ u(u=>u===o?l(`SnoozeNextAd`,`{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({broadcaster_id:$3.pipe($2())}).pipe($1({method:"POST",uri:"/channels/ads/schedule/snooze",code:200}));$4({snooze_count:$7($6),snooze_refresh_at:$7($6),next_ad_at:$7($6)});$4({data:$7(#3)})`,[r,p,m,t,n,a,e,i,h,c,d,f,g]):s(v,u));const y=/*@__PURE__*/ u(u=>u===o?l(`StartCommercial`,`{input:#1,output:#4,errors:[],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$5(>5)@"%Request";$5(>6)@"%ResponseDataItem";$7(#2);$5(>7)@"%Response";$4({broadcaster_id:$2,length:$3}).pipe($1({method:"POST",uri:"/channels/commercial",code:200}));$4({length:$6($3),message:$6($2),retry_after:$6($3)});$4({data:$6(#3)})`,[r,p,t,e,n,a,i,h,c,d,f,g]):s(y,u));export{_ as getAdSchedule,v as snoozeNextAd,y as startCommercial};
2
+ //# sourceMappingURL=ads.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ads.js","names":["API.D","API.named","__L.at","T.Http","T.Query","S.String","S.Struct","S.suspend","S.Number","S.optional","S.Array","Retry.Retry","API.call","Number","String","Struct","at","optional","suspend","D","call","TwitchServiceErrors","op","TwitchProtocol","Retry","Http","Query","Array","TELEMETRY","getAdSchedule","i","named","snoozeNextAd","startCommercial"],"sources":["../../src/services/ads.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,MACT,UAAW,KACb,EAkEA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAM9B,EAAQC,EAAU,gBAAiB,kZAAmZ,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAWC,EAAUC,EAAYC,EAASW,EAAqBE,EAAgBZ,EAAaiB,CAAS,CAAC,EAAIhB,EAASiB,EAAeC,CAAC,CAAC,EAIxpB,MAAaE,EAKK,gBAAQ,GAAgBF,IAAM9B,EAAQC,EAAU,eAAgB,wWAAyW,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAWC,EAAUC,EAAYC,EAASW,EAAqBE,EAAgBZ,EAAaiB,CAAS,CAAC,EAAIhB,EAASoB,EAAcF,CAAC,CAAC,EAI5mB,MAAaG,EAKK,gBAAQ,GAAgBH,IAAM9B,EAAQC,EAAU,kBAAmB,8UAA+U,CAACC,EAAQC,EAAQE,EAAUG,EAAUF,EAAUC,EAAWE,EAAYC,EAASW,EAAqBE,EAAgBZ,EAAaiB,CAAS,CAAC,EAAIhB,EAASqB,EAAiBH,CAAC,CAAC"}
@@ -0,0 +1,90 @@
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 GetExtensionAnalyticsRequest {
5
+ /** The extension's client ID. If specified, the response contains a report for the specified extension. If not specified, the response includes a report for each extension that the authenticated user owns. */
6
+ extension_id?: string | undefined;
7
+ /** The type of analytics report to get. Possible values: - `overview_v2` */
8
+ type?: string | undefined;
9
+ /** The reporting window's start date, in RFC3339 format. Set the time portion to zeroes (for example, `2021-10-22T00:00:00Z`). The start date must be on or after January 31, 2018. If you specify an earlier date, the API ignores it and uses January 31, 2018. If you specify a start date, you must specify an end date. If you don't specify a start and end date, the report includes all available data since January 31, 2018. The report contains one row of data for each day in the reporting window. */
10
+ started_at?: string | undefined;
11
+ /** The reporting window's end date, in RFC3339 format. Set the time portion to zeroes (for example, `2021-10-27T00:00:00Z`). The report is inclusive of the end date. Specify an end date only if you provide a start date. Because it can take up to two days for the data to be available, you should specify an end date that's earlier than today minus one to two days. If you specify an end date that's later than yesterday (UTC), the API ignores it and uses yesterday's date. */
12
+ ended_at?: string | undefined;
13
+ /** The maximum number of report URLs to return per page in the response. The minimum page size is 1 URL per page and the maximum is 100 URLs per page. The default is 20. **NOTE**: While you may specify a maximum value of 100, the response will contain at most 20 URLs per page. */
14
+ first?: number | undefined;
15
+ /** 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) This parameter is ignored if the *extension_id* parameter is set, but the cursor must still be valid. */
16
+ after?: string | undefined;
17
+ }
18
+ /** The earliest and latest dates that the report contains data for, in RFC3339 format. These dates can differ from the reporting window that you requested. */
19
+ export interface GetExtensionAnalyticsResponseDataItemDateRange {
20
+ /** The earliest date that the report contains data for. */
21
+ started_at?: string | undefined;
22
+ /** The latest date that the report contains data for. */
23
+ ended_at?: string | undefined;
24
+ }
25
+ export interface GetExtensionAnalyticsResponseDataItem {
26
+ /** An ID that identifies the extension that the report was generated for. */
27
+ extension_id?: string | undefined;
28
+ /** The URL that you use to download the report. The URL is valid for 5 minutes. */
29
+ URL?: string | undefined;
30
+ /** The type of report. */
31
+ type?: string | undefined;
32
+ /** The earliest and latest dates that the report contains data for, in RFC3339 format. These dates can differ from the reporting window that you requested. */
33
+ date_range?: GetExtensionAnalyticsResponseDataItemDateRange | undefined;
34
+ }
35
+ /** A list of reports. The reports are returned in no particular order; however, the data within each report is in ascending order by date (newest first). The report contains one row of data per day of the reporting window; the report contains rows for only those days that the extension was used. The array is empty if there are no reports. Extensions that have no data in the reporting window are left out, so a page may contain fewer than *first* reports, or none, and still contain a cursor. */
36
+ export type GetExtensionAnalyticsResponseDataList = Array<GetExtensionAnalyticsResponseDataItem>;
37
+ /** Contains the information used to page through the list of results. The response doesn't include this object if there are no more pages left to page through or if you specify the *extension_id* query parameter. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
38
+ export interface GetExtensionAnalyticsResponsePagination {
39
+ /** The cursor used to get the next page of results. Use the cursor to set the request's *after* query parameter. */
40
+ cursor?: string | undefined;
41
+ }
42
+ export interface GetExtensionAnalyticsResponse {
43
+ /** A list of reports. The reports are returned in no particular order; however, the data within each report is in ascending order by date (newest first). The report contains one row of data per day of the reporting window; the report contains rows for only those days that the extension was used. The array is empty if there are no reports. Extensions that have no data in the reporting window are left out, so a page may contain fewer than *first* reports, or none, and still contain a cursor. */
44
+ data: GetExtensionAnalyticsResponseDataList;
45
+ /** Contains the information used to page through the list of results. The response doesn't include this object if there are no more pages left to page through or if you specify the *extension_id* query parameter. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
46
+ pagination?: GetExtensionAnalyticsResponsePagination | undefined;
47
+ }
48
+ export interface GetGameAnalyticsRequest {
49
+ /** The game's ID, which is numeric. If specified, the response contains a report for the specified game. If not specified, the response includes a report for each of the authenticated user's games. */
50
+ game_id?: string | undefined;
51
+ /** The type of analytics report to get. Possible values: - `overview_v2` */
52
+ type?: string | undefined;
53
+ /** The reporting window's start date, in RFC3339 format. Set the time portion to zeroes (for example, `2021-10-22T00:00:00Z`). If you specify a start date, you must specify an end date. The start date must be within one year of today's date. If you specify an earlier date, the API ignores it and uses a date that's one year prior to today's date. If you don't specify a start and end date, the report includes all available data for the last 365 days from today. The report contains one row of data for each day in the reporting window. */
54
+ started_at?: string | undefined;
55
+ /** The reporting window's end date, in RFC3339 format. Set the time portion to zeroes (for example, `2021-10-22T00:00:00Z`). The report is inclusive of the end date. Specify an end date only if you provide a start date. Because it can take up to two days for the data to be available, you should specify an end date that's earlier than today minus one to two days. If you specify an end date that's later than yesterday (UTC), the API ignores it and uses yesterday's date. */
56
+ ended_at?: string | undefined;
57
+ /** The maximum number of report URLs to return per page in the response. The minimum page size is 1 URL per page and the maximum is 100 URLs per page. The default is 20. **NOTE**: While you may specify a maximum value of 100, the response will contain at most 20 URLs per page. */
58
+ first?: number | undefined;
59
+ /** 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) This parameter is ignored if *game_id* parameter is set, but the cursor must still be valid. */
60
+ after?: string | undefined;
61
+ }
62
+ /** The earliest and latest dates that the report contains data for, in RFC3339 format. These dates can differ from the reporting window that you requested. */
63
+ export type GetGameAnalyticsResponseDataItemDateRange = GetExtensionAnalyticsResponseDataItemDateRange;
64
+ export interface GetGameAnalyticsResponseDataItem {
65
+ /** An ID that identifies the game that the report was generated for. */
66
+ game_id?: string | undefined;
67
+ /** The URL that you use to download the report. The URL is valid for 5 minutes. */
68
+ URL?: string | undefined;
69
+ /** The type of report. */
70
+ type?: string | undefined;
71
+ /** The earliest and latest dates that the report contains data for, in RFC3339 format. These dates can differ from the reporting window that you requested. */
72
+ date_range?: GetExtensionAnalyticsResponseDataItemDateRange | undefined;
73
+ }
74
+ /** A list of reports. The reports are returned in no particular order; however, the data within each report is in ascending order by date (newest first). The report contains one row of data per day of the reporting window; the report contains rows for only those days that the game was used. A report is available only if the game was broadcast for at least 5 hours over the reporting period. The array is empty if there are no reports. Games that have no data in the reporting window, or whose analytics aren't available, are left out, so a page may contain fewer than *first* reports, or none, and still contain a cursor. */
75
+ export type GetGameAnalyticsResponseDataList = Array<GetGameAnalyticsResponseDataItem>;
76
+ /** Contains the information used to page through the list of results. The response doesn't include this object if there are no more pages left to page through or if you specify the *game_id* query parameter. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
77
+ export type GetGameAnalyticsResponsePagination = GetExtensionAnalyticsResponsePagination;
78
+ export interface GetGameAnalyticsResponse {
79
+ /** A list of reports. The reports are returned in no particular order; however, the data within each report is in ascending order by date (newest first). The report contains one row of data per day of the reporting window; the report contains rows for only those days that the game was used. A report is available only if the game was broadcast for at least 5 hours over the reporting period. The array is empty if there are no reports. Games that have no data in the reporting window, or whose analytics aren't available, are left out, so a page may contain fewer than *first* reports, or none, and still contain a cursor. */
80
+ data: GetGameAnalyticsResponseDataList;
81
+ /** Contains the information used to page through the list of results. The response doesn't include this object if there are no more pages left to page through or if you specify the *game_id* query parameter. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
82
+ pagination?: GetExtensionAnalyticsResponsePagination | undefined;
83
+ }
84
+ export type GetExtensionAnalyticsError = TwitchOpError;
85
+ /** Get Extension Analytics Gets an analytics report for one or more extensions. The response contains the URLs used to download the reports (CSV files). [Learn More](https://dev.twitch.tv/docs/insights.md) Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **analytics:read:extensions** scope. Reference: https://dev.twitch.tv/docs/api/reference/analytics/#get-extension-analytics */
86
+ export declare const getExtensionAnalytics: API.PaginatedOperationMethod<GetExtensionAnalyticsRequest, GetExtensionAnalyticsResponse, GetExtensionAnalyticsError, TwitchOpContext, GetExtensionAnalyticsResponseDataItem>;
87
+ export type GetGameAnalyticsError = TwitchOpError;
88
+ /** Get Game Analytics Gets an analytics report for one or more games. The response contains the URLs used to download the reports (CSV files). [Learn more](https://dev.twitch.tv/docs/insights.md) Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **analytics:read:games** scope. Reference: https://dev.twitch.tv/docs/api/reference/analytics/#get-game-analytics */
89
+ export declare const getGameAnalytics: API.PaginatedOperationMethod<GetGameAnalyticsRequest, GetGameAnalyticsResponse, GetGameAnalyticsError, TwitchOpContext, GetGameAnalyticsResponseDataItem>;
90
+ //#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I,EAAE,gCAAgC,CAAC;IACvC,mRAAmR;IACnR,UAAU,CAAC,EAAE,uCAAuC,GAAG,SAAS,CAAC;CAClE;AACD,MAAM,MAAM,0BAA0B,GAAG,aAAa,CAAC;AACvD,seAAse;AACte,eAAO,MAAM,qBAAqB,EAAE,GAAG,CAAC,wBAAwB,CAC9D,4BAA4B,EAC5B,6BAA6B,EAC7B,0BAA0B,EAC1B,eAAe,EACf,qCAAqC,CAoB/B,CAAC;AAET,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAClD,kdAAkd;AACld,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,wBAAwB,CACzD,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,eAAe,EACf,gCAAgC,CAoB1B,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}from"../_bundle/sdk.js";const _={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:`Analytics`,propagate:`w3c`};const v=/*@__PURE__*/ u(u=>u===o?l(`GetExtensionAnalytics`,`{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";$9(#2);$7(>7)@"%Response";$6({extension_id:~2:2,type:~2:2,started_at:~2:2,ended_at:~2:2,first:$5($4.pipe($3())),after:~2:2}).pipe($1({method:"GET",uri:"/analytics/extensions",code:200}));$6({extension_id:$5($8),URL:$5($8),type:$5($8),date_range:$5(#2:0)});$6({data:#3,pagination:$5(#2:1)})`,[r,m,__d0,h,e,i,n,a,t,g,c,f,p,_,d]):s(v,u));const y=/*@__PURE__*/ u(u=>u===o?l(`GetGameAnalytics`,`{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";$9(#2);$7(>7)@"%Response";$6({game_id:~2:2,type:~2:2,started_at:~2:2,ended_at:~2:2,first:$5($4.pipe($3())),after:~2:2}).pipe($1({method:"GET",uri:"/analytics/games",code:200}));$6({game_id:$5($8),URL:$5($8),type:$5($8),date_range:$5(#2:0)});$6({data:#3,pagination:$5(#2:1)})`,[r,m,__d0,h,e,i,n,a,t,g,c,f,p,_,d]):s(y,u));function __d0(){return[`$4(>3)@"GetExtensionAnalyticsResponseDataItemDateRange";$4(>4)@"GetExtensionAnalyticsResponsePagination";$2($1.pipe($5()));$3({started_at:$2($1),ended_at:$2($1)});$3({cursor:$2($1)})`,[r,t,i,n,a,h]]}export{v as getExtensionAnalytics,y as getGameAnalytics};
2
+ //# sourceMappingURL=analytics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.js","names":["API.D","API.named","__L.at","T.Http","T.Query","S.Number","S.optional","S.Struct","S.suspend","S.String","S.Array","Retry.Retry","API.call","Number","String","Struct","at","optional","suspend","D","call","TwitchServiceErrors","opPaginated","paginateCursor","TwitchProtocol","Retry","Http","Query","Array","TELEMETRY","getExtensionAnalytics","i","named","getGameAnalytics"],"sources":["../../src/services/analytics.ts"],"mappings":"8PAaA,MAAM6B,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,YACT,UAAW,KACb,EAqFA,MAAaC,EAMK,gBAAiB,GAAgBC,IAAM/B,EAAQC,EAAU,wBAAyB,yiBAA0iB,CAACC,EAAQC,EAAQ,KAAMC,EAASC,EAAUC,EAAYC,EAAUC,EAAWC,EAAUC,EAASW,EAAqBG,EAAgBb,EAAakB,EAAWN,CAAc,CAAC,EAAIX,EAASkB,EAAuBC,CAAC,CAAC,EAI91B,MAAaE,EAMK,gBAAiB,GAAgBF,IAAM/B,EAAQC,EAAU,mBAAoB,0hBAA2hB,CAACC,EAAQC,EAAQ,KAAMC,EAASC,EAAUC,EAAYC,EAAUC,EAAWC,EAAUC,EAASW,EAAqBG,EAAgBb,EAAakB,EAAWN,CAAc,CAAC,EAAIX,EAASqB,EAAkBF,CAAC,CAAC,EAMr0B,SAAS,MAAY,CACnB,MAAO,CAAC,yLAA0L,CAAC7B,EAAQO,EAAUH,EAAYC,EAAUC,EAAWJ,CAAO,CAAC,CAChQ"}
@@ -0,0 +1,284 @@
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 GetBitsLeaderboardRequest {
5
+ /** The number of results to return. The minimum count is 1 and the maximum is 100. The default is 10. */
6
+ count?: number | undefined;
7
+ /** The time period over which data is aggregated (uses the PST time zone). Possible values: - `day`: A day spans from 00:00:00 on the day specified in *started_at* and runs through 00:00:00 of the next day. - `week`: A week spans from 00:00:00 on the Monday of the week specified in *started_at* and runs through 00:00:00 of the next Monday. - `month`: A month spans from 00:00:00 on the first day of the month specified in *started_at* and runs through 00:00:00 of the first day of the next month. - `year`: A year spans from 00:00:00 on the first day of the year specified in *started_at* and runs through 00:00:00 of the first day of the next year. - `all`: Default. The lifetime of the broadcaster's channel. */
8
+ period?: string | undefined;
9
+ /** The start date, in RFC3339 format, used for determining the aggregation period. Specify this parameter only if you specify the *period* query parameter. The start date is ignored if *period* is all. Note that the date is converted to PST before being used, so if you set the start time to `2022-01-01T00:00:00.0Z` and *period* to `month`, the actual reporting period is December 2021, not January 2022. If you want the reporting period to be January 2022, you must set the start time to `2022-01-01T08:00:00.0Z` or `2022-01-01T00:00:00.0-08:00`. If your start date uses the '+' offset operator (for example, `2022-01-01T00:00:00.0+05:00`), you must URL encode the start date. */
10
+ started_at?: string | undefined;
11
+ /** An ID that identifies a user that cheered bits in the channel. If *count* is greater than 1, the response may include users ranked above and below the specified user. To get the leaderboard's top leaders, don't specify a user ID. */
12
+ user_id?: string | undefined;
13
+ }
14
+ export interface GetBitsLeaderboardResponseDataItem {
15
+ /** An ID that identifies a user on the leaderboard. */
16
+ user_id?: string | undefined;
17
+ /** The user's login name. */
18
+ user_login?: string | undefined;
19
+ /** The user's display name. */
20
+ user_name?: string | undefined;
21
+ /** The user's position on the leaderboard. */
22
+ rank?: number | undefined;
23
+ /** The number of Bits the user has cheered. */
24
+ score?: number | undefined;
25
+ }
26
+ /** A list of leaderboard leaders. The leaders are returned in rank order by how much they've cheered. The array is empty if nobody has cheered bits. */
27
+ export type GetBitsLeaderboardResponseDataList = Array<GetBitsLeaderboardResponseDataItem>;
28
+ /** The reporting window's start and end dates, in RFC3339 format. The dates are calculated by using the *started_at* and *period* query parameters. If you don't specify the *started_at* query parameter, the fields contain empty strings. */
29
+ export interface GetBitsLeaderboardResponseDateRange {
30
+ /** The reporting window's start date. */
31
+ started_at?: string | undefined;
32
+ /** The reporting window's end date. */
33
+ ended_at?: string | undefined;
34
+ }
35
+ export interface GetBitsLeaderboardResponse {
36
+ /** A list of leaderboard leaders. The leaders are returned in rank order by how much they've cheered. The array is empty if nobody has cheered bits. */
37
+ data?: GetBitsLeaderboardResponseDataList | undefined;
38
+ /** The reporting window's start and end dates, in RFC3339 format. The dates are calculated by using the *started_at* and *period* query parameters. If you don't specify the *started_at* query parameter, the fields contain empty strings. */
39
+ date_range?: GetBitsLeaderboardResponseDateRange | undefined;
40
+ /** The number of ranked users in `data`. This is the value in the *count* query parameter or the total number of entries on the leaderboard, whichever is less. */
41
+ total?: number | undefined;
42
+ }
43
+ export interface GetCheermotesRequest {
44
+ /** The ID of the broadcaster whose custom Cheermotes you want to get. Specify the broadcaster's ID if you want to include the broadcaster's Cheermotes in the response (not all broadcasters upload Cheermotes). If not specified, the response contains only global Cheermotes. If the broadcaster uploaded Cheermotes, the `type` field in the response is set to **channel_custom**. */
45
+ broadcaster_id?: string | undefined;
46
+ }
47
+ /** The animated GIF image set, keyed by size. */
48
+ export interface GetCheermotesResponseDataItemTiersItemImagesDarkAnimated {
49
+ /** The URL of the 1x image. */
50
+ _1?: string | undefined;
51
+ /** The URL of the 2x image. */
52
+ _2?: string | undefined;
53
+ /** The URL of the 3x image. */
54
+ _3?: string | undefined;
55
+ /** The URL of the 4x image. */
56
+ _4?: string | undefined;
57
+ /** The URL of the 1.5x image. */
58
+ _1_5?: string | undefined;
59
+ }
60
+ /** The static PNG image set, keyed by size. */
61
+ export type GetCheermotesResponseDataItemTiersItemImagesDarkStatic = GetCheermotesResponseDataItemTiersItemImagesDarkAnimated;
62
+ /** The image sets to use on a dark background. */
63
+ export interface GetCheermotesResponseDataItemTiersItemImagesDark {
64
+ /** The animated GIF image set, keyed by size. */
65
+ animated?: GetCheermotesResponseDataItemTiersItemImagesDarkAnimated | undefined;
66
+ /** The static PNG image set, keyed by size. */
67
+ static?: GetCheermotesResponseDataItemTiersItemImagesDarkAnimated | undefined;
68
+ }
69
+ /** The animated GIF image set, keyed by size. */
70
+ export type GetCheermotesResponseDataItemTiersItemImagesLightAnimated = GetCheermotesResponseDataItemTiersItemImagesDarkAnimated;
71
+ /** The static PNG image set, keyed by size. */
72
+ export type GetCheermotesResponseDataItemTiersItemImagesLightStatic = GetCheermotesResponseDataItemTiersItemImagesDarkAnimated;
73
+ /** The image sets to use on a light background. */
74
+ export type GetCheermotesResponseDataItemTiersItemImagesLight = GetCheermotesResponseDataItemTiersItemImagesDark;
75
+ /** The animated and static image sets for the Cheermote, keyed by theme, then format, then size. */
76
+ export interface GetCheermotesResponseDataItemTiersItemImages {
77
+ /** The image sets to use on a dark background. */
78
+ dark?: GetCheermotesResponseDataItemTiersItemImagesDark | undefined;
79
+ /** The image sets to use on a light background. */
80
+ light?: GetCheermotesResponseDataItemTiersItemImagesDark | undefined;
81
+ }
82
+ export interface GetCheermotesResponseDataItemTiersItem {
83
+ /** The minimum number of Bits that you must cheer at this tier level. The maximum number of Bits that you can cheer at this level is determined by the required minimum Bits of the next tier level minus 1. For example, if `min_bits` is 1 and `min_bits` for the next tier is 100, the Bits range for this tier level is 1 through 99. The minimum Bits value of the last tier is the maximum number of Bits you can cheer using this Cheermote. For example, 10000. */
84
+ min_bits?: number | undefined;
85
+ /** The tier level. Possible tiers are: - 1 - 100 - 500 - 1000 - 5000 - 10000 - 100000 */
86
+ id?: string | undefined;
87
+ /** The hex code of the color associated with this tier level (for example, #979797). */
88
+ color?: string | undefined;
89
+ /** The animated and static image sets for the Cheermote, keyed by theme, then format, then size. */
90
+ images?: GetCheermotesResponseDataItemTiersItemImages | undefined;
91
+ /** A Boolean value that determines whether users can cheer at this tier level. */
92
+ can_cheer?: boolean | undefined;
93
+ /** A Boolean value that determines whether this tier level is shown in the Bits card. Is **true** if this tier level is shown in the Bits card. */
94
+ show_in_bits_card?: boolean | undefined;
95
+ }
96
+ /** A list of tier levels that the Cheermote supports. Each tier identifies the range of Bits that you can cheer at that tier level and an image that graphically identifies the tier level. */
97
+ export type GetCheermotesResponseDataItemTiersList = Array<GetCheermotesResponseDataItemTiersItem>;
98
+ export interface GetCheermotesResponseDataItem {
99
+ /** The name portion of the Cheermote string that you use in chat to cheer Bits. The full Cheermote string is the concatenation of {prefix} + {number of Bits}. For example, if the prefix is "Cheer" and you want to cheer 100 Bits, the full Cheermote string is Cheer100. When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered. */
100
+ prefix?: string | undefined;
101
+ /** A list of tier levels that the Cheermote supports. Each tier identifies the range of Bits that you can cheer at that tier level and an image that graphically identifies the tier level. */
102
+ tiers?: GetCheermotesResponseDataItemTiersList | undefined;
103
+ /** The type of Cheermote. Possible values: - `global_first_party`: A Twitch-defined Cheermote that is shown in the Bits card. - `global_third_party`: A Twitch-defined Cheermote that is not shown in the Bits card. - `channel_custom`: A broadcaster-defined Cheermote. - `display_only`: Do not use; for internal use only. - `sponsored`: A sponsor-defined Cheermote. When used, the sponsor adds additional Bits to the amount that the user cheered. For example, if the user cheered Terminator100, the broadcaster might receive 110 Bits, which includes the sponsor's 10 Bits contribution. */
104
+ type?: string | undefined;
105
+ /** The order that the Cheermotes are shown in the Bits card. The numbers may not be consecutive. For example, the numbers may jump from 1 to 7 to 13. The order numbers are unique within a Cheermote type (for example, global_first_party) but may not be unique amongst all Cheermotes in the response. */
106
+ order?: number | undefined;
107
+ /** The date and time, in RFC3339 format, when this Cheermote was last updated. */
108
+ last_updated?: string | undefined;
109
+ /** A Boolean value that indicates whether this Cheermote provides a charitable contribution match during charity campaigns. */
110
+ is_charitable?: boolean | undefined;
111
+ }
112
+ /** The list of Cheermotes. The list is in ascending order by the `order` field's value. */
113
+ export type GetCheermotesResponseDataList = Array<GetCheermotesResponseDataItem>;
114
+ export interface GetCheermotesResponse {
115
+ /** The list of Cheermotes. The list is in ascending order by the `order` field's value. */
116
+ data?: GetCheermotesResponseDataList | undefined;
117
+ }
118
+ export type GetCustomPowerUpRequestIdList = Array<string>;
119
+ export interface GetCustomPowerUpRequest {
120
+ /** The ID of the broadcaster whose Custom Power-ups you want to get. This ID must match the user ID found in the OAuth token. */
121
+ broadcaster_id: string;
122
+ /** A list of IDs to filter the Power-ups by. To specify more than one ID, include this parameter for each Power-up you want to get. For example, 'id=1234&id=5678'. You may specify a maximum of 50 IDs. Duplicate IDs are ignored. The response contains only the IDs that were found. If none of the IDs were found, the response is 404 Not Found. */
123
+ id?: GetCustomPowerUpRequestIdList | undefined;
124
+ }
125
+ /** A set of custom images for the Custom Power-up. This field is **null** if the broadcaster didn't upload images. */
126
+ export interface GetCustomPowerUpResponseDataItemImage {
127
+ /** The URL to a small version of the image. */
128
+ url_1x?: string | undefined;
129
+ /** The URL to a medium version of the image. */
130
+ url_2x?: string | undefined;
131
+ /** The URL to a large version of the image. */
132
+ url_4x?: string | undefined;
133
+ }
134
+ /** A set of default images for the Custom Power-up. */
135
+ export type GetCustomPowerUpResponseDataItemDefaultImage = GetCustomPowerUpResponseDataItemImage;
136
+ /** The settings used to determine whether to apply a maximum to the number of redemptions allowed per live stream. */
137
+ export interface GetCustomPowerUpResponseDataItemMaxPerStreamSetting {
138
+ /** A Boolean value that determines whether the Custom Power-up applies a limit on the number of redemptions allowed per live stream. Is **true** if the Custom Power-up applies a limit. */
139
+ is_enabled?: boolean | undefined;
140
+ /** The maximum number of redemptions allowed per live stream. */
141
+ max_per_stream?: number | undefined;
142
+ }
143
+ /** The settings used to determine whether to apply a maximum to the number of redemptions allowed per user per live stream. */
144
+ export interface GetCustomPowerUpResponseDataItemMaxPerUserPerStreamSetting {
145
+ /** A Boolean value that determines whether the Custom Power-up applies a limit on the number of redemptions allowed per user per live stream. Is **true** if the custom Power-up applies a limit. */
146
+ is_enabled?: boolean | undefined;
147
+ /** The maximum number of redemptions allowed per user per live stream. */
148
+ max_per_user_per_stream?: number | undefined;
149
+ }
150
+ /** The settings used to determine whether to apply a cooldown period between redemptions and the length of the cooldown. */
151
+ export interface GetCustomPowerUpResponseDataItemGlobalCooldownSetting {
152
+ /** A Boolean value that determines whether to apply a cooldown period. Is **true** if a cooldown period is enabled. */
153
+ is_enabled?: boolean | undefined;
154
+ /** The cooldown period, in seconds. */
155
+ global_cooldown_seconds?: number | undefined;
156
+ }
157
+ export interface GetCustomPowerUpResponseDataItem {
158
+ /** The ID that uniquely identifies the broadcaster. */
159
+ broadcaster_id?: string | undefined;
160
+ /** The broadcaster's login name. */
161
+ broadcaster_login?: string | undefined;
162
+ /** The broadcaster's display name. */
163
+ broadcaster_name?: string | undefined;
164
+ /** The ID that uniquely identifies this Custom Power-up. */
165
+ id?: string | undefined;
166
+ /** The title of the Custom Power-up. */
167
+ title?: string | undefined;
168
+ /** The prompt shown to the viewer when they redeem the Custom Power-up if user input is required (see the `is_user_input_required` field). */
169
+ prompt?: string | undefined;
170
+ /** The amount of Bits for the Custom Power-up. */
171
+ bits?: number | undefined;
172
+ /** A set of custom images for the Custom Power-up. This field is **null** if the broadcaster didn't upload images. */
173
+ image?: GetCustomPowerUpResponseDataItemImage | null | undefined;
174
+ /** A set of default images for the Custom Power-up. */
175
+ default_image?: GetCustomPowerUpResponseDataItemImage | undefined;
176
+ /** The background color to use for the Custom Power-up. The color is in Hex format (for example, #00E5CB). */
177
+ background_color?: string | undefined;
178
+ /** A Boolean value that determines whether the Custom Power-up is enabled. Is **true** if enabled; otherwise, **false**. Disabled Custom Power-ups aren't shown to the user. */
179
+ is_enabled?: boolean | undefined;
180
+ /** A Boolean value that determines whether the user must enter information when redeeming the Custom Power-up. Is **true** if the user is prompted. */
181
+ is_user_input_required?: boolean | undefined;
182
+ /** The settings used to determine whether to apply a maximum to the number of redemptions allowed per live stream. */
183
+ max_per_stream_setting?: GetCustomPowerUpResponseDataItemMaxPerStreamSetting | undefined;
184
+ /** The settings used to determine whether to apply a maximum to the number of redemptions allowed per user per live stream. */
185
+ max_per_user_per_stream_setting?: GetCustomPowerUpResponseDataItemMaxPerUserPerStreamSetting | undefined;
186
+ /** The settings used to determine whether to apply a cooldown period between redemptions and the length of the cooldown. */
187
+ global_cooldown_setting?: GetCustomPowerUpResponseDataItemGlobalCooldownSetting | undefined;
188
+ /** A Boolean value that determines whether the Custom Power-up is currently paused. Is **true** if the Custom Power-up is paused. Viewers can't redeem paused Custom Power-ups. */
189
+ is_paused?: boolean | undefined;
190
+ /** A Boolean value that determines whether the Custom Power-up is currently in stock. Is **true** if the Custom Power-up is in stock. Viewers can't redeem out of stock custom Power-ups. */
191
+ is_in_stock?: boolean | undefined;
192
+ /** The number of redemptions redeemed during the current live stream. The number counts against the `max_per_stream_setting` limit. This field is **null** if the broadcaster's stream isn't live or `max_per_stream_setting` isn't enabled. */
193
+ redemptions_redeemed_current_stream?: number | null | undefined;
194
+ /** The timestamp of when the cooldown period expires. Is **null** if the Custom Power-up isn't in a cooldown state. See the `global_cooldown_setting` field. */
195
+ cooldown_expires_at?: string | null | undefined;
196
+ }
197
+ /** A list of Custom Power-ups. The list is in ascending order by `id`. If the broadcaster hasn't created Custom Power-ups, the list is empty. */
198
+ export type GetCustomPowerUpResponseDataList = Array<GetCustomPowerUpResponseDataItem>;
199
+ export interface GetCustomPowerUpResponse {
200
+ /** A list of Custom Power-ups. The list is in ascending order by `id`. If the broadcaster hasn't created Custom Power-ups, the list is empty. */
201
+ data?: GetCustomPowerUpResponseDataList | undefined;
202
+ }
203
+ export interface GetExtensionTransactionsRequest {
204
+ /** The ID of the extension whose list of transactions you want to get. */
205
+ extension_id: string;
206
+ /** A transaction ID used to filter the list of transactions. Specify this parameter for each transaction you want to get. For example, 'id=1234&id=5678'. You may specify a maximum of 100 IDs. The response contains only the transactions that were found; IDs that don't match a transaction are ignored. If you specify *id*, the *first* and *after* query parameters don't apply. */
207
+ id?: string | undefined;
208
+ /** 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. */
209
+ first?: number | undefined;
210
+ /** 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) */
211
+ after?: string | undefined;
212
+ }
213
+ /** Contains details about the digital product's cost. */
214
+ export interface GetExtensionTransactionsResponseDataItemProductDataCost {
215
+ /** The amount exchanged for the digital product. */
216
+ amount?: number | undefined;
217
+ /** The type of currency exchanged. Possible values: - `bits` */
218
+ type?: string | undefined;
219
+ }
220
+ /** Contains details about the digital product. */
221
+ export interface GetExtensionTransactionsResponseDataItemProductData {
222
+ /** An ID that identifies the digital product. */
223
+ sku?: string | undefined;
224
+ /** Set to **twitch.ext.** followed by the extension's ID. */
225
+ domain?: string | undefined;
226
+ /** Contains details about the digital product's cost. */
227
+ cost?: GetExtensionTransactionsResponseDataItemProductDataCost | undefined;
228
+ /** A Boolean value that determines whether the product is in development. Is **true** if the digital product is in development and cannot be exchanged. */
229
+ inDevelopment?: boolean | undefined;
230
+ /** The name of the digital product. */
231
+ displayName?: string | undefined;
232
+ /** This field is always empty since you may purchase only unexpired products. */
233
+ expiration?: string | undefined;
234
+ /** A Boolean value that determines whether the data was broadcast to all instances of the extension. Is **true** if the data was broadcast to all instances. */
235
+ broadcast?: boolean | undefined;
236
+ }
237
+ export interface GetExtensionTransactionsResponseDataItem {
238
+ /** An ID that identifies the transaction. */
239
+ id?: string | undefined;
240
+ /** The UTC date and time (in RFC3339 format) of the transaction. */
241
+ timestamp?: string | undefined;
242
+ /** The ID of the broadcaster that owns the channel where the transaction occurred. */
243
+ broadcaster_id?: string | undefined;
244
+ /** The broadcaster's login name. */
245
+ broadcaster_login?: string | undefined;
246
+ /** The broadcaster's display name. */
247
+ broadcaster_name?: string | undefined;
248
+ /** The ID of the user that purchased the digital product. */
249
+ user_id?: string | undefined;
250
+ /** The user's login name. */
251
+ user_login?: string | undefined;
252
+ /** The user's display name. */
253
+ user_name?: string | undefined;
254
+ /** The type of transaction. Possible values: - `BITS_IN_EXTENSION` */
255
+ product_type?: string | undefined;
256
+ /** Contains details about the digital product. */
257
+ product_data?: GetExtensionTransactionsResponseDataItemProductData | undefined;
258
+ }
259
+ /** The list of transactions. */
260
+ export type GetExtensionTransactionsResponseDataList = Array<GetExtensionTransactionsResponseDataItem>;
261
+ /** Contains the information used to page through the list of results. The response doesn't include this object if there are no more pages left to page through or if you specify the *id* query parameter. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
262
+ export interface GetExtensionTransactionsResponsePagination {
263
+ /** The cursor used to get the next page of results. Use the cursor to set the request's *after* query parameter. */
264
+ cursor?: string | undefined;
265
+ }
266
+ export interface GetExtensionTransactionsResponse {
267
+ /** The list of transactions. */
268
+ data: GetExtensionTransactionsResponseDataList;
269
+ /** Contains the information used to page through the list of results. The response doesn't include this object if there are no more pages left to page through or if you specify the *id* query parameter. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
270
+ pagination?: GetExtensionTransactionsResponsePagination | undefined;
271
+ }
272
+ export type GetBitsLeaderboardError = TwitchOpError;
273
+ /** Get Bits Leaderboard Gets the Bits leaderboard for the authenticated broadcaster. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **bits:read** scope. Reference: https://dev.twitch.tv/docs/api/reference/bits/#get-bits-leaderboard */
274
+ export declare const getBitsLeaderboard: API.OperationMethod<GetBitsLeaderboardRequest, GetBitsLeaderboardResponse, GetBitsLeaderboardError, TwitchOpContext>;
275
+ export type GetCheermotesError = TwitchOpError;
276
+ /** Get Cheermotes Gets a list of Cheermotes that users can use to cheer Bits in any Bits-enabled channel's chat room. Cheermotes are animated emotes that viewers can assign Bits to. 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/bits/#get-cheermotes */
277
+ export declare const getCheermotes: API.OperationMethod<GetCheermotesRequest, GetCheermotesResponse, GetCheermotesError, TwitchOpContext>;
278
+ export type GetCustomPowerUpError = TwitchOpError;
279
+ /** Get Custom Power-up Gets a list of Custom Power-ups that the specified broadcaster created. > **Note** A channel may offer a maximum of 50 Custom Power-ups, which includes both enabled and disabled Power-ups. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **bits:read** scope. Reference: https://dev.twitch.tv/docs/api/reference/bits/#get-custom-power-up */
280
+ export declare const getCustomPowerUp: API.OperationMethod<GetCustomPowerUpRequest, GetCustomPowerUpResponse, GetCustomPowerUpError, TwitchOpContext>;
281
+ export type GetExtensionTransactionsError = TwitchOpError;
282
+ /** Get Extension Transactions Gets an extension's list of transactions. A transaction records the exchange of a currency (for example, Bits) for a digital product. Authorization: Requires one of the following: - An [app access token](https://dev.twitch.tv/docs/authentication.md#app-access-tokens). Reference: https://dev.twitch.tv/docs/api/reference/bits/#get-extension-transactions */
283
+ export declare const getExtensionTransactions: API.PaginatedOperationMethod<GetExtensionTransactionsRequest, GetExtensionTransactionsResponse, GetExtensionTransactionsError, TwitchOpContext, GetExtensionTransactionsResponseDataItem>;
284
+ //# sourceMappingURL=bits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bits.d.ts","sources":["../../src/services/bits.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,yBAAyB;IACxC,yGAAyG;IACzG,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,4sBAA4sB;IAC5sB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,0qBAA0qB;IAC1qB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,4OAA4O;IAC5O,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AACD,MAAM,WAAW,kCAAkC;IACjD,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AACD,wJAAwJ;AACxJ,MAAM,MAAM,kCAAkC,GAAG,KAAK,CAAC,kCAAkC,CAAC,CAAC;AAC3F,gPA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,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAClD,mdAAmd;AACnd,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,eAAe,CAChD,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,eAAe,CAUd,CAAC;AAEJ,MAAM,MAAM,6BAA6B,GAAG,aAAa,CAAC;AAC1D,mYAAmY;AACnY,eAAO,MAAM,wBAAwB,EAAE,GAAG,CAAC,wBAAwB,CACjE,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,eAAe,EACf,wCAAwC,CAoBlC,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$Body as g,traits$Http as _,traits$Query as v,wc as y,xc as b}from"../_bundle/sdk.js";const x={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:`Bits`,propagate:`w3c`};const S=/*@__PURE__*/ d(e=>e===s?u(`GetBitsLeaderboard`,`{input:#1,output:#5,errors:[],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$7(>6)@"%Request";$7(>7)@"%ResponseDataItem";$8(#2);$7(>8)@"%ResponseDateRange";$7(>9)@"%Response";$6({count:$4($3.pipe($2())),period:$4($5.pipe($2())),started_at:$4($5.pipe($2())),user_id:$4($5.pipe($2()))}).pipe($1({method:"GET",uri:"/bits/leaderboard",code:200}));$6({user_id:$4($5),user_login:$4($5),user_name:$4($5),rank:$4($3),score:$4($3)});$6({started_at:$4($5),ended_at:$4($5)});$6({data:$4(#3),date_range:$4(#4),total:$4($3)})`,[i,_,v,t,a,n,r,o,y,l,m,h,x]):c(S,e));const C=/*@__PURE__*/ d(e=>e===s?u(`GetCheermotesResponseDataItem`,`{input:#1,output:#9,errors:[],serviceErrors:$11,protocol:$12,retry:$13,telemetry:$14,span:"GetCheermotes"};$6(>10)@"GetCheermotesRequest";$6(>11)@"%TiersItemImagesDarkAnimated";$6(>12)@"%TiersItemImagesDark";$6(>13)@"%TiersItemImages";$6(>14)@"%TiersItem";$10(#5);$6(>15)@"%";$10(#7);$6(>16)@"GetCheermotesResponse";$5({broadcaster_id:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/bits/cheermotes",code:200}));$5({_1:$4($3.pipe($7("1"))),_2:$4($3.pipe($7("2"))),_3:$4($3.pipe($7("3"))),_4:$4($3.pipe($7("4"))),_1_5:$4($3.pipe($7("1.5")))});$5({animated:$4(#2),static:$4(#2)});$5({dark:$4(#3),light:$4(#3)});$5({min_bits:$4($8),id:$4($3),color:$4($3),images:$4(#4),can_cheer:$4($9),show_in_bits_card:$4($9)});$5({prefix:$4($3),tiers:$4(#6),type:$4($3),order:$4($8),last_updated:$4($3),is_charitable:$4($9)});$5({data:$4(#8)})`,[i,_,v,n,a,r,o,g,t,b,y,l,m,h,x]):c(C,e));const w=/*@__PURE__*/ d(d=>d===s?u(`GetCustomPowerUpResponseDataItem`,`{input:#2,output:#9,errors:[],serviceErrors:$11,protocol:$12,retry:$13,telemetry:$14,span:"GetCustomPowerUp"};$2($1);$7(>10)@"GetCustomPowerUpRequest";$7(>11)@"%Image";$7(>12)@"%MaxPerStreamSetting";$7(>13)@"%MaxPerUserPerStreamSetting";$7(>14)@"%GlobalCooldownSetting";$7(>15)@"%";$2(#7);$7(>16)@"GetCustomPowerUpResponse";$6({broadcaster_id:$1.pipe($4()),id:$5(#1.pipe($4()))}).pipe($3({method:"GET",uri:"/bits/custom_power_ups",code:200}));$6({url_1x:$5($1),url_2x:$5($1),url_4x:$5($1)});$6({is_enabled:$5($8),max_per_stream:$5($9)});$6({is_enabled:$5($8),max_per_user_per_stream:$5($9)});$6({is_enabled:$5($8),global_cooldown_seconds:$5($9)});$6({broadcaster_id:$5($1),broadcaster_login:$5($1),broadcaster_name:$5($1),id:$5($1),title:$5($1),prompt:$5($1),bits:$5($9),image:$5($10(#3)),default_image:$5(#3),background_color:$5($1),is_enabled:$5($8),is_user_input_required:$5($8),max_per_stream_setting:$5(#4),max_per_user_per_stream_setting:$5(#5),global_cooldown_setting:$5(#6),is_paused:$5($8),is_in_stock:$5($8),redemptions_redeemed_current_stream:$5($10($9)),cooldown_expires_at:$5($10($1))});$6({data:$5(#8)})`,[i,n,y,_,v,a,r,o,b,t,e,l,m,h,x]):c(w,d));const T=/*@__PURE__*/ f(e=>e===s?u(`GetExtensionTransactions`,`{input:#1,output:#7,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(>8)@"%Request";$7(>9)@"%ResponseDataItemProductDataCost";$7(>10)@"%ResponseDataItemProductData";$7(>11)@"%ResponseDataItem";$9(#4);$7(>12)@"%ResponsePagination";$7(>13)@"%Response";$6({extension_id:$3.pipe($2()),id:$4($3.pipe($2())),first:$4($5.pipe($2())),after:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/extensions/transactions",code:200}));$6({amount:$4($5),type:$4($3)});$6({sku:$4($3),domain:$4($3),cost:$4(#2),inDevelopment:$4($8),displayName:$4($3),expiration:$4($3),broadcast:$4($8)});$6({id:$4($3),timestamp:$4($3),broadcaster_id:$4($3),broadcaster_login:$4($3),broadcaster_name:$4($3),user_id:$4($3),user_login:$4($3),user_name:$4($3),product_type:$4($3),product_data:$4(#3)});$6({cursor:$4($3)});$6({data:#5,pagination:$4(#6)})`,[i,_,v,n,a,t,r,o,b,y,l,m,h,x,p]):c(T,e));export{S as getBitsLeaderboard,C as getCheermotes,w as getCustomPowerUp,T as getExtensionTransactions};
2
+ //# sourceMappingURL=bits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bits.js","names":["API.D","API.named","__L.at","T.Http","T.Query","S.Number","S.optional","S.String","S.Struct","S.suspend","S.Array","Retry.Retry","API.call","T.Body","S.Boolean","S.NullOr","NullOr","Number","String","Struct","at","optional","suspend","D","call","TwitchServiceErrors","named","op","opPaginated","paginateCursor","TwitchProtocol","Retry","Body","Http","Query","Array","Boolean","TELEMETRY","getBitsLeaderboard","i","getCheermotes","getCustomPowerUp","getExtensionTransactions"],"sources":["../../src/services/bits.ts"],"mappings":"2SAaA,MAAMqC,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,OACT,UAAW,KACb,EAuRA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAMvC,EAAQC,EAAU,qBAAsB,qhBAAshB,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAYC,EAAUC,EAAUC,EAAWC,EAASe,EAAqBK,EAAgBnB,EAAa0B,CAAS,CAAC,EAAIzB,EAAS0B,EAAoBC,CAAC,CAAC,EAIryB,MAAaC,EAKK,gBAAQ,GAAgBD,IAAMvC,EAAQC,EAAU,gCAAiC,6zBAA8zB,CAACC,EAAQC,EAAQC,EAASG,EAAUD,EAAYE,EAAUC,EAAWI,EAAQR,EAAUS,EAAWJ,EAASe,EAAqBK,EAAgBnB,EAAa0B,CAAS,CAAC,EAAIzB,EAAS4B,EAAeD,CAAC,CAAC,EAItmC,MAAaE,EAKK,gBAAQ,GAAgBF,IAAMvC,EAAQC,EAAU,mCAAoC,gmCAAimC,CAACC,EAAQK,EAAUG,EAASP,EAAQC,EAASE,EAAYE,EAAUC,EAAWK,EAAWT,EAAUU,EAAUU,EAAqBK,EAAgBnB,EAAa0B,CAAS,CAAC,EAAIzB,EAAS6B,EAAkBF,CAAC,CAAC,EAIj5C,MAAaG,EAMK,gBAAiB,GAAgBH,IAAMvC,EAAQC,EAAU,2BAA4B,q8BAAs8B,CAACC,EAAQC,EAAQC,EAASG,EAAUD,EAAYD,EAAUG,EAAUC,EAAWK,EAAWJ,EAASe,EAAqBK,EAAgBnB,EAAa0B,EAAWR,CAAc,CAAC,EAAIjB,EAAS8B,EAA0BH,CAAC,CAAC"}
@@ -0,0 +1,26 @@
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 type GetContentClassificationLabelsRequestLocaleList = Array<string>;
5
+ export interface GetContentClassificationLabelsRequest {
6
+ /** Locale for the Content Classification Labels. You may specify a maximum of 1 locale. Default: '"en-US"' Supported locales: '"ar-SA", "bg-BG", "cs-CZ", "da-DK", "de-DE", "el-GR", "en-GB", "en-US", "es-ES", "es-MX", "fi-FI", "fr-FR", "hu-HU", "it-IT", "ja-JP", "ko-KR", "nl-NL", "no-NO", "pl-PL", "pt-BR", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sv-SE", "th-TH", "tr-TR", "uk-UA", "vi-VN", "zh-CN", "zh-TW"' If the locale isn't supported, the closest supported locale is used, or en-US if none is close. */
7
+ locale?: GetContentClassificationLabelsRequestLocaleList | undefined;
8
+ }
9
+ export interface GetContentClassificationLabelsResponseDataItem {
10
+ /** Unique identifier for the CCL. */
11
+ id?: string | undefined;
12
+ /** Localized description of the CCL. */
13
+ description?: string | undefined;
14
+ /** Localized name of the CCL. */
15
+ name?: string | undefined;
16
+ }
17
+ /** A list that contains information about the available content classification labels. */
18
+ export type GetContentClassificationLabelsResponseDataList = Array<GetContentClassificationLabelsResponseDataItem>;
19
+ export interface GetContentClassificationLabelsResponse {
20
+ /** A list that contains information about the available content classification labels. */
21
+ data?: GetContentClassificationLabelsResponseDataList | undefined;
22
+ }
23
+ export type GetContentClassificationLabelsError = TwitchOpError;
24
+ /** Get Content Classification Labels Gets information about Twitch content classification labels. 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/ccls/#get-content-classification-labels */
25
+ export declare const getContentClassificationLabels: API.OperationMethod<GetContentClassificationLabelsRequest, GetContentClassificationLabelsResponse, GetContentClassificationLabelsError, TwitchOpContext>;
26
+ //# sourceMappingURL=ccls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ccls.d.ts","sources":["../../src/services/ccls.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,MAAM,+CAA+C,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAC5E,MAAM,WAAW,qCAAqC;IACpD,yfAAyf;IACzf,MAAM,CAAC,EAAE,+CAA+C,GAAG,SAAS,CAAC;CACtE;AACD,MAAM,WAAW,8CAA8C;IAC7D,qCAAqC;IACrC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AACD,0FAA0F;AAC1F,MAAM,MAAM,8CAA8C,GACxD,KAAK,CAAC,8CAA8C,CAAC,CAAC;AACxD,MAAM,WAAW,sCAAsC;IACrD,0FAA0F;IAC1F,IAAI,CAAC,EAAE,8CAA8C,GAAG,SAAS,CAAC;CACnE;AACD,MAAM,MAAM,mCAAmC,GAAG,aAAa,CAAC;AAChE,kaAAka;AACla,eAAO,MAAM,8BAA8B,EAAE,GAAG,CAAC,eAAe,CAC9D,qCAAqC,EACrC,sCAAsC,EACtC,mCAAmC,EACnC,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}from"../_bundle/sdk.js";const h={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:`Ccls`,propagate:`w3c`};const g=/*@__PURE__*/ l(l=>l===a?c(`GetContentClassificationLabels`,`{input:#2,output:#5,errors:[],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$2($1);$7(>6)@"%Request";$7(>7)@"%ResponseDataItem";$2(#3);$7(>8)@"%Response";$6({locale:$5(#1.pipe($4()))}).pipe($3({method:"GET",uri:"/content_classification_labels",code:200}));$6({id:$5($1),description:$5($1),name:$5($1)});$6({data:$5(#4)})`,[n,e,m,f,p,r,t,i,s,u,d,h]):o(g,l));export{g as getContentClassificationLabels};
2
+ //# sourceMappingURL=ccls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ccls.js","names":["API.D","API.named","__L.at","S.String","S.Array","T.Http","T.Query","S.optional","S.Struct","S.suspend","Retry.Retry","API.call","String","Struct","at","optional","suspend","call","TwitchServiceErrors","named","op","TwitchProtocol","Retry","Http","Query","Array","TELEMETRY","getContentClassificationLabels","i","D"],"sources":["../../src/services/ccls.ts"],"mappings":"uNAYA,MAAM0B,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,OACT,UAAW,KACb,EAwBA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAM5B,EAAQC,EAAU,iCAAkC,oVAAqV,CAACC,EAAQC,EAAUC,EAASC,EAAQC,EAASC,EAAYC,EAAUC,EAAWS,EAAqBG,EAAgBX,EAAagB,CAAS,CAAC,EAAIf,EAASgB,EAAgCC,CAAC,CAAC"}