@stripchatdev/ext-helper 0.1.37 → 0.1.38

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 +31 -2
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -173,7 +173,7 @@ declare type TV1ChatMethods = {
173
173
  };
174
174
  };
175
175
 
176
- export declare type TV1Events = TV1ExtEvents & TV1PaymentEvents & TV1ModelEvents & TV1SessionEvents & TV1TipEvents & TV1ChatEvents;
176
+ export declare type TV1Events = TV1ExtEvents & TV1PaymentEvents & TV1ModelEvents & TV1SessionEvents & TV1TipEvents & TV1ChatEvents & TV1GoalEvents;
177
177
 
178
178
  export declare type TV1ExtContext = {
179
179
  model?: TV1ExtModel;
@@ -379,7 +379,36 @@ export declare type TV1ExtViewers = {
379
379
 
380
380
  export declare type TV1Genders = 'male' | 'female' | 'group' | 'tranny';
381
381
 
382
- export declare type TV1Methods = TV1ExtMethods & TV1SystemMethods & TV1PaymentMethods & TV1ModelMethods & TV1ChatMethods & TV1PrivateMethods & TV1MonitoringMethods & TV1SessionMethods & TV1StorageMethods & TV1TipMethods;
382
+ /** Regular goal data */
383
+ export declare type TV1GoalData = {
384
+ /** Goal description */
385
+ description: string;
386
+ /** Whether the goal is fully completed */
387
+ isCompleted: boolean;
388
+ /** Amount of tokens already collected */
389
+ tokensCollected: number;
390
+ /** Target amount in tokens */
391
+ tokensTarget: number;
392
+ };
393
+
394
+ declare type TV1GoalEvents = {
395
+ /** Fired when any field of the active goal changes (description, isCompleted, tokensTarget, or tokensCollected), or the active goal is removed. */
396
+ 'v1.goal.updated': {
397
+ goal: TV1GoalData | null;
398
+ };
399
+ };
400
+
401
+ declare type TV1GoalMethods = {
402
+ /** Get the current active goal. Returns null if no goal is active. */
403
+ 'v1.goal.get': {
404
+ params: null;
405
+ result: {
406
+ goal: TV1GoalData | null;
407
+ };
408
+ };
409
+ };
410
+
411
+ export declare type TV1Methods = TV1ExtMethods & TV1SystemMethods & TV1PaymentMethods & TV1ModelMethods & TV1ChatMethods & TV1PrivateMethods & TV1MonitoringMethods & TV1SessionMethods & TV1StorageMethods & TV1TipMethods & TV1GoalMethods;
383
412
 
384
413
  declare type TV1ModelEvents = {
385
414
  'v1.model.ext.settings.set.requested': null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stripchatdev/ext-helper",
3
3
  "private": false,
4
- "version": "0.1.37",
4
+ "version": "0.1.38",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "module": "./dist/ext-helper.js",