kicksdk-js 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-APACHE +202 -0
- package/LICENSE-MIT +21 -0
- package/README.md +125 -1
- package/index.d.ts +129 -11
- package/index.js +422 -98
- package/package.json +6 -3
- package/pkg/kicksdk.d.ts +735 -97
- package/pkg/kicksdk.js +2390 -580
- package/pkg/kicksdk_bg.wasm +0 -0
- package/pkg/kicksdk_bg.wasm.d.ts +107 -57
package/pkg/kicksdk.d.ts
CHANGED
|
@@ -1,28 +1,319 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
+
/** Base URLs to use instead of Kick's. Any left out, or undefined, stay Kick's. */
|
|
5
|
+
export interface Endpoints {
|
|
6
|
+
/** The official API's host, without a version: `https://api.kick.com`. */
|
|
7
|
+
api?: string | undefined;
|
|
8
|
+
/** OAuth: `https://id.kick.com`. */
|
|
9
|
+
id?: string | undefined;
|
|
10
|
+
/** kick.com itself, whose `/api/v2` is the website API. */
|
|
11
|
+
website?: string | undefined;
|
|
12
|
+
/** The realtime endpoints: `https://web.kick.com/api/v1/realtime`. */
|
|
13
|
+
realtime?: string | undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** The message a reply answers, from its chat event: `sender_id` is the sender's user id. */
|
|
17
|
+
export interface ReplyTo {
|
|
18
|
+
message_id: string;
|
|
19
|
+
content?: string | undefined;
|
|
20
|
+
sender_id: number;
|
|
21
|
+
sender_username: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** A webhook delivery's headers: `[name, value]` pairs (a fetch `Headers` will do) or an object. */
|
|
25
|
+
export type WebhookHeaders = Iterable<readonly [string, string]> | Record<string, string>;
|
|
26
|
+
|
|
27
|
+
/** How a delivery's timestamp is checked. By default: within 5 minutes of this machine's clock. */
|
|
28
|
+
export interface VerifyOptions {
|
|
29
|
+
/** Now, Unix **seconds** (not `Date.now()`'s milliseconds). Default: this machine's clock. */
|
|
30
|
+
now?: number | undefined;
|
|
31
|
+
/** How far from `now` the timestamp may be, either way, in seconds. Default 300. */
|
|
32
|
+
toleranceSecs?: number | undefined;
|
|
33
|
+
/** No freshness check: to re-check a delivery stored earlier. A live receiver never skips it. */
|
|
34
|
+
skipFreshness?: boolean | undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** A delivery that passed: its headers and the typed event. */
|
|
38
|
+
export interface VerifiedWebhook {
|
|
39
|
+
headers: {
|
|
40
|
+
message_id: string;
|
|
41
|
+
timestamp: string;
|
|
42
|
+
signature: string;
|
|
43
|
+
event_type: string;
|
|
44
|
+
version: string;
|
|
45
|
+
subscription_id: string | null;
|
|
46
|
+
};
|
|
47
|
+
event: { type: string; [key: string]: unknown };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** A request for `fetch`: what every `…Request` function returns. */
|
|
51
|
+
export interface HttpRequest {
|
|
52
|
+
method: string;
|
|
53
|
+
url: string;
|
|
54
|
+
headers: [string, string][];
|
|
55
|
+
body: string | null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** A user token's scope, as Kick spells it: the 13 Kick documents, or one added since. */
|
|
59
|
+
export type Scope =
|
|
60
|
+
| 'ads:read'
|
|
61
|
+
| 'ads:write'
|
|
62
|
+
| 'channel:read'
|
|
63
|
+
| 'channel:write'
|
|
64
|
+
| 'channel:rewards:read'
|
|
65
|
+
| 'channel:rewards:write'
|
|
66
|
+
| 'chat:write'
|
|
67
|
+
| 'events:subscribe'
|
|
68
|
+
| 'kicks:read'
|
|
69
|
+
| 'moderation:ban'
|
|
70
|
+
| 'moderation:chat_message:manage'
|
|
71
|
+
| 'streamkey:read'
|
|
72
|
+
| 'user:read'
|
|
73
|
+
| (string & {});
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* A PKCE pair: `challenge` goes in `oauthAuthorizeUrl`, `verifier` is a
|
|
77
|
+
* secret kept until the user comes back, for `oauthCodeRequest`. Never log it.
|
|
78
|
+
*/
|
|
79
|
+
export interface Pkce {
|
|
80
|
+
verifier: string;
|
|
81
|
+
challenge: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** A user token. Both tokens are secrets: never log them. */
|
|
85
|
+
export interface UserToken {
|
|
86
|
+
access_token: string;
|
|
87
|
+
/** For `oauthRefreshRequest`; each refresh gives a new one. */
|
|
88
|
+
refresh_token: string | null;
|
|
89
|
+
/** Seconds until the access token expires. */
|
|
90
|
+
expires_in: number | null;
|
|
91
|
+
/** Seconds until the refresh token expires, from every refresh. */
|
|
92
|
+
refresh_expires_in: number | null;
|
|
93
|
+
token_type: string | null;
|
|
94
|
+
scopes: Scope[];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** Which kind of token `oauthRevokeRequest` revokes. */
|
|
98
|
+
export type TokenTypeHint = 'access_token' | 'refresh_token';
|
|
99
|
+
|
|
100
|
+
/** What Kick says about a token. When it is not `active`, nothing else. */
|
|
101
|
+
export interface Introspection {
|
|
102
|
+
active: boolean;
|
|
103
|
+
client_id: string | null;
|
|
104
|
+
/** Unix seconds. */
|
|
105
|
+
exp: number | null;
|
|
106
|
+
scopes: Scope[];
|
|
107
|
+
/** `user` or `app`. */
|
|
108
|
+
token_type: string | null;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** One page of a paginated answer: pass `next_cursor` back for the next. */
|
|
112
|
+
export interface Page<T> {
|
|
113
|
+
data: T[];
|
|
114
|
+
next_cursor: string | null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface User {
|
|
118
|
+
user_id: number;
|
|
119
|
+
name: string | null;
|
|
120
|
+
profile_picture: string | null;
|
|
121
|
+
/** Only for a user token with `user:read`, for its own user. */
|
|
122
|
+
email: string | null;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface Category {
|
|
126
|
+
id: number | null;
|
|
127
|
+
name: string | null;
|
|
128
|
+
thumbnail: string | null;
|
|
129
|
+
/** Only `categoriesRequest` gives them; empty elsewhere. */
|
|
130
|
+
tags: string[];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface LivestreamStats {
|
|
134
|
+
total_count: number | null;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface KicksEntry {
|
|
138
|
+
user_id: number;
|
|
139
|
+
username: string | null;
|
|
140
|
+
rank: number | null;
|
|
141
|
+
gifted_amount: number | null;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface KicksLeaderboard {
|
|
145
|
+
lifetime: KicksEntry[];
|
|
146
|
+
month: KicksEntry[];
|
|
147
|
+
week: KicksEntry[];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** Who `chatSendRequest` sends as: the token's user, into a channel by its broadcaster's user id, or the app's bot. */
|
|
151
|
+
export type ChatSender = { user: number } | 'bot';
|
|
152
|
+
|
|
153
|
+
/** What Kick says about a message sent. */
|
|
154
|
+
export interface Sent {
|
|
155
|
+
is_sent: boolean;
|
|
156
|
+
/** The new message's id, for `chatDeleteRequest`. */
|
|
157
|
+
message_id: string | null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface Reward {
|
|
161
|
+
id: string;
|
|
162
|
+
title: string | null;
|
|
163
|
+
description: string | null;
|
|
164
|
+
cost: number | null;
|
|
165
|
+
background_color: string | null;
|
|
166
|
+
is_enabled: boolean | null;
|
|
167
|
+
is_paused: boolean | null;
|
|
168
|
+
is_user_input_required: boolean | null;
|
|
169
|
+
should_redemptions_skip_request_queue: boolean | null;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** A reward's settings: what is left out is not sent. Creating needs `title` and `cost`. */
|
|
173
|
+
export interface RewardFields {
|
|
174
|
+
title?: string | undefined;
|
|
175
|
+
cost?: number | undefined;
|
|
176
|
+
description?: string | undefined;
|
|
177
|
+
background_color?: string | undefined;
|
|
178
|
+
is_enabled?: boolean | undefined;
|
|
179
|
+
is_paused?: boolean | undefined;
|
|
180
|
+
is_user_input_required?: boolean | undefined;
|
|
181
|
+
should_redemptions_skip_request_queue?: boolean | undefined;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export type RedemptionStatus = 'pending' | 'accepted' | 'rejected';
|
|
185
|
+
|
|
186
|
+
export interface Redemption {
|
|
187
|
+
id: string;
|
|
188
|
+
status: string | null;
|
|
189
|
+
redeemed_at: string | null;
|
|
190
|
+
/** The redeemer's user id. */
|
|
191
|
+
redeemer: number | null;
|
|
192
|
+
user_input: string | null;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface RedeemedReward {
|
|
196
|
+
id: string;
|
|
197
|
+
title: string | null;
|
|
198
|
+
description: string | null;
|
|
199
|
+
cost: number | null;
|
|
200
|
+
can_manage: boolean | null;
|
|
201
|
+
is_deleted: boolean;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface RedemptionPage {
|
|
205
|
+
rewards: { reward: RedeemedReward; redemptions: Redemption[] }[];
|
|
206
|
+
next_cursor: string | null;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** A redemption Kick did not accept or reject: `NOT_PENDING`, `NOT_FOUND`, `NOT_OWNED`, `UNKNOWN`. */
|
|
210
|
+
export interface FailedRedemption {
|
|
211
|
+
id: string;
|
|
212
|
+
reason: string | null;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface AdBreak {
|
|
216
|
+
id: string | null;
|
|
217
|
+
ad_break_id: string | null;
|
|
218
|
+
remaining_ad_breaks: number | null;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export interface AdStatus {
|
|
222
|
+
opted_in: boolean | null;
|
|
223
|
+
ads_blocked: boolean | null;
|
|
224
|
+
auto_ads_active: boolean | null;
|
|
225
|
+
remaining_ad_breaks: number | null;
|
|
226
|
+
limits: { max: number | null; period_seconds: number | null } | null;
|
|
227
|
+
ad_breaks: {
|
|
228
|
+
id: string | null;
|
|
229
|
+
ad_break_id: string | null;
|
|
230
|
+
status: string | null;
|
|
231
|
+
source: string | null;
|
|
232
|
+
break_duration_seconds: number | null;
|
|
233
|
+
created_at: string | null;
|
|
234
|
+
}[];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** What `dropsClaimsRequest` lists by: what is left out is not filtered. */
|
|
238
|
+
export interface ClaimFilter {
|
|
239
|
+
campaign_id?: string | undefined;
|
|
240
|
+
claim_id?: string | undefined;
|
|
241
|
+
user_id?: number | undefined;
|
|
242
|
+
external_status?: string | undefined;
|
|
243
|
+
/** 1 to 1000. */
|
|
244
|
+
limit?: number | undefined;
|
|
245
|
+
cursor?: string | undefined;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export interface Claim {
|
|
249
|
+
claim_id: string;
|
|
250
|
+
user_id: number | null;
|
|
251
|
+
campaign_id: string | null;
|
|
252
|
+
reward_id: string | null;
|
|
253
|
+
external_id: string | null;
|
|
254
|
+
external_status: string | null;
|
|
255
|
+
created_at: string | null;
|
|
256
|
+
updated_at: string | null;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface Claims {
|
|
260
|
+
claims: Claim[];
|
|
261
|
+
/** The next page's, for `ClaimFilter.cursor`. */
|
|
262
|
+
cursor: string | null;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/** One claim's new status, for `dropsUpdateClaimsRequest`. */
|
|
266
|
+
export interface ClaimUpdate {
|
|
267
|
+
claim_id: string;
|
|
268
|
+
external_status: string;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
4
273
|
/**
|
|
5
|
-
* Reconnect delays: 1 s doubling to 30 s
|
|
274
|
+
* Reconnect delays: 1 s doubling to 30 s, and a slower stage for terminal
|
|
275
|
+
* closes (`nextDelayFor`).
|
|
6
276
|
*/
|
|
7
277
|
export class Backoff {
|
|
8
278
|
free(): void;
|
|
9
279
|
[Symbol.dispose](): void;
|
|
10
280
|
/**
|
|
11
|
-
* From `initialMs`, doubling to `maxMs
|
|
281
|
+
* From `initialMs`, doubling to `maxMs` (whole milliseconds).
|
|
12
282
|
*/
|
|
13
283
|
constructor(initial_ms?: number | null, max_ms?: number | null);
|
|
284
|
+
/**
|
|
285
|
+
* The wait before reconnecting after a connection ended, ms.
|
|
286
|
+
* `retryAfterMs` is what the end asked for: a `close` action's
|
|
287
|
+
* `retry_after_ms`, `retryAfterMs(code)` for a socket's close code, or 0
|
|
288
|
+
* for a failure without a code. With 0, exactly `nextDelayJittered`.
|
|
289
|
+
* With more (a terminal close), at least that, doubling with each
|
|
290
|
+
* terminal close since `reset()` up to six times it (300000: 5, 10, 20,
|
|
291
|
+
* then 30 minutes), plus up to a quarter more by `random`. Reconnect
|
|
292
|
+
* with a new client id after a terminal close.
|
|
293
|
+
*/
|
|
294
|
+
nextDelayFor(retry_after_ms: number, random: number): number;
|
|
295
|
+
/**
|
|
296
|
+
* The next wait, ms, spread over [half of it, all of it] by `random`,
|
|
297
|
+
* drawn uniformly from [0, 1) (`Math.random()`), so that clients dropped
|
|
298
|
+
* together do not all come back together. Out of range is clamped, NaN
|
|
299
|
+
* taken as 0.
|
|
300
|
+
*/
|
|
301
|
+
nextDelayJittered(random: number): number;
|
|
14
302
|
/**
|
|
15
303
|
* The next wait, ms.
|
|
16
304
|
*/
|
|
17
305
|
nextDelay(): number;
|
|
18
306
|
/**
|
|
19
|
-
*
|
|
307
|
+
* The chat feed subscribed: back to the first wait, and the terminal
|
|
308
|
+
* streak ends.
|
|
20
309
|
*/
|
|
21
310
|
reset(): void;
|
|
22
311
|
}
|
|
23
312
|
|
|
24
313
|
/**
|
|
25
314
|
* One connection's protocol. Each method returns the actions to carry out.
|
|
315
|
+
* `now` is whole milliseconds from a clock that only goes forward
|
|
316
|
+
* (`Math.floor(performance.now())`, or `Date.now()`).
|
|
26
317
|
*/
|
|
27
318
|
export class Session {
|
|
28
319
|
free(): void;
|
|
@@ -65,35 +356,93 @@ export class Session {
|
|
|
65
356
|
tick(now: number): any;
|
|
66
357
|
}
|
|
67
358
|
|
|
359
|
+
/**
|
|
360
|
+
* Kick's webhook key, read once: `new WebhookPublicKey(pem)`, then
|
|
361
|
+
* `key.verify(headers, body, options?)` for each delivery.
|
|
362
|
+
*/
|
|
363
|
+
export class WebhookPublicKey {
|
|
364
|
+
free(): void;
|
|
365
|
+
[Symbol.dispose](): void;
|
|
366
|
+
/**
|
|
367
|
+
* Reads a PEM key (`BEGIN PUBLIC KEY`, as Kick serves it, or
|
|
368
|
+
* `BEGIN RSA PUBLIC KEY`); throws if it is not one.
|
|
369
|
+
*/
|
|
370
|
+
constructor(pem: string);
|
|
371
|
+
/**
|
|
372
|
+
* `verifyWebhook`, with this key.
|
|
373
|
+
*/
|
|
374
|
+
verify(headers: WebhookHeaders, body: string | Uint8Array | ArrayBuffer, options?: VerifyOptions | null): VerifiedWebhook;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Starts an ad break of 7 to 90 `seconds`; `id` is a UUID you make up
|
|
379
|
+
* (`crypto.randomUUID()`).
|
|
380
|
+
*/
|
|
381
|
+
export function adsAdBreakRequest(token: string, id: string, seconds: number, endpoints?: Endpoints | null): HttpRequest;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Enrolls the channel in ads; `parseDone` reads the answer.
|
|
385
|
+
*/
|
|
386
|
+
export function adsEnrollRequest(token: string, endpoints?: Endpoints | null): HttpRequest;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Reads an `adsAdBreakRequest` answer.
|
|
390
|
+
*/
|
|
391
|
+
export function adsParseAdBreak(status: number, body: string): AdBreak;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Reads an `adsStatusRequest` answer.
|
|
395
|
+
*/
|
|
396
|
+
export function adsParseStatus(status: number, body: string): AdStatus;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* The channel's ads: enrolled or not, limits, recent ad breaks.
|
|
400
|
+
*/
|
|
401
|
+
export function adsStatusRequest(token: string, endpoints?: Endpoints | null): HttpRequest;
|
|
402
|
+
|
|
68
403
|
/**
|
|
69
404
|
* An app token request (client credentials).
|
|
70
405
|
*/
|
|
71
|
-
export function appTokenRequest(client_id: string, client_secret: string,
|
|
406
|
+
export function appTokenRequest(client_id: string, client_secret: string, endpoints?: Endpoints | null): any;
|
|
72
407
|
|
|
73
408
|
/**
|
|
74
409
|
* Bans a user for good.
|
|
75
410
|
*/
|
|
76
|
-
export function banRequest(session: string, channel_slug: string, username: string,
|
|
411
|
+
export function banRequest(session: string, channel_slug: string, username: string, endpoints?: Endpoints | null): any;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* One page of categories (`/public/v2/categories`): by `names` and `tags`
|
|
415
|
+
* (no commas in them), or by `ids`; none of them, all. `limit` is 1 to 1000
|
|
416
|
+
* (Kick's default 25); `cursor` is the previous page's `next_cursor`.
|
|
417
|
+
*/
|
|
418
|
+
export function categoriesRequest(token: string, names?: readonly string[] | null, tags?: readonly string[] | null, ids?: readonly number[] | null, limit?: number | null, cursor?: string | null, endpoints?: Endpoints | null): HttpRequest;
|
|
77
419
|
|
|
78
420
|
/**
|
|
79
421
|
* A channel by slug (`kick.com/api/v2`): chatroom id, followers, live state.
|
|
80
422
|
*/
|
|
81
|
-
export function channelRequest(slug: string,
|
|
423
|
+
export function channelRequest(slug: string, endpoints?: Endpoints | null): any;
|
|
82
424
|
|
|
83
425
|
/**
|
|
84
426
|
* A user as a channel sees them.
|
|
85
427
|
*/
|
|
86
|
-
export function channelUserRequest(channel_slug: string, username: string,
|
|
428
|
+
export function channelUserRequest(channel_slug: string, username: string, endpoints?: Endpoints | null): any;
|
|
87
429
|
|
|
88
430
|
/**
|
|
89
431
|
* `/channels` for up to 50 user ids.
|
|
90
432
|
*/
|
|
91
|
-
export function channelsByIdsRequest(token: string, user_ids:
|
|
433
|
+
export function channelsByIdsRequest(token: string, user_ids: readonly number[], endpoints?: Endpoints | null): any;
|
|
92
434
|
|
|
93
435
|
/**
|
|
94
436
|
* `/channels` for up to 50 slugs (one unknown slug fails them all).
|
|
95
437
|
*/
|
|
96
|
-
export function channelsBySlugsRequest(token: string, slugs: string[],
|
|
438
|
+
export function channelsBySlugsRequest(token: string, slugs: string[], endpoints?: Endpoints | null): any;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Sets what is given of the token's channel's category, custom tags (`[]`
|
|
442
|
+
* clears them, up to 10) and stream title. Scope `channel:write`;
|
|
443
|
+
* `parseDone` reads the answer.
|
|
444
|
+
*/
|
|
445
|
+
export function channelsUpdateRequest(token: string, category_id?: number | null, custom_tags?: readonly string[] | null, stream_title?: string | null, endpoints?: Endpoints | null): HttpRequest;
|
|
97
446
|
|
|
98
447
|
/**
|
|
99
448
|
* The feeds for one chat, the chat feed first.
|
|
@@ -103,17 +452,51 @@ export function chatChannels(chatroom_id: number, channel_id?: number | null): s
|
|
|
103
452
|
/**
|
|
104
453
|
* Where a channel's chat is served.
|
|
105
454
|
*/
|
|
106
|
-
export function chatConnectionRequest(channel_id: number, client_id: string,
|
|
455
|
+
export function chatConnectionRequest(channel_id: number, client_id: string, endpoints?: Endpoints | null): any;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Deletes a message by id. Scope `moderation:chat_message:manage`;
|
|
459
|
+
* `parseDone` reads the answer.
|
|
460
|
+
*/
|
|
461
|
+
export function chatDeleteRequest(token: string, message_id: string, endpoints?: Endpoints | null): HttpRequest;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Reads a `chatSendRequest` answer.
|
|
465
|
+
*/
|
|
466
|
+
export function chatParseSend(status: number, body: string): Sent;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Sends `content` as the token's user into a channel (`{user:
|
|
470
|
+
* broadcasterUserId}`) or as the app's bot (`'bot'`), as a reply if
|
|
471
|
+
* `replyToMessageId` is given. Scope `chat:write`.
|
|
472
|
+
*/
|
|
473
|
+
export function chatSendRequest(token: string, sender: ChatSender, content: string, reply_to_message_id?: string | null, endpoints?: Endpoints | null): HttpRequest;
|
|
107
474
|
|
|
108
475
|
/**
|
|
109
476
|
* Where Kick's realtime is served in general.
|
|
110
477
|
*/
|
|
111
|
-
export function connectionRequest(client_id: string,
|
|
478
|
+
export function connectionRequest(client_id: string, endpoints?: Endpoints | null): any;
|
|
112
479
|
|
|
113
480
|
/**
|
|
114
481
|
* Deletes a message.
|
|
115
482
|
*/
|
|
116
|
-
export function deleteMessageRequest(session: string, chatroom_id: number, message_id: string,
|
|
483
|
+
export function deleteMessageRequest(session: string, chatroom_id: number, message_id: string, endpoints?: Endpoints | null): any;
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Drops reward claims, with an **app** token. `filter`: what is left out
|
|
487
|
+
* is not filtered.
|
|
488
|
+
*/
|
|
489
|
+
export function dropsClaimsRequest(token: string, filter?: ClaimFilter | null, endpoints?: Endpoints | null): HttpRequest;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Reads a `dropsClaimsRequest` answer.
|
|
493
|
+
*/
|
|
494
|
+
export function dropsParseClaims(status: number, body: string): Claims;
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Sets 1 to 100 claims' `external_status`; `parseDone` reads the answer.
|
|
498
|
+
*/
|
|
499
|
+
export function dropsUpdateClaimsRequest(token: string, updates: readonly ClaimUpdate[], endpoints?: Endpoints | null): HttpRequest;
|
|
117
500
|
|
|
118
501
|
/**
|
|
119
502
|
* An emote's image URL.
|
|
@@ -123,17 +506,111 @@ export function emoteUrl(id: string): string;
|
|
|
123
506
|
/**
|
|
124
507
|
* Recent chat and the pin, by channel id.
|
|
125
508
|
*/
|
|
126
|
-
export function historyRequest(channel_id: number,
|
|
509
|
+
export function historyRequest(channel_id: number, endpoints?: Endpoints | null): any;
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* The top `top` Kicks gifters (1 to 100; Kick's default 10) of the token's
|
|
513
|
+
* own channel. A user token with `kicks:read`.
|
|
514
|
+
*/
|
|
515
|
+
export function kicksLeaderboardRequest(token: string, top?: number | null, endpoints?: Endpoints | null): HttpRequest;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* How many streams are live on Kick.
|
|
519
|
+
*/
|
|
520
|
+
export function livestreamStatsRequest(token: string, endpoints?: Endpoints | null): HttpRequest;
|
|
127
521
|
|
|
128
522
|
/**
|
|
129
|
-
*
|
|
523
|
+
* One page of the streams live now (`/public/v2/livestreams`), in up to 25
|
|
524
|
+
* categories and 25 languages (none: all). `limit` is 1 to 1000 (Kick's
|
|
525
|
+
* default 100); `cursor` is the previous page's `next_cursor`. Kick has no
|
|
526
|
+
* sort: streams come oldest first.
|
|
130
527
|
*/
|
|
131
|
-
export function
|
|
528
|
+
export function livestreamsPageRequest(token: string, category_ids?: readonly number[] | null, language_codes?: readonly string[] | null, limit?: number | null, cursor?: string | null, endpoints?: Endpoints | null): any;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* `/public/v1/users/livestreams` for any number of user ids: one request
|
|
532
|
+
* per 100.
|
|
533
|
+
*/
|
|
534
|
+
export function livestreamsRequests(token: string, user_ids: readonly number[], endpoints?: Endpoints | null): any;
|
|
132
535
|
|
|
133
536
|
/**
|
|
134
537
|
* The signed-in viewer's standing on a channel.
|
|
135
538
|
*/
|
|
136
|
-
export function meRequest(session: string, channel_slug: string,
|
|
539
|
+
export function meRequest(session: string, channel_slug: string, endpoints?: Endpoints | null): any;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Bans a user for good. Scope `moderation:ban`; `parseDone` reads the answer.
|
|
543
|
+
*/
|
|
544
|
+
export function moderationBanRequest(token: string, broadcaster_user_id: number, user_id: number, reason?: string | null, endpoints?: Endpoints | null): HttpRequest;
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Times a user out for 1 to 10080 minutes. Scope `moderation:ban`.
|
|
548
|
+
*/
|
|
549
|
+
export function moderationTimeoutRequest(token: string, broadcaster_user_id: number, user_id: number, minutes: number, reason?: string | null, endpoints?: Endpoints | null): HttpRequest;
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Lifts a ban or a timeout. Scope `moderation:ban`.
|
|
553
|
+
*/
|
|
554
|
+
export function moderationUnbanRequest(token: string, broadcaster_user_id: number, user_id: number, endpoints?: Endpoints | null): HttpRequest;
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Where to send the user's browser to approve the app. `state` (from
|
|
558
|
+
* `newState()`) must come back unchanged on the redirect; `verifier` is the
|
|
559
|
+
* `Pkce`'s.
|
|
560
|
+
*/
|
|
561
|
+
export function oauthAuthorizeUrl(client_id: string, redirect_uri: string, scopes: readonly Scope[], state: string, verifier: string, endpoints?: Endpoints | null): string;
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* A user token for the `code` on the redirect, with the PKCE verifier.
|
|
565
|
+
*/
|
|
566
|
+
export function oauthCodeRequest(client_id: string, client_secret: string, redirect_uri: string, code: string, code_verifier: string, endpoints?: Endpoints | null): HttpRequest;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Asks Kick about the token it is sent with (a user or an app token).
|
|
570
|
+
*/
|
|
571
|
+
export function oauthIntrospectRequest(token: string, endpoints?: Endpoints | null): HttpRequest;
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* Reads an `oauthIntrospectRequest` answer.
|
|
575
|
+
*/
|
|
576
|
+
export function oauthParseIntrospect(status: number, body: string): Introspection;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Whether a revoke worked; throws with `status` if not.
|
|
580
|
+
*/
|
|
581
|
+
export function oauthParseRevoke(status: number, body: string): void;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Reads an `oauthCodeRequest` or `oauthRefreshRequest` answer.
|
|
585
|
+
*/
|
|
586
|
+
export function oauthParseUserToken(status: number, body: string): UserToken;
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* A PKCE pair from 32 to 96 bytes drawn from a CSPRNG (`newPkce()` draws
|
|
590
|
+
* them). The verifier is a secret: keep it, never log it.
|
|
591
|
+
*/
|
|
592
|
+
export function oauthPkce(random: Uint8Array): Pkce;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* The PKCE pair for a verifier kept from before (43 to 128 characters of
|
|
596
|
+
* `A-Z a-z 0-9 - . _ ~`).
|
|
597
|
+
*/
|
|
598
|
+
export function oauthPkceFromVerifier(verifier: string): Pkce;
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* A new user token (and refresh token) for a refresh token.
|
|
602
|
+
*/
|
|
603
|
+
export function oauthRefreshRequest(client_id: string, client_secret: string, refresh_token: string, endpoints?: Endpoints | null): HttpRequest;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Revokes a token. It goes in the URL: keep the URL out of logs.
|
|
607
|
+
*/
|
|
608
|
+
export function oauthRevokeRequest(token: string, token_type_hint?: TokenTypeHint | null, endpoints?: Endpoints | null): HttpRequest;
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Every scope Kick documents.
|
|
612
|
+
*/
|
|
613
|
+
export function oauthScopes(): Scope[];
|
|
137
614
|
|
|
138
615
|
/**
|
|
139
616
|
* Whether an acting call worked; throws with `status` if not.
|
|
@@ -145,6 +622,11 @@ export function parseAction(status: number, body: string): void;
|
|
|
145
622
|
*/
|
|
146
623
|
export function parseAppToken(status: number, body: string): any;
|
|
147
624
|
|
|
625
|
+
/**
|
|
626
|
+
* Reads a `categoriesRequest` answer: `{data, next_cursor}`.
|
|
627
|
+
*/
|
|
628
|
+
export function parseCategories(status: number, body: string): Page<Category>;
|
|
629
|
+
|
|
148
630
|
/**
|
|
149
631
|
* Reads a website channel answer.
|
|
150
632
|
*/
|
|
@@ -170,6 +652,12 @@ export function parseConnection(status: number, body: string): any;
|
|
|
170
652
|
*/
|
|
171
653
|
export function parseContent(text: string, combine: boolean): any;
|
|
172
654
|
|
|
655
|
+
/**
|
|
656
|
+
* Whether a user-token call whose answer carries nothing worked (any 2xx);
|
|
657
|
+
* throws with `status` if not.
|
|
658
|
+
*/
|
|
659
|
+
export function parseDone(status: number, body: string): void;
|
|
660
|
+
|
|
173
661
|
/**
|
|
174
662
|
* A feed event, typed: `{type: "chat_message", …}`. `data` as Kick sent it.
|
|
175
663
|
*/
|
|
@@ -181,10 +669,25 @@ export function parseEvent(name: string, data: any): any;
|
|
|
181
669
|
export function parseHistory(status: number, body: string): any;
|
|
182
670
|
|
|
183
671
|
/**
|
|
184
|
-
* Reads a
|
|
672
|
+
* Reads a `kicksLeaderboardRequest` answer.
|
|
673
|
+
*/
|
|
674
|
+
export function parseKicksLeaderboard(status: number, body: string): KicksLeaderboard;
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Reads a `livestreamStatsRequest` answer.
|
|
678
|
+
*/
|
|
679
|
+
export function parseLivestreamStats(status: number, body: string): LivestreamStats;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Reads a `livestreamsRequests` answer (or a page's streams alone).
|
|
185
683
|
*/
|
|
186
684
|
export function parseLivestreams(status: number, body: string): any;
|
|
187
685
|
|
|
686
|
+
/**
|
|
687
|
+
* Reads a `livestreamsPageRequest` answer: `{data, next_cursor}`.
|
|
688
|
+
*/
|
|
689
|
+
export function parseLivestreamsPage(status: number, body: string): any;
|
|
690
|
+
|
|
188
691
|
/**
|
|
189
692
|
* Reads a `me` answer.
|
|
190
693
|
*/
|
|
@@ -205,73 +708,158 @@ export function parseSubscriptions(status: number, body: string): any;
|
|
|
205
708
|
*/
|
|
206
709
|
export function parseToken(status: number, body: string): string;
|
|
207
710
|
|
|
711
|
+
/**
|
|
712
|
+
* Reads a `usersRequest` answer.
|
|
713
|
+
*/
|
|
714
|
+
export function parseUsers(status: number, body: string): User[];
|
|
715
|
+
|
|
208
716
|
/**
|
|
209
717
|
* Reads a delivery's body by its type header, without checking anything.
|
|
718
|
+
* Throws when the body is not that type's shape. `body` is text or bytes.
|
|
210
719
|
*/
|
|
211
|
-
export function parseWebhook(event_type: string, body: string): any;
|
|
720
|
+
export function parseWebhook(event_type: string, body: string | Uint8Array | ArrayBuffer): any;
|
|
212
721
|
|
|
213
722
|
/**
|
|
214
|
-
* Pins a message (the feed's data for it, whole) for
|
|
723
|
+
* Pins a message (the feed's data for it, whole) for 1 to 10080 minutes.
|
|
215
724
|
*/
|
|
216
|
-
export function pinRequest(session: string, channel_slug: string, message: any, minutes: number,
|
|
725
|
+
export function pinRequest(session: string, channel_slug: string, message: any, minutes: number, endpoints?: Endpoints | null): any;
|
|
217
726
|
|
|
218
727
|
/**
|
|
219
728
|
* The webhook signing key request.
|
|
220
729
|
*/
|
|
221
|
-
export function publicKeyRequest(
|
|
730
|
+
export function publicKeyRequest(endpoints?: Endpoints | null): any;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* The least to wait, ms, before reconnecting after the socket closed with
|
|
734
|
+
* this code: 300000 (5 minutes) for Kick's terminal codes (3500-3999 and
|
|
735
|
+
* 4500-4999: a bad token, a ban, a refused request), then reconnect with a
|
|
736
|
+
* new client id; 0, the ordinary backoff, for the rest (1006, a network
|
|
737
|
+
* drop, among them).
|
|
738
|
+
*/
|
|
739
|
+
export function retryAfterMs(code: number): number;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Accepts 1 to 25 pending redemptions; `rewardsParseFailures` reads the
|
|
743
|
+
* answer.
|
|
744
|
+
*/
|
|
745
|
+
export function rewardsAcceptRequest(token: string, ids: readonly string[], endpoints?: Endpoints | null): HttpRequest;
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* Creates a reward: `fields` needs `title` and `cost`.
|
|
749
|
+
*/
|
|
750
|
+
export function rewardsCreateRequest(token: string, fields: RewardFields, endpoints?: Endpoints | null): HttpRequest;
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* Deletes reward `id`; `parseDone` reads the answer.
|
|
754
|
+
*/
|
|
755
|
+
export function rewardsDeleteRequest(token: string, id: string, endpoints?: Endpoints | null): HttpRequest;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Every channel-points reward of the token's channel.
|
|
759
|
+
*/
|
|
760
|
+
export function rewardsListRequest(token: string, endpoints?: Endpoints | null): HttpRequest;
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* The redemptions an accept or reject failed for; empty is all done.
|
|
764
|
+
*/
|
|
765
|
+
export function rewardsParseFailures(status: number, body: string): FailedRedemption[];
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Reads a `rewardsRedemptionsRequest` or `rewardsRedemptionsByIdsRequest`
|
|
769
|
+
* answer.
|
|
770
|
+
*/
|
|
771
|
+
export function rewardsParseRedemptions(status: number, body: string): RedemptionPage;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Reads a `rewardsCreateRequest` or `rewardsUpdateRequest` answer.
|
|
775
|
+
*/
|
|
776
|
+
export function rewardsParseReward(status: number, body: string): Reward;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Reads a `rewardsListRequest` answer.
|
|
780
|
+
*/
|
|
781
|
+
export function rewardsParseRewards(status: number, body: string): Reward[];
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* Redemptions by id, whatever their status.
|
|
785
|
+
*/
|
|
786
|
+
export function rewardsRedemptionsByIdsRequest(token: string, ids: readonly string[], cursor?: string | null, endpoints?: Endpoints | null): HttpRequest;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Redemptions, grouped by reward: of one reward or all, with one `status`
|
|
790
|
+
* (Kick's default `'pending'`), from `cursor`.
|
|
791
|
+
*/
|
|
792
|
+
export function rewardsRedemptionsRequest(token: string, reward_id?: string | null, status?: RedemptionStatus | null, cursor?: string | null, endpoints?: Endpoints | null): HttpRequest;
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Rejects 1 to 25 pending redemptions; `rewardsParseFailures` reads the
|
|
796
|
+
* answer.
|
|
797
|
+
*/
|
|
798
|
+
export function rewardsRejectRequest(token: string, ids: readonly string[], endpoints?: Endpoints | null): HttpRequest;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Changes what `fields` sets of reward `id`.
|
|
802
|
+
*/
|
|
803
|
+
export function rewardsUpdateRequest(token: string, id: string, fields: RewardFields, endpoints?: Endpoints | null): HttpRequest;
|
|
222
804
|
|
|
223
805
|
/**
|
|
224
806
|
* Sends a message, or a reply when `replyTo` is
|
|
225
807
|
* `{message_id, content, sender_id, sender_username}`.
|
|
226
808
|
*/
|
|
227
|
-
export function sendRequest(session: string, chatroom_id: number, text: string, message_ref: string, reply_to
|
|
809
|
+
export function sendRequest(session: string, chatroom_id: number, text: string, message_ref: string, reply_to?: ReplyTo | null, endpoints?: Endpoints | null): any;
|
|
228
810
|
|
|
229
811
|
/**
|
|
230
|
-
* Subscribes the app to webhook `events` (`[{name, version}]
|
|
812
|
+
* Subscribes the app to webhook `events` (`[{name, version?}]`, version 1
|
|
813
|
+
* when left out) for one channel.
|
|
231
814
|
*/
|
|
232
|
-
export function subscribeRequest(token: string, broadcaster_user_id: number, events:
|
|
815
|
+
export function subscribeRequest(token: string, broadcaster_user_id: number, events: ReadonlyArray<{ name: string; version?: number }>, endpoints?: Endpoints | null): any;
|
|
233
816
|
|
|
234
817
|
/**
|
|
235
818
|
* Every webhook subscription the app has.
|
|
236
819
|
*/
|
|
237
|
-
export function subscriptionsRequest(token: string,
|
|
820
|
+
export function subscriptionsRequest(token: string, endpoints?: Endpoints | null): any;
|
|
238
821
|
|
|
239
822
|
/**
|
|
240
|
-
* Times a user out.
|
|
823
|
+
* Times a user out for 1 to 10080 minutes.
|
|
241
824
|
*/
|
|
242
|
-
export function timeoutRequest(session: string, channel_slug: string, username: string, minutes: number,
|
|
825
|
+
export function timeoutRequest(session: string, channel_slug: string, username: string, minutes: number, endpoints?: Endpoints | null): any;
|
|
243
826
|
|
|
244
827
|
/**
|
|
245
828
|
* A guest token request for `clientId`.
|
|
246
829
|
*/
|
|
247
|
-
export function tokenRequest(client_id: string,
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* The top live streams, overall or in a category or language: up to 100.
|
|
251
|
-
* `sort` is `"viewer_count"` (the default) or `"started_at"`.
|
|
252
|
-
*/
|
|
253
|
-
export function topLivestreamsRequest(token: string, category_id: number | null | undefined, language: string | null | undefined, sort: string | null | undefined, limit: number | null | undefined, endpoints_: any): any;
|
|
830
|
+
export function tokenRequest(client_id: string, endpoints?: Endpoints | null): any;
|
|
254
831
|
|
|
255
832
|
/**
|
|
256
833
|
* Lifts a ban or timeout.
|
|
257
834
|
*/
|
|
258
|
-
export function unbanRequest(session: string, channel_slug: string, username: string,
|
|
835
|
+
export function unbanRequest(session: string, channel_slug: string, username: string, endpoints?: Endpoints | null): any;
|
|
259
836
|
|
|
260
837
|
/**
|
|
261
838
|
* Removes the pin.
|
|
262
839
|
*/
|
|
263
|
-
export function unpinRequest(session: string, channel_slug: string,
|
|
840
|
+
export function unpinRequest(session: string, channel_slug: string, endpoints?: Endpoints | null): any;
|
|
264
841
|
|
|
265
842
|
/**
|
|
266
843
|
* Removes subscriptions, 50 per request.
|
|
267
844
|
*/
|
|
268
|
-
export function unsubscribeRequests(token: string, ids: string[],
|
|
845
|
+
export function unsubscribeRequests(token: string, ids: string[], endpoints?: Endpoints | null): any;
|
|
269
846
|
|
|
270
847
|
/**
|
|
271
|
-
*
|
|
272
|
-
|
|
848
|
+
* Users by id, up to 50; none, with a user token: the token's own user.
|
|
849
|
+
*/
|
|
850
|
+
export function usersRequest(token: string, user_ids?: readonly number[] | null, endpoints?: Endpoints | null): HttpRequest;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Checks a delivery and returns `{headers, event}`, or throws. `headers` as
|
|
854
|
+
* `[[name, value]…]`, a fetch `Headers` or an object; `body` the raw body,
|
|
855
|
+
* as text or bytes. The timestamp must be within 5 minutes of this
|
|
856
|
+
* machine's clock, unless `options` says otherwise: `now` (Unix seconds),
|
|
857
|
+
* `toleranceSecs`, or `skipFreshness: true` to re-check a stored delivery.
|
|
858
|
+
*
|
|
859
|
+
* A receiver checking many deliveries reads the key once, with
|
|
860
|
+
* `new WebhookPublicKey(pem)`, and calls its `verify`.
|
|
273
861
|
*/
|
|
274
|
-
export function verifyWebhook(public_key_pem: string, headers:
|
|
862
|
+
export function verifyWebhook(public_key_pem: string, headers: WebhookHeaders, body: string | Uint8Array | ArrayBuffer, options?: VerifyOptions | null): VerifiedWebhook;
|
|
275
863
|
|
|
276
864
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
277
865
|
|
|
@@ -279,68 +867,118 @@ export interface InitOutput {
|
|
|
279
867
|
readonly memory: WebAssembly.Memory;
|
|
280
868
|
readonly __wbg_backoff_free: (a: number, b: number) => void;
|
|
281
869
|
readonly __wbg_session_free: (a: number, b: number) => void;
|
|
282
|
-
readonly
|
|
283
|
-
readonly
|
|
870
|
+
readonly __wbg_webhookpublickey_free: (a: number, b: number) => void;
|
|
871
|
+
readonly adsAdBreakRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
872
|
+
readonly adsEnrollRequest: (a: number, b: number, c: number, d: number) => void;
|
|
873
|
+
readonly adsParseAdBreak: (a: number, b: number, c: number, d: number) => void;
|
|
874
|
+
readonly adsParseStatus: (a: number, b: number, c: number, d: number) => void;
|
|
875
|
+
readonly adsStatusRequest: (a: number, b: number, c: number, d: number) => void;
|
|
876
|
+
readonly appTokenRequest: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
877
|
+
readonly backoff_new: (a: number, b: number, c: number) => void;
|
|
284
878
|
readonly backoff_nextDelay: (a: number) => number;
|
|
879
|
+
readonly backoff_nextDelayFor: (a: number, b: number, c: number, d: number) => void;
|
|
880
|
+
readonly backoff_nextDelayJittered: (a: number, b: number, c: number) => void;
|
|
285
881
|
readonly backoff_reset: (a: number) => void;
|
|
286
|
-
readonly banRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g:
|
|
287
|
-
readonly
|
|
288
|
-
readonly
|
|
289
|
-
readonly
|
|
290
|
-
readonly
|
|
291
|
-
readonly
|
|
292
|
-
readonly
|
|
293
|
-
readonly
|
|
294
|
-
readonly
|
|
295
|
-
readonly
|
|
296
|
-
readonly
|
|
297
|
-
readonly
|
|
298
|
-
readonly
|
|
299
|
-
readonly
|
|
300
|
-
readonly
|
|
301
|
-
readonly
|
|
302
|
-
readonly
|
|
303
|
-
readonly
|
|
304
|
-
readonly
|
|
305
|
-
readonly
|
|
306
|
-
readonly
|
|
307
|
-
readonly
|
|
308
|
-
readonly
|
|
309
|
-
readonly
|
|
310
|
-
readonly
|
|
311
|
-
readonly
|
|
312
|
-
readonly
|
|
313
|
-
readonly
|
|
314
|
-
readonly
|
|
315
|
-
readonly
|
|
316
|
-
readonly
|
|
317
|
-
readonly
|
|
318
|
-
readonly
|
|
882
|
+
readonly banRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
883
|
+
readonly categoriesRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
884
|
+
readonly channelRequest: (a: number, b: number, c: number, d: number) => void;
|
|
885
|
+
readonly channelUserRequest: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
886
|
+
readonly channelsByIdsRequest: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
887
|
+
readonly channelsBySlugsRequest: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
888
|
+
readonly channelsUpdateRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
889
|
+
readonly chatChannels: (a: number, b: number, c: number) => void;
|
|
890
|
+
readonly chatConnectionRequest: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
891
|
+
readonly chatDeleteRequest: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
892
|
+
readonly chatParseSend: (a: number, b: number, c: number, d: number) => void;
|
|
893
|
+
readonly chatSendRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
894
|
+
readonly connectionRequest: (a: number, b: number, c: number, d: number) => void;
|
|
895
|
+
readonly deleteMessageRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
896
|
+
readonly dropsClaimsRequest: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
897
|
+
readonly dropsParseClaims: (a: number, b: number, c: number, d: number) => void;
|
|
898
|
+
readonly dropsUpdateClaimsRequest: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
899
|
+
readonly emoteUrl: (a: number, b: number, c: number) => void;
|
|
900
|
+
readonly historyRequest: (a: number, b: number, c: number) => void;
|
|
901
|
+
readonly kicksLeaderboardRequest: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
902
|
+
readonly livestreamStatsRequest: (a: number, b: number, c: number, d: number) => void;
|
|
903
|
+
readonly livestreamsPageRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
904
|
+
readonly livestreamsRequests: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
905
|
+
readonly meRequest: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
906
|
+
readonly moderationBanRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
907
|
+
readonly moderationTimeoutRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
908
|
+
readonly moderationUnbanRequest: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
909
|
+
readonly oauthAuthorizeUrl: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
910
|
+
readonly oauthCodeRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
911
|
+
readonly oauthIntrospectRequest: (a: number, b: number, c: number, d: number) => void;
|
|
912
|
+
readonly oauthParseIntrospect: (a: number, b: number, c: number, d: number) => void;
|
|
913
|
+
readonly oauthParseRevoke: (a: number, b: number, c: number, d: number) => void;
|
|
914
|
+
readonly oauthParseUserToken: (a: number, b: number, c: number, d: number) => void;
|
|
915
|
+
readonly oauthPkce: (a: number, b: number) => void;
|
|
916
|
+
readonly oauthPkceFromVerifier: (a: number, b: number, c: number) => void;
|
|
917
|
+
readonly oauthRefreshRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
918
|
+
readonly oauthRevokeRequest: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
919
|
+
readonly oauthScopes: (a: number) => void;
|
|
920
|
+
readonly parseAction: (a: number, b: number, c: number, d: number) => void;
|
|
921
|
+
readonly parseAppToken: (a: number, b: number, c: number, d: number) => void;
|
|
922
|
+
readonly parseCategories: (a: number, b: number, c: number, d: number) => void;
|
|
923
|
+
readonly parseChannel: (a: number, b: number, c: number, d: number) => void;
|
|
924
|
+
readonly parseChannelUser: (a: number, b: number, c: number, d: number) => void;
|
|
925
|
+
readonly parseChannels: (a: number, b: number, c: number, d: number) => void;
|
|
926
|
+
readonly parseConnection: (a: number, b: number, c: number, d: number) => void;
|
|
927
|
+
readonly parseContent: (a: number, b: number, c: number, d: number) => void;
|
|
928
|
+
readonly parseDone: (a: number, b: number, c: number, d: number) => void;
|
|
929
|
+
readonly parseEvent: (a: number, b: number, c: number, d: number) => void;
|
|
930
|
+
readonly parseHistory: (a: number, b: number, c: number, d: number) => void;
|
|
931
|
+
readonly parseKicksLeaderboard: (a: number, b: number, c: number, d: number) => void;
|
|
932
|
+
readonly parseLivestreamStats: (a: number, b: number, c: number, d: number) => void;
|
|
933
|
+
readonly parseLivestreams: (a: number, b: number, c: number, d: number) => void;
|
|
934
|
+
readonly parseLivestreamsPage: (a: number, b: number, c: number, d: number) => void;
|
|
935
|
+
readonly parseMe: (a: number, b: number, c: number, d: number) => void;
|
|
936
|
+
readonly parsePublicKey: (a: number, b: number, c: number, d: number) => void;
|
|
937
|
+
readonly parseSubscriptions: (a: number, b: number, c: number, d: number) => void;
|
|
938
|
+
readonly parseToken: (a: number, b: number, c: number, d: number) => void;
|
|
939
|
+
readonly parseUsers: (a: number, b: number, c: number, d: number) => void;
|
|
940
|
+
readonly parseWebhook: (a: number, b: number, c: number, d: number) => void;
|
|
941
|
+
readonly pinRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
942
|
+
readonly publicKeyRequest: (a: number, b: number) => void;
|
|
943
|
+
readonly retryAfterMs: (a: number, b: number) => void;
|
|
944
|
+
readonly rewardsAcceptRequest: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
945
|
+
readonly rewardsCreateRequest: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
946
|
+
readonly rewardsDeleteRequest: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
947
|
+
readonly rewardsListRequest: (a: number, b: number, c: number, d: number) => void;
|
|
948
|
+
readonly rewardsParseFailures: (a: number, b: number, c: number, d: number) => void;
|
|
949
|
+
readonly rewardsParseRedemptions: (a: number, b: number, c: number, d: number) => void;
|
|
950
|
+
readonly rewardsParseReward: (a: number, b: number, c: number, d: number) => void;
|
|
951
|
+
readonly rewardsParseRewards: (a: number, b: number, c: number, d: number) => void;
|
|
952
|
+
readonly rewardsRedemptionsByIdsRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
953
|
+
readonly rewardsRedemptionsRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
954
|
+
readonly rewardsRejectRequest: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
955
|
+
readonly rewardsUpdateRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
956
|
+
readonly sendRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
957
|
+
readonly session_closed: (a: number, b: number) => void;
|
|
958
|
+
readonly session_deadline: (a: number, b: number) => void;
|
|
319
959
|
readonly session_isConnected: (a: number) => number;
|
|
320
960
|
readonly session_isSubscribed: (a: number, b: number, c: number) => number;
|
|
321
961
|
readonly session_new: (a: number, b: number) => number;
|
|
322
|
-
readonly session_open: (a: number, b: number, c: number, d: number
|
|
323
|
-
readonly session_receive: (a: number, b: number, c: number, d: number
|
|
324
|
-
readonly session_refresh: (a: number, b: number, c: number, d: number
|
|
325
|
-
readonly session_tick: (a: number, b: number
|
|
326
|
-
readonly subscribeRequest: (a: number, b: number, c: number, d:
|
|
327
|
-
readonly subscriptionsRequest: (a: number, b: number, c:
|
|
328
|
-
readonly timeoutRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h:
|
|
329
|
-
readonly tokenRequest: (a: number, b: number, c:
|
|
330
|
-
readonly
|
|
331
|
-
readonly
|
|
332
|
-
readonly
|
|
333
|
-
readonly
|
|
334
|
-
readonly verifyWebhook: (a: number, b: number, c:
|
|
335
|
-
readonly
|
|
336
|
-
readonly
|
|
337
|
-
readonly
|
|
338
|
-
readonly
|
|
339
|
-
readonly
|
|
340
|
-
readonly
|
|
341
|
-
readonly
|
|
342
|
-
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
343
|
-
readonly __wbindgen_start: () => void;
|
|
962
|
+
readonly session_open: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
963
|
+
readonly session_receive: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
964
|
+
readonly session_refresh: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
965
|
+
readonly session_tick: (a: number, b: number, c: number) => void;
|
|
966
|
+
readonly subscribeRequest: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
967
|
+
readonly subscriptionsRequest: (a: number, b: number, c: number, d: number) => void;
|
|
968
|
+
readonly timeoutRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
969
|
+
readonly tokenRequest: (a: number, b: number, c: number, d: number) => void;
|
|
970
|
+
readonly unbanRequest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
971
|
+
readonly unpinRequest: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
972
|
+
readonly unsubscribeRequests: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
973
|
+
readonly usersRequest: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
974
|
+
readonly verifyWebhook: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
975
|
+
readonly webhookpublickey_new: (a: number, b: number, c: number) => void;
|
|
976
|
+
readonly webhookpublickey_verify: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
977
|
+
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
978
|
+
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
979
|
+
readonly __wbindgen_export3: (a: number) => void;
|
|
980
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
981
|
+
readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
344
982
|
}
|
|
345
983
|
|
|
346
984
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|