@azure/storage-file-share 12.23.0-alpha.20240527.1 → 12.23.0-alpha.20240529.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. package/dist/index.js +305 -354
  2. package/dist/index.js.map +1 -1
  3. package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
  4. package/dist-esm/storage-blob/src/generated/src/models/index.js.map +1 -1
  5. package/dist-esm/storage-blob/src/generated/src/models/mappers.js +2356 -2356
  6. package/dist-esm/storage-blob/src/generated/src/models/mappers.js.map +1 -1
  7. package/dist-esm/storage-blob/src/generated/src/models/parameters.js +444 -444
  8. package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -1
  9. package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js +20 -20
  10. package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js.map +1 -1
  11. package/dist-esm/storage-blob/src/generated/src/operations/blob.js +134 -134
  12. package/dist-esm/storage-blob/src/generated/src/operations/blob.js.map +1 -1
  13. package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js +33 -33
  14. package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js.map +1 -1
  15. package/dist-esm/storage-blob/src/generated/src/operations/container.js +107 -107
  16. package/dist-esm/storage-blob/src/generated/src/operations/container.js.map +1 -1
  17. package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js +47 -47
  18. package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js.map +1 -1
  19. package/dist-esm/storage-blob/src/generated/src/operations/service.js +46 -46
  20. package/dist-esm/storage-blob/src/generated/src/operations/service.js.map +1 -1
  21. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js.map +1 -1
  22. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js.map +1 -1
  23. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js.map +1 -1
  24. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js.map +1 -1
  25. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js.map +1 -1
  26. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js.map +1 -1
  27. package/dist-esm/storage-blob/src/generated/src/storageClient.js +4 -4
  28. package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
  29. package/dist-esm/storage-blob/src/generatedModels.js.map +1 -1
  30. package/dist-esm/storage-blob/src/index.js +1 -1
  31. package/dist-esm/storage-blob/src/index.js.map +1 -1
  32. package/dist-esm/storage-blob/src/models.js +7 -0
  33. package/dist-esm/storage-blob/src/models.js.map +1 -1
  34. package/dist-esm/storage-blob/src/utils/constants.js +1 -1
  35. package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
  36. package/dist-esm/storage-file-share/src/Clients.js +5 -5
  37. package/dist-esm/storage-file-share/src/Clients.js.map +1 -1
  38. package/dist-esm/storage-file-share/src/Pipeline.js +259 -0
  39. package/dist-esm/storage-file-share/src/Pipeline.js.map +1 -0
  40. package/dist-esm/storage-file-share/src/ShareClientInternal.js.map +1 -1
  41. package/dist-esm/storage-file-share/src/ShareServiceClient.js +2 -2
  42. package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -1
  43. package/dist-esm/storage-file-share/src/StorageClient.js +1 -1
  44. package/dist-esm/storage-file-share/src/StorageClient.js.map +1 -1
  45. package/dist-esm/storage-file-share/src/StorageRetryPolicyFactory.js +26 -0
  46. package/dist-esm/storage-file-share/src/StorageRetryPolicyFactory.js.map +1 -0
  47. package/dist-esm/storage-file-share/src/generated/src/models/index.js +2 -0
  48. package/dist-esm/storage-file-share/src/generated/src/models/index.js.map +1 -1
  49. package/dist-esm/storage-file-share/src/generated/src/models/mappers.js +8 -0
  50. package/dist-esm/storage-file-share/src/generated/src/models/mappers.js.map +1 -1
  51. package/dist-esm/storage-file-share/src/generated/src/models/parameters.js +11 -1
  52. package/dist-esm/storage-file-share/src/generated/src/models/parameters.js.map +1 -1
  53. package/dist-esm/storage-file-share/src/generated/src/operations/file.js +3 -1
  54. package/dist-esm/storage-file-share/src/generated/src/operations/file.js.map +1 -1
  55. package/dist-esm/storage-file-share/src/generated/src/storageClient.js +1 -1
  56. package/dist-esm/storage-file-share/src/generated/src/storageClient.js.map +1 -1
  57. package/dist-esm/storage-file-share/src/generatedModels.js.map +1 -1
  58. package/dist-esm/storage-file-share/src/index.browser.js +2 -2
  59. package/dist-esm/storage-file-share/src/index.browser.js.map +1 -1
  60. package/dist-esm/storage-file-share/src/index.js +3 -2
  61. package/dist-esm/storage-file-share/src/index.js.map +1 -1
  62. package/dist-esm/storage-file-share/src/models.js +16 -0
  63. package/dist-esm/storage-file-share/src/models.js.map +1 -1
  64. package/dist-esm/storage-file-share/src/policies/StorageRetryPolicy.js +204 -0
  65. package/dist-esm/storage-file-share/src/policies/StorageRetryPolicy.js.map +1 -0
  66. package/dist-esm/storage-file-share/src/policies/StorageRetryPolicyV2.js +160 -0
  67. package/dist-esm/storage-file-share/src/policies/StorageRetryPolicyV2.js.map +1 -0
  68. package/dist-esm/storage-file-share/src/utils/constants.js +5 -1
  69. package/dist-esm/storage-file-share/src/utils/constants.js.map +1 -1
  70. package/package.json +2 -2
  71. package/types/latest/storage-file-share.d.ts +42 -17
  72. package/dist-esm/storage-blob/src/BatchUtils.browser.js +0 -11
  73. package/dist-esm/storage-blob/src/BatchUtils.browser.js.map +0 -1
  74. package/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js +0 -7
  75. package/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js.map +0 -1
  76. package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js +0 -362
  77. package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +0 -1
  78. package/dist-esm/storage-blob/src/index.browser.js +0 -23
  79. package/dist-esm/storage-blob/src/index.browser.js.map +0 -1
  80. package/dist-esm/storage-blob/src/utils/utils.browser.js +0 -48
  81. package/dist-esm/storage-blob/src/utils/utils.browser.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorageRetryPolicyV2.js","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nB,MAAM,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC,OAAO,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;wBAClF,KAAK,GAAG,CAAC,CAAC;oBACZ,CAAC;yBAAM,CAAC;wBACN,MAAM,CAAC,KAAK,CAAC,uCAAuC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;wBAC1E,MAAM,CAAC,CAAC;oBACV,CAAC;gBACH,CAAC;gBACD,UAAU,GAAG,WAAW,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;gBACvE,IAAI,UAAU,EAAE,CAAC;oBACf,MAAM,KAAK,CACT,cAAc,CAAC,cAAc,EAAE,OAAO,CAAC,EACvC,OAAO,CAAC,WAAW,EACnB,iBAAiB,CAClB,CAAC;gBACJ,CAAC;gBACD,OAAO,EAAE,CAAC;YACZ,CAAC;YACD,IAAI,QAAQ,EAAE,CAAC;gBACb,OAAO,QAAQ,CAAC;YAClB,CAAC;YACD,MAAM,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,SAAS,CAAC,yCAAyC,CAAC,CAAC;QAC1E,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortError } from \"@azure/abort-controller\";\nimport {\n PipelinePolicy,\n PipelineRequest,\n SendRequest,\n PipelineResponse,\n isRestError,\n RestError,\n} from \"@azure/core-rest-pipeline\";\nimport { getErrorMessage } from \"@azure/core-util\";\nimport { StorageRetryOptions } from \"../StorageRetryPolicyFactory\";\nimport { URLConstants } from \"../utils/constants\";\nimport { delay, setURLParameter } from \"../utils/utils.common\";\nimport { logger } from \"../log\";\n\n/**\n * Name of the {@link storageRetryPolicy}\n */\nexport const storageRetryPolicyName = \"storageRetryPolicy\";\n\n/**\n * RetryPolicy types.\n */\nexport enum StorageRetryPolicyType {\n /**\n * Exponential retry. Retry time delay grows exponentially.\n */\n EXPONENTIAL,\n /**\n * Linear retry. Retry time delay grows linearly.\n */\n FIXED,\n}\n\n// Default values of StorageRetryOptions\nconst DEFAULT_RETRY_OPTIONS = {\n maxRetryDelayInMs: 120 * 1000,\n maxTries: 4,\n retryDelayInMs: 4 * 1000,\n retryPolicyType: StorageRetryPolicyType.EXPONENTIAL,\n secondaryHost: \"\",\n tryTimeoutInMs: undefined, // Use server side default timeout strategy\n} as const;\n\nconst retriableErrors = [\n \"ETIMEDOUT\",\n \"ESOCKETTIMEDOUT\",\n \"ECONNREFUSED\",\n \"ECONNRESET\",\n \"ENOENT\",\n \"ENOTFOUND\",\n \"TIMEOUT\",\n \"EPIPE\",\n \"REQUEST_SEND_ERROR\",\n] as const;\n\nconst RETRY_ABORT_ERROR = new AbortError(\"The operation was aborted.\");\n\n/**\n * Retry policy with exponential retry and linear retry implemented.\n */\nexport function storageRetryPolicy(options: StorageRetryOptions = {}): PipelinePolicy {\n const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType;\n const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries;\n const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs;\n const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs;\n const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs;\n\n function shouldRetry({\n isPrimaryRetry,\n attempt,\n response,\n error,\n }: {\n isPrimaryRetry: boolean;\n attempt: number;\n response?: PipelineResponse;\n error?: RestError;\n }): boolean {\n if (attempt >= maxTries) {\n logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`);\n return false;\n }\n if (error) {\n for (const retriableError of retriableErrors) {\n if (\n error.name.toUpperCase().includes(retriableError) ||\n error.message.toUpperCase().includes(retriableError) ||\n (error.code && error.code.toString().toUpperCase() === retriableError)\n ) {\n logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`);\n return true;\n }\n }\n if (\n error?.code === \"PARSE_ERROR\" &&\n error?.message.startsWith(`Error \"Error: Unclosed root tag`)\n ) {\n logger.info(\n \"RetryPolicy: Incomplete XML response likely due to service timeout, will retry.\",\n );\n return true;\n }\n }\n // If attempt was against the secondary & it returned a StatusNotFound (404), then\n // the resource was not found. This may be due to replication delay. So, in this\n // case, we'll never try the secondary again for this operation.\n if (response || error) {\n const statusCode = response?.status ?? error?.statusCode ?? 0;\n if (!isPrimaryRetry && statusCode === 404) {\n logger.info(`RetryPolicy: Secondary access with 404, will retry.`);\n return true;\n }\n\n // Server internal error or server timeout\n if (statusCode === 503 || statusCode === 500) {\n logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`);\n return true;\n }\n }\n\n return false;\n }\n function calculateDelay(isPrimaryRetry: boolean, attempt: number): number {\n let delayTimeInMs = 0;\n\n if (isPrimaryRetry) {\n switch (retryPolicyType) {\n case StorageRetryPolicyType.EXPONENTIAL:\n delayTimeInMs = Math.min(\n (Math.pow(2, attempt - 1) - 1) * retryDelayInMs,\n maxRetryDelayInMs,\n );\n break;\n case StorageRetryPolicyType.FIXED:\n delayTimeInMs = retryDelayInMs;\n break;\n }\n } else {\n delayTimeInMs = Math.random() * 1000;\n }\n\n logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`);\n return delayTimeInMs;\n }\n return {\n name: storageRetryPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n // Set the server-side timeout query parameter \"timeout=[seconds]\"\n if (tryTimeoutInMs) {\n request.url = setURLParameter(\n request.url,\n URLConstants.Parameters.TIMEOUT,\n String(Math.floor(tryTimeoutInMs / 1000)),\n );\n }\n const primaryUrl = request.url;\n let secondaryHas404 = false;\n let attempt = 1;\n let retryAgain = true;\n let response: PipelineResponse | undefined;\n let error: RestError | undefined;\n while (retryAgain) {\n const isPrimaryRetry: boolean = true;\n request.url = primaryUrl;\n response = undefined;\n error = undefined;\n try {\n logger.info(\n `RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? \"Primary\" : \"Secondary\"}`,\n );\n response = await next(request);\n secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404);\n } catch (e: unknown) {\n if (isRestError(e)) {\n logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`);\n error = e;\n } else {\n logger.error(`RetryPolicy: Caught error, message: ${getErrorMessage(e)}`);\n throw e;\n }\n }\n retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error });\n if (retryAgain) {\n await delay(\n calculateDelay(isPrimaryRetry, attempt),\n request.abortSignal,\n RETRY_ABORT_ERROR,\n );\n }\n attempt++;\n }\n if (response) {\n return response;\n }\n throw error ?? new RestError(\"RetryPolicy failed without known error.\");\n },\n };\n}\n"]}
@@ -1,12 +1,16 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  export const SDK_VERSION = "12.23.0-beta.2";
4
- export const SERVICE_VERSION = "2023-01-03";
4
+ export const SERVICE_VERSION = "2024-05-04";
5
5
  export const FILE_MAX_SIZE_BYTES = 4 * 1024 * 1024 * 1024 * 1024; // 4TB
6
6
  export const FILE_RANGE_MAX_SIZE_BYTES = 4 * 1024 * 1024; // 4MB
7
7
  export const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5;
8
8
  export const DEFAULT_HIGH_LEVEL_CONCURRENCY = 5;
9
9
  export const REQUEST_TIMEOUT = 100 * 1000; // In ms
10
+ /**
11
+ * The OAuth scope to use with Azure Storage.
12
+ */
13
+ export const StorageOAuthScopes = "https://storage.azure.com/.default";
10
14
  export const URLConstants = {
11
15
  Parameters: {
12
16
  FORCE_BROWSER_NO_CACHE: "_",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM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AAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,SAAS;CACV,CAAC;AAEF,iDAAiD;AACjD,wGAAwG;AACxG,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;CACR,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const SDK_VERSION: string = \"12.23.0-beta.2\";\nexport const SERVICE_VERSION: string = \"2023-01-03\";\n\nexport const FILE_MAX_SIZE_BYTES: number = 4 * 1024 * 1024 * 1024 * 1024; // 4TB\nexport const FILE_RANGE_MAX_SIZE_BYTES: number = 4 * 1024 * 1024; // 4MB\nexport const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS: number = 5;\nexport const DEFAULT_HIGH_LEVEL_CONCURRENCY: number = 5;\nexport const REQUEST_TIMEOUT: number = 100 * 1000; // In ms\n\nexport const URLConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SHARE_SNAPSHOT: \"sharesnapshot\",\n SIGNATURE: \"sig\",\n TIMEOUT: \"timeout\",\n },\n};\n\nexport const HttpUrlConnection = {\n HTTP_CONFLICT: 409,\n HTTP_NOT_FOUND: 404,\n HTTP_PRECON_FAILED: 412,\n HTTP_RANGE_NOT_SATISFIABLE: 416,\n};\n\nexport const HeaderConstants = {\n AUTHORIZATION: \"authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n CONTENT_ENCODING: \"content-encoding\",\n CONTENT_LANGUAGE: \"content-language\",\n CONTENT_LENGTH: \"content-length\",\n CONTENT_MD5: \"content-md5\",\n CONTENT_TYPE: \"content-type\",\n COOKIE: \"Cookie\",\n DATE: \"date\",\n IF_MATCH: \"if-match\",\n IF_MODIFIED_SINCE: \"if-modified-since\",\n IF_NONE_MATCH: \"if-none-match\",\n IF_UNMODIFIED_SINCE: \"if-unmodified-since\",\n PREFIX_FOR_STORAGE: \"x-ms-\",\n RANGE: \"Range\",\n USER_AGENT: \"User-Agent\",\n X_MS_CLIENT_REQUEST_ID: \"x-ms-client-request-id\",\n X_MS_COPY_SOURCE: \"x-ms-copy-source\",\n X_MS_DATE: \"x-ms-date\",\n};\n\nexport const ETagNone = \"\";\nexport const ETagAny = \"*\";\nexport const FileAttributesPreserve = \"Preserve\";\nexport const FileAttributesNone = \"None\";\n\nexport const StorageFileLoggingAllowedHeaderNames = [\n \"Access-Control-Allow-Origin\",\n \"Cache-Control\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"Request-Id\",\n \"traceparent\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"x-ms-client-request-id\",\n \"x-ms-date\",\n \"x-ms-error-code\",\n \"x-ms-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-version\",\n \"Accept-Ranges\",\n \"Content-Disposition\",\n \"Content-Encoding\",\n \"Content-Language\",\n \"Content-MD5\",\n \"Content-Range\",\n \"ETag\",\n \"Last-Modified\",\n \"Server\",\n \"Vary\",\n \"x-ms-content-crc64\",\n \"x-ms-copy-action\",\n \"x-ms-copy-completion-time\",\n \"x-ms-copy-id\",\n \"x-ms-copy-progress\",\n \"x-ms-copy-status\",\n \"x-ms-has-immutability-policy\",\n \"x-ms-has-legal-hold\",\n \"x-ms-lease-state\",\n \"x-ms-lease-status\",\n \"x-ms-range\",\n \"x-ms-request-server-encrypted\",\n \"x-ms-server-encrypted\",\n \"x-ms-snapshot\",\n \"x-ms-source-range\",\n \"x-ms-cache-control\",\n \"x-ms-content-disposition\",\n \"x-ms-content-encoding\",\n \"x-ms-content-language\",\n \"x-ms-content-length\",\n \"x-ms-content-md5\",\n \"x-ms-content-type\",\n \"x-ms-file-attributes\",\n \"x-ms-file-change-time\",\n \"x-ms-file-creation-time\",\n \"x-ms-file-id\",\n \"x-ms-file-last-write-time\",\n \"x-ms-file-parent-id\",\n \"x-ms-handle-id\",\n \"x-ms-number-of-handles-closed\",\n \"x-ms-recursive\",\n \"x-ms-share-quota\",\n \"x-ms-type\",\n \"x-ms-write\",\n];\n\nexport const StorageFileLoggingAllowedQueryParameters = [\n \"comp\",\n \"maxresults\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"se\",\n \"si\",\n \"sip\",\n \"sp\",\n \"spr\",\n \"sr\",\n \"srt\",\n \"ss\",\n \"st\",\n \"sv\",\n \"copyid\",\n \"restype\",\n];\n\n/// List of ports used for path style addressing.\n/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.\nexport const PathStylePorts = [\n \"10000\",\n \"10001\",\n \"10002\",\n \"10003\",\n \"10004\",\n \"10100\",\n \"10101\",\n \"10102\",\n \"10103\",\n \"10104\",\n \"11000\",\n \"11001\",\n \"11002\",\n \"11003\",\n \"11004\",\n \"11100\",\n \"11101\",\n \"11102\",\n \"11103\",\n \"11104\",\n];\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,gBAAgB,CAAC;AACpD,MAAM,CAAC,MAAM,eAAe,GAAW,YAAY,CAAC;AAEpD,MAAM,CAAC,MAAM,mBAAmB,GAAW,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM;AAChF,MAAM,CAAC,MAAM,yBAAyB,GAAW,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM;AAC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,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;CACR,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const SDK_VERSION: string = \"12.23.0-beta.2\";\nexport const SERVICE_VERSION: string = \"2024-05-04\";\n\nexport const FILE_MAX_SIZE_BYTES: number = 4 * 1024 * 1024 * 1024 * 1024; // 4TB\nexport const FILE_RANGE_MAX_SIZE_BYTES: number = 4 * 1024 * 1024; // 4MB\nexport const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS: number = 5;\nexport const DEFAULT_HIGH_LEVEL_CONCURRENCY: number = 5;\nexport const REQUEST_TIMEOUT: number = 100 * 1000; // In ms\n/**\n * The OAuth scope to use with Azure Storage.\n */\nexport const StorageOAuthScopes: string | string[] = \"https://storage.azure.com/.default\";\n\nexport const URLConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SHARE_SNAPSHOT: \"sharesnapshot\",\n SIGNATURE: \"sig\",\n TIMEOUT: \"timeout\",\n },\n};\n\nexport const HttpUrlConnection = {\n HTTP_CONFLICT: 409,\n HTTP_NOT_FOUND: 404,\n HTTP_PRECON_FAILED: 412,\n HTTP_RANGE_NOT_SATISFIABLE: 416,\n};\n\nexport const HeaderConstants = {\n AUTHORIZATION: \"authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n CONTENT_ENCODING: \"content-encoding\",\n CONTENT_LANGUAGE: \"content-language\",\n CONTENT_LENGTH: \"content-length\",\n CONTENT_MD5: \"content-md5\",\n CONTENT_TYPE: \"content-type\",\n COOKIE: \"Cookie\",\n DATE: \"date\",\n IF_MATCH: \"if-match\",\n IF_MODIFIED_SINCE: \"if-modified-since\",\n IF_NONE_MATCH: \"if-none-match\",\n IF_UNMODIFIED_SINCE: \"if-unmodified-since\",\n PREFIX_FOR_STORAGE: \"x-ms-\",\n RANGE: \"Range\",\n USER_AGENT: \"User-Agent\",\n X_MS_CLIENT_REQUEST_ID: \"x-ms-client-request-id\",\n X_MS_COPY_SOURCE: \"x-ms-copy-source\",\n X_MS_DATE: \"x-ms-date\",\n};\n\nexport const ETagNone = \"\";\nexport const ETagAny = \"*\";\nexport const FileAttributesPreserve = \"Preserve\";\nexport const FileAttributesNone = \"None\";\n\nexport const StorageFileLoggingAllowedHeaderNames = [\n \"Access-Control-Allow-Origin\",\n \"Cache-Control\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"Request-Id\",\n \"traceparent\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"x-ms-client-request-id\",\n \"x-ms-date\",\n \"x-ms-error-code\",\n \"x-ms-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-version\",\n \"Accept-Ranges\",\n \"Content-Disposition\",\n \"Content-Encoding\",\n \"Content-Language\",\n \"Content-MD5\",\n \"Content-Range\",\n \"ETag\",\n \"Last-Modified\",\n \"Server\",\n \"Vary\",\n \"x-ms-content-crc64\",\n \"x-ms-copy-action\",\n \"x-ms-copy-completion-time\",\n \"x-ms-copy-id\",\n \"x-ms-copy-progress\",\n \"x-ms-copy-status\",\n \"x-ms-has-immutability-policy\",\n \"x-ms-has-legal-hold\",\n \"x-ms-lease-state\",\n \"x-ms-lease-status\",\n \"x-ms-range\",\n \"x-ms-request-server-encrypted\",\n \"x-ms-server-encrypted\",\n \"x-ms-snapshot\",\n \"x-ms-source-range\",\n \"x-ms-cache-control\",\n \"x-ms-content-disposition\",\n \"x-ms-content-encoding\",\n \"x-ms-content-language\",\n \"x-ms-content-length\",\n \"x-ms-content-md5\",\n \"x-ms-content-type\",\n \"x-ms-file-attributes\",\n \"x-ms-file-change-time\",\n \"x-ms-file-creation-time\",\n \"x-ms-file-id\",\n \"x-ms-file-last-write-time\",\n \"x-ms-file-parent-id\",\n \"x-ms-handle-id\",\n \"x-ms-number-of-handles-closed\",\n \"x-ms-recursive\",\n \"x-ms-share-quota\",\n \"x-ms-type\",\n \"x-ms-write\",\n];\n\nexport const StorageFileLoggingAllowedQueryParameters = [\n \"comp\",\n \"maxresults\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"se\",\n \"si\",\n \"sip\",\n \"sp\",\n \"spr\",\n \"sr\",\n \"srt\",\n \"ss\",\n \"st\",\n \"sv\",\n \"copyid\",\n \"restype\",\n];\n\n/// List of ports used for path style addressing.\n/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.\nexport const PathStylePorts = [\n \"10000\",\n \"10001\",\n \"10002\",\n \"10003\",\n \"10004\",\n \"10100\",\n \"10101\",\n \"10102\",\n \"10103\",\n \"10104\",\n \"11000\",\n \"11001\",\n \"11002\",\n \"11003\",\n \"11004\",\n \"11100\",\n \"11101\",\n \"11102\",\n \"11103\",\n \"11104\",\n];\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@azure/storage-file-share",
3
3
  "sdk-type": "client",
4
- "version": "12.23.0-alpha.20240527.1",
4
+ "version": "12.23.0-alpha.20240529.1",
5
5
  "description": "Microsoft Azure Storage SDK for JavaScript - File",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist-esm/storage-file-share/src/index.js",
@@ -132,7 +132,7 @@
132
132
  "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
133
133
  "@azure/eslint-plugin-azure-sdk": "^3.0.0",
134
134
  "@azure/identity": "^4.0.1",
135
- "@azure-tools/test-utils": ">=1.0.1-alpha <1.0.1-alphb",
135
+ "@azure-tools/test-utils": "^1.0.1",
136
136
  "@azure-tools/test-credential": "^1.0.0",
137
137
  "@azure-tools/test-recorder": "^3.0.0",
138
138
  "@azure-tools/test-perf": "^1.0.0",
@@ -2201,6 +2201,8 @@ declare interface FileGetRangeListOptionalParams extends coreClient.OperationOpt
2201
2201
  range?: string;
2202
2202
  /** The previous snapshot parameter is an opaque DateTime value that, when present, specifies the previous snapshot. */
2203
2203
  prevsharesnapshot?: string;
2204
+ /** This header is allowed only when PrevShareSnapshot query parameter is set. Determines whether the changed ranges for a file that has been renamed or moved between the target snapshot (or the live file) and the previous snapshot should be listed. If the value is true, the valid changed ranges for the file will be returned. If the value is false, the operation will result in a failure with 409 (Conflict) response. The default value is false. */
2205
+ supportRename?: boolean;
2204
2206
  }
2205
2207
 
2206
2208
  /**
@@ -2225,6 +2227,13 @@ export declare interface FileGetRangeListOptions extends CommonOptions {
2225
2227
  * Lease access conditions.
2226
2228
  */
2227
2229
  leaseAccessConditions?: LeaseAccessConditions;
2230
+ /**
2231
+ * This header is allowed only when prevShareSnapshot parameter is set.
2232
+ * Determines whether the changed ranges for a file that has been renamed or moved between the target snapshot (or the live file) and the previous snapshot should be listed.
2233
+ * If the value is true, the valid changed ranges for the file will be returned. If the value is false, the operation will result in a failure with 409 (Conflict) response.
2234
+ * The default value is false.
2235
+ */
2236
+ includeRenames?: boolean;
2228
2237
  }
2229
2238
 
2230
2239
  /**
@@ -3082,6 +3091,8 @@ export declare interface FileUploadRangeFromURLOptionalParams extends coreClient
3082
3091
  sourceModifiedAccessConditions?: SourceModifiedAccessConditions;
3083
3092
  /** The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a> */
3084
3093
  timeoutInSeconds?: number;
3094
+ /** Valid value is backup */
3095
+ fileRequestIntent?: ShareTokenIntent;
3085
3096
  /** If true, the trailing dot will not be trimmed from the target URI. */
3086
3097
  allowTrailingDot?: boolean;
3087
3098
  /** If true, the trailing dot will not be trimmed from the source URI. */
@@ -3279,6 +3290,11 @@ export declare function generateAccountSASQueryParameters(accountSASSignatureVal
3279
3290
  */
3280
3291
  export declare function generateFileSASQueryParameters(fileSASSignatureValues: FileSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): SASQueryParameters;
3281
3292
 
3293
+ /**
3294
+ * To get the OAuth audience for a storage account for file service.
3295
+ */
3296
+ export declare function getFileServiceAccountAudience(storageAccountName: string): string;
3297
+
3282
3298
  /** A listed Azure Storage handle item. */
3283
3299
  export declare interface HandleItem {
3284
3300
  /** XSMB service handle ID */
@@ -3293,6 +3309,8 @@ export declare interface HandleItem {
3293
3309
  sessionId: string;
3294
3310
  /** Client IP that opened the handle */
3295
3311
  clientIp: string;
3312
+ /** Name of the client machine where the share is being mounted */
3313
+ clientName: string;
3296
3314
  /** Time when the session that previously opened the handle has last been reconnected. (UTC) */
3297
3315
  openTime: Date;
3298
3316
  /** Time handle was last connected to (UTC) */
@@ -3313,6 +3331,8 @@ declare interface HandleItem_2 {
3313
3331
  sessionId: string;
3314
3332
  /** Client IP that opened the handle */
3315
3333
  clientIp: string;
3334
+ /** Name of the client machine where the share is being mounted */
3335
+ clientName: string;
3316
3336
  /** Time when the session that previously opened the handle has last been reconnected. (UTC) */
3317
3337
  openTime: Date;
3318
3338
  /** Time handle was last connected to (UTC) */
@@ -3546,7 +3566,7 @@ export declare interface Metrics {
3546
3566
  * @param pipelineOptions - Optional. Options.
3547
3567
  * @returns A new Pipeline object.
3548
3568
  */
3549
- export declare function newPipeline(credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, pipelineOptions?: StoragePipelineOptions): Pipeline;
3569
+ export declare function newPipeline(credential?: Credential_2 | TokenCredential, pipelineOptions?: StoragePipelineOptions): Pipeline;
3550
3570
 
3551
3571
  /** Defines values for PermissionCopyModeType. */
3552
3572
  export declare type PermissionCopyModeType = "source" | "override";
@@ -3618,6 +3638,10 @@ export declare interface PipelineOptions {
3618
3638
  * Optional. Configures the HTTP client to send requests and receive responses.
3619
3639
  */
3620
3640
  httpClient?: RequestPolicy;
3641
+ /**
3642
+ * Intent of using TokenCredential in file requests.
3643
+ */
3644
+ shareTokenIntent?: ShareTokenIntent;
3621
3645
  }
3622
3646
 
3623
3647
  /**
@@ -4328,8 +4352,7 @@ export declare class ShareClient extends StorageClient {
4328
4352
  * If not specified, AnonymousCredential is used.
4329
4353
  * @param options - Optional. Options to configure the HTTP pipeline.
4330
4354
  */
4331
- constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: ShareClientOptions);
4332
- constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential, options?: ShareClientOptions);
4355
+ constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
4333
4356
  /**
4334
4357
  * Creates an instance of ShareClient.
4335
4358
  *
@@ -4879,7 +4902,7 @@ export declare class ShareDirectoryClient extends StorageClient {
4879
4902
  * If not specified, AnonymousCredential is used.
4880
4903
  * @param options - Optional. Options to configure the HTTP pipeline.
4881
4904
  */
4882
- constructor(url: string, credential?: AnonymousCredential | StorageSharedKeyCredential | TokenCredential, options?: ShareClientOptions);
4905
+ constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
4883
4906
  /**
4884
4907
  * Creates an instance of DirectoryClient.
4885
4908
  *
@@ -5392,7 +5415,7 @@ export declare class ShareFileClient extends StorageClient {
5392
5415
  * If not specified, AnonymousCredential is used.
5393
5416
  * @param options - Optional. Options to configure the HTTP pipeline.
5394
5417
  */
5395
- constructor(url: string, credential?: AnonymousCredential | StorageSharedKeyCredential | TokenCredential, options?: ShareClientOptions);
5418
+ constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
5396
5419
  /**
5397
5420
  * Creates an instance of ShareFileClient.
5398
5421
  *
@@ -6497,7 +6520,7 @@ export declare class ShareServiceClient extends StorageClient {
6497
6520
  * If not specified, AnonymousCredential is used.
6498
6521
  * @param options - Optional. Options to configure the HTTP pipeline.
6499
6522
  */
6500
- constructor(url: string, credential?: AnonymousCredential | StorageSharedKeyCredential | TokenCredential, options?: ShareClientOptions);
6523
+ constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
6501
6524
  /**
6502
6525
  * Creates an instance of ShareServiceClient.
6503
6526
  *
@@ -6508,7 +6531,7 @@ export declare class ShareServiceClient extends StorageClient {
6508
6531
  * pipeline, or provide a customized pipeline.
6509
6532
  * @param options - Optional. Options to configure the HTTP pipeline.
6510
6533
  */
6511
- constructor(url: string, pipeline: Pipeline, options?: ShareClientOptions);
6534
+ constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);
6512
6535
  /**
6513
6536
  * Creates a ShareClient object.
6514
6537
  *
@@ -7051,6 +7074,16 @@ declare interface StorageClientOptionalParams extends coreHttpCompat.ExtendedSer
7051
7074
  endpoint?: string;
7052
7075
  }
7053
7076
 
7077
+ /**
7078
+ * Defines the known cloud audiences for Storage.
7079
+ */
7080
+ export declare enum StorageFileAudience {
7081
+ /**
7082
+ * The OAuth scope to use to retrieve an AAD token for Azure Storage.
7083
+ */
7084
+ StorageOAuthScopes = "https://storage.azure.com/.default"
7085
+ }
7086
+
7054
7087
  /**
7055
7088
  * The OAuth scope to use with Azure Storage.
7056
7089
  */
@@ -7082,8 +7115,9 @@ export declare interface StoragePipelineOptions {
7082
7115
  httpClient?: RequestPolicy;
7083
7116
  /**
7084
7117
  * The audience used to retrieve an AAD token.
7118
+ * By default, audience 'https://storage.azure.com/.default' will be used.
7085
7119
  */
7086
- audience?: string | string[];
7120
+ audience?: string;
7087
7121
  }
7088
7122
 
7089
7123
  /**
@@ -7119,15 +7153,6 @@ export declare interface StorageRetryOptions {
7119
7153
  * If you specify 0, then you must also specify 0 for retryDelayInMs.
7120
7154
  */
7121
7155
  readonly maxRetryDelayInMs?: number;
7122
- /**
7123
- * If a secondaryHost is specified, retries will be tried against this host. If secondaryHost is undefined
7124
- * (the default) then operations are not retried against another host.
7125
- *
7126
- * NOTE: Before setting this field, make sure you understand the issues around
7127
- * reading stale and potentially-inconsistent data at
7128
- * {@link https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs}
7129
- */
7130
- readonly secondaryHost?: string;
7131
7156
  }
7132
7157
 
7133
7158
  /**
@@ -1,11 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { blobToString } from "./utils/utils.browser";
4
- export async function getBodyAsText(batchResponse) {
5
- const blob = (await batchResponse.blobBody);
6
- return blobToString(blob);
7
- }
8
- export function utf8ByteLength(str) {
9
- return new Blob([str]).size;
10
- }
11
- //# sourceMappingURL=BatchUtils.browser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BatchUtils.browser.js","sourceRoot":"","sources":["../../../../storage-blob/src/BatchUtils.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,aAA8C;IAE9C,MAAM,IAAI,GAAG,CAAC,MAAM,aAAa,CAAC,QAAQ,CAAS,CAAC;IACpD,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ServiceSubmitBatchResponseModel } from \"./generatedModels\";\nimport { blobToString } from \"./utils/utils.browser\";\n\nexport async function getBodyAsText(\n batchResponse: ServiceSubmitBatchResponseModel,\n): Promise<string> {\n const blob = (await batchResponse.blobBody) as Blob;\n return blobToString(blob);\n}\n\nexport function utf8ByteLength(str: string): number {\n return new Blob([str]).size;\n}\n"]}
@@ -1,7 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- // This file is used as a shim of "BlobDownloadResponse" for some browser bundlers
4
- // when trying to bundle "BlobDownloadResponse"
5
- // "BlobDownloadResponse" class is only available in Node.js runtime
6
- export const BlobDownloadResponse = 1;
7
- //# sourceMappingURL=BlobDownloadResponse.browser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlobDownloadResponse.browser.js","sourceRoot":"","sources":["../../../../storage-blob/src/BlobDownloadResponse.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,kFAAkF;AAClF,+CAA+C;AAC/C,oEAAoE;AACpE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// This file is used as a shim of \"BlobDownloadResponse\" for some browser bundlers\n// when trying to bundle \"BlobDownloadResponse\"\n// \"BlobDownloadResponse\" class is only available in Node.js runtime\nexport const BlobDownloadResponse = 1;\n"]}
@@ -1,362 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- /**
4
- * ONLY AVAILABLE IN BROWSER RUNTIME.
5
- *
6
- * BlobQueryResponse implements BlobDownloadResponseModel interface, and in browser runtime it will
7
- * parse avor data returned by blob query.
8
- */
9
- export class BlobQueryResponse {
10
- /**
11
- * Indicates that the service supports
12
- * requests for partial file content.
13
- *
14
- * @readonly
15
- */
16
- get acceptRanges() {
17
- return this.originalResponse.acceptRanges;
18
- }
19
- /**
20
- * Returns if it was previously specified
21
- * for the file.
22
- *
23
- * @readonly
24
- */
25
- get cacheControl() {
26
- return this.originalResponse.cacheControl;
27
- }
28
- /**
29
- * Returns the value that was specified
30
- * for the 'x-ms-content-disposition' header and specifies how to process the
31
- * response.
32
- *
33
- * @readonly
34
- */
35
- get contentDisposition() {
36
- return this.originalResponse.contentDisposition;
37
- }
38
- /**
39
- * Returns the value that was specified
40
- * for the Content-Encoding request header.
41
- *
42
- * @readonly
43
- */
44
- get contentEncoding() {
45
- return this.originalResponse.contentEncoding;
46
- }
47
- /**
48
- * Returns the value that was specified
49
- * for the Content-Language request header.
50
- *
51
- * @readonly
52
- */
53
- get contentLanguage() {
54
- return this.originalResponse.contentLanguage;
55
- }
56
- /**
57
- * The current sequence number for a
58
- * page blob. This header is not returned for block blobs or append blobs.
59
- *
60
- * @readonly
61
- */
62
- get blobSequenceNumber() {
63
- return this.originalResponse.blobSequenceNumber;
64
- }
65
- /**
66
- * The blob's type. Possible values include:
67
- * 'BlockBlob', 'PageBlob', 'AppendBlob'.
68
- *
69
- * @readonly
70
- */
71
- get blobType() {
72
- return this.originalResponse.blobType;
73
- }
74
- /**
75
- * The number of bytes present in the
76
- * response body.
77
- *
78
- * @readonly
79
- */
80
- get contentLength() {
81
- return this.originalResponse.contentLength;
82
- }
83
- /**
84
- * If the file has an MD5 hash and the
85
- * request is to read the full file, this response header is returned so that
86
- * the client can check for message content integrity. If the request is to
87
- * read a specified range and the 'x-ms-range-get-content-md5' is set to
88
- * true, then the request returns an MD5 hash for the range, as long as the
89
- * range size is less than or equal to 4 MB. If neither of these sets of
90
- * conditions is true, then no value is returned for the 'Content-MD5'
91
- * header.
92
- *
93
- * @readonly
94
- */
95
- get contentMD5() {
96
- return this.originalResponse.contentMD5;
97
- }
98
- /**
99
- * Indicates the range of bytes returned if
100
- * the client requested a subset of the file by setting the Range request
101
- * header.
102
- *
103
- * @readonly
104
- */
105
- get contentRange() {
106
- return this.originalResponse.contentRange;
107
- }
108
- /**
109
- * The content type specified for the file.
110
- * The default content type is 'application/octet-stream'
111
- *
112
- * @readonly
113
- */
114
- get contentType() {
115
- return this.originalResponse.contentType;
116
- }
117
- /**
118
- * Conclusion time of the last attempted
119
- * Copy File operation where this file was the destination file. This value
120
- * can specify the time of a completed, aborted, or failed copy attempt.
121
- *
122
- * @readonly
123
- */
124
- get copyCompletedOn() {
125
- return undefined;
126
- }
127
- /**
128
- * String identifier for the last attempted Copy
129
- * File operation where this file was the destination file.
130
- *
131
- * @readonly
132
- */
133
- get copyId() {
134
- return this.originalResponse.copyId;
135
- }
136
- /**
137
- * Contains the number of bytes copied and
138
- * the total bytes in the source in the last attempted Copy File operation
139
- * where this file was the destination file. Can show between 0 and
140
- * Content-Length bytes copied.
141
- *
142
- * @readonly
143
- */
144
- get copyProgress() {
145
- return this.originalResponse.copyProgress;
146
- }
147
- /**
148
- * URL up to 2KB in length that specifies the
149
- * source file used in the last attempted Copy File operation where this file
150
- * was the destination file.
151
- *
152
- * @readonly
153
- */
154
- get copySource() {
155
- return this.originalResponse.copySource;
156
- }
157
- /**
158
- * State of the copy operation
159
- * identified by 'x-ms-copy-id'. Possible values include: 'pending',
160
- * 'success', 'aborted', 'failed'
161
- *
162
- * @readonly
163
- */
164
- get copyStatus() {
165
- return this.originalResponse.copyStatus;
166
- }
167
- /**
168
- * Only appears when
169
- * x-ms-copy-status is failed or pending. Describes cause of fatal or
170
- * non-fatal copy operation failure.
171
- *
172
- * @readonly
173
- */
174
- get copyStatusDescription() {
175
- return this.originalResponse.copyStatusDescription;
176
- }
177
- /**
178
- * When a blob is leased,
179
- * specifies whether the lease is of infinite or fixed duration. Possible
180
- * values include: 'infinite', 'fixed'.
181
- *
182
- * @readonly
183
- */
184
- get leaseDuration() {
185
- return this.originalResponse.leaseDuration;
186
- }
187
- /**
188
- * Lease state of the blob. Possible
189
- * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.
190
- *
191
- * @readonly
192
- */
193
- get leaseState() {
194
- return this.originalResponse.leaseState;
195
- }
196
- /**
197
- * The current lease status of the
198
- * blob. Possible values include: 'locked', 'unlocked'.
199
- *
200
- * @readonly
201
- */
202
- get leaseStatus() {
203
- return this.originalResponse.leaseStatus;
204
- }
205
- /**
206
- * A UTC date/time value generated by the service that
207
- * indicates the time at which the response was initiated.
208
- *
209
- * @readonly
210
- */
211
- get date() {
212
- return this.originalResponse.date;
213
- }
214
- /**
215
- * The number of committed blocks
216
- * present in the blob. This header is returned only for append blobs.
217
- *
218
- * @readonly
219
- */
220
- get blobCommittedBlockCount() {
221
- return this.originalResponse.blobCommittedBlockCount;
222
- }
223
- /**
224
- * The ETag contains a value that you can use to
225
- * perform operations conditionally, in quotes.
226
- *
227
- * @readonly
228
- */
229
- get etag() {
230
- return this.originalResponse.etag;
231
- }
232
- /**
233
- * The error code.
234
- *
235
- * @readonly
236
- */
237
- get errorCode() {
238
- return this.originalResponse.errorCode;
239
- }
240
- /**
241
- * The value of this header is set to
242
- * true if the file data and application metadata are completely encrypted
243
- * using the specified algorithm. Otherwise, the value is set to false (when
244
- * the file is unencrypted, or if only parts of the file/application metadata
245
- * are encrypted).
246
- *
247
- * @readonly
248
- */
249
- get isServerEncrypted() {
250
- return this.originalResponse.isServerEncrypted;
251
- }
252
- /**
253
- * If the blob has a MD5 hash, and if
254
- * request contains range header (Range or x-ms-range), this response header
255
- * is returned with the value of the whole blob's MD5 value. This value may
256
- * or may not be equal to the value returned in Content-MD5 header, with the
257
- * latter calculated from the requested range.
258
- *
259
- * @readonly
260
- */
261
- get blobContentMD5() {
262
- return this.originalResponse.blobContentMD5;
263
- }
264
- /**
265
- * Returns the date and time the file was last
266
- * modified. Any operation that modifies the file or its properties updates
267
- * the last modified time.
268
- *
269
- * @readonly
270
- */
271
- get lastModified() {
272
- return this.originalResponse.lastModified;
273
- }
274
- /**
275
- * A name-value pair
276
- * to associate with a file storage object.
277
- *
278
- * @readonly
279
- */
280
- get metadata() {
281
- return this.originalResponse.metadata;
282
- }
283
- /**
284
- * This header uniquely identifies the request
285
- * that was made and can be used for troubleshooting the request.
286
- *
287
- * @readonly
288
- */
289
- get requestId() {
290
- return this.originalResponse.requestId;
291
- }
292
- /**
293
- * If a client request id header is sent in the request, this header will be present in the
294
- * response with the same value.
295
- *
296
- * @readonly
297
- */
298
- get clientRequestId() {
299
- return this.originalResponse.clientRequestId;
300
- }
301
- /**
302
- * Indicates the version of the File service used
303
- * to execute the request.
304
- *
305
- * @readonly
306
- */
307
- get version() {
308
- return this.originalResponse.version;
309
- }
310
- /**
311
- * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned
312
- * when the blob was encrypted with a customer-provided key.
313
- *
314
- * @readonly
315
- */
316
- get encryptionKeySha256() {
317
- return this.originalResponse.encryptionKeySha256;
318
- }
319
- /**
320
- * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to
321
- * true, then the request returns a crc64 for the range, as long as the range size is less than
322
- * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is
323
- * specified in the same request, it will fail with 400(Bad Request)
324
- */
325
- get contentCrc64() {
326
- return this.originalResponse.contentCrc64;
327
- }
328
- /**
329
- * The response body as a browser Blob.
330
- * Always undefined in node.js.
331
- *
332
- * @readonly
333
- */
334
- get blobBody() {
335
- throw Error(`Quick query in browser is not supported yet.`);
336
- }
337
- /**
338
- * The response body as a node.js Readable stream.
339
- * Always undefined in the browser.
340
- *
341
- * @readonly
342
- */
343
- get readableStreamBody() {
344
- return undefined;
345
- }
346
- /**
347
- * The HTTP response.
348
- */
349
- get _response() {
350
- return this.originalResponse._response;
351
- }
352
- /**
353
- * Creates an instance of BlobQueryResponse.
354
- *
355
- * @param originalResponse -
356
- * @param options -
357
- */
358
- constructor(originalResponse, _options = {}) {
359
- this.originalResponse = originalResponse;
360
- }
361
- }
362
- //# sourceMappingURL=BlobQueryResponse.browser.js.map