UNPKG

@sap-cloud-sdk/core

Version:
31 lines 1.47 kB
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getQueryParametersForSelection = void 0; var get_select_1 = require("./get-select"); var get_expand_1 = require("./get-expand"); /** * @deprecated Since v1.21.0. Use [[ODataUri.getSelect]] and [[ODataUri.getExpand]] instead. * * Get an object containing the given Selectables as query parameter, or an empty object if none were given. * This retrieves where in addition to the selection (`select`) there is also an expansion (`expand`) needed. * @typeparam EntityT - Type of the entity to get the selection for * @param selects - The list of selectables to be transformed to query parameters * @returns An object containing the query parameters or an empty object */ function getQueryParametersForSelection(selects) { if (selects === void 0) { selects = []; } return __assign(__assign({}, (0, get_select_1.getSelect)(selects)), (0, get_expand_1.getExpand)(selects)); } exports.getQueryParametersForSelection = getQueryParametersForSelection; //# sourceMappingURL=get-selection.js.map