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