UNPKG

ts-odata-client

Version:
38 lines (37 loc) 1.78 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.ODataV4Context = void 0; var ODataV4QueryProvider_1 = require("./ODataV4QueryProvider"); var ODataContext_1 = require("./ODataContext"); /** * Base ODataContext class; use this class as a base for communicating with services that are compatible with OData v4. * This context uses the fetch library; if the runtime environment does not support fetch, please use a polyfill. */ var ODataV4Context = /** @class */ (function (_super) { __extends(ODataV4Context, _super); function ODataV4Context(basePath, options) { var _this = _super.call(this, basePath) || this; _this.options = options; return _this; } ODataV4Context.prototype.createQuery = function (endpoint) { return new ODataV4QueryProvider_1.ODataV4QueryProvider(this.basePath + endpoint, this.options).createQuery(); }; return ODataV4Context; }(ODataContext_1.ODataContext)); exports.ODataV4Context = ODataV4Context;