{"version":3,"file":"BlobQueryResponse-browser.mjs","sourceRoot":"","sources":["../../src/BlobQueryResponse-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAgBlC;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IAC5B;;;;;OAKG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;IAC5C,CAAC;IAED;;;;;;OAMG;IACH,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC;IAC/C,CAAC;IAED;;;;;OAKG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC;IAC/C,CAAC;IAED;;;;;OAKG;IACH,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC;IACxC,CAAC;IAED;;;;;OAKG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC;IAC7C,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC;IAC1C,CAAC;IAED;;;;;;OAMG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC;IAC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AAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n  BlobDownloadResponseModel,\n  BlobType,\n  CopyStatusType,\n  LeaseDurationType,\n  LeaseStateType,\n  LeaseStatusType,\n  BlobQueryResponseModel,\n  BlobQueryHeaders,\n} from \"./generatedModels.js\";\nimport type { Metadata } from \"./models.js\";\nimport type { BlobQuickQueryStreamOptions } from \"./utils/BlobQuickQueryStream.js\";\nimport type { ResponseWithHeaders } from \"./utils/utils.common.js\";\n\n/**\n * ONLY AVAILABLE IN BROWSER RUNTIME.\n *\n * BlobQueryResponse implements BlobDownloadResponseModel interface, and in browser runtime it will\n * parse avro data returned by blob query.\n */\nexport class BlobQueryResponse implements BlobDownloadResponseModel {\n  /**\n   * Indicates that the service supports\n   * requests for partial file content.\n   *\n   * @readonly\n   */\n  public get acceptRanges(): string | undefined {\n    return this.originalResponse.acceptRanges;\n  }\n\n  /**\n   * Returns if it was previously specified\n   * for the file.\n   *\n   * @readonly\n   */\n  public get cacheControl(): string | undefined {\n    return this.originalResponse.cacheControl;\n  }\n\n  /**\n   * Returns the value that was specified\n   * for the 'x-ms-content-disposition' header and specifies how to process the\n   * response.\n   *\n   * @readonly\n   */\n  public get contentDisposition(): string | undefined {\n    return this.originalResponse.contentDisposition;\n  }\n\n  /**\n   * Returns the value that was specified\n   * for the Content-Encoding request header.\n   *\n   * @readonly\n   */\n  public get contentEncoding(): string | undefined {\n    return this.originalResponse.contentEncoding;\n  }\n\n  /**\n   * Returns the value that was specified\n   * for the Content-Language request header.\n   *\n   * @readonly\n   */\n  public get contentLanguage(): string | undefined {\n    return this.originalResponse.contentLanguage;\n  }\n\n  /**\n   * The current sequence number for a\n   * page blob. This header is not returned for block blobs or append blobs.\n   *\n   * @readonly\n   */\n  public get blobSequenceNumber(): number | undefined {\n    return this.originalResponse.blobSequenceNumber;\n  }\n\n  /**\n   * The blob's type. Possible values include:\n   * 'BlockBlob', 'PageBlob', 'AppendBlob'.\n   *\n   * @readonly\n   */\n  public get blobType(): BlobType | undefined {\n    return this.originalResponse.blobType;\n  }\n\n  /**\n   * The number of bytes present in the\n   * response body.\n   *\n   * @readonly\n   */\n  public get contentLength(): number | undefined {\n    return this.originalResponse.contentLength;\n  }\n\n  /**\n   * If the file has an MD5 hash and the\n   * request is to read the full file, this response header is returned so that\n   * the client can check for message content integrity. If the request is to\n   * read a specified range and the 'x-ms-range-get-content-md5' is set to\n   * true, then the request returns an MD5 hash for the range, as long as the\n   * range size is less than or equal to 4 MB. If neither of these sets of\n   * conditions is true, then no value is returned for the 'Content-MD5'\n   * header.\n   *\n   * @readonly\n   */\n  public get contentMD5(): Uint8Array | undefined {\n    return this.originalResponse.contentMD5;\n  }\n\n  /**\n   * Indicates the range of bytes returned if\n   * the client requested a subset of the file by setting the Range request\n   * header.\n   *\n   * @readonly\n   */\n  public get contentRange(): string | undefined {\n    return this.originalResponse.contentRange;\n  }\n\n  /**\n   * The content type specified for the file.\n   * The default content type is 'application/octet-stream'\n   *\n   * @readonly\n   */\n  public get contentType(): string | undefined {\n    return this.originalResponse.contentType;\n  }\n\n  /**\n   * Conclusion time of the last attempted\n   * Copy File operation where this file was the destination file. This value\n   * can specify the time of a completed, aborted, or failed copy attempt.\n   *\n   * @readonly\n   */\n  public get copyCompletedOn(): Date | undefined {\n    return undefined;\n  }\n\n  /**\n   * String identifier for the last attempted Copy\n   * File operation where this file was the destination file.\n   *\n   * @readonly\n   */\n  public get copyId(): string | undefined {\n    return this.originalResponse.copyId;\n  }\n\n  /**\n   * Contains the number of bytes copied and\n   * the total bytes in the source in the last attempted Copy File operation\n   * where this file was the destination file. Can show between 0 and\n   * Content-Length bytes copied.\n   *\n   * @readonly\n   */\n  public get copyProgress(): string | undefined {\n    return this.originalResponse.copyProgress;\n  }\n\n  /**\n   * URL up to 2KB in length that specifies the\n   * source file used in the last attempted Copy File operation where this file\n   * was the destination file.\n   *\n   * @readonly\n   */\n  public get copySource(): string | undefined {\n    return this.originalResponse.copySource;\n  }\n\n  /**\n   * State of the copy operation\n   * identified by 'x-ms-copy-id'. Possible values include: 'pending',\n   * 'success', 'aborted', 'failed'\n   *\n   * @readonly\n   */\n  public get copyStatus(): CopyStatusType | undefined {\n    return this.originalResponse.copyStatus;\n  }\n\n  /**\n   * Only appears when\n   * x-ms-copy-status is failed or pending. Describes cause of fatal or\n   * non-fatal copy operation failure.\n   *\n   * @readonly\n   */\n  public get copyStatusDescription(): string | undefined {\n    return this.originalResponse.copyStatusDescription;\n  }\n\n  /**\n   * When a blob is leased,\n   * specifies whether the lease is of infinite or fixed duration. Possible\n   * values include: 'infinite', 'fixed'.\n   *\n   * @readonly\n   */\n  public get leaseDuration(): LeaseDurationType | undefined {\n    return this.originalResponse.leaseDuration;\n  }\n\n  /**\n   * Lease state of the blob. Possible\n   * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.\n   *\n   * @readonly\n   */\n  public get leaseState(): LeaseStateType | undefined {\n    return this.originalResponse.leaseState;\n  }\n\n  /**\n   * The current lease status of the\n   * blob. Possible values include: 'locked', 'unlocked'.\n   *\n   * @readonly\n   */\n  public get leaseStatus(): LeaseStatusType | undefined {\n    return this.originalResponse.leaseStatus;\n  }\n\n  /**\n   * A UTC date/time value generated by the service that\n   * indicates the time at which the response was initiated.\n   *\n   * @readonly\n   */\n  public get date(): Date | undefined {\n    return this.originalResponse.date;\n  }\n\n  /**\n   * The number of committed blocks\n   * present in the blob. This header is returned only for append blobs.\n   *\n   * @readonly\n   */\n  public get blobCommittedBlockCount(): number | undefined {\n    return this.originalResponse.blobCommittedBlockCount;\n  }\n\n  /**\n   * The ETag contains a value that you can use to\n   * perform operations conditionally, in quotes.\n   *\n   * @readonly\n   */\n  public get etag(): string | undefined {\n    return this.originalResponse.etag;\n  }\n\n  /**\n   * The error code.\n   *\n   * @readonly\n   */\n  public get errorCode(): string | undefined {\n    return this.originalResponse.errorCode;\n  }\n\n  /**\n   * The value of this header is set to\n   * true if the file data and application metadata are completely encrypted\n   * using the specified algorithm. Otherwise, the value is set to false (when\n   * the file is unencrypted, or if only parts of the file/application metadata\n   * are encrypted).\n   *\n   * @readonly\n   */\n  public get isServerEncrypted(): boolean | undefined {\n    return this.originalResponse.isServerEncrypted;\n  }\n\n  /**\n   * If the blob has a MD5 hash, and if\n   * request contains range header (Range or x-ms-range), this response header\n   * is returned with the value of the whole blob's MD5 value. This value may\n   * or may not be equal to the value returned in Content-MD5 header, with the\n   * latter calculated from the requested range.\n   *\n   * @readonly\n   */\n  public get blobContentMD5(): Uint8Array | undefined {\n    return this.originalResponse.blobContentMD5;\n  }\n\n  /**\n   * Returns the date and time the file was last\n   * modified. Any operation that modifies the file or its properties updates\n   * the last modified time.\n   *\n   * @readonly\n   */\n  public get lastModified(): Date | undefined {\n    return this.originalResponse.lastModified;\n  }\n\n  /**\n   * A name-value pair\n   * to associate with a file storage object.\n   *\n   * @readonly\n   */\n  public get metadata(): Metadata | undefined {\n    return this.originalResponse.metadata;\n  }\n\n  /**\n   * This header uniquely identifies the request\n   * that was made and can be used for troubleshooting the request.\n   *\n   * @readonly\n   */\n  public get requestId(): string | undefined {\n    return this.originalResponse.requestId;\n  }\n\n  /**\n   * If a client request id header is sent in the request, this header will be present in the\n   * response with the same value.\n   *\n   * @readonly\n   */\n  public get clientRequestId(): string | undefined {\n    return this.originalResponse.clientRequestId;\n  }\n\n  /**\n   * Indicates the version of the File service used\n   * to execute the request.\n   *\n   * @readonly\n   */\n  public get version(): string | undefined {\n    return this.originalResponse.version;\n  }\n\n  /**\n   * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned\n   * when the blob was encrypted with a customer-provided key.\n   *\n   * @readonly\n   */\n  public get encryptionKeySha256(): string | undefined {\n    return this.originalResponse.encryptionKeySha256;\n  }\n\n  /**\n   * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n   * true, then the request returns a crc64 for the range, as long as the range size is less than\n   * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n   * specified in the same request, it will fail with 400(Bad Request)\n   */\n  public get contentCrc64(): Uint8Array | undefined {\n    return this.originalResponse.contentCrc64;\n  }\n\n  /**\n   * The response body as a browser Blob.\n   * Always undefined in node.js.\n   *\n   * @readonly\n   */\n  public get blobBody(): Promise<Blob> | undefined {\n    throw Error(`Quick query in browser is not supported yet.`);\n  }\n\n  /**\n   * The response body as a node.js Readable stream.\n   * Always undefined in the browser.\n   *\n   * @readonly\n   */\n  public get readableStreamBody(): NodeJS.ReadableStream | undefined {\n    return undefined;\n  }\n\n  /**\n   * The HTTP response.\n   */\n  public get _response(): ResponseWithHeaders<BlobQueryHeaders>[\"_response\"] {\n    return this.originalResponse._response;\n  }\n\n  private originalResponse: BlobQueryResponseModel;\n\n  /**\n   * Creates an instance of BlobQueryResponse.\n   *\n   * @param originalResponse -\n   * @param options -\n   */\n  public constructor(\n    originalResponse: BlobQueryResponseModel,\n    _options: BlobQuickQueryStreamOptions = {},\n  ) {\n    this.originalResponse = originalResponse;\n  }\n}\n"]}