@odata2ts/odata-service
Version:
Main runtime dependency of odata2ts for generated odata client services
25 lines • 1.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServiceStateHelper = void 0;
const RequestHeaders_js_1 = require("./RequestHeaders.js");
class ServiceStateHelper {
constructor(client, basePath, name, options = {}) {
this.client = client;
this.basePath = basePath;
this.name = name;
this.options = options;
this.addFullPath = (path) => {
var _a;
return `${(_a = this.path) !== null && _a !== void 0 ? _a : ""}${path ? "/" + path : ""}`;
};
this.getDefaultHeaders = () => {
return this.options.bigNumbersAsString ? RequestHeaders_js_1.BIG_NUMBERS_HEADERS : RequestHeaders_js_1.DEFAULT_HEADERS;
};
this.isUrlNotEncoded = () => {
return !!this.options.noUrlEncoding;
};
this.path = basePath && name ? basePath + "/" + name : basePath ? basePath : name || "";
}
}
exports.ServiceStateHelper = ServiceStateHelper;
//# sourceMappingURL=ServiceStateHelper.js.map