"use strict";
export class DeviceTypeModel {
/** @param {{DeviceTypeId?:string,DeviceClassId?:string,DeviceClassName?:string,Brand?:string,ModelName?:string,FormFactor?:string,Dimensions?:string,DisplayResolutionWidthPixels?:number,DisplayResolutionHeightPixels?:number,DisplaySizeWidthInches?:number,DisplaySizeHeightInches?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Guid representing the saved Device Type */
DeviceTypeId;
/**
* @type {string}
* @description Guid representing the saved Device Class */
DeviceClassId;
/**
* @type {string}
* @description The Device Class Name */
DeviceClassName;
/**
* @type {string}
* @description The Device Brand. */
Brand;
/**
* @type {string}
* @description The Device Model Name. */
ModelName;
/**
* @type {string}
* @description The Device Form, e.g Phone | Tablet. */
FormFactor;
/**
* @type {string}
* @description The Device Dimensions (Height x Width x Depth). */
Dimensions;
/**
* @type {?number}
* @description The Device display resolution width in pixels. */
DisplayResolutionWidthPixels;
/**
* @type {?number}
* @description The Device display resolution height in pixels. */
DisplayResolutionHeightPixels;
/**
* @type {?number}
* @description The Device display width size in inches. */
DisplaySizeWidthInches;
/**
* @type {?number}
* @description The Device display height size in inches. */
DisplaySizeHeightInches;
}
export class DeviceHistoryModel {
/** @param {{DeviceHistoryId?:string,PrimaryDeviceHistoryDeviceConfigurationId?:string,DeviceName?:string,OperatingSystem?:string,OperatingSystemVersion?:string,IpAddress?:string,Notes?:string,TotalMemorySize?:number,CellularProviderName?:string,MobileCountryCode?:string,MobileNetworkCode?:string,LanguageCodeIdentifier?:string,Latitude?:number,Longitude?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Guid representing the current Device History */
DeviceHistoryId;
/**
* @type {string}
* @description Guid representing the current Device History Device Configuration record. */
PrimaryDeviceHistoryDeviceConfigurationId;
/**
* @type {string}
* @description The Device name. */
DeviceName;
/**
* @type {string}
* @description The Device operating system. */
OperatingSystem;
/**
* @type {string}
* @description The Device operating system version. */
OperatingSystemVersion;
/**
* @type {string}
* @description The Device IP Address. */
IpAddress;
/**
* @type {string}
* @description Any Notes about the device. */
Notes;
/**
* @type {?number}
* @description Total memory size available (in bytes). */
TotalMemorySize;
/**
* @type {string}
* @description The Network provider name. */
CellularProviderName;
/**
* @type {string}
* @description The Mobile Country Code the device is currently located in. */
MobileCountryCode;
/**
* @type {string}
* @description The Mobile Network Code the device is currently using. */
MobileNetworkCode;
/**
* @type {string}
* @description The Language Code Identifier that represents the language used on the device. */
LanguageCodeIdentifier;
/**
* @type {number}
* @description The latitude the device was last located at. */
Latitude;
/**
* @type {number}
* @description The longitude the device was last located at. */
Longitude;
}
export class DeviceModel {
/** @param {{DeviceId?:string,DeviceType?:DeviceTypeModel,CurrentHistory?:DeviceHistoryModel,ModelName?:string,ModelNumber?:string,SerialNumber?:string,ManufacturerDeviceNumber?:string,MacAddress?:string,InstanceSeed?:number,InstanceCounterLastValue?:number,ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Guid representing the saved Device */
DeviceId;
/**
* @type {DeviceTypeModel}
* @description Details of the Type of Device */
DeviceType;
/**
* @type {DeviceHistoryModel}
* @description Current saved settings of the Device */
CurrentHistory;
/**
* @type {string}
* @description The Device Model Name. */
ModelName;
/**
* @type {string}
* @description The Device model number. */
ModelNumber;
/**
* @type {string}
* @description The Device serial number. */
SerialNumber;
/**
* @type {string}
* @description The Device manufacturers number. */
ManufacturerDeviceNumber;
/**
* @type {string}
* @description The Device MAC Address. */
MacAddress;
/**
* @type {number}
* @description The current value of InstanceSeed that the device has stored. If InstanceCounterLastValue has gone over 99999, this will contain a new seed value for the device. */
InstanceSeed;
/**
* @type {number}
* @description The current value of InstanceCounterLastValue that the device has stored */
InstanceCounterLastValue;
/**
* @type {ResponseStatus}
* @description ServiceStack ResponseStatus. */
ResponseStatus;
}
export class RegisterDevice {
/** @param {{ApplianceId?:string,DeviceId?:string,ManufacturerDeviceNumber?:string,MacAddress?:string,ModelName?:string,FormFactor?:string,Brand?:string,Dimensions?:string,DisplayResolutionWidthPixels?:number,DisplayResolutionHeightPixels?:number,DisplaySizeWidthInches?:number,DisplaySizeHeightInches?:number,OperatingSystem?:string,OperatingSystemVersion?:string,IpAddress?:string,Notes?:string,TotalMemorySize?:number,CellularProviderName?:string,ISOCountryCode?:string,MobileCountryCode?:string,MobileNetworkCode?:string,LanguageCodeIdentifier?:string,LastKnownTimeZone?:string,LastKnownTimeZoneOffset?:string,Latitude?:number,Longitude?:number,InstanceSeed?:number,InstanceCounterLastValue?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Guid of the Appliance this Device is Registering under. */
ApplianceId;
/**
* @type {string}
* @description Guid of the Device. If empty the Device will be inserted, if provided the device will be updated. */
DeviceId;
/**
* @type {string}
* @description The Device manufacturers number. */
ManufacturerDeviceNumber;
/**
* @type {string}
* @description The Device MAC Address. */
MacAddress;
/**
* @type {string}
* @description The Device Model Name. */
ModelName;
/**
* @type {string}
* @description The Device Form, e.g Phone | Tablet. */
FormFactor;
/**
* @type {string}
* @description The Device Brand. */
Brand;
/**
* @type {string}
* @description The Device Dimensions (Height x Width x Depth). */
Dimensions;
/**
* @type {?number}
* @description The Device display resolution width in pixels. */
DisplayResolutionWidthPixels;
/**
* @type {?number}
* @description The Device display resolution height in pixels. */
DisplayResolutionHeightPixels;
/**
* @type {?number}
* @description The Device display width size in inches. */
DisplaySizeWidthInches;
/**
* @type {?number}
* @description The Device display height size in inches. */
DisplaySizeHeightInches;
/**
* @type {string}
* @description The Device operating system. */
OperatingSystem;
/**
* @type {string}
* @description The Device operating system version. */
OperatingSystemVersion;
/**
* @type {string}
* @description The Device IP Address. */
IpAddress;
/**
* @type {string}
* @description Any Notes about the device. */
Notes;
/**
* @type {?number}
* @description Total memory size available (in bytes). */
TotalMemorySize;
/**
* @type {string}
* @description The Network provider name. */
CellularProviderName;
/**
* @type {string}
* @description The ISO Country Code of the country the device is currently located in. */
ISOCountryCode;
/**
* @type {string}
* @description The Mobile Country Code the device is currently located in. */
MobileCountryCode;
/**
* @type {string}
* @description The Mobile Network Code the device is currently using. */
MobileNetworkCode;
/**
* @type {string}
* @description The Language Code Identifier that represents the language used on the device. */
LanguageCodeIdentifier;
/**
* @type {string}
* @description The name of the Timezone the device was last used in. */
LastKnownTimeZone;
/**
* @type {string}
* @description The UTC Offset of the Timezone the device was last used in. Formatted as +-##:## */
LastKnownTimeZoneOffset;
/**
* @type {number}
* @description The latitude the device was last located at. */
Latitude;
/**
* @type {number}
* @description The longitude the device was last located at. */
Longitude;
/**
* @type {number}
* @description The current value of InstanceSeed that the device has stored. */
InstanceSeed;
/**
* @type {number}
* @description The current value of InstanceCounterLastValue that the device has stored */
InstanceCounterLastValue;
}
JavaScript RegisterDevice DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsv/reply/RegisterDevice HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ManufacturerDeviceNumber: String,
MacAddress: String,
ModelName: String,
FormFactor: String,
Brand: String,
Dimensions: String,
DisplayResolutionWidthPixels: 0,
DisplayResolutionHeightPixels: 0,
DisplaySizeWidthInches: 0,
DisplaySizeHeightInches: 0,
OperatingSystem: String,
OperatingSystemVersion: String,
IpAddress: String,
Notes: String,
TotalMemorySize: 0,
CellularProviderName: String,
ISOCountryCode: String,
MobileCountryCode: String,
MobileNetworkCode: String,
LanguageCodeIdentifier: String,
LastKnownTimeZone: String,
LastKnownTimeZoneOffset: String,
Latitude: 0,
Longitude: 0,
InstanceSeed: 0,
InstanceCounterLastValue: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
DeviceType:
{
DeviceClassName: String,
Brand: String,
ModelName: String,
FormFactor: String,
Dimensions: String,
DisplayResolutionWidthPixels: 0,
DisplayResolutionHeightPixels: 0,
DisplaySizeWidthInches: 0,
DisplaySizeHeightInches: 0
},
CurrentHistory:
{
DeviceName: String,
OperatingSystem: String,
OperatingSystemVersion: String,
IpAddress: String,
Notes: String,
TotalMemorySize: 0,
CellularProviderName: String,
MobileCountryCode: String,
MobileNetworkCode: String,
LanguageCodeIdentifier: String,
Latitude: 0,
Longitude: 0
},
ModelName: String,
ModelNumber: String,
SerialNumber: String,
ManufacturerDeviceNumber: String,
MacAddress: String,
InstanceSeed: 0,
InstanceCounterLastValue: 0,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}