UNPKG

@azure/cosmos

Version:
70 lines (69 loc) 2.47 kB
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 ChangeFeedIteratorResponse_exports = {}; __export(ChangeFeedIteratorResponse_exports, { ChangeFeedIteratorResponse: () => ChangeFeedIteratorResponse }); module.exports = __toCommonJS(ChangeFeedIteratorResponse_exports); var import_common = require("../../common/index.js"); class ChangeFeedIteratorResponse { /** * @internal */ constructor(result, count, statusCode, headers, diagnostics, subStatusCode) { this.result = result; this.count = count; this.statusCode = statusCode; this.diagnostics = diagnostics; this.subStatusCode = subStatusCode; this.headers = headers; } /** * Gets the request charge for this request from the Azure Cosmos DB service. */ get requestCharge() { const rus = this.headers[import_common.Constants.HttpHeaders.RequestCharge]; return rus ? parseInt(rus, 10) : null; } /** * Gets the activity ID for the request from the Azure Cosmos DB service. */ get activityId() { return this.headers[import_common.Constants.HttpHeaders.ActivityId]; } /** * Gets the continuation token to be used for continuing enumeration of the Azure Cosmos DB service. */ get continuationToken() { return this.headers[import_common.Constants.HttpHeaders.ContinuationToken]; } /** * Gets the session token for use in session consistency reads from the Azure Cosmos DB service. */ get sessionToken() { return this.headers[import_common.Constants.HttpHeaders.SessionToken]; } /** * Response headers of the response from Azure Cosmos DB */ headers; } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { ChangeFeedIteratorResponse });