@distilled.cloud/twitch 0.0.0 → 1.0.0-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +79 -4
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +31 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +49 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +46 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -0
- package/lib/pagination.d.ts +10 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +1 -0
- package/lib/protocol.d.ts +19 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +50 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/ads.d.ts +75 -0
- package/lib/services/ads.d.ts.map +1 -0
- package/lib/services/ads.js +2 -0
- package/lib/services/ads.js.map +1 -0
- package/lib/services/analytics.d.ts +90 -0
- package/lib/services/analytics.d.ts.map +1 -0
- package/lib/services/analytics.js +2 -0
- package/lib/services/analytics.js.map +1 -0
- package/lib/services/bits.d.ts +284 -0
- package/lib/services/bits.d.ts.map +1 -0
- package/lib/services/bits.js +2 -0
- package/lib/services/bits.js.map +1 -0
- package/lib/services/ccls.d.ts +26 -0
- package/lib/services/ccls.d.ts.map +1 -0
- package/lib/services/ccls.js +2 -0
- package/lib/services/ccls.js.map +1 -0
- package/lib/services/channel_points.d.ts +416 -0
- package/lib/services/channel_points.d.ts.map +1 -0
- package/lib/services/channel_points.js +2 -0
- package/lib/services/channel_points.js.map +1 -0
- package/lib/services/channels.d.ts +173 -0
- package/lib/services/channels.d.ts.map +1 -0
- package/lib/services/channels.js +2 -0
- package/lib/services/channels.js.map +1 -0
- package/lib/services/charity.d.ts +97 -0
- package/lib/services/charity.d.ts.map +1 -0
- package/lib/services/charity.js +2 -0
- package/lib/services/charity.js.map +1 -0
- package/lib/services/chat.d.ts +638 -0
- package/lib/services/chat.d.ts.map +1 -0
- package/lib/services/chat.js +33 -0
- package/lib/services/chat.js.map +1 -0
- package/lib/services/clips.d.ts +153 -0
- package/lib/services/clips.d.ts.map +1 -0
- package/lib/services/clips.js +2 -0
- package/lib/services/clips.js.map +1 -0
- package/lib/services/conduits.d.ts +172 -0
- package/lib/services/conduits.d.ts.map +1 -0
- package/lib/services/conduits.js +2 -0
- package/lib/services/conduits.js.map +1 -0
- package/lib/services/entitlements.d.ts +76 -0
- package/lib/services/entitlements.d.ts.map +1 -0
- package/lib/services/entitlements.js +2 -0
- package/lib/services/entitlements.js.map +1 -0
- package/lib/services/eventsub.d.ts +158 -0
- package/lib/services/eventsub.d.ts.map +1 -0
- package/lib/services/eventsub.js +2 -0
- package/lib/services/eventsub.js.map +1 -0
- package/lib/services/extensions.d.ts +497 -0
- package/lib/services/extensions.d.ts.map +1 -0
- package/lib/services/extensions.js +2 -0
- package/lib/services/extensions.js.map +1 -0
- package/lib/services/games.d.ts +57 -0
- package/lib/services/games.d.ts.map +1 -0
- package/lib/services/games.js +2 -0
- package/lib/services/games.js.map +1 -0
- package/lib/services/goals.d.ts +37 -0
- package/lib/services/goals.d.ts.map +1 -0
- package/lib/services/goals.js +2 -0
- package/lib/services/goals.js.map +1 -0
- package/lib/services/guest_star.d.ts +314 -0
- package/lib/services/guest_star.d.ts.map +1 -0
- package/lib/services/guest_star.js +2 -0
- package/lib/services/guest_star.js.map +1 -0
- package/lib/services/hype_train.d.ts +91 -0
- package/lib/services/hype_train.d.ts.map +1 -0
- package/lib/services/hype_train.js +2 -0
- package/lib/services/hype_train.js.map +1 -0
- package/lib/services/index.d.ts +30 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +29 -0
- package/lib/services/moderation.d.ts +731 -0
- package/lib/services/moderation.d.ts.map +1 -0
- package/lib/services/moderation.js +41 -0
- package/lib/services/moderation.js.map +1 -0
- package/lib/services/polls.d.ts +173 -0
- package/lib/services/polls.d.ts.map +1 -0
- package/lib/services/polls.js +2 -0
- package/lib/services/polls.js.map +1 -0
- package/lib/services/predictions.d.ts +221 -0
- package/lib/services/predictions.d.ts.map +1 -0
- package/lib/services/predictions.js +2 -0
- package/lib/services/predictions.js.map +1 -0
- package/lib/services/raids.d.ts +34 -0
- package/lib/services/raids.d.ts.map +1 -0
- package/lib/services/raids.js +2 -0
- package/lib/services/raids.js.map +1 -0
- package/lib/services/schedule.d.ts +223 -0
- package/lib/services/schedule.d.ts.map +1 -0
- package/lib/services/schedule.js +2 -0
- package/lib/services/schedule.js.map +1 -0
- package/lib/services/search.d.ts +89 -0
- package/lib/services/search.d.ts.map +1 -0
- package/lib/services/search.js +2 -0
- package/lib/services/search.js.map +1 -0
- package/lib/services/streams.d.ts +235 -0
- package/lib/services/streams.d.ts.map +1 -0
- package/lib/services/streams.js +2 -0
- package/lib/services/streams.js.map +1 -0
- package/lib/services/subscriptions.d.ts +96 -0
- package/lib/services/subscriptions.d.ts.map +1 -0
- package/lib/services/subscriptions.js +2 -0
- package/lib/services/subscriptions.js.map +1 -0
- package/lib/services/teams.d.ts +90 -0
- package/lib/services/teams.d.ts.map +1 -0
- package/lib/services/teams.js +2 -0
- package/lib/services/teams.js.map +1 -0
- package/lib/services/users.d.ts +324 -0
- package/lib/services/users.d.ts.map +1 -0
- package/lib/services/users.js +2 -0
- package/lib/services/users.js.map +1 -0
- package/lib/services/videos.d.ts +101 -0
- package/lib/services/videos.d.ts.map +1 -0
- package/lib/services/videos.js +2 -0
- package/lib/services/videos.js.map +1 -0
- package/lib/services/whispers.d.ts +17 -0
- package/lib/services/whispers.d.ts.map +1 -0
- package/lib/services/whispers.js +2 -0
- package/lib/services/whispers.js.map +1 -0
- package/lib/services.lazy/ads.js +1 -0
- package/lib/services.lazy/analytics.js +1 -0
- package/lib/services.lazy/bits.js +1 -0
- package/lib/services.lazy/ccls.js +1 -0
- package/lib/services.lazy/channel_points.js +1 -0
- package/lib/services.lazy/channels.js +1 -0
- package/lib/services.lazy/charity.js +1 -0
- package/lib/services.lazy/chat.js +3 -0
- package/lib/services.lazy/clips.js +1 -0
- package/lib/services.lazy/conduits.js +1 -0
- package/lib/services.lazy/entitlements.js +1 -0
- package/lib/services.lazy/eventsub.js +1 -0
- package/lib/services.lazy/extensions.js +1 -0
- package/lib/services.lazy/games.js +1 -0
- package/lib/services.lazy/goals.js +1 -0
- package/lib/services.lazy/guest_star.js +1 -0
- package/lib/services.lazy/hype_train.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/moderation.js +3 -0
- package/lib/services.lazy/polls.js +1 -0
- package/lib/services.lazy/predictions.js +1 -0
- package/lib/services.lazy/raids.js +1 -0
- package/lib/services.lazy/schedule.js +1 -0
- package/lib/services.lazy/search.js +1 -0
- package/lib/services.lazy/streams.js +1 -0
- package/lib/services.lazy/subscriptions.js +1 -0
- package/lib/services.lazy/teams.js +1 -0
- package/lib/services.lazy/users.js +1 -0
- package/lib/services.lazy/videos.js +1 -0
- package/lib/services.lazy/whispers.js +1 -0
- package/lib/traits.d.ts +10 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/package.json +82 -2
- package/src/credentials.ts +79 -0
- package/src/errors.ts +78 -0
- package/src/index.ts +45 -0
- package/src/pagination.ts +9 -0
- package/src/protocol.ts +43 -0
- package/src/retry.ts +69 -0
- package/src/services/ads.ts +228 -0
- package/src/services/analytics.ts +253 -0
- package/src/services/bits.ts +631 -0
- package/src/services/ccls.ts +96 -0
- package/src/services/channel_points.ts +804 -0
- package/src/services/channels.ts +471 -0
- package/src/services/charity.ts +250 -0
- package/src/services/chat.ts +1547 -0
- package/src/services/clips.ts +385 -0
- package/src/services/conduits.ts +453 -0
- package/src/services/entitlements.ts +219 -0
- package/src/services/eventsub.ts +372 -0
- package/src/services/extensions.ts +1098 -0
- package/src/services/games.ts +184 -0
- package/src/services/goals.ts +110 -0
- package/src/services/guest_star.ts +762 -0
- package/src/services/hype_train.ts +214 -0
- package/src/services/index.ts +30 -0
- package/src/services/moderation.ts +1817 -0
- package/src/services/polls.ts +363 -0
- package/src/services/predictions.ts +432 -0
- package/src/services/raids.ts +127 -0
- package/src/services/schedule.ts +539 -0
- package/src/services/search.ts +248 -0
- package/src/services/streams.ts +579 -0
- package/src/services/subscriptions.ts +247 -0
- package/src/services/teams.ts +225 -0
- package/src/services/users.ts +729 -0
- package/src/services/videos.ts +257 -0
- package/src/services/whispers.ts +71 -0
- package/src/traits.ts +47 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import { type TwitchOpError, type TwitchOpContext } from "../protocol.ts";
|
|
3
|
+
export type { TwitchOpError, TwitchOpContext };
|
|
4
|
+
export interface BlockUserRequest {
|
|
5
|
+
/** The ID of the user to block. If the broadcaster has already blocked the user, the API replaces the existing block. */
|
|
6
|
+
target_user_id: string;
|
|
7
|
+
/** The location where the harassment took place that is causing the brodcaster to block the user. Possible values: - `chat` - `whisper` */
|
|
8
|
+
source_context?: string | undefined;
|
|
9
|
+
/** The reason that the broadcaster is blocking the user. Possible values: - `harassment` - `spam` - `other` */
|
|
10
|
+
reason?: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface BlockUserResponse {
|
|
13
|
+
}
|
|
14
|
+
export type GetAuthorizationByUserRequestUserIdList = Array<string>;
|
|
15
|
+
export interface GetAuthorizationByUserRequest {
|
|
16
|
+
/** The ID of the user(s) you want to check authorization for. To specify more than one user, include the user_id parameter for each user to get. For example, 'user_id=1234&user_id=5678'. The maximum number of IDs you may specify is 10. */
|
|
17
|
+
user_id: GetAuthorizationByUserRequestUserIdList;
|
|
18
|
+
}
|
|
19
|
+
/** An array of all the scopes the user has granted to the client ID. */
|
|
20
|
+
export type GetAuthorizationByUserResponseDataItemScopesList = Array<string>;
|
|
21
|
+
export interface GetAuthorizationByUserResponseDataItem {
|
|
22
|
+
/** The user's ID. */
|
|
23
|
+
user_id?: string | undefined;
|
|
24
|
+
/** The user's display name. */
|
|
25
|
+
user_name?: string | undefined;
|
|
26
|
+
/** The user's login name. */
|
|
27
|
+
user_login?: string | undefined;
|
|
28
|
+
/** An array of all the scopes the user has granted to the client ID. */
|
|
29
|
+
scopes?: GetAuthorizationByUserResponseDataItemScopesList | undefined;
|
|
30
|
+
/** A boolean indicating whether or not the specified user has authorized this application. */
|
|
31
|
+
has_authorized?: boolean | undefined;
|
|
32
|
+
}
|
|
33
|
+
/** List of users and their authorized scopes. The list is in the same order as the *user_id* query parameters and doesn't include IDs that don't match a user. */
|
|
34
|
+
export type GetAuthorizationByUserResponseDataList = Array<GetAuthorizationByUserResponseDataItem>;
|
|
35
|
+
export interface GetAuthorizationByUserResponse {
|
|
36
|
+
/** List of users and their authorized scopes. The list is in the same order as the *user_id* query parameters and doesn't include IDs that don't match a user. */
|
|
37
|
+
data?: GetAuthorizationByUserResponseDataList | undefined;
|
|
38
|
+
}
|
|
39
|
+
export interface GetUserActiveExtensionsRequest {
|
|
40
|
+
/** The ID of the broadcaster whose active extensions you want to get. This parameter is required if you specify an app access token and is optional if you specify a user access token. If you specify a user access token and don't specify this parameter, the API uses the user ID from the access token. */
|
|
41
|
+
user_id?: string | undefined;
|
|
42
|
+
}
|
|
43
|
+
export interface GetUserActiveExtensionsResponseDataPanelValue {
|
|
44
|
+
/** A Boolean value that determines the extension's activation state. If **false**, the user has not configured this panel extension, and the object contains only this field. */
|
|
45
|
+
active?: boolean | undefined;
|
|
46
|
+
/** An ID that identifies the extension. */
|
|
47
|
+
id?: string | undefined;
|
|
48
|
+
/** The extension's version. */
|
|
49
|
+
version?: string | undefined;
|
|
50
|
+
/** The extension's name. */
|
|
51
|
+
name?: string | undefined;
|
|
52
|
+
}
|
|
53
|
+
/** A dictionary that contains the data for a panel extension. The dictionary always contains the keys 1, 2, and 3, one for each panel slot. The following fields contain the panel's data for each key. */
|
|
54
|
+
export type GetUserActiveExtensionsResponseDataPanelMap = {
|
|
55
|
+
[key: string]: GetUserActiveExtensionsResponseDataPanelValue | undefined;
|
|
56
|
+
};
|
|
57
|
+
export interface GetUserActiveExtensionsResponseDataOverlayValue {
|
|
58
|
+
/** A Boolean value that determines the extension's activation state. If **false**, the user has not configured this overlay extension, and the object contains only this field. */
|
|
59
|
+
active?: boolean | undefined;
|
|
60
|
+
/** An ID that identifies the extension. */
|
|
61
|
+
id?: string | undefined;
|
|
62
|
+
/** The extension's version. */
|
|
63
|
+
version?: string | undefined;
|
|
64
|
+
/** The extension's name. */
|
|
65
|
+
name?: string | undefined;
|
|
66
|
+
}
|
|
67
|
+
/** A dictionary that contains the data for a video-overlay extension. The dictionary always contains the key 1, for the single overlay slot. The following fields contain the overlay's data for that key. */
|
|
68
|
+
export type GetUserActiveExtensionsResponseDataOverlayMap = {
|
|
69
|
+
[key: string]: GetUserActiveExtensionsResponseDataOverlayValue | undefined;
|
|
70
|
+
};
|
|
71
|
+
export interface GetUserActiveExtensionsResponseDataComponentValue {
|
|
72
|
+
/** A Boolean value that determines the extension's activation state. If **false**, the user has not configured this component extension, and the object contains only this field. */
|
|
73
|
+
active?: boolean | undefined;
|
|
74
|
+
/** An ID that identifies the extension. */
|
|
75
|
+
id?: string | undefined;
|
|
76
|
+
/** The extension's version. */
|
|
77
|
+
version?: string | undefined;
|
|
78
|
+
/** The extension's name. */
|
|
79
|
+
name?: string | undefined;
|
|
80
|
+
/** The x-coordinate where the extension is placed. */
|
|
81
|
+
x?: number | undefined;
|
|
82
|
+
/** The y-coordinate where the extension is placed. */
|
|
83
|
+
y?: number | undefined;
|
|
84
|
+
}
|
|
85
|
+
/** A dictionary that contains the data for a video-component extension. The dictionary always contains the keys 1 and 2, one for each component slot. The following fields contain the component's data for each key. */
|
|
86
|
+
export type GetUserActiveExtensionsResponseDataComponentMap = {
|
|
87
|
+
[key: string]: GetUserActiveExtensionsResponseDataComponentValue | undefined;
|
|
88
|
+
};
|
|
89
|
+
/** The active extensions that the broadcaster has installed. */
|
|
90
|
+
export interface GetUserActiveExtensionsResponseData {
|
|
91
|
+
/** A dictionary that contains the data for a panel extension. The dictionary always contains the keys 1, 2, and 3, one for each panel slot. The following fields contain the panel's data for each key. */
|
|
92
|
+
panel?: GetUserActiveExtensionsResponseDataPanelMap | undefined;
|
|
93
|
+
/** A dictionary that contains the data for a video-overlay extension. The dictionary always contains the key 1, for the single overlay slot. The following fields contain the overlay's data for that key. */
|
|
94
|
+
overlay?: GetUserActiveExtensionsResponseDataOverlayMap | undefined;
|
|
95
|
+
/** A dictionary that contains the data for a video-component extension. The dictionary always contains the keys 1 and 2, one for each component slot. The following fields contain the component's data for each key. */
|
|
96
|
+
component?: GetUserActiveExtensionsResponseDataComponentMap | undefined;
|
|
97
|
+
}
|
|
98
|
+
export interface GetUserActiveExtensionsResponse {
|
|
99
|
+
/** The active extensions that the broadcaster has installed. */
|
|
100
|
+
data?: GetUserActiveExtensionsResponseData | undefined;
|
|
101
|
+
}
|
|
102
|
+
export type GetUserBlockListRequestUserIdList = Array<string>;
|
|
103
|
+
export interface GetUserBlockListRequest {
|
|
104
|
+
/** The ID of the broadcaster whose list of blocked users you want to get. */
|
|
105
|
+
broadcaster_id: string;
|
|
106
|
+
/** A list of user IDs used to filter the results. To specify more than one ID, include this parameter for each user you want to check. For example, 'user_id=1234&user_id=5678'. You may specify a maximum of 100 IDs. The returned list includes only those users that the broadcaster has blocked. If you specify this parameter, the *first* and *after* query parameters are ignored, the response's `pagination` object is empty, and the list is in no particular order. */
|
|
107
|
+
user_id?: GetUserBlockListRequestUserIdList | undefined;
|
|
108
|
+
/** The maximum number of items to return per page in the response. The minimum page size is 1 item per page and the maximum is 100. The default is 20. */
|
|
109
|
+
first?: number | undefined;
|
|
110
|
+
/** The cursor used to get the next page of results. The **Pagination** object in the response contains the cursor's value. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
|
|
111
|
+
after?: string | undefined;
|
|
112
|
+
}
|
|
113
|
+
export interface GetUserBlockListResponseDataItem {
|
|
114
|
+
/** An ID that identifies the blocked user. */
|
|
115
|
+
user_id?: string | undefined;
|
|
116
|
+
/** The blocked user's login name. */
|
|
117
|
+
user_login?: string | undefined;
|
|
118
|
+
/** The blocked user's display name. */
|
|
119
|
+
display_name?: string | undefined;
|
|
120
|
+
}
|
|
121
|
+
/** The list of blocked users. If the request doesn't specify *user_id*, the list is in descending order by when the user was blocked. */
|
|
122
|
+
export type GetUserBlockListResponseDataList = Array<GetUserBlockListResponseDataItem>;
|
|
123
|
+
/** Contains the information used to page through the list of results. The object is empty if there are no more pages left to page through. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination). */
|
|
124
|
+
export interface GetUserBlockListResponsePagination {
|
|
125
|
+
/** The cursor used to get the next page of results. Use the cursor to set the request's *after* query parameter. */
|
|
126
|
+
cursor?: string | undefined;
|
|
127
|
+
}
|
|
128
|
+
export interface GetUserBlockListResponse {
|
|
129
|
+
/** The list of blocked users. If the request doesn't specify *user_id*, the list is in descending order by when the user was blocked. */
|
|
130
|
+
data: GetUserBlockListResponseDataList;
|
|
131
|
+
/** Contains the information used to page through the list of results. The object is empty if there are no more pages left to page through. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination). */
|
|
132
|
+
pagination?: GetUserBlockListResponsePagination | undefined;
|
|
133
|
+
}
|
|
134
|
+
export interface GetUserExtensionsRequest {
|
|
135
|
+
}
|
|
136
|
+
/** The extension types that you can activate for this extension. Possible values: - `component` - `mobile` - `overlay` - `panel` */
|
|
137
|
+
export type GetUserExtensionsResponseDataItemTypeList = Array<string>;
|
|
138
|
+
export interface GetUserExtensionsResponseDataItem {
|
|
139
|
+
/** An ID that identifies the extension. */
|
|
140
|
+
id?: string | undefined;
|
|
141
|
+
/** The extension's version. */
|
|
142
|
+
version?: string | undefined;
|
|
143
|
+
/** The extension's name. */
|
|
144
|
+
name?: string | undefined;
|
|
145
|
+
/** A Boolean value that determines whether the extension is configured and can be activated. Is **true** if the extension is configured and can be activated. */
|
|
146
|
+
can_activate?: boolean | undefined;
|
|
147
|
+
/** The extension types that you can activate for this extension. Possible values: - `component` - `mobile` - `overlay` - `panel` */
|
|
148
|
+
type?: GetUserExtensionsResponseDataItemTypeList | undefined;
|
|
149
|
+
}
|
|
150
|
+
/** The list of extensions that the user has installed. */
|
|
151
|
+
export type GetUserExtensionsResponseDataList = Array<GetUserExtensionsResponseDataItem>;
|
|
152
|
+
export interface GetUserExtensionsResponse {
|
|
153
|
+
/** The list of extensions that the user has installed. */
|
|
154
|
+
data?: GetUserExtensionsResponseDataList | undefined;
|
|
155
|
+
}
|
|
156
|
+
export type GetUsersRequestIdList = Array<string>;
|
|
157
|
+
export type GetUsersRequestLoginList = Array<string>;
|
|
158
|
+
export interface GetUsersRequest {
|
|
159
|
+
/** The ID of the user to get. To specify more than one user, include the *id* parameter for each user to get. For example, 'id=1234&id=5678'. The maximum number of IDs you may specify is 100. */
|
|
160
|
+
id?: GetUsersRequestIdList | undefined;
|
|
161
|
+
/** The login name of the user to get. To specify more than one user, include the *login* parameter for each user to get. For example, 'login=foo&login=bar'. The maximum number of login names you may specify is 100. */
|
|
162
|
+
login?: GetUsersRequestLoginList | undefined;
|
|
163
|
+
}
|
|
164
|
+
export interface GetUsersResponseDataItem {
|
|
165
|
+
/** An ID that identifies the user. */
|
|
166
|
+
id?: string | undefined;
|
|
167
|
+
/** The user's login name. */
|
|
168
|
+
login?: string | undefined;
|
|
169
|
+
/** The user's display name. */
|
|
170
|
+
display_name?: string | undefined;
|
|
171
|
+
/** The type of user. Possible values: - `admin`: Twitch administrator - `global_mod` - `staff`: Twitch staff - `(empty string value provided in field)`: Normal user */
|
|
172
|
+
type?: string | undefined;
|
|
173
|
+
/** The type of broadcaster. Possible values: - `affiliate`: An [affiliate broadcaster](https://help.twitch.tv/s/article/joining-the-affiliate-program) - `partner`: [A partner broadcaster](https://help.twitch.tv/s/article/partner-program-overview) - `(empty string value provided in field)`: A normal broadcaster */
|
|
174
|
+
broadcaster_type?: string | undefined;
|
|
175
|
+
/** The user's description of their channel. */
|
|
176
|
+
description?: string | undefined;
|
|
177
|
+
/** A URL to the user's profile image. */
|
|
178
|
+
profile_image_url?: string | undefined;
|
|
179
|
+
/** A URL to the user's offline image. */
|
|
180
|
+
offline_image_url?: string | undefined;
|
|
181
|
+
/** The number of times the user's channel has been viewed. **NOTE**: This field has been deprecated (see [Get Users API endpoint - "view_count" deprecation](https://discuss.dev.twitch.tv/t/get-users-api-endpoint-view-count-deprecation/37777)). Any data in this field is not valid and should not be used. */
|
|
182
|
+
view_count?: number | undefined;
|
|
183
|
+
/** The user's verified email address. The object includes this field only for the user in the user access token, and only if the token includes the **user:read:email** scope and the user has verified their email address. */
|
|
184
|
+
email?: string | undefined;
|
|
185
|
+
/** The UTC date and time that the user's account was created. The timestamp is in RFC3339 format. */
|
|
186
|
+
created_at?: string | undefined;
|
|
187
|
+
}
|
|
188
|
+
/** The list of users. The list doesn't include deleted or suspended accounts. */
|
|
189
|
+
export type GetUsersResponseDataList = Array<GetUsersResponseDataItem>;
|
|
190
|
+
export interface GetUsersResponse {
|
|
191
|
+
/** The list of users. The list doesn't include deleted or suspended accounts. */
|
|
192
|
+
data?: GetUsersResponseDataList | undefined;
|
|
193
|
+
}
|
|
194
|
+
export interface UnblockUserRequest {
|
|
195
|
+
/** The ID of the user to remove from the broadcaster's list of blocked users. The API ignores the request if the broadcaster hasn't blocked the user. */
|
|
196
|
+
target_user_id: string;
|
|
197
|
+
}
|
|
198
|
+
export interface UnblockUserResponse {
|
|
199
|
+
}
|
|
200
|
+
export interface UpdateUserRequest {
|
|
201
|
+
/** The string to update the channel's description to. The description is limited to a maximum of 300 characters. Before it checks the length and saves the description, the API removes line breaks and replaces each `<` and `>` with `<` and `>`. To remove the description, specify this parameter but don't set it's value (for example, '?description='). */
|
|
202
|
+
description?: string | undefined;
|
|
203
|
+
}
|
|
204
|
+
export interface UpdateUserResponseDataItem {
|
|
205
|
+
/** An ID that identifies the user. */
|
|
206
|
+
id?: string | undefined;
|
|
207
|
+
/** The user's login name. */
|
|
208
|
+
login?: string | undefined;
|
|
209
|
+
/** The user's display name. */
|
|
210
|
+
display_name?: string | undefined;
|
|
211
|
+
/** The type of user. Possible values: - `admin`: Twitch administrator - `global_mod` - `staff`: Twitch staff - `(empty string value provided in field)`: Normal user */
|
|
212
|
+
type?: string | undefined;
|
|
213
|
+
/** The type of broadcaster. Possible values: - `affiliate`: An [affiliate broadcaster](https://help.twitch.tv/s/article/joining-the-affiliate-program) - `partner`: A [partner broadcaster](https://help.twitch.tv/s/article/partner-program-overview) - `(empty string value provided in field)`: A normal broadcaster */
|
|
214
|
+
broadcaster_type?: string | undefined;
|
|
215
|
+
/** The user's description of their channel. */
|
|
216
|
+
description?: string | undefined;
|
|
217
|
+
/** A URL to the user's profile image. */
|
|
218
|
+
profile_image_url?: string | undefined;
|
|
219
|
+
/** A URL to the user's offline image. */
|
|
220
|
+
offline_image_url?: string | undefined;
|
|
221
|
+
/** The number of times the user's channel has been viewed. **NOTE**: This field has been deprecated (see [Get Users API endpoint - "view_count" deprecation](https://discuss.dev.twitch.tv/t/get-users-api-endpoint-view-count-deprecation/37777)). Any data in this field is not valid and should not be used. */
|
|
222
|
+
view_count?: number | undefined;
|
|
223
|
+
/** The user's verified email address. The object includes this field only if the user access token includes the **user:read:email** scope. If the request contains more than one user, only the user associated with the access token that provided consent will include an email address -- the email address for all other users will be empty. */
|
|
224
|
+
email?: string | undefined;
|
|
225
|
+
/** The UTC date and time that the user's account was created. The timestamp is in RFC3339 format. */
|
|
226
|
+
created_at?: string | undefined;
|
|
227
|
+
}
|
|
228
|
+
/** A list contains the single user that you updated. */
|
|
229
|
+
export type UpdateUserResponseDataList = Array<UpdateUserResponseDataItem>;
|
|
230
|
+
export interface UpdateUserResponse {
|
|
231
|
+
/** A list contains the single user that you updated. */
|
|
232
|
+
data?: UpdateUserResponseDataList | undefined;
|
|
233
|
+
}
|
|
234
|
+
export interface UpdateUserExtensionsRequest {
|
|
235
|
+
/** The extensions to update. The *data* field is a dictionary of extension types. The dictionary's possible keys are: panel, overlay, or component. The key's value is a dictionary of extensions. For the extension's dictionary, the key is a sequential number beginning with 1. For panel and overlay extensions, the key's value is an object that contains the following fields: `active` (true/false), `id` (the extension's ID), and `version` (the extension's version). For component extensions, the key's value includes the above fields plus the `x` and `y` fields, which identify the coordinate where the extension is placed. */
|
|
236
|
+
data: unknown;
|
|
237
|
+
}
|
|
238
|
+
export interface UpdateUserExtensionsResponseDataPanelValue {
|
|
239
|
+
/** A Boolean value that determines the extension's activation state. If **false**, the user has not configured a panel extension. */
|
|
240
|
+
active?: boolean | undefined;
|
|
241
|
+
/** An ID that identifies the extension. */
|
|
242
|
+
id?: string | undefined;
|
|
243
|
+
/** The extension's version. */
|
|
244
|
+
version?: string | undefined;
|
|
245
|
+
/** The extension's name. */
|
|
246
|
+
name?: string | undefined;
|
|
247
|
+
}
|
|
248
|
+
/** A dictionary that contains the data for a panel extension. The dictionary's key is a sequential number beginning with 1. The following fields contain the panel's data for each key. */
|
|
249
|
+
export type UpdateUserExtensionsResponseDataPanelMap = {
|
|
250
|
+
[key: string]: UpdateUserExtensionsResponseDataPanelValue | undefined;
|
|
251
|
+
};
|
|
252
|
+
export interface UpdateUserExtensionsResponseDataOverlayValue {
|
|
253
|
+
/** A Boolean value that determines the extension's activation state. If **false**, the user has not configured an overlay extension. */
|
|
254
|
+
active?: boolean | undefined;
|
|
255
|
+
/** An ID that identifies the extension. */
|
|
256
|
+
id?: string | undefined;
|
|
257
|
+
/** The extension's version. */
|
|
258
|
+
version?: string | undefined;
|
|
259
|
+
/** The extension's name. */
|
|
260
|
+
name?: string | undefined;
|
|
261
|
+
}
|
|
262
|
+
/** A dictionary that contains the data for a video-overlay extension. The dictionary's key is a sequential number beginning with 1. The following fields contain the overlay's data for each key. */
|
|
263
|
+
export type UpdateUserExtensionsResponseDataOverlayMap = {
|
|
264
|
+
[key: string]: UpdateUserExtensionsResponseDataOverlayValue | undefined;
|
|
265
|
+
};
|
|
266
|
+
export interface UpdateUserExtensionsResponseDataComponentValue {
|
|
267
|
+
/** A Boolean value that determines the extension's activation state. If **false**, the user has not configured a component extension. */
|
|
268
|
+
active?: boolean | undefined;
|
|
269
|
+
/** An ID that identifies the extension. */
|
|
270
|
+
id?: string | undefined;
|
|
271
|
+
/** The extension's version. */
|
|
272
|
+
version?: string | undefined;
|
|
273
|
+
/** The extension's name. */
|
|
274
|
+
name?: string | undefined;
|
|
275
|
+
/** The x-coordinate where the extension is placed. */
|
|
276
|
+
x?: number | undefined;
|
|
277
|
+
/** The y-coordinate where the extension is placed. */
|
|
278
|
+
y?: number | undefined;
|
|
279
|
+
}
|
|
280
|
+
/** A dictionary that contains the data for a video-component extension. The dictionary's key is a sequential number beginning with 1. The following fields contain the component's data for each key. */
|
|
281
|
+
export type UpdateUserExtensionsResponseDataComponentMap = {
|
|
282
|
+
[key: string]: UpdateUserExtensionsResponseDataComponentValue | undefined;
|
|
283
|
+
};
|
|
284
|
+
/** The extensions that the broadcaster updated. */
|
|
285
|
+
export interface UpdateUserExtensionsResponseData {
|
|
286
|
+
/** A dictionary that contains the data for a panel extension. The dictionary's key is a sequential number beginning with 1. The following fields contain the panel's data for each key. */
|
|
287
|
+
panel?: UpdateUserExtensionsResponseDataPanelMap | undefined;
|
|
288
|
+
/** A dictionary that contains the data for a video-overlay extension. The dictionary's key is a sequential number beginning with 1. The following fields contain the overlay's data for each key. */
|
|
289
|
+
overlay?: UpdateUserExtensionsResponseDataOverlayMap | undefined;
|
|
290
|
+
/** A dictionary that contains the data for a video-component extension. The dictionary's key is a sequential number beginning with 1. The following fields contain the component's data for each key. */
|
|
291
|
+
component?: UpdateUserExtensionsResponseDataComponentMap | undefined;
|
|
292
|
+
}
|
|
293
|
+
export interface UpdateUserExtensionsResponse {
|
|
294
|
+
/** The extensions that the broadcaster updated. */
|
|
295
|
+
data?: UpdateUserExtensionsResponseData | undefined;
|
|
296
|
+
}
|
|
297
|
+
export type BlockUserError = TwitchOpError;
|
|
298
|
+
/** Block User Blocks the specified user from interacting with or having contact with the broadcaster. The User ID in the OAuth token identifies the broadcaster who is blocking the user. To learn more about blocking users, see [Block Other Users on Twitch](https://help.twitch.tv/s/article/how-to-manage-harassment-in-chat?language=en_US#BlockWhispersandMessagesfromStrangers). Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **user:manage:blocked_users** scope. Reference: https://dev.twitch.tv/docs/api/reference/users/#block-user */
|
|
299
|
+
export declare const blockUser: API.OperationMethod<BlockUserRequest, BlockUserResponse, BlockUserError, TwitchOpContext>;
|
|
300
|
+
export type GetAuthorizationByUserError = TwitchOpError;
|
|
301
|
+
/** Get Authorization By User Gets the authorization scopes that the specified user(s) have granted the application. Authorization: Requires one of the following: - An [app access token](https://dev.twitch.tv/docs/authentication.md#app-access-tokens). Reference: https://dev.twitch.tv/docs/api/reference/users/#get-authorization-by-user */
|
|
302
|
+
export declare const getAuthorizationByUser: API.OperationMethod<GetAuthorizationByUserRequest, GetAuthorizationByUserResponse, GetAuthorizationByUserError, TwitchOpContext>;
|
|
303
|
+
export type GetUserActiveExtensionsError = TwitchOpError;
|
|
304
|
+
/** Get User Active Extensions Gets the active extensions that the broadcaster has installed for each configuration. > **Note** An active extension version that isn't released (for example, one in Hosted Test) is included only > if you specify a user access token and that user is on the version's Testing Account Allowlist. > The account that created the version is on the allowlist automatically, and no scope is required. > If the version isn't included, its slot contains only the `active` field, set to **false**. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens). - An [app access token](https://dev.twitch.tv/docs/authentication.md#app-access-tokens). Reference: https://dev.twitch.tv/docs/api/reference/users/#get-user-active-extensions */
|
|
305
|
+
export declare const getUserActiveExtensions: API.OperationMethod<GetUserActiveExtensionsRequest, GetUserActiveExtensionsResponse, GetUserActiveExtensionsError, TwitchOpContext>;
|
|
306
|
+
export type GetUserBlockListError = TwitchOpError;
|
|
307
|
+
/** Get User Block List Gets the list of users that the broadcaster has blocked. [Read More](https://help.twitch.tv/s/article/how-to-manage-harassment-in-chat?language=en_US#BlockWhispersandMessagesfromStrangers) Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **user:read:blocked_users** or **user:manage:blocked_users** scope. Reference: https://dev.twitch.tv/docs/api/reference/users/#get-user-block-list */
|
|
308
|
+
export declare const getUserBlockList: API.PaginatedOperationMethod<GetUserBlockListRequest, GetUserBlockListResponse, GetUserBlockListError, TwitchOpContext, GetUserBlockListResponseDataItem>;
|
|
309
|
+
export type GetUserExtensionsError = TwitchOpError;
|
|
310
|
+
/** Get User Extensions Gets a list of all extensions (both active and inactive) that the broadcaster has installed. The user ID in the access token identifies the broadcaster. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **user:read:broadcast**, **user:edit:broadcast**, or **channel:manage:extensions** scope. Reference: https://dev.twitch.tv/docs/api/reference/users/#get-user-extensions */
|
|
311
|
+
export declare const getUserExtensions: API.OperationMethod<GetUserExtensionsRequest, GetUserExtensionsResponse, GetUserExtensionsError, TwitchOpContext>;
|
|
312
|
+
export type GetUsersError = TwitchOpError;
|
|
313
|
+
/** Get Users Gets information about one or more users. You may look up users using their user ID, login name, or both but the sum total of the number of users you may look up is 100. For example, you may specify 50 IDs and 50 names or 100 IDs or names, but you cannot specify 100 IDs and 100 names.<br><br> If you don't specify IDs or login names, the request returns information about the user in the access token if you specify a user access token.<br><br> To include the user's verified email address in the response, you must use a user access token that includes the **user:read:email** scope. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens). - An [app access token](https://dev.twitch.tv/docs/authentication.md#app-access-tokens). Reference: https://dev.twitch.tv/docs/api/reference/users/#get-users */
|
|
314
|
+
export declare const getUsers: API.OperationMethod<GetUsersRequest, GetUsersResponse, GetUsersError, TwitchOpContext>;
|
|
315
|
+
export type UnblockUserError = TwitchOpError;
|
|
316
|
+
/** Unblock User Removes the user from the broadcaster's list of blocked users. The user ID in the OAuth token identifies the broadcaster who's removing the block. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **user:manage:blocked_users** scope. Reference: https://dev.twitch.tv/docs/api/reference/users/#unblock-user */
|
|
317
|
+
export declare const unblockUser: API.OperationMethod<UnblockUserRequest, UnblockUserResponse, UnblockUserError, TwitchOpContext>;
|
|
318
|
+
export type UpdateUserError = TwitchOpError;
|
|
319
|
+
/** Update User Updates the specified user's information. The user ID in the OAuth token identifies the user whose information you want to update. To include the user's verified email address in the response, the user access token must also include the **user:read:email** scope. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **user:edit** scope. Reference: https://dev.twitch.tv/docs/api/reference/users/#update-user */
|
|
320
|
+
export declare const updateUser: API.OperationMethod<UpdateUserRequest, UpdateUserResponse, UpdateUserError, TwitchOpContext>;
|
|
321
|
+
export type UpdateUserExtensionsError = TwitchOpError;
|
|
322
|
+
/** Update User Extensions Updates an installed extension's information. You can update the extension's activation state, ID, and version number. The User ID in the access token identifies the broadcaster whose extensions you're updating. > **Note** If you try to activate an extension under multiple extension types, the last write wins (and there is no guarantee of write order). Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **user:edit:broadcast** or **channel:manage:extensions** scope. Reference: https://dev.twitch.tv/docs/api/reference/users/#update-user-extensions */
|
|
323
|
+
export declare const updateUserExtensions: API.OperationMethod<UpdateUserExtensionsRequest, UpdateUserExtensionsResponse, UpdateUserExtensionsError, TwitchOpContext>;
|
|
324
|
+
//# sourceMappingURL=users.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.d.ts","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B,gBAAgB,EAChB,eAAe,CAUd,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC;AAC5C,+gBAA+gB;AAC/gB,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,eAAe,CAC1C,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,eAAe,CAUd,CAAC;AAEJ,MAAM,MAAM,yBAAyB,GAAG,aAAa,CAAC;AACtD,2qBAA2qB;AAC3qB,eAAO,MAAM,oBAAoB,EAAE,GAAG,CAAC,eAAe,CACpD,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,eAAe,CAUd,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Gc as e,Hc as t,Jc as n,Kc as r,Pc as i,Rc as a,Wc as o,Xc as s,a as c,b as l,errors$TwitchServiceErrors as u,l as d,n as f,o as p,pagination$paginateCursor as m,protocol$TwitchProtocol as h,retry$Retry as g,traits$Http as _,traits$Query as v,wc as y,xc as b}from"../_bundle/sdk.js";const x={system:`twitch-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Twitch`,service:`Users`,propagate:`w3c`};const S=/*@__PURE__*/ f(e=>e===c?d(`BlockUser`,`{input:#1,output:#7:0,errors:[],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$6(>2)@"%Request";$5({target_user_id:$3.pipe($2()),source_context:$4($3.pipe($2())),reason:$4($3.pipe($2()))}).pipe($1({method:"PUT",uri:"/users/blocks",code:200}))`,[a,_,v,n,o,r,s,__d0,u,h,g,x]):l(S,e));const C=/*@__PURE__*/ f(e=>e===c?d(`GetAuthorizationByUser`,`{input:#1,output:#4,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$5(>5)@"%Request";$5(>6)@"%ResponseDataItem";$9(#2);$5(>7)@"%Response";$4({user_id:#3:0.pipe($2())}).pipe($1({method:"GET",uri:"/authorization/users",code:200}));$4({user_id:$7($6),user_name:$7($6),user_login:$7($6),scopes:$7(#3:0),has_authorized:$7($8)});$4({data:$7(#3)})`,[a,_,v,__d1,r,s,n,o,b,y,u,h,g,x]):l(C,e));const w=/*@__PURE__*/ f(e=>e===c?d(`GetUserActiveExtensions`,`{input:#1,output:#7:5,errors:[],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$6(>2)@"%Request";$5({user_id:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/users/extensions",code:200}))`,[a,_,v,n,o,r,s,__d2,u,h,g,x]):l(w,e));const T=/*@__PURE__*/ p(t=>t===c?d(`GetUserBlockList`,`{input:#1,output:#5,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%",pagination:{mode:"cursor",inputToken:"after",outputToken:"pagination.cursor",items:"data",pageSize:"first"},strategy:$14};$8(>6)@"%Request";$8(>7)@"%ResponseDataItem";$9(#2);$8(>8)@"%ResponsePagination";$8(>9)@"%Response";$7({broadcaster_id:$3.pipe($2()),user_id:$5(#4:0.pipe($2())),first:$5($6.pipe($2())),after:$5($3.pipe($2()))}).pipe($1({method:"GET",uri:"/users/blocks",code:200}));$7({user_id:$5($3),user_login:$5($3),display_name:$5($3)});$7({cursor:$5($3)});$7({data:#3,pagination:$5(#4)})`,[a,_,v,n,__d1,o,e,r,s,y,u,h,g,x,m]):l(T,t));const E=/*@__PURE__*/ f(e=>e===c?d(`GetUserExtensions`,`{input:#1,output:#4,errors:[],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$3(>5)@"%Request";$3(>6)@"%ResponseDataItem";$8(#2);$3(>7)@"%Response";$2({}).pipe($1({method:"GET",uri:"/users/extensions/list",code:200}));$2({id:$5($4),version:$5($4),name:$5($4),can_activate:$5($6),type:$5(#7:0)});$2({data:$5(#3)})`,[a,_,r,s,n,o,b,__d1,y,u,h,g,x]):l(E,e));const D=/*@__PURE__*/ f(e=>e===c?d(`GetUsers`,`{input:#1,output:#7:2,errors:[],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$6(>2)@"%Request";$5({id:$4(#3:0.pipe($2())),login:$4(#3:0.pipe($2()))}).pipe($1({method:"GET",uri:"/users",code:200}))`,[a,_,v,__d1,o,r,s,__d3,u,h,g,x]):l(D,e));const O=/*@__PURE__*/ f(e=>e===c?d(`UnblockUser`,`{input:#1,output:#6:0,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>2)@"%Request";$4({target_user_id:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/users/blocks",code:200}))`,[a,_,v,n,r,s,__d0,u,h,g,x]):l(O,e));const k=/*@__PURE__*/ f(e=>e===c?d(`UpdateUser`,`{input:#1,output:#7:2,errors:[],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$6(>2)@"%Request";$5({description:$4($3.pipe($2()))}).pipe($1({method:"PUT",uri:"/users",code:200}))`,[a,_,v,n,o,r,s,__d3,u,h,g,x]):l(k,e));const A=/*@__PURE__*/ f(e=>e===c?d(`UpdateUserExtensions`,`{input:#1,output:#5:5,errors:[],serviceErrors:$6,protocol:$7,retry:$8,telemetry:$9,span:"%"};$4(>2)@"%Request";$3({data:$2}).pipe($1({method:"PUT",uri:"/users/extensions",code:200}))`,[a,_,i,r,s,__d2,u,h,g,x]):l(A,e));function __d0(){return[`$2(>1)@"BlockUserResponse";$1({})`,[a,r,s]]}function __d1(){return[`$2($1)`,[a,n,y]]}function __d2(){return[`$5(>6)@"GetUserActiveExtensionsResponseDataPanelValue";$6($3,#0);$5(>7)@"GetUserActiveExtensionsResponseDataComponentValue";$6($3,#2);$5(>8)@"GetUserActiveExtensionsResponseData";$5(>9)@"GetUserActiveExtensionsResponse";$4({active:$2($1),id:$2($3),version:$2($3),name:$2($3)});$4({active:$2($1),id:$2($3),version:$2($3),name:$2($3),x:$2($7),y:$2($7)});$4({panel:$2(#1),overlay:$2(#1),component:$2(#3)});$4({data:$2(#4)})`,[a,b,o,n,r,s,t,e]]}function __d3(){return[`$5(>3)@"GetUsersResponseDataItem";$6(#0);$5(>4)@"GetUsersResponse";$4({id:$2($1),login:$2($1),display_name:$2($1),type:$2($1),broadcaster_type:$2($1),description:$2($1),profile_image_url:$2($1),offline_image_url:$2($1),view_count:$2($3),email:$2($1),created_at:$2($1)});$4({data:$2(#1)})`,[a,n,o,e,r,s,y]]}export{S as blockUser,C as getAuthorizationByUser,w as getUserActiveExtensions,T as getUserBlockList,E as getUserExtensions,D as getUsers,O as unblockUser,k as updateUser,A as updateUserExtensions};
|
|
2
|
+
//# sourceMappingURL=users.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.js","names":["API.D","API.named","__L.at","T.Http","T.Query","S.String","S.optional","S.Struct","S.suspend","Retry.Retry","API.call","S.Boolean","S.Array","S.Number","S.Unknown","S.Record","Number","Record","String","Struct","Unknown","at","optional","suspend","D","call","TwitchServiceErrors","named","op","opPaginated","paginateCursor","TwitchProtocol","Retry","Http","Query","Array","Boolean","TELEMETRY","blockUser","i","getAuthorizationByUser","getUserActiveExtensions","getUserBlockList","getUserExtensions","getUsers","unblockUser","updateUser","updateUserExtensions"],"sources":["../../src/services/users.ts"],"mappings":"kSAaA,MAAMqC,EAAY,CAChB,OAAQ,aACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,SACR,QAAS,QACT,UAAW,KACb,EAsSA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAMvC,EAAQC,EAAU,YAAa,sQAAuQ,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAYC,EAAUC,EAAW,KAAMkB,EAAqBK,EAAgBtB,EAAa4B,CAAS,CAAC,EAAI3B,EAAS4B,EAAWC,CAAC,CAAC,EAIvf,MAAaC,EAKK,g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EAAa4B,CAAS,CAAC,EAAI3B,EAASmC,EAAaN,CAAC,CAAC,EAIvb,MAAaO,EAKK,gBAAQ,GAAgBP,IAAMvC,EAAQC,EAAU,aAAc,sMAAuM,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAYC,EAAUC,EAAW,KAAMkB,EAAqBK,EAAgBtB,EAAa4B,CAAS,CAAC,EAAI3B,EAASoC,EAAYP,CAAC,CAAC,EAIzb,MAAaQ,EAKK,gBAAQ,GAAgBR,IAAMvC,EAAQC,EAAU,uBAAwB,yLAA0L,CAACC,EAAQC,EAAQW,EAAWP,EAAUC,EAAW,KAAMkB,EAAqBK,EAAgBtB,EAAa4B,CAAS,CAAC,EAAI3B,EAASqC,EAAsBR,CAAC,CAAC,EAM5a,SAAS,MAAY,CACnB,MAAO,CAAC,oCAAqC,CAACrC,EAAQK,EAAUC,CAAS,CAAC,CAC5E,CACA,SAAS,MAAY,CACnB,MAAO,CAAC,SAAU,CAACN,EAAQG,EAAUO,CAAO,CAAC,CAC/C,CACA,SAAS,MAAY,CACnB,MAAO,CAAC,uaAAwa,CAACV,EAAQS,EAAWL,EAAYD,EAAUE,EAAUC,EAAWO,EAAUF,CAAQ,CAAC,CACpgB,CACA,SAAS,MAAY,CACnB,MAAO,CAAC,kSAAmS,CAACX,EAAQG,EAAUC,EAAYO,EAAUN,EAAUC,EAAWI,CAAO,CAAC,CACnX"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import { type TwitchOpError, type TwitchOpContext } from "../protocol.ts";
|
|
3
|
+
export type { TwitchOpError, TwitchOpContext };
|
|
4
|
+
export type DeleteVideosRequestIdList = Array<string>;
|
|
5
|
+
export interface DeleteVideosRequest {
|
|
6
|
+
/** The list of videos to delete. To specify more than one video, include the *id* parameter for each video to delete. For example, 'id=1234&id=5678'. You can delete a maximum of 5 videos per request. If any ID doesn't identify a video that the user has permission to delete, none of the videos are deleted. */
|
|
7
|
+
id: DeleteVideosRequestIdList;
|
|
8
|
+
}
|
|
9
|
+
/** The list of IDs of the videos that were deleted. */
|
|
10
|
+
export type DeleteVideosResponseDataList = Array<string>;
|
|
11
|
+
export interface DeleteVideosResponse {
|
|
12
|
+
/** The list of IDs of the videos that were deleted. */
|
|
13
|
+
data?: DeleteVideosResponseDataList | undefined;
|
|
14
|
+
}
|
|
15
|
+
export type GetVideosRequestIdList = Array<string>;
|
|
16
|
+
export interface GetVideosRequest {
|
|
17
|
+
/** A list of IDs that identify the videos you want to get. To get more than one video, include this parameter for each video you want to get. For example, 'id=1234&id=5678'. You may specify a maximum of 100 IDs. The endpoint ignores duplicate IDs and IDs that weren't found. The *id*, *user_id*, and *game_id* parameters are mutually exclusive. */
|
|
18
|
+
id?: GetVideosRequestIdList | undefined;
|
|
19
|
+
/** The ID of the user whose list of videos you want to get. The *id*, *user_id*, and *game_id* parameters are mutually exclusive. */
|
|
20
|
+
user_id?: string | undefined;
|
|
21
|
+
/** A category or game ID. The response contains a maximum of 500 videos that show this content. To get category/game IDs, use the [Search Categories](https://dev.twitch.tv/docs/api/reference/search.md#search-categories) endpoint. The *id*, *user_id*, and *game_id* parameters are mutually exclusive. */
|
|
22
|
+
game_id?: string | undefined;
|
|
23
|
+
/** A filter used to filter the list of videos by the language that the video owner broadcasts in. For example, to get videos that were broadcast in German, set this parameter to the ISO 639-1 two-letter code for German (i.e., DE). For a list of supported languages, see [Supported Stream Language](https://help.twitch.tv/s/article/languages-on-twitch#streamlang). If the language is not supported, use "other." To filter by more than one language, separate the codes with commas (for example, de,en). Specify this parameter only if you specify the *game_id* or *user_id* query parameter. If you specify *game_id* but not *language*, the API filters by the first language in the request's Accept-Language header, if the request includes one. */
|
|
24
|
+
language?: string | undefined;
|
|
25
|
+
/** A filter used to filter the list of videos by when they were created. For example, videos created in the last week. The default is *all*. Possible values: - `all` - `day` - `month` - `week` */
|
|
26
|
+
period?: string | undefined;
|
|
27
|
+
/** The order to sort the returned videos in. The default is *time*. Possible values: - `time`: Sort the results in descending order by when they were created (i.e., latest video first). If you specify *user_id*, the API sorts by when the videos were published, or by when they were created if they weren't published. - `trending`: Sort the results in descending order by biggest gains in viewership (i.e., highest trending video first). - `views`: Sort the results in descending order by most views (i.e., highest number of views first). */
|
|
28
|
+
sort?: string | undefined;
|
|
29
|
+
/** A filter used to filter the list of videos by the video's type. The default is *all*. Possible values: - `all` - `archive`: On-demand videos (VODs) of past streams. - `highlight`: Highlight reels of past streams. - `upload`: External videos that the broadcaster uploaded using the Video Producer. */
|
|
30
|
+
type?: string | undefined;
|
|
31
|
+
/** The maximum number of items to return per page in the response. The minimum page size is 1 item per page and the maximum is 100. The default is 20. Specify this parameter only if you specify the *game_id* or *user_id* query parameter. */
|
|
32
|
+
first?: number | undefined;
|
|
33
|
+
/** The cursor used to get the next page of results. The **Pagination** object in the response contains the cursor's value. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) Specify this parameter only if you specify the *game_id* or *user_id* query parameter. */
|
|
34
|
+
after?: string | undefined;
|
|
35
|
+
/** The cursor used to get the previous page of results. The **Pagination** object in the response contains the cursor's value. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) Specify this parameter only if you specify the *game_id* or *user_id* query parameter. */
|
|
36
|
+
before?: string | undefined;
|
|
37
|
+
}
|
|
38
|
+
export interface GetVideosResponseDataItemMutedSegmentsItem {
|
|
39
|
+
/** The duration of the muted segment, in seconds. */
|
|
40
|
+
duration?: number | undefined;
|
|
41
|
+
/** The offset, in seconds, from the beginning of the video to where the muted segment begins. */
|
|
42
|
+
offset?: number | undefined;
|
|
43
|
+
}
|
|
44
|
+
/** The segments that Twitch Audio Recognition muted; otherwise, **null**. Always **null** if you use an app access token. */
|
|
45
|
+
export type GetVideosResponseDataItemMutedSegmentsList = Array<GetVideosResponseDataItemMutedSegmentsItem>;
|
|
46
|
+
export interface GetVideosResponseDataItem {
|
|
47
|
+
/** An ID that identifies the video. */
|
|
48
|
+
id?: string | undefined;
|
|
49
|
+
/** The ID of the stream that the video originated from if the video's type is "archive;" otherwise, **null**. */
|
|
50
|
+
stream_id?: string | undefined;
|
|
51
|
+
/** The ID of the broadcaster that owns the video. */
|
|
52
|
+
user_id?: string | undefined;
|
|
53
|
+
/** The broadcaster's login name. */
|
|
54
|
+
user_login?: string | undefined;
|
|
55
|
+
/** The broadcaster's display name. */
|
|
56
|
+
user_name?: string | undefined;
|
|
57
|
+
/** The video's title. */
|
|
58
|
+
title?: string | undefined;
|
|
59
|
+
/** The video's description. */
|
|
60
|
+
description?: string | undefined;
|
|
61
|
+
/** The date and time, in UTC, of when the video was created. The timestamp is in RFC3339 format. */
|
|
62
|
+
created_at?: string | undefined;
|
|
63
|
+
/** The date and time, in UTC, of when the video was published. The timestamp is in RFC3339 format. */
|
|
64
|
+
published_at?: string | null | undefined;
|
|
65
|
+
/** The video's URL. */
|
|
66
|
+
url?: string | undefined;
|
|
67
|
+
/** A URL to a thumbnail image of the video. Before using the URL, you must replace the '%{width}' and '%{height}' placeholders with the width and height of the thumbnail you want returned. Due to current limitations, '${width}' must be 320 and '${height}' must be 180. */
|
|
68
|
+
thumbnail_url?: string | undefined;
|
|
69
|
+
/** The video's viewable state. Always set to **public**. */
|
|
70
|
+
viewable?: string | undefined;
|
|
71
|
+
/** The number of times that users have watched the video. */
|
|
72
|
+
view_count?: number | undefined;
|
|
73
|
+
/** The ISO 639-1 two-letter language code that the video was broadcast in. For example, the language code is DE if the video was broadcast in German. For a list of supported languages, see [Supported Stream Language](https://help.twitch.tv/s/article/languages-on-twitch#streamlang). The language value is "other" if the video was broadcast in a language not in the list of supported languages. */
|
|
74
|
+
language?: string | undefined;
|
|
75
|
+
/** The video's type. Possible values: - `archive`: An on-demand video (VOD) of one of the broadcaster's past streams. - `highlight`: A highlight reel of one of the broadcaster's past streams. See [Creating Highlights](https://help.twitch.tv/s/article/creating-highlights-and-stream-markers). - `upload`: A video that the broadcaster uploaded to their video library. See Upload under [Video Producer](https://help.twitch.tv/s/article/video-on-demand?language=en_US#videoproducer). - `past_premiere`: A past Premiere. Returned only when you get videos by *id*. - `premiere_upload`: A video uploaded for a Premiere. Returned only when you get videos by *id*. */
|
|
76
|
+
type?: string | undefined;
|
|
77
|
+
/** The video's length in hours (h), minutes (m), and seconds (s), with leading zero units left out. For example, 3m21s represents 3 minutes, 21 seconds, and 1h0m5s represents 1 hour, 5 seconds. */
|
|
78
|
+
duration?: string | undefined;
|
|
79
|
+
/** The segments that Twitch Audio Recognition muted; otherwise, **null**. Always **null** if you use an app access token. */
|
|
80
|
+
muted_segments?: GetVideosResponseDataItemMutedSegmentsList | null | undefined;
|
|
81
|
+
}
|
|
82
|
+
/** The list of published videos that match the filter criteria. The list is always empty if the request comes from a region where videos aren't available. */
|
|
83
|
+
export type GetVideosResponseDataList = Array<GetVideosResponseDataItem>;
|
|
84
|
+
/** Contains the information used to page through the list of results. The object is empty if the page has no videos, if you get videos by *id*, or if you specify *game_id* and reach the 500-video limit. The last page of results may still include a cursor; the page after it is empty. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
|
|
85
|
+
export interface GetVideosResponsePagination {
|
|
86
|
+
/** The cursor used to get the next page of results. Use the cursor to set the request's *after* or *before* query parameter depending on whether you're paging forwards or backwards through the results. */
|
|
87
|
+
cursor?: string | undefined;
|
|
88
|
+
}
|
|
89
|
+
export interface GetVideosResponse {
|
|
90
|
+
/** The list of published videos that match the filter criteria. The list is always empty if the request comes from a region where videos aren't available. */
|
|
91
|
+
data: GetVideosResponseDataList;
|
|
92
|
+
/** Contains the information used to page through the list of results. The object is empty if the page has no videos, if you get videos by *id*, or if you specify *game_id* and reach the 500-video limit. The last page of results may still include a cursor; the page after it is empty. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination) */
|
|
93
|
+
pagination?: GetVideosResponsePagination | undefined;
|
|
94
|
+
}
|
|
95
|
+
export type DeleteVideosError = TwitchOpError;
|
|
96
|
+
/** Delete Videos You may delete past broadcasts, highlights, or uploads. The user in the access token must own the videos or be an editor for the channel that owns them. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:manage:videos** scope. Reference: https://dev.twitch.tv/docs/api/reference/videos/#delete-videos */
|
|
97
|
+
export declare const deleteVideos: API.OperationMethod<DeleteVideosRequest, DeleteVideosResponse, DeleteVideosError, TwitchOpContext>;
|
|
98
|
+
export type GetVideosError = TwitchOpError;
|
|
99
|
+
/** Get Videos You may get videos by ID, by user, or by game/category. You must specify exactly one of the *id*, *user_id* and *game_id* query parameters; the request fails if you specify none of them or more than one. You may apply several filters to get a subset of the videos. The filters are applied as an AND operation to each video. For example, if *language* is set to **de** and *game_id* is set to 21779, the response includes only videos that show playing League of Legends by users that stream in German. The filters apply only if you get videos by user ID or game ID. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens). - An [app access token](https://dev.twitch.tv/docs/authentication.md#app-access-tokens). Reference: https://dev.twitch.tv/docs/api/reference/videos/#get-videos */
|
|
100
|
+
export declare const getVideos: API.PaginatedOperationMethod<GetVideosRequest, GetVideosResponse, GetVideosError, TwitchOpContext, GetVideosResponseDataItem>;
|
|
101
|
+
//# sourceMappingURL=videos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videos.d.ts","sources":["../../src/services/videos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAMjD,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAM1F,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAc/C,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AACtD,MAAM,WAAW,mBAAmB;IAClC,sTAAsT;IACtT,EAAE,EAAE,yBAAyB,CAAC;CAC/B;AACD,uDAAuD;AACvD,MAAM,MAAM,4BAA4B,GAAG,KAAK,CAAC,MAAM,CAAC,C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AA8J;IAC9J,IAAI,EAAE,yBAAyB,CAAC;IAChC,+VAA+V;IAC/V,UAAU,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;CACtD;AACD,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAC9C,ibAAib;AACjb,eAAO,MAAM,YAAY,EAAE,GAAG,CAAC,eAAe,CAC5C,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,CAUd,CAAC;AAEJ,MAAM,MAAM,cAAc,GAAG,aAAa,CAAC;AAC3C,82BAA82B;AAC92B,eAAO,MAAM,SAAS,EAAE,GAAG,CAAC,wBAAwB,CAClD,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,yBAAyB,CAoBnB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Fc as e,Gc as t,Jc as n,Kc as r,Rc as i,Wc as a,Xc as o,a as s,b as c,errors$TwitchServiceErrors as l,l as u,n as d,o as f,pagination$paginateCursor as p,protocol$TwitchProtocol as m,retry$Retry as h,traits$Http as g,traits$Query as _,wc as v}from"../_bundle/sdk.js";const y={system:`twitch-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Twitch`,service:`Videos`,propagate:`w3c`};const b=/*@__PURE__*/ d(e=>e===s?u(`DeleteVideos`,`{input:#1,output:#2,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({id:#3:0.pipe($2())}).pipe($1({method:"DELETE",uri:"/videos",code:200}));$4({data:$6(#3:0)})`,[i,g,_,__d0,r,o,a,l,m,h,y]):c(b,e));const x=/*@__PURE__*/ f(d=>d===s?u(`GetVideosResponse`,`{input:#1,output:#7,errors:[],serviceErrors:$11,protocol:$12,retry:$13,telemetry:$14,span:"GetVideos",pagination:{mode:"cursor",inputToken:"after",outputToken:"pagination.cursor",items:"data",pageSize:"first"},strategy:$15};$7(>9)@"GetVideosRequest";$7(>10)@"%DataItemMutedSegmentsItem";$8(#2);$7(>11)@"%DataItem";$8(#4);$7(>12)@"%Pagination";$7(>13)@"%";$4($9.pipe($2()));$6({id:$4(#3:0.pipe($2())),user_id:~8,game_id:~8,language:~8,period:~8,sort:~8,type:~8,first:$4($5.pipe($2())),after:~8,before:~8}).pipe($1({method:"GET",uri:"/videos",code:200}));$6({duration:$4($5),offset:$4($5)});$6({id:$4($9),stream_id:$4($9),user_id:$4($9),user_login:$4($9),user_name:$4($9),title:$4($9),description:$4($9),created_at:$4($9),published_at:$4($10($9)),url:$4($9),thumbnail_url:$4($9),viewable:$4($9),view_count:$4($5),language:$4($9),type:$4($9),duration:$4($9),muted_segments:$4($10(#3))});$6({cursor:$4($9)});$6({data:#5,pagination:$4(#6)})`,[i,g,_,__d0,a,t,r,o,v,n,e,l,m,h,y,p]):c(x,d));function __d0(){return[`$2($1)`,[i,n,v]]}export{b as deleteVideos,x as getVideos};
|
|
2
|
+
//# sourceMappingURL=videos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videos.js","names":["API.D","API.named","__L.at","T.Http","T.Query","S.Struct","S.suspend","S.optional","Retry.Retry","API.call","S.Number","S.Array","S.String","S.NullOr","NullOr","Number","String","Struct","at","optional","suspend","D","call","TwitchServiceErrors","named","op","opPaginated","paginateCursor","TwitchProtocol","Retry","Http","Query","Array","TELEMETRY","deleteVideos","i","getVideos"],"sources":["../../src/services/videos.ts"],"mappings":"kRAaA,MAAMiC,EAAY,CAChB,OAAQ,aACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,SACR,QAAS,SACT,UAAW,KACb,EAgGA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAMnC,EAAQC,EAAU,eAAgB,mOAAoO,CAACC,EAAQC,EAAQC,EAAS,KAAMC,EAAUC,EAAWC,EAAYgB,EAAqBK,EAAgBpB,EAAayB,CAAS,CAAC,EAAIxB,EAASyB,EAAcC,CAAC,CAAC,EAIhd,MAAaC,EAMK,gBAAiB,GAAgBD,IAAMnC,EAAQC,EAAU,oBAAqB,06BAA26B,CAACC,EAAQC,EAAQC,EAAS,KAAMG,EAAYG,EAAUL,EAAUC,EAAWK,EAASC,EAAUC,EAAUU,EAAqBK,EAAgBpB,EAAayB,EAAWN,CAAc,CAAC,EAAIlB,EAAS2B,EAAWD,CAAC,CAAC,EAMztC,SAAS,MAAY,CACnB,MAAO,CAAC,SAAU,CAACjC,EAAQU,EAAUD,CAAO,CAAC,CAC/C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import { type TwitchOpError, type TwitchOpContext } from "../protocol.ts";
|
|
3
|
+
export type { TwitchOpError, TwitchOpContext };
|
|
4
|
+
export interface SendWhisperRequest {
|
|
5
|
+
/** The ID of the user sending the whisper. This user must have a verified phone number. This ID must match the user ID in the user access token. */
|
|
6
|
+
from_user_id: string;
|
|
7
|
+
/** The ID of the user to receive the whisper. */
|
|
8
|
+
to_user_id: string;
|
|
9
|
+
/** The whisper message to send. The message must not be empty. The maximum message lengths are: - 500 characters if the user you're sending the message to hasn't whispered you before. - 10,000 characters if the user you're sending the message to has whispered you before. Messages that exceed the maximum length are truncated. */
|
|
10
|
+
message: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SendWhisperResponse {
|
|
13
|
+
}
|
|
14
|
+
export type SendWhisperError = TwitchOpError;
|
|
15
|
+
/** Send Whisper NOTE: The user sending the whisper must have a verified phone number (see the **Phone Number** setting in your [Security and Privacy](https://www.twitch.tv/settings/security) settings). NOTE: The API may silently drop whispers that it suspects of violating Twitch policies. (The API does not indicate that it dropped the whisper; it returns a 204 status code as if it succeeded.) **Rate Limits**: You may whisper to a maximum of 40 unique recipients per day. Within the per day limit, you may whisper a maximum of 3 whispers per second and a maximum of 100 whispers per minute. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **user:manage:whispers** scope. Reference: https://dev.twitch.tv/docs/api/reference/whispers/#send-whisper */
|
|
16
|
+
export declare const sendWhisper: API.OperationMethod<SendWhisperRequest, SendWhisperResponse, SendWhisperError, TwitchOpContext>;
|
|
17
|
+
//# sourceMappingURL=whispers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whispers.d.ts","sources":["../../src/services/whispers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAKjD,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAM1F,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAc/C,MAAM,WAAW,kBAAkB;IACjC,oJAAoJ;IACpJ,YAAY,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,0UAA0U;IAC1U,OAAO,EAAE,MAAM,CAAC;CACjB;AACD,MAAM,WAAW,mBAAmB;CAAG;AACvC,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAC7C,y1BAAy1B;AACz1B,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,eAAe,CAC3C,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,CAUd,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Jc as e,Kc as t,Rc as n,Xc as r,a as i,b as a,errors$TwitchServiceErrors as o,l as s,n as c,protocol$TwitchProtocol as l,retry$Retry as u,traits$Http as d,traits$Query as f}from"../_bundle/sdk.js";const p={system:`twitch-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Twitch`,service:`Whispers`,propagate:`w3c`};const m=/*@__PURE__*/ c(c=>c===i?s(`SendWhisper`,`{input:#1,output:#2,errors:[],serviceErrors:$6,protocol:$7,retry:$8,telemetry:$9,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({from_user_id:$3.pipe($2()),to_user_id:$3.pipe($2()),message:$3}).pipe($1({method:"POST",uri:"/whispers",code:200}));$4({})`,[n,d,f,e,t,r,o,l,u,p]):a(m,c));export{m as sendWhisper};
|
|
2
|
+
//# sourceMappingURL=whispers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whispers.js","names":["API.D","API.named","__L.at","T.Http","T.Query","S.String","S.Struct","S.suspend","Retry.Retry","API.call","String","Struct","at","suspend","D","call","TwitchServiceErrors","named","op","TwitchProtocol","Retry","Http","Query","TELEMETRY","sendWhisper","i"],"sources":["../../src/services/whispers.ts"],"mappings":"4MAYA,MAAMuB,EAAY,CAChB,OAAQ,aACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,SACR,QAAS,WACT,UAAW,KACb,EAaA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAMzB,EAAQC,EAAU,cAAe,iQAAkQ,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAWS,EAAqBG,EAAgBX,EAAae,CAAS,CAAC,EAAId,EAASe,EAAaC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/ads.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/analytics.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/bits.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/ccls.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/channel_points.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/channels.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/charity.js";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{$L}from"../_bundle/lazy.js";
|
|
2
|
+
const{o:$o,e:$e}=/*@__PURE__*/$L("../services/chat.js","ooopoooooopoooooooo",11684,1869);
|
|
3
|
+
export const getChannelChatBadges=$o(),getChannelEmotes=$o(),getChatSettings=$o(),getChatters=$o(),getEmoteSets=$o(),getGlobalChatBadges=$o(),getGlobalEmotes=$o(),getPinnedChatMessage=$o(),getSharedChatSession=$o(),getUserChatColor=$o(),getUserEmotes=$o(),pinChatMessage=$o(),sendAShoutout=$o(),sendChatAnnouncement=$o(),sendChatMessage=$o(),unpinChatMessage=$o(),updateChatSettings=$o(),updatePinnedChatMessage=$o(),updateUserChatColor=$o();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/clips.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/conduits.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/entitlements.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/eventsub.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/extensions.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/games.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/goals.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../services/guest_star.js";
|