@stripchatdev/ext-helper 0.1.13 → 0.1.15
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/index.d.ts +71 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -100,6 +100,18 @@ export declare type TV1ActionResult = {
|
|
|
100
100
|
code: number;
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
+
declare type TV1ChatEvents = {
|
|
104
|
+
/** Triggered on every new message in chat */
|
|
105
|
+
'v1.chat.message.received': {
|
|
106
|
+
/** Text of the message */
|
|
107
|
+
messageText: string;
|
|
108
|
+
/** User who sent the message **/
|
|
109
|
+
sender: TV1ExtUser;
|
|
110
|
+
/** Whether message was sent in public or private chat **/
|
|
111
|
+
type: 'private' | 'public';
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
|
|
103
115
|
declare type TV1ChatMethods = {
|
|
104
116
|
'v1.chat.message.send': {
|
|
105
117
|
params: {
|
|
@@ -109,9 +121,32 @@ declare type TV1ChatMethods = {
|
|
|
109
121
|
};
|
|
110
122
|
result: null;
|
|
111
123
|
};
|
|
124
|
+
/** Use this method to send a message in the chat as a bot or model
|
|
125
|
+
* The message is sent locally to each user.
|
|
126
|
+
* */
|
|
127
|
+
'v1.chatbot.message.send': {
|
|
128
|
+
params: {
|
|
129
|
+
/** Sender of the message.
|
|
130
|
+
* If `bot`, the message will be sent with the name of the extension
|
|
131
|
+
* If `model`, the message will be sent with the name of the current model
|
|
132
|
+
* */
|
|
133
|
+
from: 'bot' | 'model';
|
|
134
|
+
/** Text of the message.
|
|
135
|
+
*
|
|
136
|
+
*
|
|
137
|
+
* The message can contain {username} placeholder, which will be replaced with the name of the user receiving the message.
|
|
138
|
+
* If the user is anonymous, the placeholder will be replaced with empty string.
|
|
139
|
+
* If the user is guest, the placeholder will be replaced with "Guest".
|
|
140
|
+
*
|
|
141
|
+
* Example usage: "Hello, {username}! Welcome to the chat!"
|
|
142
|
+
* */
|
|
143
|
+
message: string;
|
|
144
|
+
};
|
|
145
|
+
result: null;
|
|
146
|
+
};
|
|
112
147
|
};
|
|
113
148
|
|
|
114
|
-
export declare type TV1Events = TV1ExtEvents & TV1PaymentEvents & TV1ModelEvents & TV1TipEvents;
|
|
149
|
+
export declare type TV1Events = TV1ExtEvents & TV1PaymentEvents & TV1ModelEvents & TV1TipEvents & TV1ChatEvents;
|
|
115
150
|
|
|
116
151
|
export declare type TV1ExtContext = {
|
|
117
152
|
model?: TV1ExtModel;
|
|
@@ -265,7 +300,7 @@ export declare type TV1ExtUser = {
|
|
|
265
300
|
|
|
266
301
|
export declare type TV1Genders = 'male' | 'female' | 'group' | 'tranny';
|
|
267
302
|
|
|
268
|
-
export declare type TV1Methods = TV1ExtMethods & TV1SystemMethods & TV1PaymentMethods & TV1ModelMethods & TV1ChatMethods & TV1PrivateMethods & TV1MonitoringMethods & TV1StorageMethods;
|
|
303
|
+
export declare type TV1Methods = TV1ExtMethods & TV1SystemMethods & TV1PaymentMethods & TV1ModelMethods & TV1ChatMethods & TV1PrivateMethods & TV1MonitoringMethods & TV1StorageMethods & TV1TipMethods;
|
|
269
304
|
|
|
270
305
|
declare type TV1ModelEvents = {
|
|
271
306
|
'v1.model.ext.settings.set.requested': null;
|
|
@@ -569,12 +604,46 @@ export declare type TV1TipData = {
|
|
|
569
604
|
};
|
|
570
605
|
|
|
571
606
|
declare type TV1TipEvents = {
|
|
607
|
+
/** Fired when the tip menu has been updated.*/
|
|
608
|
+
'v1.tipMenu.updated': {
|
|
609
|
+
/** The current tip menu data. */
|
|
610
|
+
tipMenu: TV1TipMenu;
|
|
611
|
+
};
|
|
572
612
|
/** Fired on every tip in chat for both model and user. Doesn't fire on private tips during public shows */
|
|
573
613
|
'v1.tokens.spent': {
|
|
574
614
|
tipData: TV1TipData;
|
|
575
615
|
};
|
|
576
616
|
};
|
|
577
617
|
|
|
618
|
+
/** Tip menu data */
|
|
619
|
+
export declare type TV1TipMenu = {
|
|
620
|
+
/** Whether tip menu is enabled or not. If it's disabled, the `items` array will be empty. */
|
|
621
|
+
isEnabled: boolean;
|
|
622
|
+
/** The list of tip menu items sorted by the model. */
|
|
623
|
+
items: TV1TipMenuItem[];
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
/** Tip menu item defined by the model. */
|
|
627
|
+
export declare type TV1TipMenuItem = {
|
|
628
|
+
/** Activity name */
|
|
629
|
+
activity: string;
|
|
630
|
+
/** Price of the activity for the current user applying all discounts.
|
|
631
|
+
* Discounds can be applied based on the user's fan club memberhip.
|
|
632
|
+
* */
|
|
633
|
+
price: number;
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
declare type TV1TipMethods = {
|
|
637
|
+
/** Get the current tip menu. Tip menu data might change during the broadcast, so subscribe to `v1.tipMenu.updated` to listen to these changes. */
|
|
638
|
+
'v1.tipMenu.get': {
|
|
639
|
+
params: null;
|
|
640
|
+
result: {
|
|
641
|
+
/** The current tip menu data. */
|
|
642
|
+
tipMenu: TV1TipMenu;
|
|
643
|
+
};
|
|
644
|
+
};
|
|
645
|
+
};
|
|
646
|
+
|
|
578
647
|
/** Source of the tip. Could be one of the following:
|
|
579
648
|
*
|
|
580
649
|
* `console` - tip was sent using / command
|