@distilled.cloud/twitch 0.0.0 → 1.0.0-rc.22
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,416 @@
|
|
|
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 CreateCustomRewardsRequest {
|
|
5
|
+
/** The ID of the broadcaster to add the custom reward to. This ID must match the user ID found in the OAuth token. */
|
|
6
|
+
broadcaster_id: string;
|
|
7
|
+
/** The custom reward's title. The title may contain a maximum of 45 characters and it must be unique (case-insensitive) amongst all of the broadcaster's custom rewards. */
|
|
8
|
+
title: string;
|
|
9
|
+
/** The cost of the reward, in Channel Points. The minimum is 1 point and the maximum is 1,000,000,000 points. */
|
|
10
|
+
cost: number;
|
|
11
|
+
/** The prompt shown to the viewer when they redeem the reward. Specify a prompt if *is_user_input_required* is **true**. */
|
|
12
|
+
prompt?: string | undefined;
|
|
13
|
+
/** A Boolean value that determines whether the reward is enabled. Viewers see only enabled rewards. The default is **true**. */
|
|
14
|
+
is_enabled?: boolean | undefined;
|
|
15
|
+
/** The background color to use for the reward. Specify the color using Hex format (for example, #9147FF). If you omit it or set it to an empty string, the reward gets a randomly chosen color. */
|
|
16
|
+
background_color?: string | undefined;
|
|
17
|
+
/** A Boolean value that determines whether the user needs to enter information when redeeming the reward. See the *prompt* field. The default is **false**. */
|
|
18
|
+
is_user_input_required?: boolean | undefined;
|
|
19
|
+
/** A Boolean value that determines whether to limit the maximum number of redemptions allowed per live stream (see the *max_per_stream* field). The default is **false**. */
|
|
20
|
+
is_max_per_stream_enabled?: boolean | undefined;
|
|
21
|
+
/** The maximum number of redemptions allowed per live stream. Applied only if *is_max_per_stream_enabled* is **true**. The minimum value is 1. */
|
|
22
|
+
max_per_stream?: number | undefined;
|
|
23
|
+
/** A Boolean value that determines whether to limit the maximum number of redemptions allowed per user per stream (see the *max_per_user_per_stream* field). The default is **false**. */
|
|
24
|
+
is_max_per_user_per_stream_enabled?: boolean | undefined;
|
|
25
|
+
/** The maximum number of redemptions allowed per user per stream. Applied only if *is_max_per_user_per_stream_enabled* is **true**. The minimum value is 1. */
|
|
26
|
+
max_per_user_per_stream?: number | undefined;
|
|
27
|
+
/** A Boolean value that determines whether to apply a cooldown period between redemptions (see the *global_cooldown_seconds* field for the duration of the cooldown period). The default is **false**. */
|
|
28
|
+
is_global_cooldown_enabled?: boolean | undefined;
|
|
29
|
+
/** The cooldown period, in seconds. Applied only if the *is_global_cooldown_enabled* field is **true**. The minimum value is 1; however, the minimum value is 60 for it to be shown in the Twitch UX. */
|
|
30
|
+
global_cooldown_seconds?: number | undefined;
|
|
31
|
+
/** A Boolean value that determines whether redemptions should be set to FULFILLED status immediately when a reward is redeemed. If **false**, status is set to UNFULFILLED and follows the normal request queue process. The default is **false**. */
|
|
32
|
+
should_redemptions_skip_request_queue?: boolean | undefined;
|
|
33
|
+
}
|
|
34
|
+
/** A set of custom images for the reward. This field is set to **null** if the broadcaster didn't upload images. */
|
|
35
|
+
export interface CreateCustomRewardsResponseDataItemImage {
|
|
36
|
+
/** The URL to a small version of the image. */
|
|
37
|
+
url_1x?: string | undefined;
|
|
38
|
+
/** The URL to a medium version of the image. */
|
|
39
|
+
url_2x?: string | undefined;
|
|
40
|
+
/** The URL to a large version of the image. */
|
|
41
|
+
url_4x?: string | undefined;
|
|
42
|
+
}
|
|
43
|
+
/** A set of default images for the reward. */
|
|
44
|
+
export type CreateCustomRewardsResponseDataItemDefaultImage = CreateCustomRewardsResponseDataItemImage;
|
|
45
|
+
/** The settings used to determine whether to apply a maximum to the number to the redemptions allowed per live stream. */
|
|
46
|
+
export interface CreateCustomRewardsResponseDataItemMaxPerStreamSetting {
|
|
47
|
+
/** A Boolean value that determines whether the reward applies a limit on the number of redemptions allowed per live stream. Is **true** if the reward applies a limit. */
|
|
48
|
+
is_enabled?: boolean | undefined;
|
|
49
|
+
/** The maximum number of redemptions allowed per live stream. */
|
|
50
|
+
max_per_stream?: number | undefined;
|
|
51
|
+
}
|
|
52
|
+
/** The settings used to determine whether to apply a maximum to the number of redemptions allowed per user per live stream. */
|
|
53
|
+
export interface CreateCustomRewardsResponseDataItemMaxPerUserPerStreamSetting {
|
|
54
|
+
/** A Boolean value that determines whether the reward applies a limit on the number of redemptions allowed per user per live stream. Is **true** if the reward applies a limit. */
|
|
55
|
+
is_enabled?: boolean | undefined;
|
|
56
|
+
/** The maximum number of redemptions allowed per user per live stream. */
|
|
57
|
+
max_per_user_per_stream?: number | undefined;
|
|
58
|
+
}
|
|
59
|
+
/** The settings used to determine whether to apply a cooldown period between redemptions and the length of the cooldown. */
|
|
60
|
+
export interface CreateCustomRewardsResponseDataItemGlobalCooldownSetting {
|
|
61
|
+
/** A Boolean value that determines whether to apply a cooldown period. Is **true** if a cooldown period is enabled. */
|
|
62
|
+
is_enabled?: boolean | undefined;
|
|
63
|
+
/** The cooldown period, in seconds. */
|
|
64
|
+
global_cooldown_seconds?: number | undefined;
|
|
65
|
+
}
|
|
66
|
+
export interface CreateCustomRewardsResponseDataItem {
|
|
67
|
+
/** The ID that uniquely identifies the broadcaster. */
|
|
68
|
+
broadcaster_id?: string | undefined;
|
|
69
|
+
/** The broadcaster's login name. */
|
|
70
|
+
broadcaster_login?: string | undefined;
|
|
71
|
+
/** The broadcaster's display name. */
|
|
72
|
+
broadcaster_name?: string | undefined;
|
|
73
|
+
/** The ID that uniquely identifies this custom reward. */
|
|
74
|
+
id?: string | undefined;
|
|
75
|
+
/** The title of the reward. */
|
|
76
|
+
title?: string | undefined;
|
|
77
|
+
/** The prompt shown to the viewer when they redeem the reward if user input is required (see the `is_user_input_required` field). */
|
|
78
|
+
prompt?: string | undefined;
|
|
79
|
+
/** The cost of the reward in Channel Points. */
|
|
80
|
+
cost?: number | undefined;
|
|
81
|
+
/** A set of custom images for the reward. This field is set to **null** if the broadcaster didn't upload images. */
|
|
82
|
+
image?: CreateCustomRewardsResponseDataItemImage | undefined;
|
|
83
|
+
/** A set of default images for the reward. */
|
|
84
|
+
default_image?: CreateCustomRewardsResponseDataItemImage | undefined;
|
|
85
|
+
/** The background color to use for the reward. The color is in Hex format (for example, #00E5CB). */
|
|
86
|
+
background_color?: string | undefined;
|
|
87
|
+
/** A Boolean value that determines whether the reward is enabled. Is **true** if enabled; otherwise, **false**. Disabled rewards aren't shown to the user. */
|
|
88
|
+
is_enabled?: boolean | undefined;
|
|
89
|
+
/** A Boolean value that determines whether the user must enter information when redeeming the reward. Is **true** if the reward requires user input. */
|
|
90
|
+
is_user_input_required?: boolean | undefined;
|
|
91
|
+
/** The settings used to determine whether to apply a maximum to the number to the redemptions allowed per live stream. */
|
|
92
|
+
max_per_stream_setting?: CreateCustomRewardsResponseDataItemMaxPerStreamSetting | undefined;
|
|
93
|
+
/** The settings used to determine whether to apply a maximum to the number of redemptions allowed per user per live stream. */
|
|
94
|
+
max_per_user_per_stream_setting?: CreateCustomRewardsResponseDataItemMaxPerUserPerStreamSetting | undefined;
|
|
95
|
+
/** The settings used to determine whether to apply a cooldown period between redemptions and the length of the cooldown. */
|
|
96
|
+
global_cooldown_setting?: CreateCustomRewardsResponseDataItemGlobalCooldownSetting | undefined;
|
|
97
|
+
/** A Boolean value that determines whether the reward is currently paused. Is **true** if the reward is paused. Viewers can't redeem paused rewards. */
|
|
98
|
+
is_paused?: boolean | undefined;
|
|
99
|
+
/** A Boolean value that determines whether the reward is currently in stock. Is **true** if the reward is in stock. Viewers can't redeem out of stock rewards. */
|
|
100
|
+
is_in_stock?: boolean | undefined;
|
|
101
|
+
/** A Boolean value that determines whether redemptions should be set to FULFILLED status immediately when a reward is redeemed. If **false**, status is UNFULFILLED and follows the normal request queue process. */
|
|
102
|
+
should_redemptions_skip_request_queue?: boolean | undefined;
|
|
103
|
+
/** The number of redemptions redeemed during the current live stream. The number counts against the `max_per_stream_setting` limit. This field is **null** if the broadcaster's stream isn't live or `max_per_stream_setting` isn't enabled. */
|
|
104
|
+
redemptions_redeemed_current_stream?: number | undefined;
|
|
105
|
+
/** The timestamp of when the cooldown period expires. Is **null** if the reward isn't in a cooldown state (see the `global_cooldown_setting` field). */
|
|
106
|
+
cooldown_expires_at?: string | undefined;
|
|
107
|
+
}
|
|
108
|
+
/** A list that contains the single custom reward you created. */
|
|
109
|
+
export type CreateCustomRewardsResponseDataList = Array<CreateCustomRewardsResponseDataItem>;
|
|
110
|
+
export interface CreateCustomRewardsResponse {
|
|
111
|
+
/** A list that contains the single custom reward you created. */
|
|
112
|
+
data?: CreateCustomRewardsResponseDataList | undefined;
|
|
113
|
+
}
|
|
114
|
+
export interface DeleteCustomRewardRequest {
|
|
115
|
+
/** The ID of the broadcaster that created the custom reward. This ID must match the user ID found in the OAuth token. */
|
|
116
|
+
broadcaster_id: string;
|
|
117
|
+
/** The ID of the custom reward to delete. */
|
|
118
|
+
id: string;
|
|
119
|
+
}
|
|
120
|
+
export interface DeleteCustomRewardResponse {
|
|
121
|
+
}
|
|
122
|
+
export type GetCustomRewardRequestIdList = Array<string>;
|
|
123
|
+
export interface GetCustomRewardRequest {
|
|
124
|
+
/** The ID of the broadcaster whose custom rewards you want to get. This ID must match the user ID found in the OAuth token. */
|
|
125
|
+
broadcaster_id: string;
|
|
126
|
+
/** A list of IDs to filter the rewards by. To specify more than one ID, include this parameter for each reward you want to get. For example, 'id=1234&id=5678'. You may specify a maximum of 50 IDs. Duplicate IDs are ignored. The response contains only the IDs that were found. If none of the IDs were found, the response is 404 Not Found. */
|
|
127
|
+
id?: GetCustomRewardRequestIdList | undefined;
|
|
128
|
+
/** A Boolean value that determines whether the response contains only the custom rewards that the app may manage (the app is identified by the ID in the Client-Id header). Set to **true** to get only the custom rewards that the app may manage. The default is **false**. */
|
|
129
|
+
only_manageable_rewards?: boolean | undefined;
|
|
130
|
+
}
|
|
131
|
+
/** A set of custom images for the reward. This field is **null** if the broadcaster didn't upload images. */
|
|
132
|
+
export type GetCustomRewardResponseDataItemImage = CreateCustomRewardsResponseDataItemImage;
|
|
133
|
+
/** A set of default images for the reward. */
|
|
134
|
+
export type GetCustomRewardResponseDataItemDefaultImage = CreateCustomRewardsResponseDataItemImage;
|
|
135
|
+
/** The settings used to determine whether to apply a maximum to the number of redemptions allowed per live stream. */
|
|
136
|
+
export type GetCustomRewardResponseDataItemMaxPerStreamSetting = CreateCustomRewardsResponseDataItemMaxPerStreamSetting;
|
|
137
|
+
/** The settings used to determine whether to apply a maximum to the number of redemptions allowed per user per live stream. */
|
|
138
|
+
export type GetCustomRewardResponseDataItemMaxPerUserPerStreamSetting = CreateCustomRewardsResponseDataItemMaxPerUserPerStreamSetting;
|
|
139
|
+
/** The settings used to determine whether to apply a cooldown period between redemptions and the length of the cooldown. */
|
|
140
|
+
export type GetCustomRewardResponseDataItemGlobalCooldownSetting = CreateCustomRewardsResponseDataItemGlobalCooldownSetting;
|
|
141
|
+
export interface GetCustomRewardResponseDataItem {
|
|
142
|
+
/** The ID that uniquely identifies the broadcaster. */
|
|
143
|
+
broadcaster_id?: string | undefined;
|
|
144
|
+
/** The broadcaster's login name. */
|
|
145
|
+
broadcaster_login?: string | undefined;
|
|
146
|
+
/** The broadcaster's display name. */
|
|
147
|
+
broadcaster_name?: string | undefined;
|
|
148
|
+
/** The ID that uniquely identifies this custom reward. */
|
|
149
|
+
id?: string | undefined;
|
|
150
|
+
/** The title of the reward. */
|
|
151
|
+
title?: string | undefined;
|
|
152
|
+
/** The prompt shown to the viewer when they redeem the reward if user input is required (see the `is_user_input_required` field). */
|
|
153
|
+
prompt?: string | undefined;
|
|
154
|
+
/** The cost of the reward in Channel Points. */
|
|
155
|
+
cost?: number | undefined;
|
|
156
|
+
/** A set of custom images for the reward. This field is **null** if the broadcaster didn't upload images. */
|
|
157
|
+
image?: CreateCustomRewardsResponseDataItemImage | undefined;
|
|
158
|
+
/** A set of default images for the reward. */
|
|
159
|
+
default_image?: CreateCustomRewardsResponseDataItemImage | undefined;
|
|
160
|
+
/** The background color to use for the reward. The color is in Hex format (for example, #00E5CB). */
|
|
161
|
+
background_color?: string | undefined;
|
|
162
|
+
/** A Boolean value that determines whether the reward is enabled. Is **true** if enabled; otherwise, **false**. Disabled rewards aren't shown to the user. */
|
|
163
|
+
is_enabled?: boolean | undefined;
|
|
164
|
+
/** A Boolean value that determines whether the user must enter information when redeeming the reward. Is **true** if the user is prompted. */
|
|
165
|
+
is_user_input_required?: boolean | undefined;
|
|
166
|
+
/** The settings used to determine whether to apply a maximum to the number of redemptions allowed per live stream. */
|
|
167
|
+
max_per_stream_setting?: CreateCustomRewardsResponseDataItemMaxPerStreamSetting | undefined;
|
|
168
|
+
/** The settings used to determine whether to apply a maximum to the number of redemptions allowed per user per live stream. */
|
|
169
|
+
max_per_user_per_stream_setting?: CreateCustomRewardsResponseDataItemMaxPerUserPerStreamSetting | undefined;
|
|
170
|
+
/** The settings used to determine whether to apply a cooldown period between redemptions and the length of the cooldown. */
|
|
171
|
+
global_cooldown_setting?: CreateCustomRewardsResponseDataItemGlobalCooldownSetting | undefined;
|
|
172
|
+
/** A Boolean value that determines whether the reward is currently paused. Is **true** if the reward is paused. Viewers can't redeem paused rewards. */
|
|
173
|
+
is_paused?: boolean | undefined;
|
|
174
|
+
/** A Boolean value that determines whether the reward is currently in stock. Is **true** if the reward is in stock. Viewers can't redeem out of stock rewards. */
|
|
175
|
+
is_in_stock?: boolean | undefined;
|
|
176
|
+
/** A Boolean value that determines whether redemptions should be set to FULFILLED status immediately when a reward is redeemed. If **false**, status is set to UNFULFILLED and follows the normal request queue process. */
|
|
177
|
+
should_redemptions_skip_request_queue?: boolean | undefined;
|
|
178
|
+
/** The number of redemptions redeemed during the current live stream. The number counts against the `max_per_stream_setting` limit. This field is **null** if the broadcaster's stream isn't live or `max_per_stream_setting` isn't enabled. */
|
|
179
|
+
redemptions_redeemed_current_stream?: number | undefined;
|
|
180
|
+
/** The timestamp of when the cooldown period expires. Is **null** if the reward isn't in a cooldown state. See the `global_cooldown_setting` field. */
|
|
181
|
+
cooldown_expires_at?: string | undefined;
|
|
182
|
+
}
|
|
183
|
+
/** A list of custom rewards. The list is in ascending order by `id`. If the broadcaster hasn't created custom rewards, the list is empty. */
|
|
184
|
+
export type GetCustomRewardResponseDataList = Array<GetCustomRewardResponseDataItem>;
|
|
185
|
+
export interface GetCustomRewardResponse {
|
|
186
|
+
/** A list of custom rewards. The list is in ascending order by `id`. If the broadcaster hasn't created custom rewards, the list is empty. */
|
|
187
|
+
data?: GetCustomRewardResponseDataList | undefined;
|
|
188
|
+
}
|
|
189
|
+
export type GetCustomRewardRedemptionRequestIdList = Array<string>;
|
|
190
|
+
export interface GetCustomRewardRedemptionRequest {
|
|
191
|
+
/** The ID of the broadcaster that owns the custom reward. This ID must match the user ID found in the user OAuth token. */
|
|
192
|
+
broadcaster_id: string;
|
|
193
|
+
/** The ID that identifies the custom reward whose redemptions you want to get. */
|
|
194
|
+
reward_id: string;
|
|
195
|
+
/** The status of the redemptions to return. The possible values are case-sensitive. This parameter is required if you don't specify the *id* query parameter; if you specify *id*, it's ignored. Possible values: - `CANCELED` - `FULFILLED` - `UNFULFILLED` */
|
|
196
|
+
status?: string | undefined;
|
|
197
|
+
/** A list of IDs to filter the redemptions by. To specify more than one ID, include this parameter for each redemption you want to get. For example, 'id=1234&id=5678'. You may specify a maximum of 50 IDs. Duplicate IDs are ignored. The response contains only the IDs that were found. If none of the IDs were found, the response is 404 Not Found. If you specify *id*, the *status*, *sort*, *first*, and *after* query parameters don't apply: the response contains the redemptions regardless of their status, and it doesn't include the `pagination` object. */
|
|
198
|
+
id?: GetCustomRewardRedemptionRequestIdList | undefined;
|
|
199
|
+
/** The order to sort redemptions by. The possible values are case-sensitive. The default is OLDEST. Possible values: - `OLDEST` - `NEWEST` */
|
|
200
|
+
sort?: string | undefined;
|
|
201
|
+
/** 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) */
|
|
202
|
+
after?: string | undefined;
|
|
203
|
+
/** The maximum number of redemptions to return per page in the response. The minimum page size is 1 redemption per page and the maximum is 50. The default is 20. */
|
|
204
|
+
first?: number | undefined;
|
|
205
|
+
}
|
|
206
|
+
/** The reward that the user redeemed. */
|
|
207
|
+
export interface GetCustomRewardRedemptionResponseDataItemReward {
|
|
208
|
+
/** The ID that uniquely identifies the redeemed reward. */
|
|
209
|
+
id?: string | undefined;
|
|
210
|
+
/** The reward's title. */
|
|
211
|
+
title?: string | undefined;
|
|
212
|
+
/** The prompt displayed to the viewer if user input is required. */
|
|
213
|
+
prompt?: string | undefined;
|
|
214
|
+
/** The reward's cost, in Channel Points. */
|
|
215
|
+
cost?: number | undefined;
|
|
216
|
+
}
|
|
217
|
+
export interface GetCustomRewardRedemptionResponseDataItem {
|
|
218
|
+
/** The ID that uniquely identifies the broadcaster. */
|
|
219
|
+
broadcaster_id?: string | undefined;
|
|
220
|
+
/** The broadcaster's login name. */
|
|
221
|
+
broadcaster_login?: string | undefined;
|
|
222
|
+
/** The broadcaster's display name. */
|
|
223
|
+
broadcaster_name?: string | undefined;
|
|
224
|
+
/** The ID that uniquely identifies this redemption. */
|
|
225
|
+
id?: string | undefined;
|
|
226
|
+
/** The user's login name. */
|
|
227
|
+
user_login?: string | undefined;
|
|
228
|
+
/** The ID that uniquely identifies the user that redeemed the reward. */
|
|
229
|
+
user_id?: string | undefined;
|
|
230
|
+
/** The user's display name. */
|
|
231
|
+
user_name?: string | undefined;
|
|
232
|
+
/** The text the user entered at the prompt when they redeemed the reward; otherwise, an empty string if user input was not required. */
|
|
233
|
+
user_input?: string | undefined;
|
|
234
|
+
/** The state of the redemption. Possible values: - `CANCELED` - `FULFILLED` - `UNFULFILLED` */
|
|
235
|
+
status?: string | undefined;
|
|
236
|
+
/** The date and time of when the reward was redeemed, in RFC3339 format. */
|
|
237
|
+
redeemed_at?: string | undefined;
|
|
238
|
+
/** The reward that the user redeemed. */
|
|
239
|
+
reward?: GetCustomRewardRedemptionResponseDataItemReward | undefined;
|
|
240
|
+
}
|
|
241
|
+
/** The list of redemptions for the specified reward. The list is empty if there are no redemptions that match the redemption criteria. */
|
|
242
|
+
export type GetCustomRewardRedemptionResponseDataList = Array<GetCustomRewardRedemptionResponseDataItem>;
|
|
243
|
+
/** Contains the information used to page through the list of results. The object contains a cursor whenever the page contains redemptions, even if it's the last page; it's empty if the page contains no redemptions. The response doesn't include this object if you specify the *id* query parameter. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination). */
|
|
244
|
+
export interface GetCustomRewardRedemptionResponsePagination {
|
|
245
|
+
/** The cursor used to get the next page of results. Use the cursor to set the request's *after* query parameter. */
|
|
246
|
+
cursor?: string | undefined;
|
|
247
|
+
}
|
|
248
|
+
export interface GetCustomRewardRedemptionResponse {
|
|
249
|
+
/** The list of redemptions for the specified reward. The list is empty if there are no redemptions that match the redemption criteria. */
|
|
250
|
+
data: GetCustomRewardRedemptionResponseDataList;
|
|
251
|
+
/** Contains the information used to page through the list of results. The object contains a cursor whenever the page contains redemptions, even if it's the last page; it's empty if the page contains no redemptions. The response doesn't include this object if you specify the *id* query parameter. [Read More](https://dev.twitch.tv/docs/api/guide.md#pagination). */
|
|
252
|
+
pagination?: GetCustomRewardRedemptionResponsePagination | undefined;
|
|
253
|
+
}
|
|
254
|
+
export interface UpdateCustomRewardRequest {
|
|
255
|
+
/** The ID of the broadcaster that's updating the reward. This ID must match the user ID found in the OAuth token. */
|
|
256
|
+
broadcaster_id: string;
|
|
257
|
+
/** The ID of the reward to update. */
|
|
258
|
+
id: string;
|
|
259
|
+
/** The reward's title. The title may contain a maximum of 45 characters and it must be unique (case-insensitive) amongst all of the broadcaster's custom rewards. */
|
|
260
|
+
title?: string | undefined;
|
|
261
|
+
/** The prompt shown to the viewer when they redeem the reward. Specify a prompt if *is_user_input_required* is **true**. If the prompt is empty or contains only whitespace, the reward's current prompt isn't changed. */
|
|
262
|
+
prompt?: string | undefined;
|
|
263
|
+
/** The cost of the reward, in channel points. The minimum is 1 point and the maximum is 1,000,000,000 points. */
|
|
264
|
+
cost?: number | undefined;
|
|
265
|
+
/** The background color to use for the reward. Specify the color using Hex format (for example, \#00E5CB). */
|
|
266
|
+
background_color?: string | undefined;
|
|
267
|
+
/** A Boolean value that indicates whether the reward is enabled. Set to **true** to enable the reward. Viewers see only enabled rewards. */
|
|
268
|
+
is_enabled?: boolean | undefined;
|
|
269
|
+
/** A Boolean value that determines whether users must enter information to redeem the reward. Set to **true** if user input is required. See the *prompt* field. */
|
|
270
|
+
is_user_input_required?: boolean | undefined;
|
|
271
|
+
/** A Boolean value that determines whether to limit the maximum number of redemptions allowed per live stream (see the *max_per_stream* field). Set to **true** to limit redemptions. */
|
|
272
|
+
is_max_per_stream_enabled?: boolean | undefined;
|
|
273
|
+
/** The maximum number of redemptions allowed per live stream. Applied only if *is_max_per_stream_enabled* is **true**. The minimum value is 1. */
|
|
274
|
+
max_per_stream?: number | undefined;
|
|
275
|
+
/** A Boolean value that determines whether to limit the maximum number of redemptions allowed per user per stream (see *max_per_user_per_stream*). Set to **true** to limit redemptions. */
|
|
276
|
+
is_max_per_user_per_stream_enabled?: boolean | undefined;
|
|
277
|
+
/** The maximum number of redemptions allowed per user per stream. Applied only if *is_max_per_user_per_stream_enabled* is **true**. The minimum value is 1. */
|
|
278
|
+
max_per_user_per_stream?: number | undefined;
|
|
279
|
+
/** A Boolean value that determines whether to apply a cooldown period between redemptions. Set to **true** to apply a cooldown period. For the duration of the cooldown period, see *global_cooldown_seconds*. */
|
|
280
|
+
is_global_cooldown_enabled?: boolean | undefined;
|
|
281
|
+
/** The cooldown period, in seconds. Applied only if *is_global_cooldown_enabled* is **true**. The minimum value is 1; however, for it to be shown in the Twitch UX, the minimum value is 60. */
|
|
282
|
+
global_cooldown_seconds?: number | undefined;
|
|
283
|
+
/** A Boolean value that determines whether to pause the reward. Set to **true** to pause the reward. Viewers can't redeem paused rewards.. */
|
|
284
|
+
is_paused?: boolean | undefined;
|
|
285
|
+
/** A Boolean value that determines whether redemptions should be set to FULFILLED status immediately when a reward is redeemed. If **false**, status is set to UNFULFILLED and follows the normal request queue process. */
|
|
286
|
+
should_redemptions_skip_request_queue?: boolean | undefined;
|
|
287
|
+
}
|
|
288
|
+
/** A set of custom images for the reward. This field is **null** if the broadcaster didn't upload images. */
|
|
289
|
+
export type UpdateCustomRewardResponseDataItemImage = CreateCustomRewardsResponseDataItemImage;
|
|
290
|
+
/** A set of default images for the reward. */
|
|
291
|
+
export type UpdateCustomRewardResponseDataItemDefaultImage = CreateCustomRewardsResponseDataItemImage;
|
|
292
|
+
/** The settings used to determine whether to apply a maximum to the number of redemptions allowed per live stream. */
|
|
293
|
+
export type UpdateCustomRewardResponseDataItemMaxPerStreamSetting = CreateCustomRewardsResponseDataItemMaxPerStreamSetting;
|
|
294
|
+
/** The settings used to determine whether to apply a maximum to the number of redemptions allowed per user per live stream. */
|
|
295
|
+
export type UpdateCustomRewardResponseDataItemMaxPerUserPerStreamSetting = CreateCustomRewardsResponseDataItemMaxPerUserPerStreamSetting;
|
|
296
|
+
/** The settings used to determine whether to apply a cooldown period between redemptions and the length of the cooldown. */
|
|
297
|
+
export type UpdateCustomRewardResponseDataItemGlobalCooldownSetting = CreateCustomRewardsResponseDataItemGlobalCooldownSetting;
|
|
298
|
+
export interface UpdateCustomRewardResponseDataItem {
|
|
299
|
+
/** The ID that uniquely identifies the broadcaster. */
|
|
300
|
+
broadcaster_id?: string | undefined;
|
|
301
|
+
/** The broadcaster's login name. */
|
|
302
|
+
broadcaster_login?: string | undefined;
|
|
303
|
+
/** The broadcaster's display name. */
|
|
304
|
+
broadcaster_name?: string | undefined;
|
|
305
|
+
/** The ID that uniquely identifies this custom reward. */
|
|
306
|
+
id?: string | undefined;
|
|
307
|
+
/** The title of the reward. */
|
|
308
|
+
title?: string | undefined;
|
|
309
|
+
/** The prompt shown to the viewer when they redeem the reward if user input is required. See the `is_user_input_required` field. */
|
|
310
|
+
prompt?: string | undefined;
|
|
311
|
+
/** The cost of the reward in Channel Points. */
|
|
312
|
+
cost?: number | undefined;
|
|
313
|
+
/** A set of custom images for the reward. This field is **null** if the broadcaster didn't upload images. */
|
|
314
|
+
image?: CreateCustomRewardsResponseDataItemImage | undefined;
|
|
315
|
+
/** A set of default images for the reward. */
|
|
316
|
+
default_image?: CreateCustomRewardsResponseDataItemImage | undefined;
|
|
317
|
+
/** The background color to use for the reward. The color is in Hex format (for example, #00E5CB). */
|
|
318
|
+
background_color?: string | undefined;
|
|
319
|
+
/** A Boolean value that determines whether the reward is enabled. Is **true** if enabled; otherwise, **false**. Disabled rewards aren't shown to the user. */
|
|
320
|
+
is_enabled?: boolean | undefined;
|
|
321
|
+
/** A Boolean value that determines whether the user must enter information when they redeem the reward. Is **true** if the user is prompted. */
|
|
322
|
+
is_user_input_required?: boolean | undefined;
|
|
323
|
+
/** The settings used to determine whether to apply a maximum to the number of redemptions allowed per live stream. */
|
|
324
|
+
max_per_stream_setting?: CreateCustomRewardsResponseDataItemMaxPerStreamSetting | undefined;
|
|
325
|
+
/** The settings used to determine whether to apply a maximum to the number of redemptions allowed per user per live stream. */
|
|
326
|
+
max_per_user_per_stream_setting?: CreateCustomRewardsResponseDataItemMaxPerUserPerStreamSetting | undefined;
|
|
327
|
+
/** The settings used to determine whether to apply a cooldown period between redemptions and the length of the cooldown. */
|
|
328
|
+
global_cooldown_setting?: CreateCustomRewardsResponseDataItemGlobalCooldownSetting | undefined;
|
|
329
|
+
/** A Boolean value that determines whether the reward is currently paused. Is **true** if the reward is paused. Viewers can't redeem paused rewards. */
|
|
330
|
+
is_paused?: boolean | undefined;
|
|
331
|
+
/** A Boolean value that determines whether the reward is currently in stock. Is **true** if the reward is in stock. Viewers can't redeem out of stock rewards. */
|
|
332
|
+
is_in_stock?: boolean | undefined;
|
|
333
|
+
/** A Boolean value that determines whether redemptions should be set to FULFILLED status immediately when a reward is redeemed. If **false**, status is set to UNFULFILLED and follows the normal request queue process. */
|
|
334
|
+
should_redemptions_skip_request_queue?: boolean | undefined;
|
|
335
|
+
/** The number of redemptions redeemed during the current live stream. The number counts against the `max_per_stream_setting` limit. This field is **null** if the broadcaster's stream isn't live or `max_per_stream_setting` isn't enabled. */
|
|
336
|
+
redemptions_redeemed_current_stream?: number | undefined;
|
|
337
|
+
/** The timestamp of when the cooldown period expires. Is **null** if the reward isn't in a cooldown state. See the `global_cooldown_setting` field. */
|
|
338
|
+
cooldown_expires_at?: string | undefined;
|
|
339
|
+
}
|
|
340
|
+
/** The list contains the single reward that you updated. */
|
|
341
|
+
export type UpdateCustomRewardResponseDataList = Array<UpdateCustomRewardResponseDataItem>;
|
|
342
|
+
export interface UpdateCustomRewardResponse {
|
|
343
|
+
/** The list contains the single reward that you updated. */
|
|
344
|
+
data?: UpdateCustomRewardResponseDataList | undefined;
|
|
345
|
+
}
|
|
346
|
+
export type UpdateRedemptionStatusRequestIdList = Array<string>;
|
|
347
|
+
export interface UpdateRedemptionStatusRequest {
|
|
348
|
+
/** A list of IDs that identify the redemptions to update. To specify more than one ID, include this parameter for each redemption you want to update. For example, 'id=1234&id=5678'. You may specify a maximum of 50 IDs. */
|
|
349
|
+
id: UpdateRedemptionStatusRequestIdList;
|
|
350
|
+
/** The ID of the broadcaster that's updating the redemption. This ID must match the user ID in the user access token. */
|
|
351
|
+
broadcaster_id: string;
|
|
352
|
+
/** The ID that identifies the reward that's been redeemed. */
|
|
353
|
+
reward_id: string;
|
|
354
|
+
/** The status to set the redemption to. Possible values: - `CANCELED` - `FULFILLED` */
|
|
355
|
+
status: string;
|
|
356
|
+
}
|
|
357
|
+
/** An object that describes the reward that the user redeemed. */
|
|
358
|
+
export interface UpdateRedemptionStatusResponseDataItemReward {
|
|
359
|
+
/** The ID that uniquely identifies the reward. */
|
|
360
|
+
id?: string | undefined;
|
|
361
|
+
/** The reward's title. */
|
|
362
|
+
title?: string | undefined;
|
|
363
|
+
/** The prompt displayed to the viewer if user input is required. */
|
|
364
|
+
prompt?: string | undefined;
|
|
365
|
+
/** The reward's cost, in Channel Points. */
|
|
366
|
+
cost?: number | undefined;
|
|
367
|
+
}
|
|
368
|
+
export interface UpdateRedemptionStatusResponseDataItem {
|
|
369
|
+
/** The ID that uniquely identifies the broadcaster. */
|
|
370
|
+
broadcaster_id?: string | undefined;
|
|
371
|
+
/** The broadcaster's login name. */
|
|
372
|
+
broadcaster_login?: string | undefined;
|
|
373
|
+
/** The broadcaster's display name. */
|
|
374
|
+
broadcaster_name?: string | undefined;
|
|
375
|
+
/** The ID that uniquely identifies this redemption.. */
|
|
376
|
+
id?: string | undefined;
|
|
377
|
+
/** The ID of the user that redeemed the reward. */
|
|
378
|
+
user_id?: string | undefined;
|
|
379
|
+
/** The user's display name. */
|
|
380
|
+
user_name?: string | undefined;
|
|
381
|
+
/** The user's login name. */
|
|
382
|
+
user_login?: string | undefined;
|
|
383
|
+
/** An object that describes the reward that the user redeemed. */
|
|
384
|
+
reward?: UpdateRedemptionStatusResponseDataItemReward | undefined;
|
|
385
|
+
/** The text that the user entered at the prompt when they redeemed the reward; otherwise, an empty string if user input was not required. */
|
|
386
|
+
user_input?: string | undefined;
|
|
387
|
+
/** The state of the redemption. Possible values: - `CANCELED` - `FULFILLED` - `UNFULFILLED` */
|
|
388
|
+
status?: string | undefined;
|
|
389
|
+
/** The date and time of when the reward was redeemed, in RFC3339 format. */
|
|
390
|
+
redeemed_at?: string | undefined;
|
|
391
|
+
}
|
|
392
|
+
/** The list of redemptions that you updated. The list doesn't include redemptions that weren't found, weren't UNFULFILLED, or belong to a different reward. */
|
|
393
|
+
export type UpdateRedemptionStatusResponseDataList = Array<UpdateRedemptionStatusResponseDataItem>;
|
|
394
|
+
export interface UpdateRedemptionStatusResponse {
|
|
395
|
+
/** The list of redemptions that you updated. The list doesn't include redemptions that weren't found, weren't UNFULFILLED, or belong to a different reward. */
|
|
396
|
+
data?: UpdateRedemptionStatusResponseDataList | undefined;
|
|
397
|
+
}
|
|
398
|
+
export type CreateCustomRewardsError = TwitchOpError;
|
|
399
|
+
/** Create Custom Rewards Creates a Custom Reward in the broadcaster's channel. The maximum number of custom rewards per channel is 50, which includes both enabled and disabled rewards. 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:redemptions** scope. Reference: https://dev.twitch.tv/docs/api/reference/channel-points/#create-custom-rewards */
|
|
400
|
+
export declare const createCustomRewards: API.OperationMethod<CreateCustomRewardsRequest, CreateCustomRewardsResponse, CreateCustomRewardsError, TwitchOpContext>;
|
|
401
|
+
export type DeleteCustomRewardError = TwitchOpError;
|
|
402
|
+
/** Delete Custom Reward Deletes a custom reward that the broadcaster created. The app used to create the reward is the only app that may delete it. Deleting the reward starts an asynchronous update that marks the reward's UNFULFILLED redemptions as FULFILLED. The update doesn't start if a bulk update of the channel's redemptions, or of this reward's redemptions, is already in progress, but the reward is still deleted. 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:redemptions** scope. Reference: https://dev.twitch.tv/docs/api/reference/channel-points/#delete-custom-reward */
|
|
403
|
+
export declare const deleteCustomReward: API.OperationMethod<DeleteCustomRewardRequest, DeleteCustomRewardResponse, DeleteCustomRewardError, TwitchOpContext>;
|
|
404
|
+
export type GetCustomRewardError = TwitchOpError;
|
|
405
|
+
/** Get Custom Reward Gets a list of custom rewards that the specified broadcaster created. > **Note** A channel may offer a maximum of 50 rewards, which includes both enabled and disabled rewards. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:read:redemptions** or **channel:manage:redemptions** scope. Reference: https://dev.twitch.tv/docs/api/reference/channel-points/#get-custom-reward */
|
|
406
|
+
export declare const getCustomReward: API.OperationMethod<GetCustomRewardRequest, GetCustomRewardResponse, GetCustomRewardError, TwitchOpContext>;
|
|
407
|
+
export type GetCustomRewardRedemptionError = TwitchOpError;
|
|
408
|
+
/** Get Custom Reward Redemption Gets a list of redemptions for the specified custom reward. The app used to create the reward is the only app that may get the redemptions. Authorization: Requires one of the following: - A [user access token](https://dev.twitch.tv/docs/authentication.md#user-access-tokens) that includes the **channel:read:redemptions** or **channel:manage:redemptions** scope. Reference: https://dev.twitch.tv/docs/api/reference/channel-points/#get-custom-reward-redemption */
|
|
409
|
+
export declare const getCustomRewardRedemption: API.PaginatedOperationMethod<GetCustomRewardRedemptionRequest, GetCustomRewardRedemptionResponse, GetCustomRewardRedemptionError, TwitchOpContext, GetCustomRewardRedemptionResponseDataItem>;
|
|
410
|
+
export type UpdateCustomRewardError = TwitchOpError;
|
|
411
|
+
/** Update Custom Reward Updates a custom reward. The app used to create the reward is the only app that may update the reward. > **Note** Each limit setting is updated as a pair: *is_max_per_stream_enabled* with *max_per_stream*, > *is_max_per_user_per_stream_enabled* with *max_per_user_per_stream*, and > *is_global_cooldown_enabled* with *global_cooldown_seconds*. If you specify one field of a > pair, also specify the other; the field you omit is set to **false** or 0. For example, > specifying only *max_per_stream* turns off the per-stream limit. 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:redemptions** scope. Reference: https://dev.twitch.tv/docs/api/reference/channel-points/#update-custom-reward */
|
|
412
|
+
export declare const updateCustomReward: API.OperationMethod<UpdateCustomRewardRequest, UpdateCustomRewardResponse, UpdateCustomRewardError, TwitchOpContext>;
|
|
413
|
+
export type UpdateRedemptionStatusError = TwitchOpError;
|
|
414
|
+
/** Update Redemption Status Updates a redemption's status. You may update a redemption only if its status is UNFULFILLED. The app used to create the reward is the only app that may update the redemption. 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:redemptions** scope. Reference: https://dev.twitch.tv/docs/api/reference/channel-points/#update-redemption-status */
|
|
415
|
+
export declare const updateRedemptionStatus: API.OperationMethod<UpdateRedemptionStatusRequest, UpdateRedemptionStatusResponse, UpdateRedemptionStatusError, TwitchOpContext>;
|
|
416
|
+
//# sourceMappingURL=channel_points.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel_points.d.ts","sources":["../../src/services/channel_points.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,WAAW,0BAA0B;IACzC,sHAAsH;IACtH,cAAc,EAAE,MAAM,CAAC;IACvB,4KAA4K;IAC5K,KAAK,EAAE,MAAM,CAAC;IACd,iHAAiH;IACjH,IAAI,EAAE,MAAM,CAAC;IACb,4HAA4H;IAC5H,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,gIAAgI;IAChI,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,mMAAmM;IACnM,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,+JAA+J;IAC/J,sBAAsB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7C,6KAA6K;IAC7K,yBAAyB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChD,kJAAkJ;IAClJ,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,0LAA0L;IAC1L,kCAAkC,CAAC,EAAE,OAAO,G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import{Gc as e,Jc as t,Kc as n,Rc as r,Wc as i,Xc as a,a as o,b as s,errors$TwitchServiceErrors as c,l,n as u,o as d,pagination$paginateCursor as f,protocol$TwitchProtocol as p,retry$Retry as m,traits$Http as h,traits$Query as g,wc as _,xc 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:`ChannelPoints`,propagate:`w3c`};const b=/*@__PURE__*/ u(u=>u===o?l(`CreateCustomRewards`,`{input:#1,output:#9:6,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({broadcaster_id:$3.pipe($2()),title:$3,cost:$4,prompt:$5($3),is_enabled:$5($6),background_color:$5($3),is_user_input_required:$5($6),is_max_per_stream_enabled:$5($6),max_per_stream:$5($4),is_max_per_user_per_stream_enabled:$5($6),max_per_user_per_stream:$5($4),is_global_cooldown_enabled:$5($6),global_cooldown_seconds:$5($4),should_redemptions_skip_request_queue:$5($6)}).pipe($1({method:"POST",uri:"/channel_points/custom_rewards",code:200}))`,[r,h,g,t,e,i,v,n,a,__d0,c,p,m,y]):s(b,u));const x=/*@__PURE__*/ u(e=>e===o?l(`DeleteCustomReward`,`{input:#1,output:#2,errors:[],serviceErrors:$6,protocol:$7,retry:$8,telemetry:$9,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({broadcaster_id:$3.pipe($2()),id:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/channel_points/custom_rewards",code:200}));$4({})`,[r,h,g,t,n,a,c,p,m,y]):s(x,e));const S=/*@__PURE__*/ u(e=>e===o?l(`GetCustomReward`,`{input:#1,output:#9:6,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({broadcaster_id:$3.pipe($2()),id:$5(#4:0.pipe($2())),only_manageable_rewards:$5($6.pipe($2()))}).pipe($1({method:"GET",uri:"/channel_points/custom_rewards",code:200}))`,[r,h,g,t,__d1,i,v,n,a,__d0,c,p,m,y]):s(S,e));const C=/*@__PURE__*/ d(u=>u===o?l(`GetCustomRewardRedemption`,`{input:#1,output:#5,errors:[],serviceErrors:$11,protocol:$12,retry:$13,telemetry:$14,span:"%",pagination:{mode:"cursor",inputToken:"after",outputToken:"pagination.cursor",items:"data",pageSize:"first"},strategy:$15};$8(>6)@"%Request";$8(>7)@"%ResponseDataItem";$10(#2);$8(>8)@"%ResponsePagination";$8(>9)@"%Response";$7({broadcaster_id:$3.pipe($2()),reward_id:$3.pipe($2()),status:$4($3.pipe($2())),id:$4(#5:0.pipe($2())),sort:$4($3.pipe($2())),after:$4($3.pipe($2())),first:$4($6.pipe($2()))}).pipe($1({method:"GET",uri:"/channel_points/custom_rewards/redemptions",code:200}));$7({broadcaster_id:$4($3),broadcaster_login:$4($3),broadcaster_name:$4($3),id:$4($3),user_login:$4($3),user_id:$4($3),user_name:$4($3),user_input:$4($3),status:$4($3),redeemed_at:$4($3),reward:$4(#9:0)});$7({cursor:$4($3)});$7({data:#3,pagination:$4(#4)})`,[r,h,g,t,i,__d1,e,n,a,__d2,_,c,p,m,y,f]):s(C,u));const w=/*@__PURE__*/ u(u=>u===o?l(`UpdateCustomReward`,`{input:#1,output:#9:6,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({broadcaster_id:$3.pipe($2()),id:$3.pipe($2()),title:$4($3),prompt:$4($3),cost:$4($5),background_color:$4($3),is_enabled:$4($6),is_user_input_required:$4($6),is_max_per_stream_enabled:$4($6),max_per_stream:$4($5),is_max_per_user_per_stream_enabled:$4($6),max_per_user_per_stream:$4($5),is_global_cooldown_enabled:$4($6),global_cooldown_seconds:$4($5),is_paused:$4($6),should_redemptions_skip_request_queue:$4($6)}).pipe($1({method:"PATCH",uri:"/channel_points/custom_rewards",code:200}))`,[r,h,g,t,i,e,v,n,a,__d0,c,p,m,y]):s(w,u));const T=/*@__PURE__*/ u(e=>e===o?l(`UpdateRedemptionStatus`,`{input:#1,output:#4,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$6(>5)@"%Request";$6(>6)@"%ResponseDataItem";$9(#2);$6(>7)@"%Response";$5({id:#3:0.pipe($2()),broadcaster_id:$4.pipe($2()),reward_id:$4.pipe($2()),status:$4}).pipe($1({method:"PATCH",uri:"/channel_points/custom_rewards/redemptions",code:200}));$5({broadcaster_id:$7($4),broadcaster_login:$7($4),broadcaster_name:$7($4),id:$7($4),user_id:$7($4),user_name:$7($4),user_login:$7($4),reward:$7(#8:0),user_input:$7($4),status:$7($4),redeemed_at:$7($4)});$5({data:$7(#3)})`,[r,h,g,__d1,t,n,a,i,__d2,_,c,p,m,y]):s(T,e));function __d0(){return[`$4(>7)@"CreateCustomRewardsResponseDataItemImage";$4(>8)@"CreateCustomRewardsResponseDataItemMaxPerStreamSetting";$4(>9)@"CreateCustomRewardsResponseDataItemMaxPerUserPerStreamSetting";$4(>10)@"CreateCustomRewardsResponseDataItemGlobalCooldownSetting";$4(>11)@"CreateCustomRewardsResponseDataItem";$7(#4);$4(>12)@"CreateCustomRewardsResponse";$3({url_1x:$2($1),url_2x:$2($1),url_4x:$2($1)});$3({is_enabled:$2($5),max_per_stream:$2($6)});$3({is_enabled:$2($5),max_per_user_per_stream:$2($6)});$3({is_enabled:$2($5),global_cooldown_seconds:$2($6)});$3({broadcaster_id:$2($1),broadcaster_login:$2($1),broadcaster_name:$2($1),id:$2($1),title:$2($1),prompt:$2($1),cost:$2($6),image:$2(#0),default_image:$2(#0),background_color:$2($1),is_enabled:$2($5),is_user_input_required:$2($5),max_per_stream_setting:$2(#1),max_per_user_per_stream_setting:$2(#2),global_cooldown_setting:$2(#3),is_paused:$2($5),is_in_stock:$2($5),should_redemptions_skip_request_queue:$2($5),redemptions_redeemed_current_stream:$2($6),cooldown_expires_at:$2($1)});$3({data:$2(#5)})`,[r,t,i,n,a,v,e,_]]}function __d1(){return[`$2($1)`,[r,t,_]]}function __d2(){return[`$5(>1)@"GetCustomRewardRedemptionResponseDataItemReward";$4({id:$2($1),title:$2($1),prompt:$2($1),cost:$2($3)})`,[r,t,i,e,n,a]]}export{b as createCustomRewards,x as deleteCustomReward,S as getCustomReward,C as getCustomRewardRedemption,w as updateCustomReward,T as updateRedemptionStatus};
|
|
2
|
+
//# sourceMappingURL=channel_points.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel_points.js","names":["API.D","API.named","__L.at","T.Http","T.Query","S.String","S.Number","S.optional","S.Boolean","S.Struct","S.suspend","Retry.Retry","API.call","S.Array","Number","String","Struct","at","optional","suspend","D","call","TwitchServiceErrors","op","opPaginated","paginateCursor","TwitchProtocol","Retry","Http","Query","Array","Boolean","TELEMETRY","createCustomRewards","i","named","deleteCustomReward","getCustomReward","getCustomRewardRedemption","updateCustomReward","updateRedemptionStatus"],"sources":["../../src/services/channel_points.ts"],"mappings":"6QAaA,MAAMgC,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,gBACT,UAAW,KACb,EA4ZA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAMlC,EAAQC,EAAU,sBAAuB,qjBAAsjB,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAYC,EAAWC,EAAUC,EAAW,KAAMY,EAAqBI,EAAgBf,EAAaqB,CAAS,CAAC,EAAIpB,EAASqB,EAAqBC,CAAC,CAAC,EAI/0B,MAAaE,EAKK,gBAAQ,GAAgBF,IAAMlC,EAAQC,EAAU,qBAAsB,uQAAwQ,CAACC,EAAQC,EAAQC,EAASC,EAAUI,EAAUC,EAAWY,EAAqBI,EAAgBf,EAAaqB,CAAS,CAAC,EAA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