@internxt/sdk 1.15.5 → 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 { 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;
@@ -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
  };
@@ -16,6 +16,9 @@ export interface JoinCallResponse {
16
16
  userId: string;
17
17
  appId: string;
18
18
  }
19
+ export interface LeaveCallPayload {
20
+ userId: string;
21
+ }
19
22
  export interface UsersInCallResponse {
20
23
  userId: string;
21
24
  name: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@internxt/sdk",
3
3
  "author": "Internxt <hello@internxt.com>",
4
- "version": "1.15.5",
4
+ "version": "1.15.6",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",