UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

119 lines (118 loc) 3.1 kB
export interface ModelDefinition { name: string; plural: string; path?: string; idName?: string; properties: { [k: string]: { name: string; type: string; default?: any; }; }; relations?: { [k: string]: { name: string; type: string; model: string; relationType?: string; modelThrough?: string; keyThrough?: string; keyFrom?: string; keyTo?: string; }; }; } declare type LoopbackTypes = string | number | boolean | Date; declare type LoopbackOps = 'eq' | 'and' | 'or' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'inq' | 'nin' | 'neq' | 'like' | 'nlike' | 'options' | 'regexp'; declare type LoopbackWhereOperation = { [op in LoopbackOps]: LoopbackTypes | LoopbackTypes[]; }; interface BaseLoopbackWhere { [field: string]: LoopbackTypes | LoopbackWhereOperation | LoopbackAndOrWhere; } declare type LoopbackAndOrWhere = { [op in 'and' | 'or']: BaseLoopbackWhere[]; }; declare type LoopbackWhere = BaseLoopbackWhere | LoopbackAndOrWhere; export interface LoopbackInclude { relation: string; scope?: LoopBackFilter; } export interface LoopBackFilter { fields?: string[] | { [field: string]: boolean; }; include?: string | string[] | LoopbackInclude | LoopbackInclude[]; limit?: number; order?: string | string[]; skip?: number; offset?: any; where?: LoopbackWhere; } export interface AccessTokenInterface { id?: string; ttl?: number; scopes?: ['string']; created?: Date; userId?: string; user?: any; } export declare class AccessToken implements AccessTokenInterface { id: string; ttl: number; scopes: ['string']; created: Date; userId: string; user: any; constructor(data?: AccessTokenInterface); /** * The name of the model represented by this $resource, * i.e. `AccessToken`. */ static getModelName(): string; /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of AccessToken for dynamic purposes. */ static factory(data: AccessTokenInterface): AccessToken; /** * @method getModelDefinition * @author Julien Ledun * @license MIT * This method returns an object that represents some of the model * definitions. */ static getModelDefinition(): ModelDefinition; } export declare class SDKToken implements AccessTokenInterface { id: any; ttl: number; scopes: any; created: any; userId: any; user: any; rememberMe: boolean; constructor(data?: AccessTokenInterface); } /** * This GeoPoint represents both, LoopBack and MongoDB GeoPoint */ export interface GeoPoint { lat?: number; lng?: number; type?: string; coordinates?: number[]; } export interface StatFilter { range: string; custom?: { start: string; end: string; }; where?: {}; groupBy?: string; } export {};