@azure/storage-blob-changefeed 12.0.0-alpha.20220105.6 → 12.0.0-alpha.20220119.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +4 -3
  2. package/package.json +22 -14
  3. package/types/3.1/storage-blob-changefeed/samples-dev/blobChangeFeedClient.d.ts +2 -0
  4. package/types/3.1/storage-blob-changefeed/samples-dev/resumeListChanges.d.ts +2 -0
  5. package/types/3.1/storage-blob-changefeed/src/AvroReaderFactory.d.ts +9 -0
  6. package/types/3.1/storage-blob-changefeed/src/BlobChangeFeedClient.d.ts +172 -0
  7. package/types/3.1/storage-blob-changefeed/src/ChangeFeed.d.ts +37 -0
  8. package/types/3.1/storage-blob-changefeed/src/ChangeFeedFactory.d.ts +12 -0
  9. package/types/3.1/storage-blob-changefeed/src/Chunk.d.ts +28 -0
  10. package/types/3.1/storage-blob-changefeed/src/ChunkFactory.d.ts +22 -0
  11. package/types/3.1/storage-blob-changefeed/src/LazyLoadingBlobStream.d.ts +46 -0
  12. package/types/3.1/storage-blob-changefeed/src/LazyLoadingBlobStreamFactory.d.ts +6 -0
  13. package/types/3.1/storage-blob-changefeed/src/Segment.d.ts +29 -0
  14. package/types/3.1/storage-blob-changefeed/src/SegmentFactory.d.ts +29 -0
  15. package/types/3.1/storage-blob-changefeed/src/Shard.d.ts +28 -0
  16. package/types/3.1/storage-blob-changefeed/src/ShardFactory.d.ts +21 -0
  17. package/types/3.1/storage-blob-changefeed/src/index.d.ts +4 -0
  18. package/types/3.1/storage-blob-changefeed/src/log.d.ts +5 -0
  19. package/types/3.1/storage-blob-changefeed/src/models/BlobChangeFeedEvent.d.ts +94 -0
  20. package/types/3.1/storage-blob-changefeed/src/models/ChangeFeedCursor.d.ts +17 -0
  21. package/types/3.1/storage-blob-changefeed/src/models/models.d.ts +23 -0
  22. package/types/3.1/storage-blob-changefeed/src/utils/constants.d.ts +9 -0
  23. package/types/3.1/storage-blob-changefeed/src/utils/tracing.d.ts +11 -0
  24. package/types/3.1/storage-blob-changefeed/src/utils/utils.browser.d.ts +15 -0
  25. package/types/3.1/storage-blob-changefeed/src/utils/utils.common.d.ts +42 -0
  26. package/types/3.1/storage-blob-changefeed/src/utils/utils.node.d.ts +15 -0
  27. package/types/3.1/storage-blob-changefeed/test/blobchangefeedclient.spec.d.ts +2 -0
  28. package/types/3.1/storage-blob-changefeed/test/changefeed.spec.d.ts +2 -0
  29. package/types/3.1/storage-blob-changefeed/test/chunk.spec.d.ts +2 -0
  30. package/types/3.1/storage-blob-changefeed/test/segment.spec.d.ts +2 -0
  31. package/types/3.1/storage-blob-changefeed/test/shard.spec.d.ts +2 -0
  32. package/types/3.1/storage-blob-changefeed/test/utils/index.d.ts +13 -0
  33. package/types/3.1/storage-blob-changefeed/test/utils/testutils.common.d.ts +56 -0
  34. package/{typings → types}/3.1/storage-blob-changefeed.d.ts +0 -0
  35. package/types/3.1/storage-internal-avro/src/AvroConstants.d.ts +5 -0
  36. package/types/3.1/storage-internal-avro/src/AvroParser.d.ts +57 -0
  37. package/types/3.1/storage-internal-avro/src/AvroReadable.d.ts +16 -0
  38. package/types/3.1/storage-internal-avro/src/AvroReadableFromBlob.d.ts +9 -0
  39. package/types/3.1/storage-internal-avro/src/AvroReadableFromStream.d.ts +11 -0
  40. package/types/3.1/storage-internal-avro/src/AvroReader.d.ts +33 -0
  41. package/types/3.1/storage-internal-avro/src/index.browser.d.ts +4 -0
  42. package/types/3.1/storage-internal-avro/src/index.d.ts +4 -0
  43. package/types/3.1/storage-internal-avro/src/utils/utils.common.d.ts +6 -0
  44. package/types/3.1/storage-internal-avro/test/browser/avroreadable.spec.d.ts +2 -0
  45. package/types/3.1/storage-internal-avro/test/node/avroreadable.spec.d.ts +2 -0
  46. package/types/3.1/storage-internal-avro/test/node/avroreader.spec.d.ts +2 -0
  47. package/types/latest/storage-blob-changefeed/samples-dev/blobChangeFeedClient.d.ts +2 -0
  48. package/types/latest/storage-blob-changefeed/samples-dev/blobChangeFeedClient.d.ts.map +1 -0
  49. package/types/latest/storage-blob-changefeed/samples-dev/resumeListChanges.d.ts +2 -0
  50. package/types/latest/storage-blob-changefeed/samples-dev/resumeListChanges.d.ts.map +1 -0
  51. package/types/latest/storage-blob-changefeed/src/AvroReaderFactory.d.ts +9 -0
  52. package/types/latest/storage-blob-changefeed/src/AvroReaderFactory.d.ts.map +1 -0
  53. package/types/latest/storage-blob-changefeed/src/BlobChangeFeedClient.d.ts +172 -0
  54. package/types/latest/storage-blob-changefeed/src/BlobChangeFeedClient.d.ts.map +1 -0
  55. package/types/latest/storage-blob-changefeed/src/ChangeFeed.d.ts +37 -0
  56. package/types/latest/storage-blob-changefeed/src/ChangeFeed.d.ts.map +1 -0
  57. package/types/latest/storage-blob-changefeed/src/ChangeFeedFactory.d.ts +12 -0
  58. package/types/latest/storage-blob-changefeed/src/ChangeFeedFactory.d.ts.map +1 -0
  59. package/types/latest/storage-blob-changefeed/src/Chunk.d.ts +28 -0
  60. package/types/latest/storage-blob-changefeed/src/Chunk.d.ts.map +1 -0
  61. package/types/latest/storage-blob-changefeed/src/ChunkFactory.d.ts +22 -0
  62. package/types/latest/storage-blob-changefeed/src/ChunkFactory.d.ts.map +1 -0
  63. package/types/latest/storage-blob-changefeed/src/LazyLoadingBlobStream.d.ts +46 -0
  64. package/types/latest/storage-blob-changefeed/src/LazyLoadingBlobStream.d.ts.map +1 -0
  65. package/types/latest/storage-blob-changefeed/src/LazyLoadingBlobStreamFactory.d.ts +6 -0
  66. package/types/latest/storage-blob-changefeed/src/LazyLoadingBlobStreamFactory.d.ts.map +1 -0
  67. package/types/latest/storage-blob-changefeed/src/Segment.d.ts +29 -0
  68. package/types/latest/storage-blob-changefeed/src/Segment.d.ts.map +1 -0
  69. package/types/latest/storage-blob-changefeed/src/SegmentFactory.d.ts +29 -0
  70. package/types/latest/storage-blob-changefeed/src/SegmentFactory.d.ts.map +1 -0
  71. package/types/latest/storage-blob-changefeed/src/Shard.d.ts +28 -0
  72. package/types/latest/storage-blob-changefeed/src/Shard.d.ts.map +1 -0
  73. package/types/latest/storage-blob-changefeed/src/ShardFactory.d.ts +21 -0
  74. package/types/latest/storage-blob-changefeed/src/ShardFactory.d.ts.map +1 -0
  75. package/types/latest/storage-blob-changefeed/src/index.d.ts +4 -0
  76. package/types/latest/storage-blob-changefeed/src/index.d.ts.map +1 -0
  77. package/types/latest/storage-blob-changefeed/src/log.d.ts +5 -0
  78. package/types/latest/storage-blob-changefeed/src/log.d.ts.map +1 -0
  79. package/types/latest/storage-blob-changefeed/src/models/BlobChangeFeedEvent.d.ts +94 -0
  80. package/types/latest/storage-blob-changefeed/src/models/BlobChangeFeedEvent.d.ts.map +1 -0
  81. package/types/latest/storage-blob-changefeed/src/models/ChangeFeedCursor.d.ts +17 -0
  82. package/types/latest/storage-blob-changefeed/src/models/ChangeFeedCursor.d.ts.map +1 -0
  83. package/types/latest/storage-blob-changefeed/src/models/models.d.ts +23 -0
  84. package/types/latest/storage-blob-changefeed/src/models/models.d.ts.map +1 -0
  85. package/types/latest/storage-blob-changefeed/src/utils/constants.d.ts +9 -0
  86. package/types/latest/storage-blob-changefeed/src/utils/constants.d.ts.map +1 -0
  87. package/types/latest/storage-blob-changefeed/src/utils/tracing.d.ts +11 -0
  88. package/types/latest/storage-blob-changefeed/src/utils/tracing.d.ts.map +1 -0
  89. package/types/latest/storage-blob-changefeed/src/utils/utils.browser.d.ts +15 -0
  90. package/types/latest/storage-blob-changefeed/src/utils/utils.browser.d.ts.map +1 -0
  91. package/types/latest/storage-blob-changefeed/src/utils/utils.common.d.ts +42 -0
  92. package/types/latest/storage-blob-changefeed/src/utils/utils.common.d.ts.map +1 -0
  93. package/types/latest/storage-blob-changefeed/src/utils/utils.node.d.ts +15 -0
  94. package/types/latest/storage-blob-changefeed/src/utils/utils.node.d.ts.map +1 -0
  95. package/types/latest/storage-blob-changefeed/test/blobchangefeedclient.spec.d.ts +2 -0
  96. package/types/latest/storage-blob-changefeed/test/blobchangefeedclient.spec.d.ts.map +1 -0
  97. package/types/latest/storage-blob-changefeed/test/changefeed.spec.d.ts +2 -0
  98. package/types/latest/storage-blob-changefeed/test/changefeed.spec.d.ts.map +1 -0
  99. package/types/latest/storage-blob-changefeed/test/chunk.spec.d.ts +2 -0
  100. package/types/latest/storage-blob-changefeed/test/chunk.spec.d.ts.map +1 -0
  101. package/types/latest/storage-blob-changefeed/test/segment.spec.d.ts +2 -0
  102. package/types/latest/storage-blob-changefeed/test/segment.spec.d.ts.map +1 -0
  103. package/types/latest/storage-blob-changefeed/test/shard.spec.d.ts +2 -0
  104. package/types/latest/storage-blob-changefeed/test/shard.spec.d.ts.map +1 -0
  105. package/types/latest/storage-blob-changefeed/test/utils/index.d.ts +13 -0
  106. package/types/latest/storage-blob-changefeed/test/utils/index.d.ts.map +1 -0
  107. package/types/latest/storage-blob-changefeed/test/utils/testutils.common.d.ts +56 -0
  108. package/types/latest/storage-blob-changefeed/test/utils/testutils.common.d.ts.map +1 -0
  109. package/{typings → types}/latest/storage-blob-changefeed.d.ts +0 -0
  110. package/types/latest/storage-internal-avro/src/AvroConstants.d.ts +5 -0
  111. package/types/latest/storage-internal-avro/src/AvroConstants.d.ts.map +1 -0
  112. package/types/latest/storage-internal-avro/src/AvroParser.d.ts +57 -0
  113. package/types/latest/storage-internal-avro/src/AvroParser.d.ts.map +1 -0
  114. package/types/latest/storage-internal-avro/src/AvroReadable.d.ts +16 -0
  115. package/types/latest/storage-internal-avro/src/AvroReadable.d.ts.map +1 -0
  116. package/types/latest/storage-internal-avro/src/AvroReadableFromBlob.d.ts +9 -0
  117. package/types/latest/storage-internal-avro/src/AvroReadableFromBlob.d.ts.map +1 -0
  118. package/types/latest/storage-internal-avro/src/AvroReadableFromStream.d.ts +11 -0
  119. package/types/latest/storage-internal-avro/src/AvroReadableFromStream.d.ts.map +1 -0
  120. package/types/latest/storage-internal-avro/src/AvroReader.d.ts +33 -0
  121. package/types/latest/storage-internal-avro/src/AvroReader.d.ts.map +1 -0
  122. package/types/latest/storage-internal-avro/src/index.browser.d.ts +4 -0
  123. package/types/latest/storage-internal-avro/src/index.browser.d.ts.map +1 -0
  124. package/types/latest/storage-internal-avro/src/index.d.ts +4 -0
  125. package/types/latest/storage-internal-avro/src/index.d.ts.map +1 -0
  126. package/types/latest/storage-internal-avro/src/utils/utils.common.d.ts +6 -0
  127. package/types/latest/storage-internal-avro/src/utils/utils.common.d.ts.map +1 -0
  128. package/types/latest/storage-internal-avro/test/browser/avroreadable.spec.d.ts +2 -0
  129. package/types/latest/storage-internal-avro/test/browser/avroreadable.spec.d.ts.map +1 -0
  130. package/types/latest/storage-internal-avro/test/node/avroreadable.spec.d.ts +2 -0
  131. package/types/latest/storage-internal-avro/test/node/avroreadable.spec.d.ts.map +1 -0
  132. package/types/latest/storage-internal-avro/test/node/avroreader.spec.d.ts +2 -0
  133. package/types/latest/storage-internal-avro/test/node/avroreader.spec.d.ts.map +1 -0
  134. package/types/latest/tsdoc-metadata.json +11 -0
package/README.md CHANGED
@@ -12,6 +12,7 @@ Use the client libraries in this package to:
12
12
  - Resuming reading events from a saved position
13
13
 
14
14
  Key links:
15
+
15
16
  - [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed)
16
17
  - [Package (npm)](https://www.npmjs.com/package/@azure/storage-blob-changefeed/)
17
18
  - [API Reference Documentation](https://docs.microsoft.com/javascript/api/@azure/storage-blob-changefeed)
@@ -29,7 +30,7 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP
29
30
 
30
31
  ### Prerequisites
31
32
 
32
- - An [Azure subscription](https://azure.microsoft.com/free/)
33
+ - An [Azure subscription](https://azure.microsoft.com/free/)
33
34
  - A [Storage Account](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-portal)
34
35
 
35
36
  ### Install the package
@@ -166,8 +167,8 @@ setLogLevel("info");
166
167
 
167
168
  More code samples:
168
169
 
169
- - [Blob Storage Change Feed Samples (JavaScript)](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed/samples/javascript)
170
- - [Blob Storage Change Feed Samples (TypeScript)](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed/samples/typescript)
170
+ - [Blob Storage Change Feed Samples (JavaScript)](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed/samples/v12-beta/javascript)
171
+ - [Blob Storage Change Feed Samples (TypeScript)](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed/samples/v12-beta/typescript)
171
172
  - [Blob Storage Change Feed Test Cases](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed/test/)
172
173
 
173
174
  ## Contributing
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@azure/storage-blob-changefeed",
3
3
  "sdk-type": "client",
4
- "version": "12.0.0-alpha.20220105.6",
4
+ "version": "12.0.0-alpha.20220119.1",
5
5
  "description": "Microsoft Azure Storage SDK for JavaScript - Blob Change Feed",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist-esm/storage-blob-changefeed/src/index.js",
@@ -12,11 +12,11 @@
12
12
  "os": false,
13
13
  "process": false
14
14
  },
15
- "types": "./typings/latest/storage-blob-changefeed.d.ts",
15
+ "types": "./types/latest/storage-blob-changefeed.d.ts",
16
16
  "typesVersions": {
17
17
  "<3.6": {
18
18
  "*": [
19
- "./typings/3.1/storage-blob-changefeed.d.ts"
19
+ "./types/3.1/storage-blob-changefeed.d.ts"
20
20
  ]
21
21
  }
22
22
  },
@@ -26,17 +26,17 @@
26
26
  "scripts": {
27
27
  "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
28
28
  "build:es6": "tsc -p tsconfig.json",
29
- "build:samples": "cross-env ONLY_NODE=true npm run build && npm run build:prep-samples",
29
+ "build:samples": "echo Obsolete.",
30
30
  "build:prep-samples": "dev-tool samples prep && cd dist-samples && tsc",
31
31
  "build:test": "npm run build:es6 && rollup -c 2>&1",
32
- "build:types": "downlevel-dts typings/latest typings/3.1",
32
+ "build:types": "downlevel-dts types/latest types/3.1",
33
33
  "build": "npm run clean && npm run build:es6 && rollup -c 2>&1 && api-extractor run --local && npm run build:types",
34
- "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
35
- "clean": "rimraf dist dist-* typings temp statistics.html coverage coverage-browser .nyc_output *.tgz *.log test*.xml TEST*.xml",
36
- "clean:samples": "rimraf samples/javascript/node_modules samples/typescript/node_modules samples/typescript/dist samples/typescript/package-lock.json samples/javascript/package-lock.json",
34
+ "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
35
+ "clean": "rimraf dist dist-* types temp statistics.html coverage coverage-browser .nyc_output *.tgz *.log test*.xml TEST*.xml",
36
+ "clean:samples": "rimraf samples/v12-beta/javascript/node_modules samples/v12-beta/typescript/node_modules samples/v12-beta/typescript/dist samples/v12-beta/typescript/package-lock.json samples/v12-beta/javascript/package-lock.json",
37
37
  "extract-api": "tsc -p . && api-extractor run --local",
38
- "execute:samples": "npm run build:samples && dev-tool samples run dist-samples/javascript dist-samples/typescript/dist/storage-blob-changefeed/dist-samples/typescript/src/",
39
- "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
38
+ "execute:samples": "dev-tool samples run samples-dev",
39
+ "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
40
40
  "integration-test:browser": "karma start --single-run",
41
41
  "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 \"dist-esm/storage-blob-changefeed/test/*.spec.js\" \"dist-esm/storage-blob-changefeed/test/node/*.spec.js\"",
42
42
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
@@ -58,8 +58,8 @@
58
58
  "dist-browser/",
59
59
  "dist-esm/storage-blob-changefeed/src/",
60
60
  "dist-esm/storage-internal-avro/src/",
61
- "typings/latest/storage-blob-changefeed.d.ts",
62
- "typings/3.1/storage-blob-changefeed.d.ts",
61
+ "types/latest/storage-blob-changefeed.d.ts",
62
+ "types/3.1/storage-blob-changefeed.d.ts",
63
63
  "README.md",
64
64
  "LICENSE"
65
65
  ],
@@ -116,7 +116,7 @@
116
116
  "chai": "^4.2.0",
117
117
  "cross-env": "^7.0.2",
118
118
  "dotenv": "^8.2.0",
119
- "downlevel-dts": "~0.4.0",
119
+ "downlevel-dts": "^0.8.0",
120
120
  "es6-promise": "^4.2.5",
121
121
  "eslint": "^7.15.0",
122
122
  "esm": "^3.2.18",
@@ -154,6 +154,14 @@
154
154
  "sinon": "^9.0.2"
155
155
  },
156
156
  "//sampleConfiguration": {
157
- "skipFolder": true
157
+ "skipFolder": true,
158
+ "productName": "Azure Storage Blob Change Feed",
159
+ "productSlugs": [
160
+ "azure",
161
+ "azure-storage"
162
+ ],
163
+ "requiredResources": {
164
+ "Azure Storage Account": "https://docs.microsoft.com/azure/storage/common/storage-account-overview"
165
+ }
158
166
  }
159
167
  }
@@ -0,0 +1,2 @@
1
+ export declare function main(): Promise<void>;
2
+ //# sourceMappingURL=blobChangeFeedClient.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare function main(): Promise<void>;
2
+ //# sourceMappingURL=resumeListChanges.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { AvroReadable, AvroReader } from "../../storage-internal-avro/src";
2
+ /**
3
+ * Creates AvroReaders. Allows us to inject mock AvroReaders in the Chunk unit tests.
4
+ */
5
+ export declare class AvroReaderFactory {
6
+ create(headerAndDataStream: AvroReadable): AvroReader;
7
+ create(dataStream: AvroReadable, headerStream: AvroReadable, blockOffset: number, eventIndex: number): AvroReader;
8
+ }
9
+ //# sourceMappingURL=AvroReaderFactory.d.ts.map
@@ -0,0 +1,172 @@
1
+ import { StoragePipelineOptions, StorageSharedKeyCredential, AnonymousCredential, Pipeline } from "@azure/storage-blob";
2
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
3
+ import { BlobChangeFeedEvent } from "./models/BlobChangeFeedEvent";
4
+ import { BlobChangeFeedListChangesOptions } from "./models/models";
5
+ import { TokenCredential } from "@azure/core-http";
6
+ /**
7
+ * Contains paged response data for the {@link BlobChangeFeedClient.listChanges} operation.
8
+ */
9
+ export declare class BlobChangeFeedEventPage {
10
+ /**
11
+ * Array of {@link BlobChangeFeedEvent}.
12
+ */
13
+ events: BlobChangeFeedEvent[];
14
+ /**
15
+ * The token that keeps track of where to continue the iterator.
16
+ */
17
+ continuationToken: string;
18
+ constructor();
19
+ }
20
+ /**
21
+ * Creates a new Pipeline object with Credential provided.
22
+ *
23
+ * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
24
+ * @param pipelineOptions - Optional. Options.
25
+ * @returns A new Pipeline object.
26
+ */
27
+ export declare function newPipeline(credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, pipelineOptions?: StoragePipelineOptions): Pipeline;
28
+ /**
29
+ * BlobChangeFeedClient.
30
+ * @see https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-change-feed?tabs=azure-portal
31
+ */
32
+ export declare class BlobChangeFeedClient {
33
+ /**
34
+ * blobServiceClient provided by `@azure/storage-blob` package.
35
+ */
36
+ private blobServiceClient;
37
+ private changeFeedFactory;
38
+ /**
39
+ *
40
+ * Creates an instance of BlobChangeFeedClient from connection string.
41
+ *
42
+ * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.
43
+ * [ Note - Account connection string can only be used in NODE.JS runtime. ]
44
+ * Account connection string example -
45
+ * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
46
+ * SAS connection string example -
47
+ * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
48
+ * @param options - Optional. Options to configure the HTTP pipeline.
49
+ */
50
+ static fromConnectionString(connectionString: string, options?: StoragePipelineOptions): BlobChangeFeedClient;
51
+ /**
52
+ * Creates an instance of BlobChangeFeedClient.
53
+ *
54
+ * @param url - A Client string pointing to Azure Storage blob service, such as
55
+ * "https://myaccount.blob.core.windows.net". You can append a SAS
56
+ * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
57
+ * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
58
+ * @param options - Optional. Options to configure the HTTP pipeline.
59
+ *
60
+ * Example using DefaultAzureCredential from `@azure/identity`:
61
+ *
62
+ * ```js
63
+ * const account = "<storage account name>";
64
+ *
65
+ * const defaultAzureCredential = new DefaultAzureCredential();
66
+ *
67
+ * const blobChangeFeedClient = new BlobChangeFeedClient(
68
+ * `https://${account}.blob.core.windows.net`,
69
+ * defaultAzureCredential
70
+ * );
71
+ * ```
72
+ *
73
+ * Example using an account name/key:
74
+ *
75
+ * ```js
76
+ * const account = "<storage account name>"
77
+ * const sharedKeyCredential = new StorageSharedKeyCredential(account, "<account key>");
78
+ *
79
+ * const blobChangeFeedClient = new BlobChangeFeedClient(
80
+ * `https://${account}.blob.core.windows.net`,
81
+ * sharedKeyCredential
82
+ * );
83
+ * ```
84
+ */
85
+ constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions);
86
+ /**
87
+ * Creates an instance of BlobChangeFeedClient.
88
+ *
89
+ * @param url - A Client string pointing to Azure Storage blob service, such as
90
+ * "https://myaccount.blob.core.windows.net". You can append a SAS
91
+ * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
92
+ * @param pipeline - Call newPipeline() to create a default
93
+ * pipeline, or provide a customized pipeline.
94
+ */
95
+ constructor(url: string, pipeline: Pipeline);
96
+ private getChange;
97
+ private getPage;
98
+ /**
99
+ * Returns an async iterable iterator to list all the change feed events
100
+ * in the specified account.
101
+ *
102
+ * .byPage() returns an async iterable iterator to list the change feed events in pages.
103
+ *
104
+ * Example using `for await` syntax:
105
+ *
106
+ * ```js
107
+ * let i = 1;
108
+ * for await (const event of blobChangeFeedClient.listChanges()) {
109
+ * console.log(`Event ${i++}, type: ${event.eventType}`);
110
+ * }
111
+ * ```
112
+ *
113
+ * Example using `iter.next()`:
114
+ *
115
+ * ```js
116
+ * let i = 1;
117
+ * const iter = blobChangeFeedClient.listChanges();
118
+ * let eventItem = await iter.next();
119
+ * while (!eventItem.done) {
120
+ * console.log(`Event ${i++}, type: ${eventItem.eventType}`);
121
+ * eventItem = await iter.next();
122
+ * }
123
+ * ```
124
+ *
125
+ * Example using `byPage()`:
126
+ *
127
+ * ```js
128
+ * // passing optional maxPageSize in the page settings
129
+ * let i = 1;
130
+ * for await (const eventPage of blobChangeFeedClient.listChanges().byPage({ maxPageSize: 20 })) {
131
+ * if (eventPage.events) {
132
+ * for (const event of eventPage.events) {
133
+ * console.log(`Event ${i++}, type: ${event.eventType}`);
134
+ * }
135
+ * }
136
+ * }
137
+ * ```
138
+ *
139
+ * Example using paging with a marker:
140
+ *
141
+ * ```js
142
+ * let i = 1;
143
+ * let iterator = blobChangeFeedClient.listChanges().byPage({ maxPageSize: 2 });
144
+ * let eventPage = (await iterator.next()).value;
145
+ *
146
+ * if (eventPage.events) {
147
+ * for (const container of eventPage.events) {
148
+ * console.log(`Event ${i++}, type: ${event.eventType}`);
149
+ * }
150
+ * }
151
+ *
152
+ * // Gets next marker
153
+ * let marker = eventPage.continuationToken;
154
+ * // Passing next marker as continuationToken
155
+ * iterator = blobChangeFeedClient
156
+ * .listChanges()
157
+ * .byPage({ continuationToken: marker, maxPageSize: 10 });
158
+ * eventPage = (await iterator.next()).value;
159
+ *
160
+ * if (eventPage.events) {
161
+ * for (const container of eventPage.events) {
162
+ * console.log(`Event ${i++}, type: ${event.eventType}`);
163
+ * }
164
+ * }
165
+ * ```
166
+ *
167
+ * @param options - Options to list change feed events.
168
+ * @returns An asyncIterableIterator that supports paging.
169
+ */
170
+ listChanges(options?: BlobChangeFeedListChangesOptions): PagedAsyncIterableIterator<BlobChangeFeedEvent, BlobChangeFeedEventPage>;
171
+ }
172
+ //# sourceMappingURL=BlobChangeFeedClient.d.ts.map
@@ -0,0 +1,37 @@
1
+ import { ContainerClient, CommonOptions } from "@azure/storage-blob";
2
+ import { Segment } from "./Segment";
3
+ import { SegmentFactory } from "./SegmentFactory";
4
+ import { BlobChangeFeedEvent } from "./models/BlobChangeFeedEvent";
5
+ import { ChangeFeedCursor } from "./models/ChangeFeedCursor";
6
+ import { AbortSignalLike } from "@azure/core-http";
7
+ /**
8
+ * Options to configure {@link ChangeFeed.getChange} operation.
9
+ */
10
+ export interface ChangeFeedGetChangeOptions extends CommonOptions {
11
+ /**
12
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
13
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
14
+ */
15
+ abortSignal?: AbortSignalLike;
16
+ }
17
+ export declare class ChangeFeed {
18
+ /**
19
+ * BlobContainerClient for making List Blob requests and creating Segments.
20
+ */
21
+ private readonly containerClient?;
22
+ private readonly segmentFactory?;
23
+ private readonly years;
24
+ private segments;
25
+ private currentSegment?;
26
+ private lastConsumable?;
27
+ private startTime?;
28
+ private endTime?;
29
+ private end?;
30
+ constructor();
31
+ constructor(containerClient: ContainerClient, segmentFactory: SegmentFactory, years: number[], segments: string[], currentSegment: Segment, lastConsumable: Date, startTime?: Date, endTime?: Date);
32
+ private advanceSegmentIfNecessary;
33
+ hasNext(): boolean;
34
+ getChange(options?: ChangeFeedGetChangeOptions): Promise<BlobChangeFeedEvent | undefined>;
35
+ getCursor(): ChangeFeedCursor;
36
+ }
37
+ //# sourceMappingURL=ChangeFeed.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { BlobServiceClient } from "@azure/storage-blob";
2
+ import { ChangeFeed } from "./ChangeFeed";
3
+ import { SegmentFactory } from "./SegmentFactory";
4
+ import { BlobChangeFeedListChangesOptions } from "./models/models";
5
+ export declare class ChangeFeedFactory {
6
+ private readonly segmentFactory;
7
+ constructor();
8
+ constructor(segmentFactory: SegmentFactory);
9
+ private static validateCursor;
10
+ create(blobServiceClient: BlobServiceClient, continuationToken?: string, options?: BlobChangeFeedListChangesOptions): Promise<ChangeFeed>;
11
+ }
12
+ //# sourceMappingURL=ChangeFeedFactory.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { AvroReader } from "../../storage-internal-avro/src";
2
+ import { BlobChangeFeedEvent } from "./models/BlobChangeFeedEvent";
3
+ import { CommonOptions } from "@azure/storage-blob";
4
+ import { AbortSignalLike } from "@azure/core-http";
5
+ import { AvroParseOptions } from "../../storage-internal-avro/src/AvroReader";
6
+ /**
7
+ * Options to configure {@link Chunk.getChange} operation.
8
+ */
9
+ export interface ChunkGetChangeOptions extends CommonOptions {
10
+ /**
11
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
12
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
13
+ */
14
+ abortSignal?: AbortSignalLike;
15
+ }
16
+ export declare class Chunk {
17
+ readonly chunkPath: string;
18
+ private readonly avroReader;
19
+ private readonly iter;
20
+ private _blockOffset;
21
+ readonly blockOffset: number;
22
+ private _eventIndex;
23
+ readonly eventIndex: number;
24
+ constructor(avroReader: AvroReader, blockOffset: number, eventIndex: number, chunkPath: string, avroOptions?: AvroParseOptions);
25
+ hasNext(): boolean;
26
+ getChange(): Promise<BlobChangeFeedEvent | undefined>;
27
+ }
28
+ //# sourceMappingURL=Chunk.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { AvroReaderFactory } from "./AvroReaderFactory";
2
+ import { ContainerClient, CommonOptions } from "@azure/storage-blob";
3
+ import { Chunk } from "./Chunk";
4
+ import { AbortSignalLike } from "@azure/core-http";
5
+ import { LazyLoadingBlobStreamFactory } from "./LazyLoadingBlobStreamFactory";
6
+ /**
7
+ * Options to configure {@link ChunkFactory.create} operation.
8
+ */
9
+ export interface CreateChunkOptions extends CommonOptions {
10
+ /**
11
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
12
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
13
+ */
14
+ abortSignal?: AbortSignalLike;
15
+ }
16
+ export declare class ChunkFactory {
17
+ private readonly avroReaderFactory;
18
+ private readonly lazyLoadingBlobStreamFactory;
19
+ constructor(avroReaderFactory: AvroReaderFactory, lazyLoadingBlobStreamFactory: LazyLoadingBlobStreamFactory);
20
+ create(containerClient: ContainerClient, chunkPath: string, blockOffset?: number, eventIndex?: number, options?: CreateChunkOptions): Promise<Chunk>;
21
+ }
22
+ //# sourceMappingURL=ChunkFactory.d.ts.map
@@ -0,0 +1,46 @@
1
+ /// <reference types="node" />
2
+ import { Readable, ReadableOptions } from "stream";
3
+ import { BlobClient, CommonOptions } from "@azure/storage-blob";
4
+ import { AbortSignalLike } from "@azure/core-http";
5
+ /**
6
+ * Options to configure the LazyLoadingBlobStream.
7
+ */
8
+ export interface LazyLoadingBlobStreamOptions extends ReadableOptions, CommonOptions {
9
+ /**
10
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
11
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
12
+ */
13
+ abortSignal?: AbortSignalLike;
14
+ }
15
+ /**
16
+ * This class generates a readable stream from a blobClient's data.
17
+ */
18
+ export declare class LazyLoadingBlobStream extends Readable {
19
+ /**
20
+ * BlobClient to make download calls with.
21
+ */
22
+ private readonly blobClient;
23
+ /**
24
+ * The offset within the blob of the next block we will download.
25
+ */
26
+ private offset;
27
+ private readonly blockSize;
28
+ private lastDownloadBytes;
29
+ private lastDownloadData?;
30
+ private blobLength;
31
+ private options?;
32
+ /**
33
+ * Creates an instance of LazyLoadingBlobStream.
34
+ *
35
+ * @param byteLength - The total length of data contained in the buffers
36
+ */
37
+ constructor(blobClient: BlobClient, offset: number, blockSize: number, options?: LazyLoadingBlobStreamOptions);
38
+ private downloadBlock;
39
+ /**
40
+ * Internal _read() that will be called when the stream wants to pull more data in.
41
+ *
42
+ * @param size - Optional. The size of data to be read
43
+ */
44
+ _read(size?: number): Promise<void>;
45
+ }
46
+ //# sourceMappingURL=LazyLoadingBlobStream.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { BlobClient } from "@azure/storage-blob";
2
+ import { LazyLoadingBlobStreamOptions, LazyLoadingBlobStream } from "./LazyLoadingBlobStream";
3
+ export declare class LazyLoadingBlobStreamFactory {
4
+ create(blobClient: BlobClient, offset: number, blockSize: number, options?: LazyLoadingBlobStreamOptions): LazyLoadingBlobStream;
5
+ }
6
+ //# sourceMappingURL=LazyLoadingBlobStreamFactory.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { BlobChangeFeedEvent } from "./models/BlobChangeFeedEvent";
2
+ import { Shard } from "./Shard";
3
+ import { SegmentCursor } from "./models/ChangeFeedCursor";
4
+ import { CommonOptions } from "@azure/storage-blob";
5
+ import { AbortSignalLike } from "@azure/core-http";
6
+ /**
7
+ * Options to configure {@link Segment.getChange} operation.
8
+ */
9
+ export interface SegmentGetChangeOptions extends CommonOptions {
10
+ /**
11
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
12
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
13
+ */
14
+ abortSignal?: AbortSignalLike;
15
+ }
16
+ export declare class Segment {
17
+ private readonly manifestPath;
18
+ private readonly shards;
19
+ private shardDone;
20
+ private shardDoneCount;
21
+ private shardIndex;
22
+ private _dateTime;
23
+ readonly dateTime: Date;
24
+ constructor(shards: Shard[], shardIndex: number, dateTime: Date, manifestPath: string);
25
+ hasNext(): boolean;
26
+ getChange(options?: SegmentGetChangeOptions): Promise<BlobChangeFeedEvent | undefined>;
27
+ getCursor(): SegmentCursor;
28
+ }
29
+ //# sourceMappingURL=Segment.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { ShardFactory } from "./ShardFactory";
2
+ import { ContainerClient, CommonOptions } from "@azure/storage-blob";
3
+ import { Segment } from "./Segment";
4
+ import { SegmentCursor } from "./models/ChangeFeedCursor";
5
+ import { AbortSignalLike } from "@azure/core-http";
6
+ export interface SegmentManifest {
7
+ version?: number;
8
+ begin?: Date;
9
+ intervalSecs?: number;
10
+ status: string;
11
+ config?: any;
12
+ chunkFilePaths: string[];
13
+ }
14
+ /**
15
+ * Options to configure {@link SegmentFactory.create} operation.
16
+ */
17
+ export interface CreateSegmentOptions extends CommonOptions {
18
+ /**
19
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
20
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
21
+ */
22
+ abortSignal?: AbortSignalLike;
23
+ }
24
+ export declare class SegmentFactory {
25
+ private readonly shardFactory;
26
+ constructor(shardFactory: ShardFactory);
27
+ create(containerClient: ContainerClient, manifestPath: string, cursor?: SegmentCursor, options?: CreateSegmentOptions): Promise<Segment>;
28
+ }
29
+ //# sourceMappingURL=SegmentFactory.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { ContainerClient, CommonOptions } from "@azure/storage-blob";
2
+ import { ChunkFactory } from "./ChunkFactory";
3
+ import { Chunk } from "./Chunk";
4
+ import { BlobChangeFeedEvent } from "./models/BlobChangeFeedEvent";
5
+ import { ShardCursor } from "./models/ChangeFeedCursor";
6
+ import { AbortSignalLike } from "@azure/core-http";
7
+ /**
8
+ * Options to configure {@link Shard.getChange} operation.
9
+ */
10
+ export interface ShardGetChangeOptions extends CommonOptions {
11
+ /**
12
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
13
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
14
+ */
15
+ abortSignal?: AbortSignalLike;
16
+ }
17
+ export declare class Shard {
18
+ readonly shardPath: string;
19
+ private readonly containerClient;
20
+ private readonly chunkFactory;
21
+ private readonly chunks;
22
+ private currentChunk;
23
+ constructor(containerClient: ContainerClient, chunkFactory: ChunkFactory, chunks: string[], currentChunk: Chunk | undefined, shardPath: string);
24
+ hasNext(): boolean;
25
+ getChange(options?: ShardGetChangeOptions): Promise<BlobChangeFeedEvent | undefined>;
26
+ getCursor(): ShardCursor | undefined;
27
+ }
28
+ //# sourceMappingURL=Shard.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { ChunkFactory } from "./ChunkFactory";
2
+ import { ShardCursor } from "./models/ChangeFeedCursor";
3
+ import { Shard } from "./Shard";
4
+ import { ContainerClient, CommonOptions } from "@azure/storage-blob";
5
+ import { AbortSignalLike } from "@azure/core-http";
6
+ /**
7
+ * Options to configure {@link ShardFactory.create} operation.
8
+ */
9
+ export interface CreateShardOptions extends CommonOptions {
10
+ /**
11
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
12
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
13
+ */
14
+ abortSignal?: AbortSignalLike;
15
+ }
16
+ export declare class ShardFactory {
17
+ private readonly chunkFactory;
18
+ constructor(chunkFactory: ChunkFactory);
19
+ create(containerClient: ContainerClient, shardPath: string, shardCursor?: ShardCursor, options?: CreateShardOptions): Promise<Shard>;
20
+ }
21
+ //# sourceMappingURL=ShardFactory.d.ts.map
@@ -0,0 +1,4 @@
1
+ export * from "./BlobChangeFeedClient";
2
+ export * from "./models/BlobChangeFeedEvent";
3
+ export * from "./models/models";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The `@azure/logger` configuration for this package.
3
+ */
4
+ export declare const logger: import("@azure/logger").AzureLogger;
5
+ //# sourceMappingURL=log.d.ts.map