@transai/connector-runner-ez-mes 0.9.1

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.
Files changed (93) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/README.md +11 -0
  3. package/index.cjs +2 -0
  4. package/index.cjs.map +7 -0
  5. package/index.js +2 -0
  6. package/index.js.map +7 -0
  7. package/libs/connector-runner-ez-mes/src/index.d.ts +1 -0
  8. package/libs/connector-runner-ez-mes/src/lib/actions/actions-handler.d.ts +10 -0
  9. package/libs/connector-runner-ez-mes/src/lib/actions/traveler-next-step.action.d.ts +13 -0
  10. package/libs/connector-runner-ez-mes/src/lib/actions/traveler-start.action.d.ts +13 -0
  11. package/libs/connector-runner-ez-mes/src/lib/actions/traveler-stop.action.d.ts +13 -0
  12. package/libs/connector-runner-ez-mes/src/lib/connector-runner-ez-mes.d.ts +9 -0
  13. package/libs/connector-runner-ez-mes/src/lib/events/extract-traveler.event.d.ts +5 -0
  14. package/libs/connector-runner-ez-mes/src/lib/extraction/traveler-extraction.d.ts +11 -0
  15. package/libs/connector-runner-ez-mes/src/lib/extraction/traveler-type.d.ts +42 -0
  16. package/libs/connector-runner-ez-mes/src/lib/http-client-authentication.d.ts +9 -0
  17. package/libs/connector-runner-ez-mes/src/lib/types.d.ts +23 -0
  18. package/libs/connector-runtime-sdk/src/index.d.ts +4 -0
  19. package/libs/connector-runtime-sdk/src/lib/connector-runtime.d.ts +16 -0
  20. package/libs/connector-runtime-sdk/src/lib/connector-runtime.interface.d.ts +5 -0
  21. package/libs/connector-runtime-sdk/src/lib/sdk/files.sdk.interface.d.ts +19 -0
  22. package/libs/connector-runtime-sdk/src/lib/sdk/http-client.interface.d.ts +47 -0
  23. package/libs/connector-runtime-sdk/src/lib/sdk/index.d.ts +10 -0
  24. package/libs/connector-runtime-sdk/src/lib/sdk/logger.sdk.interface.d.ts +7 -0
  25. package/libs/connector-runtime-sdk/src/lib/sdk/offset-store.sdk.interface.d.ts +12 -0
  26. package/libs/connector-runtime-sdk/src/lib/sdk/processing.sdk.interface.d.ts +13 -0
  27. package/libs/connector-runtime-sdk/src/lib/sdk/receiver.sdk.interface.d.ts +14 -0
  28. package/libs/connector-runtime-sdk/src/lib/sdk/sdk.interface.d.ts +31 -0
  29. package/libs/connector-runtime-sdk/src/lib/sdk/sender.sdk.interface.d.ts +22 -0
  30. package/libs/connector-runtime-sdk/src/lib/sdk/telemetry.sdk.interface.d.ts +15 -0
  31. package/libs/connector-runtime-sdk/src/lib/sdk/templating.sdk.interface.d.ts +12 -0
  32. package/libs/connector-runtime-sdk/src/lib/support/index.d.ts +1 -0
  33. package/libs/connector-runtime-sdk/src/lib/support/null-logger.d.ts +8 -0
  34. package/libs/types/src/index.d.ts +7 -0
  35. package/libs/types/src/lib/cube-query-config.types.d.ts +20 -0
  36. package/libs/types/src/lib/file-action.types.d.ts +5 -0
  37. package/libs/types/src/lib/http-status-codes.enum.d.ts +64 -0
  38. package/libs/types/src/lib/management-api/action-definition.interface.d.ts +12 -0
  39. package/libs/types/src/lib/management-api/chart.interface.d.ts +9 -0
  40. package/libs/types/src/lib/management-api/connector/connector.interface.d.ts +52 -0
  41. package/libs/types/src/lib/management-api/connector/connectors.interface.d.ts +38 -0
  42. package/libs/types/src/lib/management-api/connector-orchestrator-config.interface.d.ts +14 -0
  43. package/libs/types/src/lib/management-api/cube-dataset.interface.d.ts +93 -0
  44. package/libs/types/src/lib/management-api/dashboard.interface.d.ts +35 -0
  45. package/libs/types/src/lib/management-api/dataset/collection.interface.d.ts +10 -0
  46. package/libs/types/src/lib/management-api/dataset/dataset-record.interface.d.ts +5 -0
  47. package/libs/types/src/lib/management-api/dataset/dataset.interface.d.ts +114 -0
  48. package/libs/types/src/lib/management-api/dataset/datasets.interface.d.ts +94 -0
  49. package/libs/types/src/lib/management-api/dataset/dimension.interface.d.ts +51 -0
  50. package/libs/types/src/lib/management-api/dataset/dimensions.interface.d.ts +32 -0
  51. package/libs/types/src/lib/management-api/dataset/filter-group.interface.d.ts +8 -0
  52. package/libs/types/src/lib/management-api/dataset/filter.interface.d.ts +14 -0
  53. package/libs/types/src/lib/management-api/dataset/filters.interface.d.ts +7 -0
  54. package/libs/types/src/lib/management-api/dataset/measure.interface.d.ts +25 -0
  55. package/libs/types/src/lib/management-api/dataset/measures.interface.d.ts +16 -0
  56. package/libs/types/src/lib/management-api/dataset/meta.interface.d.ts +9 -0
  57. package/libs/types/src/lib/management-api/dataset/pre-aggregate.interface.d.ts +41 -0
  58. package/libs/types/src/lib/management-api/dataset/pre-aggregations.interface.d.ts +26 -0
  59. package/libs/types/src/lib/management-api/dataset/relation.interface.d.ts +16 -0
  60. package/libs/types/src/lib/management-api/dataset/relations.interface.d.ts +12 -0
  61. package/libs/types/src/lib/management-api/dataset/segment.interface.d.ts +17 -0
  62. package/libs/types/src/lib/management-api/dataset/segments.interface.d.ts +15 -0
  63. package/libs/types/src/lib/management-api/dataset/switch.interface.d.ts +20 -0
  64. package/libs/types/src/lib/management-api/dataset/when-item.interface.d.ts +15 -0
  65. package/libs/types/src/lib/management-api/dataset/when-items.interface.d.ts +14 -0
  66. package/libs/types/src/lib/management-api/event-origin.interface.d.ts +24 -0
  67. package/libs/types/src/lib/management-api/index.d.ts +39 -0
  68. package/libs/types/src/lib/management-api/semantic-trigger/custom-cron-trigger-record.interface.d.ts +6 -0
  69. package/libs/types/src/lib/management-api/semantic-trigger/index.d.ts +6 -0
  70. package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filter.interface.d.ts +12 -0
  71. package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filters.interface.d.ts +10 -0
  72. package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-record.interface.d.ts +6 -0
  73. package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger.interface.d.ts +35 -0
  74. package/libs/types/src/lib/management-api/semantic-trigger/semantic-triggers.interface.d.ts +22 -0
  75. package/libs/types/src/lib/management-api/template-implementation-overrides.interface.d.ts +148 -0
  76. package/libs/types/src/lib/management-api/template-implementation.interface.d.ts +309 -0
  77. package/libs/types/src/lib/management-api/template.interface.d.ts +177 -0
  78. package/libs/types/src/lib/management-api/tenant.interface.d.ts +8 -0
  79. package/libs/types/src/lib/management-api/type-enums.d.ts +85 -0
  80. package/libs/types/src/lib/management-api/web/generic-filter.dto.d.ts +37 -0
  81. package/libs/types/src/lib/management-api/web/index.d.ts +2 -0
  82. package/libs/types/src/lib/management-api/web/paginated-response.interface.d.ts +17 -0
  83. package/libs/types/src/lib/management-api/workflow/action.interface.d.ts +71 -0
  84. package/libs/types/src/lib/management-api/workflow/index.d.ts +6 -0
  85. package/libs/types/src/lib/management-api/workflow/offset.interface.d.ts +14 -0
  86. package/libs/types/src/lib/management-api/workflow/trigger-types.interface.d.ts +14 -0
  87. package/libs/types/src/lib/management-api/workflow/workflow-definition.interface.d.ts +64 -0
  88. package/libs/types/src/lib/management-api/workflow/workflow-run.d.ts +66 -0
  89. package/libs/types/src/lib/management-api/workflow/workflow.drawing.d.ts +94 -0
  90. package/libs/types/src/lib/message.types.d.ts +59 -0
  91. package/libs/types/src/lib/response.types.d.ts +27 -0
  92. package/libs/types/src/lib/types.d.ts +134 -0
  93. package/package.json +16 -0
@@ -0,0 +1,31 @@
1
+ import { BaseConnectorConfig } from '@xip-online-data/types';
2
+ import { FilesSDKInterface } from './files.sdk.interface';
3
+ import { HttpClientSDKInterface, HttpConfig } from './http-client.interface';
4
+ import { LoggerSDKInterface } from './logger.sdk.interface';
5
+ import { OffsetStoreSDKInterface } from './offset-store.sdk.interface';
6
+ import { ProcessingSDKInterface } from './processing.sdk.interface';
7
+ import { ReceiverSDKInterface } from './receiver.sdk.interface';
8
+ import { SenderSDKInterface } from './sender.sdk.interface';
9
+ import { TelemetrySDKInterface } from './telemetry.sdk.interface';
10
+ import { TemplatingSDKInterface } from './templating.sdk.interface';
11
+ export interface ConnectorSDKInterface<T = BaseConnectorConfig> {
12
+ get config(): T;
13
+ get logger(): LoggerSDKInterface;
14
+ get sender(): SenderSDKInterface;
15
+ get receiver(): ReceiverSDKInterface;
16
+ get templating(): TemplatingSDKInterface;
17
+ /**
18
+ * Service to schedule and manage processing tasks that need monitoring and retries.
19
+ */
20
+ get processing(): ProcessingSDKInterface;
21
+ get offsetStore(): OffsetStoreSDKInterface;
22
+ /**
23
+ * Ability to send telemetry data such as gauges and increments on how the connector is performing.
24
+ */
25
+ get telemetry(): TelemetrySDKInterface;
26
+ /**
27
+ * Get file service instance to access files using a specified DSN. If no DSN is provided, defaults to local file system tmp dir.
28
+ */
29
+ files(dsn?: string): FilesSDKInterface;
30
+ httpClient(httpConfig?: HttpConfig): HttpClientSDKInterface;
31
+ }
@@ -0,0 +1,22 @@
1
+ export interface Metric {
2
+ key: string;
3
+ value: number;
4
+ }
5
+ export type Metadata = {
6
+ [key: string]: string;
7
+ };
8
+ export interface Context {
9
+ timestamp?: Date;
10
+ ttl?: number;
11
+ extraPayload?: {
12
+ [key: string]: string;
13
+ };
14
+ }
15
+ export type Result = boolean | {
16
+ [index: number]: boolean;
17
+ };
18
+ export interface SenderSDKInterface {
19
+ metrics(metrics: Array<Metric>, metadata?: Metadata, context?: Context): Promise<Result>;
20
+ metricsLegacy<T = never>(metrics: Array<T>, metadata?: Metadata, context?: Context, topic?: string): Promise<Result>;
21
+ documents<T = object>(documents: Array<T>, metadata?: Metadata, context?: Context): Promise<Result>;
22
+ }
@@ -0,0 +1,15 @@
1
+ export interface TelemetrySDKInterface {
2
+ /**
3
+ * Increment a telemetry counter by 1.
4
+ */
5
+ increment(key: string): void;
6
+ /**
7
+ * Increment a telemetry counter by a specified value. 0 doesn't send any telemetry.
8
+ * A negative value will decrement the counter.
9
+ */
10
+ increment(key: string, value: number): void;
11
+ /**
12
+ * Send a gauge telemetry metric.
13
+ */
14
+ gauge(key: string, value: number): void;
15
+ }
@@ -0,0 +1,12 @@
1
+ export type RuntimeOptions = {
2
+ partial?: boolean;
3
+ };
4
+ export type CompileDelegate<T = unknown> = {
5
+ (context: T, options?: RuntimeOptions): string;
6
+ };
7
+ export type CompileOptions = {
8
+ strict?: boolean;
9
+ };
10
+ export interface TemplatingSDKInterface {
11
+ compile<T = unknown>(input: string, options?: CompileOptions): CompileDelegate<T>;
12
+ }
@@ -0,0 +1 @@
1
+ export * from './null-logger';
@@ -0,0 +1,8 @@
1
+ import { LoggerSDKInterface } from '../sdk';
2
+ export declare class NullLogger implements LoggerSDKInterface {
3
+ info(): void;
4
+ debug(): void;
5
+ error(): void;
6
+ warn(): void;
7
+ verbose(): void;
8
+ }
@@ -0,0 +1,7 @@
1
+ export * from './lib/types';
2
+ export * from './lib/response.types';
3
+ export * from './lib/message.types';
4
+ export * from './lib/cube-query-config.types';
5
+ export * from './lib/file-action.types';
6
+ export * from './lib/management-api';
7
+ export * from './lib/http-status-codes.enum';
@@ -0,0 +1,20 @@
1
+ import { Query } from '@cubejs-client/core';
2
+ export interface CubeQueryConfig {
3
+ tenantId: string;
4
+ query: Query;
5
+ nullable?: boolean;
6
+ subqueries: Array<CubeSubQueryConfig>;
7
+ }
8
+ export interface CubeSubQueryConfig {
9
+ tenantId?: string;
10
+ query: Query;
11
+ nullable?: boolean;
12
+ field: string;
13
+ joinConditions: Array<CubeJoinCondition>;
14
+ }
15
+ export interface CubeJoinCondition {
16
+ selectField: string;
17
+ operator: string;
18
+ valueField: Array<string>;
19
+ valueMap?: Array<any>;
20
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum FileActionType {
2
+ ACTION_MOVE = "move",
3
+ ACTION_DELETE = "delete",
4
+ ACTION_NOTHING = "nothing"
5
+ }
@@ -0,0 +1,64 @@
1
+ export declare enum HttpStatusCode {
2
+ Continue = 100,
3
+ SwitchingProtocols = 101,
4
+ Processing = 102,
5
+ OK = 200,
6
+ Created = 201,
7
+ Accepted = 202,
8
+ NonAuthoritativeInformation = 203,
9
+ NoContent = 204,
10
+ ResetContent = 205,
11
+ PartialContent = 206,
12
+ MultiStatus = 207,
13
+ AlreadyReported = 208,
14
+ IMUsed = 226,
15
+ MultipleChoices = 300,
16
+ MovedPermanently = 301,
17
+ Found = 302,
18
+ SeeOther = 303,
19
+ NotModified = 304,
20
+ UseProxy = 305,
21
+ TemporaryRedirect = 307,
22
+ PermanentRedirect = 308,
23
+ BadRequest = 400,
24
+ Unauthorized = 401,
25
+ PaymentRequired = 402,
26
+ Forbidden = 403,
27
+ NotFound = 404,
28
+ MethodNotAllowed = 405,
29
+ NotAcceptable = 406,
30
+ ProxyAuthenticationRequired = 407,
31
+ RequestTimeout = 408,
32
+ Conflict = 409,
33
+ Gone = 410,
34
+ LengthRequired = 411,
35
+ PreconditionFailed = 412,
36
+ PayloadTooLarge = 413,
37
+ URITooLong = 414,
38
+ UnsupportedMediaType = 415,
39
+ RangeNotSatisfiable = 416,
40
+ ExpectationFailed = 417,
41
+ ImATeapot = 418,
42
+ MisdirectedRequest = 421,
43
+ UnprocessableEntity = 422,
44
+ Locked = 423,
45
+ FailedDependency = 424,
46
+ TooEarly = 425,
47
+ UpgradeRequired = 426,
48
+ PreconditionRequired = 428,
49
+ TooManyRequests = 429,
50
+ RequestHeaderFieldsTooLarge = 431,
51
+ UnavailableForLegalReasons = 451,
52
+ InternalServerError = 500,
53
+ NotImplemented = 501,
54
+ BadGateway = 502,
55
+ ServiceUnavailable = 503,
56
+ GatewayTimeout = 504,
57
+ HTTPVersionNotSupported = 505,
58
+ VariantAlsoNegotiates = 506,
59
+ InsufficientStorage = 507,
60
+ LoopDetected = 508,
61
+ NotExtended = 510,
62
+ NetworkAuthenticationRequired = 511,
63
+ Aborted = 512
64
+ }
@@ -0,0 +1,12 @@
1
+ import { TenantInterface } from './tenant.interface';
2
+ import { CubeQueryConfig } from '../cube-query-config.types';
3
+ export interface ActionDefinitionInterface {
4
+ tenant: TenantInterface;
5
+ eventType: string;
6
+ eventTopic: string;
7
+ destinationTopic: string;
8
+ actionIdentifier: string;
9
+ template: string;
10
+ fileNameTemplate: string | undefined;
11
+ queryConfig: CubeQueryConfig | undefined;
12
+ }
@@ -0,0 +1,9 @@
1
+ export interface ChartInterface {
2
+ dashboards: Array<number>;
3
+ owners: Array<number>;
4
+ params: string;
5
+ slice_name: string;
6
+ viz_type: string;
7
+ id: string;
8
+ supersetId: number;
9
+ }
@@ -0,0 +1,52 @@
1
+ import { z } from 'zod';
2
+ import { BaseConnectorConfig, ConfiguredConnectorTypes } from '../../types';
3
+ import { ConnectorOrigin } from '../type-enums';
4
+ import { ActionInterface } from '../workflow';
5
+ export declare const ConnectorSchema: z.ZodObject<{
6
+ identifier: z.ZodString;
7
+ connectorType: z.ZodEnum<typeof ConfiguredConnectorTypes>;
8
+ name: z.ZodString;
9
+ location: z.ZodString;
10
+ config: z.ZodObject<{}, z.core.$loose>;
11
+ enabled: z.ZodBoolean;
12
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
13
+ identifier: z.ZodString;
14
+ version: z.ZodString;
15
+ name: z.ZodString;
16
+ description: z.ZodOptional<z.ZodString>;
17
+ config: z.ZodRecord<z.ZodString, z.ZodAny>;
18
+ inputParameters: z.ZodArray<z.ZodObject<{
19
+ name: z.ZodString;
20
+ description: z.ZodOptional<z.ZodString>;
21
+ type: z.ZodEnum<{
22
+ string: "string";
23
+ number: "number";
24
+ boolean: "boolean";
25
+ array: "array";
26
+ }>;
27
+ required: z.ZodOptional<z.ZodBoolean>;
28
+ items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
29
+ }, z.core.$strip>>;
30
+ outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
31
+ mode: z.ZodOptional<z.ZodEnum<typeof ConnectorOrigin>>;
32
+ createdAt: z.ZodOptional<z.ZodDate>;
33
+ updatedAt: z.ZodOptional<z.ZodDate>;
34
+ }, z.core.$strip>>>;
35
+ createdAt: z.ZodOptional<z.ZodDate>;
36
+ updatedAt: z.ZodOptional<z.ZodDate>;
37
+ }, z.core.$strip>;
38
+ export interface ConnectorInterface<T = Partial<BaseConnectorConfig>> {
39
+ identifier: string;
40
+ connectorType: ConfiguredConnectorTypes;
41
+ tenantIdentifier: string;
42
+ name: string;
43
+ location: string;
44
+ config?: T;
45
+ enabled: boolean;
46
+ actions?: Array<ActionInterface>;
47
+ mode?: ConnectorOrigin;
48
+ createdAt?: Date;
49
+ updatedAt?: Date;
50
+ }
51
+ export type CreateConnectorInterface<T = Partial<BaseConnectorConfig>> = Omit<ConnectorInterface<T>, 'id' | 'createdAt' | 'updatedAt' | 'mode'>;
52
+ export type UpdateConnectorInterface<T = Partial<BaseConnectorConfig>> = Partial<Omit<ConnectorInterface<T>, 'id' | 'tenantIdentifier' | 'identifier' | 'createdAt' | 'mode'>>;
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod';
2
+ import { ConnectorInterface } from '../index';
3
+ export declare const ConnectorsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
4
+ identifier: z.ZodString;
5
+ connectorType: z.ZodEnum<typeof import("../../types").ConfiguredConnectorTypes>;
6
+ name: z.ZodString;
7
+ location: z.ZodString;
8
+ config: z.ZodObject<{}, z.core.$loose>;
9
+ enabled: z.ZodBoolean;
10
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
11
+ identifier: z.ZodString;
12
+ version: z.ZodString;
13
+ name: z.ZodString;
14
+ description: z.ZodOptional<z.ZodString>;
15
+ config: z.ZodRecord<z.ZodString, z.ZodAny>;
16
+ inputParameters: z.ZodArray<z.ZodObject<{
17
+ name: z.ZodString;
18
+ description: z.ZodOptional<z.ZodString>;
19
+ type: z.ZodEnum<{
20
+ string: "string";
21
+ number: "number";
22
+ boolean: "boolean";
23
+ array: "array";
24
+ }>;
25
+ required: z.ZodOptional<z.ZodBoolean>;
26
+ items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
27
+ }, z.core.$strip>>;
28
+ outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
29
+ mode: z.ZodOptional<z.ZodEnum<typeof import("../type-enums").ConnectorOrigin>>;
30
+ createdAt: z.ZodOptional<z.ZodDate>;
31
+ updatedAt: z.ZodOptional<z.ZodDate>;
32
+ }, z.core.$strip>>>;
33
+ createdAt: z.ZodOptional<z.ZodDate>;
34
+ updatedAt: z.ZodOptional<z.ZodDate>;
35
+ }, z.core.$strip>, z.ZodBoolean]>>;
36
+ export interface ConnectorsInterface {
37
+ [key: string]: ConnectorInterface | boolean;
38
+ }
@@ -0,0 +1,14 @@
1
+ import { ConnectorInterface } from './connector/connector.interface';
2
+ export interface ConnectorOrchestratorConfigInterface {
3
+ awsAccessKeyId?: string;
4
+ awsSecretAccessKey?: string;
5
+ awsRegion?: string;
6
+ datadogApiKey?: string;
7
+ }
8
+ export interface ConnectorOrchestratorConfigWithKafkaInterface extends ConnectorOrchestratorConfigInterface {
9
+ kafkaBrokers?: Array<string>;
10
+ }
11
+ export interface ConnectorOrchestratorFullConfigurationInterface {
12
+ config: ConnectorOrchestratorConfigWithKafkaInterface;
13
+ connectors: Array<ConnectorInterface>;
14
+ }
@@ -0,0 +1,93 @@
1
+ import { MetaInterface } from './dataset/meta.interface';
2
+ export interface CubePreAggregationInterface {
3
+ type?: 'rollup' | 'original_sql' | 'rollup_join';
4
+ measures?: Array<string>;
5
+ dimensions?: Array<string>;
6
+ segments?: Array<string>;
7
+ timeDimension?: string;
8
+ granularity?: string;
9
+ rollups?: Array<string>;
10
+ refreshKeySql?: string;
11
+ refreshKeyEvery?: string;
12
+ refreshKeyIncremental?: boolean;
13
+ refreshKeyUpdateWindow?: string;
14
+ lambdaAggregation?: boolean;
15
+ }
16
+ export interface CubePreAggregationsInterface {
17
+ [key: string]: CubePreAggregationInterface;
18
+ }
19
+ export interface CubeDatasetInterface {
20
+ id: string;
21
+ dataSource: string;
22
+ name: string;
23
+ description: string;
24
+ tenantId: string;
25
+ parentId?: string;
26
+ sql?: string;
27
+ refreshSql?: string;
28
+ meta?: MetaInterface;
29
+ dimensions: CubeDimensionsInterface;
30
+ segments?: CubeSegmentsInterface;
31
+ relations?: CubeRelationsInterface;
32
+ measures?: CubeMeasuresInterface;
33
+ preAggregations?: CubePreAggregationsInterface;
34
+ }
35
+ export interface CubeDimensionsInterface {
36
+ [key: string]: CubeDimensionInterface;
37
+ }
38
+ export interface CubeDimensionInterface {
39
+ title: string;
40
+ description: string;
41
+ index?: boolean;
42
+ type: string;
43
+ format?: string;
44
+ primaryKey?: boolean;
45
+ public?: boolean;
46
+ subQuery?: boolean;
47
+ sql?: string;
48
+ case?: CubeDimensionCaseInterface;
49
+ meta?: MetaInterface;
50
+ granularities?: {
51
+ [key: string]: {
52
+ interval: string;
53
+ };
54
+ };
55
+ }
56
+ export interface CubeDimensionCaseInterface {
57
+ when: Array<CubeDimensionCaseWhenInterface>;
58
+ else: {
59
+ label: string;
60
+ };
61
+ }
62
+ export interface CubeDimensionCaseWhenInterface {
63
+ label: string;
64
+ sql: string;
65
+ }
66
+ export interface CubeRelationsInterface {
67
+ [key: string]: CubeRelationInterface;
68
+ }
69
+ export interface CubeRelationInterface {
70
+ relationship: string;
71
+ sql: string;
72
+ }
73
+ export interface CubeSegmentsInterface {
74
+ [key: string]: CubeSegmentInterface;
75
+ }
76
+ export interface CubeSegmentInterface {
77
+ public: boolean;
78
+ sql: string;
79
+ title?: string;
80
+ description?: string;
81
+ }
82
+ export interface CubeMeasuresInterface {
83
+ [key: string]: CubeMeasureInterface;
84
+ }
85
+ export interface CubeMeasureInterface {
86
+ title: string;
87
+ description?: string;
88
+ public?: boolean;
89
+ type: string;
90
+ format?: string;
91
+ sql: string;
92
+ meta?: MetaInterface;
93
+ }
@@ -0,0 +1,35 @@
1
+ export type DashboardPositionValue = string | number | boolean | null | Record<string, unknown> | Array<unknown>;
2
+ export interface DashboardPositionJson {
3
+ [key: string]: DashboardPositionValue;
4
+ }
5
+ export interface CreateDashboardInterface {
6
+ id: number;
7
+ title: string | null;
8
+ slug: string | null;
9
+ description: string | null;
10
+ positionJson: DashboardPositionJson | null;
11
+ isPublished: boolean;
12
+ tenantIdentifier: string;
13
+ charts: Array<number>;
14
+ roles: Array<string>;
15
+ supersetId: number | null;
16
+ }
17
+ export interface UpdateDashboardInterface {
18
+ title: string | null;
19
+ slug: string | null;
20
+ description: string | null;
21
+ positionJson: DashboardPositionJson | null;
22
+ isPublished: boolean;
23
+ roles: Array<string>;
24
+ charts: Array<number>;
25
+ supersetId: number | null;
26
+ }
27
+ export interface DashboardInterface extends CreateDashboardInterface {
28
+ createdAt: Date;
29
+ updatedAt: Date;
30
+ }
31
+ export interface DashboardExportInterface {
32
+ exportData: DashboardInterface;
33
+ exportType: string;
34
+ exportedAt: string;
35
+ }
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { FiltersInterface } from './filters.interface';
3
+ export declare const CollectionSchema: z.ZodObject<{
4
+ collection: z.ZodString;
5
+ filters: z.ZodOptional<z.ZodType<FiltersInterface, unknown, z.core.$ZodTypeInternals<FiltersInterface, unknown>>>;
6
+ }, z.core.$strip>;
7
+ export interface CollectionInterface {
8
+ collection: string;
9
+ filters?: FiltersInterface;
10
+ }
@@ -0,0 +1,5 @@
1
+ import { DatasetInterface } from './dataset.interface';
2
+ export interface DatasetRecordInterface extends DatasetInterface {
3
+ id: string;
4
+ tenantId: string;
5
+ }
@@ -0,0 +1,114 @@
1
+ import { z } from 'zod';
2
+ import { DatasetTypeEnum } from '../type-enums';
3
+ import { CollectionInterface } from './collection.interface';
4
+ import { DimensionsInterface } from './dimensions.interface';
5
+ import { SegmentsInterface } from './segments.interface';
6
+ import { RelationsInterface } from './relations.interface';
7
+ import { MeasuresInterface } from './measures.interface';
8
+ import { MetaInterface } from './meta.interface';
9
+ import { PreAggregationsInterface } from './pre-aggregations.interface';
10
+ export declare const DatasetSchema: z.ZodObject<{
11
+ name: z.ZodString;
12
+ description: z.ZodString;
13
+ type: z.ZodEnum<typeof DatasetTypeEnum>;
14
+ prefix: z.ZodString;
15
+ parent: z.ZodOptional<z.ZodString>;
16
+ sql: z.ZodOptional<z.ZodString>;
17
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
18
+ collection: z.ZodOptional<z.ZodObject<{
19
+ collection: z.ZodString;
20
+ filters: z.ZodOptional<z.ZodType<import("./filters.interface").FiltersInterface, unknown, z.core.$ZodTypeInternals<import("./filters.interface").FiltersInterface, unknown>>>;
21
+ }, z.core.$strip>>;
22
+ dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
23
+ name: z.ZodString;
24
+ description: z.ZodString;
25
+ type: z.ZodEnum<typeof import("../type-enums").DimensionTypesEnum>;
26
+ format: z.ZodOptional<z.ZodEnum<typeof import("../type-enums").DimensionFormatsEnum>>;
27
+ explode: z.ZodOptional<z.ZodBoolean>;
28
+ index: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
29
+ switch: z.ZodOptional<z.ZodObject<{
30
+ when: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
31
+ sql: z.ZodOptional<z.ZodString>;
32
+ dimension: z.ZodOptional<z.ZodString>;
33
+ operator: z.ZodOptional<z.ZodEnum<typeof import("../type-enums").FilterOperatorsEnum>>;
34
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
35
+ }, z.core.$strip>, z.ZodObject<{
36
+ label: z.ZodString;
37
+ description: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>>, z.ZodLiteral<false>]>>;
39
+ else: z.ZodOptional<z.ZodString>;
40
+ segment: z.ZodOptional<z.ZodBoolean>;
41
+ }, z.core.$strip>>;
42
+ field: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
43
+ sql: z.ZodOptional<z.ZodString>;
44
+ public: z.ZodOptional<z.ZodBoolean>;
45
+ primaryKey: z.ZodOptional<z.ZodBoolean>;
46
+ subQuery: z.ZodOptional<z.ZodBoolean>;
47
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
48
+ }, z.core.$strip>, z.ZodLiteral<false>]>>>;
49
+ segments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
50
+ sql: z.ZodOptional<z.ZodString>;
51
+ dimension: z.ZodOptional<z.ZodString>;
52
+ operator: z.ZodOptional<z.ZodEnum<typeof import("../type-enums").FilterOperatorsEnum>>;
53
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
54
+ }, z.core.$strip>, z.ZodObject<{
55
+ name: z.ZodOptional<z.ZodString>;
56
+ description: z.ZodOptional<z.ZodString>;
57
+ public: z.ZodOptional<z.ZodBoolean>;
58
+ }, z.core.$strip>>, z.ZodLiteral<false>]>>>;
59
+ relations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
60
+ type: z.ZodEnum<typeof import("../type-enums").RelationTypesEnum>;
61
+ dimension: z.ZodOptional<z.ZodString>;
62
+ targetDataset: z.ZodString;
63
+ targetDimension: z.ZodOptional<z.ZodString>;
64
+ sql: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strip>, z.ZodLiteral<false>]>>>;
66
+ measures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
67
+ name: z.ZodString;
68
+ description: z.ZodOptional<z.ZodString>;
69
+ type: z.ZodEnum<typeof import("../type-enums").MeasureTypesEnum>;
70
+ format: z.ZodOptional<z.ZodEnum<typeof import("../type-enums").MeasureFormatsEnum>>;
71
+ index: z.ZodOptional<z.ZodString>;
72
+ sql: z.ZodOptional<z.ZodString>;
73
+ dimension: z.ZodOptional<z.ZodString>;
74
+ public: z.ZodOptional<z.ZodBoolean>;
75
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
76
+ }, z.core.$strip>, z.ZodLiteral<false>]>>>;
77
+ preAggregations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
78
+ type: z.ZodOptional<z.ZodEnum<{
79
+ rollup: "rollup";
80
+ original_sql: "original_sql";
81
+ rollup_join: "rollup_join";
82
+ }>>;
83
+ measures: z.ZodOptional<z.ZodArray<z.ZodString>>;
84
+ dimensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
85
+ segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
86
+ timeDimension: z.ZodOptional<z.ZodString>;
87
+ granularity: z.ZodOptional<z.ZodString>;
88
+ partitionGranularity: z.ZodOptional<z.ZodString>;
89
+ rollups: z.ZodOptional<z.ZodArray<z.ZodString>>;
90
+ refreshKeySql: z.ZodOptional<z.ZodString>;
91
+ refreshKeyEvery: z.ZodOptional<z.ZodString>;
92
+ refreshKeyIncremental: z.ZodOptional<z.ZodBoolean>;
93
+ refreshKeyUpdateWindow: z.ZodOptional<z.ZodString>;
94
+ buildRangeStartSql: z.ZodOptional<z.ZodString>;
95
+ buildRangeEndSql: z.ZodOptional<z.ZodString>;
96
+ lambda: z.ZodOptional<z.ZodBoolean>;
97
+ }, z.core.$strip>, z.ZodLiteral<false>]>>>;
98
+ }, z.core.$strip>;
99
+ export interface DatasetInterface {
100
+ name: string;
101
+ description: string;
102
+ type: DatasetTypeEnum;
103
+ prefix: string;
104
+ parent?: string;
105
+ sql?: string;
106
+ refreshSql?: string;
107
+ meta?: MetaInterface;
108
+ collection?: CollectionInterface;
109
+ dimensions?: DimensionsInterface;
110
+ segments?: SegmentsInterface;
111
+ relations?: RelationsInterface;
112
+ measures?: MeasuresInterface;
113
+ preAggregations?: PreAggregationsInterface;
114
+ }