@notidotbot/noti-api-client 1.9.121 → 1.9.122

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.
@@ -24,13 +24,132 @@ export declare class APIAdmin {
24
24
  getInGameAdminSettings({ auth }: AdminFunctionsInput['getInGameAdminSettings']): Promise<import("../types").WebResponse<InGameAdminSettings>>;
25
25
  /** 400 when turning it on with no guildId. Noti must be in that server with Create Invite. */
26
26
  updateInGameAdminSettings({ auth, supportJoin }: AdminFunctionsInput['updateInGameAdminSettings']): Promise<import("../types").WebResponse<InGameAdminSettings>>;
27
- listDropGames({ auth, page, limit, platform, search, status }: AdminFunctionsInput['listDropGames']): Promise<import("../types").WebResponse<DropGamesListResponse>>;
27
+ listDropGames({ auth, page, limit, platform, search, status, sort }: AdminFunctionsInput['listDropGames']): Promise<import("../types").WebResponse<DropGamesListResponse>>;
28
28
  toggleDropGame({ auth, dbId, ignored }: AdminFunctionsInput['toggleDropGame']): Promise<import("../types").WebResponse<DropGameToggleResult>>;
29
29
  bulkToggleDropGames({ auth, ignored, dbIds, all, platform }: AdminFunctionsInput['bulkToggleDropGames']): Promise<import("../types").WebResponse<DropGamesBulkResult>>;
30
30
  reconcileDropGames({ auth, keep, platform }: AdminFunctionsInput['reconcileDropGames']): Promise<import("../types").WebResponse<DropGamesReconcileResult>>;
31
- listDropCampaigns({ auth, page, limit, platform, status, gameId }: AdminFunctionsInput['listDropCampaigns']): Promise<import("../types").WebResponse<DropCampaignsListResponse>>;
31
+ listDropCampaigns({ auth, page, limit, platform, status, gameId, sent }: AdminFunctionsInput['listDropCampaigns']): Promise<import("../types").WebResponse<DropCampaignsListResponse>>;
32
32
  getDropsSettings({ auth }: AdminFunctionsInput['getDropsSettings']): Promise<import("../types").WebResponse<DropsSettingsResult>>;
33
33
  setDropsSettings({ auth, global, kick, twitch }: AdminFunctionsInput['setDropsSettings']): Promise<import("../types").WebResponse<DropsSettingsResult>>;
34
+ listLinkBans({ auth }: AdminFunctionsInput['listLinkBans']): Promise<import("../types").WebResponse<LinkBanActionResult>>;
35
+ /** Ban a user from linking anything, or an account from being linked by anyone. Removes the existing links. */
36
+ createLinkBan({ auth, userId, platform, handle, reason }: AdminFunctionsInput['createLinkBan']): Promise<import("../types").WebResponse<LinkBanActionResult>>;
37
+ /** Lift a ban. Old links are not restored. */
38
+ deleteLinkBan({ auth, userId, platform, handle }: AdminFunctionsInput['deleteLinkBan']): Promise<import("../types").WebResponse<LinkBanActionResult>>;
39
+ /** Unlink an account from whoever has it, WITHOUT a ban - the real owner can still link it. */
40
+ deleteLinkedAccount({ auth, platform, handle, reason }: AdminFunctionsInput['deleteLinkedAccount']): Promise<import("../types").WebResponse<LinkBanActionResult>>;
41
+ /** Link history, newest 25: a userId and/or a platform + handle (kick included). */
42
+ listLinkEvents({ auth, userId, platform, handle }: AdminFunctionsInput['listLinkEvents']): Promise<import("../types").WebResponse<LinkBanActionResult>>;
43
+ /** Lift a Kick account's switch lock: another Discord account may earn roles with it again. History is kept. */
44
+ createKickLinkReset({ auth, handle, reason }: AdminFunctionsInput['createKickLinkReset']): Promise<import("../types").WebResponse<LinkBanActionResult>>;
45
+ /** Pending deletions, soonest first. */
46
+ listUserDataDeletions({ auth }: AdminFunctionsInput['listUserDataDeletions']): Promise<import("../types").WebResponse<{
47
+ pending: PendingUserDataDeletion[];
48
+ }>>;
49
+ /** Schedule a deletion 7 days out. `code` = the 6-digit code from the authenticator app. 403 = bad / reused code, 409 = already pending (error says so), 503 = 2FA not configured on this deployment. */
50
+ createUserDataDeletion({ auth, userId, code }: AdminFunctionsInput['createUserDataDeletion']): Promise<import("../types").WebResponse<{
51
+ pending: PendingUserDataDeletion;
52
+ }>>;
53
+ /** Cancel a pending deletion - nothing is deleted. No code needed. 404 = nothing pending. */
54
+ deleteUserDataDeletion({ auth, userId }: AdminFunctionsInput['deleteUserDataDeletion']): Promise<import("../types").WebResponse<{
55
+ cancelled: true;
56
+ }>>;
57
+ /** Live chat chain / memory / guard models, and the env defaults they fall back to. */
58
+ getAssistantModels({ auth }: AdminFunctionsInput['getAssistantModels']): Promise<import("../types").WebResponse<AssistantModelsResult>>;
59
+ /** Change any of the three. Each is checked against OpenRouter (exists, structured outputs, price ceiling); a 400 says which and why, and nothing is saved. */
60
+ updateAssistantModels({ auth, chatModels, memoryModel, guardModel }: AdminFunctionsInput['updateAssistantModels']): Promise<import("../types").WebResponse<AssistantModelsResult>>;
61
+ /** Proposal fields users corrected most, last 30 days (keys only, top 50). */
62
+ listAssistantDrafts({ auth }: AdminFunctionsInput['listAssistantDrafts']): Promise<import("../types").WebResponse<{
63
+ drafts: AssistantDraftCount[];
64
+ }>>;
65
+ /** Chats users shared for review. `status` defaults to new. */
66
+ listAssistantShares({ auth, status }: AdminFunctionsInput['listAssistantShares']): Promise<import("../types").WebResponse<{
67
+ shares: AssistantShareSummary[];
68
+ }>>;
69
+ /** One shared chat: its turns, proposals and the full plain-text transcript. */
70
+ getAssistantShare({ auth, id }: AdminFunctionsInput['getAssistantShare']): Promise<import("../types").WebResponse<AssistantShareDetail>>;
71
+ /** Mark a shared chat as reviewed. */
72
+ updateAssistantShare({ auth, id, status }: AdminFunctionsInput['updateAssistantShare']): Promise<import("../types").WebResponse<{
73
+ id: string;
74
+ status: "reviewed";
75
+ }>>;
76
+ /** Docs-pass memory entries. `status` defaults to pending. */
77
+ listAssistantMemories({ auth, status }: AdminFunctionsInput['listAssistantMemories']): Promise<import("../types").WebResponse<{
78
+ memories: AssistantMemorySummary[];
79
+ }>>;
80
+ /** One entry: its lines marked same (already in the docs) / new, and `check` (null = valid). */
81
+ getAssistantMemory({ auth, id }: AdminFunctionsInput['getAssistantMemory']): Promise<import("../types").WebResponse<AssistantMemoryDetail>>;
82
+ /** Approve (re-validated - 400 with the reason if not) or reject a PENDING entry. 404 = not pending. */
83
+ updateAssistantMemory({ auth, id, status }: AdminFunctionsInput['updateAssistantMemory']): Promise<import("../types").WebResponse<{
84
+ id: string;
85
+ status: "approved" | "rejected";
86
+ }>>;
87
+ /** Your own dashboard logins. Only the last 4 characters of each key are sent; `current` = this login. */
88
+ listAdminSessions({ auth }: AdminFunctionsInput['listAdminSessions']): Promise<import("../types").WebResponse<{
89
+ sessions: AdminSession[];
90
+ }>>;
91
+ /** Sign one of your own logins out (it stops working at once). 404 = not one of yours. */
92
+ deleteAdminSession({ auth, id }: AdminFunctionsInput['deleteAdminSession']): Promise<import("../types").WebResponse<{
93
+ signedOut: true;
94
+ }>>;
95
+ /** Post the feedback panel (Submit / Top / Open) in a channel. `boardId` empty = the main board. 400/404 say why it could not post. */
96
+ createFeedbackPanel({ auth, guildId, channelId, boardId }: AdminFunctionsInput['createFeedbackPanel']): Promise<import("../types").WebResponse<{
97
+ url: string;
98
+ }>>;
99
+ /** Which image an image.noti.bot hash points at. Takes the hash or the whole proxy url. 400 = not an image hash. */
100
+ decryptImageHash({ auth, hash }: AdminFunctionsInput['decryptImageHash']): Promise<import("../types").WebResponse<{
101
+ url: string;
102
+ }>>;
103
+ /** The dashboard allowlist or the staff list. WHILE THE DASHBOARD LIST HAS ANYONE ON IT, ONLY those people (plus developers) can use the dashboard. */
104
+ listStaffList({ auth, kind }: AdminFunctionsInput['listStaffList']): Promise<import("../types").WebResponse<{
105
+ kind: StaffListKind;
106
+ userIds: string[];
107
+ }>>;
108
+ /** Add someone (no-op if already on it). Returns the new list. */
109
+ addStaffListUser({ auth, kind, userId }: AdminFunctionsInput['addStaffListUser']): Promise<import("../types").WebResponse<{
110
+ kind: StaffListKind;
111
+ userIds: string[];
112
+ }>>;
113
+ /** Remove someone. Returns the new list. */
114
+ removeStaffListUser({ auth, kind, userId }: AdminFunctionsInput['removeStaffListUser']): Promise<import("../types").WebResponse<{
115
+ kind: StaffListKind;
116
+ userIds: string[];
117
+ }>>;
118
+ /** Empty a list. For `dashboard` this OPENS the dashboard to everyone again. */
119
+ clearStaffList({ auth, kind }: AdminFunctionsInput['clearStaffList']): Promise<import("../types").WebResponse<{
120
+ kind: StaffListKind;
121
+ userIds: string[];
122
+ }>>;
123
+ /** Members whose presence Noti ignores (Status / Auto Live / Stream Roles), at their request. */
124
+ listPresenceOptOuts({ auth }: AdminFunctionsInput['listPresenceOptOuts']): Promise<import("../types").WebResponse<{
125
+ userIds: string[];
126
+ }>>;
127
+ /** Stop processing this member's presence. `clustersUpdated: false` = it applies at the next load, not now. */
128
+ addPresenceOptOut({ auth, userId }: AdminFunctionsInput['addPresenceOptOut']): Promise<import("../types").WebResponse<PresenceOptOutResult>>;
129
+ /** Process this member's presence again. */
130
+ removePresenceOptOut({ auth, userId }: AdminFunctionsInput['removePresenceOptOut']): Promise<import("../types").WebResponse<PresenceOptOutResult>>;
131
+ /** One YouTube creator's subscription: our Redis renewal vs Google's hub, and the webhooks we received. 404 = no such creator, 503 = YouTube not running. */
132
+ getYoutubePubSub({ auth, username }: AdminFunctionsInput['getYoutubePubSub']): Promise<import("../types").WebResponse<YoutubePubSubInspection>>;
133
+ /** Ask tokapi about a TikTok creator RIGHT NOW (a paid call; the raw answer also goes to Sonar). 429 = one per 10 seconds. */
134
+ getTiktokLookup({ auth, username }: AdminFunctionsInput['getTiktokLookup']): Promise<import("../types").WebResponse<TiktokLookup>>;
135
+ /** Creators whose raw API responses get logged (applies on the next poll). */
136
+ listRawLogs({ auth }: AdminFunctionsInput['listRawLogs']): Promise<import("../types").WebResponse<{
137
+ entries: RawLogEntry[];
138
+ }>>;
139
+ /** Start logging raw responses for a creator. `exists` = already listed. */
140
+ addRawLog({ auth, platform, username }: AdminFunctionsInput['addRawLog']): Promise<import("../types").WebResponse<{
141
+ result: "added" | "exists";
142
+ entries: RawLogEntry[];
143
+ }>>;
144
+ /** Stop logging one. 404 = not on the list. */
145
+ removeRawLog({ auth, platform, username }: AdminFunctionsInput['removeRawLog']): Promise<import("../types").WebResponse<{
146
+ entries: RawLogEntry[];
147
+ }>>;
148
+ /** Stop logging everyone. */
149
+ clearRawLogs({ auth }: AdminFunctionsInput['clearRawLogs']): Promise<import("../types").WebResponse<{
150
+ removed: number;
151
+ entries: RawLogEntry[];
152
+ }>>;
34
153
  getBadges({ auth }: AdminFunctionsInput['getBadges']): Promise<import("../types").WebResponse<AdminBadgesResult>>;
35
154
  getGuildVods({ auth, guildId, page, limit, creator, enrich }: AdminFunctionsInput['getGuildVods']): Promise<import("../types").WebResponse<GuildVodsResponse>>;
36
155
  /**
@@ -54,6 +173,14 @@ export declare class APIAdmin {
54
173
  getGuildDropsAudit({ auth, guildId, platform }: AdminFunctionsInput['getGuildDropsAudit']): Promise<import("../types").WebResponse<GuildDropsAuditResponse>>;
55
174
  getPubSubHealth({ auth, platform, channel, all }: AdminFunctionsInput['getPubSubHealth']): Promise<import("../types").WebResponse<PubSubHealthResponse>>;
56
175
  getCooldowns({ auth, streamer, guildId, platform, page, limit }: AdminFunctionsInput['getCooldowns']): Promise<import("../types").WebResponse<CooldownsResponse>>;
176
+ /** Clear one creator's cooldown in one server (was /utils clear_cooldown): its next live / video posts as if it were the first. 404 = not set up there. */
177
+ deleteCooldown({ auth, guildId, platform, streamer }: AdminFunctionsInput['deleteCooldown']): Promise<import("../types").WebResponse<CooldownClearResult>>;
178
+ /** Premium servers with no Stripe subscription behind them (comps, staff plans, hand grants), by tier. */
179
+ getManualPremium({ auth, tier }: AdminFunctionsInput['getManualPremium']): Promise<import("../types").WebResponse<ManualPremiumResult>>;
180
+ /** Re-grant premium Stripe says is owed; `downgradeStale` also revokes Stripe-linked servers whose sub ended. DRY RUN unless `dryRun: false`. */
181
+ createSubscriptionReconciliation({ auth, dryRun, downgradeStale }: AdminFunctionsInput['createSubscriptionReconciliation']): Promise<import("../types").WebResponse<SubscriptionReconcileResult>>;
182
+ /** Fix support-server premium roles for one user or everyone (`limit` written per call, default 100, max 200 - run again while `remaining` > 0). DRY RUN unless `dryRun: false`. */
183
+ createPremiumRoleSync({ auth, userId, dryRun, limit }: AdminFunctionsInput['createPremiumRoleSync']): Promise<import("../types").WebResponse<PremiumRoleSyncResult>>;
57
184
  getSystemHealth({ auth }: AdminFunctionsInput['getSystemHealth']): Promise<import("../types").WebResponse<SystemHealthResponse>>;
58
185
  getAnalyticsEvents({ auth, range, limit, offset, kind, source, guildId, userId }: AdminFunctionsInput['getAnalyticsEvents']): Promise<import("../types").WebResponse<AnalyticsEventsResponse>>;
59
186
  }
@@ -132,7 +259,8 @@ export type AdminFunctionsInput = {
132
259
  limit?: number;
133
260
  platform?: DropPlatform;
134
261
  search?: string;
135
- status?: 'enabled' | 'disabled' | 'all';
262
+ status?: DropGameStatusFilter;
263
+ sort?: DropGameSort;
136
264
  };
137
265
  'toggleDropGame': {
138
266
  auth: string;
@@ -151,6 +279,7 @@ export type AdminFunctionsInput = {
151
279
  keep: string[];
152
280
  platform?: DropPlatform;
153
281
  };
282
+ /** `sent: 'zero'` = running drops that reached no server, each with a `reason`. Only for running drops (400 with an ended `status`). */
154
283
  'listDropCampaigns': {
155
284
  auth: string;
156
285
  page?: number;
@@ -158,6 +287,7 @@ export type AdminFunctionsInput = {
158
287
  platform?: DropPlatform;
159
288
  status?: string;
160
289
  gameId?: string;
290
+ sent?: 'zero';
161
291
  };
162
292
  'getDropsSettings': {
163
293
  auth: string;
@@ -168,6 +298,159 @@ export type AdminFunctionsInput = {
168
298
  kick?: boolean;
169
299
  twitch?: boolean;
170
300
  };
301
+ 'getAssistantModels': {
302
+ auth: string;
303
+ };
304
+ 'updateAssistantModels': {
305
+ auth: string;
306
+ chatModels?: string[];
307
+ memoryModel?: string;
308
+ guardModel?: string;
309
+ };
310
+ 'listAssistantDrafts': {
311
+ auth: string;
312
+ };
313
+ 'listAssistantShares': {
314
+ auth: string;
315
+ status?: 'new' | 'reviewed';
316
+ };
317
+ 'getAssistantShare': {
318
+ auth: string;
319
+ id: string;
320
+ };
321
+ 'updateAssistantShare': {
322
+ auth: string;
323
+ id: string;
324
+ status: 'reviewed';
325
+ };
326
+ 'listAssistantMemories': {
327
+ auth: string;
328
+ status?: 'pending' | 'approved' | 'rejected';
329
+ };
330
+ 'getAssistantMemory': {
331
+ auth: string;
332
+ id: string;
333
+ };
334
+ 'updateAssistantMemory': {
335
+ auth: string;
336
+ id: string;
337
+ status: 'approved' | 'rejected';
338
+ };
339
+ 'listAdminSessions': {
340
+ auth: string;
341
+ };
342
+ 'deleteAdminSession': {
343
+ auth: string;
344
+ id: string;
345
+ };
346
+ 'createFeedbackPanel': {
347
+ auth: string;
348
+ guildId: string;
349
+ channelId: string;
350
+ boardId?: string;
351
+ };
352
+ 'decryptImageHash': {
353
+ auth: string;
354
+ hash: string;
355
+ };
356
+ 'listStaffList': {
357
+ auth: string;
358
+ kind: StaffListKind;
359
+ };
360
+ 'addStaffListUser': {
361
+ auth: string;
362
+ kind: StaffListKind;
363
+ userId: string;
364
+ };
365
+ 'removeStaffListUser': {
366
+ auth: string;
367
+ kind: StaffListKind;
368
+ userId: string;
369
+ };
370
+ 'clearStaffList': {
371
+ auth: string;
372
+ kind: StaffListKind;
373
+ };
374
+ 'listPresenceOptOuts': {
375
+ auth: string;
376
+ };
377
+ 'addPresenceOptOut': {
378
+ auth: string;
379
+ userId: string;
380
+ };
381
+ 'removePresenceOptOut': {
382
+ auth: string;
383
+ userId: string;
384
+ };
385
+ 'getYoutubePubSub': {
386
+ auth: string;
387
+ username: string;
388
+ };
389
+ 'getTiktokLookup': {
390
+ auth: string;
391
+ username: string;
392
+ };
393
+ 'listRawLogs': {
394
+ auth: string;
395
+ };
396
+ 'addRawLog': {
397
+ auth: string;
398
+ platform: string;
399
+ username: string;
400
+ };
401
+ 'removeRawLog': {
402
+ auth: string;
403
+ platform: string;
404
+ username: string;
405
+ };
406
+ 'clearRawLogs': {
407
+ auth: string;
408
+ };
409
+ 'listLinkBans': {
410
+ auth: string;
411
+ };
412
+ 'listUserDataDeletions': {
413
+ auth: string;
414
+ };
415
+ 'createUserDataDeletion': {
416
+ auth: string;
417
+ userId: string;
418
+ code: string;
419
+ };
420
+ 'deleteUserDataDeletion': {
421
+ auth: string;
422
+ userId: string;
423
+ };
424
+ 'createLinkBan': {
425
+ auth: string;
426
+ userId?: string;
427
+ platform?: LinkSocialPlatform;
428
+ handle?: string;
429
+ reason?: string;
430
+ };
431
+ 'deleteLinkBan': {
432
+ auth: string;
433
+ userId?: string;
434
+ platform?: LinkSocialPlatform;
435
+ handle?: string;
436
+ };
437
+ 'deleteLinkedAccount': {
438
+ auth: string;
439
+ platform: LinkSocialPlatform;
440
+ handle: string;
441
+ reason?: string;
442
+ };
443
+ 'listLinkEvents': {
444
+ auth: string;
445
+ userId?: string;
446
+ platform?: LinkSocialPlatform | 'kick';
447
+ handle?: string;
448
+ };
449
+ 'createKickLinkReset': {
450
+ auth: string;
451
+ handle: string;
452
+ reason?: string;
453
+ };
171
454
  'getBadges': {
172
455
  auth: string;
173
456
  };
@@ -213,6 +496,27 @@ export type AdminFunctionsInput = {
213
496
  page?: number;
214
497
  limit?: number;
215
498
  };
499
+ 'deleteCooldown': {
500
+ auth: string;
501
+ guildId: string;
502
+ platform: string;
503
+ streamer: string;
504
+ };
505
+ 'getManualPremium': {
506
+ auth: string;
507
+ tier?: string;
508
+ };
509
+ 'createSubscriptionReconciliation': {
510
+ auth: string;
511
+ dryRun?: boolean;
512
+ downgradeStale?: boolean;
513
+ };
514
+ 'createPremiumRoleSync': {
515
+ auth: string;
516
+ userId?: string;
517
+ dryRun?: boolean;
518
+ limit?: number;
519
+ };
216
520
  'getSystemHealth': {
217
521
  auth: string;
218
522
  };
@@ -272,6 +576,76 @@ export type AdminGetReturnTypes = {
272
576
  'getDropsSettingsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getDropsSettings']>>>;
273
577
  'setDropsSettingsRaw': Awaited<ReturnType<APIAdmin['setDropsSettings']>>;
274
578
  'setDropsSettingsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['setDropsSettings']>>>;
579
+ 'listUserDataDeletionsRaw': Awaited<ReturnType<APIAdmin['listUserDataDeletions']>>;
580
+ 'listUserDataDeletionsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['listUserDataDeletions']>>>;
581
+ 'createUserDataDeletionRaw': Awaited<ReturnType<APIAdmin['createUserDataDeletion']>>;
582
+ 'createUserDataDeletionSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['createUserDataDeletion']>>>;
583
+ 'deleteUserDataDeletionRaw': Awaited<ReturnType<APIAdmin['deleteUserDataDeletion']>>;
584
+ 'deleteUserDataDeletionSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['deleteUserDataDeletion']>>>;
585
+ 'getAssistantModelsRaw': Awaited<ReturnType<APIAdmin['getAssistantModels']>>;
586
+ 'getAssistantModelsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getAssistantModels']>>>;
587
+ 'updateAssistantModelsRaw': Awaited<ReturnType<APIAdmin['updateAssistantModels']>>;
588
+ 'updateAssistantModelsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['updateAssistantModels']>>>;
589
+ 'listAssistantDraftsRaw': Awaited<ReturnType<APIAdmin['listAssistantDrafts']>>;
590
+ 'listAssistantDraftsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['listAssistantDrafts']>>>;
591
+ 'listAssistantSharesRaw': Awaited<ReturnType<APIAdmin['listAssistantShares']>>;
592
+ 'listAssistantSharesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['listAssistantShares']>>>;
593
+ 'getAssistantShareRaw': Awaited<ReturnType<APIAdmin['getAssistantShare']>>;
594
+ 'getAssistantShareSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getAssistantShare']>>>;
595
+ 'updateAssistantShareRaw': Awaited<ReturnType<APIAdmin['updateAssistantShare']>>;
596
+ 'updateAssistantShareSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['updateAssistantShare']>>>;
597
+ 'listAssistantMemoriesRaw': Awaited<ReturnType<APIAdmin['listAssistantMemories']>>;
598
+ 'listAssistantMemoriesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['listAssistantMemories']>>>;
599
+ 'getAssistantMemoryRaw': Awaited<ReturnType<APIAdmin['getAssistantMemory']>>;
600
+ 'getAssistantMemorySuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getAssistantMemory']>>>;
601
+ 'updateAssistantMemoryRaw': Awaited<ReturnType<APIAdmin['updateAssistantMemory']>>;
602
+ 'updateAssistantMemorySuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['updateAssistantMemory']>>>;
603
+ 'listAdminSessionsRaw': Awaited<ReturnType<APIAdmin['listAdminSessions']>>;
604
+ 'listAdminSessionsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['listAdminSessions']>>>;
605
+ 'deleteAdminSessionRaw': Awaited<ReturnType<APIAdmin['deleteAdminSession']>>;
606
+ 'deleteAdminSessionSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['deleteAdminSession']>>>;
607
+ 'createFeedbackPanelRaw': Awaited<ReturnType<APIAdmin['createFeedbackPanel']>>;
608
+ 'createFeedbackPanelSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['createFeedbackPanel']>>>;
609
+ 'decryptImageHashRaw': Awaited<ReturnType<APIAdmin['decryptImageHash']>>;
610
+ 'decryptImageHashSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['decryptImageHash']>>>;
611
+ 'listStaffListRaw': Awaited<ReturnType<APIAdmin['listStaffList']>>;
612
+ 'listStaffListSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['listStaffList']>>>;
613
+ 'addStaffListUserRaw': Awaited<ReturnType<APIAdmin['addStaffListUser']>>;
614
+ 'addStaffListUserSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['addStaffListUser']>>>;
615
+ 'removeStaffListUserRaw': Awaited<ReturnType<APIAdmin['removeStaffListUser']>>;
616
+ 'removeStaffListUserSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['removeStaffListUser']>>>;
617
+ 'clearStaffListRaw': Awaited<ReturnType<APIAdmin['clearStaffList']>>;
618
+ 'clearStaffListSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['clearStaffList']>>>;
619
+ 'listPresenceOptOutsRaw': Awaited<ReturnType<APIAdmin['listPresenceOptOuts']>>;
620
+ 'listPresenceOptOutsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['listPresenceOptOuts']>>>;
621
+ 'addPresenceOptOutRaw': Awaited<ReturnType<APIAdmin['addPresenceOptOut']>>;
622
+ 'addPresenceOptOutSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['addPresenceOptOut']>>>;
623
+ 'removePresenceOptOutRaw': Awaited<ReturnType<APIAdmin['removePresenceOptOut']>>;
624
+ 'removePresenceOptOutSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['removePresenceOptOut']>>>;
625
+ 'getYoutubePubSubRaw': Awaited<ReturnType<APIAdmin['getYoutubePubSub']>>;
626
+ 'getYoutubePubSubSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getYoutubePubSub']>>>;
627
+ 'getTiktokLookupRaw': Awaited<ReturnType<APIAdmin['getTiktokLookup']>>;
628
+ 'getTiktokLookupSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getTiktokLookup']>>>;
629
+ 'listRawLogsRaw': Awaited<ReturnType<APIAdmin['listRawLogs']>>;
630
+ 'listRawLogsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['listRawLogs']>>>;
631
+ 'addRawLogRaw': Awaited<ReturnType<APIAdmin['addRawLog']>>;
632
+ 'addRawLogSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['addRawLog']>>>;
633
+ 'removeRawLogRaw': Awaited<ReturnType<APIAdmin['removeRawLog']>>;
634
+ 'removeRawLogSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['removeRawLog']>>>;
635
+ 'clearRawLogsRaw': Awaited<ReturnType<APIAdmin['clearRawLogs']>>;
636
+ 'clearRawLogsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['clearRawLogs']>>>;
637
+ 'listLinkBansRaw': Awaited<ReturnType<APIAdmin['listLinkBans']>>;
638
+ 'listLinkBansSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['listLinkBans']>>>;
639
+ 'createLinkBanRaw': Awaited<ReturnType<APIAdmin['createLinkBan']>>;
640
+ 'createLinkBanSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['createLinkBan']>>>;
641
+ 'deleteLinkBanRaw': Awaited<ReturnType<APIAdmin['deleteLinkBan']>>;
642
+ 'deleteLinkBanSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['deleteLinkBan']>>>;
643
+ 'deleteLinkedAccountRaw': Awaited<ReturnType<APIAdmin['deleteLinkedAccount']>>;
644
+ 'deleteLinkedAccountSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['deleteLinkedAccount']>>>;
645
+ 'listLinkEventsRaw': Awaited<ReturnType<APIAdmin['listLinkEvents']>>;
646
+ 'listLinkEventsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['listLinkEvents']>>>;
647
+ 'createKickLinkResetRaw': Awaited<ReturnType<APIAdmin['createKickLinkReset']>>;
648
+ 'createKickLinkResetSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['createKickLinkReset']>>>;
275
649
  'getBadgesRaw': Awaited<ReturnType<APIAdmin['getBadges']>>;
276
650
  'getBadgesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getBadges']>>>;
277
651
  'getGuildVodsRaw': Awaited<ReturnType<APIAdmin['getGuildVods']>>;
@@ -288,6 +662,14 @@ export type AdminGetReturnTypes = {
288
662
  'getPubSubHealthSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getPubSubHealth']>>>;
289
663
  'getCooldownsRaw': Awaited<ReturnType<APIAdmin['getCooldowns']>>;
290
664
  'getCooldownsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getCooldowns']>>>;
665
+ 'deleteCooldownRaw': Awaited<ReturnType<APIAdmin['deleteCooldown']>>;
666
+ 'deleteCooldownSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['deleteCooldown']>>>;
667
+ 'getManualPremiumRaw': Awaited<ReturnType<APIAdmin['getManualPremium']>>;
668
+ 'getManualPremiumSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getManualPremium']>>>;
669
+ 'createSubscriptionReconciliationRaw': Awaited<ReturnType<APIAdmin['createSubscriptionReconciliation']>>;
670
+ 'createSubscriptionReconciliationSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['createSubscriptionReconciliation']>>>;
671
+ 'createPremiumRoleSyncRaw': Awaited<ReturnType<APIAdmin['createPremiumRoleSync']>>;
672
+ 'createPremiumRoleSyncSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['createPremiumRoleSync']>>>;
291
673
  'getSystemHealthRaw': Awaited<ReturnType<APIAdmin['getSystemHealth']>>;
292
674
  'getSystemHealthSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getSystemHealth']>>>;
293
675
  'getAnalyticsEventsRaw': Awaited<ReturnType<APIAdmin['getAnalyticsEvents']>>;
@@ -404,9 +786,23 @@ export type DropGameAdmin = {
404
786
  name: string;
405
787
  slug: string | null;
406
788
  imageUrl: string | null;
789
+ /** Disabled. Only Twitch reads this - Kick still sends a disabled game's drops. */
407
790
  ignored: boolean;
791
+ /** All-time saved drops. Twitch saves none for a disabled game; `lastDropSeenAt` is the trace for those. */
408
792
  dropCount: number;
793
+ /** Servers that picked this game. Kick servers with no game picked get every game and are not counted (see `summary.kickAllGamesServers`). */
794
+ followers: number;
795
+ /** Drops of this game running right now. */
796
+ runningDrops: number;
797
+ /** Last poll that listed a campaign for this game, disabled games included. Null until one has. */
798
+ lastDropSeenAt: Date | null;
799
+ /** When a poll first listed this game. */
800
+ firstSeenAt: Date;
409
801
  };
802
+ /** `missed` = disabled with a drop seen in the last 14 days. `new` = first seen in the last 14 days. */
803
+ export type DropGameStatusFilter = 'all' | 'enabled' | 'disabled' | 'missed' | 'new';
804
+ /** `recent` = last drop seen, newest first. `newest` = first seen, newest first. */
805
+ export type DropGameSort = 'name' | 'followers' | 'recent' | 'newest';
410
806
  export type DropGamesListResponse = {
411
807
  games: DropGameAdmin[];
412
808
  pagination: {
@@ -421,6 +817,9 @@ export type DropGamesListResponse = {
421
817
  total: number;
422
818
  enabled: number;
423
819
  disabled: number;
820
+ missed: number;
821
+ new: number;
822
+ kickAllGamesServers: number;
424
823
  };
425
824
  };
426
825
  export type DropGameToggleResult = {
@@ -445,12 +844,19 @@ export type DropCampaign = {
445
844
  startsAt: Date;
446
845
  endsAt: Date;
447
846
  organizationName: string | null;
847
+ /** `dbId` is the game to pass to toggleDropGame. */
448
848
  game: {
849
+ dbId: string;
449
850
  name: string;
450
851
  slug: string | null;
852
+ ignored: boolean;
853
+ followers: number;
451
854
  } | null;
452
855
  sentCount: number;
856
+ /** Only with `sent: 'zero'`: why nobody got it. `other` = delivery hours, a missing channel, or the next send is still pending. */
857
+ reason?: DropZeroSentReason;
453
858
  };
859
+ export type DropZeroSentReason = 'disabled' | 'no_followers' | 'other';
454
860
  export type DropCampaignsListResponse = {
455
861
  campaigns: DropCampaign[];
456
862
  pagination: {
@@ -470,6 +876,234 @@ export type DropsPauseState = {
470
876
  export type DropsSettingsResult = {
471
877
  paused: DropsPauseState;
472
878
  };
879
+ export type CooldownClearResult = {
880
+ cleared: true;
881
+ guildId: string;
882
+ platform: string;
883
+ streamer: string;
884
+ };
885
+ export type ManualPremiumResult = {
886
+ total: number;
887
+ byTier: {
888
+ tierId: string;
889
+ name: string;
890
+ guildIds: string[];
891
+ }[];
892
+ };
893
+ export type SubscriptionReconcileResult = {
894
+ dryRun: boolean;
895
+ checked: number;
896
+ regranted: number;
897
+ downgraded: number;
898
+ alreadyCorrect: number;
899
+ errors: number;
900
+ changes: {
901
+ kind: 'regrant' | 'downgrade';
902
+ type: 'user' | 'guild';
903
+ id: string;
904
+ to: string;
905
+ }[];
906
+ };
907
+ export type PremiumRoleSyncUserResult = {
908
+ ok: true;
909
+ inGuild: true;
910
+ added: string[];
911
+ removed: string[];
912
+ roles: string[];
913
+ } | {
914
+ ok: true;
915
+ inGuild: false;
916
+ roles: string[];
917
+ } | {
918
+ ok: false;
919
+ reason: 'no_user' | 'no_support_guild' | 'cluster_unavailable';
920
+ };
921
+ export type PremiumRoleSyncAllResult =
922
+ /** `detail` is what actually failed. A gateway timeout on member_fetch_failed (detail matches /time|abort/i) is intermittent - run it again; anything else repeatable points at the GuildMembers intent. */
923
+ {
924
+ ok: false;
925
+ reason: 'no_support_guild' | 'cluster_unavailable' | 'member_fetch_failed';
926
+ detail?: string;
927
+ } | {
928
+ ok: true;
929
+ dryRun: boolean;
930
+ entitled: number;
931
+ scanned: number;
932
+ /** Members whose roles are wrong right now. */
933
+ needing: number;
934
+ /** Written this call (0 on a dry run). */
935
+ applied: number;
936
+ /** Still wrong after this call - non-zero means run it again. */
937
+ remaining: number;
938
+ granted: number;
939
+ revoked: number;
940
+ /** Write batches that came back with nothing - those members may be partly written; run it again. */
941
+ failedChunks: number;
942
+ sample: {
943
+ userId: string;
944
+ added: string[];
945
+ removed: string[];
946
+ }[];
947
+ };
948
+ export type PremiumRoleSyncResult = {
949
+ scope: 'user';
950
+ result: PremiumRoleSyncUserResult;
951
+ } | {
952
+ scope: 'all';
953
+ result: PremiumRoleSyncAllResult;
954
+ };
955
+ /** A user-data deletion waiting out its 7 days (Noti-v3 modules/userDeletionGrace.ts). Times are epoch ms. */
956
+ export type PendingUserDataDeletion = {
957
+ userId: string;
958
+ requestId: string;
959
+ requestedBy: string;
960
+ requestedAt: number;
961
+ runAt: number;
962
+ };
963
+ /** `agrees: null` = Google's page could not be read - unknown, NOT a disagreement. `hub.raw` = the unparsed page when `hub.state` is 'unknown'. */
964
+ export type YoutubePubSubInspection = {
965
+ found: boolean;
966
+ username: string;
967
+ streamerId: string | null;
968
+ redis: {
969
+ scheduled: boolean;
970
+ renewalDueAt: number | null;
971
+ };
972
+ hub: {
973
+ state: 'verified' | 'unverified' | 'not-found' | 'unknown';
974
+ leaseExpiresAt: string | null;
975
+ lastDelivery: string | null;
976
+ lastError: string | null;
977
+ raw: string | null;
978
+ } | null;
979
+ agrees: boolean | null;
980
+ /** Webhooks Google sent us, newest first (epoch ms). Empty = nothing arrived in 30 days. */
981
+ receipts: {
982
+ at: number;
983
+ outcome: string;
984
+ videoId: string | null;
985
+ title: string | null;
986
+ }[];
987
+ };
988
+ export type TiktokLookup = {
989
+ username: string;
990
+ outcome: 'live' | 'offline' | 'rate-limited-or-failed' | 'temporary-api-issue' | 'account-not-found' | 'unusable-response';
991
+ uid: string | null;
992
+ roomDataPresent: boolean | null;
993
+ roomId: string | null;
994
+ /** `ownerMatches: false` = tokapi gave someone else's room (the leaked-room bug). status 2 = live, 4 = ended. */
995
+ room: {
996
+ status: number | null;
997
+ ownerUserId: string | null;
998
+ ownerMatches: boolean | null;
999
+ title: string | null;
1000
+ startedAtUnix: number | null;
1001
+ } | null;
1002
+ cache: {
1003
+ tracked: boolean;
1004
+ isLive: boolean | null;
1005
+ lastPolled: number | null;
1006
+ };
1007
+ };
1008
+ export type RawLogEntry = {
1009
+ username: string;
1010
+ platform: string;
1011
+ };
1012
+ /** `dashboard` = the dashboard allowlist (locks the dashboard to it while non-empty); `staff` = the staff group. */
1013
+ export type StaffListKind = 'dashboard' | 'staff';
1014
+ export type PresenceOptOutResult = {
1015
+ userId: string;
1016
+ optedOut: boolean;
1017
+ clustersUpdated: boolean;
1018
+ };
1019
+ /** One of your dashboard logins. `keyEnd` = the key's last 4 characters (the key itself never leaves the server). */
1020
+ export type AdminSession = {
1021
+ id: string;
1022
+ keyEnd: string;
1023
+ createdAt: Date | null;
1024
+ expiresAt: Date;
1025
+ current: boolean;
1026
+ };
1027
+ export type AssistantModels = {
1028
+ chatModels: string[];
1029
+ memoryModel: string | null;
1030
+ guardModel: string;
1031
+ };
1032
+ /** `live` is what the assistant uses now; `defaults` is the env fallback when nothing is stored. */
1033
+ export type AssistantModelsResult = {
1034
+ live: AssistantModels;
1035
+ defaults: AssistantModels;
1036
+ };
1037
+ export type AssistantDraftCount = {
1038
+ area: string;
1039
+ op: string;
1040
+ key: string;
1041
+ model: string;
1042
+ count: number;
1043
+ };
1044
+ export type AssistantShareSummary = {
1045
+ id: string;
1046
+ guildId: string;
1047
+ model: string;
1048
+ planName: string;
1049
+ note: string | null;
1050
+ status: string;
1051
+ createdAt: Date;
1052
+ };
1053
+ export type AssistantShareDetail = AssistantShareSummary & {
1054
+ turns: unknown[];
1055
+ proposals: unknown[];
1056
+ transcript: string;
1057
+ };
1058
+ export type AssistantMemorySummary = {
1059
+ id: string;
1060
+ area: string;
1061
+ status: string;
1062
+ builtAt: string;
1063
+ createdAt: Date;
1064
+ reviewedBy: string | null;
1065
+ reviewedAt: Date | null;
1066
+ };
1067
+ export type AssistantMemoryDetail = {
1068
+ id: string;
1069
+ area: string;
1070
+ status: string;
1071
+ check: string | null;
1072
+ lines: {
1073
+ mark: 'same' | 'new';
1074
+ text: string;
1075
+ }[];
1076
+ };
1077
+ export type LinkSocialPlatform = 'youtube' | 'twitter' | 'club';
1078
+ /** One link-history row (SocialAccountEvent), newest first. `platform` null = a user-wide ban / unban. */
1079
+ export type LinkEvent = {
1080
+ at: Date;
1081
+ discordUserId: string;
1082
+ platform: string | null;
1083
+ username: string;
1084
+ action: string;
1085
+ reason: string | null;
1086
+ actorId: string | null;
1087
+ };
1088
+ /** A ban on a Discord user (`discordUserId`) or on an account (`platform` + `username` / `accountId`). */
1089
+ export type LinkBanRow = {
1090
+ dbId: string;
1091
+ discordUserId: string | null;
1092
+ platform: string | null;
1093
+ username: string | null;
1094
+ accountId: string | null;
1095
+ reason: string | null;
1096
+ bannedBy: string;
1097
+ createdAt: Date;
1098
+ };
1099
+ /** `message` is plain English for a toast. ban: `removed`; unlink: `unlinkedFrom` (user ids); history: `events`; list: `bans`. */
1100
+ export type LinkBanActionResult = {
1101
+ message: string;
1102
+ removed?: number;
1103
+ unlinkedFrom?: string[];
1104
+ events?: LinkEvent[];
1105
+ bans?: LinkBanRow[];
1106
+ };
473
1107
  export type AdminDetectedBadge = {
474
1108
  /** `<platform>:<rewardId>`. */
475
1109
  key: string;