@azure/storage-blob-changefeed 12.0.0-alpha.20220111.2 → 12.0.0-alpha.20220113.3

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 +21 -13
  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,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,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,23 @@
1
+ import { CommonOptions } from "@azure/storage-blob";
2
+ import { AbortSignalLike } from "@azure/core-http";
3
+ /**
4
+ * Options to configure {@link BlobChangeFeedClient.listChanges} operation.
5
+ */
6
+ export interface BlobChangeFeedListChangesOptions extends CommonOptions {
7
+ /**
8
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
9
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
10
+ */
11
+ abortSignal?: AbortSignalLike;
12
+ /**
13
+ * Specify the start of the time range during which the change feed records will be fetched.
14
+ * Note that for now the change feed client will round start time down to the nearest hour.
15
+ */
16
+ start?: Date;
17
+ /**
18
+ * Specify the end of the time range during which the change feed records will be fetched.
19
+ * Note that for now the change feed client will round end time up to the nearest hour.
20
+ */
21
+ end?: Date;
22
+ }
23
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1,9 @@
1
+ export declare const SDK_VERSION: string;
2
+ export declare const CHANGE_FEED_CONTAINER_NAME: string;
3
+ export declare const CHANGE_FEED_META_SEGMENT_PATH: string;
4
+ export declare const CHANGE_FEED_STATUS_FINALIZED: string;
5
+ export declare const CHANGE_FEED_SEGMENT_PREFIX: string;
6
+ export declare const CHANGE_FEED_INITIALIZATION_SEGMENT: string;
7
+ export declare const CHANGE_FEED_MAX_PAGE_SIZE: number;
8
+ export declare const CHANGE_FEED_CHUNK_BLOCK_DOWNLOAD_SIZE: number;
9
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Creates a span using the global tracer.
3
+ * @internal
4
+ */
5
+ export declare const createSpan: <T extends {
6
+ tracingOptions?: import("@azure/core-tracing").OperationTracingOptions | undefined;
7
+ }>(operationName: string, operationOptions: T | undefined) => {
8
+ span: import("@azure/core-tracing").Span;
9
+ updatedOptions: T;
10
+ };
11
+ //# sourceMappingURL=tracing.d.ts.map
@@ -0,0 +1,15 @@
1
+ /// <reference types="node" />
2
+ /**
3
+ * Read body from downloading operation methods to string.
4
+ * Works in both Node.js and browsers.
5
+ *
6
+ * @param response - Convenience layer methods response with downloaded body
7
+ * @param length - Length of Readable stream, needed for Node.js environment
8
+ */
9
+ export declare function bodyToString(response: {
10
+ readableStreamBody?: NodeJS.ReadableStream;
11
+ blobBody?: Promise<Blob>;
12
+ }, _length?: number): Promise<string>;
13
+ export declare function blobToString(blob: Blob): Promise<string>;
14
+ export declare function bodyToAvroReadable(): void;
15
+ //# sourceMappingURL=utils.browser.d.ts.map
@@ -0,0 +1,42 @@
1
+ import { AbortSignalLike } from "@azure/core-http";
2
+ import { ContainerClient, CommonOptions } from "@azure/storage-blob";
3
+ export declare function ceilToNearestHour(date: Date | undefined): Date | undefined;
4
+ export declare function floorToNearestHour(date: Date | undefined): Date | undefined;
5
+ /**
6
+ * Get host from an URL string.
7
+ *
8
+ * @param url - Source URL string
9
+ */
10
+ export declare function getHost(url: string): string | undefined;
11
+ /**
12
+ * Get URI from an URL string.
13
+ *
14
+ * @param url - Source URL string
15
+ */
16
+ export declare function getURI(url: string): string;
17
+ export declare function hashString(str: string): number;
18
+ /**
19
+ * Options to configure {@link getYearsPaths} operation.
20
+ */
21
+ export interface GetYearsPathsOptions extends CommonOptions {
22
+ /**
23
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
24
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
25
+ */
26
+ abortSignal?: AbortSignalLike;
27
+ }
28
+ export declare function getYearsPaths(containerClient: ContainerClient, options?: GetYearsPathsOptions): Promise<number[]>;
29
+ /**
30
+ * Options to configure {@link getSegmentsInYear} operation.
31
+ */
32
+ export interface GetSegmentsInYearOptions extends CommonOptions {
33
+ /**
34
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
35
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
36
+ */
37
+ abortSignal?: AbortSignalLike;
38
+ }
39
+ export declare function getSegmentsInYear(containerClient: ContainerClient, year: number, startTime?: Date, endTime?: Date, options?: GetSegmentsInYearOptions): Promise<string[]>;
40
+ export declare function parseDateFromSegmentPath(segmentPath: string): Date;
41
+ export declare function minDate(dateA: Date, dateB?: Date): Date;
42
+ //# sourceMappingURL=utils.common.d.ts.map
@@ -0,0 +1,15 @@
1
+ /// <reference types="node" />
2
+ import { AvroReadable } from "../../../storage-internal-avro/src";
3
+ /**
4
+ * Read body from downloading operation methods to string.
5
+ * Works in both Node.js and browsers.
6
+ *
7
+ * @param response - Convenience layer methods response with downloaded body
8
+ * @param length - Length of Readable stream, needed for Node.js environment
9
+ */
10
+ export declare function bodyToString(response: {
11
+ readableStreamBody?: NodeJS.ReadableStream;
12
+ blobBody?: Promise<Blob>;
13
+ }, length?: number): Promise<string>;
14
+ export declare function streamToAvroReadable(readableStream: NodeJS.ReadableStream): AvroReadable;
15
+ //# sourceMappingURL=utils.node.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=blobchangefeedclient.spec.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=changefeed.spec.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=chunk.spec.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=segment.spec.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=shard.spec.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { StorageSharedKeyCredential, BlobServiceClient } from "@azure/storage-blob";
2
+ import { BlobChangeFeedClient } from "../../src";
3
+ import { TokenCredential } from "@azure/core-http";
4
+ export * from "./testutils.common";
5
+ export declare function getGenericCredential(accountType: string): StorageSharedKeyCredential;
6
+ export declare function getGenericBSU(accountType: string, accountNameSuffix?: string): BlobServiceClient;
7
+ export declare function getTokenCredential(): TokenCredential;
8
+ export declare function getTokenBSU(): BlobServiceClient;
9
+ export declare function getBSU(): BlobServiceClient;
10
+ export declare function getAlternateBSU(): BlobServiceClient;
11
+ export declare function getConnectionStringFromEnvironment(): string;
12
+ export declare function getBlobChangeFeedClient(accountType?: string, accountNameSuffix?: string): BlobChangeFeedClient;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,56 @@
1
+ import { TokenCredential, GetTokenOptions, AccessToken } from "@azure/core-http";
2
+ import { RecorderEnvironmentSetup } from "@azure-tools/test-recorder";
3
+ export declare const testPollerProperties: {
4
+ intervalInMs: number | undefined;
5
+ };
6
+ export declare const recorderEnvSetup: RecorderEnvironmentSetup;
7
+ /**
8
+ * A TokenCredential that always returns the given token. This class can be
9
+ * used when the access token is already known or can be retrieved from an
10
+ * outside source.
11
+ */
12
+ export declare class SimpleTokenCredential implements TokenCredential {
13
+ /**
14
+ * The raw token string. Can be changed when the token needs to be updated.
15
+ */
16
+ token: string;
17
+ /**
18
+ * The Date at which the token expires. Can be changed to update the expiration time.
19
+ */
20
+ expiresOn: Date;
21
+ /**
22
+ * Creates an instance of TokenCredential.
23
+ * @param token -
24
+ */
25
+ constructor(token: string, expiresOn?: Date);
26
+ /**
27
+ * Retrieves the token stored in this RawTokenCredential.
28
+ *
29
+ * @param _scopes - Ignored since token is already known.
30
+ * @param _options - Ignored since token is already known.
31
+ * @returns The access token details.
32
+ */
33
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
34
+ }
35
+ export declare function isBrowser(): boolean;
36
+ export declare function getUniqueName(prefix: string): string;
37
+ export declare function base64encode(content: string): string;
38
+ export declare function base64decode(encodedString: string): string;
39
+ declare type BlobMetadata = {
40
+ [propertyName: string]: string;
41
+ };
42
+ /**
43
+ * Validate if m1 is super set of m2.
44
+ *
45
+ * @param m1 - BlobMetadata
46
+ * @param m2 - BlobMetadata
47
+ */
48
+ export declare function isSuperSet(m1?: BlobMetadata, m2?: BlobMetadata): boolean;
49
+ /**
50
+ * Sleep for seconds.
51
+ *
52
+ * @param seconds -
53
+ */
54
+ export declare function sleep(seconds: number): Promise<void>;
55
+ export {};
56
+ //# sourceMappingURL=testutils.common.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const AVRO_SYNC_MARKER_SIZE: number;
2
+ export declare const AVRO_INIT_BYTES: Uint8Array;
3
+ export declare const AVRO_CODEC_KEY: string;
4
+ export declare const AVRO_SCHEMA_KEY: string;
5
+ //# sourceMappingURL=AvroConstants.d.ts.map
@@ -0,0 +1,57 @@
1
+ import { AvroReadable } from "./AvroReadable";
2
+ import { AbortSignalLike } from "@azure/abort-controller";
3
+ /**
4
+ * Options to configure the AvroParser read methods.
5
+ * See {@link AvroParser.readFixedBytes}, {@link AvroParser.readMap} and etc.
6
+ */
7
+ interface AvroParserReadOptions {
8
+ /**
9
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
10
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
11
+ */
12
+ abortSignal?: AbortSignalLike;
13
+ }
14
+ export declare class AvroParser {
15
+ /**
16
+ * Reads a fixed number of bytes from the stream.
17
+ *
18
+ * @param stream -
19
+ * @param length -
20
+ * @param options -
21
+ */
22
+ static readFixedBytes(stream: AvroReadable, length: number, options?: AvroParserReadOptions): Promise<Uint8Array>;
23
+ /**
24
+ * Reads a single byte from the stream.
25
+ *
26
+ * @param stream -
27
+ * @param options -
28
+ */
29
+ private static readByte;
30
+ private static readZigZagLong;
31
+ static readLong(stream: AvroReadable, options?: AvroParserReadOptions): Promise<number>;
32
+ static readInt(stream: AvroReadable, options?: AvroParserReadOptions): Promise<number>;
33
+ static readNull(): Promise<null>;
34
+ static readBoolean(stream: AvroReadable, options?: AvroParserReadOptions): Promise<boolean>;
35
+ static readFloat(stream: AvroReadable, options?: AvroParserReadOptions): Promise<number>;
36
+ static readDouble(stream: AvroReadable, options?: AvroParserReadOptions): Promise<number>;
37
+ static readBytes(stream: AvroReadable, options?: AvroParserReadOptions): Promise<Uint8Array>;
38
+ static readString(stream: AvroReadable, options?: AvroParserReadOptions): Promise<string>;
39
+ private static readMapPair;
40
+ static readMap<T>(stream: AvroReadable, readItemMethod: (s: AvroReadable, options?: AvroParserReadOptions) => Promise<T>, options?: AvroParserReadOptions): Promise<Record<string, T>>;
41
+ private static readArray;
42
+ }
43
+ export declare abstract class AvroType {
44
+ /**
45
+ * Reads an object from the stream.
46
+ */
47
+ abstract read(stream: AvroReadable, options?: AvroParserReadOptions): Promise<Object | null>;
48
+ /**
49
+ * Determines the AvroType from the Avro Schema.
50
+ */
51
+ static fromSchema(schema: string | Object): AvroType;
52
+ private static fromStringSchema;
53
+ private static fromArraySchema;
54
+ private static fromObjectSchema;
55
+ }
56
+ export {};
57
+ //# sourceMappingURL=AvroParser.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { AbortSignalLike } from "@azure/abort-controller";
2
+ /**
3
+ * Options to configure the {@link AvroReadable.read} operation.
4
+ */
5
+ export interface AvroReadableReadOptions {
6
+ /**
7
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
8
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
9
+ */
10
+ abortSignal?: AbortSignalLike;
11
+ }
12
+ export declare abstract class AvroReadable {
13
+ abstract readonly position: number;
14
+ abstract read(size: number, options?: AvroReadableReadOptions): Promise<Uint8Array>;
15
+ }
16
+ //# sourceMappingURL=AvroReadable.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { AvroReadable, AvroReadableReadOptions } from "./AvroReadable";
2
+ export declare class AvroReadableFromBlob extends AvroReadable {
3
+ private _position;
4
+ private _blob;
5
+ constructor(blob: Blob);
6
+ readonly position: number;
7
+ read(size: number, options?: AvroReadableReadOptions): Promise<Uint8Array>;
8
+ }
9
+ //# sourceMappingURL=AvroReadableFromBlob.d.ts.map
@@ -0,0 +1,11 @@
1
+ /// <reference types="node" />
2
+ import { AvroReadable, AvroReadableReadOptions } from "./AvroReadable";
3
+ export declare class AvroReadableFromStream extends AvroReadable {
4
+ private _position;
5
+ private _readable;
6
+ private toUint8Array;
7
+ constructor(readable: NodeJS.ReadableStream);
8
+ readonly position: number;
9
+ read(size: number, options?: AvroReadableReadOptions): Promise<Uint8Array>;
10
+ }
11
+ //# sourceMappingURL=AvroReadableFromStream.d.ts.map
@@ -0,0 +1,33 @@
1
+ import { AvroReadable } from "./AvroReadable";
2
+ import "@azure/core-paging";
3
+ import { AbortSignalLike } from "@azure/abort-controller";
4
+ /**
5
+ * Options to configure the {@link AvroReader.parseObjects} operation.
6
+ */
7
+ export interface AvroParseOptions {
8
+ /**
9
+ * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
10
+ * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
11
+ */
12
+ abortSignal?: AbortSignalLike;
13
+ }
14
+ export declare class AvroReader {
15
+ private readonly _dataStream;
16
+ private readonly _headerStream;
17
+ private _syncMarker?;
18
+ private _metadata?;
19
+ private _itemType?;
20
+ private _itemsRemainingInBlock?;
21
+ private readonly _initialBlockOffset;
22
+ private _blockOffset;
23
+ readonly blockOffset: number;
24
+ private _objectIndex;
25
+ readonly objectIndex: number;
26
+ private _initialized;
27
+ constructor(dataStream: AvroReadable);
28
+ constructor(dataStream: AvroReadable, headerStream: AvroReadable, currentBlockOffset: number, indexWithinCurrentBlock: number);
29
+ private initialize;
30
+ hasNext(): boolean;
31
+ parseObjects(options?: AvroParseOptions): AsyncIterableIterator<Record<string, any> | null>;
32
+ }
33
+ //# sourceMappingURL=AvroReader.d.ts.map
@@ -0,0 +1,4 @@
1
+ export { AvroReader } from "./AvroReader";
2
+ export { AvroReadable } from "./AvroReadable";
3
+ export { AvroReadableFromBlob } from "./AvroReadableFromBlob";
4
+ //# sourceMappingURL=index.browser.d.ts.map
@@ -0,0 +1,4 @@
1
+ export { AvroReader } from "./AvroReader";
2
+ export { AvroReadable } from "./AvroReadable";
3
+ export { AvroReadableFromStream } from "./AvroReadableFromStream";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ export interface KeyValuePair<T> {
2
+ key: string;
3
+ value: T;
4
+ }
5
+ export declare function arraysEqual(a: Uint8Array, b: Uint8Array): boolean;
6
+ //# sourceMappingURL=utils.common.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=avroreadable.spec.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=avroreadable.spec.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=avroreader.spec.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare function main(): Promise<void>;
2
+ //# sourceMappingURL=blobChangeFeedClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blobChangeFeedClient.d.ts","sourceRoot":"","sources":["../../../../samples-dev/blobChangeFeedClient.ts"],"names":[],"mappings":"AAcA,wBAAsB,IAAI,kBAsBzB"}
@@ -0,0 +1,2 @@
1
+ export declare function main(): Promise<void>;
2
+ //# sourceMappingURL=resumeListChanges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resumeListChanges.d.ts","sourceRoot":"","sources":["../../../../samples-dev/resumeListChanges.ts"],"names":[],"mappings":"AAcA,wBAAsB,IAAI,kBA4BzB"}
@@ -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 @@
1
+ {"version":3,"file":"AvroReaderFactory.d.ts","sourceRoot":"","sources":["../../../../src/AvroReaderFactory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;GAEG;AACH,qBAAa,iBAAiB;IACrB,MAAM,CAAC,mBAAmB,EAAE,YAAY,GAAG,UAAU;IAErD,MAAM,CACX,UAAU,EAAE,YAAY,EACxB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,UAAU;CAcd"}