New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@smarterservices/sp-public-client

Package Overview
Dependencies
Maintainers
4
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smarterservices/sp-public-client - npm Package Compare versions

Comparing version 0.0.80 to 0.0.81

778

index.js

@@ -66,10 +66,9 @@ /*jshint -W069 */

/**
* Cancel session for a given exam
* List students for a given exam
* @method
* @name Client#cancelSession
* @name Client#listStudents
* @param {string} examId -
* @param {string} sessionId -
*
*/
Client.prototype.cancelSession = function(parameters) {
Client.prototype.listStudents = function(parameters) {
if (parameters === undefined) {

@@ -81,3 +80,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/exams/{exam_id}/sessions/{session_id}/cancel';
var path = '/v1/exams/{exam_id}/students';

@@ -96,9 +95,2 @@ var body;

path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;
}
if (parameters.$queryParameters) {

@@ -112,3 +104,3 @@ Object.keys(parameters.$queryParameters)

this.request('POST', domain + path, parameters, body, headers, queryParameters, form, deferred);
this.request('GET', domain + path, parameters, body, headers, queryParameters, form, deferred);

@@ -118,5 +110,6 @@ return deferred.promise;

/**
* Get all the incident types
* List all instructors for a course
* @method
* @name Client#getIncidentTypes
* @name Client#listInstructors
* @param {string} courseId -
* @param {string} page -

@@ -126,3 +119,3 @@ * @param {string} pageSize -

*/
Client.prototype.getIncidentTypes = function(parameters) {
Client.prototype.listInstructors = function(parameters) {
if (parameters === undefined) {

@@ -134,3 +127,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/incidents/types';
var path = '/v1/courses/{course_id}/instructors';

@@ -142,2 +135,9 @@ var body;

path = path.replace('{course_id}', parameters['courseId']);
if (parameters['courseId'] === undefined) {
deferred.reject(new Error('Missing required parameter: courseId'));
return deferred.promise;
}
if (parameters['page'] !== undefined) {

@@ -164,9 +164,9 @@ queryParameters['page'] = parameters['page'];

/**
* Will return return a list of courses for an institution
* This endpoint is used to get an image list for an proctor
* @method
* @name Client#listCourses
* @param {string} institutionId -
* @name Client#listProctorImages
* @param {string} userId -
*
*/
Client.prototype.listCourses = function(parameters) {
Client.prototype.listProctorImages = function(parameters) {
if (parameters === undefined) {

@@ -178,3 +178,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/institutions/{institution_id}/courses';
var path = '/v1/proctor/{user_id}/images';

@@ -186,6 +186,6 @@ var body;

path = path.replace('{institution_id}', parameters['institutionId']);
path = path.replace('{user_id}', parameters['userId']);
if (parameters['institutionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: institutionId'));
if (parameters['userId'] === undefined) {
deferred.reject(new Error('Missing required parameter: userId'));
return deferred.promise;

@@ -207,9 +207,10 @@ }

/**
* Will return detailed information about an institution
* This endpoint is used to upload headshot for a proctor
* @method
* @name Client#getInstitution
* @param {string} institutionId -
* @name Client#uploadProctorImage
* @param {string} userId -
* @param {} body -
*
*/
Client.prototype.getInstitution = function(parameters) {
Client.prototype.uploadProctorImage = function(parameters) {
if (parameters === undefined) {

@@ -221,3 +222,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/institutions/{institution_id}';
var path = '/v1/proctor/{user_id}/images';

@@ -229,9 +230,13 @@ var body;

path = path.replace('{institution_id}', parameters['institutionId']);
path = path.replace('{user_id}', parameters['userId']);
if (parameters['institutionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: institutionId'));
if (parameters['userId'] === undefined) {
deferred.reject(new Error('Missing required parameter: userId'));
return deferred.promise;
}
if (parameters['body'] !== undefined) {
body = parameters['body'];
}
if (parameters.$queryParameters) {

@@ -245,3 +250,3 @@ Object.keys(parameters.$queryParameters)

this.request('GET', domain + path, parameters, body, headers, queryParameters, form, deferred);
this.request('POST', domain + path, parameters, body, headers, queryParameters, form, deferred);

@@ -251,11 +256,11 @@ return deferred.promise;

/**
* Get history of current session
* This endpoint is used to get an image list for an user
* @method
* @name Client#getAgreementHistory
* @param {string} token -
* @name Client#listImages
* @param {string} sessionId -
* @param {string} agreementId -
* @param {string} clientId -
* @param {string} type -
*
*/
Client.prototype.getAgreementHistory = function(parameters) {
Client.prototype.listImages = function(parameters) {
if (parameters === undefined) {

@@ -267,3 +272,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/sessions/{session_id}/agreements/{agreement_id}/history';
var path = '/v1/sessions/{session_id}/images';

@@ -275,11 +280,2 @@ var body;

if (parameters['token'] !== undefined) {
headers['token'] = parameters['token'];
}
if (parameters['token'] === undefined) {
deferred.reject(new Error('Missing required parameter: token'));
return deferred.promise;
}
path = path.replace('{session_id}', parameters['sessionId']);

@@ -292,9 +288,15 @@

path = path.replace('{agreement_id}', parameters['agreementId']);
if (parameters['clientId'] !== undefined) {
queryParameters['client_id'] = parameters['clientId'];
}
if (parameters['agreementId'] === undefined) {
deferred.reject(new Error('Missing required parameter: agreementId'));
if (parameters['clientId'] === undefined) {
deferred.reject(new Error('Missing required parameter: clientId'));
return deferred.promise;
}
if (parameters['type'] !== undefined) {
queryParameters['type'] = parameters['type'];
}
if (parameters.$queryParameters) {

@@ -313,10 +315,11 @@ Object.keys(parameters.$queryParameters)

/**
* Get instructor details
* This endpoint is used to upload images for a user
* @method
* @name Client#getInstructor
* @param {string} courseId -
* @param {string} instructorId -
* @name Client#uploadImage
* @param {string} token -
* @param {string} sessionId -
* @param {} body -
*
*/
Client.prototype.getInstructor = function(parameters) {
Client.prototype.uploadImage = function(parameters) {
if (parameters === undefined) {

@@ -328,3 +331,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/courses/{course_id}/instructors/{instructor_id}';
var path = '/v1/sessions/{session_id}/images';

@@ -336,16 +339,22 @@ var body;

path = path.replace('{course_id}', parameters['courseId']);
if (parameters['token'] !== undefined) {
headers['token'] = parameters['token'];
}
if (parameters['courseId'] === undefined) {
deferred.reject(new Error('Missing required parameter: courseId'));
if (parameters['token'] === undefined) {
deferred.reject(new Error('Missing required parameter: token'));
return deferred.promise;
}
path = path.replace('{instructor_id}', parameters['instructorId']);
path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['instructorId'] === undefined) {
deferred.reject(new Error('Missing required parameter: instructorId'));
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;
}
if (parameters['body'] !== undefined) {
body = parameters['body'];
}
if (parameters.$queryParameters) {

@@ -359,3 +368,3 @@ Object.keys(parameters.$queryParameters)

this.request('GET', domain + path, parameters, body, headers, queryParameters, form, deferred);
this.request('POST', domain + path, parameters, body, headers, queryParameters, form, deferred);

@@ -365,10 +374,10 @@ return deferred.promise;

/**
* Gets the zookeeper session history
* Get instructor details
* @method
* @name Client#getProcesses
* @param {string} sessionId -
* @param {string} zookeeperId -
* @name Client#getInstructor
* @param {string} courseId -
* @param {string} instructorId -
*
*/
Client.prototype.getProcesses = function(parameters) {
Client.prototype.getInstructor = function(parameters) {
if (parameters === undefined) {

@@ -380,3 +389,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/sessions/{session_id}/processes';
var path = '/v1/courses/{course_id}/instructors/{instructor_id}';

@@ -388,15 +397,13 @@ var body;

path = path.replace('{session_id}', parameters['sessionId']);
path = path.replace('{course_id}', parameters['courseId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
if (parameters['courseId'] === undefined) {
deferred.reject(new Error('Missing required parameter: courseId'));
return deferred.promise;
}
if (parameters['zookeeperId'] !== undefined) {
queryParameters['zookeeper_id'] = parameters['zookeeperId'];
}
path = path.replace('{instructor_id}', parameters['instructorId']);
if (parameters['zookeeperId'] === undefined) {
deferred.reject(new Error('Missing required parameter: zookeeperId'));
if (parameters['instructorId'] === undefined) {
deferred.reject(new Error('Missing required parameter: instructorId'));
return deferred.promise;

@@ -418,10 +425,10 @@ }

/**
* Updates the session with the current running processes
* Will return start and end time for a users media
* @method
* @name Client#sessionProcesses
* @param {string} sessionId -
* @name Client#videoSetup
* @param {string} userId -
* @param {} body -
*
*/
Client.prototype.sessionProcesses = function(parameters) {
Client.prototype.videoSetup = function(parameters) {
if (parameters === undefined) {

@@ -433,3 +440,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/sessions/{session_id}/processes';
var path = '/v1/{userId}/videoSetup';

@@ -441,6 +448,6 @@ var body;

path = path.replace('{session_id}', parameters['sessionId']);
path = path.replace('{userId}', parameters['userId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
if (parameters['userId'] === undefined) {
deferred.reject(new Error('Missing required parameter: userId'));
return deferred.promise;

@@ -461,3 +468,3 @@ }

this.request('PUT', domain + path, parameters, body, headers, queryParameters, form, deferred);
this.request('POST', domain + path, parameters, body, headers, queryParameters, form, deferred);

@@ -467,11 +474,10 @@ return deferred.promise;

/**
* Get exam details
* Cancel session for a given exam
* @method
* @name Client#getExam
* @param {string} courseId -
* @name Client#cancelSession
* @param {string} examId -
* @param {string} enrollmentId -
* @param {string} sessionId -
*
*/
Client.prototype.getExam = function(parameters) {
Client.prototype.cancelSession = function(parameters) {
if (parameters === undefined) {

@@ -483,3 +489,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/courses/{course_id}/exams/{exam_id}';
var path = '/v1/exams/{exam_id}/sessions/{session_id}/cancel';

@@ -491,9 +497,2 @@ var body;

path = path.replace('{course_id}', parameters['courseId']);
if (parameters['courseId'] === undefined) {
deferred.reject(new Error('Missing required parameter: courseId'));
return deferred.promise;
}
path = path.replace('{exam_id}', parameters['examId']);

@@ -506,8 +505,6 @@

if (parameters['enrollmentId'] !== undefined) {
queryParameters['enrollment_id'] = parameters['enrollmentId'];
}
path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['enrollmentId'] === undefined) {
deferred.reject(new Error('Missing required parameter: enrollmentId'));
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;

@@ -524,3 +521,3 @@ }

this.request('GET', domain + path, parameters, body, headers, queryParameters, form, deferred);
this.request('POST', domain + path, parameters, body, headers, queryParameters, form, deferred);

@@ -530,8 +527,9 @@ return deferred.promise;

/**
* Used to make sure that the api is current only
* List sessions for a given exam
* @method
* @name Client#health
* @name Client#listSessions
* @param {string} examId -
*
*/
Client.prototype.health = function(parameters) {
Client.prototype.listSessions = function(parameters) {
if (parameters === undefined) {

@@ -543,3 +541,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1';
var path = '/v1/exams/{exam_id}/sessions';

@@ -551,2 +549,9 @@ var body;

path = path.replace('{exam_id}', parameters['examId']);
if (parameters['examId'] === undefined) {
deferred.reject(new Error('Missing required parameter: examId'));
return deferred.promise;
}
if (parameters.$queryParameters) {

@@ -565,11 +570,10 @@ Object.keys(parameters.$queryParameters)

/**
* Get session details for a given exam
* Will return an array of videos that contained signed urls and other metadata
* @method
* @name Client#getSession
* @param {string} token -
* @param {string} examId -
* @param {string} sessionId -
* @name Client#getVideos
* @param {string} userId -
* @param {} body -
*
*/
Client.prototype.getSession = function(parameters) {
Client.prototype.getVideos = function(parameters) {
if (parameters === undefined) {

@@ -581,3 +585,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/exams/{exam_id}/sessions/{session_id}';
var path = '/v1/{userId}/videos';

@@ -589,25 +593,13 @@ var body;

if (parameters['token'] !== undefined) {
headers['token'] = parameters['token'];
}
path = path.replace('{userId}', parameters['userId']);
if (parameters['token'] === undefined) {
deferred.reject(new Error('Missing required parameter: token'));
if (parameters['userId'] === undefined) {
deferred.reject(new Error('Missing required parameter: userId'));
return deferred.promise;
}
path = path.replace('{exam_id}', parameters['examId']);
if (parameters['examId'] === undefined) {
deferred.reject(new Error('Missing required parameter: examId'));
return deferred.promise;
if (parameters['body'] !== undefined) {
body = parameters['body'];
}
path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;
}
if (parameters.$queryParameters) {

@@ -621,3 +613,3 @@ Object.keys(parameters.$queryParameters)

this.request('GET', domain + path, parameters, body, headers, queryParameters, form, deferred);
this.request('POST', domain + path, parameters, body, headers, queryParameters, form, deferred);

@@ -627,11 +619,9 @@ return deferred.promise;

/**
* Get agreements to sign
* Will return detailed information about an institution
* @method
* @name Client#getAgreements
* @param {string} token -
* @param {string} sessionId -
* @param {string} locationId -
* @name Client#getInstitution
* @param {string} institutionId -
*
*/
Client.prototype.getAgreements = function(parameters) {
Client.prototype.getInstitution = function(parameters) {
if (parameters === undefined) {

@@ -643,3 +633,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/sessions/{session_id}/agreements/location/{location_id}';
var path = '/v1/institutions/{institution_id}';

@@ -651,25 +641,9 @@ var body;

if (parameters['token'] !== undefined) {
headers['token'] = parameters['token'];
}
path = path.replace('{institution_id}', parameters['institutionId']);
if (parameters['token'] === undefined) {
deferred.reject(new Error('Missing required parameter: token'));
if (parameters['institutionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: institutionId'));
return deferred.promise;
}
path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;
}
path = path.replace('{location_id}', parameters['locationId']);
if (parameters['locationId'] === undefined) {
deferred.reject(new Error('Missing required parameter: locationId'));
return deferred.promise;
}
if (parameters.$queryParameters) {

@@ -688,10 +662,8 @@ Object.keys(parameters.$queryParameters)

/**
* Get student details
* Will return a full list of all institutions
* @method
* @name Client#getStudent
* @param {string} institutionId -
* @param {string} studentId -
* @name Client#listInstitutions
*
*/
Client.prototype.getStudent = function(parameters) {
Client.prototype.listInstitutions = function(parameters) {
if (parameters === undefined) {

@@ -703,3 +675,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/institutions/{institution_id}/students/{student_id}';
var path = '/v1/institutions';

@@ -711,16 +683,2 @@ var body;

path = path.replace('{institution_id}', parameters['institutionId']);
if (parameters['institutionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: institutionId'));
return deferred.promise;
}
path = path.replace('{student_id}', parameters['studentId']);
if (parameters['studentId'] === undefined) {
deferred.reject(new Error('Missing required parameter: studentId'));
return deferred.promise;
}
if (parameters.$queryParameters) {

@@ -739,10 +697,10 @@ Object.keys(parameters.$queryParameters)

/**
* Will return return details about a single course
* Get all the incident types
* @method
* @name Client#getCourse
* @param {string} courseId -
* @param {string} institutionId -
* @name Client#getIncidentTypes
* @param {string} page -
* @param {string} pageSize -
*
*/
Client.prototype.getCourse = function(parameters) {
Client.prototype.getIncidentTypes = function(parameters) {
if (parameters === undefined) {

@@ -754,3 +712,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/institutions/{institution_id}/courses/{course_id}';
var path = '/v1/incidents/types';

@@ -762,14 +720,8 @@ var body;

path = path.replace('{course_id}', parameters['courseId']);
if (parameters['courseId'] === undefined) {
deferred.reject(new Error('Missing required parameter: courseId'));
return deferred.promise;
if (parameters['page'] !== undefined) {
queryParameters['page'] = parameters['page'];
}
path = path.replace('{institution_id}', parameters['institutionId']);
if (parameters['institutionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: institutionId'));
return deferred.promise;
if (parameters['pageSize'] !== undefined) {
queryParameters['page_size'] = parameters['pageSize'];
}

@@ -790,11 +742,11 @@

/**
* List incidents for a given session
* Get exam details
* @method
* @name Client#listIncidents
* @param {string} sessionId -
* @param {string} page -
* @param {string} pageSize -
* @name Client#getExam
* @param {string} courseId -
* @param {string} examId -
* @param {string} enrollmentId -
*
*/
Client.prototype.listIncidents = function(parameters) {
Client.prototype.getExam = function(parameters) {
if (parameters === undefined) {

@@ -806,3 +758,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/sessions/{session_id}/incidents';
var path = '/v1/courses/{course_id}/exams/{exam_id}';

@@ -814,17 +766,25 @@ var body;

path = path.replace('{session_id}', parameters['sessionId']);
path = path.replace('{course_id}', parameters['courseId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
if (parameters['courseId'] === undefined) {
deferred.reject(new Error('Missing required parameter: courseId'));
return deferred.promise;
}
if (parameters['page'] !== undefined) {
queryParameters['page'] = parameters['page'];
path = path.replace('{exam_id}', parameters['examId']);
if (parameters['examId'] === undefined) {
deferred.reject(new Error('Missing required parameter: examId'));
return deferred.promise;
}
if (parameters['pageSize'] !== undefined) {
queryParameters['page_size'] = parameters['pageSize'];
if (parameters['enrollmentId'] !== undefined) {
queryParameters['enrollment_id'] = parameters['enrollmentId'];
}
if (parameters['enrollmentId'] === undefined) {
deferred.reject(new Error('Missing required parameter: enrollmentId'));
return deferred.promise;
}
if (parameters.$queryParameters) {

@@ -843,10 +803,9 @@ Object.keys(parameters.$queryParameters)

/**
* Creates an incident for a given session
* Will return return a list of courses for an institution
* @method
* @name Client#createIncident
* @param {string} sessionId -
* @param {} body -
* @name Client#listCourses
* @param {string} institutionId -
*
*/
Client.prototype.createIncident = function(parameters) {
Client.prototype.listCourses = function(parameters) {
if (parameters === undefined) {

@@ -858,3 +817,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/sessions/{session_id}/incidents';
var path = '/v1/institutions/{institution_id}/courses';

@@ -866,13 +825,9 @@ var body;

path = path.replace('{session_id}', parameters['sessionId']);
path = path.replace('{institution_id}', parameters['institutionId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
if (parameters['institutionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: institutionId'));
return deferred.promise;
}
if (parameters['body'] !== undefined) {
body = parameters['body'];
}
if (parameters.$queryParameters) {

@@ -886,3 +841,3 @@ Object.keys(parameters.$queryParameters)

this.request('POST', domain + path, parameters, body, headers, queryParameters, form, deferred);
this.request('GET', domain + path, parameters, body, headers, queryParameters, form, deferred);

@@ -892,9 +847,11 @@ return deferred.promise;

/**
* List all exams for a course
* Get history of current session
* @method
* @name Client#listExams
* @param {string} courseId -
* @name Client#getAgreementHistory
* @param {string} token -
* @param {string} sessionId -
* @param {string} agreementId -
*
*/
Client.prototype.listExams = function(parameters) {
Client.prototype.getAgreementHistory = function(parameters) {
if (parameters === undefined) {

@@ -906,3 +863,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/courses/{course_id}/exams';
var path = '/v1/sessions/{session_id}/agreements/{agreement_id}/history';

@@ -914,9 +871,25 @@ var body;

path = path.replace('{course_id}', parameters['courseId']);
if (parameters['token'] !== undefined) {
headers['token'] = parameters['token'];
}
if (parameters['courseId'] === undefined) {
deferred.reject(new Error('Missing required parameter: courseId'));
if (parameters['token'] === undefined) {
deferred.reject(new Error('Missing required parameter: token'));
return deferred.promise;
}
path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;
}
path = path.replace('{agreement_id}', parameters['agreementId']);
if (parameters['agreementId'] === undefined) {
deferred.reject(new Error('Missing required parameter: agreementId'));
return deferred.promise;
}
if (parameters.$queryParameters) {

@@ -935,11 +908,10 @@ Object.keys(parameters.$queryParameters)

/**
* This endpoint is used to get an image list for an user
* Get student details
* @method
* @name Client#listImages
* @param {string} sessionId -
* @param {string} clientId -
* @param {string} type -
* @name Client#getStudent
* @param {string} institutionId -
* @param {string} studentId -
*
*/
Client.prototype.listImages = function(parameters) {
Client.prototype.getStudent = function(parameters) {
if (parameters === undefined) {

@@ -951,3 +923,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/sessions/{session_id}/images';
var path = '/v1/institutions/{institution_id}/students/{student_id}';

@@ -959,22 +931,16 @@ var body;

path = path.replace('{session_id}', parameters['sessionId']);
path = path.replace('{institution_id}', parameters['institutionId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
if (parameters['institutionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: institutionId'));
return deferred.promise;
}
if (parameters['clientId'] !== undefined) {
queryParameters['client_id'] = parameters['clientId'];
}
path = path.replace('{student_id}', parameters['studentId']);
if (parameters['clientId'] === undefined) {
deferred.reject(new Error('Missing required parameter: clientId'));
if (parameters['studentId'] === undefined) {
deferred.reject(new Error('Missing required parameter: studentId'));
return deferred.promise;
}
if (parameters['type'] !== undefined) {
queryParameters['type'] = parameters['type'];
}
if (parameters.$queryParameters) {

@@ -993,11 +959,13 @@ Object.keys(parameters.$queryParameters)

/**
* This endpoint is used to upload images for a user
* Sign an agreement
* @method
* @name Client#uploadImage
* @name Client#signAgreements
* @param {string} token -
* @param {string} sessionId -
* @param {string} agreementId -
* @param {string} versionId -
* @param {} body -
*
*/
Client.prototype.uploadImage = function(parameters) {
Client.prototype.signAgreements = function(parameters) {
if (parameters === undefined) {

@@ -1009,3 +977,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/sessions/{session_id}/images';
var path = '/v1/sessions/{session_id}/agreements/{agreement_id}/versions/{version_id}/sign';

@@ -1033,2 +1001,16 @@ var body;

path = path.replace('{agreement_id}', parameters['agreementId']);
if (parameters['agreementId'] === undefined) {
deferred.reject(new Error('Missing required parameter: agreementId'));
return deferred.promise;
}
path = path.replace('{version_id}', parameters['versionId']);
if (parameters['versionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: versionId'));
return deferred.promise;
}
if (parameters['body'] !== undefined) {

@@ -1051,11 +1033,10 @@ body = parameters['body'];

/**
* List all instructors for a course
* Gets the zookeeper session history
* @method
* @name Client#listInstructors
* @param {string} courseId -
* @param {string} page -
* @param {string} pageSize -
* @name Client#getProcesses
* @param {string} sessionId -
* @param {string} zookeeperId -
*
*/
Client.prototype.listInstructors = function(parameters) {
Client.prototype.getProcesses = function(parameters) {
if (parameters === undefined) {

@@ -1067,3 +1048,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/courses/{course_id}/instructors';
var path = '/v1/sessions/{session_id}/processes';

@@ -1075,15 +1056,16 @@ var body;

path = path.replace('{course_id}', parameters['courseId']);
path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['courseId'] === undefined) {
deferred.reject(new Error('Missing required parameter: courseId'));
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;
}
if (parameters['page'] !== undefined) {
queryParameters['page'] = parameters['page'];
if (parameters['zookeeperId'] !== undefined) {
queryParameters['zookeeper_id'] = parameters['zookeeperId'];
}
if (parameters['pageSize'] !== undefined) {
queryParameters['page_size'] = parameters['pageSize'];
if (parameters['zookeeperId'] === undefined) {
deferred.reject(new Error('Missing required parameter: zookeeperId'));
return deferred.promise;
}

@@ -1104,10 +1086,10 @@

/**
* Will return start and end time for a users media
* Updates the session with the current running processes
* @method
* @name Client#videoSetup
* @param {string} userId -
* @name Client#sessionProcesses
* @param {string} sessionId -
* @param {} body -
*
*/
Client.prototype.videoSetup = function(parameters) {
Client.prototype.sessionProcesses = function(parameters) {
if (parameters === undefined) {

@@ -1119,3 +1101,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/{userId}/videoSetup';
var path = '/v1/sessions/{session_id}/processes';

@@ -1127,6 +1109,6 @@ var body;

path = path.replace('{userId}', parameters['userId']);
path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['userId'] === undefined) {
deferred.reject(new Error('Missing required parameter: userId'));
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;

@@ -1147,3 +1129,3 @@ }

this.request('POST', domain + path, parameters, body, headers, queryParameters, form, deferred);
this.request('PUT', domain + path, parameters, body, headers, queryParameters, form, deferred);

@@ -1153,10 +1135,9 @@ return deferred.promise;

/**
* Start a new session and create permissions
* Used to login and authenticate proctors
* @method
* @name Client#startSession
* @param {string} sessionId - Access Key
* @name Client#proctorLogin
* @param {} body -
*
*/
Client.prototype.startSession = function(parameters) {
Client.prototype.proctorLogin = function(parameters) {
if (parameters === undefined) {

@@ -1168,3 +1149,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/sessions/{session_id}/start';
var path = '/v1/proctors/login';

@@ -1176,9 +1157,2 @@ var body;

path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;
}
if (parameters['body'] !== undefined) {

@@ -1201,9 +1175,9 @@ body = parameters['body'];

/**
* List students for a given exam
* List all exams for a course
* @method
* @name Client#listStudents
* @param {string} examId -
* @name Client#listExams
* @param {string} courseId -
*
*/
Client.prototype.listStudents = function(parameters) {
Client.prototype.listExams = function(parameters) {
if (parameters === undefined) {

@@ -1215,3 +1189,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/exams/{exam_id}/students';
var path = '/v1/courses/{course_id}/exams';

@@ -1223,6 +1197,6 @@ var body;

path = path.replace('{exam_id}', parameters['examId']);
path = path.replace('{course_id}', parameters['courseId']);
if (parameters['examId'] === undefined) {
deferred.reject(new Error('Missing required parameter: examId'));
if (parameters['courseId'] === undefined) {
deferred.reject(new Error('Missing required parameter: courseId'));
return deferred.promise;

@@ -1244,8 +1218,11 @@ }

/**
* Will return a full list of all institutions
* Get agreements to sign
* @method
* @name Client#listInstitutions
* @name Client#getAgreements
* @param {string} token -
* @param {string} sessionId -
* @param {string} locationId -
*
*/
Client.prototype.listInstitutions = function(parameters) {
Client.prototype.getAgreements = function(parameters) {
if (parameters === undefined) {

@@ -1257,3 +1234,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/institutions';
var path = '/v1/sessions/{session_id}/agreements/location/{location_id}';

@@ -1265,2 +1242,25 @@ var body;

if (parameters['token'] !== undefined) {
headers['token'] = parameters['token'];
}
if (parameters['token'] === undefined) {
deferred.reject(new Error('Missing required parameter: token'));
return deferred.promise;
}
path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;
}
path = path.replace('{location_id}', parameters['locationId']);
if (parameters['locationId'] === undefined) {
deferred.reject(new Error('Missing required parameter: locationId'));
return deferred.promise;
}
if (parameters.$queryParameters) {

@@ -1327,10 +1327,11 @@ Object.keys(parameters.$queryParameters)

/**
* Will return an array of videos that contained signed urls and other metadata
* List incidents for a given session
* @method
* @name Client#getVideos
* @param {string} userId -
* @param {} body -
* @name Client#listIncidents
* @param {string} sessionId -
* @param {string} page -
* @param {string} pageSize -
*
*/
Client.prototype.getVideos = function(parameters) {
Client.prototype.listIncidents = function(parameters) {
if (parameters === undefined) {

@@ -1342,3 +1343,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/{userId}/videos';
var path = '/v1/sessions/{session_id}/incidents';

@@ -1350,13 +1351,17 @@ var body;

path = path.replace('{userId}', parameters['userId']);
path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['userId'] === undefined) {
deferred.reject(new Error('Missing required parameter: userId'));
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;
}
if (parameters['body'] !== undefined) {
body = parameters['body'];
if (parameters['page'] !== undefined) {
queryParameters['page'] = parameters['page'];
}
if (parameters['pageSize'] !== undefined) {
queryParameters['page_size'] = parameters['pageSize'];
}
if (parameters.$queryParameters) {

@@ -1370,3 +1375,3 @@ Object.keys(parameters.$queryParameters)

this.request('POST', domain + path, parameters, body, headers, queryParameters, form, deferred);
this.request('GET', domain + path, parameters, body, headers, queryParameters, form, deferred);

@@ -1376,10 +1381,10 @@ return deferred.promise;

/**
* Join an existing session and get permissions
* Creates an incident for a given session
* @method
* @name Client#joinSession
* @param {string} sessionId - Access Key
* @name Client#createIncident
* @param {string} sessionId -
* @param {} body -
*
*/
Client.prototype.joinSession = function(parameters) {
Client.prototype.createIncident = function(parameters) {
if (parameters === undefined) {

@@ -1391,3 +1396,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/sessions/{session_id}/join';
var path = '/v1/sessions/{session_id}/incidents';

@@ -1423,9 +1428,8 @@ var body;

/**
* List sessions for a given exam
* Used to make sure that the api is current only
* @method
* @name Client#listSessions
* @param {string} examId -
* @name Client#health
*
*/
Client.prototype.listSessions = function(parameters) {
Client.prototype.health = function(parameters) {
if (parameters === undefined) {

@@ -1437,3 +1441,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/exams/{exam_id}/sessions';
var path = '/v1';

@@ -1445,9 +1449,2 @@ var body;

path = path.replace('{exam_id}', parameters['examId']);
if (parameters['examId'] === undefined) {
deferred.reject(new Error('Missing required parameter: examId'));
return deferred.promise;
}
if (parameters.$queryParameters) {

@@ -1466,13 +1463,10 @@ Object.keys(parameters.$queryParameters)

/**
* Sign an agreement
* Will return return details about a single course
* @method
* @name Client#signAgreements
* @param {string} token -
* @param {string} sessionId -
* @param {string} agreementId -
* @param {string} versionId -
* @param {} body -
* @name Client#getCourse
* @param {string} courseId -
* @param {string} institutionId -
*
*/
Client.prototype.signAgreements = function(parameters) {
Client.prototype.getCourse = function(parameters) {
if (parameters === undefined) {

@@ -1484,3 +1478,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/sessions/{session_id}/agreements/{agreement_id}/versions/{version_id}/sign';
var path = '/v1/institutions/{institution_id}/courses/{course_id}';

@@ -1492,36 +1486,16 @@ var body;

if (parameters['token'] !== undefined) {
headers['token'] = parameters['token'];
}
path = path.replace('{course_id}', parameters['courseId']);
if (parameters['token'] === undefined) {
deferred.reject(new Error('Missing required parameter: token'));
if (parameters['courseId'] === undefined) {
deferred.reject(new Error('Missing required parameter: courseId'));
return deferred.promise;
}
path = path.replace('{session_id}', parameters['sessionId']);
path = path.replace('{institution_id}', parameters['institutionId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
if (parameters['institutionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: institutionId'));
return deferred.promise;
}
path = path.replace('{agreement_id}', parameters['agreementId']);
if (parameters['agreementId'] === undefined) {
deferred.reject(new Error('Missing required parameter: agreementId'));
return deferred.promise;
}
path = path.replace('{version_id}', parameters['versionId']);
if (parameters['versionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: versionId'));
return deferred.promise;
}
if (parameters['body'] !== undefined) {
body = parameters['body'];
}
if (parameters.$queryParameters) {

@@ -1535,3 +1509,3 @@ Object.keys(parameters.$queryParameters)

this.request('POST', domain + path, parameters, body, headers, queryParameters, form, deferred);
this.request('GET', domain + path, parameters, body, headers, queryParameters, form, deferred);

@@ -1541,9 +1515,11 @@ return deferred.promise;

/**
* This endpoint is used to get an image list for an proctor
* Get session details for a given exam
* @method
* @name Client#listProctorImages
* @param {string} userId -
* @name Client#getSession
* @param {string} token -
* @param {string} examId -
* @param {string} sessionId -
*
*/
Client.prototype.listProctorImages = function(parameters) {
Client.prototype.getSession = function(parameters) {
if (parameters === undefined) {

@@ -1555,3 +1531,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/proctor/{user_id}/images';
var path = '/v1/exams/{exam_id}/sessions/{session_id}';

@@ -1563,9 +1539,25 @@ var body;

path = path.replace('{user_id}', parameters['userId']);
if (parameters['token'] !== undefined) {
headers['token'] = parameters['token'];
}
if (parameters['userId'] === undefined) {
deferred.reject(new Error('Missing required parameter: userId'));
if (parameters['token'] === undefined) {
deferred.reject(new Error('Missing required parameter: token'));
return deferred.promise;
}
path = path.replace('{exam_id}', parameters['examId']);
if (parameters['examId'] === undefined) {
deferred.reject(new Error('Missing required parameter: examId'));
return deferred.promise;
}
path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;
}
if (parameters.$queryParameters) {

@@ -1584,10 +1576,10 @@ Object.keys(parameters.$queryParameters)

/**
* This endpoint is used to upload headshot for a proctor
* Join an existing session and get permissions
* @method
* @name Client#uploadProctorImage
* @param {string} userId -
* @name Client#joinSession
* @param {string} sessionId - Access Key
* @param {} body -
*
*/
Client.prototype.uploadProctorImage = function(parameters) {
Client.prototype.joinSession = function(parameters) {
if (parameters === undefined) {

@@ -1599,3 +1591,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/proctor/{user_id}/images';
var path = '/v1/sessions/{session_id}/join';

@@ -1607,6 +1599,6 @@ var body;

path = path.replace('{user_id}', parameters['userId']);
path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['userId'] === undefined) {
deferred.reject(new Error('Missing required parameter: userId'));
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;

@@ -1632,9 +1624,10 @@ }

/**
* Used to login and authenticate proctors
* Start a new session and create permissions
* @method
* @name Client#proctorLogin
* @name Client#startSession
* @param {string} sessionId - Access Key
* @param {} body -
*
*/
Client.prototype.proctorLogin = function(parameters) {
Client.prototype.startSession = function(parameters) {
if (parameters === undefined) {

@@ -1646,3 +1639,3 @@ parameters = {};

var domain = this.domain;
var path = '/v1/proctors/login';
var path = '/v1/sessions/{session_id}/start';

@@ -1654,2 +1647,9 @@ var body;

path = path.replace('{session_id}', parameters['sessionId']);
if (parameters['sessionId'] === undefined) {
deferred.reject(new Error('Missing required parameter: sessionId'));
return deferred.promise;
}
if (parameters['body'] !== undefined) {

@@ -1656,0 +1656,0 @@ body = parameters['body'];

@@ -1,1 +0,1 @@

{"name":"@smarterservices/sp-public-client","version":"0.0.80","description":"the middle layer to microservice architecture for SP that handles tasks like proxying to backend api's,formatting responces,checking permissions","main":"index.js","dependencies":{"q":"latest","request":"latest"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"jordan piepkow","license":null}
{"name":"@smarterservices/sp-public-client","version":"0.0.81","description":"the middle layer to microservice architecture for SP that handles tasks like proxying to backend api's,formatting responces,checking permissions","main":"index.js","dependencies":{"q":"latest","request":"latest"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"jordan piepkow","license":null}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc