@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
@@ -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 @@
1
+ {"version":3,"file":"BlobChangeFeedClient.d.ts","sourceRoot":"","sources":["../../../../src/BlobChangeFeedClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,mBAAmB,EACnB,QAAQ,EACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,0BAA0B,EAAgB,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAInE,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,qBAAa,uBAAuB;IAClC;;OAEG;IACI,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAErC;;OAEG;IACI,iBAAiB,EAAE,MAAM,CAAC;;CAMlC;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,UAAU,CAAC,EAAE,0BAA0B,GAAG,mBAAmB,GAAG,eAAe,EAC/E,eAAe,GAAE,sBAA2B,GAC3C,QAAQ,CAEV;AAmBD;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B;;OAEG;IACH,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,iBAAiB,CAAoB;IAE7C;;;;;;;;;;;OAWG;WACW,oBAAoB,CAChC,gBAAgB,EAAE,MAAM,EAGxB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,oBAAoB;IASvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;gBAED,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,0BAA0B,GAAG,mBAAmB,GAAG,eAAe,EAG/E,OAAO,CAAC,EAAE,sBAAsB;IAGlC;;;;;;;;OAQG;gBACS,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;YAyB5B,SAAS;YAuBT,OAAO;IAoCtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuEG;IACI,WAAW,CAChB,OAAO,GAAE,gCAAqC,GAC7C,0BAA0B,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;CAuB5E"}
@@ -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 @@
1
+ {"version":3,"file":"ChangeFeed.d.ts","sourceRoot":"","sources":["../../../../src/ChangeFeed.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,aAAa;IAC/D;;;OAGG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,qBAAa,UAAU;IACrB;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAkB;IAEnD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAiB;IAEjD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAW;IAEjC,OAAO,CAAC,QAAQ,CAAW;IAE3B,OAAO,CAAC,cAAc,CAAC,CAAU;IAEjC,OAAO,CAAC,cAAc,CAAC,CAAO;IAE9B,OAAO,CAAC,SAAS,CAAC,CAAO;IAEzB,OAAO,CAAC,OAAO,CAAC,CAAO;IAEvB,OAAO,CAAC,GAAG,CAAC,CAAO;;gBAIjB,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,MAAM,EAAE,EACf,QAAQ,EAAE,MAAM,EAAE,EAClB,cAAc,EAAE,OAAO,EACvB,cAAc,EAAE,IAAI,EACpB,SAAS,CAAC,EAAE,IAAI,EAChB,OAAO,CAAC,EAAE,IAAI;YA0BF,yBAAyB;IA+DhC,OAAO,IAAI,OAAO;IAaZ,SAAS,CACpB,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IA0BpC,SAAS,IAAI,gBAAgB;CAYrC"}
@@ -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 @@
1
+ {"version":3,"file":"ChangeFeedFactory.d.ts","sourceRoot":"","sources":["../../../../src/ChangeFeedFactory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAmB,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAa1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKlD,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AAUnE,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;;gBAGpC,cAAc,EAAE,cAAc;IAa1C,OAAO,CAAC,MAAM,CAAC,cAAc;IAShB,MAAM,CACjB,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,CAAC,EAAE,MAAM,EAC1B,OAAO,GAAE,gCAAqC,GAC7C,OAAO,CAAC,UAAU,CAAC;CA2GvB"}
@@ -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
+ get blockOffset(): number;
22
+ private _eventIndex;
23
+ get 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 @@
1
+ {"version":3,"file":"Chunk.d.ts","sourceRoot":"","sources":["../../../../src/Chunk.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D;;;OAGG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,qBAAa,KAAK;aAkBE,SAAS,EAAE,MAAM;IAjBnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAoD;IAEzE,OAAO,CAAC,YAAY,CAAS;IAC7B,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED,OAAO,CAAC,WAAW,CAAS;IAC5B,IAAW,UAAU,IAAI,MAAM,CAE9B;gBAGC,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EACF,SAAS,EAAE,MAAM,EACjC,WAAW,GAAE,gBAAqB;IAS7B,OAAO,IAAI,OAAO;IAIZ,SAAS,IAAI,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;CA0BnE"}
@@ -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 @@
1
+ {"version":3,"file":"ChunkFactory.d.ts","sourceRoot":"","sources":["../../../../src/ChunkFactory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAG9E;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD;;;OAGG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;IACtD,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAA+B;gBAG1E,iBAAiB,EAAE,iBAAiB,EACpC,4BAA4B,EAAE,4BAA4B;IAM/C,MAAM,CACjB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,KAAK,CAAC;CAiClB"}
@@ -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 @@
1
+ {"version":3,"file":"LazyLoadingBlobStream.d.ts","sourceRoot":"","sources":["../../../../src/LazyLoadingBlobStream.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,eAAe,EAAE,aAAa;IAClF;;;OAGG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAUD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,QAAQ;IACjD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAExC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IAEnC,OAAO,CAAC,iBAAiB,CAAS;IAElC,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAElC,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,OAAO,CAAC,CAA+B;IAE/C;;;;OAIG;gBAED,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,4BAA4B;YAW1B,aAAa;IAmC3B;;;;OAIG;IACU,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA0CjD"}
@@ -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 @@
1
+ {"version":3,"file":"LazyLoadingBlobStreamFactory.d.ts","sourceRoot":"","sources":["../../../../src/LazyLoadingBlobStreamFactory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAE9F,qBAAa,4BAA4B;IAChC,MAAM,CACX,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,4BAA4B,GACrC,qBAAqB;CAGzB"}
@@ -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
+ get 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 @@
1
+ {"version":3,"file":"Segment.d.ts","sourceRoot":"","sources":["../../../../src/Segment.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,aAAa,EAAe,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D;;;OAGG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,qBAAa,OAAO;IAoBhB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAnB/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;IAGjC,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,cAAc,CAAS;IAE/B,OAAO,CAAC,UAAU,CAAS;IAI3B,OAAO,CAAC,SAAS,CAAO;IACxB,IAAW,QAAQ,IAAI,IAAI,CAE1B;gBAGC,MAAM,EAAE,KAAK,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,IAAI,EACG,YAAY,EAAE,MAAM;IAUhC,OAAO,IAAI,OAAO;IAIZ,SAAS,CACpB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAwCpC,SAAS,IAAI,aAAa;CAelC"}
@@ -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 @@
1
+ {"version":3,"file":"SegmentFactory.d.ts","sourceRoot":"","sources":["../../../../src/SegmentFactory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD;;;OAGG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;gBAEhC,YAAY,EAAE,YAAY;IAIzB,MAAM,CACjB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,aAAa,EACtB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,OAAO,CAAC;CAsDpB"}
@@ -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 @@
1
+ {"version":3,"file":"Shard.d.ts","sourceRoot":"","sources":["../../../../src/Shard.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D;;;OAGG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,qBAAa,KAAK;aAcE,SAAS,EAAE,MAAM;IAbnC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAElD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAE5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAW;IAElC,OAAO,CAAC,YAAY,CAAoB;gBAGtC,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EAAE,EAChB,YAAY,EAAE,KAAK,GAAG,SAAS,EACf,SAAS,EAAE,MAAM;IAQ5B,OAAO,IAAI,OAAO;IAMZ,SAAS,CACpB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAiCpC,SAAS,IAAI,WAAW,GAAG,SAAS;CAS5C"}
@@ -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 @@
1
+ {"version":3,"file":"ShardFactory.d.ts","sourceRoot":"","sources":["../../../../src/ShardFactory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD;;;OAGG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;gBAEhC,YAAY,EAAE,YAAY;IAIzB,MAAM,CACjB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,WAAW,EACzB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,KAAK,CAAC;CA+DlB"}
@@ -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 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC"}
@@ -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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/log.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,MAAM,qCAAgD,CAAC"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Change feed event record types.
3
+ */
4
+ export declare type BlobChangeFeedEventType = "UnspecifiedEventType" | "BlobCreated" | "BlobDeleted" | "BlobPropertiesUpdated" | "BlobSnapshotCreated" | "Control" | "BlobTierChanged" | "BlobAsyncOperationInitiated" | "BlobMetadataUpdated";
5
+ /**
6
+ * Change feed event record. Contains response data for the {@link BlobChangeFeedClient.listChanges} operation.
7
+ * @see https://docs.microsoft.com/en-us/azure/event-grid/event-schema-blob-storage?toc=/azure/storage/blobs/toc.json#event-properties
8
+ */
9
+ export interface BlobChangeFeedEvent {
10
+ /**
11
+ * Full resource path to the event source. This field is not writeable. Event Grid provides this value.
12
+ */
13
+ topic: string;
14
+ /**
15
+ * Publisher-defined path to the event subject.
16
+ */
17
+ subject: string;
18
+ /**
19
+ * One of the registered event types for this event source.
20
+ */
21
+ eventType: BlobChangeFeedEventType;
22
+ /**
23
+ * The time the event is generated based on the provider's UTC time.
24
+ */
25
+ eventTime: Date;
26
+ /**
27
+ * Unique identifier for the event.
28
+ */
29
+ id: string;
30
+ /**
31
+ * Blob storage event data.
32
+ */
33
+ data: BlobChangeFeedEventData;
34
+ /**
35
+ * The schema version of the data object. The publisher defines the schema version.
36
+ */
37
+ dataVersion?: string;
38
+ /**
39
+ * The schema version of the event metadata. Event Grid defines the schema of the top-level properties. Event Grid provides this value.
40
+ */
41
+ metadataVersion: string;
42
+ }
43
+ /**
44
+ * The type of blob.
45
+ */
46
+ export declare type BlobType = "BlockBlob" | "AppendBlob" | "PageBlob";
47
+ /**
48
+ * Change feed Blob storage event data.
49
+ */
50
+ export interface BlobChangeFeedEventData {
51
+ /**
52
+ * The operation that triggered the event.
53
+ */
54
+ api: string;
55
+ /**
56
+ * A client-provided request id for the storage API operation. This id can be used to
57
+ * correlate to Azure Storage diagnostic logs using the "client-request-id" field in the logs,
58
+ * and can be provided in client requests using the "x-ms-client-request-id" header.
59
+ */
60
+ clientRequestId: string;
61
+ /**
62
+ * Service-generated request id for the storage API operation. Can be used to correlate to Azure Storage
63
+ * diagnostic logs using the "request-id-header" field in the logs and is returned from initiating API call
64
+ * in the 'x-ms-request-id' header.
65
+ */
66
+ requestId: string;
67
+ /**
68
+ * The value that you can use to perform operations conditionally.
69
+ */
70
+ etag: string;
71
+ /**
72
+ * The content type specified for the blob.
73
+ */
74
+ contentType: string;
75
+ /**
76
+ * The size of the blob in bytes.
77
+ */
78
+ contentLength: number;
79
+ /**
80
+ * The type of blob.
81
+ */
82
+ blobType: BlobType;
83
+ /**
84
+ * The path to the blob. If the client uses a Blob REST API, then the url has this structure:
85
+ * <storage-account-name>.blob.core.windows.net/<container-name>/<file-name>.
86
+ */
87
+ url: string;
88
+ /**
89
+ * An opaque string value representing the logical sequence of events for any particular blob name.
90
+ * Users can use standard string comparison to understand the relative sequence of two events on the same blob name.
91
+ */
92
+ sequencer: string;
93
+ }
94
+ //# sourceMappingURL=BlobChangeFeedEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlobChangeFeedEvent.d.ts","sourceRoot":"","sources":["../../../../../src/models/BlobChangeFeedEvent.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,uBAAuB,GAC/B,sBAAsB,GACtB,aAAa,GACb,aAAa,GACb,uBAAuB,GACvB,qBAAqB,GACrB,SAAS,GACT,iBAAiB,GACjB,6BAA6B,GAC7B,qBAAqB,CAAC;AAE1B;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,uBAAuB,CAAC;IAEnC;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAEhB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,uBAAuB,CAAC;IAE9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,oBAAY,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,17 @@
1
+ export interface ChangeFeedCursor {
2
+ CursorVersion: number;
3
+ UrlHost: string;
4
+ EndTime?: string;
5
+ CurrentSegmentCursor: SegmentCursor;
6
+ }
7
+ export interface SegmentCursor {
8
+ ShardCursors: ShardCursor[];
9
+ CurrentShardPath: string;
10
+ SegmentPath: string;
11
+ }
12
+ export interface ShardCursor {
13
+ CurrentChunkPath: string;
14
+ BlockOffset: number;
15
+ EventIndex: number;
16
+ }
17
+ //# sourceMappingURL=ChangeFeedCursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChangeFeedCursor.d.ts","sourceRoot":"","sources":["../../../../../src/models/ChangeFeedCursor.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAC;IAEtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,aAAa,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB"}