| POST | /user/autologin |
|---|
"use strict";
export class ApiServiceRequest {
/** @param {{apiKey?:string,latitude?:number,longitude?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The API Key required for authentication */
apiKey;
/**
* @type {number}
* @description Latitude of the user making this request */
latitude;
/**
* @type {number}
* @description Longitude of the user making this request */
longitude;
}
export class ApiServiceResponse {
/** @param {{description?:string,heading?:string,wasSuccessful?:boolean,modelState?:Object}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
description;
/** @type {string} */
heading;
/** @type {boolean} */
wasSuccessful;
/** @type {Object} */
modelState;
}
export class SystemUserPermission {
/** @param {{meeting?:boolean,journey?:boolean,attendance?:boolean,notificationCenter?:boolean,internalRating?:boolean,debrief?:boolean,thunderBoltActions?:boolean,onTheMove?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
meeting;
/** @type {boolean} */
journey;
/** @type {boolean} */
attendance;
/** @type {boolean} */
notificationCenter;
/** @type {boolean} */
internalRating;
/** @type {boolean} */
debrief;
/** @type {boolean} */
thunderBoltActions;
/** @type {boolean} */
onTheMove;
}
export class AppSettings {
/** @param {{allowAbstainRatings?:boolean,showMoodIndicatorOnApp?:boolean,takePhotoForAnalysis?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
allowAbstainRatings;
/** @type {boolean} */
showMoodIndicatorOnApp;
/** @type {boolean} */
takePhotoForAnalysis;
}
export class UserLoginResponse extends ApiServiceResponse {
/** @param {{allowAttendanceOnLaptop?:boolean,profileImageUrl?:string,friendlyName?:string,systemUserId?:number,username?:string,permissions?:SystemUserPermission,settings?:AppSettings,startLatitude?:number,startLongitude?:number,hasStartLocation?:boolean,endLatitude?:number,endLongitude?:number,hasEndLocation?:boolean,isSalesPerson?:boolean,feelingStatusMappings?:string[],hasAiPermissions?:boolean,refreshToken?:string,isManagerOrPromotedTo?:boolean,isTemplateApprover?:boolean,outstandingApprovals?:number,description?:string,heading?:string,wasSuccessful?:boolean,modelState?:Object}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {boolean} */
allowAttendanceOnLaptop;
/** @type {string} */
profileImageUrl;
/** @type {string} */
friendlyName;
/** @type {number} */
systemUserId;
/** @type {string} */
username;
/** @type {SystemUserPermission} */
permissions;
/** @type {AppSettings} */
settings;
/** @type {number} */
startLatitude;
/** @type {number} */
startLongitude;
/** @type {boolean} */
hasStartLocation;
/** @type {number} */
endLatitude;
/** @type {number} */
endLongitude;
/** @type {boolean} */
hasEndLocation;
/** @type {boolean} */
isSalesPerson;
/** @type {string[]} */
feelingStatusMappings;
/** @type {boolean} */
hasAiPermissions;
/** @type {string} */
refreshToken;
/** @type {boolean} */
isManagerOrPromotedTo;
/** @type {boolean} */
isTemplateApprover;
/** @type {number} */
outstandingApprovals;
}
export class AutoLogin extends ApiServiceRequest {
/** @param {{utcOffset?:number,systemUserId?:number,refreshToken?:string,apiKey?:string,latitude?:number,longitude?:number}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {number} */
utcOffset;
/** @type {number} */
systemUserId;
/** @type {string} */
refreshToken;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /user/autologin HTTP/1.1
Host: cochraneplus-api-dev.happen.zone
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"utcOffset":0,"systemUserId":0,"refreshToken":"String","apiKey":"String","latitude":0,"longitude":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"allowAttendanceOnLaptop":false,"profileImageUrl":"String","friendlyName":"String","systemUserId":0,"username":"String","permissions":{"meeting":false,"journey":false,"attendance":false,"notificationCenter":false,"internalRating":false,"debrief":false,"thunderBoltActions":false,"onTheMove":false},"settings":{"allowAbstainRatings":false,"showMoodIndicatorOnApp":false,"takePhotoForAnalysis":false},"startLatitude":0,"startLongitude":0,"hasStartLocation":false,"endLatitude":0,"endLongitude":0,"hasEndLocation":false,"isSalesPerson":false,"feelingStatusMappings":["String"],"hasAiPermissions":false,"refreshToken":"String","isManagerOrPromotedTo":false,"isTemplateApprover":false,"outstandingApprovals":0,"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}