@sap-cloud-sdk/core
Version:
SAP Cloud SDK for JavaScript core
46 lines • 2.19 kB
JavaScript
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.ODataDeleteRequestConfig = void 0;
var odata_request_config_1 = require("./odata-request-config");
/**
* OData delete request configuration for an entity type.
* @typeparam EntityT - Type of the entity to setup a request for
*/
var ODataDeleteRequestConfig = /** @class */ (function (_super) {
__extends(ODataDeleteRequestConfig, _super);
/**
* Creates an instance of ODataDeleteRequestConfig.
* @param entityConstructor - Constructor type of the entity to create a configuration for
*/
function ODataDeleteRequestConfig(entityConstructor, oDataUri) {
var _this = _super.call(this, 'delete', entityConstructor._defaultServicePath) || this;
_this.entityConstructor = entityConstructor;
_this.oDataUri = oDataUri;
_this.versionIdentifierIgnored = false;
return _this;
}
ODataDeleteRequestConfig.prototype.resourcePath = function () {
return this.oDataUri.getResourcePathForKeys(this.keys, this.entityConstructor);
};
ODataDeleteRequestConfig.prototype.queryParameters = function () {
return this.prependDollarToQueryParameters({});
};
return ODataDeleteRequestConfig;
}(odata_request_config_1.ODataRequestConfig));
exports.ODataDeleteRequestConfig = ODataDeleteRequestConfig;
//# sourceMappingURL=odata-delete-request-config.js.map
;