@stackone/olap 2.4.0 → 3.1.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.
- package/README.md +21 -0
- package/dist/index.cjs +30 -27
- package/dist/index.d.cts +19 -4
- package/dist/index.d.mts +19 -4
- package/dist/index.mjs +47 -44
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ILogger } from "@stackone/logger";
|
|
2
|
-
import { PiiRedaction } from "@stackone/redaction";
|
|
3
2
|
import { Producer } from "@platformatic/kafka";
|
|
4
3
|
import { Storage } from "@stackone/storage";
|
|
5
4
|
|
|
@@ -45,8 +44,12 @@ type AdvancedSinkConfig = {
|
|
|
45
44
|
bucket?: string;
|
|
46
45
|
maxItemSizeBytes?: number;
|
|
47
46
|
errorSizeMultiplier?: number;
|
|
48
|
-
piiRedaction?:
|
|
47
|
+
piiRedaction?: AdvancedPiiScrubber;
|
|
49
48
|
};
|
|
49
|
+
interface AdvancedPiiScrubber {
|
|
50
|
+
warmupTier2(): Promise<void>;
|
|
51
|
+
scrubObject<T>(value: T): Promise<T>;
|
|
52
|
+
}
|
|
50
53
|
type AdvancedLogMetadata = {
|
|
51
54
|
isBackgroundLog?: boolean;
|
|
52
55
|
expirationTime?: number;
|
|
@@ -482,6 +485,10 @@ declare const LogType: {
|
|
|
482
485
|
};
|
|
483
486
|
type LogType = (typeof LogType)[keyof typeof LogType];
|
|
484
487
|
type CombinedLogType = typeof LogType.Action | typeof LogType.Unified;
|
|
488
|
+
type AuthPair = {
|
|
489
|
+
authType: AuthType;
|
|
490
|
+
authId: string;
|
|
491
|
+
};
|
|
485
492
|
type Query = {
|
|
486
493
|
organizationId?: string | string[];
|
|
487
494
|
projectSecureId?: string | string[];
|
|
@@ -511,6 +518,7 @@ type Query = {
|
|
|
511
518
|
httpMethod?: string | string[];
|
|
512
519
|
authType?: string | string[];
|
|
513
520
|
authId?: string | string[];
|
|
521
|
+
authPairs?: readonly AuthPair[];
|
|
514
522
|
userAgent?: string | string[];
|
|
515
523
|
ipAddress?: string | string[];
|
|
516
524
|
sessionId?: string | string[];
|
|
@@ -559,6 +567,7 @@ type ActionsQuery = {
|
|
|
559
567
|
sourceValue?: string | string[];
|
|
560
568
|
authType?: string | string[];
|
|
561
569
|
authId?: string | string[];
|
|
570
|
+
authPairs?: readonly AuthPair[];
|
|
562
571
|
userAgent?: string | string[];
|
|
563
572
|
ipAddress?: string | string[];
|
|
564
573
|
sessionId?: string | string[];
|
|
@@ -627,6 +636,7 @@ type UnifiedQuery = {
|
|
|
627
636
|
sourceValue?: string | string[];
|
|
628
637
|
authType?: string | string[];
|
|
629
638
|
authId?: string | string[];
|
|
639
|
+
authPairs?: readonly AuthPair[];
|
|
630
640
|
userAgent?: string | string[];
|
|
631
641
|
ipAddress?: string | string[];
|
|
632
642
|
sessionId?: string | string[];
|
|
@@ -793,7 +803,7 @@ type PlatformDimensionsQuery = Partial<PlatformQuery> & {
|
|
|
793
803
|
dimensions: PlatformDimension[];
|
|
794
804
|
maxValues?: number;
|
|
795
805
|
};
|
|
796
|
-
type SourceQuery = Partial<Query>;
|
|
806
|
+
type SourceQuery = Omit<Partial<Query>, 'authPairs'>;
|
|
797
807
|
type ActionsCountQuery = {
|
|
798
808
|
organizationId?: string;
|
|
799
809
|
startTime: Date;
|
|
@@ -1007,6 +1017,11 @@ type PlatformLog = ILog & {
|
|
|
1007
1017
|
details?: Record<string, unknown>;
|
|
1008
1018
|
};
|
|
1009
1019
|
//#endregion
|
|
1020
|
+
//#region src/logs/clickhouse/parameterHelpers.d.ts
|
|
1021
|
+
declare class InvalidAuthPairError extends Error {
|
|
1022
|
+
constructor(message: string);
|
|
1023
|
+
}
|
|
1024
|
+
//#endregion
|
|
1010
1025
|
//#region src/datasets/types.d.ts
|
|
1011
1026
|
type LogfireConfig = {
|
|
1012
1027
|
token?: string;
|
|
@@ -1178,4 +1193,4 @@ declare class PolicySink implements IPolicySink {
|
|
|
1178
1193
|
//#region src/utils/stepErrors.d.ts
|
|
1179
1194
|
declare const hasErrorEntries: (errors: unknown) => boolean;
|
|
1180
1195
|
//#endregion
|
|
1181
|
-
export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, type ActionsCountQuery, type ActionsQuery, type ActionsQueryResult, type AdvancedLogMetadata, type AdvancedOptions, type AdvancedSinkConfig, type AggregateQuery, type AggregateResult, AuthType, type AuthType as AuthTypeValue, type ClickHouseConfig, type CombinedLogType, DEFAULT_TOPIC_CLUSTER_MAP, type DatasetsOptions, type DatasetsSinkConfig, type DefenderContext, type DefenderLog, type DefenderOptions, type DefenderSinkConfig, Dimension, type Dimension as DimensionValues, type DimensionsQuery, type DimensionsResult, type FieldLabelProvenance, type ILog, type IOlapClient, type IPolicySink, type InternalKafkaClientBuilder, type InternalKafkaClientConfig, IntervalType, type IntervalType as IntervalTypeValues, type KafkaClientBuilder, type KafkaClientConfig, type KafkaClusterName, type LogEntities, LogType, type LogType as LogTypeValues, type LogfireConfig, type LogsOptions, OlapClient, OlapClientManager, type OlapOptions, type OlapSinkConfig, OrderBy, type OrderBy as OrderByValues, OrderDirection, type OrderDirection as OrderDirectionValues, type PlatformAdvancedLog, PlatformDimension, type PlatformDimension as PlatformDimensionValues, type PlatformDimensionsQuery, type PlatformInput, type PlatformLog, type PlatformQuery, type PlatformQueryResult, type PlatformResult, type PolicyContext, type PolicyLog, type PolicyObservation, type PolicyOptions, type PolicyRecord, type PolicyResult, PolicySink, type PolicySinkConfig, type ProviderAdvancedLog, type ProviderInput, type ProviderLog, type ProviderQuery, type ProviderQueryResult, type ProviderResult, type Query, type QueryResult, type SASLMechanism, type Source, type SourceQuery, type SourceResult, SourceType, type SourceType as SourceTypeValue, type StepAdvancedLog, type StepInput, type StepLog, type StepResult, type StepsQuery, type StepsQueryResult, StreamType, type StreamType as StreamTypeValue, type TopicClusterMap, TransportType, type TransportType as TransportTypeValue, type TruncationMode, type UnifiedAdvancedLog, type UnifiedInput, type UnifiedLog, type UnifiedQuery, type UnifiedQueryResult, type UnifiedResult, getPolicySink, hasErrorEntries };
|
|
1196
|
+
export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, type ActionsCountQuery, type ActionsQuery, type ActionsQueryResult, type AdvancedLogMetadata, type AdvancedOptions, type AdvancedPiiScrubber, type AdvancedSinkConfig, type AggregateQuery, type AggregateResult, type AuthPair, AuthType, type AuthType as AuthTypeValue, type ClickHouseConfig, type CombinedLogType, DEFAULT_TOPIC_CLUSTER_MAP, type DatasetsOptions, type DatasetsSinkConfig, type DefenderContext, type DefenderLog, type DefenderOptions, type DefenderSinkConfig, Dimension, type Dimension as DimensionValues, type DimensionsQuery, type DimensionsResult, type FieldLabelProvenance, type ILog, type IOlapClient, type IPolicySink, type InternalKafkaClientBuilder, type InternalKafkaClientConfig, IntervalType, type IntervalType as IntervalTypeValues, InvalidAuthPairError, type KafkaClientBuilder, type KafkaClientConfig, type KafkaClusterName, type LogEntities, LogType, type LogType as LogTypeValues, type LogfireConfig, type LogsOptions, OlapClient, OlapClientManager, type OlapOptions, type OlapSinkConfig, OrderBy, type OrderBy as OrderByValues, OrderDirection, type OrderDirection as OrderDirectionValues, type PlatformAdvancedLog, PlatformDimension, type PlatformDimension as PlatformDimensionValues, type PlatformDimensionsQuery, type PlatformInput, type PlatformLog, type PlatformQuery, type PlatformQueryResult, type PlatformResult, type PolicyContext, type PolicyLog, type PolicyObservation, type PolicyOptions, type PolicyRecord, type PolicyResult, PolicySink, type PolicySinkConfig, type ProviderAdvancedLog, type ProviderInput, type ProviderLog, type ProviderQuery, type ProviderQueryResult, type ProviderResult, type Query, type QueryResult, type SASLMechanism, type Source, type SourceQuery, type SourceResult, SourceType, type SourceType as SourceTypeValue, type StepAdvancedLog, type StepInput, type StepLog, type StepResult, type StepsQuery, type StepsQueryResult, StreamType, type StreamType as StreamTypeValue, type TopicClusterMap, TransportType, type TransportType as TransportTypeValue, type TruncationMode, type UnifiedAdvancedLog, type UnifiedInput, type UnifiedLog, type UnifiedQuery, type UnifiedQueryResult, type UnifiedResult, getPolicySink, hasErrorEntries };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./chunk-BhWHdk3m.mjs";
|
|
2
2
|
import { Storage } from "@stackone/storage";
|
|
3
|
-
import { PiiRedaction } from "@stackone/redaction";
|
|
4
3
|
import { ILogger } from "@stackone/logger";
|
|
5
4
|
import { Producer } from "@platformatic/kafka";
|
|
6
5
|
|
|
@@ -44,8 +43,12 @@ type AdvancedSinkConfig = {
|
|
|
44
43
|
bucket?: string;
|
|
45
44
|
maxItemSizeBytes?: number;
|
|
46
45
|
errorSizeMultiplier?: number;
|
|
47
|
-
piiRedaction?:
|
|
46
|
+
piiRedaction?: AdvancedPiiScrubber;
|
|
48
47
|
};
|
|
48
|
+
interface AdvancedPiiScrubber {
|
|
49
|
+
warmupTier2(): Promise<void>;
|
|
50
|
+
scrubObject<T>(value: T): Promise<T>;
|
|
51
|
+
}
|
|
49
52
|
type AdvancedLogMetadata = {
|
|
50
53
|
isBackgroundLog?: boolean;
|
|
51
54
|
expirationTime?: number;
|
|
@@ -481,6 +484,10 @@ declare const LogType: {
|
|
|
481
484
|
};
|
|
482
485
|
type LogType = (typeof LogType)[keyof typeof LogType];
|
|
483
486
|
type CombinedLogType = typeof LogType.Action | typeof LogType.Unified;
|
|
487
|
+
type AuthPair = {
|
|
488
|
+
authType: AuthType;
|
|
489
|
+
authId: string;
|
|
490
|
+
};
|
|
484
491
|
type Query = {
|
|
485
492
|
organizationId?: string | string[];
|
|
486
493
|
projectSecureId?: string | string[];
|
|
@@ -510,6 +517,7 @@ type Query = {
|
|
|
510
517
|
httpMethod?: string | string[];
|
|
511
518
|
authType?: string | string[];
|
|
512
519
|
authId?: string | string[];
|
|
520
|
+
authPairs?: readonly AuthPair[];
|
|
513
521
|
userAgent?: string | string[];
|
|
514
522
|
ipAddress?: string | string[];
|
|
515
523
|
sessionId?: string | string[];
|
|
@@ -558,6 +566,7 @@ type ActionsQuery = {
|
|
|
558
566
|
sourceValue?: string | string[];
|
|
559
567
|
authType?: string | string[];
|
|
560
568
|
authId?: string | string[];
|
|
569
|
+
authPairs?: readonly AuthPair[];
|
|
561
570
|
userAgent?: string | string[];
|
|
562
571
|
ipAddress?: string | string[];
|
|
563
572
|
sessionId?: string | string[];
|
|
@@ -626,6 +635,7 @@ type UnifiedQuery = {
|
|
|
626
635
|
sourceValue?: string | string[];
|
|
627
636
|
authType?: string | string[];
|
|
628
637
|
authId?: string | string[];
|
|
638
|
+
authPairs?: readonly AuthPair[];
|
|
629
639
|
userAgent?: string | string[];
|
|
630
640
|
ipAddress?: string | string[];
|
|
631
641
|
sessionId?: string | string[];
|
|
@@ -792,7 +802,7 @@ type PlatformDimensionsQuery = Partial<PlatformQuery> & {
|
|
|
792
802
|
dimensions: PlatformDimension[];
|
|
793
803
|
maxValues?: number;
|
|
794
804
|
};
|
|
795
|
-
type SourceQuery = Partial<Query>;
|
|
805
|
+
type SourceQuery = Omit<Partial<Query>, 'authPairs'>;
|
|
796
806
|
type ActionsCountQuery = {
|
|
797
807
|
organizationId?: string;
|
|
798
808
|
startTime: Date;
|
|
@@ -1006,6 +1016,11 @@ type PlatformLog = ILog & {
|
|
|
1006
1016
|
details?: Record<string, unknown>;
|
|
1007
1017
|
};
|
|
1008
1018
|
//#endregion
|
|
1019
|
+
//#region src/logs/clickhouse/parameterHelpers.d.ts
|
|
1020
|
+
declare class InvalidAuthPairError extends Error {
|
|
1021
|
+
constructor(message: string);
|
|
1022
|
+
}
|
|
1023
|
+
//#endregion
|
|
1009
1024
|
//#region src/datasets/types.d.ts
|
|
1010
1025
|
type LogfireConfig = {
|
|
1011
1026
|
token?: string;
|
|
@@ -1177,4 +1192,4 @@ declare class PolicySink implements IPolicySink {
|
|
|
1177
1192
|
//#region src/utils/stepErrors.d.ts
|
|
1178
1193
|
declare const hasErrorEntries: (errors: unknown) => boolean;
|
|
1179
1194
|
//#endregion
|
|
1180
|
-
export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, type ActionsCountQuery, type ActionsQuery, type ActionsQueryResult, type AdvancedLogMetadata, type AdvancedOptions, type AdvancedSinkConfig, type AggregateQuery, type AggregateResult, AuthType, type AuthType as AuthTypeValue, type ClickHouseConfig, type CombinedLogType, DEFAULT_TOPIC_CLUSTER_MAP, type DatasetsOptions, type DatasetsSinkConfig, type DefenderContext, type DefenderLog, type DefenderOptions, type DefenderSinkConfig, Dimension, type Dimension as DimensionValues, type DimensionsQuery, type DimensionsResult, type FieldLabelProvenance, type ILog, type IOlapClient, type IPolicySink, type InternalKafkaClientBuilder, type InternalKafkaClientConfig, IntervalType, type IntervalType as IntervalTypeValues, type KafkaClientBuilder, type KafkaClientConfig, type KafkaClusterName, type LogEntities, LogType, type LogType as LogTypeValues, type LogfireConfig, type LogsOptions, OlapClient, OlapClientManager, type OlapOptions, type OlapSinkConfig, OrderBy, type OrderBy as OrderByValues, OrderDirection, type OrderDirection as OrderDirectionValues, type PlatformAdvancedLog, PlatformDimension, type PlatformDimension as PlatformDimensionValues, type PlatformDimensionsQuery, type PlatformInput, type PlatformLog, type PlatformQuery, type PlatformQueryResult, type PlatformResult, type PolicyContext, type PolicyLog, type PolicyObservation, type PolicyOptions, type PolicyRecord, type PolicyResult, PolicySink, type PolicySinkConfig, type ProviderAdvancedLog, type ProviderInput, type ProviderLog, type ProviderQuery, type ProviderQueryResult, type ProviderResult, type Query, type QueryResult, type SASLMechanism, type Source, type SourceQuery, type SourceResult, SourceType, type SourceType as SourceTypeValue, type StepAdvancedLog, type StepInput, type StepLog, type StepResult, type StepsQuery, type StepsQueryResult, StreamType, type StreamType as StreamTypeValue, type TopicClusterMap, TransportType, type TransportType as TransportTypeValue, type TruncationMode, type UnifiedAdvancedLog, type UnifiedInput, type UnifiedLog, type UnifiedQuery, type UnifiedQueryResult, type UnifiedResult, getPolicySink, hasErrorEntries };
|
|
1195
|
+
export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, type ActionsCountQuery, type ActionsQuery, type ActionsQueryResult, type AdvancedLogMetadata, type AdvancedOptions, type AdvancedPiiScrubber, type AdvancedSinkConfig, type AggregateQuery, type AggregateResult, type AuthPair, AuthType, type AuthType as AuthTypeValue, type ClickHouseConfig, type CombinedLogType, DEFAULT_TOPIC_CLUSTER_MAP, type DatasetsOptions, type DatasetsSinkConfig, type DefenderContext, type DefenderLog, type DefenderOptions, type DefenderSinkConfig, Dimension, type Dimension as DimensionValues, type DimensionsQuery, type DimensionsResult, type FieldLabelProvenance, type ILog, type IOlapClient, type IPolicySink, type InternalKafkaClientBuilder, type InternalKafkaClientConfig, IntervalType, type IntervalType as IntervalTypeValues, InvalidAuthPairError, type KafkaClientBuilder, type KafkaClientConfig, type KafkaClusterName, type LogEntities, LogType, type LogType as LogTypeValues, type LogfireConfig, type LogsOptions, OlapClient, OlapClientManager, type OlapOptions, type OlapSinkConfig, OrderBy, type OrderBy as OrderByValues, OrderDirection, type OrderDirection as OrderDirectionValues, type PlatformAdvancedLog, PlatformDimension, type PlatformDimension as PlatformDimensionValues, type PlatformDimensionsQuery, type PlatformInput, type PlatformLog, type PlatformQuery, type PlatformQueryResult, type PlatformResult, type PolicyContext, type PolicyLog, type PolicyObservation, type PolicyOptions, type PolicyRecord, type PolicyResult, PolicySink, type PolicySinkConfig, type ProviderAdvancedLog, type ProviderInput, type ProviderLog, type ProviderQuery, type ProviderQueryResult, type ProviderResult, type Query, type QueryResult, type SASLMechanism, type Source, type SourceQuery, type SourceResult, SourceType, type SourceType as SourceTypeValue, type StepAdvancedLog, type StepInput, type StepLog, type StepResult, type StepsQuery, type StepsQueryResult, StreamType, type StreamType as StreamTypeValue, type TopicClusterMap, TransportType, type TransportType as TransportTypeValue, type TruncationMode, type UnifiedAdvancedLog, type UnifiedInput, type UnifiedLog, type UnifiedQuery, type UnifiedQueryResult, type UnifiedResult, getPolicySink, hasErrorEntries };
|