@stackone/olap 1.26.0 → 1.27.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 +1 -1
- package/dist/index.d.cts +297 -234
- package/dist/index.d.mts +296 -233
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { S3Client } from "@aws-sdk/client-s3";
|
|
2
1
|
import * as redis from "redis";
|
|
3
2
|
import { AxiosInstance } from "axios";
|
|
4
3
|
import http from "node:http";
|
|
5
4
|
import https from "node:https";
|
|
6
5
|
import { Readable } from "node:stream";
|
|
6
|
+
import { S3Client } from "@aws-sdk/client-s3";
|
|
7
7
|
import { Producer } from "@platformatic/kafka";
|
|
8
8
|
|
|
9
9
|
//#region rolldown:runtime
|
|
@@ -71,32 +71,6 @@ type LogError = Error & {
|
|
|
71
71
|
url?: string;
|
|
72
72
|
};
|
|
73
73
|
//#endregion
|
|
74
|
-
//#region src/olap/olapOptions.d.ts
|
|
75
|
-
type OlapOptions = {
|
|
76
|
-
logs?: LogsOptions;
|
|
77
|
-
advanced?: AdvancedOptions;
|
|
78
|
-
defender?: DefenderOptions;
|
|
79
|
-
};
|
|
80
|
-
type LogsOptions = {
|
|
81
|
-
enabled?: boolean;
|
|
82
|
-
};
|
|
83
|
-
type AdvancedOptions = {
|
|
84
|
-
enabled?: boolean;
|
|
85
|
-
ttl?: number;
|
|
86
|
-
errorsOnly?: boolean;
|
|
87
|
-
includeBackground?: boolean;
|
|
88
|
-
};
|
|
89
|
-
type DefenderOptions = {
|
|
90
|
-
enabled?: boolean;
|
|
91
|
-
};
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/defender/types.d.ts
|
|
94
|
-
type DefenderLog = {
|
|
95
|
-
riskLevel: string;
|
|
96
|
-
tier2Score: number;
|
|
97
|
-
[key: string]: unknown;
|
|
98
|
-
};
|
|
99
|
-
//#endregion
|
|
100
74
|
//#region ../transport/src/cacheClient/types.d.ts
|
|
101
75
|
interface ICacheClient<ClientType = unknown> {
|
|
102
76
|
isAvailable(): boolean;
|
|
@@ -489,7 +463,242 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
489
463
|
}): Promise<StreamHttpResponse>;
|
|
490
464
|
}
|
|
491
465
|
//#endregion
|
|
466
|
+
//#region src/olap/olapOptions.d.ts
|
|
467
|
+
type OlapOptions = {
|
|
468
|
+
logs?: LogsOptions;
|
|
469
|
+
advanced?: AdvancedOptions;
|
|
470
|
+
defender?: DefenderOptions;
|
|
471
|
+
};
|
|
472
|
+
type LogsOptions = {
|
|
473
|
+
enabled?: boolean;
|
|
474
|
+
};
|
|
475
|
+
type AdvancedOptions = {
|
|
476
|
+
enabled?: boolean;
|
|
477
|
+
ttl?: number;
|
|
478
|
+
errorsOnly?: boolean;
|
|
479
|
+
includeBackground?: boolean;
|
|
480
|
+
};
|
|
481
|
+
type DefenderOptions = {
|
|
482
|
+
enabled?: boolean;
|
|
483
|
+
};
|
|
484
|
+
//#endregion
|
|
485
|
+
//#region src/advanced/types.d.ts
|
|
486
|
+
type ActionAdvancedLog = {
|
|
487
|
+
data: {
|
|
488
|
+
[key: string]: unknown;
|
|
489
|
+
};
|
|
490
|
+
metadata?: {
|
|
491
|
+
isBackgroundLog?: boolean;
|
|
492
|
+
expirationTime?: number;
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
type StepAdvancedLog = {
|
|
496
|
+
data: {
|
|
497
|
+
[key: string]: unknown;
|
|
498
|
+
};
|
|
499
|
+
metadata?: {
|
|
500
|
+
expirationTime?: number;
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
type UnifiedAdvancedLog = {
|
|
504
|
+
data: {
|
|
505
|
+
[key: string]: unknown;
|
|
506
|
+
};
|
|
507
|
+
metadata?: {
|
|
508
|
+
isBackgroundLog?: boolean;
|
|
509
|
+
expirationTime?: number;
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
type ProviderAdvancedLog = {
|
|
513
|
+
data: {
|
|
514
|
+
[key: string]: unknown;
|
|
515
|
+
};
|
|
516
|
+
metadata?: {
|
|
517
|
+
expirationTime?: number;
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
interface S3ClientConfig {
|
|
521
|
+
region?: string;
|
|
522
|
+
}
|
|
523
|
+
type S3ClientBuilder = (config?: S3ClientConfig, logger?: ILogger) => S3Client | undefined;
|
|
524
|
+
//#endregion
|
|
525
|
+
//#region src/defender/types.d.ts
|
|
526
|
+
type DefenderLog = {
|
|
527
|
+
riskLevel: string;
|
|
528
|
+
tier2Score: number;
|
|
529
|
+
[key: string]: unknown;
|
|
530
|
+
};
|
|
531
|
+
//#endregion
|
|
532
|
+
//#region src/types.d.ts
|
|
533
|
+
interface IOlapClient {
|
|
534
|
+
recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): Promise<void>;
|
|
535
|
+
recordActions(actions: Array<{
|
|
536
|
+
input: ActionInput;
|
|
537
|
+
result: ActionResult;
|
|
538
|
+
}>, options?: OlapOptions): Promise<void>;
|
|
539
|
+
recordStep(stepInput: StepInput, stepResult: StepResult, options?: OlapOptions): Promise<void>;
|
|
540
|
+
recordSteps(steps: Array<{
|
|
541
|
+
input: StepInput;
|
|
542
|
+
result: StepResult;
|
|
543
|
+
}>, options?: OlapOptions): Promise<void>;
|
|
544
|
+
recordUnified(unifiedInput: UnifiedInput, unifiedResult: UnifiedResult, options?: OlapOptions): Promise<void>;
|
|
545
|
+
recordProvider(providerInput: ProviderInput, providerResult: ProviderResult, options?: OlapOptions): Promise<void>;
|
|
546
|
+
getLogs(organizationId: string, projectSecureId: string, query: Query): Promise<QueryResult>;
|
|
547
|
+
getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
|
|
548
|
+
getActionLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
|
|
549
|
+
getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery): Promise<StepsQueryResult>;
|
|
550
|
+
getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepLog | undefined>;
|
|
551
|
+
getUnifiedLogs(organizationId: string, projectSecureId: string, query: UnifiedQuery): Promise<UnifiedQueryResult>;
|
|
552
|
+
getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedLog | undefined>;
|
|
553
|
+
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
|
|
554
|
+
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
|
|
555
|
+
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
556
|
+
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
557
|
+
getUnifiedAdvancedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedAdvancedLog | undefined>;
|
|
558
|
+
getProviderAdvancedLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderAdvancedLog | undefined>;
|
|
559
|
+
getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
|
|
560
|
+
getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery): Promise<AggregateResult>;
|
|
561
|
+
getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery): Promise<DimensionsResult>;
|
|
562
|
+
}
|
|
563
|
+
type DefenderContext = {
|
|
564
|
+
riskLevel: string;
|
|
565
|
+
tier2Score: number;
|
|
566
|
+
[key: string]: unknown;
|
|
567
|
+
};
|
|
568
|
+
type ActionInput = {
|
|
569
|
+
actionId?: string;
|
|
570
|
+
mode?: string;
|
|
571
|
+
url?: string;
|
|
572
|
+
pathParams?: unknown;
|
|
573
|
+
queryParams?: unknown;
|
|
574
|
+
body?: unknown;
|
|
575
|
+
headers?: Record<string, string>;
|
|
576
|
+
sourceId?: string;
|
|
577
|
+
sourceType?: string;
|
|
578
|
+
sourceValue?: string;
|
|
579
|
+
isBackground?: boolean;
|
|
580
|
+
startTime?: Date;
|
|
581
|
+
};
|
|
582
|
+
type ActionResult = {
|
|
583
|
+
actionRunId: string;
|
|
584
|
+
actionId: string;
|
|
585
|
+
connectorKey: string;
|
|
586
|
+
connectorVersion: string;
|
|
587
|
+
actionType: string;
|
|
588
|
+
category?: string;
|
|
589
|
+
organizationId: string;
|
|
590
|
+
projectSecureId: string;
|
|
591
|
+
accountSecureId: string;
|
|
592
|
+
originOwnerId?: string;
|
|
593
|
+
originOwnerName?: string;
|
|
594
|
+
httpMethod?: string;
|
|
595
|
+
url?: string;
|
|
596
|
+
path?: string;
|
|
597
|
+
resource?: string;
|
|
598
|
+
subResource?: string;
|
|
599
|
+
childResource?: string;
|
|
600
|
+
success?: boolean;
|
|
601
|
+
statusCode?: number;
|
|
602
|
+
message?: string;
|
|
603
|
+
headers?: Record<string, string>;
|
|
604
|
+
body?: unknown;
|
|
605
|
+
defenderContext?: DefenderContext;
|
|
606
|
+
endTime?: Date;
|
|
607
|
+
};
|
|
608
|
+
type StepInput = {
|
|
609
|
+
actionRunId: string;
|
|
610
|
+
stepIndex: number;
|
|
611
|
+
stepId: string;
|
|
612
|
+
organizationId: string;
|
|
613
|
+
projectSecureId: string;
|
|
614
|
+
accountSecureId: string;
|
|
615
|
+
inputs?: {
|
|
616
|
+
[key: string]: unknown;
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
type StepResult = {
|
|
620
|
+
success?: boolean;
|
|
621
|
+
message?: string;
|
|
622
|
+
outputs?: unknown;
|
|
623
|
+
errors?: unknown;
|
|
624
|
+
skipped?: boolean;
|
|
625
|
+
startTime?: Date;
|
|
626
|
+
endTime?: Date;
|
|
627
|
+
};
|
|
628
|
+
type UnifiedInput = {
|
|
629
|
+
requestId: string;
|
|
630
|
+
organizationId: string;
|
|
631
|
+
projectSecureId: string;
|
|
632
|
+
accountSecureId: string;
|
|
633
|
+
originOwnerId?: string;
|
|
634
|
+
originOwnerName?: string;
|
|
635
|
+
connectorKey: string;
|
|
636
|
+
action?: string;
|
|
637
|
+
service?: string;
|
|
638
|
+
mode?: string;
|
|
639
|
+
httpMethod?: string;
|
|
640
|
+
url?: string;
|
|
641
|
+
path?: string;
|
|
642
|
+
queryParams?: unknown;
|
|
643
|
+
body?: unknown;
|
|
644
|
+
headers?: Record<string, string>;
|
|
645
|
+
resource?: string;
|
|
646
|
+
subResource?: string;
|
|
647
|
+
childResource?: string;
|
|
648
|
+
sourceId?: string;
|
|
649
|
+
sourceType?: string;
|
|
650
|
+
sourceValue?: string;
|
|
651
|
+
isBackground?: boolean;
|
|
652
|
+
startTime?: Date;
|
|
653
|
+
};
|
|
654
|
+
type UnifiedResult = {
|
|
655
|
+
success?: boolean;
|
|
656
|
+
statusCode?: number;
|
|
657
|
+
message?: string;
|
|
658
|
+
headers?: Record<string, string>;
|
|
659
|
+
body?: unknown;
|
|
660
|
+
endTime?: Date;
|
|
661
|
+
};
|
|
662
|
+
type ProviderInput = {
|
|
663
|
+
requestId: string;
|
|
664
|
+
id: string;
|
|
665
|
+
organizationId: string;
|
|
666
|
+
projectSecureId: string;
|
|
667
|
+
accountSecureId: string;
|
|
668
|
+
originOwnerId?: string;
|
|
669
|
+
originOwnerName?: string;
|
|
670
|
+
connectorKey: string;
|
|
671
|
+
action: string;
|
|
672
|
+
service: string;
|
|
673
|
+
mode: string;
|
|
674
|
+
httpMethod: string;
|
|
675
|
+
url: string;
|
|
676
|
+
path?: string;
|
|
677
|
+
queryParams?: unknown;
|
|
678
|
+
headers?: Record<string, string>;
|
|
679
|
+
body?: unknown;
|
|
680
|
+
resource?: string;
|
|
681
|
+
subResource?: string;
|
|
682
|
+
childResource?: string;
|
|
683
|
+
startTime?: Date;
|
|
684
|
+
};
|
|
685
|
+
type ProviderResult = {
|
|
686
|
+
success?: boolean;
|
|
687
|
+
statusCode?: number;
|
|
688
|
+
headers?: Record<string, string>;
|
|
689
|
+
body?: unknown;
|
|
690
|
+
errors?: unknown;
|
|
691
|
+
endTime?: Date;
|
|
692
|
+
};
|
|
693
|
+
//#endregion
|
|
492
694
|
//#region src/logs/types.d.ts
|
|
695
|
+
declare const LogType: {
|
|
696
|
+
readonly Action: "action";
|
|
697
|
+
readonly Step: "step";
|
|
698
|
+
readonly Unified: "unified";
|
|
699
|
+
readonly Provider: "provider";
|
|
700
|
+
};
|
|
701
|
+
type LogType = (typeof LogType)[keyof typeof LogType];
|
|
493
702
|
type Query = {
|
|
494
703
|
organizationId?: string | string[];
|
|
495
704
|
projectSecureId?: string | string[];
|
|
@@ -499,7 +708,20 @@ type Query = {
|
|
|
499
708
|
connectorKey?: string | string[];
|
|
500
709
|
mode?: string | string[];
|
|
501
710
|
category?: string | string[];
|
|
502
|
-
|
|
711
|
+
requestId?: string | string[];
|
|
712
|
+
provider?: string | string[];
|
|
713
|
+
service?: string | string[];
|
|
714
|
+
resource?: string | string[];
|
|
715
|
+
subResource?: string | string[];
|
|
716
|
+
childResource?: string | string[];
|
|
717
|
+
action?: string | string[];
|
|
718
|
+
statusCode?: string | string[];
|
|
719
|
+
sourceId?: string | string[];
|
|
720
|
+
sourceType?: string | string[];
|
|
721
|
+
sourceValue?: string | string[];
|
|
722
|
+
originOwnerId?: string | string[];
|
|
723
|
+
httpMethod?: string | string[];
|
|
724
|
+
logType?: (typeof LogType.Action | typeof LogType.Unified) | (typeof LogType.Action | typeof LogType.Unified)[];
|
|
503
725
|
success?: boolean;
|
|
504
726
|
startTime?: Date;
|
|
505
727
|
endTime?: Date;
|
|
@@ -592,6 +814,45 @@ type ProviderQueryResult = {
|
|
|
592
814
|
pageNumber: number;
|
|
593
815
|
pageSize: number;
|
|
594
816
|
};
|
|
817
|
+
type IntervalType = 'minute' | 'hour' | 'day' | 'week' | 'month';
|
|
818
|
+
declare const Dimension: {
|
|
819
|
+
readonly ConnectorKey: "connector_key";
|
|
820
|
+
readonly Success: "success";
|
|
821
|
+
readonly ActionType: "action_type";
|
|
822
|
+
readonly Mode: "mode";
|
|
823
|
+
readonly Service: "service";
|
|
824
|
+
readonly Resource: "resource";
|
|
825
|
+
readonly ActionId: "action_id";
|
|
826
|
+
readonly HttpMethod: "http_method";
|
|
827
|
+
readonly AccountSecureId: "account_secure_id";
|
|
828
|
+
readonly SourceType: "source_type";
|
|
829
|
+
readonly StatusCode: "status_code";
|
|
830
|
+
readonly OriginOwnerId: "origin_owner_id";
|
|
831
|
+
readonly SourceId: "source_id";
|
|
832
|
+
};
|
|
833
|
+
type Dimension = (typeof Dimension)[keyof typeof Dimension];
|
|
834
|
+
type AggregateQuery = Partial<Query> & {
|
|
835
|
+
dimensions?: Dimension[];
|
|
836
|
+
intervalType?: IntervalType;
|
|
837
|
+
intervalPeriod?: number;
|
|
838
|
+
};
|
|
839
|
+
type AggregateResult = {
|
|
840
|
+
data: Array<{
|
|
841
|
+
start_time?: string;
|
|
842
|
+
count: number;
|
|
843
|
+
[dimension: string]: string | number | boolean | undefined;
|
|
844
|
+
}>;
|
|
845
|
+
};
|
|
846
|
+
type DimensionsQuery = Partial<Query> & {
|
|
847
|
+
dimensions: Dimension[];
|
|
848
|
+
maxValues?: number;
|
|
849
|
+
};
|
|
850
|
+
type DimensionsResult = {
|
|
851
|
+
[dimension: string]: Array<{
|
|
852
|
+
value: string;
|
|
853
|
+
count: number;
|
|
854
|
+
}>;
|
|
855
|
+
};
|
|
595
856
|
type HttpClientBuilder = (logger?: ILogger) => HttpClient | undefined;
|
|
596
857
|
type SASLMechanism = 'PLAIN' | 'SCRAM-SHA-256' | 'SCRAM-SHA-512';
|
|
597
858
|
interface KafkaClientConfig {
|
|
@@ -637,7 +898,7 @@ interface TinybirdQueryOptions<TParams = Record<string, unknown>, TResult = unkn
|
|
|
637
898
|
};
|
|
638
899
|
}
|
|
639
900
|
interface ILog {
|
|
640
|
-
logType:
|
|
901
|
+
logType: LogType;
|
|
641
902
|
eventTime: Date;
|
|
642
903
|
startTime: Date;
|
|
643
904
|
endTime?: Date;
|
|
@@ -647,7 +908,7 @@ interface ILog {
|
|
|
647
908
|
accountSecureId?: string;
|
|
648
909
|
}
|
|
649
910
|
type ActionLog = ILog & {
|
|
650
|
-
logType:
|
|
911
|
+
logType: typeof LogType.Action;
|
|
651
912
|
actionRunId: string;
|
|
652
913
|
actionId: string;
|
|
653
914
|
connectorKey: string;
|
|
@@ -672,7 +933,7 @@ type ActionLog = ILog & {
|
|
|
672
933
|
tier2Score?: number;
|
|
673
934
|
};
|
|
674
935
|
type StepLog = ILog & {
|
|
675
|
-
logType:
|
|
936
|
+
logType: typeof LogType.Step;
|
|
676
937
|
actionRunId: string;
|
|
677
938
|
stepIndex: number;
|
|
678
939
|
stepId: string;
|
|
@@ -684,7 +945,7 @@ type StepLog = ILog & {
|
|
|
684
945
|
message?: string;
|
|
685
946
|
};
|
|
686
947
|
type UnifiedLog = ILog & {
|
|
687
|
-
logType:
|
|
948
|
+
logType: typeof LogType.Unified;
|
|
688
949
|
requestId: string;
|
|
689
950
|
organizationId: string;
|
|
690
951
|
projectSecureId: string;
|
|
@@ -714,7 +975,7 @@ type UnifiedLog = ILog & {
|
|
|
714
975
|
duration?: number;
|
|
715
976
|
};
|
|
716
977
|
type ProviderLog = ILog & {
|
|
717
|
-
logType:
|
|
978
|
+
logType: typeof LogType.Provider;
|
|
718
979
|
requestId: string;
|
|
719
980
|
id?: string;
|
|
720
981
|
organizationId: string;
|
|
@@ -741,206 +1002,6 @@ type ProviderLog = ILog & {
|
|
|
741
1002
|
duration?: number;
|
|
742
1003
|
};
|
|
743
1004
|
//#endregion
|
|
744
|
-
//#region src/types.d.ts
|
|
745
|
-
interface IOlapClient {
|
|
746
|
-
recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): Promise<void>;
|
|
747
|
-
recordActions(actions: Array<{
|
|
748
|
-
input: ActionInput;
|
|
749
|
-
result: ActionResult;
|
|
750
|
-
}>, options?: OlapOptions): Promise<void>;
|
|
751
|
-
recordStep(stepInput: StepInput, stepResult: StepResult, options?: OlapOptions): Promise<void>;
|
|
752
|
-
recordSteps(steps: Array<{
|
|
753
|
-
input: StepInput;
|
|
754
|
-
result: StepResult;
|
|
755
|
-
}>, options?: OlapOptions): Promise<void>;
|
|
756
|
-
recordUnified(unifiedInput: UnifiedInput, unifiedResult: UnifiedResult, options?: OlapOptions): Promise<void>;
|
|
757
|
-
recordProvider(providerInput: ProviderInput, providerResult: ProviderResult, options?: OlapOptions): Promise<void>;
|
|
758
|
-
getLogs(organizationId: string, projectSecureId: string, query: Query): Promise<QueryResult>;
|
|
759
|
-
getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
|
|
760
|
-
getActionLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
|
|
761
|
-
getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery): Promise<StepsQueryResult>;
|
|
762
|
-
getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepLog | undefined>;
|
|
763
|
-
getUnifiedLogs(organizationId: string, projectSecureId: string, query: UnifiedQuery): Promise<UnifiedQueryResult>;
|
|
764
|
-
getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedLog | undefined>;
|
|
765
|
-
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
|
|
766
|
-
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
|
|
767
|
-
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
768
|
-
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
769
|
-
getUnifiedAdvancedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedAdvancedLog | undefined>;
|
|
770
|
-
getProviderAdvancedLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderAdvancedLog | undefined>;
|
|
771
|
-
getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
|
|
772
|
-
}
|
|
773
|
-
type DefenderContext = {
|
|
774
|
-
riskLevel: string;
|
|
775
|
-
tier2Score: number;
|
|
776
|
-
[key: string]: unknown;
|
|
777
|
-
};
|
|
778
|
-
type ActionInput = {
|
|
779
|
-
actionId?: string;
|
|
780
|
-
mode?: string;
|
|
781
|
-
url?: string;
|
|
782
|
-
pathParams?: unknown;
|
|
783
|
-
queryParams?: unknown;
|
|
784
|
-
body?: unknown;
|
|
785
|
-
headers?: Record<string, string>;
|
|
786
|
-
sourceId?: string;
|
|
787
|
-
sourceType?: string;
|
|
788
|
-
sourceValue?: string;
|
|
789
|
-
isBackground?: boolean;
|
|
790
|
-
startTime?: Date;
|
|
791
|
-
};
|
|
792
|
-
type ActionResult = {
|
|
793
|
-
actionRunId: string;
|
|
794
|
-
actionId: string;
|
|
795
|
-
connectorKey: string;
|
|
796
|
-
connectorVersion: string;
|
|
797
|
-
actionType: string;
|
|
798
|
-
category?: string;
|
|
799
|
-
organizationId: string;
|
|
800
|
-
projectSecureId: string;
|
|
801
|
-
accountSecureId: string;
|
|
802
|
-
originOwnerId?: string;
|
|
803
|
-
originOwnerName?: string;
|
|
804
|
-
httpMethod?: string;
|
|
805
|
-
url?: string;
|
|
806
|
-
path?: string;
|
|
807
|
-
resource?: string;
|
|
808
|
-
subResource?: string;
|
|
809
|
-
childResource?: string;
|
|
810
|
-
success?: boolean;
|
|
811
|
-
statusCode?: number;
|
|
812
|
-
message?: string;
|
|
813
|
-
headers?: Record<string, string>;
|
|
814
|
-
body?: unknown;
|
|
815
|
-
defenderContext?: DefenderContext;
|
|
816
|
-
endTime?: Date;
|
|
817
|
-
};
|
|
818
|
-
type StepInput = {
|
|
819
|
-
actionRunId: string;
|
|
820
|
-
stepIndex: number;
|
|
821
|
-
stepId: string;
|
|
822
|
-
organizationId: string;
|
|
823
|
-
projectSecureId: string;
|
|
824
|
-
accountSecureId: string;
|
|
825
|
-
inputs?: {
|
|
826
|
-
[key: string]: unknown;
|
|
827
|
-
};
|
|
828
|
-
};
|
|
829
|
-
type StepResult = {
|
|
830
|
-
success?: boolean;
|
|
831
|
-
message?: string;
|
|
832
|
-
outputs?: unknown;
|
|
833
|
-
errors?: unknown;
|
|
834
|
-
skipped?: boolean;
|
|
835
|
-
startTime?: Date;
|
|
836
|
-
endTime?: Date;
|
|
837
|
-
};
|
|
838
|
-
type UnifiedInput = {
|
|
839
|
-
requestId: string;
|
|
840
|
-
organizationId: string;
|
|
841
|
-
projectSecureId: string;
|
|
842
|
-
accountSecureId: string;
|
|
843
|
-
originOwnerId?: string;
|
|
844
|
-
originOwnerName?: string;
|
|
845
|
-
connectorKey: string;
|
|
846
|
-
action?: string;
|
|
847
|
-
service?: string;
|
|
848
|
-
mode?: string;
|
|
849
|
-
httpMethod?: string;
|
|
850
|
-
url?: string;
|
|
851
|
-
path?: string;
|
|
852
|
-
queryParams?: unknown;
|
|
853
|
-
body?: unknown;
|
|
854
|
-
headers?: Record<string, string>;
|
|
855
|
-
resource?: string;
|
|
856
|
-
subResource?: string;
|
|
857
|
-
childResource?: string;
|
|
858
|
-
sourceId?: string;
|
|
859
|
-
sourceType?: string;
|
|
860
|
-
sourceValue?: string;
|
|
861
|
-
isBackground?: boolean;
|
|
862
|
-
startTime?: Date;
|
|
863
|
-
};
|
|
864
|
-
type UnifiedResult = {
|
|
865
|
-
success?: boolean;
|
|
866
|
-
statusCode?: number;
|
|
867
|
-
message?: string;
|
|
868
|
-
headers?: Record<string, string>;
|
|
869
|
-
body?: unknown;
|
|
870
|
-
endTime?: Date;
|
|
871
|
-
};
|
|
872
|
-
type ProviderInput = {
|
|
873
|
-
requestId: string;
|
|
874
|
-
id: string;
|
|
875
|
-
organizationId: string;
|
|
876
|
-
projectSecureId: string;
|
|
877
|
-
accountSecureId: string;
|
|
878
|
-
originOwnerId?: string;
|
|
879
|
-
originOwnerName?: string;
|
|
880
|
-
connectorKey: string;
|
|
881
|
-
action: string;
|
|
882
|
-
service: string;
|
|
883
|
-
mode: string;
|
|
884
|
-
httpMethod: string;
|
|
885
|
-
url: string;
|
|
886
|
-
path?: string;
|
|
887
|
-
queryParams?: unknown;
|
|
888
|
-
headers?: Record<string, string>;
|
|
889
|
-
body?: unknown;
|
|
890
|
-
resource?: string;
|
|
891
|
-
subResource?: string;
|
|
892
|
-
childResource?: string;
|
|
893
|
-
startTime?: Date;
|
|
894
|
-
};
|
|
895
|
-
type ProviderResult = {
|
|
896
|
-
success?: boolean;
|
|
897
|
-
statusCode?: number;
|
|
898
|
-
headers?: Record<string, string>;
|
|
899
|
-
body?: unknown;
|
|
900
|
-
errors?: unknown;
|
|
901
|
-
endTime?: Date;
|
|
902
|
-
};
|
|
903
|
-
//#endregion
|
|
904
|
-
//#region src/advanced/types.d.ts
|
|
905
|
-
type ActionAdvancedLog = {
|
|
906
|
-
data: {
|
|
907
|
-
[key: string]: unknown;
|
|
908
|
-
};
|
|
909
|
-
metadata?: {
|
|
910
|
-
isBackgroundLog?: boolean;
|
|
911
|
-
expirationTime?: number;
|
|
912
|
-
};
|
|
913
|
-
};
|
|
914
|
-
type StepAdvancedLog = {
|
|
915
|
-
data: {
|
|
916
|
-
[key: string]: unknown;
|
|
917
|
-
};
|
|
918
|
-
metadata?: {
|
|
919
|
-
expirationTime?: number;
|
|
920
|
-
};
|
|
921
|
-
};
|
|
922
|
-
type UnifiedAdvancedLog = {
|
|
923
|
-
data: {
|
|
924
|
-
[key: string]: unknown;
|
|
925
|
-
};
|
|
926
|
-
metadata?: {
|
|
927
|
-
isBackgroundLog?: boolean;
|
|
928
|
-
expirationTime?: number;
|
|
929
|
-
};
|
|
930
|
-
};
|
|
931
|
-
type ProviderAdvancedLog = {
|
|
932
|
-
data: {
|
|
933
|
-
[key: string]: unknown;
|
|
934
|
-
};
|
|
935
|
-
metadata?: {
|
|
936
|
-
expirationTime?: number;
|
|
937
|
-
};
|
|
938
|
-
};
|
|
939
|
-
interface S3ClientConfig {
|
|
940
|
-
region?: string;
|
|
941
|
-
}
|
|
942
|
-
type S3ClientBuilder = (config?: S3ClientConfig, logger?: ILogger) => S3Client | undefined;
|
|
943
|
-
//#endregion
|
|
944
1005
|
//#region src/olap/olapClient.d.ts
|
|
945
1006
|
declare class OlapClient implements IOlapClient {
|
|
946
1007
|
#private;
|
|
@@ -990,6 +1051,8 @@ declare class OlapClient implements IOlapClient {
|
|
|
990
1051
|
getUnifiedAdvancedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedAdvancedLog | undefined>;
|
|
991
1052
|
getProviderAdvancedLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderAdvancedLog | undefined>;
|
|
992
1053
|
getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
|
|
1054
|
+
getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery): Promise<AggregateResult>;
|
|
1055
|
+
getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery): Promise<DimensionsResult>;
|
|
993
1056
|
}
|
|
994
1057
|
//#endregion
|
|
995
1058
|
//#region src/olap/olapClientManager.d.ts
|
|
@@ -1034,4 +1097,4 @@ declare class OlapClientManager {
|
|
|
1034
1097
|
static resetInstance(): void;
|
|
1035
1098
|
}
|
|
1036
1099
|
//#endregion
|
|
1037
|
-
export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, type ActionsQuery, type ActionsQueryResult, type AdvancedOptions, type DefenderContext, type DefenderLog, type DefenderOptions, type ILog, type IOlapClient, type LogsOptions, OlapClient, OlapClientManager, type OlapOptions, type ProviderAdvancedLog, type ProviderInput, type ProviderLog, type ProviderQuery, type ProviderQueryResult, type ProviderResult, type Query, type QueryResult, type StepAdvancedLog, type StepInput, type StepLog, type StepResult, type StepsQuery, type StepsQueryResult, type TinybirdConfig, type TinybirdQueryOptions, type TinybirdResponse, type UnifiedAdvancedLog, type UnifiedInput, type UnifiedLog, type UnifiedQuery, type UnifiedQueryResult, type UnifiedResult };
|
|
1100
|
+
export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, type ActionsQuery, type ActionsQueryResult, type AdvancedOptions, type AggregateQuery, type AggregateResult, type DefenderContext, type DefenderLog, type DefenderOptions, Dimension, type Dimension as DimensionValues, type DimensionsQuery, type DimensionsResult, type ILog, type IOlapClient, type IntervalType, LogType, type LogType as LogTypeValues, type LogsOptions, OlapClient, OlapClientManager, type OlapOptions, type ProviderAdvancedLog, type ProviderInput, type ProviderLog, type ProviderQuery, type ProviderQueryResult, type ProviderResult, type Query, type QueryResult, type StepAdvancedLog, type StepInput, type StepLog, type StepResult, type StepsQuery, type StepsQueryResult, type TinybirdConfig, type TinybirdQueryOptions, type TinybirdResponse, type UnifiedAdvancedLog, type UnifiedInput, type UnifiedLog, type UnifiedQuery, type UnifiedQueryResult, type UnifiedResult };
|