"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,responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Information about the response. */
description;
/**
* @type {string}
* @description Heading or summary of the response. */
heading;
/**
* @type {boolean}
* @description Did the intended operation for this response complete successfully? */
wasSuccessful;
/** @type {ResponseStatus} */
responseStatus;
}
export class ClientData {
/** @param {{firstName?:string,surname?:string,email?:string,mobileNumber?:string,address1?:string,address2?:string,city?:string,dateOfBirth?:string,sourceOfIncome?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
firstName;
/** @type {string} */
surname;
/** @type {string} */
email;
/** @type {string} */
mobileNumber;
/** @type {string} */
address1;
/** @type {string} */
address2;
/** @type {string} */
city;
/** @type {string} */
dateOfBirth;
/** @type {string} */
sourceOfIncome;
}
export class LoginData {
/** @param {{systemUserId?:number,refreshToken?:string,hasActivePanicCover?:boolean,accountInArrears?:boolean,updateClientInformation?:boolean,nextPanicDate?:string,panicReference?:string,clientData?:ClientData}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
systemUserId;
/** @type {string} */
refreshToken;
/** @type {boolean} */
hasActivePanicCover;
/** @type {boolean} */
accountInArrears;
/** @type {boolean} */
updateClientInformation;
/** @type {string} */
nextPanicDate;
/** @type {string} */
panicReference;
/** @type {ClientData} */
clientData;
}
export class ConfirmOtpResponse extends ApiServiceResponse {
/** @param {{data?:LoginData,description?:string,heading?:string,wasSuccessful?:boolean,responseStatus?:ResponseStatus}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {LoginData} */
data;
}
export class ConfirmOtp extends ApiServiceRequest {
/** @param {{systemUserId?:number,otp?:string,utcOffset?:number,pushPlayerId?:string,apiKey?:string,latitude?:number,longitude?:number}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {number} */
systemUserId;
/** @type {string} */
otp;
/** @type {number} */
utcOffset;
/**
* @type {string}
* @description The user's push token - used for push messages. */
pushPlayerId;
}
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.
POST /csv/reply/ConfirmOtp HTTP/1.1
Host: legalguard-api-dev.happen.zone
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"systemUserId":0,"otp":"String","utcOffset":0,"pushPlayerId":"String","apiKey":"String","latitude":0,"longitude":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"data":{"systemUserId":0,"refreshToken":"String","hasActivePanicCover":false,"accountInArrears":false,"updateClientInformation":false,"nextPanicDate":"String","panicReference":"String","clientData":{"firstName":"String","surname":"String","email":"String","mobileNumber":"String","address1":"String","address2":"String","city":"String","dateOfBirth":"String","sourceOfIncome":"String"}},"description":"String","heading":"String","wasSuccessful":false,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}