@stackone/olap 2.3.0 → 3.0.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 +8 -0
- package/dist/index.cjs +31 -21
- package/dist/index.d.cts +13 -3
- package/dist/index.d.mts +13 -3
- package/dist/index.mjs +38 -28
- 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;
|
|
@@ -212,6 +215,7 @@ interface IOlapClient {
|
|
|
212
215
|
getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery): Promise<AggregateResult>;
|
|
213
216
|
getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery): Promise<DimensionsResult>;
|
|
214
217
|
getSourceUsage(organizationId: string, projectSecureId: string, query: SourceQuery): Promise<SourceResult>;
|
|
218
|
+
getActionsCount(query: ActionsCountQuery): Promise<number>;
|
|
215
219
|
close?(timeoutMs?: number): Promise<void>;
|
|
216
220
|
}
|
|
217
221
|
type PolicyResult = 'skipped' | 'allowed' | 'partial' | 'monitored' | 'denied' | 'error';
|
|
@@ -793,6 +797,11 @@ type PlatformDimensionsQuery = Partial<PlatformQuery> & {
|
|
|
793
797
|
maxValues?: number;
|
|
794
798
|
};
|
|
795
799
|
type SourceQuery = Partial<Query>;
|
|
800
|
+
type ActionsCountQuery = {
|
|
801
|
+
organizationId?: string;
|
|
802
|
+
startTime: Date;
|
|
803
|
+
endTime: Date;
|
|
804
|
+
};
|
|
796
805
|
type SourceResult = Array<{
|
|
797
806
|
sourceId: string;
|
|
798
807
|
sourceType: string;
|
|
@@ -1090,6 +1099,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
1090
1099
|
getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery): Promise<AggregateResult>;
|
|
1091
1100
|
getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery): Promise<DimensionsResult>;
|
|
1092
1101
|
getSourceUsage(organizationId: string, projectSecureId: string, query: SourceQuery): Promise<SourceResult>;
|
|
1102
|
+
getActionsCount(query: ActionsCountQuery): Promise<number>;
|
|
1093
1103
|
}
|
|
1094
1104
|
//#endregion
|
|
1095
1105
|
//#region src/olap/olapClientManager.d.ts
|
|
@@ -1171,4 +1181,4 @@ declare class PolicySink implements IPolicySink {
|
|
|
1171
1181
|
//#region src/utils/stepErrors.d.ts
|
|
1172
1182
|
declare const hasErrorEntries: (errors: unknown) => boolean;
|
|
1173
1183
|
//#endregion
|
|
1174
|
-
export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, 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 };
|
|
1184
|
+
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, 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 };
|
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;
|
|
@@ -211,6 +214,7 @@ interface IOlapClient {
|
|
|
211
214
|
getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery): Promise<AggregateResult>;
|
|
212
215
|
getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery): Promise<DimensionsResult>;
|
|
213
216
|
getSourceUsage(organizationId: string, projectSecureId: string, query: SourceQuery): Promise<SourceResult>;
|
|
217
|
+
getActionsCount(query: ActionsCountQuery): Promise<number>;
|
|
214
218
|
close?(timeoutMs?: number): Promise<void>;
|
|
215
219
|
}
|
|
216
220
|
type PolicyResult = 'skipped' | 'allowed' | 'partial' | 'monitored' | 'denied' | 'error';
|
|
@@ -792,6 +796,11 @@ type PlatformDimensionsQuery = Partial<PlatformQuery> & {
|
|
|
792
796
|
maxValues?: number;
|
|
793
797
|
};
|
|
794
798
|
type SourceQuery = Partial<Query>;
|
|
799
|
+
type ActionsCountQuery = {
|
|
800
|
+
organizationId?: string;
|
|
801
|
+
startTime: Date;
|
|
802
|
+
endTime: Date;
|
|
803
|
+
};
|
|
795
804
|
type SourceResult = Array<{
|
|
796
805
|
sourceId: string;
|
|
797
806
|
sourceType: string;
|
|
@@ -1089,6 +1098,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
1089
1098
|
getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery): Promise<AggregateResult>;
|
|
1090
1099
|
getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery): Promise<DimensionsResult>;
|
|
1091
1100
|
getSourceUsage(organizationId: string, projectSecureId: string, query: SourceQuery): Promise<SourceResult>;
|
|
1101
|
+
getActionsCount(query: ActionsCountQuery): Promise<number>;
|
|
1092
1102
|
}
|
|
1093
1103
|
//#endregion
|
|
1094
1104
|
//#region src/olap/olapClientManager.d.ts
|
|
@@ -1170,4 +1180,4 @@ declare class PolicySink implements IPolicySink {
|
|
|
1170
1180
|
//#region src/utils/stepErrors.d.ts
|
|
1171
1181
|
declare const hasErrorEntries: (errors: unknown) => boolean;
|
|
1172
1182
|
//#endregion
|
|
1173
|
-
export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, 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 };
|
|
1183
|
+
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, 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 };
|