@stackone/olap 1.61.0 → 1.63.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.cjs +67 -16
- package/dist/index.d.cts +72 -4
- package/dist/index.d.mts +72 -4
- package/dist/index.mjs +63 -12
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -157,6 +157,8 @@ interface IOlapClient {
|
|
|
157
157
|
}>, options?: OlapOptions): Promise<void>;
|
|
158
158
|
recordUnified(unifiedInput: UnifiedInput, unifiedResult: UnifiedResult, options?: OlapOptions): Promise<void>;
|
|
159
159
|
recordProvider(providerInput: ProviderInput, providerResult: ProviderResult, options?: OlapOptions): Promise<void>;
|
|
160
|
+
recordPlatform(platformInput: PlatformInput, platformResult: PlatformResult, options?: OlapOptions): Promise<void>;
|
|
161
|
+
recordPlatform(platformLog: PlatformLog, options?: OlapOptions): Promise<void>;
|
|
160
162
|
getLogs(organizationId: string, projectSecureId: string, query: Query, engine?: OlapEngine): Promise<QueryResult>;
|
|
161
163
|
getLastLogs(organizationId: string, projectSecureId: string, entities: LogEntities, query?: Query): Promise<QueryResult>;
|
|
162
164
|
getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery, engine?: OlapEngine): Promise<ActionsQueryResult>;
|
|
@@ -168,6 +170,7 @@ interface IOlapClient {
|
|
|
168
170
|
getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string, engine?: OlapEngine): Promise<UnifiedLog | undefined>;
|
|
169
171
|
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery, engine?: OlapEngine): Promise<ProviderQueryResult>;
|
|
170
172
|
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string, engine?: OlapEngine): Promise<ProviderLog | undefined>;
|
|
173
|
+
getPlatformLogs(organizationId: string, query: PlatformQuery, engine?: OlapEngine): Promise<PlatformQueryResult>;
|
|
171
174
|
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
172
175
|
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
173
176
|
getUnifiedAdvancedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedAdvancedLog | undefined>;
|
|
@@ -339,6 +342,23 @@ type ProviderResult = {
|
|
|
339
342
|
errors?: unknown;
|
|
340
343
|
endTime?: Date;
|
|
341
344
|
};
|
|
345
|
+
type PlatformInput = {
|
|
346
|
+
eventId?: string;
|
|
347
|
+
eventType: string;
|
|
348
|
+
service: string;
|
|
349
|
+
organizationId: string;
|
|
350
|
+
projectSecureId?: string;
|
|
351
|
+
accountSecureId?: string;
|
|
352
|
+
userId?: string;
|
|
353
|
+
action?: string;
|
|
354
|
+
subAction?: string;
|
|
355
|
+
details?: Record<string, unknown>;
|
|
356
|
+
startTime?: Date;
|
|
357
|
+
};
|
|
358
|
+
type PlatformResult = {
|
|
359
|
+
success?: boolean;
|
|
360
|
+
endTime?: Date;
|
|
361
|
+
};
|
|
342
362
|
//#endregion
|
|
343
363
|
//#region src/logs/types.d.ts
|
|
344
364
|
declare const LogType: {
|
|
@@ -346,6 +366,7 @@ declare const LogType: {
|
|
|
346
366
|
readonly Step: "step";
|
|
347
367
|
readonly Unified: "unified";
|
|
348
368
|
readonly Provider: "provider";
|
|
369
|
+
readonly Platform: "platform";
|
|
349
370
|
};
|
|
350
371
|
type LogType = (typeof LogType)[keyof typeof LogType];
|
|
351
372
|
type OlapEngine = 'tinybird' | 'clickhouse';
|
|
@@ -536,6 +557,30 @@ type ProviderQueryResult = {
|
|
|
536
557
|
pageNumber: number;
|
|
537
558
|
pageSize: number;
|
|
538
559
|
};
|
|
560
|
+
type PlatformQuery = {
|
|
561
|
+
organizationId?: string | string[];
|
|
562
|
+
projectSecureId?: string | string[];
|
|
563
|
+
accountSecureId?: string | string[];
|
|
564
|
+
eventId?: string | string[];
|
|
565
|
+
eventType?: string | string[];
|
|
566
|
+
service?: string | string[];
|
|
567
|
+
userId?: string | string[];
|
|
568
|
+
action?: string | string[];
|
|
569
|
+
subAction?: string | string[];
|
|
570
|
+
success?: boolean;
|
|
571
|
+
startTime?: Date;
|
|
572
|
+
endTime?: Date;
|
|
573
|
+
pageNumber?: number;
|
|
574
|
+
pageSize?: number;
|
|
575
|
+
orderBy?: OrderBy;
|
|
576
|
+
orderDirection?: OrderDirection;
|
|
577
|
+
};
|
|
578
|
+
type PlatformQueryResult = {
|
|
579
|
+
platformLogs: PlatformLog[];
|
|
580
|
+
total: number;
|
|
581
|
+
pageNumber: number;
|
|
582
|
+
pageSize: number;
|
|
583
|
+
};
|
|
539
584
|
declare const OrderBy: {
|
|
540
585
|
readonly StartTime: "startTime";
|
|
541
586
|
readonly EndTime: "endTime";
|
|
@@ -620,6 +665,9 @@ interface KafkaClientConfig {
|
|
|
620
665
|
};
|
|
621
666
|
[key: string]: unknown;
|
|
622
667
|
}
|
|
668
|
+
type KafkaClusterName = 'external' | 'internal';
|
|
669
|
+
type TopicClusterMap = Record<string, KafkaClusterName[]>;
|
|
670
|
+
declare const DEFAULT_TOPIC_CLUSTER_MAP: TopicClusterMap;
|
|
623
671
|
type KafkaClientBuilder = (config?: KafkaClientConfig, logger?: ILogger) => Promise<Producer<string, string, string, string> | undefined>;
|
|
624
672
|
interface InternalKafkaClientConfig {
|
|
625
673
|
bootstrapBrokers: string[];
|
|
@@ -815,6 +863,17 @@ type ProviderLog = ILog & {
|
|
|
815
863
|
eventDatetime?: Date;
|
|
816
864
|
duration?: number;
|
|
817
865
|
};
|
|
866
|
+
type PlatformLog = ILog & {
|
|
867
|
+
logType: typeof LogType.Platform;
|
|
868
|
+
eventId: string;
|
|
869
|
+
eventType: string;
|
|
870
|
+
service: string;
|
|
871
|
+
userId?: string;
|
|
872
|
+
action?: string;
|
|
873
|
+
subAction?: string;
|
|
874
|
+
success?: boolean;
|
|
875
|
+
details?: string;
|
|
876
|
+
};
|
|
818
877
|
//#endregion
|
|
819
878
|
//#region src/logs/clickhouseClient.d.ts
|
|
820
879
|
declare class ClickHouseClient implements IQueryClient {
|
|
@@ -878,12 +937,13 @@ declare class OlapClient implements IOlapClient {
|
|
|
878
937
|
kafkaClientConfig,
|
|
879
938
|
externalKafkaClientConfig,
|
|
880
939
|
internalKafkaClientConfig,
|
|
940
|
+
topicClusterMap,
|
|
881
941
|
s3ClientConfig,
|
|
882
942
|
tinybirdConfig,
|
|
883
943
|
clickhouseConfig,
|
|
884
944
|
sinkConfig,
|
|
885
945
|
logger
|
|
886
|
-
}
|
|
946
|
+
}: {
|
|
887
947
|
getKafkaClient?: KafkaClientBuilder;
|
|
888
948
|
getInternalKafkaClient?: InternalKafkaClientBuilder;
|
|
889
949
|
getHttpClient?: HttpClientBuilder;
|
|
@@ -891,6 +951,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
891
951
|
kafkaClientConfig?: KafkaClientConfig;
|
|
892
952
|
externalKafkaClientConfig?: KafkaClientConfig;
|
|
893
953
|
internalKafkaClientConfig?: InternalKafkaClientConfig;
|
|
954
|
+
topicClusterMap: TopicClusterMap;
|
|
894
955
|
s3ClientConfig?: S3ClientConfig;
|
|
895
956
|
tinybirdConfig?: TinybirdConfig;
|
|
896
957
|
clickhouseConfig?: ClickHouseConfig;
|
|
@@ -910,6 +971,8 @@ declare class OlapClient implements IOlapClient {
|
|
|
910
971
|
}>, options?: OlapOptions): Promise<void>;
|
|
911
972
|
recordUnified(unifiedInput: UnifiedInput, unifiedResult: UnifiedResult, options?: OlapOptions): Promise<void>;
|
|
912
973
|
recordProvider(providerInput: ProviderInput, providerResult: ProviderResult, options?: OlapOptions): Promise<void>;
|
|
974
|
+
recordPlatform(platformInput: PlatformInput, platformResult: PlatformResult, options?: OlapOptions): Promise<void>;
|
|
975
|
+
recordPlatform(platformLog: PlatformLog, options?: OlapOptions): Promise<void>;
|
|
913
976
|
getLogs(organizationId: string, projectSecureId: string, query: Query, engine?: OlapEngine): Promise<QueryResult>;
|
|
914
977
|
getLastLogs(organizationId: string, projectSecureId: string, entities: LogEntities, query?: Query): Promise<QueryResult>;
|
|
915
978
|
getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery, engine?: OlapEngine): Promise<ActionsQueryResult>;
|
|
@@ -920,6 +983,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
920
983
|
getUnifiedLogs(organizationId: string, projectSecureId: string, query: UnifiedQuery, engine?: OlapEngine): Promise<UnifiedQueryResult>;
|
|
921
984
|
getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string, engine?: OlapEngine): Promise<UnifiedLog | undefined>;
|
|
922
985
|
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery, engine?: OlapEngine): Promise<ProviderQueryResult>;
|
|
986
|
+
getPlatformLogs(organizationId: string, query: PlatformQuery, engine?: OlapEngine): Promise<PlatformQueryResult>;
|
|
923
987
|
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string, engine?: OlapEngine): Promise<ProviderLog | undefined>;
|
|
924
988
|
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
925
989
|
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
@@ -940,12 +1004,13 @@ declare const buildOlapClientInstance: ({
|
|
|
940
1004
|
kafkaClientConfig,
|
|
941
1005
|
externalKafkaClientConfig,
|
|
942
1006
|
internalKafkaClientConfig,
|
|
1007
|
+
topicClusterMap,
|
|
943
1008
|
s3ClientConfig,
|
|
944
1009
|
tinybirdConfig,
|
|
945
1010
|
clickhouseConfig,
|
|
946
1011
|
sinkConfig,
|
|
947
1012
|
logger
|
|
948
|
-
}
|
|
1013
|
+
}: {
|
|
949
1014
|
getKafkaClient?: KafkaClientBuilder;
|
|
950
1015
|
getInternalKafkaClient?: InternalKafkaClientBuilder;
|
|
951
1016
|
getHttpClient?: HttpClientBuilder;
|
|
@@ -953,6 +1018,7 @@ declare const buildOlapClientInstance: ({
|
|
|
953
1018
|
kafkaClientConfig?: KafkaClientConfig;
|
|
954
1019
|
externalKafkaClientConfig?: KafkaClientConfig;
|
|
955
1020
|
internalKafkaClientConfig?: InternalKafkaClientConfig;
|
|
1021
|
+
topicClusterMap: TopicClusterMap;
|
|
956
1022
|
s3ClientConfig?: S3ClientConfig;
|
|
957
1023
|
tinybirdConfig?: TinybirdConfig;
|
|
958
1024
|
clickhouseConfig?: ClickHouseConfig;
|
|
@@ -969,13 +1035,14 @@ declare class OlapClientManager {
|
|
|
969
1035
|
kafkaClientConfig,
|
|
970
1036
|
externalKafkaClientConfig,
|
|
971
1037
|
internalKafkaClientConfig,
|
|
1038
|
+
topicClusterMap,
|
|
972
1039
|
s3ClientConfig,
|
|
973
1040
|
tinybirdConfig,
|
|
974
1041
|
clickhouseConfig,
|
|
975
1042
|
sinkConfig,
|
|
976
1043
|
logger,
|
|
977
1044
|
getOlapClient
|
|
978
|
-
}
|
|
1045
|
+
}: {
|
|
979
1046
|
getKafkaClient?: KafkaClientBuilder;
|
|
980
1047
|
getInternalKafkaClient?: InternalKafkaClientBuilder;
|
|
981
1048
|
getHttpClient?: HttpClientBuilder;
|
|
@@ -983,6 +1050,7 @@ declare class OlapClientManager {
|
|
|
983
1050
|
kafkaClientConfig?: KafkaClientConfig;
|
|
984
1051
|
externalKafkaClientConfig?: KafkaClientConfig;
|
|
985
1052
|
internalKafkaClientConfig?: InternalKafkaClientConfig;
|
|
1053
|
+
topicClusterMap: TopicClusterMap;
|
|
986
1054
|
s3ClientConfig?: S3ClientConfig;
|
|
987
1055
|
tinybirdConfig?: TinybirdConfig;
|
|
988
1056
|
clickhouseConfig?: ClickHouseConfig;
|
|
@@ -996,4 +1064,4 @@ declare class OlapClientManager {
|
|
|
996
1064
|
//#region src/utils/stepErrors.d.ts
|
|
997
1065
|
declare const hasErrorEntries: (errors: unknown) => boolean;
|
|
998
1066
|
//#endregion
|
|
999
|
-
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, 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 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 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, TransportType, type TransportType as TransportTypeValue, type UnifiedAdvancedLog, type UnifiedInput, type UnifiedLog, type UnifiedQuery, type UnifiedQueryResult, type UnifiedResult, createConfigFromEnv, createOlapQueryClient, hasErrorEntries };
|
|
1067
|
+
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 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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -156,6 +156,8 @@ interface IOlapClient {
|
|
|
156
156
|
}>, options?: OlapOptions): Promise<void>;
|
|
157
157
|
recordUnified(unifiedInput: UnifiedInput, unifiedResult: UnifiedResult, options?: OlapOptions): Promise<void>;
|
|
158
158
|
recordProvider(providerInput: ProviderInput, providerResult: ProviderResult, options?: OlapOptions): Promise<void>;
|
|
159
|
+
recordPlatform(platformInput: PlatformInput, platformResult: PlatformResult, options?: OlapOptions): Promise<void>;
|
|
160
|
+
recordPlatform(platformLog: PlatformLog, options?: OlapOptions): Promise<void>;
|
|
159
161
|
getLogs(organizationId: string, projectSecureId: string, query: Query, engine?: OlapEngine): Promise<QueryResult>;
|
|
160
162
|
getLastLogs(organizationId: string, projectSecureId: string, entities: LogEntities, query?: Query): Promise<QueryResult>;
|
|
161
163
|
getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery, engine?: OlapEngine): Promise<ActionsQueryResult>;
|
|
@@ -167,6 +169,7 @@ interface IOlapClient {
|
|
|
167
169
|
getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string, engine?: OlapEngine): Promise<UnifiedLog | undefined>;
|
|
168
170
|
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery, engine?: OlapEngine): Promise<ProviderQueryResult>;
|
|
169
171
|
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string, engine?: OlapEngine): Promise<ProviderLog | undefined>;
|
|
172
|
+
getPlatformLogs(organizationId: string, query: PlatformQuery, engine?: OlapEngine): Promise<PlatformQueryResult>;
|
|
170
173
|
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
171
174
|
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
172
175
|
getUnifiedAdvancedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedAdvancedLog | undefined>;
|
|
@@ -338,6 +341,23 @@ type ProviderResult = {
|
|
|
338
341
|
errors?: unknown;
|
|
339
342
|
endTime?: Date;
|
|
340
343
|
};
|
|
344
|
+
type PlatformInput = {
|
|
345
|
+
eventId?: string;
|
|
346
|
+
eventType: string;
|
|
347
|
+
service: string;
|
|
348
|
+
organizationId: string;
|
|
349
|
+
projectSecureId?: string;
|
|
350
|
+
accountSecureId?: string;
|
|
351
|
+
userId?: string;
|
|
352
|
+
action?: string;
|
|
353
|
+
subAction?: string;
|
|
354
|
+
details?: Record<string, unknown>;
|
|
355
|
+
startTime?: Date;
|
|
356
|
+
};
|
|
357
|
+
type PlatformResult = {
|
|
358
|
+
success?: boolean;
|
|
359
|
+
endTime?: Date;
|
|
360
|
+
};
|
|
341
361
|
//#endregion
|
|
342
362
|
//#region src/logs/types.d.ts
|
|
343
363
|
declare const LogType: {
|
|
@@ -345,6 +365,7 @@ declare const LogType: {
|
|
|
345
365
|
readonly Step: "step";
|
|
346
366
|
readonly Unified: "unified";
|
|
347
367
|
readonly Provider: "provider";
|
|
368
|
+
readonly Platform: "platform";
|
|
348
369
|
};
|
|
349
370
|
type LogType = (typeof LogType)[keyof typeof LogType];
|
|
350
371
|
type OlapEngine = 'tinybird' | 'clickhouse';
|
|
@@ -535,6 +556,30 @@ type ProviderQueryResult = {
|
|
|
535
556
|
pageNumber: number;
|
|
536
557
|
pageSize: number;
|
|
537
558
|
};
|
|
559
|
+
type PlatformQuery = {
|
|
560
|
+
organizationId?: string | string[];
|
|
561
|
+
projectSecureId?: string | string[];
|
|
562
|
+
accountSecureId?: string | string[];
|
|
563
|
+
eventId?: string | string[];
|
|
564
|
+
eventType?: string | string[];
|
|
565
|
+
service?: string | string[];
|
|
566
|
+
userId?: string | string[];
|
|
567
|
+
action?: string | string[];
|
|
568
|
+
subAction?: string | string[];
|
|
569
|
+
success?: boolean;
|
|
570
|
+
startTime?: Date;
|
|
571
|
+
endTime?: Date;
|
|
572
|
+
pageNumber?: number;
|
|
573
|
+
pageSize?: number;
|
|
574
|
+
orderBy?: OrderBy;
|
|
575
|
+
orderDirection?: OrderDirection;
|
|
576
|
+
};
|
|
577
|
+
type PlatformQueryResult = {
|
|
578
|
+
platformLogs: PlatformLog[];
|
|
579
|
+
total: number;
|
|
580
|
+
pageNumber: number;
|
|
581
|
+
pageSize: number;
|
|
582
|
+
};
|
|
538
583
|
declare const OrderBy: {
|
|
539
584
|
readonly StartTime: "startTime";
|
|
540
585
|
readonly EndTime: "endTime";
|
|
@@ -619,6 +664,9 @@ interface KafkaClientConfig {
|
|
|
619
664
|
};
|
|
620
665
|
[key: string]: unknown;
|
|
621
666
|
}
|
|
667
|
+
type KafkaClusterName = 'external' | 'internal';
|
|
668
|
+
type TopicClusterMap = Record<string, KafkaClusterName[]>;
|
|
669
|
+
declare const DEFAULT_TOPIC_CLUSTER_MAP: TopicClusterMap;
|
|
622
670
|
type KafkaClientBuilder = (config?: KafkaClientConfig, logger?: ILogger) => Promise<Producer<string, string, string, string> | undefined>;
|
|
623
671
|
interface InternalKafkaClientConfig {
|
|
624
672
|
bootstrapBrokers: string[];
|
|
@@ -814,6 +862,17 @@ type ProviderLog = ILog & {
|
|
|
814
862
|
eventDatetime?: Date;
|
|
815
863
|
duration?: number;
|
|
816
864
|
};
|
|
865
|
+
type PlatformLog = ILog & {
|
|
866
|
+
logType: typeof LogType.Platform;
|
|
867
|
+
eventId: string;
|
|
868
|
+
eventType: string;
|
|
869
|
+
service: string;
|
|
870
|
+
userId?: string;
|
|
871
|
+
action?: string;
|
|
872
|
+
subAction?: string;
|
|
873
|
+
success?: boolean;
|
|
874
|
+
details?: string;
|
|
875
|
+
};
|
|
817
876
|
//#endregion
|
|
818
877
|
//#region src/logs/clickhouseClient.d.ts
|
|
819
878
|
declare class ClickHouseClient implements IQueryClient {
|
|
@@ -877,12 +936,13 @@ declare class OlapClient implements IOlapClient {
|
|
|
877
936
|
kafkaClientConfig,
|
|
878
937
|
externalKafkaClientConfig,
|
|
879
938
|
internalKafkaClientConfig,
|
|
939
|
+
topicClusterMap,
|
|
880
940
|
s3ClientConfig,
|
|
881
941
|
tinybirdConfig,
|
|
882
942
|
clickhouseConfig,
|
|
883
943
|
sinkConfig,
|
|
884
944
|
logger
|
|
885
|
-
}
|
|
945
|
+
}: {
|
|
886
946
|
getKafkaClient?: KafkaClientBuilder;
|
|
887
947
|
getInternalKafkaClient?: InternalKafkaClientBuilder;
|
|
888
948
|
getHttpClient?: HttpClientBuilder;
|
|
@@ -890,6 +950,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
890
950
|
kafkaClientConfig?: KafkaClientConfig;
|
|
891
951
|
externalKafkaClientConfig?: KafkaClientConfig;
|
|
892
952
|
internalKafkaClientConfig?: InternalKafkaClientConfig;
|
|
953
|
+
topicClusterMap: TopicClusterMap;
|
|
893
954
|
s3ClientConfig?: S3ClientConfig;
|
|
894
955
|
tinybirdConfig?: TinybirdConfig;
|
|
895
956
|
clickhouseConfig?: ClickHouseConfig;
|
|
@@ -909,6 +970,8 @@ declare class OlapClient implements IOlapClient {
|
|
|
909
970
|
}>, options?: OlapOptions): Promise<void>;
|
|
910
971
|
recordUnified(unifiedInput: UnifiedInput, unifiedResult: UnifiedResult, options?: OlapOptions): Promise<void>;
|
|
911
972
|
recordProvider(providerInput: ProviderInput, providerResult: ProviderResult, options?: OlapOptions): Promise<void>;
|
|
973
|
+
recordPlatform(platformInput: PlatformInput, platformResult: PlatformResult, options?: OlapOptions): Promise<void>;
|
|
974
|
+
recordPlatform(platformLog: PlatformLog, options?: OlapOptions): Promise<void>;
|
|
912
975
|
getLogs(organizationId: string, projectSecureId: string, query: Query, engine?: OlapEngine): Promise<QueryResult>;
|
|
913
976
|
getLastLogs(organizationId: string, projectSecureId: string, entities: LogEntities, query?: Query): Promise<QueryResult>;
|
|
914
977
|
getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery, engine?: OlapEngine): Promise<ActionsQueryResult>;
|
|
@@ -919,6 +982,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
919
982
|
getUnifiedLogs(organizationId: string, projectSecureId: string, query: UnifiedQuery, engine?: OlapEngine): Promise<UnifiedQueryResult>;
|
|
920
983
|
getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string, engine?: OlapEngine): Promise<UnifiedLog | undefined>;
|
|
921
984
|
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery, engine?: OlapEngine): Promise<ProviderQueryResult>;
|
|
985
|
+
getPlatformLogs(organizationId: string, query: PlatformQuery, engine?: OlapEngine): Promise<PlatformQueryResult>;
|
|
922
986
|
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string, engine?: OlapEngine): Promise<ProviderLog | undefined>;
|
|
923
987
|
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
924
988
|
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
@@ -939,12 +1003,13 @@ declare const buildOlapClientInstance: ({
|
|
|
939
1003
|
kafkaClientConfig,
|
|
940
1004
|
externalKafkaClientConfig,
|
|
941
1005
|
internalKafkaClientConfig,
|
|
1006
|
+
topicClusterMap,
|
|
942
1007
|
s3ClientConfig,
|
|
943
1008
|
tinybirdConfig,
|
|
944
1009
|
clickhouseConfig,
|
|
945
1010
|
sinkConfig,
|
|
946
1011
|
logger
|
|
947
|
-
}
|
|
1012
|
+
}: {
|
|
948
1013
|
getKafkaClient?: KafkaClientBuilder;
|
|
949
1014
|
getInternalKafkaClient?: InternalKafkaClientBuilder;
|
|
950
1015
|
getHttpClient?: HttpClientBuilder;
|
|
@@ -952,6 +1017,7 @@ declare const buildOlapClientInstance: ({
|
|
|
952
1017
|
kafkaClientConfig?: KafkaClientConfig;
|
|
953
1018
|
externalKafkaClientConfig?: KafkaClientConfig;
|
|
954
1019
|
internalKafkaClientConfig?: InternalKafkaClientConfig;
|
|
1020
|
+
topicClusterMap: TopicClusterMap;
|
|
955
1021
|
s3ClientConfig?: S3ClientConfig;
|
|
956
1022
|
tinybirdConfig?: TinybirdConfig;
|
|
957
1023
|
clickhouseConfig?: ClickHouseConfig;
|
|
@@ -968,13 +1034,14 @@ declare class OlapClientManager {
|
|
|
968
1034
|
kafkaClientConfig,
|
|
969
1035
|
externalKafkaClientConfig,
|
|
970
1036
|
internalKafkaClientConfig,
|
|
1037
|
+
topicClusterMap,
|
|
971
1038
|
s3ClientConfig,
|
|
972
1039
|
tinybirdConfig,
|
|
973
1040
|
clickhouseConfig,
|
|
974
1041
|
sinkConfig,
|
|
975
1042
|
logger,
|
|
976
1043
|
getOlapClient
|
|
977
|
-
}
|
|
1044
|
+
}: {
|
|
978
1045
|
getKafkaClient?: KafkaClientBuilder;
|
|
979
1046
|
getInternalKafkaClient?: InternalKafkaClientBuilder;
|
|
980
1047
|
getHttpClient?: HttpClientBuilder;
|
|
@@ -982,6 +1049,7 @@ declare class OlapClientManager {
|
|
|
982
1049
|
kafkaClientConfig?: KafkaClientConfig;
|
|
983
1050
|
externalKafkaClientConfig?: KafkaClientConfig;
|
|
984
1051
|
internalKafkaClientConfig?: InternalKafkaClientConfig;
|
|
1052
|
+
topicClusterMap: TopicClusterMap;
|
|
985
1053
|
s3ClientConfig?: S3ClientConfig;
|
|
986
1054
|
tinybirdConfig?: TinybirdConfig;
|
|
987
1055
|
clickhouseConfig?: ClickHouseConfig;
|
|
@@ -995,4 +1063,4 @@ declare class OlapClientManager {
|
|
|
995
1063
|
//#region src/utils/stepErrors.d.ts
|
|
996
1064
|
declare const hasErrorEntries: (errors: unknown) => boolean;
|
|
997
1065
|
//#endregion
|
|
998
|
-
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, 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 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 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, TransportType, type TransportType as TransportTypeValue, type UnifiedAdvancedLog, type UnifiedInput, type UnifiedLog, type UnifiedQuery, type UnifiedQueryResult, type UnifiedResult, createConfigFromEnv, createOlapQueryClient, hasErrorEntries };
|
|
1066
|
+
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 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 };
|