@stackone/olap 1.17.0 → 1.19.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
@@ -90,6 +90,13 @@ type DefenderOptions = {
90
90
  enabled?: boolean;
91
91
  };
92
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
93
100
  //#region ../transport/src/cacheClient/types.d.ts
94
101
  interface ICacheClient<ClientType = unknown> {
95
102
  getData<T>(key: string): Promise<T | null>;
@@ -145,6 +152,7 @@ interface RedisClientConfig {
145
152
  host?: string;
146
153
  port?: number;
147
154
  tls?: boolean;
155
+ keepAlive?: number;
148
156
  reconnect?: boolean;
149
157
  database?: number;
150
158
  }
@@ -504,6 +512,7 @@ type StepsQuery = {
504
512
  accountSecureId?: string | string[];
505
513
  actionRunId?: string | string[];
506
514
  stepId?: string | string[];
515
+ stepIndex?: number | number[];
507
516
  success?: boolean;
508
517
  startTime?: Date;
509
518
  endTime?: Date;
@@ -567,10 +576,13 @@ type StepLog = {
567
576
  interface IOlapClient {
568
577
  recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): void;
569
578
  recordStep(stepInput: StepInput, stepResult: StepResult, options?: OlapOptions): void;
570
- getActions(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
571
- getAction(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
572
- getAdvanced(organizationId: string, projectSecureId: string, actionRunId: string): Promise<string | undefined>;
573
- getDefender(organizationId: string, projectSecureId: string, actionRunId: string): Promise<string | undefined>;
579
+ getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
580
+ getActionLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
581
+ getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery): Promise<StepsQueryResult>;
582
+ getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepLog | undefined>;
583
+ getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
584
+ getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
585
+ getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
574
586
  }
575
587
  type DefenderContext = {
576
588
  riskLevel: string;
@@ -638,6 +650,23 @@ type StepResult = {
638
650
  };
639
651
  //#endregion
640
652
  //#region src/advanced/types.d.ts
653
+ type ActionAdvancedLog = {
654
+ data: {
655
+ [key: string]: unknown;
656
+ };
657
+ metadata?: {
658
+ isBackgroundLog?: boolean;
659
+ expirationTime?: number;
660
+ };
661
+ };
662
+ type StepAdvancedLog = {
663
+ data: {
664
+ [key: string]: unknown;
665
+ };
666
+ metadata?: {
667
+ expirationTime?: number;
668
+ };
669
+ };
641
670
  interface S3ClientConfig {
642
671
  region?: string;
643
672
  }
@@ -692,10 +721,13 @@ declare class OlapClient implements IOlapClient {
692
721
  initialize(): Promise<void>;
693
722
  recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): Promise<void>;
694
723
  recordStep(stepInput: StepInput, stepResult: StepResult, options?: OlapOptions): Promise<void>;
695
- getActions(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
696
- getAction(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
697
- getAdvanced(organizationId: string, projectSecureId: string, actionRunId: string): Promise<string | undefined>;
698
- getDefender(organizationId: string, projectSecureId: string, actionRunId: string): Promise<string | undefined>;
724
+ getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
725
+ getActionLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
726
+ getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery): Promise<StepsQueryResult>;
727
+ getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepLog | undefined>;
728
+ getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
729
+ getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
730
+ getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
699
731
  }
700
732
  //#endregion
701
733
  //#region src/olap/olapClientManager.d.ts
@@ -740,4 +772,4 @@ declare class OlapClientManager {
740
772
  static resetInstance(): void;
741
773
  }
742
774
  //#endregion
743
- export { type ActionInput, type ActionLog, type ActionResult, type ActionsQuery, type ActionsQueryResult, type AdvancedOptions, type DefenderContext, type DefenderOptions, type IOlapClient, type LogsOptions, OlapClient, OlapClientManager, type OlapOptions, type StepInput, type StepLog, type StepResult, type StepsQuery, type StepsQueryResult, type TinybirdConfig, type TinybirdQueryOptions, type TinybirdResponse };
775
+ export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, type ActionsQuery, type ActionsQueryResult, type AdvancedOptions, type DefenderContext, type DefenderLog, type DefenderOptions, type IOlapClient, type LogsOptions, OlapClient, OlapClientManager, type OlapOptions, type StepAdvancedLog, type StepInput, type StepLog, type StepResult, type StepsQuery, type StepsQueryResult, type TinybirdConfig, type TinybirdQueryOptions, type TinybirdResponse };
package/dist/index.d.mts CHANGED
@@ -1,11 +1,11 @@
1
- import { r as __name } from "./chunk-Co8tzA6w.mjs";
2
- import { z } from "@stackone/utils";
1
+ import { t as __name } from "./chunk-Cfxk5zVN.mjs";
2
+ import "@stackone/utils";
3
3
  import { S3Client } from "@aws-sdk/client-s3";
4
- import https from "node:https";
5
4
  import { Kafka } from "kafkajs";
6
5
  import http from "node:http";
7
6
  import * as redis from "redis";
8
7
  import { AxiosInstance } from "axios";
8
+ import https from "node:https";
9
9
  import { Readable } from "node:stream";
10
10
 
11
11
  //#region ../logger/src/types.d.ts
@@ -90,6 +90,13 @@ type DefenderOptions = {
90
90
  enabled?: boolean;
91
91
  };
92
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
93
100
  //#region ../transport/src/cacheClient/types.d.ts
94
101
  interface ICacheClient<ClientType = unknown> {
95
102
  getData<T>(key: string): Promise<T | null>;
@@ -145,6 +152,7 @@ interface RedisClientConfig {
145
152
  host?: string;
146
153
  port?: number;
147
154
  tls?: boolean;
155
+ keepAlive?: number;
148
156
  reconnect?: boolean;
149
157
  database?: number;
150
158
  }
@@ -504,6 +512,7 @@ type StepsQuery = {
504
512
  accountSecureId?: string | string[];
505
513
  actionRunId?: string | string[];
506
514
  stepId?: string | string[];
515
+ stepIndex?: number | number[];
507
516
  success?: boolean;
508
517
  startTime?: Date;
509
518
  endTime?: Date;
@@ -567,10 +576,13 @@ type StepLog = {
567
576
  interface IOlapClient {
568
577
  recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): void;
569
578
  recordStep(stepInput: StepInput, stepResult: StepResult, options?: OlapOptions): void;
570
- getActions(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
571
- getAction(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
572
- getAdvanced(organizationId: string, projectSecureId: string, actionRunId: string): Promise<string | undefined>;
573
- getDefender(organizationId: string, projectSecureId: string, actionRunId: string): Promise<string | undefined>;
579
+ getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
580
+ getActionLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
581
+ getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery): Promise<StepsQueryResult>;
582
+ getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepLog | undefined>;
583
+ getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
584
+ getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
585
+ getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
574
586
  }
575
587
  type DefenderContext = {
576
588
  riskLevel: string;
@@ -638,6 +650,23 @@ type StepResult = {
638
650
  };
639
651
  //#endregion
640
652
  //#region src/advanced/types.d.ts
653
+ type ActionAdvancedLog = {
654
+ data: {
655
+ [key: string]: unknown;
656
+ };
657
+ metadata?: {
658
+ isBackgroundLog?: boolean;
659
+ expirationTime?: number;
660
+ };
661
+ };
662
+ type StepAdvancedLog = {
663
+ data: {
664
+ [key: string]: unknown;
665
+ };
666
+ metadata?: {
667
+ expirationTime?: number;
668
+ };
669
+ };
641
670
  interface S3ClientConfig {
642
671
  region?: string;
643
672
  }
@@ -692,10 +721,13 @@ declare class OlapClient implements IOlapClient {
692
721
  initialize(): Promise<void>;
693
722
  recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): Promise<void>;
694
723
  recordStep(stepInput: StepInput, stepResult: StepResult, options?: OlapOptions): Promise<void>;
695
- getActions(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
696
- getAction(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
697
- getAdvanced(organizationId: string, projectSecureId: string, actionRunId: string): Promise<string | undefined>;
698
- getDefender(organizationId: string, projectSecureId: string, actionRunId: string): Promise<string | undefined>;
724
+ getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
725
+ getActionLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
726
+ getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery): Promise<StepsQueryResult>;
727
+ getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepLog | undefined>;
728
+ getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
729
+ getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
730
+ getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
699
731
  }
700
732
  //#endregion
701
733
  //#region src/olap/olapClientManager.d.ts
@@ -740,4 +772,4 @@ declare class OlapClientManager {
740
772
  static resetInstance(): void;
741
773
  }
742
774
  //#endregion
743
- export { type ActionInput, type ActionLog, type ActionResult, type ActionsQuery, type ActionsQueryResult, type AdvancedOptions, type DefenderContext, type DefenderOptions, type IOlapClient, type LogsOptions, OlapClient, OlapClientManager, type OlapOptions, type StepInput, type StepLog, type StepResult, type StepsQuery, type StepsQueryResult, type TinybirdConfig, type TinybirdQueryOptions, type TinybirdResponse };
775
+ export { type ActionAdvancedLog, type ActionInput, type ActionLog, type ActionResult, type ActionsQuery, type ActionsQueryResult, type AdvancedOptions, type DefenderContext, type DefenderLog, type DefenderOptions, type IOlapClient, type LogsOptions, OlapClient, OlapClientManager, type OlapOptions, type StepAdvancedLog, type StepInput, type StepLog, type StepResult, type StepsQuery, type StepsQueryResult, type TinybirdConfig, type TinybirdQueryOptions, type TinybirdResponse };