@widy/sdk 1.0.17 → 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 +27 -4
- package/dist/enums.js +30 -2
- package/dist/types.d.ts +63 -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",
|
|
@@ -135,6 +137,9 @@ export declare enum ServiceType {
|
|
|
135
137
|
Destream = "Destream",
|
|
136
138
|
Tribute = "Tribute"
|
|
137
139
|
}
|
|
140
|
+
export declare enum Platform {
|
|
141
|
+
Twitch = "Twitch"
|
|
142
|
+
}
|
|
138
143
|
export declare enum StreamElementsEventType {
|
|
139
144
|
tip = "tip"
|
|
140
145
|
}
|
|
@@ -142,7 +147,8 @@ export declare enum MessageType {
|
|
|
142
147
|
Donation = "Donation",
|
|
143
148
|
Subscription = "Subscription",
|
|
144
149
|
Follow = "Follow",
|
|
145
|
-
Raid = "Raid"
|
|
150
|
+
Raid = "Raid",
|
|
151
|
+
Redemption = "Redemption"
|
|
146
152
|
}
|
|
147
153
|
export declare enum GoalType {
|
|
148
154
|
Donation = "Donation",
|
|
@@ -168,3 +174,20 @@ export declare enum NsfwLabel {
|
|
|
168
174
|
penis = "penis",
|
|
169
175
|
vagina = "vagina"
|
|
170
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) {
|
|
@@ -147,6 +149,10 @@ export var ServiceType;
|
|
|
147
149
|
ServiceType["Destream"] = "Destream";
|
|
148
150
|
ServiceType["Tribute"] = "Tribute";
|
|
149
151
|
})(ServiceType || (ServiceType = {}));
|
|
152
|
+
export var Platform;
|
|
153
|
+
(function (Platform) {
|
|
154
|
+
Platform["Twitch"] = "Twitch";
|
|
155
|
+
})(Platform || (Platform = {}));
|
|
150
156
|
export var StreamElementsEventType;
|
|
151
157
|
(function (StreamElementsEventType) {
|
|
152
158
|
StreamElementsEventType["tip"] = "tip";
|
|
@@ -157,6 +163,7 @@ export var MessageType;
|
|
|
157
163
|
MessageType["Subscription"] = "Subscription";
|
|
158
164
|
MessageType["Follow"] = "Follow";
|
|
159
165
|
MessageType["Raid"] = "Raid";
|
|
166
|
+
MessageType["Redemption"] = "Redemption";
|
|
160
167
|
})(MessageType || (MessageType = {}));
|
|
161
168
|
export var GoalType;
|
|
162
169
|
(function (GoalType) {
|
|
@@ -187,3 +194,24 @@ export var NsfwLabel;
|
|
|
187
194
|
NsfwLabel["penis"] = "penis";
|
|
188
195
|
NsfwLabel["vagina"] = "vagina";
|
|
189
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;
|
|
@@ -305,67 +313,11 @@ export interface ITwitchDeviceCodeResponse {
|
|
|
305
313
|
user_code: string;
|
|
306
314
|
verification_uri: string;
|
|
307
315
|
}
|
|
308
|
-
export interface ITwitchReward {
|
|
309
|
-
title: string;
|
|
310
|
-
cost: number;
|
|
311
|
-
}
|
|
312
|
-
export interface ITwitchEventPayload<T> {
|
|
313
|
-
subscription: ITwitchSubscription;
|
|
314
|
-
event: T;
|
|
315
|
-
}
|
|
316
|
-
export interface ITwitchRedemptionEvent {
|
|
317
|
-
user_id: string;
|
|
318
|
-
id: string;
|
|
319
|
-
user_login: string;
|
|
320
|
-
user_name: string;
|
|
321
|
-
user_input: string;
|
|
322
|
-
status: string;
|
|
323
|
-
broadcaster_user_id: string;
|
|
324
|
-
broadcaster_user_login: string;
|
|
325
|
-
broadcaster_user_name: string;
|
|
326
|
-
followed_at: string;
|
|
327
|
-
redeemed_at: string;
|
|
328
|
-
reward: ITwitchReward;
|
|
329
|
-
}
|
|
330
|
-
export interface ITwitchReward {
|
|
331
|
-
id: string;
|
|
332
|
-
title: string;
|
|
333
|
-
prompt: string;
|
|
334
|
-
cost: number;
|
|
335
|
-
}
|
|
336
|
-
export interface ITwitchSubscription {
|
|
337
|
-
id: string;
|
|
338
|
-
status: string;
|
|
339
|
-
type: string;
|
|
340
|
-
version: string;
|
|
341
|
-
cost: number;
|
|
342
|
-
condition: {
|
|
343
|
-
broadcaster_user_id: string;
|
|
344
|
-
user_id?: string;
|
|
345
|
-
};
|
|
346
|
-
transport: {
|
|
347
|
-
method: string;
|
|
348
|
-
session_id: string;
|
|
349
|
-
};
|
|
350
|
-
created_at: string;
|
|
351
|
-
}
|
|
352
|
-
export interface ITwitchIntegrationSettings {
|
|
353
|
-
points_currency_ratio: number;
|
|
354
|
-
rewards_name: string;
|
|
355
|
-
rewards: ITwitchIntegrationReward[];
|
|
356
|
-
}
|
|
357
316
|
export interface IWidyAuth {
|
|
358
317
|
donation_account_name: string;
|
|
359
318
|
donation_account_address: string;
|
|
360
319
|
user: string;
|
|
361
320
|
}
|
|
362
|
-
export interface ITwitchIntegrationReward {
|
|
363
|
-
id: string;
|
|
364
|
-
reward_id: string | null;
|
|
365
|
-
subscription_id: string | null;
|
|
366
|
-
cost: number;
|
|
367
|
-
color: string;
|
|
368
|
-
}
|
|
369
321
|
export interface IDeepLinkQueryParams {
|
|
370
322
|
nonce: string | null;
|
|
371
323
|
donation_account_name: string;
|
|
@@ -433,3 +385,54 @@ export interface INsfwDetection {
|
|
|
433
385
|
label: NsfwLabel;
|
|
434
386
|
confidence: number;
|
|
435
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
|
+
}
|