/**
* DTV Tracking API
* API for the communication between DTV app and server.
*
* OpenAPI spec version: 1.0.0
* Contact: jan.beckmann@edu.fhdw.de
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
///
import localVarRequest = require('request');
import http = require('http');
/**
* A GPS coordinate, given in latitude and longitude
*/
export declare class Location {
'latitude': number;
'longitude': number;
static discriminator: string | undefined;
static attributeTypeMap: Array<{
name: string;
baseName: string;
type: string;
}>;
static getAttributeTypeMap(): {
name: string;
baseName: string;
type: string;
}[];
}
export declare class LocationData {
'orderIds': Array;
'location': Location;
/**
* A unique id used to track the submitting device / truck
*/
'deviceId': string;
static discriminator: string | undefined;
static attributeTypeMap: Array<{
name: string;
baseName: string;
type: string;
}>;
static getAttributeTypeMap(): {
name: string;
baseName: string;
type: string;
}[];
}
/**
* An actual order
*/
export declare class Order {
'description': string;
'id': string;
static discriminator: string | undefined;
static attributeTypeMap: Array<{
name: string;
baseName: string;
type: string;
}>;
static getAttributeTypeMap(): {
name: string;
baseName: string;
type: string;
}[];
}
export declare class OrderData {
'orderTemplate': OrderTemplate;
static discriminator: string | undefined;
static attributeTypeMap: Array<{
name: string;
baseName: string;
type: string;
}>;
static getAttributeTypeMap(): {
name: string;
baseName: string;
type: string;
}[];
}
/**
* A template for an order
*/
export declare class OrderTemplate {
'description': string;
'id': string;
'isTemplate': boolean;
'location': Location;
static discriminator: string | undefined;
static attributeTypeMap: Array<{
name: string;
baseName: string;
type: string;
}>;
static getAttributeTypeMap(): {
name: string;
baseName: string;
type: string;
}[];
}
export interface Authentication {
/**
* Apply authentication settings to header and query params.
*/
applyToRequest(requestOptions: localVarRequest.Options): void;
}
export declare class HttpBasicAuth implements Authentication {
username: string;
password: string;
applyToRequest(requestOptions: localVarRequest.Options): void;
}
export declare class ApiKeyAuth implements Authentication {
private location;
private paramName;
apiKey: string;
constructor(location: string, paramName: string);
applyToRequest(requestOptions: localVarRequest.Options): void;
}
export declare class OAuth implements Authentication {
accessToken: string;
applyToRequest(requestOptions: localVarRequest.Options): void;
}
export declare class VoidAuth implements Authentication {
username: string;
password: string;
applyToRequest(_: localVarRequest.Options): void;
}
export declare enum DefaultApiApiKeys {
}
export declare class DefaultApi {
protected _basePath: string;
protected defaultHeaders: any;
protected _useQuerystring: boolean;
protected authentications: {
'default': Authentication;
};
constructor(basePath?: string);
set useQuerystring(value: boolean);
set basePath(basePath: string);
get basePath(): string;
setDefaultAuthentication(auth: Authentication): void;
setApiKey(key: DefaultApiApiKeys, value: string): void;
/**
* Creates a new order and persists it to the database
* @summary Creates a new order.
* @param orderData
* @param {*} [options] Override http request options.
*/
addOrder(orderData: OrderData, options?: any): Promise<{
response: http.IncomingMessage;
body: OrderTemplate;
}>;
/**
* Returns the order with the given ID. Under some circumstances (if the given order id is an template id) it creates a new order based off this ID and returns the created order.
* @summary Returns the order with the given ID.
* @param orderId ID of the order to be returned
* @param {*} [options] Override http request options.
*/
getOrder(orderId: string, options?: any): Promise<{
response: http.IncomingMessage;
body: Order;
}>;
/**
* Sends the current position for the truck with the given order(s) to the system.
* @summary Transmit a new location during tracking
* @param locationData
* @param {*} [options] Override http request options.
*/
sendLocation(locationData: LocationData, options?: any): Promise<{
response: http.IncomingMessage;
body?: any;
}>;
}