@widy/sdk 1.0.15 → 1.0.17

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 CHANGED
@@ -52,7 +52,9 @@ export declare enum AppEvent {
52
52
  TwitchRewardRedemptionAdd = "TwitchRewardRedemptionAdd",
53
53
  CreateDonationAccount = "CreateDonationAccount",
54
54
  WidgetViewStorage = "WidgetViewStorage",
55
- WidgetControlStorage = "WidgetControlStorage"
55
+ WidgetControlStorage = "WidgetControlStorage",
56
+ NsfwDetection = "NsfwDetection",
57
+ NsfwSettings = "NsfwSettings"
56
58
  }
57
59
  export declare enum StreamElementsEvent {
58
60
  Connect = "Connect",
@@ -121,7 +123,6 @@ export declare enum GoalProgressLayout {
121
123
  CurrentAmountRemainingAmountPercent = "CurrentAmountRemainingAmountPercent"
122
124
  }
123
125
  export declare enum ServiceType {
124
- TributeBot = "TributeBot",
125
126
  Streamelements = "Streamelements",
126
127
  Twitch = "Twitch",
127
128
  WidySol = "WidySol",
@@ -129,7 +130,10 @@ export declare enum ServiceType {
129
130
  DonationAlerts = "DonationAlerts",
130
131
  StreamLabs = "StreamLabs",
131
132
  Donatello = "Donatello",
132
- Donatik = "Donatik"
133
+ Donatik = "Donatik",
134
+ DonatePay = "DonatePay",
135
+ Destream = "Destream",
136
+ Tribute = "Tribute"
133
137
  }
134
138
  export declare enum StreamElementsEventType {
135
139
  tip = "tip"
@@ -157,3 +161,10 @@ export declare enum Gender {
157
161
  Male = "Male",
158
162
  Female = "Edge"
159
163
  }
164
+ export declare enum NsfwLabel {
165
+ anus = "anus",
166
+ make_love = "make_love",
167
+ nipple = "nipple",
168
+ penis = "penis",
169
+ vagina = "vagina"
170
+ }
package/dist/enums.js CHANGED
@@ -56,6 +56,8 @@ export var AppEvent;
56
56
  AppEvent["CreateDonationAccount"] = "CreateDonationAccount";
57
57
  AppEvent["WidgetViewStorage"] = "WidgetViewStorage";
58
58
  AppEvent["WidgetControlStorage"] = "WidgetControlStorage";
59
+ AppEvent["NsfwDetection"] = "NsfwDetection";
60
+ AppEvent["NsfwSettings"] = "NsfwSettings";
59
61
  })(AppEvent || (AppEvent = {}));
60
62
  export var StreamElementsEvent;
61
63
  (function (StreamElementsEvent) {
@@ -133,7 +135,6 @@ export var GoalProgressLayout;
133
135
  })(GoalProgressLayout || (GoalProgressLayout = {}));
134
136
  export var ServiceType;
135
137
  (function (ServiceType) {
136
- ServiceType["TributeBot"] = "TributeBot";
137
138
  ServiceType["Streamelements"] = "Streamelements";
138
139
  ServiceType["Twitch"] = "Twitch";
139
140
  ServiceType["WidySol"] = "WidySol";
@@ -142,6 +143,9 @@ export var ServiceType;
142
143
  ServiceType["StreamLabs"] = "StreamLabs";
143
144
  ServiceType["Donatello"] = "Donatello";
144
145
  ServiceType["Donatik"] = "Donatik";
146
+ ServiceType["DonatePay"] = "DonatePay";
147
+ ServiceType["Destream"] = "Destream";
148
+ ServiceType["Tribute"] = "Tribute";
145
149
  })(ServiceType || (ServiceType = {}));
146
150
  export var StreamElementsEventType;
147
151
  (function (StreamElementsEventType) {
@@ -175,3 +179,11 @@ export var Gender;
175
179
  Gender["Male"] = "Male";
176
180
  Gender["Female"] = "Edge";
177
181
  })(Gender || (Gender = {}));
182
+ export var NsfwLabel;
183
+ (function (NsfwLabel) {
184
+ NsfwLabel["anus"] = "anus";
185
+ NsfwLabel["make_love"] = "make_love";
186
+ NsfwLabel["nipple"] = "nipple";
187
+ NsfwLabel["penis"] = "penis";
188
+ NsfwLabel["vagina"] = "vagina";
189
+ })(NsfwLabel || (NsfwLabel = {}));
@@ -1,6 +1,7 @@
1
1
  import type { RsbuildPlugin } from "@rsbuild/core";
2
- export declare function rsBuildHotReloadPlugin({ port, delay, entryFilePath, }: {
2
+ export declare function rsBuildHotReloadPlugin({ port, delay, entryFilePath, isExtension, }: {
3
3
  port?: number;
4
4
  delay?: number;
5
5
  entryFilePath: string;
6
+ isExtension?: boolean;
6
7
  }): RsbuildPlugin;
@@ -1,5 +1,5 @@
1
1
  import { WebSocketServer } from "ws";
2
- export function rsBuildHotReloadPlugin({ port = 4777, delay = 400, entryFilePath, }) {
2
+ export function rsBuildHotReloadPlugin({ port = 4777, delay = 400, entryFilePath, isExtension = false, }) {
3
3
  const isWatch = process.argv.includes("--watch");
4
4
  return {
5
5
  name: "hot-reload-widget",
@@ -9,6 +9,9 @@ export function rsBuildHotReloadPlugin({ port = 4777, delay = 400, entryFilePath
9
9
  const ws = new WebSocketServer({ port });
10
10
  api.transform({}, ({ code, resourcePath }) => {
11
11
  if (resourcePath === entryFilePath) {
12
+ const runtimeReload = isExtension
13
+ ? "chrome.runtime.reload()"
14
+ : "window.location.reload()";
12
15
  const hotReloadSnippet = `
13
16
  (function() {
14
17
  function connect() {
@@ -16,7 +19,7 @@ export function rsBuildHotReloadPlugin({ port = 4777, delay = 400, entryFilePath
16
19
 
17
20
  ws.addEventListener('message', (event) => {
18
21
  if (event.data === 'hot-reload-widget') {
19
- setTimeout(() => window.location.reload(), ${delay});
22
+ setTimeout(() => ${runtimeReload}, ${delay});
20
23
  }
21
24
  });
22
25
 
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AlertVariationConditions, AppEvent, Currency, Gender, GoalProgressLayout, GoalTextPosition, GoalType, MediaType, MessageType, ServiceType, StreamElementsEventType, TtsType, ViewType, WidyNetwork } from "./enums";
1
+ import type { AlertVariationConditions, AppEvent, Currency, Gender, GoalProgressLayout, GoalTextPosition, GoalType, MediaType, MessageType, NsfwLabel, ServiceType, StreamElementsEventType, TtsType, ViewType, WidyNetwork } from "./enums";
2
2
  export interface IClientMessage {
3
3
  id: string;
4
4
  type: MessageType;
@@ -213,9 +213,12 @@ export interface IImportedLot {
213
213
  investors: [];
214
214
  }
215
215
  export interface IEventsService extends ISubscriptions {
216
+ connected: boolean;
216
217
  connect: () => void;
217
218
  disconnect: () => void;
218
219
  send: <T>(message: IEventMessage<T>) => void;
220
+ addStatusListener: (listener: (connected: boolean) => void) => void;
221
+ removeStatusListener: (listener: (connected: boolean) => void) => void;
219
222
  }
220
223
  export interface IGoal {
221
224
  id: string;
@@ -255,6 +258,15 @@ export interface IStreamElementsAuth {
255
258
  export interface IDonationAlertsAuth {
256
259
  token: string;
257
260
  }
261
+ export interface IDestreamAuth {
262
+ overlayid: string;
263
+ }
264
+ export interface ITributeAuth {
265
+ api_key: string;
266
+ }
267
+ export interface IDonatePayAuth {
268
+ access_token: string;
269
+ }
258
270
  export interface IStreamLabsAuth {
259
271
  jwt: string;
260
272
  }
@@ -400,3 +412,24 @@ export interface IManifest {
400
412
  scopes: string[];
401
413
  connect_src: string[];
402
414
  }
415
+ export interface IWindowInfo {
416
+ title: string;
417
+ id: number;
418
+ selected: boolean;
419
+ }
420
+ export interface INsfwSettings {
421
+ id: number;
422
+ labels_confidence: ILabelsConfidence;
423
+ blur_timeout_duration: number;
424
+ }
425
+ export interface ILabelsConfidence {
426
+ anus: number;
427
+ make_love: number;
428
+ nipple: number;
429
+ penis: number;
430
+ vagina: number;
431
+ }
432
+ export interface INsfwDetection {
433
+ label: NsfwLabel;
434
+ confidence: number;
435
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widy/sdk",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "A TypeScript SDK for Widy widget integrations.",
5
5
  "license": "ISC",
6
6
  "author": "ik1s3v",