@stackone/olap 1.75.0 → 1.77.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 +11 -1
- package/dist/index.cjs +35 -10
- package/dist/index.d.cts +30 -1
- package/dist/index.d.mts +30 -1
- package/dist/index.mjs +31 -6
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -205,6 +205,7 @@ interface IOlapClient {
|
|
|
205
205
|
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
|
|
206
206
|
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
|
|
207
207
|
getPlatformLogs(organizationId: string | undefined, query: PlatformQuery): Promise<PlatformQueryResult>;
|
|
208
|
+
getPlatformLogDimensions(organizationId: string | undefined, query: PlatformDimensionsQuery): Promise<DimensionsResult>;
|
|
208
209
|
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
209
210
|
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
210
211
|
getUnifiedAdvancedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedAdvancedLog | undefined>;
|
|
@@ -215,6 +216,7 @@ interface IOlapClient {
|
|
|
215
216
|
getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery): Promise<AggregateResult>;
|
|
216
217
|
getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery): Promise<DimensionsResult>;
|
|
217
218
|
getSourceUsage(organizationId: string, projectSecureId: string, query: SourceQuery): Promise<SourceResult>;
|
|
219
|
+
close?(timeoutMs?: number): Promise<void>;
|
|
218
220
|
}
|
|
219
221
|
type PolicyResult = 'skipped' | 'allowed' | 'partial' | 'monitored' | 'denied' | 'error';
|
|
220
222
|
type PolicyResolution = {
|
|
@@ -755,6 +757,27 @@ type DimensionsResult = {
|
|
|
755
757
|
count: number;
|
|
756
758
|
}>;
|
|
757
759
|
};
|
|
760
|
+
declare const PlatformDimension: {
|
|
761
|
+
readonly EventType: "eventType";
|
|
762
|
+
readonly Action: "action";
|
|
763
|
+
readonly Resource: "resource";
|
|
764
|
+
readonly Service: "service";
|
|
765
|
+
readonly SourceType: "sourceType";
|
|
766
|
+
readonly SourceId: "sourceId";
|
|
767
|
+
readonly AuthType: "authType";
|
|
768
|
+
readonly UserEmail: "userEmail";
|
|
769
|
+
readonly StatusCode: "statusCode";
|
|
770
|
+
readonly Success: "success";
|
|
771
|
+
readonly IsRead: "isRead";
|
|
772
|
+
readonly AgentId: "agentId";
|
|
773
|
+
readonly TransportType: "transportType";
|
|
774
|
+
readonly StreamType: "streamType";
|
|
775
|
+
};
|
|
776
|
+
type PlatformDimension = (typeof PlatformDimension)[keyof typeof PlatformDimension];
|
|
777
|
+
type PlatformDimensionsQuery = Partial<PlatformQuery> & {
|
|
778
|
+
dimensions: PlatformDimension[];
|
|
779
|
+
maxValues?: number;
|
|
780
|
+
};
|
|
758
781
|
type SourceQuery = Partial<Query>;
|
|
759
782
|
type SourceResult = Array<{
|
|
760
783
|
sourceId: string;
|
|
@@ -831,6 +854,7 @@ interface IQueryClient {
|
|
|
831
854
|
}>;
|
|
832
855
|
queryRaw<TParams = Record<string, unknown>, TResult = unknown>(options: QueryOptions<TParams, TResult>): Promise<QueryResponse<TResult[]>>;
|
|
833
856
|
isReady(): boolean;
|
|
857
|
+
close?(): Promise<void>;
|
|
834
858
|
}
|
|
835
859
|
interface ILog {
|
|
836
860
|
logType: LogType;
|
|
@@ -1077,6 +1101,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
1077
1101
|
logger?: ILogger;
|
|
1078
1102
|
}): Promise<OlapClient>;
|
|
1079
1103
|
private initialize;
|
|
1104
|
+
close(timeoutMs?: number): Promise<void>;
|
|
1080
1105
|
recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): Promise<void>;
|
|
1081
1106
|
recordActions(actions: Array<{
|
|
1082
1107
|
input: ActionInput;
|
|
@@ -1103,6 +1128,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
1103
1128
|
getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedLog | undefined>;
|
|
1104
1129
|
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
|
|
1105
1130
|
getPlatformLogs(organizationId: string | undefined, query: PlatformQuery): Promise<PlatformQueryResult>;
|
|
1131
|
+
getPlatformLogDimensions(organizationId: string | undefined, query: PlatformDimensionsQuery): Promise<DimensionsResult>;
|
|
1106
1132
|
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
|
|
1107
1133
|
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
1108
1134
|
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
@@ -1144,6 +1170,7 @@ declare const buildOlapClientInstance: ({
|
|
|
1144
1170
|
}) => Promise<IOlapClient>;
|
|
1145
1171
|
declare class OlapClientManager {
|
|
1146
1172
|
private static olapClientPromise;
|
|
1173
|
+
private static closingPromise;
|
|
1147
1174
|
static getInstance({
|
|
1148
1175
|
getKafkaClient,
|
|
1149
1176
|
getInternalKafkaClient,
|
|
@@ -1172,6 +1199,8 @@ declare class OlapClientManager {
|
|
|
1172
1199
|
getOlapClient?: typeof buildOlapClientInstance;
|
|
1173
1200
|
}): Promise<IOlapClient>;
|
|
1174
1201
|
static resetInstance(): void;
|
|
1202
|
+
static close(timeoutMs?: number): Promise<void>;
|
|
1203
|
+
private static drain;
|
|
1175
1204
|
}
|
|
1176
1205
|
//#endregion
|
|
1177
1206
|
//#region src/policy/policySink.d.ts
|
|
@@ -1199,4 +1228,4 @@ declare class PolicySink implements IPolicySink {
|
|
|
1199
1228
|
//#region src/utils/stepErrors.d.ts
|
|
1200
1229
|
declare const hasErrorEntries: (errors: unknown) => boolean;
|
|
1201
1230
|
//#endregion
|
|
1202
|
-
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, ClickHouseClient, 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 ILog, type IOlapClient, type IPolicySink, type IQueryClient, 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 OlapQueryClientConfig, type OlapSinkConfig, OrderBy, type OrderBy as OrderByValues, OrderDirection, type OrderDirection as OrderDirectionValues, type PlatformAdvancedLog, 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 QueryOptions, type QueryResponse, 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, createConfigFromEnv, createOlapQueryClient, getPolicySink, hasErrorEntries };
|
|
1231
|
+
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, ClickHouseClient, 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 ILog, type IOlapClient, type IPolicySink, type IQueryClient, 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 OlapQueryClientConfig, 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 QueryOptions, type QueryResponse, 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, createConfigFromEnv, createOlapQueryClient, getPolicySink, hasErrorEntries };
|
package/dist/index.d.mts
CHANGED
|
@@ -204,6 +204,7 @@ interface IOlapClient {
|
|
|
204
204
|
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
|
|
205
205
|
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
|
|
206
206
|
getPlatformLogs(organizationId: string | undefined, query: PlatformQuery): Promise<PlatformQueryResult>;
|
|
207
|
+
getPlatformLogDimensions(organizationId: string | undefined, query: PlatformDimensionsQuery): Promise<DimensionsResult>;
|
|
207
208
|
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
208
209
|
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
209
210
|
getUnifiedAdvancedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedAdvancedLog | undefined>;
|
|
@@ -214,6 +215,7 @@ interface IOlapClient {
|
|
|
214
215
|
getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery): Promise<AggregateResult>;
|
|
215
216
|
getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery): Promise<DimensionsResult>;
|
|
216
217
|
getSourceUsage(organizationId: string, projectSecureId: string, query: SourceQuery): Promise<SourceResult>;
|
|
218
|
+
close?(timeoutMs?: number): Promise<void>;
|
|
217
219
|
}
|
|
218
220
|
type PolicyResult = 'skipped' | 'allowed' | 'partial' | 'monitored' | 'denied' | 'error';
|
|
219
221
|
type PolicyResolution = {
|
|
@@ -754,6 +756,27 @@ type DimensionsResult = {
|
|
|
754
756
|
count: number;
|
|
755
757
|
}>;
|
|
756
758
|
};
|
|
759
|
+
declare const PlatformDimension: {
|
|
760
|
+
readonly EventType: "eventType";
|
|
761
|
+
readonly Action: "action";
|
|
762
|
+
readonly Resource: "resource";
|
|
763
|
+
readonly Service: "service";
|
|
764
|
+
readonly SourceType: "sourceType";
|
|
765
|
+
readonly SourceId: "sourceId";
|
|
766
|
+
readonly AuthType: "authType";
|
|
767
|
+
readonly UserEmail: "userEmail";
|
|
768
|
+
readonly StatusCode: "statusCode";
|
|
769
|
+
readonly Success: "success";
|
|
770
|
+
readonly IsRead: "isRead";
|
|
771
|
+
readonly AgentId: "agentId";
|
|
772
|
+
readonly TransportType: "transportType";
|
|
773
|
+
readonly StreamType: "streamType";
|
|
774
|
+
};
|
|
775
|
+
type PlatformDimension = (typeof PlatformDimension)[keyof typeof PlatformDimension];
|
|
776
|
+
type PlatformDimensionsQuery = Partial<PlatformQuery> & {
|
|
777
|
+
dimensions: PlatformDimension[];
|
|
778
|
+
maxValues?: number;
|
|
779
|
+
};
|
|
757
780
|
type SourceQuery = Partial<Query>;
|
|
758
781
|
type SourceResult = Array<{
|
|
759
782
|
sourceId: string;
|
|
@@ -830,6 +853,7 @@ interface IQueryClient {
|
|
|
830
853
|
}>;
|
|
831
854
|
queryRaw<TParams = Record<string, unknown>, TResult = unknown>(options: QueryOptions<TParams, TResult>): Promise<QueryResponse<TResult[]>>;
|
|
832
855
|
isReady(): boolean;
|
|
856
|
+
close?(): Promise<void>;
|
|
833
857
|
}
|
|
834
858
|
interface ILog {
|
|
835
859
|
logType: LogType;
|
|
@@ -1076,6 +1100,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
1076
1100
|
logger?: ILogger;
|
|
1077
1101
|
}): Promise<OlapClient>;
|
|
1078
1102
|
private initialize;
|
|
1103
|
+
close(timeoutMs?: number): Promise<void>;
|
|
1079
1104
|
recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): Promise<void>;
|
|
1080
1105
|
recordActions(actions: Array<{
|
|
1081
1106
|
input: ActionInput;
|
|
@@ -1102,6 +1127,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
1102
1127
|
getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedLog | undefined>;
|
|
1103
1128
|
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
|
|
1104
1129
|
getPlatformLogs(organizationId: string | undefined, query: PlatformQuery): Promise<PlatformQueryResult>;
|
|
1130
|
+
getPlatformLogDimensions(organizationId: string | undefined, query: PlatformDimensionsQuery): Promise<DimensionsResult>;
|
|
1105
1131
|
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
|
|
1106
1132
|
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
1107
1133
|
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
@@ -1143,6 +1169,7 @@ declare const buildOlapClientInstance: ({
|
|
|
1143
1169
|
}) => Promise<IOlapClient>;
|
|
1144
1170
|
declare class OlapClientManager {
|
|
1145
1171
|
private static olapClientPromise;
|
|
1172
|
+
private static closingPromise;
|
|
1146
1173
|
static getInstance({
|
|
1147
1174
|
getKafkaClient,
|
|
1148
1175
|
getInternalKafkaClient,
|
|
@@ -1171,6 +1198,8 @@ declare class OlapClientManager {
|
|
|
1171
1198
|
getOlapClient?: typeof buildOlapClientInstance;
|
|
1172
1199
|
}): Promise<IOlapClient>;
|
|
1173
1200
|
static resetInstance(): void;
|
|
1201
|
+
static close(timeoutMs?: number): Promise<void>;
|
|
1202
|
+
private static drain;
|
|
1174
1203
|
}
|
|
1175
1204
|
//#endregion
|
|
1176
1205
|
//#region src/policy/policySink.d.ts
|
|
@@ -1198,4 +1227,4 @@ declare class PolicySink implements IPolicySink {
|
|
|
1198
1227
|
//#region src/utils/stepErrors.d.ts
|
|
1199
1228
|
declare const hasErrorEntries: (errors: unknown) => boolean;
|
|
1200
1229
|
//#endregion
|
|
1201
|
-
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, ClickHouseClient, 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 ILog, type IOlapClient, type IPolicySink, type IQueryClient, 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 OlapQueryClientConfig, type OlapSinkConfig, OrderBy, type OrderBy as OrderByValues, OrderDirection, type OrderDirection as OrderDirectionValues, type PlatformAdvancedLog, 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 QueryOptions, type QueryResponse, 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, createConfigFromEnv, createOlapQueryClient, getPolicySink, hasErrorEntries };
|
|
1230
|
+
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, ClickHouseClient, 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 ILog, type IOlapClient, type IPolicySink, type IQueryClient, 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 OlapQueryClientConfig, 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 QueryOptions, type QueryResponse, 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, createConfigFromEnv, createOlapQueryClient, getPolicySink, hasErrorEntries };
|