File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @internxt/sdk" ,
33 "author" : " Internxt <hello@internxt.com>" ,
4- "version" : " 1.15.4 " ,
4+ "version" : " 1.15.5 " ,
55 "description" : " An sdk for interacting with Internxt's services" ,
66 "repository" : {
77 "type" : " git" ,
Original file line number Diff line number Diff line change 11import { headersWithToken } from '../../shared/headers' ;
22import { ApiSecurity , ApiUrl , AppDetails } from '../../shared' ;
3- import { ReferralTokenResponse , UserReferral } from './types' ;
3+ import { ReferralEnabledResponse , ReferralTokenResponse , UserReferral } from './types' ;
44import { HttpClient } from '../../shared/http/client' ;
55
66export * as ReferralTypes from './types' ;
@@ -34,6 +34,13 @@ export class Referrals {
3434 return this . client . post ( '/referral/token' , { } , this . headers ( ) ) ;
3535 }
3636
37+ /**
38+ * Checks if the referral feature is enabled for the authenticated user
39+ */
40+ public isReferralEnabled ( ) : Promise < ReferralEnabledResponse > {
41+ return this . client . get ( '/referral/enabled' , this . headers ( ) ) ;
42+ }
43+
3744 /**
3845 * Returns the needed headers for the module requests
3946 * @private
Original file line number Diff line number Diff line change @@ -25,3 +25,7 @@ export interface UserReferral {
2525export interface ReferralTokenResponse {
2626 token : string ;
2727}
28+
29+ export interface ReferralEnabledResponse {
30+ isEnabled : boolean ;
31+ }
You can’t perform that action at this time.
0 commit comments