| GET | /attendance/sessioninfo |
|---|
"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;
}
/** @typedef {number} */
export var AttendanceEventType;
(function (AttendanceEventType) {
AttendanceEventType[AttendanceEventType["ClockOut"] = 0] = "ClockOut"
AttendanceEventType[AttendanceEventType["ClockIn"] = 1] = "ClockIn"
AttendanceEventType[AttendanceEventType["StartLunch"] = 2] = "StartLunch"
AttendanceEventType[AttendanceEventType["EndLunch"] = 3] = "EndLunch"
AttendanceEventType[AttendanceEventType["StartBreak"] = 4] = "StartBreak"
AttendanceEventType[AttendanceEventType["EndBreak"] = 5] = "EndBreak"
})(AttendanceEventType || (AttendanceEventType = {}));
export class AttendanceEventData {
/** @param {{type?:AttendanceEventType,time?:string,location?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {AttendanceEventType} */
type;
/** @type {string} */
time;
/** @type {string} */
location;
}
export class AttendanceSessionInfo {
/** @param {{attendanceSessionId?:number,attendanceGoalTime?:number,attendanceGoalTimeValue?:string,attendanceEvents?:AttendanceEventData[],startDate?:string,endDate?:string,isClockedIn?:boolean,timeElapsed?:number,latestEventType?:AttendanceEventType,totalBreakTime?:number,totalLunchTime?:number,isNew?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
attendanceSessionId;
/** @type {number} */
attendanceGoalTime;
/** @type {string} */
attendanceGoalTimeValue;
/** @type {AttendanceEventData[]} */
attendanceEvents;
/** @type {string} */
startDate;
/** @type {string} */
endDate;
/** @type {boolean} */
isClockedIn;
/** @type {number} */
timeElapsed;
/** @type {AttendanceEventType} */
latestEventType;
/** @type {number} */
totalBreakTime;
/** @type {number} */
totalLunchTime;
/** @type {boolean} */
isNew;
}
export class GetAttendanceSessionInfoResponse extends ApiServiceResponse {
/** @param {{sessionInfo?:AttendanceSessionInfo,description?:string,heading?:string,wasSuccessful?:boolean,modelState?:Object}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {AttendanceSessionInfo} */
sessionInfo;
}
export class GetAttendanceSessionInfoRequest extends ApiServiceRequest {
/** @param {{apiKey?:string,latitude?:number,longitude?:number}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
JavaScript GetAttendanceSessionInfoRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /attendance/sessioninfo HTTP/1.1 Host: cochraneplus-api-dev.happen.zone Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"sessionInfo":{"attendanceSessionId":0,"attendanceGoalTime":0,"attendanceGoalTimeValue":"00:00:00","attendanceEvents":[{}],"startDate":"String","endDate":"String","isClockedIn":false,"timeElapsed":0,"latestEventType":0,"totalBreakTime":0,"totalLunchTime":0,"isNew":false},"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}