@stripchatdev/ext-helper 0.1.26 → 0.1.28

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +29 -3
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ declare class ExtHelper {
11
11
  bootstrap(): void;
12
12
  }
13
13
 
14
- export declare type IV1IntIncrementFailureReason = 'INT_INCREMENT_FAILURE_REASON_NONE' | 'INT_INCREMENT_FAILURE_REASON_VALIDATION_DENIED';
14
+ export declare type IV1IntIncrementFailureReason = 'INT_INCREMENT_FAILURE_REASON_UNSPECIFIED' | 'INT_INCREMENT_FAILURE_REASON_NONE' | 'INT_INCREMENT_FAILURE_REASON_VALIDATION_DENIED';
15
15
 
16
16
  export declare type IV1ResolveSlotPage = (slotType: string, context: TV1ExtContext, extSettings: TV1ExtSettings) => void;
17
17
 
@@ -164,6 +164,13 @@ declare type TV1ExtEvents = {
164
164
  'v1.ext.context.updated': {
165
165
  context: TV1ExtContext;
166
166
  };
167
+ /**
168
+ * Fired whenever the viewer counts for the room change.
169
+ * Emitted only for show types: `public`, `groupShow`, `ticketShow`.
170
+ */
171
+ 'v1.ext.viewers.updated': {
172
+ viewers: TV1ExtViewers;
173
+ };
167
174
  'v1.ext.whispered': TV1WhisperData;
168
175
  'v1.ext.whispered.local': TV1WhisperData;
169
176
  };
@@ -257,6 +264,15 @@ declare type TV1ExtMethods = {
257
264
  };
258
265
  result: null;
259
266
  };
267
+ /**
268
+ * Returns the current viewer counts for the room.
269
+ * Supported only for show types: `public`, `groupShow`, `ticketShow`.
270
+ * Returns `null` for other show types.
271
+ */
272
+ 'v1.ext.viewers.get': {
273
+ params: null;
274
+ result: TV1ExtViewers | null;
275
+ };
260
276
  /** 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 */
261
277
  'v1.ext.whisper': {
262
278
  params: {
@@ -317,6 +333,16 @@ export declare type TV1ExtSettings = unknown;
317
333
 
318
334
  export declare type TV1ExtUser = TV1ExtGuestUser | TV1ExtLoggedInUser;
319
335
 
336
+ /** Viewer counts for the current room. */
337
+ export declare type TV1ExtViewers = {
338
+ /** Number of guest (unauthenticated) viewers. */
339
+ guests: number;
340
+ /** Total number of viewers in the room. */
341
+ total: number;
342
+ /** Number of viewers who hold tokens. */
343
+ withTokens: number;
344
+ };
345
+
320
346
  export declare type TV1Genders = 'male' | 'female' | 'group' | 'tranny';
321
347
 
322
348
  export declare type TV1Methods = TV1ExtMethods & TV1SystemMethods & TV1PaymentMethods & TV1ModelMethods & TV1ChatMethods & TV1PrivateMethods & TV1MonitoringMethods & TV1SessionMethods & TV1StorageMethods & TV1TipMethods;
@@ -468,7 +494,7 @@ export declare type TV1SessionSelf = {
468
494
  /** Remaining lifetime in seconds */
469
495
  ttlSec: number;
470
496
  };
471
- /** The session exists but belongs to a different extension: */
497
+ /** The session exists and belongs to this extension */
472
498
  owner: 'self';
473
499
  };
474
500
 
@@ -766,7 +792,7 @@ export declare type TV1TopUserEntry = {
766
792
  userId: string;
767
793
  };
768
794
 
769
- export declare type TV1TopWindow = 'TOP_1D' | 'TOP_7D' | 'TOP_30D';
795
+ export declare type TV1TopWindow = 'TOP_1D' | 'TOP_7D' | 'TOP_30D' | 'TOP_UNSPECIFIED';
770
796
 
771
797
  /**
772
798
  * User activity league. Ordered from lowest to highest activity rank:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stripchatdev/ext-helper",
3
3
  "private": false,
4
- "version": "0.1.26",
4
+ "version": "0.1.28",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "module": "./dist/ext-helper.js",