@internxt/sdk 1.15.4 → 1.15.6
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiSecurity, ApiUrl, AppDetails } from '../../shared';
|
|
2
|
-
import { ReferralTokenResponse, UserReferral } from './types';
|
|
2
|
+
import { ReferralEnabledResponse, ReferralTokenResponse, UserReferral } from './types';
|
|
3
3
|
export * as ReferralTypes from './types';
|
|
4
4
|
export declare class Referrals {
|
|
5
5
|
private readonly client;
|
|
@@ -15,6 +15,10 @@ export declare class Referrals {
|
|
|
15
15
|
* Generates a referral token for the authenticated user
|
|
16
16
|
*/
|
|
17
17
|
createReferralToken(): Promise<ReferralTokenResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Checks if the referral feature is enabled for the authenticated user
|
|
20
|
+
*/
|
|
21
|
+
isReferralEnabled(): Promise<ReferralEnabledResponse>;
|
|
18
22
|
/**
|
|
19
23
|
* Returns the needed headers for the module requests
|
|
20
24
|
* @private
|
|
@@ -58,6 +58,12 @@ var Referrals = /** @class */ (function () {
|
|
|
58
58
|
Referrals.prototype.createReferralToken = function () {
|
|
59
59
|
return this.client.post('/referral/token', {}, this.headers());
|
|
60
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* Checks if the referral feature is enabled for the authenticated user
|
|
63
|
+
*/
|
|
64
|
+
Referrals.prototype.isReferralEnabled = function () {
|
|
65
|
+
return this.client.get('/referral/enabled', this.headers());
|
|
66
|
+
};
|
|
61
67
|
/**
|
|
62
68
|
* Returns the needed headers for the module requests
|
|
63
69
|
* @private
|
package/dist/meet/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiSecurity, ApiUrl, AppDetails } from '../shared';
|
|
2
|
-
import { CreateCallResponse, JoinCallPayload, JoinCallResponse, UsersInCallResponse } from './types';
|
|
2
|
+
import { CreateCallResponse, JoinCallPayload, JoinCallResponse, LeaveCallPayload, UsersInCallResponse } from './types';
|
|
3
3
|
export declare class Meet {
|
|
4
4
|
private readonly client;
|
|
5
5
|
private readonly appDetails;
|
|
@@ -8,7 +8,7 @@ export declare class Meet {
|
|
|
8
8
|
static client(apiUrl: ApiUrl, appDetails: AppDetails, apiSecurity?: ApiSecurity): Meet;
|
|
9
9
|
createCall(): Promise<CreateCallResponse>;
|
|
10
10
|
joinCall(callId: string, payload: JoinCallPayload): Promise<JoinCallResponse>;
|
|
11
|
-
leaveCall(callId: string): Promise<void>;
|
|
11
|
+
leaveCall(callId: string, payload?: LeaveCallPayload): Promise<void>;
|
|
12
12
|
getCurrentUsersInCall(callId: string): Promise<UsersInCallResponse[]>;
|
|
13
13
|
private headersWithToken;
|
|
14
14
|
private basicHeaders;
|
package/dist/meet/index.js
CHANGED
|
@@ -76,13 +76,13 @@ var Meet = /** @class */ (function () {
|
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
|
-
Meet.prototype.leaveCall = function (callId) {
|
|
79
|
+
Meet.prototype.leaveCall = function (callId, payload) {
|
|
80
80
|
return __awaiter(this, void 0, void 0, function () {
|
|
81
81
|
var headers;
|
|
82
82
|
var _a;
|
|
83
83
|
return __generator(this, function (_b) {
|
|
84
84
|
headers = ((_a = this.apiSecurity) === null || _a === void 0 ? void 0 : _a.token) ? this.headersWithToken() : this.basicHeaders();
|
|
85
|
-
return [2 /*return*/, this.client.post("call/".concat(callId, "/users/leave"), {}, headers)];
|
|
85
|
+
return [2 /*return*/, this.client.post("call/".concat(callId, "/users/leave"), payload ? __assign({}, payload) : {}, headers)];
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
};
|
package/dist/meet/types.d.ts
CHANGED