@widy/sdk 1.0.17 → 1.0.19
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 +32 -6
- package/dist/enums.js +33 -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",
|
|
@@ -133,7 +135,12 @@ export declare enum ServiceType {
|
|
|
133
135
|
Donatik = "Donatik",
|
|
134
136
|
DonatePay = "DonatePay",
|
|
135
137
|
Destream = "Destream",
|
|
136
|
-
Tribute = "Tribute"
|
|
138
|
+
Tribute = "Tribute",
|
|
139
|
+
Kick = "Kick"
|
|
140
|
+
}
|
|
141
|
+
export declare enum Platform {
|
|
142
|
+
Twitch = "Twitch",
|
|
143
|
+
Kick = "Kick"
|
|
137
144
|
}
|
|
138
145
|
export declare enum StreamElementsEventType {
|
|
139
146
|
tip = "tip"
|
|
@@ -142,12 +149,14 @@ export declare enum MessageType {
|
|
|
142
149
|
Donation = "Donation",
|
|
143
150
|
Subscription = "Subscription",
|
|
144
151
|
Follow = "Follow",
|
|
145
|
-
Raid = "Raid"
|
|
152
|
+
Raid = "Raid",
|
|
153
|
+
Redemption = "Redemption"
|
|
146
154
|
}
|
|
147
155
|
export declare enum GoalType {
|
|
148
156
|
Donation = "Donation",
|
|
149
157
|
TwitchSubscription = "TwitchSubscription",
|
|
150
|
-
TwitchFollow = "TwitchFollow"
|
|
158
|
+
TwitchFollow = "TwitchFollow",
|
|
159
|
+
KickSubscription = "KickSubscription"
|
|
151
160
|
}
|
|
152
161
|
export declare enum WidyNetwork {
|
|
153
162
|
Sol = "sol",
|
|
@@ -168,3 +177,20 @@ export declare enum NsfwLabel {
|
|
|
168
177
|
penis = "penis",
|
|
169
178
|
vagina = "vagina"
|
|
170
179
|
}
|
|
180
|
+
export declare enum RewardType {
|
|
181
|
+
Media = "Media",
|
|
182
|
+
Auction = "Auction",
|
|
183
|
+
Alert = "Alert"
|
|
184
|
+
}
|
|
185
|
+
export declare enum AlertVariant {
|
|
186
|
+
ImageAndAudio = "ImageAndAudio",
|
|
187
|
+
Image = "Image",
|
|
188
|
+
Audio = "Audio",
|
|
189
|
+
Video = "Video"
|
|
190
|
+
}
|
|
191
|
+
export declare enum TextAnimation {
|
|
192
|
+
No = "No"
|
|
193
|
+
}
|
|
194
|
+
export declare enum TextAnimationVariant {
|
|
195
|
+
AllText = "AllText"
|
|
196
|
+
}
|
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) {
|
|
@@ -146,7 +148,13 @@ export var ServiceType;
|
|
|
146
148
|
ServiceType["DonatePay"] = "DonatePay";
|
|
147
149
|
ServiceType["Destream"] = "Destream";
|
|
148
150
|
ServiceType["Tribute"] = "Tribute";
|
|
151
|
+
ServiceType["Kick"] = "Kick";
|
|
149
152
|
})(ServiceType || (ServiceType = {}));
|
|
153
|
+
export var Platform;
|
|
154
|
+
(function (Platform) {
|
|
155
|
+
Platform["Twitch"] = "Twitch";
|
|
156
|
+
Platform["Kick"] = "Kick";
|
|
157
|
+
})(Platform || (Platform = {}));
|
|
150
158
|
export var StreamElementsEventType;
|
|
151
159
|
(function (StreamElementsEventType) {
|
|
152
160
|
StreamElementsEventType["tip"] = "tip";
|
|
@@ -157,12 +165,14 @@ export var MessageType;
|
|
|
157
165
|
MessageType["Subscription"] = "Subscription";
|
|
158
166
|
MessageType["Follow"] = "Follow";
|
|
159
167
|
MessageType["Raid"] = "Raid";
|
|
168
|
+
MessageType["Redemption"] = "Redemption";
|
|
160
169
|
})(MessageType || (MessageType = {}));
|
|
161
170
|
export var GoalType;
|
|
162
171
|
(function (GoalType) {
|
|
163
172
|
GoalType["Donation"] = "Donation";
|
|
164
173
|
GoalType["TwitchSubscription"] = "TwitchSubscription";
|
|
165
174
|
GoalType["TwitchFollow"] = "TwitchFollow";
|
|
175
|
+
GoalType["KickSubscription"] = "KickSubscription";
|
|
166
176
|
})(GoalType || (GoalType = {}));
|
|
167
177
|
export var WidyNetwork;
|
|
168
178
|
(function (WidyNetwork) {
|
|
@@ -187,3 +197,24 @@ export var NsfwLabel;
|
|
|
187
197
|
NsfwLabel["penis"] = "penis";
|
|
188
198
|
NsfwLabel["vagina"] = "vagina";
|
|
189
199
|
})(NsfwLabel || (NsfwLabel = {}));
|
|
200
|
+
export var RewardType;
|
|
201
|
+
(function (RewardType) {
|
|
202
|
+
RewardType["Media"] = "Media";
|
|
203
|
+
RewardType["Auction"] = "Auction";
|
|
204
|
+
RewardType["Alert"] = "Alert";
|
|
205
|
+
})(RewardType || (RewardType = {}));
|
|
206
|
+
export var AlertVariant;
|
|
207
|
+
(function (AlertVariant) {
|
|
208
|
+
AlertVariant["ImageAndAudio"] = "ImageAndAudio";
|
|
209
|
+
AlertVariant["Image"] = "Image";
|
|
210
|
+
AlertVariant["Audio"] = "Audio";
|
|
211
|
+
AlertVariant["Video"] = "Video";
|
|
212
|
+
})(AlertVariant || (AlertVariant = {}));
|
|
213
|
+
export var TextAnimation;
|
|
214
|
+
(function (TextAnimation) {
|
|
215
|
+
TextAnimation["No"] = "No";
|
|
216
|
+
})(TextAnimation || (TextAnimation = {}));
|
|
217
|
+
export var TextAnimationVariant;
|
|
218
|
+
(function (TextAnimationVariant) {
|
|
219
|
+
TextAnimationVariant["AllText"] = "AllText";
|
|
220
|
+
})(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
|
+
}
|