All files / sn-client-js/src/ODataApi ODataParams.ts

100% Statements 13/13
100% Branches 2/2
100% Functions 1/1
100% Lines 13/13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51              1x                             11x 11x 11x 11x 11x 11x 11x 11x 11x 11x 11x 11x                                  
/**
 * @module ODataApi
 */ /** */
 
/**
 * Type of the OData option Object. Contains the possible OData params as properties.
 */
export class ODataParams {
    select?: string | string[];
    expand?: string | string[];
    orderby?: string | string[];
    top?: string;
    skip?: string;
    filter?: string;
    format?: string;
    inlinecount?: string;
    query?: string;
    metadata?: string;
    data?: Object;
    scenario?: string;
 
    constructor(options: IODataParams) {
        this.select = options.select;
        this.expand = options.expand;
        this.orderby = options.orderby;
        this.top = options.top;
        this.skip = options.skip;
        this.filter = options.filter;
        this.format = options.format;
        this.inlinecount = options.inlinecount;
        this.query = options.query;
        this.metadata = options.metadata;
        this.data = options.data || [];
        this.scenario = options.scenario;
    }
}
 
export interface IODataParams {
    select?: string | string[];
    expand?: string | string[];
    orderby?: string | string[];
    top?: string;
    skip?: string;
    filter?: string;
    format?: string;
    inlinecount?: string;
    query?: string;
    metadata?: string;
    data?: Object;
    scenario?: string;
}