"use strict";
/** @typedef {'Initiated'|'Successful'|'JobError'} */
export var GatewayResponseStatus;
(function (GatewayResponseStatus) {
GatewayResponseStatus["Initiated"] = "Initiated"
GatewayResponseStatus["Successful"] = "Successful"
GatewayResponseStatus["JobError"] = "JobError"
})(GatewayResponseStatus || (GatewayResponseStatus = {}));
export class GatewayTaskResponse {
/** @param {{ReferenceId?:string,GatewayTaskResponseStatus?:GatewayResponseStatus,Payload?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ReferenceId;
/** @type {GatewayResponseStatus} */
GatewayTaskResponseStatus;
/** @type {string} */
Payload;
}
export class BaseQueueMessage {
/** @param {{LicenseeId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
LicenseeId;
}
export class GatewayTask extends BaseQueueMessage {
/** @param {{ReferenceId?:string,JobTypeId?:string,IsBeingProcessed?:boolean,Payload?:string,ContentStoredExternally?:boolean,ResendRequest?:boolean,LicenseeId?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
ReferenceId;
/** @type {string} */
JobTypeId;
/** @type {boolean} */
IsBeingProcessed;
/** @type {string} */
Payload;
/** @type {boolean} */
ContentStoredExternally;
/** @type {boolean} */
ResendRequest;
}
export class SendTask {
/** @param {{GatewayTask?:GatewayTask}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {GatewayTask} */
GatewayTask;
}
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 /jsonl/reply/SendTask HTTP/1.1
Host: production-eros-gateway-api-sms-wa.azurewebsites.net
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"GatewayTask":{"ReferenceId":"00000000000000000000000000000000","JobTypeId":"00000000000000000000000000000000","IsBeingProcessed":false,"Payload":"String","ContentStoredExternally":false,"ResendRequest":false,"LicenseeId":"00000000000000000000000000000000"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ReferenceId":"00000000000000000000000000000000","GatewayTaskResponseStatus":"Initiated","Payload":"String"}