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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +83 -2
  3. package/lib/.lazy.json +1 -0
  4. package/lib/_bundle/lazy.js +4 -0
  5. package/lib/_bundle/sdk.js +2 -0
  6. package/lib/_bundle/sdk.js.map +1 -0
  7. package/lib/credentials.d.ts +31 -0
  8. package/lib/credentials.d.ts.map +1 -0
  9. package/lib/credentials.js +1 -0
  10. package/lib/errors.d.ts +49 -0
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/errors.js +1 -0
  13. package/lib/index.d.ts +46 -0
  14. package/lib/index.d.ts.map +1 -0
  15. package/lib/index.js +6 -0
  16. package/lib/pagination.d.ts +10 -0
  17. package/lib/pagination.d.ts.map +1 -0
  18. package/lib/pagination.js +1 -0
  19. package/lib/protocol.d.ts +19 -0
  20. package/lib/protocol.d.ts.map +1 -0
  21. package/lib/protocol.js +1 -0
  22. package/lib/retry.d.ts +50 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +1 -0
  25. package/lib/services/ads.d.ts +75 -0
  26. package/lib/services/ads.d.ts.map +1 -0
  27. package/lib/services/ads.js +2 -0
  28. package/lib/services/ads.js.map +1 -0
  29. package/lib/services/analytics.d.ts +90 -0
  30. package/lib/services/analytics.d.ts.map +1 -0
  31. package/lib/services/analytics.js +2 -0
  32. package/lib/services/analytics.js.map +1 -0
  33. package/lib/services/bits.d.ts +284 -0
  34. package/lib/services/bits.d.ts.map +1 -0
  35. package/lib/services/bits.js +2 -0
  36. package/lib/services/bits.js.map +1 -0
  37. package/lib/services/ccls.d.ts +26 -0
  38. package/lib/services/ccls.d.ts.map +1 -0
  39. package/lib/services/ccls.js +2 -0
  40. package/lib/services/ccls.js.map +1 -0
  41. package/lib/services/channel_points.d.ts +416 -0
  42. package/lib/services/channel_points.d.ts.map +1 -0
  43. package/lib/services/channel_points.js +2 -0
  44. package/lib/services/channel_points.js.map +1 -0
  45. package/lib/services/channels.d.ts +173 -0
  46. package/lib/services/channels.d.ts.map +1 -0
  47. package/lib/services/channels.js +2 -0
  48. package/lib/services/channels.js.map +1 -0
  49. package/lib/services/charity.d.ts +97 -0
  50. package/lib/services/charity.d.ts.map +1 -0
  51. package/lib/services/charity.js +2 -0
  52. package/lib/services/charity.js.map +1 -0
  53. package/lib/services/chat.d.ts +638 -0
  54. package/lib/services/chat.d.ts.map +1 -0
  55. package/lib/services/chat.js +33 -0
  56. package/lib/services/chat.js.map +1 -0
  57. package/lib/services/clips.d.ts +153 -0
  58. package/lib/services/clips.d.ts.map +1 -0
  59. package/lib/services/clips.js +2 -0
  60. package/lib/services/clips.js.map +1 -0
  61. package/lib/services/conduits.d.ts +172 -0
  62. package/lib/services/conduits.d.ts.map +1 -0
  63. package/lib/services/conduits.js +2 -0
  64. package/lib/services/conduits.js.map +1 -0
  65. package/lib/services/entitlements.d.ts +76 -0
  66. package/lib/services/entitlements.d.ts.map +1 -0
  67. package/lib/services/entitlements.js +2 -0
  68. package/lib/services/entitlements.js.map +1 -0
  69. package/lib/services/eventsub.d.ts +158 -0
  70. package/lib/services/eventsub.d.ts.map +1 -0
  71. package/lib/services/eventsub.js +2 -0
  72. package/lib/services/eventsub.js.map +1 -0
  73. package/lib/services/extensions.d.ts +497 -0
  74. package/lib/services/extensions.d.ts.map +1 -0
  75. package/lib/services/extensions.js +2 -0
  76. package/lib/services/extensions.js.map +1 -0
  77. package/lib/services/games.d.ts +57 -0
  78. package/lib/services/games.d.ts.map +1 -0
  79. package/lib/services/games.js +2 -0
  80. package/lib/services/games.js.map +1 -0
  81. package/lib/services/goals.d.ts +37 -0
  82. package/lib/services/goals.d.ts.map +1 -0
  83. package/lib/services/goals.js +2 -0
  84. package/lib/services/goals.js.map +1 -0
  85. package/lib/services/guest_star.d.ts +314 -0
  86. package/lib/services/guest_star.d.ts.map +1 -0
  87. package/lib/services/guest_star.js +2 -0
  88. package/lib/services/guest_star.js.map +1 -0
  89. package/lib/services/hype_train.d.ts +91 -0
  90. package/lib/services/hype_train.d.ts.map +1 -0
  91. package/lib/services/hype_train.js +2 -0
  92. package/lib/services/hype_train.js.map +1 -0
  93. package/lib/services/index.d.ts +30 -0
  94. package/lib/services/index.d.ts.map +1 -0
  95. package/lib/services/index.js +29 -0
  96. package/lib/services/moderation.d.ts +731 -0
  97. package/lib/services/moderation.d.ts.map +1 -0
  98. package/lib/services/moderation.js +41 -0
  99. package/lib/services/moderation.js.map +1 -0
  100. package/lib/services/polls.d.ts +173 -0
  101. package/lib/services/polls.d.ts.map +1 -0
  102. package/lib/services/polls.js +2 -0
  103. package/lib/services/polls.js.map +1 -0
  104. package/lib/services/predictions.d.ts +221 -0
  105. package/lib/services/predictions.d.ts.map +1 -0
  106. package/lib/services/predictions.js +2 -0
  107. package/lib/services/predictions.js.map +1 -0
  108. package/lib/services/raids.d.ts +34 -0
  109. package/lib/services/raids.d.ts.map +1 -0
  110. package/lib/services/raids.js +2 -0
  111. package/lib/services/raids.js.map +1 -0
  112. package/lib/services/schedule.d.ts +223 -0
  113. package/lib/services/schedule.d.ts.map +1 -0
  114. package/lib/services/schedule.js +2 -0
  115. package/lib/services/schedule.js.map +1 -0
  116. package/lib/services/search.d.ts +89 -0
  117. package/lib/services/search.d.ts.map +1 -0
  118. package/lib/services/search.js +2 -0
  119. package/lib/services/search.js.map +1 -0
  120. package/lib/services/streams.d.ts +235 -0
  121. package/lib/services/streams.d.ts.map +1 -0
  122. package/lib/services/streams.js +2 -0
  123. package/lib/services/streams.js.map +1 -0
  124. package/lib/services/subscriptions.d.ts +96 -0
  125. package/lib/services/subscriptions.d.ts.map +1 -0
  126. package/lib/services/subscriptions.js +2 -0
  127. package/lib/services/subscriptions.js.map +1 -0
  128. package/lib/services/teams.d.ts +90 -0
  129. package/lib/services/teams.d.ts.map +1 -0
  130. package/lib/services/teams.js +2 -0
  131. package/lib/services/teams.js.map +1 -0
  132. package/lib/services/users.d.ts +324 -0
  133. package/lib/services/users.d.ts.map +1 -0
  134. package/lib/services/users.js +2 -0
  135. package/lib/services/users.js.map +1 -0
  136. package/lib/services/videos.d.ts +101 -0
  137. package/lib/services/videos.d.ts.map +1 -0
  138. package/lib/services/videos.js +2 -0
  139. package/lib/services/videos.js.map +1 -0
  140. package/lib/services/whispers.d.ts +17 -0
  141. package/lib/services/whispers.d.ts.map +1 -0
  142. package/lib/services/whispers.js +2 -0
  143. package/lib/services/whispers.js.map +1 -0
  144. package/lib/services.lazy/ads.js +1 -0
  145. package/lib/services.lazy/analytics.js +1 -0
  146. package/lib/services.lazy/bits.js +1 -0
  147. package/lib/services.lazy/ccls.js +1 -0
  148. package/lib/services.lazy/channel_points.js +1 -0
  149. package/lib/services.lazy/channels.js +1 -0
  150. package/lib/services.lazy/charity.js +1 -0
  151. package/lib/services.lazy/chat.js +3 -0
  152. package/lib/services.lazy/clips.js +1 -0
  153. package/lib/services.lazy/conduits.js +1 -0
  154. package/lib/services.lazy/entitlements.js +1 -0
  155. package/lib/services.lazy/eventsub.js +1 -0
  156. package/lib/services.lazy/extensions.js +1 -0
  157. package/lib/services.lazy/games.js +1 -0
  158. package/lib/services.lazy/goals.js +1 -0
  159. package/lib/services.lazy/guest_star.js +1 -0
  160. package/lib/services.lazy/hype_train.js +1 -0
  161. package/lib/services.lazy/index.js +3 -0
  162. package/lib/services.lazy/moderation.js +3 -0
  163. package/lib/services.lazy/polls.js +1 -0
  164. package/lib/services.lazy/predictions.js +1 -0
  165. package/lib/services.lazy/raids.js +1 -0
  166. package/lib/services.lazy/schedule.js +1 -0
  167. package/lib/services.lazy/search.js +1 -0
  168. package/lib/services.lazy/streams.js +1 -0
  169. package/lib/services.lazy/subscriptions.js +1 -0
  170. package/lib/services.lazy/teams.js +1 -0
  171. package/lib/services.lazy/users.js +1 -0
  172. package/lib/services.lazy/videos.js +1 -0
  173. package/lib/services.lazy/whispers.js +1 -0
  174. package/lib/traits.d.ts +10 -0
  175. package/lib/traits.d.ts.map +1 -0
  176. package/lib/traits.js +1 -0
  177. package/package.json +88 -3
  178. package/src/credentials.ts +79 -0
  179. package/src/errors.ts +78 -0
  180. package/src/index.ts +45 -0
  181. package/src/pagination.ts +9 -0
  182. package/src/protocol.ts +43 -0
  183. package/src/retry.ts +69 -0
  184. package/src/services/ads.ts +228 -0
  185. package/src/services/analytics.ts +253 -0
  186. package/src/services/bits.ts +631 -0
  187. package/src/services/ccls.ts +96 -0
  188. package/src/services/channel_points.ts +804 -0
  189. package/src/services/channels.ts +471 -0
  190. package/src/services/charity.ts +250 -0
  191. package/src/services/chat.ts +1547 -0
  192. package/src/services/clips.ts +385 -0
  193. package/src/services/conduits.ts +453 -0
  194. package/src/services/entitlements.ts +219 -0
  195. package/src/services/eventsub.ts +372 -0
  196. package/src/services/extensions.ts +1098 -0
  197. package/src/services/games.ts +184 -0
  198. package/src/services/goals.ts +110 -0
  199. package/src/services/guest_star.ts +762 -0
  200. package/src/services/hype_train.ts +214 -0
  201. package/src/services/index.ts +30 -0
  202. package/src/services/moderation.ts +1817 -0
  203. package/src/services/polls.ts +363 -0
  204. package/src/services/predictions.ts +432 -0
  205. package/src/services/raids.ts +127 -0
  206. package/src/services/schedule.ts +539 -0
  207. package/src/services/search.ts +248 -0
  208. package/src/services/streams.ts +579 -0
  209. package/src/services/subscriptions.ts +247 -0
  210. package/src/services/teams.ts +225 -0
  211. package/src/services/users.ts +729 -0
  212. package/src/services/videos.ts +257 -0
  213. package/src/services/whispers.ts +71 -0
  214. package/src/traits.ts +47 -0
@@ -0,0 +1,631 @@
1
+ import * as API from "@distilled.cloud/core/api";
2
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-twitch/specs/api/reference). Do not edit.
3
+ import * as S from "@distilled.cloud/core/schema-lite";
4
+ import * as __L from "@distilled.cloud/core/schema-lite";
5
+ import { TwitchServiceErrors } from "../errors.ts";
6
+ import { paginateCursor } from "../pagination.ts";
7
+ import { TwitchProtocol, type TwitchOpError, type TwitchOpContext } from "../protocol.ts";
8
+ import * as Retry from "../retry.ts";
9
+ import * as T from "../traits.ts";
10
+ // Schema table, filled on first reach (see __S at the end).
11
+ const __s: any[] = [];
12
+
13
+ export type { TwitchOpError, TwitchOpContext };
14
+
15
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
16
+ const TELEMETRY = {
17
+ system: "twitch-api",
18
+ responseHeaders: [
19
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
20
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
21
+ ],
22
+ prefix: "Twitch",
23
+ service: "Bits",
24
+ propagate: "w3c",
25
+ } as const;
26
+
27
+ export interface GetBitsLeaderboardRequest {
28
+ /** The number of results to return. The minimum count is 1 and the maximum is 100. The default is 10. */
29
+ count?: number | undefined;
30
+ /** 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. */
31
+ period?: string | undefined;
32
+ /** 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. */
33
+ started_at?: string | undefined;
34
+ /** 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. */
35
+ user_id?: string | undefined;
36
+ }
37
+ export interface GetBitsLeaderboardResponseDataItem {
38
+ /** An ID that identifies a user on the leaderboard. */
39
+ user_id?: string | undefined;
40
+ /** The user's login name. */
41
+ user_login?: string | undefined;
42
+ /** The user's display name. */
43
+ user_name?: string | undefined;
44
+ /** The user's position on the leaderboard. */
45
+ rank?: number | undefined;
46
+ /** The number of Bits the user has cheered. */
47
+ score?: number | undefined;
48
+ }
49
+ /** 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. */
50
+ export type GetBitsLeaderboardResponseDataList = Array<GetBitsLeaderboardResponseDataItem>;
51
+ /** 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. */
52
+ export interface GetBitsLeaderboardResponseDateRange {
53
+ /** The reporting window's start date. */
54
+ started_at?: string | undefined;
55
+ /** The reporting window's end date. */
56
+ ended_at?: string | undefined;
57
+ }
58
+ export interface GetBitsLeaderboardResponse {
59
+ /** 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. */
60
+ data?: GetBitsLeaderboardResponseDataList | undefined;
61
+ /** 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. */
62
+ date_range?: GetBitsLeaderboardResponseDateRange | undefined;
63
+ /** 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. */
64
+ total?: number | undefined;
65
+ }
66
+ export interface GetCheermotesRequest {
67
+ /** 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**. */
68
+ broadcaster_id?: string | undefined;
69
+ }
70
+ /** The animated GIF image set, keyed by size. */
71
+ export interface GetCheermotesResponseDataItemTiersItemImagesDarkAnimated {
72
+ /** The URL of the 1x image. */
73
+ _1?: string | undefined;
74
+ /** The URL of the 2x image. */
75
+ _2?: string | undefined;
76
+ /** The URL of the 3x image. */
77
+ _3?: string | undefined;
78
+ /** The URL of the 4x image. */
79
+ _4?: string | undefined;
80
+ /** The URL of the 1.5x image. */
81
+ _1_5?: string | undefined;
82
+ }
83
+ /** The static PNG image set, keyed by size. */
84
+ export type GetCheermotesResponseDataItemTiersItemImagesDarkStatic =
85
+ GetCheermotesResponseDataItemTiersItemImagesDarkAnimated;
86
+ /** The image sets to use on a dark background. */
87
+ export interface GetCheermotesResponseDataItemTiersItemImagesDark {
88
+ /** The animated GIF image set, keyed by size. */
89
+ animated?: GetCheermotesResponseDataItemTiersItemImagesDarkAnimated | undefined;
90
+ /** The static PNG image set, keyed by size. */
91
+ static?: GetCheermotesResponseDataItemTiersItemImagesDarkAnimated | undefined;
92
+ }
93
+ /** The animated GIF image set, keyed by size. */
94
+ export type GetCheermotesResponseDataItemTiersItemImagesLightAnimated =
95
+ GetCheermotesResponseDataItemTiersItemImagesDarkAnimated;
96
+ /** The static PNG image set, keyed by size. */
97
+ export type GetCheermotesResponseDataItemTiersItemImagesLightStatic =
98
+ GetCheermotesResponseDataItemTiersItemImagesDarkAnimated;
99
+ /** The image sets to use on a light background. */
100
+ export type GetCheermotesResponseDataItemTiersItemImagesLight =
101
+ GetCheermotesResponseDataItemTiersItemImagesDark;
102
+ /** The animated and static image sets for the Cheermote, keyed by theme, then format, then size. */
103
+ export interface GetCheermotesResponseDataItemTiersItemImages {
104
+ /** The image sets to use on a dark background. */
105
+ dark?: GetCheermotesResponseDataItemTiersItemImagesDark | undefined;
106
+ /** The image sets to use on a light background. */
107
+ light?: GetCheermotesResponseDataItemTiersItemImagesDark | undefined;
108
+ }
109
+ export interface GetCheermotesResponseDataItemTiersItem {
110
+ /** 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. */
111
+ min_bits?: number | undefined;
112
+ /** The tier level. Possible tiers are: - 1 - 100 - 500 - 1000 - 5000 - 10000 - 100000 */
113
+ id?: string | undefined;
114
+ /** The hex code of the color associated with this tier level (for example, #979797). */
115
+ color?: string | undefined;
116
+ /** The animated and static image sets for the Cheermote, keyed by theme, then format, then size. */
117
+ images?: GetCheermotesResponseDataItemTiersItemImages | undefined;
118
+ /** A Boolean value that determines whether users can cheer at this tier level. */
119
+ can_cheer?: boolean | undefined;
120
+ /** 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. */
121
+ show_in_bits_card?: boolean | undefined;
122
+ }
123
+ /** 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. */
124
+ export type GetCheermotesResponseDataItemTiersList = Array<GetCheermotesResponseDataItemTiersItem>;
125
+ export interface GetCheermotesResponseDataItem {
126
+ /** 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. */
127
+ prefix?: string | undefined;
128
+ /** 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. */
129
+ tiers?: GetCheermotesResponseDataItemTiersList | undefined;
130
+ /** 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. */
131
+ type?: string | undefined;
132
+ /** 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. */
133
+ order?: number | undefined;
134
+ /** The date and time, in RFC3339 format, when this Cheermote was last updated. */
135
+ last_updated?: string | undefined;
136
+ /** A Boolean value that indicates whether this Cheermote provides a charitable contribution match during charity campaigns. */
137
+ is_charitable?: boolean | undefined;
138
+ }
139
+ /** The list of Cheermotes. The list is in ascending order by the `order` field's value. */
140
+ export type GetCheermotesResponseDataList = Array<GetCheermotesResponseDataItem>;
141
+ export interface GetCheermotesResponse {
142
+ /** The list of Cheermotes. The list is in ascending order by the `order` field's value. */
143
+ data?: GetCheermotesResponseDataList | undefined;
144
+ }
145
+ export type GetCustomPowerUpRequestIdList = Array<string>;
146
+ export interface GetCustomPowerUpRequest {
147
+ /** 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. */
148
+ broadcaster_id: string;
149
+ /** 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. */
150
+ id?: GetCustomPowerUpRequestIdList | undefined;
151
+ }
152
+ /** A set of custom images for the Custom Power-up. This field is **null** if the broadcaster didn't upload images. */
153
+ export interface GetCustomPowerUpResponseDataItemImage {
154
+ /** The URL to a small version of the image. */
155
+ url_1x?: string | undefined;
156
+ /** The URL to a medium version of the image. */
157
+ url_2x?: string | undefined;
158
+ /** The URL to a large version of the image. */
159
+ url_4x?: string | undefined;
160
+ }
161
+ /** A set of default images for the Custom Power-up. */
162
+ export type GetCustomPowerUpResponseDataItemDefaultImage = GetCustomPowerUpResponseDataItemImage;
163
+ /** The settings used to determine whether to apply a maximum to the number of redemptions allowed per live stream. */
164
+ export interface GetCustomPowerUpResponseDataItemMaxPerStreamSetting {
165
+ /** 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. */
166
+ is_enabled?: boolean | undefined;
167
+ /** The maximum number of redemptions allowed per live stream. */
168
+ max_per_stream?: number | undefined;
169
+ }
170
+ /** The settings used to determine whether to apply a maximum to the number of redemptions allowed per user per live stream. */
171
+ export interface GetCustomPowerUpResponseDataItemMaxPerUserPerStreamSetting {
172
+ /** 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. */
173
+ is_enabled?: boolean | undefined;
174
+ /** The maximum number of redemptions allowed per user per live stream. */
175
+ max_per_user_per_stream?: number | undefined;
176
+ }
177
+ /** The settings used to determine whether to apply a cooldown period between redemptions and the length of the cooldown. */
178
+ export interface GetCustomPowerUpResponseDataItemGlobalCooldownSetting {
179
+ /** A Boolean value that determines whether to apply a cooldown period. Is **true** if a cooldown period is enabled. */
180
+ is_enabled?: boolean | undefined;
181
+ /** The cooldown period, in seconds. */
182
+ global_cooldown_seconds?: number | undefined;
183
+ }
184
+ export interface GetCustomPowerUpResponseDataItem {
185
+ /** The ID that uniquely identifies the broadcaster. */
186
+ broadcaster_id?: string | undefined;
187
+ /** The broadcaster's login name. */
188
+ broadcaster_login?: string | undefined;
189
+ /** The broadcaster's display name. */
190
+ broadcaster_name?: string | undefined;
191
+ /** The ID that uniquely identifies this Custom Power-up. */
192
+ id?: string | undefined;
193
+ /** The title of the Custom Power-up. */
194
+ title?: string | undefined;
195
+ /** 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). */
196
+ prompt?: string | undefined;
197
+ /** The amount of Bits for the Custom Power-up. */
198
+ bits?: number | undefined;
199
+ /** A set of custom images for the Custom Power-up. This field is **null** if the broadcaster didn't upload images. */
200
+ image?: GetCustomPowerUpResponseDataItemImage | null | undefined;
201
+ /** A set of default images for the Custom Power-up. */
202
+ default_image?: GetCustomPowerUpResponseDataItemImage | undefined;
203
+ /** The background color to use for the Custom Power-up. The color is in Hex format (for example, #00E5CB). */
204
+ background_color?: string | undefined;
205
+ /** 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. */
206
+ is_enabled?: boolean | undefined;
207
+ /** A Boolean value that determines whether the user must enter information when redeeming the Custom Power-up. Is **true** if the user is prompted. */
208
+ is_user_input_required?: boolean | undefined;
209
+ /** The settings used to determine whether to apply a maximum to the number of redemptions allowed per live stream. */
210
+ max_per_stream_setting?: GetCustomPowerUpResponseDataItemMaxPerStreamSetting | undefined;
211
+ /** The settings used to determine whether to apply a maximum to the number of redemptions allowed per user per live stream. */
212
+ max_per_user_per_stream_setting?:
213
+ | GetCustomPowerUpResponseDataItemMaxPerUserPerStreamSetting
214
+ | undefined;
215
+ /** The settings used to determine whether to apply a cooldown period between redemptions and the length of the cooldown. */
216
+ global_cooldown_setting?: GetCustomPowerUpResponseDataItemGlobalCooldownSetting | undefined;
217
+ /** 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. */
218
+ is_paused?: boolean | undefined;
219
+ /** 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. */
220
+ is_in_stock?: boolean | undefined;
221
+ /** 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. */
222
+ redemptions_redeemed_current_stream?: number | null | undefined;
223
+ /** 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. */
224
+ cooldown_expires_at?: string | null | undefined;
225
+ }
226
+ /** 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. */
227
+ export type GetCustomPowerUpResponseDataList = Array<GetCustomPowerUpResponseDataItem>;
228
+ export interface GetCustomPowerUpResponse {
229
+ /** 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. */
230
+ data?: GetCustomPowerUpResponseDataList | undefined;
231
+ }
232
+ export interface GetExtensionTransactionsRequest {
233
+ /** The ID of the extension whose list of transactions you want to get. */
234
+ extension_id: string;
235
+ /** 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. */
236
+ id?: string | undefined;
237
+ /** 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. */
238
+ first?: number | undefined;
239
+ /** 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) */
240
+ after?: string | undefined;
241
+ }
242
+ /** Contains details about the digital product's cost. */
243
+ export interface GetExtensionTransactionsResponseDataItemProductDataCost {
244
+ /** The amount exchanged for the digital product. */
245
+ amount?: number | undefined;
246
+ /** The type of currency exchanged. Possible values: - `bits` */
247
+ type?: string | undefined;
248
+ }
249
+ /** Contains details about the digital product. */
250
+ export interface GetExtensionTransactionsResponseDataItemProductData {
251
+ /** An ID that identifies the digital product. */
252
+ sku?: string | undefined;
253
+ /** Set to **twitch.ext.** followed by the extension's ID. */
254
+ domain?: string | undefined;
255
+ /** Contains details about the digital product's cost. */
256
+ cost?: GetExtensionTransactionsResponseDataItemProductDataCost | undefined;
257
+ /** A Boolean value that determines whether the product is in development. Is **true** if the digital product is in development and cannot be exchanged. */
258
+ inDevelopment?: boolean | undefined;
259
+ /** The name of the digital product. */
260
+ displayName?: string | undefined;
261
+ /** This field is always empty since you may purchase only unexpired products. */
262
+ expiration?: string | undefined;
263
+ /** 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. */
264
+ broadcast?: boolean | undefined;
265
+ }
266
+ export interface GetExtensionTransactionsResponseDataItem {
267
+ /** An ID that identifies the transaction. */
268
+ id?: string | undefined;
269
+ /** The UTC date and time (in RFC3339 format) of the transaction. */
270
+ timestamp?: string | undefined;
271
+ /** The ID of the broadcaster that owns the channel where the transaction occurred. */
272
+ broadcaster_id?: string | undefined;
273
+ /** The broadcaster's login name. */
274
+ broadcaster_login?: string | undefined;
275
+ /** The broadcaster's display name. */
276
+ broadcaster_name?: string | undefined;
277
+ /** The ID of the user that purchased the digital product. */
278
+ user_id?: string | undefined;
279
+ /** The user's login name. */
280
+ user_login?: string | undefined;
281
+ /** The user's display name. */
282
+ user_name?: string | undefined;
283
+ /** The type of transaction. Possible values: - `BITS_IN_EXTENSION` */
284
+ product_type?: string | undefined;
285
+ /** Contains details about the digital product. */
286
+ product_data?: GetExtensionTransactionsResponseDataItemProductData | undefined;
287
+ }
288
+ /** The list of transactions. */
289
+ export type GetExtensionTransactionsResponseDataList =
290
+ Array<GetExtensionTransactionsResponseDataItem>;
291
+ /** 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) */
292
+ export interface GetExtensionTransactionsResponsePagination {
293
+ /** The cursor used to get the next page of results. Use the cursor to set the request's *after* query parameter. */
294
+ cursor?: string | undefined;
295
+ }
296
+ export interface GetExtensionTransactionsResponse {
297
+ /** The list of transactions. */
298
+ data: GetExtensionTransactionsResponseDataList;
299
+ /** 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) */
300
+ pagination?: GetExtensionTransactionsResponsePagination | undefined;
301
+ }
302
+ export type GetBitsLeaderboardError = TwitchOpError;
303
+ /** 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 */
304
+ export const getBitsLeaderboard: API.OperationMethod<
305
+ GetBitsLeaderboardRequest,
306
+ GetBitsLeaderboardResponse,
307
+ GetBitsLeaderboardError,
308
+ TwitchOpContext
309
+ > = /*@__PURE__*/ API.make(() => ({
310
+ input: __S(0, __c0, 0) as any as S.Schema<GetBitsLeaderboardRequest>,
311
+ output: __S(4, __c0, 4) as any as S.Schema<GetBitsLeaderboardResponse>,
312
+ errors: [],
313
+ serviceErrors: TwitchServiceErrors,
314
+ protocol: TwitchProtocol,
315
+ retry: Retry.Retry,
316
+ telemetry: TELEMETRY,
317
+ span: "GetBitsLeaderboard",
318
+ }));
319
+
320
+ export type GetCheermotesError = TwitchOpError;
321
+ /** 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 */
322
+ export const getCheermotes: API.OperationMethod<
323
+ GetCheermotesRequest,
324
+ GetCheermotesResponse,
325
+ GetCheermotesError,
326
+ TwitchOpContext
327
+ > = /*@__PURE__*/ API.make(() => ({
328
+ input: __S(16, __c1, 0) as any as S.Schema<GetCheermotesRequest>,
329
+ output: __S(24, __c1, 8) as any as S.Schema<GetCheermotesResponse>,
330
+ errors: [],
331
+ serviceErrors: TwitchServiceErrors,
332
+ protocol: TwitchProtocol,
333
+ retry: Retry.Retry,
334
+ telemetry: TELEMETRY,
335
+ span: "GetCheermotes",
336
+ }));
337
+
338
+ export type GetCustomPowerUpError = TwitchOpError;
339
+ /** 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 */
340
+ export const getCustomPowerUp: API.OperationMethod<
341
+ GetCustomPowerUpRequest,
342
+ GetCustomPowerUpResponse,
343
+ GetCustomPowerUpError,
344
+ TwitchOpContext
345
+ > = /*@__PURE__*/ API.make(() => ({
346
+ input: __S(33, __c2, 1) as any as S.Schema<GetCustomPowerUpRequest>,
347
+ output: __S(40, __c2, 8) as any as S.Schema<GetCustomPowerUpResponse>,
348
+ errors: [],
349
+ serviceErrors: TwitchServiceErrors,
350
+ protocol: TwitchProtocol,
351
+ retry: Retry.Retry,
352
+ telemetry: TELEMETRY,
353
+ span: "GetCustomPowerUp",
354
+ }));
355
+
356
+ export type GetExtensionTransactionsError = TwitchOpError;
357
+ /** 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 */
358
+ export const getExtensionTransactions: API.PaginatedOperationMethod<
359
+ GetExtensionTransactionsRequest,
360
+ GetExtensionTransactionsResponse,
361
+ GetExtensionTransactionsError,
362
+ TwitchOpContext,
363
+ GetExtensionTransactionsResponseDataItem
364
+ > = /*@__PURE__*/ API.makePaginated(
365
+ () => ({
366
+ input: __S(48, __c3, 0) as any as S.Schema<GetExtensionTransactionsRequest>,
367
+ output: __S(54, __c3, 6) as any as S.Schema<GetExtensionTransactionsResponse>,
368
+ errors: [],
369
+ serviceErrors: TwitchServiceErrors,
370
+ protocol: TwitchProtocol,
371
+ retry: Retry.Retry,
372
+ telemetry: TELEMETRY,
373
+ span: "GetExtensionTransactions",
374
+ pagination: {
375
+ mode: "cursor",
376
+ inputToken: "after",
377
+ outputToken: "pagination.cursor",
378
+ items: "data",
379
+ pageSize: "first",
380
+ } as const,
381
+ }),
382
+ paginateCursor,
383
+ ) as any;
384
+
385
+ // Schema builders: each runs one schema initializer, on that schema's first use.
386
+ function __c0(j: number): any {
387
+ switch (j) {
388
+ case 0:
389
+ return S.suspend(() =>
390
+ S.Struct({
391
+ count: S.optional(S.Number.pipe(T.Query())),
392
+ period: S.optional(S.String.pipe(T.Query())),
393
+ started_at: S.optional(S.String.pipe(T.Query())),
394
+ user_id: S.optional(S.String.pipe(T.Query())),
395
+ }).pipe(T.Http({ method: "GET", uri: "/bits/leaderboard", code: 200 })),
396
+ ).annotate({ identifier: "GetBitsLeaderboardRequest" });
397
+ case 1:
398
+ return S.suspend(() =>
399
+ S.Struct({
400
+ user_id: S.optional(S.String),
401
+ user_login: S.optional(S.String),
402
+ user_name: S.optional(S.String),
403
+ rank: S.optional(S.Number),
404
+ score: S.optional(S.Number),
405
+ }),
406
+ ).annotate({ identifier: "GetBitsLeaderboardResponseDataItem" });
407
+ case 2:
408
+ return S.Array(__S(1, __c0, 1));
409
+ case 3:
410
+ return S.suspend(() =>
411
+ S.Struct({
412
+ started_at: S.optional(S.String),
413
+ ended_at: S.optional(S.String),
414
+ }),
415
+ ).annotate({ identifier: "GetBitsLeaderboardResponseDateRange" });
416
+ case 4:
417
+ return S.suspend(() =>
418
+ S.Struct({
419
+ data: S.optional(__S(2, __c0, 2)),
420
+ date_range: S.optional(__S(3, __c0, 3)),
421
+ total: S.optional(S.Number),
422
+ }),
423
+ ).annotate({ identifier: "GetBitsLeaderboardResponse" });
424
+ }
425
+ }
426
+ function __c1(j: number): any {
427
+ switch (j) {
428
+ case 0:
429
+ return S.suspend(() =>
430
+ S.Struct({
431
+ broadcaster_id: S.optional(S.String.pipe(T.Query())),
432
+ }).pipe(T.Http({ method: "GET", uri: "/bits/cheermotes", code: 200 })),
433
+ ).annotate({ identifier: "GetCheermotesRequest" });
434
+ case 1:
435
+ return S.suspend(() =>
436
+ S.Struct({
437
+ _1: S.optional(S.String.pipe(T.Body("1"))),
438
+ _2: S.optional(S.String.pipe(T.Body("2"))),
439
+ _3: S.optional(S.String.pipe(T.Body("3"))),
440
+ _4: S.optional(S.String.pipe(T.Body("4"))),
441
+ _1_5: S.optional(S.String.pipe(T.Body("1.5"))),
442
+ }),
443
+ ).annotate({ identifier: "GetCheermotesResponseDataItemTiersItemImagesDarkAnimated" });
444
+ case 2:
445
+ return S.suspend(() =>
446
+ S.Struct({
447
+ animated: S.optional(__S(17, __c1, 1)),
448
+ static: S.optional(__S(17, __c1, 1)),
449
+ }),
450
+ ).annotate({ identifier: "GetCheermotesResponseDataItemTiersItemImagesDark" });
451
+ case 3:
452
+ return S.suspend(() =>
453
+ S.Struct({
454
+ dark: S.optional(__S(18, __c1, 2)),
455
+ light: S.optional(__S(18, __c1, 2)),
456
+ }),
457
+ ).annotate({ identifier: "GetCheermotesResponseDataItemTiersItemImages" });
458
+ case 4:
459
+ return S.suspend(() =>
460
+ S.Struct({
461
+ min_bits: S.optional(S.Number),
462
+ id: S.optional(S.String),
463
+ color: S.optional(S.String),
464
+ images: S.optional(__S(19, __c1, 3)),
465
+ can_cheer: S.optional(S.Boolean),
466
+ show_in_bits_card: S.optional(S.Boolean),
467
+ }),
468
+ ).annotate({ identifier: "GetCheermotesResponseDataItemTiersItem" });
469
+ case 5:
470
+ return S.Array(__S(20, __c1, 4));
471
+ case 6:
472
+ return S.suspend(() =>
473
+ S.Struct({
474
+ prefix: S.optional(S.String),
475
+ tiers: S.optional(__S(21, __c1, 5)),
476
+ type: S.optional(S.String),
477
+ order: S.optional(S.Number),
478
+ last_updated: S.optional(S.String),
479
+ is_charitable: S.optional(S.Boolean),
480
+ }),
481
+ ).annotate({ identifier: "GetCheermotesResponseDataItem" });
482
+ case 7:
483
+ return S.Array(__S(22, __c1, 6));
484
+ case 8:
485
+ return S.suspend(() =>
486
+ S.Struct({
487
+ data: S.optional(__S(23, __c1, 7)),
488
+ }),
489
+ ).annotate({ identifier: "GetCheermotesResponse" });
490
+ }
491
+ }
492
+ function __c2(j: number): any {
493
+ switch (j) {
494
+ case 0:
495
+ return S.Array(S.String);
496
+ case 1:
497
+ return S.suspend(() =>
498
+ S.Struct({
499
+ broadcaster_id: S.String.pipe(T.Query()),
500
+ id: S.optional(__S(32, __c2, 0).pipe(T.Query())),
501
+ }).pipe(T.Http({ method: "GET", uri: "/bits/custom_power_ups", code: 200 })),
502
+ ).annotate({ identifier: "GetCustomPowerUpRequest" });
503
+ case 2:
504
+ return S.suspend(() =>
505
+ S.Struct({
506
+ url_1x: S.optional(S.String),
507
+ url_2x: S.optional(S.String),
508
+ url_4x: S.optional(S.String),
509
+ }),
510
+ ).annotate({ identifier: "GetCustomPowerUpResponseDataItemImage" });
511
+ case 3:
512
+ return S.suspend(() =>
513
+ S.Struct({
514
+ is_enabled: S.optional(S.Boolean),
515
+ max_per_stream: S.optional(S.Number),
516
+ }),
517
+ ).annotate({ identifier: "GetCustomPowerUpResponseDataItemMaxPerStreamSetting" });
518
+ case 4:
519
+ return S.suspend(() =>
520
+ S.Struct({
521
+ is_enabled: S.optional(S.Boolean),
522
+ max_per_user_per_stream: S.optional(S.Number),
523
+ }),
524
+ ).annotate({ identifier: "GetCustomPowerUpResponseDataItemMaxPerUserPerStreamSetting" });
525
+ case 5:
526
+ return S.suspend(() =>
527
+ S.Struct({
528
+ is_enabled: S.optional(S.Boolean),
529
+ global_cooldown_seconds: S.optional(S.Number),
530
+ }),
531
+ ).annotate({ identifier: "GetCustomPowerUpResponseDataItemGlobalCooldownSetting" });
532
+ case 6:
533
+ return S.suspend(() =>
534
+ S.Struct({
535
+ broadcaster_id: S.optional(S.String),
536
+ broadcaster_login: S.optional(S.String),
537
+ broadcaster_name: S.optional(S.String),
538
+ id: S.optional(S.String),
539
+ title: S.optional(S.String),
540
+ prompt: S.optional(S.String),
541
+ bits: S.optional(S.Number),
542
+ image: S.optional(S.NullOr(__S(34, __c2, 2))),
543
+ default_image: S.optional(__S(34, __c2, 2)),
544
+ background_color: S.optional(S.String),
545
+ is_enabled: S.optional(S.Boolean),
546
+ is_user_input_required: S.optional(S.Boolean),
547
+ max_per_stream_setting: S.optional(__S(35, __c2, 3)),
548
+ max_per_user_per_stream_setting: S.optional(__S(36, __c2, 4)),
549
+ global_cooldown_setting: S.optional(__S(37, __c2, 5)),
550
+ is_paused: S.optional(S.Boolean),
551
+ is_in_stock: S.optional(S.Boolean),
552
+ redemptions_redeemed_current_stream: S.optional(S.NullOr(S.Number)),
553
+ cooldown_expires_at: S.optional(S.NullOr(S.String)),
554
+ }),
555
+ ).annotate({ identifier: "GetCustomPowerUpResponseDataItem" });
556
+ case 7:
557
+ return S.Array(__S(38, __c2, 6));
558
+ case 8:
559
+ return S.suspend(() =>
560
+ S.Struct({
561
+ data: S.optional(__S(39, __c2, 7)),
562
+ }),
563
+ ).annotate({ identifier: "GetCustomPowerUpResponse" });
564
+ }
565
+ }
566
+ function __c3(j: number): any {
567
+ switch (j) {
568
+ case 0:
569
+ return S.suspend(() =>
570
+ S.Struct({
571
+ extension_id: S.String.pipe(T.Query()),
572
+ id: S.optional(S.String.pipe(T.Query())),
573
+ first: S.optional(S.Number.pipe(T.Query())),
574
+ after: S.optional(S.String.pipe(T.Query())),
575
+ }).pipe(T.Http({ method: "GET", uri: "/extensions/transactions", code: 200 })),
576
+ ).annotate({ identifier: "GetExtensionTransactionsRequest" });
577
+ case 1:
578
+ return S.suspend(() =>
579
+ S.Struct({
580
+ amount: S.optional(S.Number),
581
+ type: S.optional(S.String),
582
+ }),
583
+ ).annotate({ identifier: "GetExtensionTransactionsResponseDataItemProductDataCost" });
584
+ case 2:
585
+ return S.suspend(() =>
586
+ S.Struct({
587
+ sku: S.optional(S.String),
588
+ domain: S.optional(S.String),
589
+ cost: S.optional(__S(49, __c3, 1)),
590
+ inDevelopment: S.optional(S.Boolean),
591
+ displayName: S.optional(S.String),
592
+ expiration: S.optional(S.String),
593
+ broadcast: S.optional(S.Boolean),
594
+ }),
595
+ ).annotate({ identifier: "GetExtensionTransactionsResponseDataItemProductData" });
596
+ case 3:
597
+ return S.suspend(() =>
598
+ S.Struct({
599
+ id: S.optional(S.String),
600
+ timestamp: S.optional(S.String),
601
+ broadcaster_id: S.optional(S.String),
602
+ broadcaster_login: S.optional(S.String),
603
+ broadcaster_name: S.optional(S.String),
604
+ user_id: S.optional(S.String),
605
+ user_login: S.optional(S.String),
606
+ user_name: S.optional(S.String),
607
+ product_type: S.optional(S.String),
608
+ product_data: S.optional(__S(50, __c3, 2)),
609
+ }),
610
+ ).annotate({ identifier: "GetExtensionTransactionsResponseDataItem" });
611
+ case 4:
612
+ return S.Array(__S(51, __c3, 3));
613
+ case 5:
614
+ return S.suspend(() =>
615
+ S.Struct({
616
+ cursor: S.optional(S.String),
617
+ }),
618
+ ).annotate({ identifier: "GetExtensionTransactionsResponsePagination" });
619
+ case 6:
620
+ return S.suspend(() =>
621
+ S.Struct({
622
+ data: __S(52, __c3, 4),
623
+ pagination: S.optional(__S(53, __c3, 5)),
624
+ }),
625
+ ).annotate({ identifier: "GetExtensionTransactionsResponse" });
626
+ }
627
+ }
628
+ // Schema table: entry i is schema j of builder f, made on first reach.
629
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
630
+ return (__s[i] ??= __L.at(f, j));
631
+ }