sinch-rtc
Version:
RTC JavaScript/Web SDK
69 lines • 2.99 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* Ocra (REST API for Sinch RTC clients)
* REST API for Sinch RTC clients.
*
* The version of the OpenAPI document: 0.11.0
* Contact: rtc@sinch.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DebugApi = void 0;
const runtime = require("../runtime");
const models_1 = require("../models");
/**
*
*/
class DebugApi extends runtime.BaseAPI {
/**
* Get debug info about a User
*/
getUserDebugInfoRaw(requestParameters) {
return __awaiter(this, void 0, void 0, function* () {
if (requestParameters.userId === null || requestParameters.userId === undefined) {
throw new runtime.RequiredError('userId', 'Required parameter requestParameters.userId was null or undefined when calling getUserDebugInfo.');
}
const queryParameters = {};
const headerParameters = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("jwtAuth", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = yield this.request({
path: `/v1/users/{userId}/debugInfo`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.UserDebugInfoResponseFromJSON)(jsonValue));
});
}
/**
* Get debug info about a User
*/
getUserDebugInfo(requestParameters) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.getUserDebugInfoRaw(requestParameters);
return yield response.value();
});
}
}
exports.DebugApi = DebugApi;
//# sourceMappingURL=DebugApi.js.map