@azure/cosmos
Version:
Microsoft Azure Cosmos DB Service Node.js SDK for NOSQL API
58 lines (57 loc) • 2.15 kB
JavaScript
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var FeedResponse_exports = {};
__export(FeedResponse_exports, {
FeedResponse: () => FeedResponse
});
module.exports = __toCommonJS(FeedResponse_exports);
var import_common = require("../common/index.js");
var import_headerUtils = require("../queryExecutionContext/headerUtils.js");
class FeedResponse {
constructor(resources, headers, hasMoreResults, diagnostics) {
this.resources = resources;
this.headers = headers;
this.hasMoreResults = hasMoreResults;
this.diagnostics = diagnostics;
}
get continuation() {
return this.continuationToken;
}
get continuationToken() {
return this.headers[import_common.Constants.HttpHeaders.Continuation];
}
get queryMetrics() {
return this.headers[import_common.Constants.HttpHeaders.QueryMetrics];
}
get requestCharge() {
return (0, import_headerUtils.getRequestChargeIfAny)(this.headers);
}
get activityId() {
return this.headers[import_common.Constants.HttpHeaders.ActivityId];
}
get correlatedActivityId() {
return this.headers[import_common.Constants.HttpHeaders.CorrelatedActivityId];
}
get indexMetrics() {
return (0, import_headerUtils.decodeAndParseJSONString)(this.headers[import_common.Constants.HttpHeaders.IndexUtilization]);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
FeedResponse
});