@stackone/olap 1.66.1 → 1.67.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
@@ -5,6 +5,9 @@ import { Producer } from "@platformatic/kafka";
5
5
 
6
6
  //#region \0rolldown/runtime.js
7
7
  //#endregion
8
+ //#region src/advanced/truncation.d.ts
9
+ type TruncationMode = 'drop' | 'truncate' | 'complete';
10
+ //#endregion
8
11
  //#region src/olap/olapOptions.d.ts
9
12
  type OlapOptions = {
10
13
  logs?: LogsOptions;
@@ -20,6 +23,7 @@ type AdvancedOptions = {
20
23
  ttl?: number;
21
24
  errorsOnly?: boolean;
22
25
  includeBackground?: boolean;
26
+ truncation?: TruncationMode;
23
27
  };
24
28
  type DefenderOptions = {
25
29
  enabled?: boolean;
@@ -49,48 +53,44 @@ type DefenderLog = {
49
53
  type AdvancedSinkConfig = {
50
54
  bucket?: string;
51
55
  maxItemSizeBytes?: number;
56
+ errorSizeMultiplier?: number;
57
+ };
58
+ type AdvancedLogMetadata = {
59
+ isBackgroundLog?: boolean;
60
+ expirationTime?: number;
61
+ sizeBytes?: number;
62
+ maxSizeBytes?: number;
63
+ truncated?: true;
52
64
  };
53
65
  type ActionAdvancedLog = {
54
66
  data: {
55
67
  [key: string]: unknown;
56
68
  };
57
- metadata?: {
58
- isBackgroundLog?: boolean;
59
- expirationTime?: number;
60
- };
69
+ metadata?: AdvancedLogMetadata;
61
70
  };
62
71
  type StepAdvancedLog = {
63
72
  data: {
64
73
  [key: string]: unknown;
65
74
  };
66
- metadata?: {
67
- expirationTime?: number;
68
- };
75
+ metadata?: AdvancedLogMetadata;
69
76
  };
70
77
  type UnifiedAdvancedLog = {
71
78
  data: {
72
79
  [key: string]: unknown;
73
80
  };
74
- metadata?: {
75
- isBackgroundLog?: boolean;
76
- expirationTime?: number;
77
- };
81
+ metadata?: AdvancedLogMetadata;
78
82
  };
79
83
  type ProviderAdvancedLog = {
80
84
  data: {
81
85
  [key: string]: unknown;
82
86
  };
83
- metadata?: {
84
- expirationTime?: number;
85
- };
87
+ metadata?: AdvancedLogMetadata;
86
88
  };
87
89
  type PlatformAdvancedLog = {
88
90
  data: {
89
91
  [key: string]: unknown;
90
92
  };
91
- metadata?: {
92
- expirationTime?: number;
93
- };
93
+ metadata?: AdvancedLogMetadata;
94
94
  };
95
95
  interface S3ClientConfig {
96
96
  region?: string;
@@ -390,6 +390,7 @@ declare const LogType: {
390
390
  };
391
391
  type LogType = (typeof LogType)[keyof typeof LogType];
392
392
  type OlapEngine = 'tinybird' | 'clickhouse';
393
+ type CombinedLogType = typeof LogType.Action | typeof LogType.Unified | typeof LogType.Platform;
393
394
  type Query = {
394
395
  organizationId?: string | string[];
395
396
  projectSecureId?: string | string[];
@@ -427,7 +428,11 @@ type Query = {
427
428
  streamType?: string | string[];
428
429
  isBackground?: boolean;
429
430
  logId?: string | string[];
430
- logType?: (typeof LogType.Action | typeof LogType.Unified) | (typeof LogType.Action | typeof LogType.Unified)[];
431
+ eventId?: string | string[];
432
+ eventType?: string | string[];
433
+ userId?: string | string[];
434
+ subAction?: string | string[];
435
+ logType?: CombinedLogType | CombinedLogType[];
431
436
  success?: boolean;
432
437
  startTime?: Date;
433
438
  endTime?: Date;
@@ -437,7 +442,7 @@ type Query = {
437
442
  orderDirection?: OrderDirection;
438
443
  };
439
444
  type QueryResult = {
440
- logs: Array<ActionLog | UnifiedLog | StepLog | ProviderLog>;
445
+ logs: Array<ActionLog | UnifiedLog | StepLog | ProviderLog | PlatformLog>;
441
446
  total: number;
442
447
  pageNumber: number;
443
448
  pageSize: number;
@@ -1107,4 +1112,4 @@ declare class OlapClientManager {
1107
1112
  //#region src/utils/stepErrors.d.ts
1108
1113
  declare const hasErrorEntries: (errors: unknown) => boolean;
1109
1114
  //#endregion
1110
- export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, type ActionsQuery, type ActionsQueryResult, type AdvancedOptions, type AdvancedSinkConfig, type AggregateQuery, type AggregateResult, AuthType, type AuthType as AuthTypeValue, ClickHouseClient, type ClickHouseConfig, 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 UnifiedAdvancedLog, type UnifiedInput, type UnifiedLog, type UnifiedQuery, type UnifiedQueryResult, type UnifiedResult, createConfigFromEnv, createOlapQueryClient, hasErrorEntries };
1115
+ 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 };
package/dist/index.d.mts CHANGED
@@ -4,6 +4,9 @@ import { HttpClient } from "@stackone/transport";
4
4
  import { ILogger } from "@stackone/logger";
5
5
  import { Producer } from "@platformatic/kafka";
6
6
 
7
+ //#region src/advanced/truncation.d.ts
8
+ type TruncationMode = 'drop' | 'truncate' | 'complete';
9
+ //#endregion
7
10
  //#region src/olap/olapOptions.d.ts
8
11
  type OlapOptions = {
9
12
  logs?: LogsOptions;
@@ -19,6 +22,7 @@ type AdvancedOptions = {
19
22
  ttl?: number;
20
23
  errorsOnly?: boolean;
21
24
  includeBackground?: boolean;
25
+ truncation?: TruncationMode;
22
26
  };
23
27
  type DefenderOptions = {
24
28
  enabled?: boolean;
@@ -48,48 +52,44 @@ type DefenderLog = {
48
52
  type AdvancedSinkConfig = {
49
53
  bucket?: string;
50
54
  maxItemSizeBytes?: number;
55
+ errorSizeMultiplier?: number;
56
+ };
57
+ type AdvancedLogMetadata = {
58
+ isBackgroundLog?: boolean;
59
+ expirationTime?: number;
60
+ sizeBytes?: number;
61
+ maxSizeBytes?: number;
62
+ truncated?: true;
51
63
  };
52
64
  type ActionAdvancedLog = {
53
65
  data: {
54
66
  [key: string]: unknown;
55
67
  };
56
- metadata?: {
57
- isBackgroundLog?: boolean;
58
- expirationTime?: number;
59
- };
68
+ metadata?: AdvancedLogMetadata;
60
69
  };
61
70
  type StepAdvancedLog = {
62
71
  data: {
63
72
  [key: string]: unknown;
64
73
  };
65
- metadata?: {
66
- expirationTime?: number;
67
- };
74
+ metadata?: AdvancedLogMetadata;
68
75
  };
69
76
  type UnifiedAdvancedLog = {
70
77
  data: {
71
78
  [key: string]: unknown;
72
79
  };
73
- metadata?: {
74
- isBackgroundLog?: boolean;
75
- expirationTime?: number;
76
- };
80
+ metadata?: AdvancedLogMetadata;
77
81
  };
78
82
  type ProviderAdvancedLog = {
79
83
  data: {
80
84
  [key: string]: unknown;
81
85
  };
82
- metadata?: {
83
- expirationTime?: number;
84
- };
86
+ metadata?: AdvancedLogMetadata;
85
87
  };
86
88
  type PlatformAdvancedLog = {
87
89
  data: {
88
90
  [key: string]: unknown;
89
91
  };
90
- metadata?: {
91
- expirationTime?: number;
92
- };
92
+ metadata?: AdvancedLogMetadata;
93
93
  };
94
94
  interface S3ClientConfig {
95
95
  region?: string;
@@ -389,6 +389,7 @@ declare const LogType: {
389
389
  };
390
390
  type LogType = (typeof LogType)[keyof typeof LogType];
391
391
  type OlapEngine = 'tinybird' | 'clickhouse';
392
+ type CombinedLogType = typeof LogType.Action | typeof LogType.Unified | typeof LogType.Platform;
392
393
  type Query = {
393
394
  organizationId?: string | string[];
394
395
  projectSecureId?: string | string[];
@@ -426,7 +427,11 @@ type Query = {
426
427
  streamType?: string | string[];
427
428
  isBackground?: boolean;
428
429
  logId?: string | string[];
429
- logType?: (typeof LogType.Action | typeof LogType.Unified) | (typeof LogType.Action | typeof LogType.Unified)[];
430
+ eventId?: string | string[];
431
+ eventType?: string | string[];
432
+ userId?: string | string[];
433
+ subAction?: string | string[];
434
+ logType?: CombinedLogType | CombinedLogType[];
430
435
  success?: boolean;
431
436
  startTime?: Date;
432
437
  endTime?: Date;
@@ -436,7 +441,7 @@ type Query = {
436
441
  orderDirection?: OrderDirection;
437
442
  };
438
443
  type QueryResult = {
439
- logs: Array<ActionLog | UnifiedLog | StepLog | ProviderLog>;
444
+ logs: Array<ActionLog | UnifiedLog | StepLog | ProviderLog | PlatformLog>;
440
445
  total: number;
441
446
  pageNumber: number;
442
447
  pageSize: number;
@@ -1106,4 +1111,4 @@ declare class OlapClientManager {
1106
1111
  //#region src/utils/stepErrors.d.ts
1107
1112
  declare const hasErrorEntries: (errors: unknown) => boolean;
1108
1113
  //#endregion
1109
- export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, type ActionsQuery, type ActionsQueryResult, type AdvancedOptions, type AdvancedSinkConfig, type AggregateQuery, type AggregateResult, AuthType, type AuthType as AuthTypeValue, ClickHouseClient, type ClickHouseConfig, 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 UnifiedAdvancedLog, type UnifiedInput, type UnifiedLog, type UnifiedQuery, type UnifiedQueryResult, type UnifiedResult, createConfigFromEnv, createOlapQueryClient, hasErrorEntries };
1114
+ 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 };