/
eventSub.input.ts
87 lines (76 loc) · 2.4 KB
/
eventSub.input.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import { type HelixEventSubSubscription } from '../../endpoints/eventSub/HelixEventSubSubscription';
import { type HelixPaginatedResultWithTotal } from '../../utils/pagination/HelixPaginatedResult';
import type {
HelixEventSubWebHookTransportData,
HelixEventSubWebSocketTransportData,
HelixEventSubConduitTransportData,
} from './eventSub.external';
/**
* The properties describing where a WebHook notification is sent, and how it is signed.
*
* @inheritDoc
*/
export interface HelixEventSubWebHookTransportOptions extends HelixEventSubWebHookTransportData {
/**
* The secret to sign the notification payloads with.
*/
secret?: string;
}
/**
* The properties describing where a WebSocket notification is sent.
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface HelixEventSubWebSocketTransportOptions
extends Omit<HelixEventSubWebSocketTransportData, 'connected_at' | 'disconnected_at'> {}
/**
* The properties describing where a conduit notification is sent.
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface HelixEventSubConduitTransportOptions extends HelixEventSubConduitTransportData {}
export type HelixEventSubTransportOptions =
| HelixEventSubWebHookTransportOptions
| HelixEventSubWebSocketTransportOptions
| HelixEventSubConduitTransportOptions;
/**
* The result of an EventSub subscription list request.
*
* @inheritDoc
*/
export interface HelixPaginatedEventSubSubscriptionsResult
extends HelixPaginatedResultWithTotal<HelixEventSubSubscription> {
/**
* The total cost of all subscriptions.
*/
totalCost: number;
/**
* The maximum cost that is allowed for your application.
*/
maxTotalCost: number;
}
/**
* Filters for EventSub drop entitlement grant events.
*/
export interface HelixEventSubDropEntitlementGrantFilter {
/**
* The ID of the organization that owns the categories/games to get events for.
*/
organizationId: string;
/**
* The ID of the category/game to get events for.
*/
categoryId?: string;
/**
* The ID of the campaign to get events for.
*/
campaignId?: string;
}
export type HelixEventSubConduitShardsTransportOptions =
| HelixEventSubWebHookTransportOptions
| HelixEventSubWebSocketTransportOptions;
/**
* The properties for updating a conduit shard.
*/
export interface HelixEventSubConduitShardsOptions {
id: string;
transport: HelixEventSubConduitShardsTransportOptions;
}