@stripchatdev/ext-helper 0.1.27 → 0.1.29

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 +32 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -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;
@@ -611,6 +637,8 @@ declare type TV1StorageMethods = {
611
637
  */
612
638
  amount: string;
613
639
  key: string;
640
+ /** An optional string saved for this increment from that user's latest event. */
641
+ meta?: string;
614
642
  /**
615
643
  * User id credited for this increment (appears in `top/get` top_users).
616
644
  * @format int64
@@ -618,6 +646,8 @@ declare type TV1StorageMethods = {
618
646
  userId: string;
619
647
  };
620
648
  result: {
649
+ /** An optional string saved for this increment from that user's latest event. */
650
+ meta?: string;
621
651
  success: boolean;
622
652
  /** Echo of request `userId`; `windowStats` apply to this user. */
623
653
  /** @format int64 */
@@ -760,6 +790,8 @@ export declare type TV1TopIncrementWindowStat = {
760
790
  };
761
791
 
762
792
  export declare type TV1TopUserEntry = {
793
+ /** An optional string saved for this increment from that user's latest event */
794
+ meta?: string;
763
795
  /** Sum of increment amounts within the sliding window for this user. */
764
796
  total: string;
765
797
  /** User ID recorded as incrementer. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stripchatdev/ext-helper",
3
3
  "private": false,
4
- "version": "0.1.27",
4
+ "version": "0.1.29",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "module": "./dist/ext-helper.js",