@stackone/olap 1.74.1 → 1.76.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/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>;
@@ -222,9 +223,18 @@ type PolicyResolution = {
222
223
  mode: 'enforce' | 'monitor';
223
224
  decision: 'allow' | 'deny';
224
225
  determining: string[];
226
+ checked?: readonly string[];
225
227
  setId: string;
226
228
  faulted?: boolean;
227
229
  };
230
+ type PolicyRecord = {
231
+ id: string;
232
+ name?: string;
233
+ version?: number;
234
+ level: string;
235
+ mode: 'enforce' | 'monitor';
236
+ effect?: 'refused' | 'masked' | 'would-have-refused' | 'permitted';
237
+ };
228
238
  type PolicyObservation = {
229
239
  level: string;
230
240
  decision: 'allow' | 'deny';
@@ -242,7 +252,7 @@ type PolicyContext = {
242
252
  };
243
253
  decidedAt: string;
244
254
  policyIds: string[];
245
- names?: Record<string, string>;
255
+ policies?: PolicyRecord[];
246
256
  maskedFields?: Array<{
247
257
  path: string;
248
258
  policyIds: string[];
@@ -250,7 +260,6 @@ type PolicyContext = {
250
260
  }>;
251
261
  resolved?: PolicyResolution[];
252
262
  level?: string;
253
- versions?: Record<string, number>;
254
263
  observed?: PolicyObservation[];
255
264
  };
256
265
  type DefenderDecision = 'block' | 'allow' | 'count';
@@ -747,6 +756,27 @@ type DimensionsResult = {
747
756
  count: number;
748
757
  }>;
749
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
+ };
750
780
  type SourceQuery = Partial<Query>;
751
781
  type SourceResult = Array<{
752
782
  sourceId: string;
@@ -1095,6 +1125,7 @@ declare class OlapClient implements IOlapClient {
1095
1125
  getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedLog | undefined>;
1096
1126
  getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
1097
1127
  getPlatformLogs(organizationId: string | undefined, query: PlatformQuery): Promise<PlatformQueryResult>;
1128
+ getPlatformLogDimensions(organizationId: string | undefined, query: PlatformDimensionsQuery): Promise<DimensionsResult>;
1098
1129
  getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
1099
1130
  getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
1100
1131
  getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
@@ -1191,4 +1222,4 @@ declare class PolicySink implements IPolicySink {
1191
1222
  //#region src/utils/stepErrors.d.ts
1192
1223
  declare const hasErrorEntries: (errors: unknown) => boolean;
1193
1224
  //#endregion
1194
- 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 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 };
1225
+ 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>;
@@ -221,9 +222,18 @@ type PolicyResolution = {
221
222
  mode: 'enforce' | 'monitor';
222
223
  decision: 'allow' | 'deny';
223
224
  determining: string[];
225
+ checked?: readonly string[];
224
226
  setId: string;
225
227
  faulted?: boolean;
226
228
  };
229
+ type PolicyRecord = {
230
+ id: string;
231
+ name?: string;
232
+ version?: number;
233
+ level: string;
234
+ mode: 'enforce' | 'monitor';
235
+ effect?: 'refused' | 'masked' | 'would-have-refused' | 'permitted';
236
+ };
227
237
  type PolicyObservation = {
228
238
  level: string;
229
239
  decision: 'allow' | 'deny';
@@ -241,7 +251,7 @@ type PolicyContext = {
241
251
  };
242
252
  decidedAt: string;
243
253
  policyIds: string[];
244
- names?: Record<string, string>;
254
+ policies?: PolicyRecord[];
245
255
  maskedFields?: Array<{
246
256
  path: string;
247
257
  policyIds: string[];
@@ -249,7 +259,6 @@ type PolicyContext = {
249
259
  }>;
250
260
  resolved?: PolicyResolution[];
251
261
  level?: string;
252
- versions?: Record<string, number>;
253
262
  observed?: PolicyObservation[];
254
263
  };
255
264
  type DefenderDecision = 'block' | 'allow' | 'count';
@@ -746,6 +755,27 @@ type DimensionsResult = {
746
755
  count: number;
747
756
  }>;
748
757
  };
758
+ declare const PlatformDimension: {
759
+ readonly EventType: "eventType";
760
+ readonly Action: "action";
761
+ readonly Resource: "resource";
762
+ readonly Service: "service";
763
+ readonly SourceType: "sourceType";
764
+ readonly SourceId: "sourceId";
765
+ readonly AuthType: "authType";
766
+ readonly UserEmail: "userEmail";
767
+ readonly StatusCode: "statusCode";
768
+ readonly Success: "success";
769
+ readonly IsRead: "isRead";
770
+ readonly AgentId: "agentId";
771
+ readonly TransportType: "transportType";
772
+ readonly StreamType: "streamType";
773
+ };
774
+ type PlatformDimension = (typeof PlatformDimension)[keyof typeof PlatformDimension];
775
+ type PlatformDimensionsQuery = Partial<PlatformQuery> & {
776
+ dimensions: PlatformDimension[];
777
+ maxValues?: number;
778
+ };
749
779
  type SourceQuery = Partial<Query>;
750
780
  type SourceResult = Array<{
751
781
  sourceId: string;
@@ -1094,6 +1124,7 @@ declare class OlapClient implements IOlapClient {
1094
1124
  getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedLog | undefined>;
1095
1125
  getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
1096
1126
  getPlatformLogs(organizationId: string | undefined, query: PlatformQuery): Promise<PlatformQueryResult>;
1127
+ getPlatformLogDimensions(organizationId: string | undefined, query: PlatformDimensionsQuery): Promise<DimensionsResult>;
1097
1128
  getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
1098
1129
  getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
1099
1130
  getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
@@ -1190,4 +1221,4 @@ declare class PolicySink implements IPolicySink {
1190
1221
  //#region src/utils/stepErrors.d.ts
1191
1222
  declare const hasErrorEntries: (errors: unknown) => boolean;
1192
1223
  //#endregion
1193
- 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 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 };
1224
+ 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 };