@stackone/olap 1.72.1 → 1.74.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
@@ -1,5 +1,4 @@
1
1
  import { ILogger } from "@stackone/logger";
2
- import { HttpClient } from "@stackone/transport";
3
2
  import { PiiRedaction } from "@stackone/redaction";
4
3
  import { S3Client } from "@aws-sdk/client-s3";
5
4
  import { Producer } from "@platformatic/kafka";
@@ -14,6 +13,7 @@ type OlapOptions = {
14
13
  logs?: LogsOptions;
15
14
  advanced?: AdvancedOptions;
16
15
  defender?: DefenderOptions;
16
+ policy?: PolicyOptions;
17
17
  datasets?: DatasetsOptions;
18
18
  };
19
19
  type LogsOptions = {
@@ -30,6 +30,9 @@ type AdvancedOptions = {
30
30
  type DefenderOptions = {
31
31
  enabled?: boolean;
32
32
  };
33
+ type PolicyOptions = {
34
+ enabled?: boolean;
35
+ };
33
36
  type DatasetsOptions = {
34
37
  enabled?: boolean;
35
38
  schemasDataset?: string;
@@ -37,20 +40,6 @@ type DatasetsOptions = {
37
40
  includeBackground?: boolean;
38
41
  };
39
42
  //#endregion
40
- //#region src/defender/types.d.ts
41
- type DefenderSinkConfig = {
42
- bucket?: string;
43
- ttlDays?: number;
44
- };
45
- type DefenderLog = {
46
- result?: {
47
- riskLevel: string;
48
- tier2Score?: number;
49
- [key: string]: unknown;
50
- };
51
- [key: string]: unknown;
52
- };
53
- //#endregion
54
43
  //#region src/advanced/types.d.ts
55
44
  type AdvancedSinkConfig = {
56
45
  bucket?: string;
@@ -100,6 +89,39 @@ interface S3ClientConfig {
100
89
  }
101
90
  type S3ClientBuilder = (config?: S3ClientConfig, logger?: ILogger) => S3Client | undefined;
102
91
  //#endregion
92
+ //#region src/defender/types.d.ts
93
+ type DefenderSinkConfig = {
94
+ bucket?: string;
95
+ ttlDays?: number;
96
+ };
97
+ type DefenderLog = {
98
+ result?: {
99
+ riskLevel: string;
100
+ tier2Score?: number;
101
+ [key: string]: unknown;
102
+ };
103
+ [key: string]: unknown;
104
+ };
105
+ //#endregion
106
+ //#region src/policy/types.d.ts
107
+ type PolicySinkConfig = {
108
+ bucket?: string;
109
+ ttlDays?: number;
110
+ };
111
+ interface IPolicySink {
112
+ sendAction(input: ActionInput, result: ActionResult, options?: PolicyOptions): Promise<{
113
+ expiresAt: Date;
114
+ } | null>;
115
+ sendActions(actions: Array<{
116
+ input: ActionInput;
117
+ result: ActionResult;
118
+ }>, options?: PolicyOptions): Promise<Array<{
119
+ expiresAt: Date;
120
+ } | null>>;
121
+ getAction(organizationId: string, projectSecureId: string, accountSecureId: string, actionRunId: string): Promise<PolicyLog | undefined>;
122
+ }
123
+ type PolicyLog = PolicyContext;
124
+ //#endregion
103
125
  //#region src/types.d.ts
104
126
  declare const SourceType: {
105
127
  readonly RequestTester: "REQUEST_TESTER";
@@ -171,17 +193,17 @@ interface IOlapClient {
171
193
  recordPlatform(platformInput: PlatformInput, platformResult: PlatformResult, options?: OlapOptions): Promise<void>;
172
194
  recordPlatform(platformLog: PlatformLog, options?: OlapOptions): Promise<void>;
173
195
  recordPlatform(platformLog: PlatformLog, advancedLog: PlatformAdvancedLog, options?: OlapOptions): Promise<void>;
174
- getLogs(organizationId: string, projectSecureId: string, query: Query, engine?: OlapEngine): Promise<QueryResult>;
196
+ getLogs(organizationId: string, projectSecureId: string, query: Query): Promise<QueryResult>;
175
197
  getLastLogs(organizationId: string, projectSecureId: string, entities: LogEntities, query?: Query): Promise<QueryResult>;
176
- getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery, engine?: OlapEngine): Promise<ActionsQueryResult>;
177
- getActionLog(organizationId: string, projectSecureId: string, actionRunId: string, engine?: OlapEngine): Promise<ActionLog | undefined>;
178
- getLog(organizationId: string, projectSecureId: string, logId: string, engine?: OlapEngine): Promise<ActionLog | UnifiedLog | undefined>;
179
- getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery, engine?: OlapEngine): Promise<StepsQueryResult>;
180
- getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number, engine?: OlapEngine): Promise<StepLog | undefined>;
181
- getUnifiedLogs(organizationId: string, projectSecureId: string, query: UnifiedQuery, engine?: OlapEngine): Promise<UnifiedQueryResult>;
182
- getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string, engine?: OlapEngine): Promise<UnifiedLog | undefined>;
183
- getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery, engine?: OlapEngine): Promise<ProviderQueryResult>;
184
- getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string, engine?: OlapEngine): Promise<ProviderLog | undefined>;
198
+ getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
199
+ getActionLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
200
+ getLog(organizationId: string, projectSecureId: string, logId: string): Promise<ActionLog | UnifiedLog | undefined>;
201
+ getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery): Promise<StepsQueryResult>;
202
+ getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepLog | undefined>;
203
+ getUnifiedLogs(organizationId: string, projectSecureId: string, query: UnifiedQuery): Promise<UnifiedQueryResult>;
204
+ getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedLog | undefined>;
205
+ getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
206
+ getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
185
207
  getPlatformLogs(organizationId: string | undefined, query: PlatformQuery): Promise<PlatformQueryResult>;
186
208
  getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
187
209
  getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
@@ -189,10 +211,48 @@ interface IOlapClient {
189
211
  getProviderAdvancedLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderAdvancedLog | undefined>;
190
212
  getPlatformAdvancedLog(organizationId: string, eventId: string): Promise<PlatformAdvancedLog | undefined>;
191
213
  getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
192
- getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery, engine?: OlapEngine): Promise<AggregateResult>;
193
- getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery, engine?: OlapEngine): Promise<DimensionsResult>;
194
- getSourceUsage(organizationId: string, projectSecureId: string, query: SourceQuery, engine?: OlapEngine): Promise<SourceResult>;
214
+ getPolicyLog(organizationId: string, projectSecureId: string, accountSecureId: string, actionRunId: string): Promise<PolicyLog | undefined>;
215
+ getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery): Promise<AggregateResult>;
216
+ getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery): Promise<DimensionsResult>;
217
+ getSourceUsage(organizationId: string, projectSecureId: string, query: SourceQuery): Promise<SourceResult>;
195
218
  }
219
+ type PolicyResult = 'skipped' | 'allowed' | 'partial' | 'monitored' | 'denied' | 'error';
220
+ type PolicyResolution = {
221
+ level: string;
222
+ mode: 'enforce' | 'monitor';
223
+ decision: 'allow' | 'deny';
224
+ determining: string[];
225
+ setId: string;
226
+ faulted?: boolean;
227
+ };
228
+ type PolicyObservation = {
229
+ level: string;
230
+ decision: 'allow' | 'deny';
231
+ policyIds: string[];
232
+ faulted?: boolean;
233
+ };
234
+ type PolicyContext = {
235
+ result: PolicyResult;
236
+ actionRunId: string;
237
+ actionId: string;
238
+ accountSecureId: string;
239
+ principal?: {
240
+ userId: string;
241
+ groups: string[];
242
+ };
243
+ decidedAt: string;
244
+ policyIds: string[];
245
+ names?: Record<string, string>;
246
+ maskedFields?: Array<{
247
+ path: string;
248
+ policyIds: string[];
249
+ level?: string;
250
+ }>;
251
+ resolved?: PolicyResolution[];
252
+ level?: string;
253
+ versions?: Record<string, number>;
254
+ observed?: PolicyObservation[];
255
+ };
196
256
  type DefenderDecision = 'block' | 'allow' | 'count';
197
257
  type DefenderContext = {
198
258
  result?: {
@@ -255,6 +315,7 @@ type ActionResult = {
255
315
  body?: unknown;
256
316
  hasStepErrors?: boolean;
257
317
  defenderContext?: DefenderContext;
318
+ policyContext?: PolicyContext;
258
319
  endTime?: Date;
259
320
  };
260
321
  type StepInput = {
@@ -395,7 +456,6 @@ declare const LogType: {
395
456
  readonly Platform: "platform";
396
457
  };
397
458
  type LogType = (typeof LogType)[keyof typeof LogType];
398
- type OlapEngine = 'tinybird' | 'clickhouse';
399
459
  type CombinedLogType = typeof LogType.Action | typeof LogType.Unified;
400
460
  type Query = {
401
461
  organizationId?: string | string[];
@@ -481,6 +541,8 @@ type ActionsQuery = {
481
541
  transportType?: string | string[];
482
542
  streamType?: string | string[];
483
543
  statusCode?: string | string[];
544
+ policyResult?: string | string[];
545
+ riskLevel?: string | string[];
484
546
  isBackground?: boolean;
485
547
  success?: boolean;
486
548
  startTime?: Date;
@@ -659,6 +721,8 @@ declare const Dimension: {
659
721
  readonly AuthType: "authType";
660
722
  readonly AuthId: "authId";
661
723
  readonly IsBackground: "isBackground";
724
+ readonly PolicyResult: "policyResult";
725
+ readonly RiskLevel: "riskLevel";
662
726
  };
663
727
  type Dimension = (typeof Dimension)[keyof typeof Dimension];
664
728
  type AggregateQuery = Partial<Query> & {
@@ -690,7 +754,6 @@ type SourceResult = Array<{
690
754
  requestCount: number;
691
755
  lastRequest: string;
692
756
  }>;
693
- type HttpClientBuilder = (logger?: ILogger) => HttpClient | undefined;
694
757
  type SASLMechanism = 'PLAIN' | 'SCRAM-SHA-256' | 'SCRAM-SHA-512' | 'OAUTHBEARER';
695
758
  interface KafkaClientConfig {
696
759
  bootstrapBrokers: string[];
@@ -719,11 +782,6 @@ interface InternalKafkaClientConfig {
719
782
  [key: string]: unknown;
720
783
  }
721
784
  type InternalKafkaClientBuilder = (config?: InternalKafkaClientConfig, logger?: ILogger) => Promise<Producer<string, string, string, string> | undefined>;
722
- interface TinybirdConfig {
723
- baseUrl: string;
724
- token: string;
725
- allowHttp?: boolean;
726
- }
727
785
  interface ClickHouseConfig {
728
786
  url: string;
729
787
  username?: string;
@@ -807,6 +865,7 @@ type ActionLog = ILog & {
807
865
  isBackground?: boolean;
808
866
  success?: boolean;
809
867
  statusCode?: number;
868
+ policyResult?: string;
810
869
  riskLevel?: string;
811
870
  allowed?: boolean;
812
871
  tier2Decision?: string;
@@ -952,13 +1011,10 @@ declare class ClickHouseClient implements IQueryClient {
952
1011
  }
953
1012
  //#endregion
954
1013
  //#region src/logs/clientFactory.d.ts
955
- type OlapQueryClientType = 'tinybird' | 'clickhouse';
956
1014
  interface OlapQueryClientConfig {
957
- type?: OlapQueryClientType;
958
- tinybird?: TinybirdConfig;
959
1015
  clickhouse?: ClickHouseConfig;
960
1016
  }
961
- declare function createOlapQueryClient(config: OlapQueryClientConfig, httpClient?: HttpClient, logger?: ILogger): IQueryClient;
1017
+ declare function createOlapQueryClient(config: OlapQueryClientConfig, logger?: ILogger): IQueryClient;
962
1018
  declare function createConfigFromEnv(): OlapQueryClientConfig;
963
1019
  //#endregion
964
1020
  //#region src/datasets/types.d.ts
@@ -978,6 +1034,7 @@ type DatasetsSinkConfig = {
978
1034
  type OlapSinkConfig = {
979
1035
  advanced?: AdvancedSinkConfig;
980
1036
  defender?: DefenderSinkConfig;
1037
+ policy?: PolicySinkConfig;
981
1038
  datasets?: DatasetsSinkConfig;
982
1039
  };
983
1040
  //#endregion
@@ -989,28 +1046,24 @@ declare class OlapClient implements IOlapClient {
989
1046
  static create({
990
1047
  getKafkaClient,
991
1048
  getInternalKafkaClient,
992
- getHttpClient,
993
1049
  getS3Client,
994
1050
  kafkaClientConfig,
995
1051
  externalKafkaClientConfig,
996
1052
  internalKafkaClientConfig,
997
1053
  topicClusterMap,
998
1054
  s3ClientConfig,
999
- tinybirdConfig,
1000
1055
  clickhouseConfig,
1001
1056
  sinkConfig,
1002
1057
  logger
1003
1058
  }: {
1004
1059
  getKafkaClient?: KafkaClientBuilder;
1005
1060
  getInternalKafkaClient?: InternalKafkaClientBuilder;
1006
- getHttpClient?: HttpClientBuilder;
1007
1061
  getS3Client?: S3ClientBuilder;
1008
1062
  kafkaClientConfig?: KafkaClientConfig;
1009
1063
  externalKafkaClientConfig?: KafkaClientConfig;
1010
1064
  internalKafkaClientConfig?: InternalKafkaClientConfig;
1011
1065
  topicClusterMap: TopicClusterMap;
1012
1066
  s3ClientConfig?: S3ClientConfig;
1013
- tinybirdConfig?: TinybirdConfig;
1014
1067
  clickhouseConfig?: ClickHouseConfig;
1015
1068
  sinkConfig?: OlapSinkConfig;
1016
1069
  logger?: ILogger;
@@ -1031,55 +1084,52 @@ declare class OlapClient implements IOlapClient {
1031
1084
  recordPlatform(platformInput: PlatformInput, platformResult: PlatformResult, options?: OlapOptions): Promise<void>;
1032
1085
  recordPlatform(platformLog: PlatformLog, options?: OlapOptions): Promise<void>;
1033
1086
  recordPlatform(platformLog: PlatformLog, advancedLog: PlatformAdvancedLog, options?: OlapOptions): Promise<void>;
1034
- getLogs(organizationId: string, projectSecureId: string, query: Query, engine?: OlapEngine): Promise<QueryResult>;
1087
+ getLogs(organizationId: string, projectSecureId: string, query: Query): Promise<QueryResult>;
1035
1088
  getLastLogs(organizationId: string, projectSecureId: string, entities: LogEntities, query?: Query): Promise<QueryResult>;
1036
- getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery, engine?: OlapEngine): Promise<ActionsQueryResult>;
1037
- getActionLog(organizationId: string, projectSecureId: string, actionRunId: string, engine?: OlapEngine): Promise<ActionLog | undefined>;
1038
- getLog(organizationId: string, projectSecureId: string, logId: string, engine?: OlapEngine): Promise<ActionLog | UnifiedLog | undefined>;
1039
- getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery, engine?: OlapEngine): Promise<StepsQueryResult>;
1040
- getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number, engine?: OlapEngine): Promise<StepLog | undefined>;
1041
- getUnifiedLogs(organizationId: string, projectSecureId: string, query: UnifiedQuery, engine?: OlapEngine): Promise<UnifiedQueryResult>;
1042
- getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string, engine?: OlapEngine): Promise<UnifiedLog | undefined>;
1043
- getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery, engine?: OlapEngine): Promise<ProviderQueryResult>;
1089
+ getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
1090
+ getActionLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
1091
+ getLog(organizationId: string, projectSecureId: string, logId: string): Promise<ActionLog | UnifiedLog | undefined>;
1092
+ getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery): Promise<StepsQueryResult>;
1093
+ getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepLog | undefined>;
1094
+ getUnifiedLogs(organizationId: string, projectSecureId: string, query: UnifiedQuery): Promise<UnifiedQueryResult>;
1095
+ getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedLog | undefined>;
1096
+ getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
1044
1097
  getPlatformLogs(organizationId: string | undefined, query: PlatformQuery): Promise<PlatformQueryResult>;
1045
- getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string, engine?: OlapEngine): Promise<ProviderLog | undefined>;
1098
+ getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
1046
1099
  getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
1047
1100
  getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
1048
1101
  getUnifiedAdvancedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedAdvancedLog | undefined>;
1049
1102
  getProviderAdvancedLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderAdvancedLog | undefined>;
1050
1103
  getPlatformAdvancedLog(organizationId: string, eventId: string): Promise<PlatformAdvancedLog | undefined>;
1104
+ getPolicyLog(organizationId: string, projectSecureId: string, accountSecureId: string, actionRunId: string): Promise<PolicyContext | undefined>;
1051
1105
  getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
1052
- getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery, engine?: OlapEngine): Promise<AggregateResult>;
1053
- getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery, engine?: OlapEngine): Promise<DimensionsResult>;
1054
- getSourceUsage(organizationId: string, projectSecureId: string, query: SourceQuery, engine?: OlapEngine): Promise<SourceResult>;
1106
+ getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery): Promise<AggregateResult>;
1107
+ getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery): Promise<DimensionsResult>;
1108
+ getSourceUsage(organizationId: string, projectSecureId: string, query: SourceQuery): Promise<SourceResult>;
1055
1109
  }
1056
1110
  //#endregion
1057
1111
  //#region src/olap/olapClientManager.d.ts
1058
1112
  declare const buildOlapClientInstance: ({
1059
1113
  getKafkaClient,
1060
1114
  getInternalKafkaClient,
1061
- getHttpClient,
1062
1115
  getS3Client,
1063
1116
  kafkaClientConfig,
1064
1117
  externalKafkaClientConfig,
1065
1118
  internalKafkaClientConfig,
1066
1119
  topicClusterMap,
1067
1120
  s3ClientConfig,
1068
- tinybirdConfig,
1069
1121
  clickhouseConfig,
1070
1122
  sinkConfig,
1071
1123
  logger
1072
1124
  }: {
1073
1125
  getKafkaClient?: KafkaClientBuilder;
1074
1126
  getInternalKafkaClient?: InternalKafkaClientBuilder;
1075
- getHttpClient?: HttpClientBuilder;
1076
1127
  getS3Client?: S3ClientBuilder;
1077
1128
  kafkaClientConfig?: KafkaClientConfig;
1078
1129
  externalKafkaClientConfig?: KafkaClientConfig;
1079
1130
  internalKafkaClientConfig?: InternalKafkaClientConfig;
1080
1131
  topicClusterMap: TopicClusterMap;
1081
1132
  s3ClientConfig?: S3ClientConfig;
1082
- tinybirdConfig?: TinybirdConfig;
1083
1133
  clickhouseConfig?: ClickHouseConfig;
1084
1134
  sinkConfig?: OlapSinkConfig;
1085
1135
  logger?: ILogger;
@@ -1089,14 +1139,12 @@ declare class OlapClientManager {
1089
1139
  static getInstance({
1090
1140
  getKafkaClient,
1091
1141
  getInternalKafkaClient,
1092
- getHttpClient,
1093
1142
  getS3Client,
1094
1143
  kafkaClientConfig,
1095
1144
  externalKafkaClientConfig,
1096
1145
  internalKafkaClientConfig,
1097
1146
  topicClusterMap,
1098
1147
  s3ClientConfig,
1099
- tinybirdConfig,
1100
1148
  clickhouseConfig,
1101
1149
  sinkConfig,
1102
1150
  logger,
@@ -1104,14 +1152,12 @@ declare class OlapClientManager {
1104
1152
  }: {
1105
1153
  getKafkaClient?: KafkaClientBuilder;
1106
1154
  getInternalKafkaClient?: InternalKafkaClientBuilder;
1107
- getHttpClient?: HttpClientBuilder;
1108
1155
  getS3Client?: S3ClientBuilder;
1109
1156
  kafkaClientConfig?: KafkaClientConfig;
1110
1157
  externalKafkaClientConfig?: KafkaClientConfig;
1111
1158
  internalKafkaClientConfig?: InternalKafkaClientConfig;
1112
1159
  topicClusterMap: TopicClusterMap;
1113
1160
  s3ClientConfig?: S3ClientConfig;
1114
- tinybirdConfig?: TinybirdConfig;
1115
1161
  clickhouseConfig?: ClickHouseConfig;
1116
1162
  sinkConfig?: OlapSinkConfig;
1117
1163
  logger?: ILogger;
@@ -1120,7 +1166,29 @@ declare class OlapClientManager {
1120
1166
  static resetInstance(): void;
1121
1167
  }
1122
1168
  //#endregion
1169
+ //#region src/policy/policySink.d.ts
1170
+ declare function getPolicySink(s3Client?: S3Client, config?: PolicySinkConfig, logger?: ILogger): IPolicySink;
1171
+ declare class PolicySink implements IPolicySink {
1172
+ #private;
1173
+ constructor(s3Client?: S3Client, config?: PolicySinkConfig, logger?: ILogger);
1174
+ private requireBucket;
1175
+ initialize(): Promise<void>;
1176
+ sendAction(input: ActionInput, result: ActionResult, options?: PolicyOptions): Promise<{
1177
+ expiresAt: Date;
1178
+ } | null>;
1179
+ sendActions(actions: Array<{
1180
+ input: ActionInput;
1181
+ result: ActionResult;
1182
+ }>, options?: PolicyOptions): Promise<Array<{
1183
+ expiresAt: Date;
1184
+ } | null>>;
1185
+ getAction(organizationId: string, projectSecureId: string, accountSecureId: string, actionRunId: string): Promise<PolicyLog | undefined>;
1186
+ private send;
1187
+ private generateS3Key;
1188
+ private createPolicyS3;
1189
+ }
1190
+ //#endregion
1123
1191
  //#region src/utils/stepErrors.d.ts
1124
1192
  declare const hasErrorEntries: (errors: unknown) => boolean;
1125
1193
  //#endregion
1126
- 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 IQueryClient, type IQueryClient as ITinybirdClient, 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 OlapEngine, type OlapOptions, type OlapQueryClientConfig, type OlapQueryClientType, 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 ProviderAdvancedLog, type ProviderInput, type ProviderLog, type ProviderQuery, type ProviderQueryResult, type ProviderResult, type Query, type QueryOptions, type QueryOptions as TinybirdQueryOptions, type QueryResponse, type QueryResponse as TinybirdResponse, 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 TinybirdConfig, type TopicClusterMap, TransportType, type TransportType as TransportTypeValue, type TruncationMode, type UnifiedAdvancedLog, type UnifiedInput, type UnifiedLog, type UnifiedQuery, type UnifiedQueryResult, type UnifiedResult, createConfigFromEnv, createOlapQueryClient, hasErrorEntries };
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 };