@stripchatdev/ext-helper 0.1.15 → 0.1.16
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 +71 -28
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,9 @@ export declare type TExtPageResolverMethods = {
|
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
+
/** Unique identifier for a guest user **/
|
|
67
|
+
export declare type TGuestHash = string;
|
|
68
|
+
|
|
66
69
|
export declare type TMethods = TV1Methods;
|
|
67
70
|
|
|
68
71
|
export declare type TModelId = TUserId;
|
|
@@ -163,6 +166,52 @@ declare type TV1ExtEvents = {
|
|
|
163
166
|
'v1.ext.whispered.local': TV1WhisperData;
|
|
164
167
|
};
|
|
165
168
|
|
|
169
|
+
/** Guest user (not logged in). */
|
|
170
|
+
export declare type TV1ExtGuestUser = {
|
|
171
|
+
/** Unique identifier for a guest user. */
|
|
172
|
+
guestHash: TGuestHash;
|
|
173
|
+
/** User is a guest (not logged in). */
|
|
174
|
+
isGuest: true;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
/** Logged-in user. */
|
|
178
|
+
export declare type TV1ExtLoggedInUser = {
|
|
179
|
+
/** User's fan club data. Contains information regarding user's subscription to the model's fan club. */
|
|
180
|
+
fanClub: TV1UsersFanClub;
|
|
181
|
+
/** User previously purchased tokens. */
|
|
182
|
+
hasPaidBefore: boolean;
|
|
183
|
+
/** User has tokens. */
|
|
184
|
+
hasTokens: boolean;
|
|
185
|
+
/** User currently has Ultimate membership. */
|
|
186
|
+
hasUltimateSubscription: boolean;
|
|
187
|
+
/** User ID. */
|
|
188
|
+
id: TUserId;
|
|
189
|
+
/** User is logged in. */
|
|
190
|
+
isGuest: false;
|
|
191
|
+
/** User is the highest tipper in the room over past 12 hours. */
|
|
192
|
+
isKing: boolean;
|
|
193
|
+
/** User is a knight of the model. */
|
|
194
|
+
isKnight: boolean;
|
|
195
|
+
/** Current user is a model. */
|
|
196
|
+
isModel: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Current show/session state for this user.
|
|
199
|
+
*
|
|
200
|
+
* - `public` — public broadcast context
|
|
201
|
+
* - `private` — private show context
|
|
202
|
+
* - `exclusivePrivate` — exclusive private show context
|
|
203
|
+
* - `groupShow` — group show context
|
|
204
|
+
* - `ticketShow` — ticket show context
|
|
205
|
+
* - `off` — offline
|
|
206
|
+
* - `spy` — spying on a private show
|
|
207
|
+
*/
|
|
208
|
+
status: TV1UserStatus;
|
|
209
|
+
/** User username. */
|
|
210
|
+
username: string;
|
|
211
|
+
/** User activity ranking data when available. */
|
|
212
|
+
userRanking?: TV1UserRanking;
|
|
213
|
+
};
|
|
214
|
+
|
|
166
215
|
declare type TV1ExtMethods = {
|
|
167
216
|
'v1.ext.actions.call': {
|
|
168
217
|
params: TV1ActionRequestParams;
|
|
@@ -205,6 +254,7 @@ declare type TV1ExtMethods = {
|
|
|
205
254
|
settings: TV1ExtSettings;
|
|
206
255
|
};
|
|
207
256
|
};
|
|
257
|
+
/** Opens Stripchat sign-up dialog for anonymous users. Use this when your extension requires a registered account to function */
|
|
208
258
|
'v1.ext.signup.open': {
|
|
209
259
|
params: {
|
|
210
260
|
type: 'user';
|
|
@@ -269,34 +319,7 @@ export declare type TV1ExtModel = {
|
|
|
269
319
|
|
|
270
320
|
export declare type TV1ExtSettings = unknown;
|
|
271
321
|
|
|
272
|
-
export declare type TV1ExtUser =
|
|
273
|
-
/** User previously purchased tokens */
|
|
274
|
-
hasPaidBefore: boolean;
|
|
275
|
-
/** User has tokens */
|
|
276
|
-
hasTokens: boolean;
|
|
277
|
-
/** User currently has Ultimate membership */
|
|
278
|
-
hasUltimateSubscription: boolean;
|
|
279
|
-
/** User ID. */
|
|
280
|
-
id: TUserId;
|
|
281
|
-
/** Current user is a model. */
|
|
282
|
-
isModel: boolean;
|
|
283
|
-
/**
|
|
284
|
-
* Current show/session state for this user.
|
|
285
|
-
*
|
|
286
|
-
* - `public` — public broadcast context
|
|
287
|
-
* - `private` — private show context
|
|
288
|
-
* - `exclusivePrivate` — exclusive private show context
|
|
289
|
-
* - `groupShow` — group show context
|
|
290
|
-
* - `ticketShow` — ticket show context
|
|
291
|
-
* - `off` — offline
|
|
292
|
-
* - `spy` — spying on a private show
|
|
293
|
-
*/
|
|
294
|
-
status: TV1UserStatus;
|
|
295
|
-
/** User username. */
|
|
296
|
-
username: string;
|
|
297
|
-
/** User activity ranking data when available. */
|
|
298
|
-
userRanking?: TV1UserRanking;
|
|
299
|
-
};
|
|
322
|
+
export declare type TV1ExtUser = TV1ExtGuestUser | TV1ExtLoggedInUser;
|
|
300
323
|
|
|
301
324
|
export declare type TV1Genders = 'male' | 'female' | 'group' | 'tranny';
|
|
302
325
|
|
|
@@ -692,6 +715,26 @@ export declare type TV1UserRanking = {
|
|
|
692
715
|
level: number;
|
|
693
716
|
};
|
|
694
717
|
|
|
718
|
+
export declare type TV1UsersFanClub = TV1UsersFanClubSubscribed | TV1UsersFanClubNotSubscribed;
|
|
719
|
+
|
|
720
|
+
export declare type TV1UsersFanClubNotSubscribed = {
|
|
721
|
+
/** Whether user is subscribed to the model's fan club or not */
|
|
722
|
+
isSubscribed: false;
|
|
723
|
+
};
|
|
724
|
+
|
|
725
|
+
export declare type TV1UsersFanClubSubscribed = {
|
|
726
|
+
/** Whether user is subscribed to the model's fan club or not */
|
|
727
|
+
isSubscribed: true;
|
|
728
|
+
/** The tier of the fan club subscription. Could be `soldier`, `lord` or `prince`.
|
|
729
|
+
* The higher the tier, the more benefits the user gets.
|
|
730
|
+
*
|
|
731
|
+
* `Soldier` is the first tier. It has basic benefits
|
|
732
|
+
* `Lord` is the second tier. It has more benefits than `soldier`
|
|
733
|
+
* `Prince` is the third tier. It has the most benefits.
|
|
734
|
+
* **/
|
|
735
|
+
tier: 'soldier' | 'lord' | 'prince';
|
|
736
|
+
};
|
|
737
|
+
|
|
695
738
|
export declare type TV1UserStatus = Exclude<(typeof V1_SHOW_STATUSES)[keyof typeof V1_SHOW_STATUSES], 'idle'>;
|
|
696
739
|
|
|
697
740
|
export declare type TV1WhisperData = TUnknownDictionary;
|