@widy/sdk 1.0.16 → 1.0.18
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/dist/enums.d.ts +30 -6
- package/dist/enums.js +32 -3
- package/dist/types.d.ts +69 -60
- package/package.json +1 -1
package/dist/enums.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare enum Language {
|
|
|
18
18
|
}
|
|
19
19
|
export declare enum AppEvent {
|
|
20
20
|
Message = "Message",
|
|
21
|
-
|
|
21
|
+
Media = "Media",
|
|
22
22
|
SkipAlert = "SkipAlert",
|
|
23
23
|
ReplayAlert = "ReplayAlert",
|
|
24
24
|
AlertPlaying = "AlertPlaying",
|
|
@@ -49,12 +49,14 @@ export declare enum AppEvent {
|
|
|
49
49
|
AucFighterSettings = "AucFighterSettings",
|
|
50
50
|
TestAlert = "TestAlert",
|
|
51
51
|
Goal = "Goal",
|
|
52
|
-
TwitchRewardRedemptionAdd = "TwitchRewardRedemptionAdd",
|
|
53
52
|
CreateDonationAccount = "CreateDonationAccount",
|
|
54
53
|
WidgetViewStorage = "WidgetViewStorage",
|
|
55
54
|
WidgetControlStorage = "WidgetControlStorage",
|
|
56
55
|
NsfwDetection = "NsfwDetection",
|
|
57
|
-
NsfwSettings = "NsfwSettings"
|
|
56
|
+
NsfwSettings = "NsfwSettings",
|
|
57
|
+
Alert = "Alert",
|
|
58
|
+
Donation = "Donation",
|
|
59
|
+
Redemption = "Redemption"
|
|
58
60
|
}
|
|
59
61
|
export declare enum StreamElementsEvent {
|
|
60
62
|
Connect = "Connect",
|
|
@@ -123,7 +125,6 @@ export declare enum GoalProgressLayout {
|
|
|
123
125
|
CurrentAmountRemainingAmountPercent = "CurrentAmountRemainingAmountPercent"
|
|
124
126
|
}
|
|
125
127
|
export declare enum ServiceType {
|
|
126
|
-
TributeBot = "TributeBot",
|
|
127
128
|
Streamelements = "Streamelements",
|
|
128
129
|
Twitch = "Twitch",
|
|
129
130
|
WidySol = "WidySol",
|
|
@@ -132,7 +133,12 @@ export declare enum ServiceType {
|
|
|
132
133
|
StreamLabs = "StreamLabs",
|
|
133
134
|
Donatello = "Donatello",
|
|
134
135
|
Donatik = "Donatik",
|
|
135
|
-
DonatePay = "DonatePay"
|
|
136
|
+
DonatePay = "DonatePay",
|
|
137
|
+
Destream = "Destream",
|
|
138
|
+
Tribute = "Tribute"
|
|
139
|
+
}
|
|
140
|
+
export declare enum Platform {
|
|
141
|
+
Twitch = "Twitch"
|
|
136
142
|
}
|
|
137
143
|
export declare enum StreamElementsEventType {
|
|
138
144
|
tip = "tip"
|
|
@@ -141,7 +147,8 @@ export declare enum MessageType {
|
|
|
141
147
|
Donation = "Donation",
|
|
142
148
|
Subscription = "Subscription",
|
|
143
149
|
Follow = "Follow",
|
|
144
|
-
Raid = "Raid"
|
|
150
|
+
Raid = "Raid",
|
|
151
|
+
Redemption = "Redemption"
|
|
145
152
|
}
|
|
146
153
|
export declare enum GoalType {
|
|
147
154
|
Donation = "Donation",
|
|
@@ -167,3 +174,20 @@ export declare enum NsfwLabel {
|
|
|
167
174
|
penis = "penis",
|
|
168
175
|
vagina = "vagina"
|
|
169
176
|
}
|
|
177
|
+
export declare enum RewardType {
|
|
178
|
+
Media = "Media",
|
|
179
|
+
Auction = "Auction",
|
|
180
|
+
Alert = "Alert"
|
|
181
|
+
}
|
|
182
|
+
export declare enum AlertVariant {
|
|
183
|
+
ImageAndAudio = "ImageAndAudio",
|
|
184
|
+
Image = "Image",
|
|
185
|
+
Audio = "Audio",
|
|
186
|
+
Video = "Video"
|
|
187
|
+
}
|
|
188
|
+
export declare enum TextAnimation {
|
|
189
|
+
No = "No"
|
|
190
|
+
}
|
|
191
|
+
export declare enum TextAnimationVariant {
|
|
192
|
+
AllText = "AllText"
|
|
193
|
+
}
|
package/dist/enums.js
CHANGED
|
@@ -21,7 +21,7 @@ export var Language;
|
|
|
21
21
|
export var AppEvent;
|
|
22
22
|
(function (AppEvent) {
|
|
23
23
|
AppEvent["Message"] = "Message";
|
|
24
|
-
AppEvent["
|
|
24
|
+
AppEvent["Media"] = "Media";
|
|
25
25
|
AppEvent["SkipAlert"] = "SkipAlert";
|
|
26
26
|
AppEvent["ReplayAlert"] = "ReplayAlert";
|
|
27
27
|
AppEvent["AlertPlaying"] = "AlertPlaying";
|
|
@@ -52,12 +52,14 @@ export var AppEvent;
|
|
|
52
52
|
AppEvent["AucFighterSettings"] = "AucFighterSettings";
|
|
53
53
|
AppEvent["TestAlert"] = "TestAlert";
|
|
54
54
|
AppEvent["Goal"] = "Goal";
|
|
55
|
-
AppEvent["TwitchRewardRedemptionAdd"] = "TwitchRewardRedemptionAdd";
|
|
56
55
|
AppEvent["CreateDonationAccount"] = "CreateDonationAccount";
|
|
57
56
|
AppEvent["WidgetViewStorage"] = "WidgetViewStorage";
|
|
58
57
|
AppEvent["WidgetControlStorage"] = "WidgetControlStorage";
|
|
59
58
|
AppEvent["NsfwDetection"] = "NsfwDetection";
|
|
60
59
|
AppEvent["NsfwSettings"] = "NsfwSettings";
|
|
60
|
+
AppEvent["Alert"] = "Alert";
|
|
61
|
+
AppEvent["Donation"] = "Donation";
|
|
62
|
+
AppEvent["Redemption"] = "Redemption";
|
|
61
63
|
})(AppEvent || (AppEvent = {}));
|
|
62
64
|
export var StreamElementsEvent;
|
|
63
65
|
(function (StreamElementsEvent) {
|
|
@@ -135,7 +137,6 @@ export var GoalProgressLayout;
|
|
|
135
137
|
})(GoalProgressLayout || (GoalProgressLayout = {}));
|
|
136
138
|
export var ServiceType;
|
|
137
139
|
(function (ServiceType) {
|
|
138
|
-
ServiceType["TributeBot"] = "TributeBot";
|
|
139
140
|
ServiceType["Streamelements"] = "Streamelements";
|
|
140
141
|
ServiceType["Twitch"] = "Twitch";
|
|
141
142
|
ServiceType["WidySol"] = "WidySol";
|
|
@@ -145,7 +146,13 @@ export var ServiceType;
|
|
|
145
146
|
ServiceType["Donatello"] = "Donatello";
|
|
146
147
|
ServiceType["Donatik"] = "Donatik";
|
|
147
148
|
ServiceType["DonatePay"] = "DonatePay";
|
|
149
|
+
ServiceType["Destream"] = "Destream";
|
|
150
|
+
ServiceType["Tribute"] = "Tribute";
|
|
148
151
|
})(ServiceType || (ServiceType = {}));
|
|
152
|
+
export var Platform;
|
|
153
|
+
(function (Platform) {
|
|
154
|
+
Platform["Twitch"] = "Twitch";
|
|
155
|
+
})(Platform || (Platform = {}));
|
|
149
156
|
export var StreamElementsEventType;
|
|
150
157
|
(function (StreamElementsEventType) {
|
|
151
158
|
StreamElementsEventType["tip"] = "tip";
|
|
@@ -156,6 +163,7 @@ export var MessageType;
|
|
|
156
163
|
MessageType["Subscription"] = "Subscription";
|
|
157
164
|
MessageType["Follow"] = "Follow";
|
|
158
165
|
MessageType["Raid"] = "Raid";
|
|
166
|
+
MessageType["Redemption"] = "Redemption";
|
|
159
167
|
})(MessageType || (MessageType = {}));
|
|
160
168
|
export var GoalType;
|
|
161
169
|
(function (GoalType) {
|
|
@@ -186,3 +194,24 @@ export var NsfwLabel;
|
|
|
186
194
|
NsfwLabel["penis"] = "penis";
|
|
187
195
|
NsfwLabel["vagina"] = "vagina";
|
|
188
196
|
})(NsfwLabel || (NsfwLabel = {}));
|
|
197
|
+
export var RewardType;
|
|
198
|
+
(function (RewardType) {
|
|
199
|
+
RewardType["Media"] = "Media";
|
|
200
|
+
RewardType["Auction"] = "Auction";
|
|
201
|
+
RewardType["Alert"] = "Alert";
|
|
202
|
+
})(RewardType || (RewardType = {}));
|
|
203
|
+
export var AlertVariant;
|
|
204
|
+
(function (AlertVariant) {
|
|
205
|
+
AlertVariant["ImageAndAudio"] = "ImageAndAudio";
|
|
206
|
+
AlertVariant["Image"] = "Image";
|
|
207
|
+
AlertVariant["Audio"] = "Audio";
|
|
208
|
+
AlertVariant["Video"] = "Video";
|
|
209
|
+
})(AlertVariant || (AlertVariant = {}));
|
|
210
|
+
export var TextAnimation;
|
|
211
|
+
(function (TextAnimation) {
|
|
212
|
+
TextAnimation["No"] = "No";
|
|
213
|
+
})(TextAnimation || (TextAnimation = {}));
|
|
214
|
+
export var TextAnimationVariant;
|
|
215
|
+
(function (TextAnimationVariant) {
|
|
216
|
+
TextAnimationVariant["AllText"] = "AllText";
|
|
217
|
+
})(TextAnimationVariant || (TextAnimationVariant = {}));
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AlertVariationConditions, AppEvent, Currency, Gender, GoalProgressLayout, GoalTextPosition, GoalType, MediaType, MessageType, NsfwLabel, ServiceType, StreamElementsEventType, TtsType, ViewType, WidyNetwork } from "./enums";
|
|
1
|
+
import type { AlertVariant, AlertVariationConditions, AppEvent, Currency, Gender, GoalProgressLayout, GoalTextPosition, GoalType, MediaType, MessageType, NsfwLabel, Platform, RewardType, ServiceType, StreamElementsEventType, TextAnimation, TextAnimationVariant, TtsType, ViewType, WidyNetwork } from "./enums";
|
|
2
2
|
export interface IClientMessage {
|
|
3
3
|
id: string;
|
|
4
4
|
type: MessageType;
|
|
@@ -6,6 +6,7 @@ export interface IClientMessage {
|
|
|
6
6
|
follow?: IFollow;
|
|
7
7
|
subscription?: ISubscription;
|
|
8
8
|
raid?: IRaid;
|
|
9
|
+
redemption?: IRedemption;
|
|
9
10
|
created_at: number;
|
|
10
11
|
}
|
|
11
12
|
export interface IDonation {
|
|
@@ -69,6 +70,7 @@ export interface IMessagesFilter {
|
|
|
69
70
|
exclude_subscriptions: boolean;
|
|
70
71
|
exclude_follows: boolean;
|
|
71
72
|
exclude_raids: boolean;
|
|
73
|
+
exclude_redemptions: boolean;
|
|
72
74
|
}
|
|
73
75
|
export interface IEventMessage<T> {
|
|
74
76
|
event: AppEvent;
|
|
@@ -86,12 +88,16 @@ export interface ISubscriber<T = any> {
|
|
|
86
88
|
export type EventCallback<T> = (data: T) => void;
|
|
87
89
|
export interface IAlert {
|
|
88
90
|
id: string;
|
|
89
|
-
audio
|
|
91
|
+
audio?: string;
|
|
90
92
|
audio_volume: number;
|
|
91
93
|
view_type: ViewType;
|
|
92
94
|
type: MessageType;
|
|
93
|
-
image
|
|
94
|
-
|
|
95
|
+
image?: string;
|
|
96
|
+
video?: string;
|
|
97
|
+
video_volume: number;
|
|
98
|
+
delay: number;
|
|
99
|
+
duration: number;
|
|
100
|
+
alert_variant: AlertVariant;
|
|
95
101
|
group_id: string;
|
|
96
102
|
name: string;
|
|
97
103
|
variation_conditions: AlertVariationConditions;
|
|
@@ -108,6 +114,8 @@ export interface ITextStyle {
|
|
|
108
114
|
underline: boolean;
|
|
109
115
|
letter_spacing: number;
|
|
110
116
|
word_spacing: number;
|
|
117
|
+
animation: TextAnimation;
|
|
118
|
+
animation_variant: TextAnimationVariant;
|
|
111
119
|
}
|
|
112
120
|
export interface ISettings {
|
|
113
121
|
id: number;
|
|
@@ -258,6 +266,12 @@ export interface IStreamElementsAuth {
|
|
|
258
266
|
export interface IDonationAlertsAuth {
|
|
259
267
|
token: string;
|
|
260
268
|
}
|
|
269
|
+
export interface IDestreamAuth {
|
|
270
|
+
overlayid: string;
|
|
271
|
+
}
|
|
272
|
+
export interface ITributeAuth {
|
|
273
|
+
api_key: string;
|
|
274
|
+
}
|
|
261
275
|
export interface IDonatePayAuth {
|
|
262
276
|
access_token: string;
|
|
263
277
|
}
|
|
@@ -299,67 +313,11 @@ export interface ITwitchDeviceCodeResponse {
|
|
|
299
313
|
user_code: string;
|
|
300
314
|
verification_uri: string;
|
|
301
315
|
}
|
|
302
|
-
export interface ITwitchReward {
|
|
303
|
-
title: string;
|
|
304
|
-
cost: number;
|
|
305
|
-
}
|
|
306
|
-
export interface ITwitchEventPayload<T> {
|
|
307
|
-
subscription: ITwitchSubscription;
|
|
308
|
-
event: T;
|
|
309
|
-
}
|
|
310
|
-
export interface ITwitchRedemptionEvent {
|
|
311
|
-
user_id: string;
|
|
312
|
-
id: string;
|
|
313
|
-
user_login: string;
|
|
314
|
-
user_name: string;
|
|
315
|
-
user_input: string;
|
|
316
|
-
status: string;
|
|
317
|
-
broadcaster_user_id: string;
|
|
318
|
-
broadcaster_user_login: string;
|
|
319
|
-
broadcaster_user_name: string;
|
|
320
|
-
followed_at: string;
|
|
321
|
-
redeemed_at: string;
|
|
322
|
-
reward: ITwitchReward;
|
|
323
|
-
}
|
|
324
|
-
export interface ITwitchReward {
|
|
325
|
-
id: string;
|
|
326
|
-
title: string;
|
|
327
|
-
prompt: string;
|
|
328
|
-
cost: number;
|
|
329
|
-
}
|
|
330
|
-
export interface ITwitchSubscription {
|
|
331
|
-
id: string;
|
|
332
|
-
status: string;
|
|
333
|
-
type: string;
|
|
334
|
-
version: string;
|
|
335
|
-
cost: number;
|
|
336
|
-
condition: {
|
|
337
|
-
broadcaster_user_id: string;
|
|
338
|
-
user_id?: string;
|
|
339
|
-
};
|
|
340
|
-
transport: {
|
|
341
|
-
method: string;
|
|
342
|
-
session_id: string;
|
|
343
|
-
};
|
|
344
|
-
created_at: string;
|
|
345
|
-
}
|
|
346
|
-
export interface ITwitchIntegrationSettings {
|
|
347
|
-
points_currency_ratio: number;
|
|
348
|
-
rewards_name: string;
|
|
349
|
-
rewards: ITwitchIntegrationReward[];
|
|
350
|
-
}
|
|
351
316
|
export interface IWidyAuth {
|
|
352
317
|
donation_account_name: string;
|
|
353
318
|
donation_account_address: string;
|
|
354
319
|
user: string;
|
|
355
320
|
}
|
|
356
|
-
export interface ITwitchIntegrationReward {
|
|
357
|
-
id: string;
|
|
358
|
-
reward_id: string | null;
|
|
359
|
-
subscription_id: string | null;
|
|
360
|
-
cost: number;
|
|
361
|
-
color: string;
|
|
362
|
-
}
|
|
363
321
|
export interface IDeepLinkQueryParams {
|
|
364
322
|
nonce: string | null;
|
|
365
323
|
donation_account_name: string;
|
|
@@ -427,3 +385,54 @@ export interface INsfwDetection {
|
|
|
427
385
|
label: NsfwLabel;
|
|
428
386
|
confidence: number;
|
|
429
387
|
}
|
|
388
|
+
export interface IReward {
|
|
389
|
+
id: string;
|
|
390
|
+
platform: Platform;
|
|
391
|
+
type: RewardType;
|
|
392
|
+
external_id?: string;
|
|
393
|
+
title: string;
|
|
394
|
+
description?: string;
|
|
395
|
+
cost: number;
|
|
396
|
+
background_color: string;
|
|
397
|
+
is_user_input_required: boolean;
|
|
398
|
+
image?: string;
|
|
399
|
+
audio?: string;
|
|
400
|
+
points_currency_ratio: number;
|
|
401
|
+
video?: string;
|
|
402
|
+
alert_variant: AlertVariant;
|
|
403
|
+
audio_volume: number;
|
|
404
|
+
video_volume: number;
|
|
405
|
+
duration: number;
|
|
406
|
+
delay: number;
|
|
407
|
+
is_enabled: boolean;
|
|
408
|
+
is_max_per_stream_enabled?: boolean;
|
|
409
|
+
max_per_stream?: number;
|
|
410
|
+
is_max_per_user_per_stream_enabled?: boolean;
|
|
411
|
+
max_per_user_per_stream?: number;
|
|
412
|
+
is_global_cooldown_enabled?: boolean;
|
|
413
|
+
global_cooldown_seconds?: number;
|
|
414
|
+
should_redemptions_skip_request_queue?: boolean;
|
|
415
|
+
}
|
|
416
|
+
export interface IRedemption {
|
|
417
|
+
id: string;
|
|
418
|
+
user_id: string;
|
|
419
|
+
user_name: string;
|
|
420
|
+
user_input?: string;
|
|
421
|
+
reward_id: string;
|
|
422
|
+
external_id: string;
|
|
423
|
+
title: string;
|
|
424
|
+
description?: string;
|
|
425
|
+
cost: number;
|
|
426
|
+
platform: Platform;
|
|
427
|
+
type: RewardType;
|
|
428
|
+
points_currency_ratio: number;
|
|
429
|
+
media?: IMedia;
|
|
430
|
+
image?: string;
|
|
431
|
+
audio?: string;
|
|
432
|
+
video?: string;
|
|
433
|
+
alert_variant: AlertVariant;
|
|
434
|
+
audio_volume: number;
|
|
435
|
+
video_volume: number;
|
|
436
|
+
duration: number;
|
|
437
|
+
delay: number;
|
|
438
|
+
}
|