@stripchatdev/ext-helper 0.1.36 → 0.1.37
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 +15 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -118,7 +118,7 @@ declare type TV1ChatEvents = {
|
|
|
118
118
|
|
|
119
119
|
declare type TV1ChatMethods = {
|
|
120
120
|
/**
|
|
121
|
-
* This method should be used to notify a user in the chat about an event related to the extension, for example, showing the result of a game.
|
|
121
|
+
* This method should be used to notify a user in the chat about an event related to the extension, for example, showing the result of a game. Therefore, it should be used only after `v1.payment.tokens.spend.succeeded` event.
|
|
122
122
|
*
|
|
123
123
|
* The message is sent locally to each user on behalf of the extension. The message is not sent to the server
|
|
124
124
|
* and is not broadcasted — each user sees it injected into their own local chat feed.
|
|
@@ -132,6 +132,7 @@ declare type TV1ChatMethods = {
|
|
|
132
132
|
*/
|
|
133
133
|
'v1.chat.message.send': {
|
|
134
134
|
params: {
|
|
135
|
+
/** Whether the username should be hidden. Always respect user's anonimity and use data received in `v1.payment.tokens.spend.succeeded'. */
|
|
135
136
|
isAnonymous: boolean;
|
|
136
137
|
/**
|
|
137
138
|
* Chat message text.
|
|
@@ -220,6 +221,8 @@ export declare type TV1ExtLoggedInUser = {
|
|
|
220
221
|
id: TUserId;
|
|
221
222
|
/** User is logged in. */
|
|
222
223
|
isGuest: false;
|
|
224
|
+
/** User is invisible. Do not expose any data of invisible users. */
|
|
225
|
+
isInvisible: boolean;
|
|
223
226
|
/** User is the highest tipper in the room over past 12 hours. */
|
|
224
227
|
isKing: boolean;
|
|
225
228
|
/** User is a knight of the model. */
|
|
@@ -305,10 +308,12 @@ declare type TV1ExtMethods = {
|
|
|
305
308
|
/** Broadcasts a message through the server to all clients in the room that have this extension loaded. Every slot iframe of every user receives the corresponding `v1.ext.whispered` event */
|
|
306
309
|
'v1.ext.whisper': {
|
|
307
310
|
params: {
|
|
308
|
-
/** Any JSON-serializable object to send to every frame
|
|
311
|
+
/** Any JSON-serializable object to send to every frame.
|
|
312
|
+
* Never send any sensetive data through this field, such as username or user id.
|
|
313
|
+
* */
|
|
309
314
|
data: TV1WhisperData;
|
|
310
|
-
/** Payment data
|
|
311
|
-
*
|
|
315
|
+
/** Payment data returned by the `payment.tokens.spend.succeeded` event.
|
|
316
|
+
* Required for users in public shows. Use it only once for the request it authorizes. Do not store or reuse it.
|
|
312
317
|
* */
|
|
313
318
|
paymentData?: TV1PaymentData;
|
|
314
319
|
};
|
|
@@ -415,6 +420,7 @@ declare type TV1MonitoringMethods = {
|
|
|
415
420
|
};
|
|
416
421
|
};
|
|
417
422
|
|
|
423
|
+
/** Payment data returned after a successful token spend. Use it only once for the request it authorizes. Do not store or reuse it. */
|
|
418
424
|
export declare type TV1PaymentData = {
|
|
419
425
|
/** The amount of tokens spent */
|
|
420
426
|
amount: string;
|
|
@@ -429,12 +435,12 @@ export declare type TV1PaymentData = {
|
|
|
429
435
|
declare type TV1PaymentEvents = {
|
|
430
436
|
/**
|
|
431
437
|
* Received when tokens are successfully spent
|
|
432
|
-
* Contains
|
|
438
|
+
* Contains payment data returned after a successful token spend. Use it only once for the request it authorizes. Do not store or reuse it.
|
|
433
439
|
*/
|
|
434
440
|
'v1.payment.tokens.spend.succeeded': {
|
|
435
|
-
/** Was the tip anonymous */
|
|
441
|
+
/** Was the tip anonymous. Use this field in `v1.chat.message.send` */
|
|
436
442
|
isAnonymous: boolean;
|
|
437
|
-
/** Payment data
|
|
443
|
+
/** Payment data returned after a successful token spend. Use it only once for the request it authorizes. Do not store or reuse it. */
|
|
438
444
|
paymentData: TV1PaymentData;
|
|
439
445
|
/** Custom data passed in `payment.tokens.spend` method */
|
|
440
446
|
tokensSpendData: TV1TokenSpendData;
|
|
@@ -498,7 +504,9 @@ declare type TV1SessionMethods = {
|
|
|
498
504
|
};
|
|
499
505
|
'v1.session.join.user': {
|
|
500
506
|
params: {
|
|
507
|
+
/** Payment data returned by the `payment.tokens.spend.succeeded` event. Use it only once for the request it authorizes. Do not store or reuse it. */
|
|
501
508
|
payment: TV1PaymentData;
|
|
509
|
+
/** Session lifetime in seconds (minimum 1). */
|
|
502
510
|
ttl: string;
|
|
503
511
|
};
|
|
504
512
|
result: null;
|