@stripchatdev/ext-helper 0.1.41 → 0.1.43
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 +56 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -312,10 +312,17 @@ declare type TV1ExtMethods = {
|
|
|
312
312
|
* Never send any sensetive data through this field, such as username or user id.
|
|
313
313
|
* */
|
|
314
314
|
data: TV1WhisperData;
|
|
315
|
-
/**
|
|
315
|
+
/** @deprecated
|
|
316
|
+
* Use `paymentHash` instead
|
|
317
|
+
*
|
|
318
|
+
* Payment data returned by the `payment.tokens.spend.succeeded` event.
|
|
316
319
|
* Required for users in public shows. Use it only once for the request it authorizes. Do not store or reuse it.
|
|
317
320
|
* */
|
|
318
321
|
paymentData?: TV1PaymentData;
|
|
322
|
+
/** Payment hash returned by the `payment.tokens.spend.succeeded` event.
|
|
323
|
+
* Payment hash is used for authentication. Required for users in public shows. Use it only once for the request it authorizes. Do not store or reuse it.
|
|
324
|
+
* */
|
|
325
|
+
paymentHash?: TV1PaymentHash;
|
|
319
326
|
};
|
|
320
327
|
result: null;
|
|
321
328
|
};
|
|
@@ -377,6 +384,30 @@ export declare type TV1ExtViewers = {
|
|
|
377
384
|
withTokens: number;
|
|
378
385
|
};
|
|
379
386
|
|
|
387
|
+
declare type TV1FanClubMethods = {
|
|
388
|
+
/**
|
|
389
|
+
* Opens the fan club subscription modal for the current model.
|
|
390
|
+
* Read `context.user.fanClub` from the extension context to verify the user is eligible before calling.
|
|
391
|
+
* This field is available only for logged-in users (`context.user.isGuest === false`).
|
|
392
|
+
* Pass `null` for params to open the modal with the `soldier` tab selected by default.
|
|
393
|
+
*/
|
|
394
|
+
'v1.fanClub.request': {
|
|
395
|
+
params: {
|
|
396
|
+
/** Which tier tab to show in the modal. */
|
|
397
|
+
tier: TV1FanClubTier;
|
|
398
|
+
} | null;
|
|
399
|
+
result: null;
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Fan club subscription tier. Ordered from lowest to highest:
|
|
405
|
+
* - `soldier` — first tier with basic benefits
|
|
406
|
+
* - `lord` — second tier with more benefits than `soldier`
|
|
407
|
+
* - `prince` — third tier with the most benefits
|
|
408
|
+
*/
|
|
409
|
+
export declare type TV1FanClubTier = 'soldier' | 'lord' | 'prince';
|
|
410
|
+
|
|
380
411
|
export declare type TV1Genders = 'male' | 'female' | 'group' | 'tranny';
|
|
381
412
|
|
|
382
413
|
/** Regular goal data */
|
|
@@ -408,7 +439,7 @@ declare type TV1GoalMethods = {
|
|
|
408
439
|
};
|
|
409
440
|
};
|
|
410
441
|
|
|
411
|
-
export declare type TV1Methods = TV1ExtMethods & TV1SystemMethods & TV1PaymentMethods & TV1ModelMethods & TV1ChatMethods & TV1PrivateMethods & TV1MonitoringMethods & TV1SessionMethods & TV1StorageMethods & TV1TipMethods & TV1GoalMethods;
|
|
442
|
+
export declare type TV1Methods = TV1ExtMethods & TV1SystemMethods & TV1PaymentMethods & TV1ModelMethods & TV1ChatMethods & TV1PrivateMethods & TV1MonitoringMethods & TV1SessionMethods & TV1StorageMethods & TV1TipMethods & TV1GoalMethods & TV1FanClubMethods;
|
|
412
443
|
|
|
413
444
|
declare type TV1ModelEvents = {
|
|
414
445
|
'v1.model.ext.settings.set.requested': null;
|
|
@@ -469,13 +500,23 @@ declare type TV1PaymentEvents = {
|
|
|
469
500
|
'v1.payment.tokens.spend.succeeded': {
|
|
470
501
|
/** Was the tip anonymous. Use this field in `v1.chat.message.send` */
|
|
471
502
|
isAnonymous: boolean;
|
|
472
|
-
/**
|
|
503
|
+
/** @deprecated
|
|
504
|
+
* Use `paymentHash` instead.
|
|
505
|
+
*
|
|
506
|
+
* Payment data returned after a successful token spend. Use it only once for the request it authorizes. Do not store or reuse it. */
|
|
473
507
|
paymentData: TV1PaymentData;
|
|
508
|
+
/**
|
|
509
|
+
* Payment hash used for authentication. Required for users in public shows. Use it only once for the request it authorizes. Do not store or reuse it.
|
|
510
|
+
*/
|
|
511
|
+
paymentHash: TV1PaymentHash;
|
|
474
512
|
/** Custom data passed in `payment.tokens.spend` method */
|
|
475
513
|
tokensSpendData: TV1TokenSpendData;
|
|
476
514
|
};
|
|
477
515
|
};
|
|
478
516
|
|
|
517
|
+
/** Payment hash used for authentication. Do not store or reuse it. Use it only once for the request it authorizes. */
|
|
518
|
+
export declare type TV1PaymentHash = string;
|
|
519
|
+
|
|
479
520
|
declare type TV1PaymentMethods = {
|
|
480
521
|
/** Requests a confirmation modal to spend tokens */
|
|
481
522
|
'v1.payment.tokens.spend': {
|
|
@@ -539,8 +580,16 @@ declare type TV1SessionMethods = {
|
|
|
539
580
|
};
|
|
540
581
|
'v1.session.join.user': {
|
|
541
582
|
params: {
|
|
542
|
-
/**
|
|
543
|
-
|
|
583
|
+
/** @deprecated
|
|
584
|
+
* Use `paymentHash` instead.
|
|
585
|
+
*
|
|
586
|
+
* 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. */
|
|
587
|
+
payment?: TV1PaymentData;
|
|
588
|
+
/**
|
|
589
|
+
* Payment hash returned by the `payment.tokens.spend.succeeded` event.
|
|
590
|
+
* Use it only once for the request it authorizes. Do not store or reuse it.
|
|
591
|
+
*/
|
|
592
|
+
paymentHash: TV1PaymentHash;
|
|
544
593
|
/** Session lifetime in seconds (minimum 1). */
|
|
545
594
|
ttl: string;
|
|
546
595
|
};
|
|
@@ -917,14 +966,8 @@ export declare type TV1UsersFanClubNotSubscribed = {
|
|
|
917
966
|
export declare type TV1UsersFanClubSubscribed = {
|
|
918
967
|
/** Whether user is subscribed to the model's fan club or not */
|
|
919
968
|
isSubscribed: true;
|
|
920
|
-
/** The tier of the fan club subscription. Could be `soldier`, `lord` or `prince`.
|
|
921
|
-
|
|
922
|
-
*
|
|
923
|
-
* `Soldier` is the first tier. It has basic benefits
|
|
924
|
-
* `Lord` is the second tier. It has more benefits than `soldier`
|
|
925
|
-
* `Prince` is the third tier. It has the most benefits.
|
|
926
|
-
* **/
|
|
927
|
-
tier: 'soldier' | 'lord' | 'prince';
|
|
969
|
+
/** The tier of the fan club subscription. Could be `soldier`, `lord` or `prince`. Higher tiers provide more benefits. */
|
|
970
|
+
tier: TV1FanClubTier;
|
|
928
971
|
};
|
|
929
972
|
|
|
930
973
|
export declare type TV1UserStatus = Exclude<(typeof V1_SHOW_STATUSES)[keyof typeof V1_SHOW_STATUSES], 'idle'>;
|