azure-kusto-ingest 5.0.4 → 5.2.0

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 (48) hide show
  1. package/README.md +56 -57
  2. package/dist-esm/src/abstractKustoClient.js.map +1 -0
  3. package/dist-esm/src/columnMappings.js.map +1 -0
  4. package/dist-esm/src/descriptors.js +28 -8
  5. package/dist-esm/src/descriptors.js.map +1 -0
  6. package/dist-esm/src/errors.js.map +1 -0
  7. package/dist-esm/src/fileDescriptor.browser.js +2 -3
  8. package/dist-esm/src/fileDescriptor.browser.js.map +1 -0
  9. package/dist-esm/src/fileDescriptor.js +2 -3
  10. package/dist-esm/src/fileDescriptor.js.map +1 -0
  11. package/dist-esm/src/index.js +14 -8
  12. package/dist-esm/src/index.js.map +1 -0
  13. package/dist-esm/src/ingestClient.browser.js.map +1 -0
  14. package/dist-esm/src/ingestClient.js +6 -1
  15. package/dist-esm/src/ingestClient.js.map +1 -0
  16. package/dist-esm/src/ingestClientBase.js.map +1 -0
  17. package/dist-esm/src/ingestionBlobInfo.js.map +1 -0
  18. package/dist-esm/src/ingestionProperties.js.map +1 -0
  19. package/dist-esm/src/managedStreamingIngestClient.js +47 -23
  20. package/dist-esm/src/managedStreamingIngestClient.js.map +1 -0
  21. package/dist-esm/src/resourceManager.js +33 -14
  22. package/dist-esm/src/resourceManager.js.map +1 -0
  23. package/dist-esm/src/retry.js.map +1 -0
  24. package/dist-esm/src/status.js.map +1 -0
  25. package/dist-esm/src/statusQ.js.map +1 -0
  26. package/dist-esm/src/streamUtils.browser.js +6 -1
  27. package/dist-esm/src/streamUtils.browser.js.map +1 -0
  28. package/dist-esm/src/streamUtils.js +6 -2
  29. package/dist-esm/src/streamUtils.js.map +1 -0
  30. package/dist-esm/src/streamingIngestClient.browser.js +3 -12
  31. package/dist-esm/src/streamingIngestClient.browser.js.map +1 -0
  32. package/dist-esm/src/streamingIngestClient.js +4 -13
  33. package/dist-esm/src/streamingIngestClient.js.map +1 -0
  34. package/dist-esm/src/streamingIngestClientBase.js +31 -0
  35. package/dist-esm/src/streamingIngestClientBase.js.map +1 -0
  36. package/package.json +5 -3
  37. package/types/src/abstractKustoClient.d.ts +2 -1
  38. package/types/src/descriptors.d.ts +9 -7
  39. package/types/src/fileDescriptor.browser.d.ts +2 -3
  40. package/types/src/fileDescriptor.d.ts +2 -4
  41. package/types/src/index.d.ts +6 -6
  42. package/types/src/managedStreamingIngestClient.d.ts +7 -6
  43. package/types/src/resourceManager.d.ts +2 -0
  44. package/types/src/streamUtils.browser.d.ts +1 -0
  45. package/types/src/streamUtils.d.ts +2 -1
  46. package/types/src/streamingIngestClient.browser.d.ts +3 -6
  47. package/types/src/streamingIngestClient.d.ts +4 -7
  48. package/types/src/streamingIngestClientBase.d.ts +11 -0
@@ -3,21 +3,21 @@ import streamingIngestClient from "./streamingIngestClient";
3
3
  import managedStreamingIngestClient from "./managedStreamingIngestClient";
4
4
  import KustoIngestStatusQueues from "./status";
5
5
  import { DataFormat, IngestionMappingKind, ReportLevel, ReportMethod, ValidationImplications, ValidationOptions, ValidationPolicy } from "./ingestionProperties";
6
+ import { ApacheAvroColumnMapping, AvroColumnMapping, ColumnMapping, ConstantTransformation, CsvColumnMapping, FieldTransformation, JsonColumnMapping, OrcColumnMapping, ParquetColumnMapping, SStreamColumnMapping, W3CLogFileMapping } from "./columnMappings";
6
7
  import { BlobDescriptor, CompressionType, StreamDescriptor } from "./descriptors";
7
8
  import { FileDescriptor } from "./fileDescriptor";
8
- import { ApacheAvroColumnMapping, AvroColumnMapping, ColumnMapping, ConstantTransformation, CsvColumnMapping, FieldTransformation, JsonColumnMapping, OrcColumnMapping, ParquetColumnMapping, SStreamColumnMapping, W3CLogFileMapping } from "./columnMappings";
9
9
  export { Transformation as ColumnMappingTransformation } from "./columnMappings";
10
- export declare const IngestClient: typeof KustoIngestClient;
11
- export declare const StreamingIngestClient: typeof streamingIngestClient;
12
- export declare const ManagedStreamingIngestClient: typeof managedStreamingIngestClient;
13
- export declare const IngestStatusQueues: typeof KustoIngestStatusQueues;
14
10
  export { IngestionProperties } from "./ingestionProperties";
11
+ export { KustoIngestClient as IngestClient, KustoIngestStatusQueues as IngestStatusQueues, managedStreamingIngestClient as ManagedStreamingIngestClient, streamingIngestClient as StreamingIngestClient, };
12
+ /**
13
+ * @deprecated - import directly instead. Export const is not exporting type.
14
+ */
15
15
  export declare const IngestionDescriptors: {
16
16
  BlobDescriptor: typeof BlobDescriptor;
17
17
  FileDescriptor: typeof FileDescriptor;
18
18
  StreamDescriptor: typeof StreamDescriptor;
19
19
  };
20
- export { JsonColumnMapping, CsvColumnMapping, AvroColumnMapping, ParquetColumnMapping, OrcColumnMapping, W3CLogFileMapping, ValidationPolicy, ReportLevel, ReportMethod, ValidationImplications, ValidationOptions, DataFormat, IngestionMappingKind, CompressionType, ApacheAvroColumnMapping, SStreamColumnMapping, ConstantTransformation, FieldTransformation, ColumnMapping, };
20
+ export { ApacheAvroColumnMapping, AvroColumnMapping, BlobDescriptor, ColumnMapping, CompressionType, ConstantTransformation, CsvColumnMapping, DataFormat, FieldTransformation, FileDescriptor, IngestionMappingKind, JsonColumnMapping, OrcColumnMapping, ParquetColumnMapping, ReportLevel, ReportMethod, SStreamColumnMapping, StreamDescriptor, ValidationImplications, ValidationOptions, ValidationPolicy, W3CLogFileMapping, };
21
21
  /**
22
22
  * @deprecated - import directly instead
23
23
  */
@@ -1,12 +1,11 @@
1
1
  /// <reference types="node" />
2
2
  import { IngestionPropertiesInput } from "./ingestionProperties";
3
- import { StreamDescriptor } from "./descriptors";
4
- import { FileDescriptor } from "./fileDescriptor";
5
- import { AbstractKustoClient } from "./abstractKustoClient";
6
- import { KustoConnectionStringBuilder } from "azure-kusto-data";
7
- import { KustoResponseDataSet } from "azure-kusto-data/src/response";
8
3
  import { QueueSendMessageResponse } from "@azure/storage-queue";
4
+ import { KustoConnectionStringBuilder, KustoResponseDataSet } from "azure-kusto-data";
9
5
  import { Readable } from "stream";
6
+ import { AbstractKustoClient } from "./abstractKustoClient";
7
+ import { AbstractDescriptor, BlobDescriptor, StreamDescriptor } from "./descriptors";
8
+ import { FileDescriptor } from "./fileDescriptor";
10
9
  declare class KustoManagedStreamingIngestClient extends AbstractKustoClient {
11
10
  private streamingIngestClient;
12
11
  private queuedIngestClient;
@@ -34,11 +33,13 @@ declare class KustoManagedStreamingIngestClient extends AbstractKustoClient {
34
33
  /**
35
34
  * Use Readable for Node.js and ArrayBuffer in browser
36
35
  */
37
- ingestFromStream(stream: StreamDescriptor | Readable | ArrayBuffer, ingestionProperties?: IngestionPropertiesInput): Promise<any>;
36
+ ingestFromStream(stream: StreamDescriptor | Readable | ArrayBuffer, ingestionProperties?: IngestionPropertiesInput, clientRequestId?: string): Promise<any>;
38
37
  /**
39
38
  * Use string for Node.js and Blob in browser
40
39
  */
41
40
  ingestFromFile(file: FileDescriptor | string | Blob, ingestionProperties?: IngestionPropertiesInput): Promise<KustoResponseDataSet | QueueSendMessageResponse>;
41
+ ingestFromBlob(blob: string | BlobDescriptor, ingestionProperties?: IngestionPropertiesInput, clientRequestId?: string): Promise<any>;
42
+ streamWithRetries(length: number, descriptor: AbstractDescriptor, props?: IngestionPropertiesInput, clientRequestId?: string, stream?: Readable | ArrayBuffer): Promise<any>;
42
43
  close(): void;
43
44
  }
44
45
  export default KustoManagedStreamingIngestClient;
@@ -15,6 +15,7 @@ export declare class ResourceManager {
15
15
  readonly kustoClient: Client;
16
16
  readonly isBrowser: boolean;
17
17
  readonly refreshPeriod: number;
18
+ refreshPeriodOnError: number;
18
19
  ingestClientResources: IngestClientResources | null;
19
20
  ingestClientResourcesLastUpdate: number | null;
20
21
  authorizationContext: string | null;
@@ -28,6 +29,7 @@ export declare class ResourceManager {
28
29
  rows: () => any;
29
30
  }, resourceName: string): ResourceURI[];
30
31
  refreshAuthorizationContext(): Promise<string>;
32
+ tryRefresh(isAuthContextFetch: boolean): Promise<Error | null>;
31
33
  getAuthorizationContextFromService(): Promise<string>;
32
34
  getIngestionQueues(): Promise<ResourceURI[] | null>;
33
35
  getFailedIngestionsQueues(): Promise<ResourceURI[] | null>;
@@ -4,4 +4,5 @@ import { FileDescriptor } from "./fileDescriptor.browser";
4
4
  export declare const fileToStream: (file: FileDescriptor) => Promise<StreamDescriptor>;
5
5
  export declare const tryFileToBuffer: (file: FileDescriptor) => Promise<StreamDescriptor>;
6
6
  export declare const tryStreamToArray: (stream: any) => Promise<Buffer>;
7
+ export declare const readableToStream: (stream: ArrayBuffer) => ArrayBuffer;
7
8
  //# sourceMappingURL=streamUtils.browser.d.ts.map
@@ -1,8 +1,9 @@
1
1
  /// <reference types="node" />
2
+ import { Readable } from "stream";
2
3
  import { StreamDescriptor } from "./descriptors";
3
4
  import { FileDescriptor } from "./fileDescriptor";
4
- import { Readable } from "stream";
5
5
  export declare const fileToStream: (fileDescriptor: FileDescriptor) => Promise<StreamDescriptor>;
6
6
  export declare const tryFileToBuffer: (fileDescriptor: FileDescriptor) => Promise<StreamDescriptor>;
7
7
  export declare const tryStreamToArray: (stream: Readable, maxBufferSize: number) => Promise<Buffer | Readable>;
8
+ export declare const readableToStream: (stream: Readable | ArrayBuffer) => Readable;
8
9
  //# sourceMappingURL=streamUtils.d.ts.map
@@ -1,11 +1,9 @@
1
1
  import { IngestionPropertiesInput } from "./ingestionProperties";
2
+ import { KustoConnectionStringBuilder, KustoResponseDataSet } from "azure-kusto-data";
2
3
  import { StreamDescriptor } from "./descriptors";
3
4
  import { FileDescriptor } from "./fileDescriptor.browser";
4
- import { AbstractKustoClient } from "./abstractKustoClient";
5
- import { KustoConnectionStringBuilder } from "azure-kusto-data";
6
- import { KustoResponseDataSet } from "azure-kusto-data/src/response";
7
- declare class KustoStreamingIngestClient extends AbstractKustoClient {
8
- private kustoClient;
5
+ import { KustoStreamingIngestClientBase } from "./streamingIngestClientBase";
6
+ declare class KustoStreamingIngestClient extends KustoStreamingIngestClientBase {
9
7
  constructor(kcsb: string | KustoConnectionStringBuilder, defaultProps?: IngestionPropertiesInput);
10
8
  /**
11
9
  * Use Readable for Node.js and ArrayBuffer in browser
@@ -15,7 +13,6 @@ declare class KustoStreamingIngestClient extends AbstractKustoClient {
15
13
  * Use string for Node.js and Blob in browser
16
14
  */
17
15
  ingestFromFile(file: FileDescriptor | Blob, ingestionProperties?: IngestionPropertiesInput): Promise<KustoResponseDataSet>;
18
- close(): void;
19
16
  }
20
17
  export default KustoStreamingIngestClient;
21
18
  //# sourceMappingURL=streamingIngestClient.browser.d.ts.map
@@ -1,13 +1,11 @@
1
1
  /// <reference types="node" />
2
2
  import { IngestionPropertiesInput } from "./ingestionProperties";
3
+ import { KustoConnectionStringBuilder, KustoResponseDataSet } from "azure-kusto-data";
4
+ import { Readable } from "stream";
3
5
  import { StreamDescriptor } from "./descriptors";
4
6
  import { FileDescriptor } from "./fileDescriptor";
5
- import { AbstractKustoClient } from "./abstractKustoClient";
6
- import { KustoConnectionStringBuilder } from "azure-kusto-data";
7
- import { KustoResponseDataSet } from "azure-kusto-data/src/response";
8
- import { Readable } from "stream";
9
- declare class KustoStreamingIngestClient extends AbstractKustoClient {
10
- private kustoClient;
7
+ import { KustoStreamingIngestClientBase } from "./streamingIngestClientBase";
8
+ declare class KustoStreamingIngestClient extends KustoStreamingIngestClientBase {
11
9
  constructor(kcsb: string | KustoConnectionStringBuilder, defaultProps?: IngestionPropertiesInput);
12
10
  /**
13
11
  * Use Readable for Node.js and ArrayBuffer in browser
@@ -17,7 +15,6 @@ declare class KustoStreamingIngestClient extends AbstractKustoClient {
17
15
  * Use string for Node.js and Blob in browser
18
16
  */
19
17
  ingestFromFile(file: FileDescriptor | string | Blob, ingestionProperties?: IngestionPropertiesInput): Promise<KustoResponseDataSet>;
20
- close(): void;
21
18
  }
22
19
  export default KustoStreamingIngestClient;
23
20
  //# sourceMappingURL=streamingIngestClient.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { IngestionPropertiesInput } from "./ingestionProperties";
2
+ import { BlobDescriptor } from "./descriptors";
3
+ import { AbstractKustoClient } from "./abstractKustoClient";
4
+ import { Client as KustoClient, KustoConnectionStringBuilder } from "azure-kusto-data";
5
+ export declare abstract class KustoStreamingIngestClientBase extends AbstractKustoClient {
6
+ protected kustoClient: KustoClient;
7
+ constructor(kcsb: string | KustoConnectionStringBuilder, defaultProps?: IngestionPropertiesInput);
8
+ ingestFromBlob(blob: string | BlobDescriptor, ingestionProperties?: IngestionPropertiesInput, clientRequestId?: string): Promise<any>;
9
+ close(): void;
10
+ }
11
+ //# sourceMappingURL=streamingIngestClientBase.d.ts.map