@transai/connector-runner-otto-fleet-manager-v2 0.6.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 (89) hide show
  1. package/CHANGELOG.md +73 -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-otto-fleet-manager-v2/src/index.d.ts +1 -0
  8. package/libs/connector-runner-otto-fleet-manager-v2/src/lib/actions/actions-handler.d.ts +8 -0
  9. package/libs/connector-runner-otto-fleet-manager-v2/src/lib/actions/base-action.d.ts +9 -0
  10. package/libs/connector-runner-otto-fleet-manager-v2/src/lib/actions/create-mission.action.d.ts +11 -0
  11. package/libs/connector-runner-otto-fleet-manager-v2/src/lib/connector-runner-otto-fleet-manager-v2.d.ts +8 -0
  12. package/libs/connector-runner-otto-fleet-manager-v2/src/lib/extractors/missions.extractor.d.ts +10 -0
  13. package/libs/connector-runner-otto-fleet-manager-v2/src/lib/types.d.ts +58 -0
  14. package/libs/connector-runtime-sdk/src/index.d.ts +4 -0
  15. package/libs/connector-runtime-sdk/src/lib/connector-runtime.d.ts +16 -0
  16. package/libs/connector-runtime-sdk/src/lib/connector-runtime.interface.d.ts +5 -0
  17. package/libs/connector-runtime-sdk/src/lib/sdk/files.sdk.interface.d.ts +19 -0
  18. package/libs/connector-runtime-sdk/src/lib/sdk/http-client.interface.d.ts +47 -0
  19. package/libs/connector-runtime-sdk/src/lib/sdk/index.d.ts +10 -0
  20. package/libs/connector-runtime-sdk/src/lib/sdk/logger.sdk.interface.d.ts +7 -0
  21. package/libs/connector-runtime-sdk/src/lib/sdk/offset-store.sdk.interface.d.ts +12 -0
  22. package/libs/connector-runtime-sdk/src/lib/sdk/processing.sdk.interface.d.ts +13 -0
  23. package/libs/connector-runtime-sdk/src/lib/sdk/receiver.sdk.interface.d.ts +14 -0
  24. package/libs/connector-runtime-sdk/src/lib/sdk/sdk.interface.d.ts +31 -0
  25. package/libs/connector-runtime-sdk/src/lib/sdk/sender.sdk.interface.d.ts +22 -0
  26. package/libs/connector-runtime-sdk/src/lib/sdk/telemetry.sdk.interface.d.ts +15 -0
  27. package/libs/connector-runtime-sdk/src/lib/sdk/templating.sdk.interface.d.ts +12 -0
  28. package/libs/connector-runtime-sdk/src/lib/support/index.d.ts +1 -0
  29. package/libs/connector-runtime-sdk/src/lib/support/null-logger.d.ts +8 -0
  30. package/libs/types/src/index.d.ts +7 -0
  31. package/libs/types/src/lib/cube-query-config.types.d.ts +20 -0
  32. package/libs/types/src/lib/file-action.types.d.ts +5 -0
  33. package/libs/types/src/lib/http-status-codes.enum.d.ts +64 -0
  34. package/libs/types/src/lib/management-api/action-definition.interface.d.ts +12 -0
  35. package/libs/types/src/lib/management-api/chart.interface.d.ts +9 -0
  36. package/libs/types/src/lib/management-api/connector/connector.interface.d.ts +52 -0
  37. package/libs/types/src/lib/management-api/connector/connectors.interface.d.ts +38 -0
  38. package/libs/types/src/lib/management-api/connector-orchestrator-config.interface.d.ts +14 -0
  39. package/libs/types/src/lib/management-api/cube-dataset.interface.d.ts +93 -0
  40. package/libs/types/src/lib/management-api/dashboard.interface.d.ts +35 -0
  41. package/libs/types/src/lib/management-api/dataset/collection.interface.d.ts +10 -0
  42. package/libs/types/src/lib/management-api/dataset/dataset-record.interface.d.ts +5 -0
  43. package/libs/types/src/lib/management-api/dataset/dataset.interface.d.ts +114 -0
  44. package/libs/types/src/lib/management-api/dataset/datasets.interface.d.ts +94 -0
  45. package/libs/types/src/lib/management-api/dataset/dimension.interface.d.ts +51 -0
  46. package/libs/types/src/lib/management-api/dataset/dimensions.interface.d.ts +32 -0
  47. package/libs/types/src/lib/management-api/dataset/filter-group.interface.d.ts +8 -0
  48. package/libs/types/src/lib/management-api/dataset/filter.interface.d.ts +14 -0
  49. package/libs/types/src/lib/management-api/dataset/filters.interface.d.ts +7 -0
  50. package/libs/types/src/lib/management-api/dataset/measure.interface.d.ts +25 -0
  51. package/libs/types/src/lib/management-api/dataset/measures.interface.d.ts +16 -0
  52. package/libs/types/src/lib/management-api/dataset/meta.interface.d.ts +9 -0
  53. package/libs/types/src/lib/management-api/dataset/pre-aggregate.interface.d.ts +41 -0
  54. package/libs/types/src/lib/management-api/dataset/pre-aggregations.interface.d.ts +26 -0
  55. package/libs/types/src/lib/management-api/dataset/relation.interface.d.ts +16 -0
  56. package/libs/types/src/lib/management-api/dataset/relations.interface.d.ts +12 -0
  57. package/libs/types/src/lib/management-api/dataset/segment.interface.d.ts +17 -0
  58. package/libs/types/src/lib/management-api/dataset/segments.interface.d.ts +15 -0
  59. package/libs/types/src/lib/management-api/dataset/switch.interface.d.ts +20 -0
  60. package/libs/types/src/lib/management-api/dataset/when-item.interface.d.ts +15 -0
  61. package/libs/types/src/lib/management-api/dataset/when-items.interface.d.ts +14 -0
  62. package/libs/types/src/lib/management-api/event-origin.interface.d.ts +24 -0
  63. package/libs/types/src/lib/management-api/index.d.ts +39 -0
  64. package/libs/types/src/lib/management-api/semantic-trigger/custom-cron-trigger-record.interface.d.ts +6 -0
  65. package/libs/types/src/lib/management-api/semantic-trigger/index.d.ts +6 -0
  66. package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filter.interface.d.ts +12 -0
  67. package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filters.interface.d.ts +10 -0
  68. package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-record.interface.d.ts +6 -0
  69. package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger.interface.d.ts +35 -0
  70. package/libs/types/src/lib/management-api/semantic-trigger/semantic-triggers.interface.d.ts +22 -0
  71. package/libs/types/src/lib/management-api/template-implementation-overrides.interface.d.ts +148 -0
  72. package/libs/types/src/lib/management-api/template-implementation.interface.d.ts +309 -0
  73. package/libs/types/src/lib/management-api/template.interface.d.ts +177 -0
  74. package/libs/types/src/lib/management-api/tenant.interface.d.ts +8 -0
  75. package/libs/types/src/lib/management-api/type-enums.d.ts +85 -0
  76. package/libs/types/src/lib/management-api/web/generic-filter.dto.d.ts +37 -0
  77. package/libs/types/src/lib/management-api/web/index.d.ts +2 -0
  78. package/libs/types/src/lib/management-api/web/paginated-response.interface.d.ts +17 -0
  79. package/libs/types/src/lib/management-api/workflow/action.interface.d.ts +71 -0
  80. package/libs/types/src/lib/management-api/workflow/index.d.ts +6 -0
  81. package/libs/types/src/lib/management-api/workflow/offset.interface.d.ts +14 -0
  82. package/libs/types/src/lib/management-api/workflow/trigger-types.interface.d.ts +14 -0
  83. package/libs/types/src/lib/management-api/workflow/workflow-definition.interface.d.ts +64 -0
  84. package/libs/types/src/lib/management-api/workflow/workflow-run.d.ts +66 -0
  85. package/libs/types/src/lib/management-api/workflow/workflow.drawing.d.ts +94 -0
  86. package/libs/types/src/lib/message.types.d.ts +59 -0
  87. package/libs/types/src/lib/response.types.d.ts +27 -0
  88. package/libs/types/src/lib/types.d.ts +134 -0
  89. package/package.json +16 -0
@@ -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
+ }
@@ -0,0 +1,94 @@
1
+ import { z } from 'zod';
2
+ import { DatasetInterface } from './dataset.interface';
3
+ export declare const DatasetsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
4
+ name: z.ZodString;
5
+ description: z.ZodString;
6
+ type: z.ZodEnum<typeof import("..").DatasetTypeEnum>;
7
+ prefix: z.ZodString;
8
+ parent: z.ZodOptional<z.ZodString>;
9
+ sql: z.ZodOptional<z.ZodString>;
10
+ 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]>>>;
11
+ collection: z.ZodOptional<z.ZodObject<{
12
+ collection: z.ZodString;
13
+ filters: z.ZodOptional<z.ZodType<import("./filters.interface").FiltersInterface, unknown, z.core.$ZodTypeInternals<import("./filters.interface").FiltersInterface, unknown>>>;
14
+ }, z.core.$strip>>;
15
+ dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
16
+ name: z.ZodString;
17
+ description: z.ZodString;
18
+ type: z.ZodEnum<typeof import("..").DimensionTypesEnum>;
19
+ format: z.ZodOptional<z.ZodEnum<typeof import("..").DimensionFormatsEnum>>;
20
+ explode: z.ZodOptional<z.ZodBoolean>;
21
+ index: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
22
+ switch: z.ZodOptional<z.ZodObject<{
23
+ when: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
24
+ sql: z.ZodOptional<z.ZodString>;
25
+ dimension: z.ZodOptional<z.ZodString>;
26
+ operator: z.ZodOptional<z.ZodEnum<typeof import("..").FilterOperatorsEnum>>;
27
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
28
+ }, z.core.$strip>, z.ZodObject<{
29
+ label: z.ZodString;
30
+ description: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strip>>, z.ZodLiteral<false>]>>;
32
+ else: z.ZodOptional<z.ZodString>;
33
+ segment: z.ZodOptional<z.ZodBoolean>;
34
+ }, z.core.$strip>>;
35
+ field: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
36
+ sql: z.ZodOptional<z.ZodString>;
37
+ public: z.ZodOptional<z.ZodBoolean>;
38
+ primaryKey: z.ZodOptional<z.ZodBoolean>;
39
+ subQuery: z.ZodOptional<z.ZodBoolean>;
40
+ 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]>>>;
41
+ }, z.core.$strip>, z.ZodLiteral<false>]>>>;
42
+ segments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
43
+ sql: z.ZodOptional<z.ZodString>;
44
+ dimension: z.ZodOptional<z.ZodString>;
45
+ operator: z.ZodOptional<z.ZodEnum<typeof import("..").FilterOperatorsEnum>>;
46
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
47
+ }, z.core.$strip>, z.ZodObject<{
48
+ name: z.ZodOptional<z.ZodString>;
49
+ description: z.ZodOptional<z.ZodString>;
50
+ public: z.ZodOptional<z.ZodBoolean>;
51
+ }, z.core.$strip>>, z.ZodLiteral<false>]>>>;
52
+ relations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
53
+ type: z.ZodEnum<typeof import("..").RelationTypesEnum>;
54
+ dimension: z.ZodOptional<z.ZodString>;
55
+ targetDataset: z.ZodString;
56
+ targetDimension: z.ZodOptional<z.ZodString>;
57
+ sql: z.ZodOptional<z.ZodString>;
58
+ }, z.core.$strip>, z.ZodLiteral<false>]>>>;
59
+ measures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
60
+ name: z.ZodString;
61
+ description: z.ZodOptional<z.ZodString>;
62
+ type: z.ZodEnum<typeof import("..").MeasureTypesEnum>;
63
+ format: z.ZodOptional<z.ZodEnum<typeof import("..").MeasureFormatsEnum>>;
64
+ index: z.ZodOptional<z.ZodString>;
65
+ sql: z.ZodOptional<z.ZodString>;
66
+ dimension: z.ZodOptional<z.ZodString>;
67
+ public: z.ZodOptional<z.ZodBoolean>;
68
+ 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]>>>;
69
+ }, z.core.$strip>, z.ZodLiteral<false>]>>>;
70
+ preAggregations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
71
+ type: z.ZodOptional<z.ZodEnum<{
72
+ rollup: "rollup";
73
+ original_sql: "original_sql";
74
+ rollup_join: "rollup_join";
75
+ }>>;
76
+ measures: z.ZodOptional<z.ZodArray<z.ZodString>>;
77
+ dimensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
+ segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
79
+ timeDimension: z.ZodOptional<z.ZodString>;
80
+ granularity: z.ZodOptional<z.ZodString>;
81
+ partitionGranularity: z.ZodOptional<z.ZodString>;
82
+ rollups: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
+ refreshKeySql: z.ZodOptional<z.ZodString>;
84
+ refreshKeyEvery: z.ZodOptional<z.ZodString>;
85
+ refreshKeyIncremental: z.ZodOptional<z.ZodBoolean>;
86
+ refreshKeyUpdateWindow: z.ZodOptional<z.ZodString>;
87
+ buildRangeStartSql: z.ZodOptional<z.ZodString>;
88
+ buildRangeEndSql: z.ZodOptional<z.ZodString>;
89
+ lambda: z.ZodOptional<z.ZodBoolean>;
90
+ }, z.core.$strip>, z.ZodLiteral<false>]>>>;
91
+ }, z.core.$strip>, z.ZodBoolean]>>;
92
+ export interface DatasetsInterface {
93
+ [key: string]: DatasetInterface | boolean;
94
+ }
@@ -0,0 +1,51 @@
1
+ import { z } from 'zod';
2
+ import { DimensionFormatsEnum, DimensionTypesEnum } from '../type-enums';
3
+ import { SwitchInterface } from './switch.interface';
4
+ import { MetaInterface } from './meta.interface';
5
+ export declare const DimensionSchema: z.ZodObject<{
6
+ name: z.ZodString;
7
+ description: z.ZodString;
8
+ type: z.ZodEnum<typeof DimensionTypesEnum>;
9
+ format: z.ZodOptional<z.ZodEnum<typeof DimensionFormatsEnum>>;
10
+ explode: z.ZodOptional<z.ZodBoolean>;
11
+ index: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
12
+ switch: z.ZodOptional<z.ZodObject<{
13
+ when: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
14
+ sql: z.ZodOptional<z.ZodString>;
15
+ dimension: z.ZodOptional<z.ZodString>;
16
+ operator: z.ZodOptional<z.ZodEnum<typeof import("../type-enums").FilterOperatorsEnum>>;
17
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
18
+ }, z.core.$strip>, z.ZodObject<{
19
+ label: z.ZodString;
20
+ description: z.ZodOptional<z.ZodString>;
21
+ }, z.core.$strip>>, z.ZodLiteral<false>]>>;
22
+ else: z.ZodOptional<z.ZodString>;
23
+ segment: z.ZodOptional<z.ZodBoolean>;
24
+ }, z.core.$strip>>;
25
+ field: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
26
+ sql: z.ZodOptional<z.ZodString>;
27
+ public: z.ZodOptional<z.ZodBoolean>;
28
+ primaryKey: z.ZodOptional<z.ZodBoolean>;
29
+ subQuery: z.ZodOptional<z.ZodBoolean>;
30
+ 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]>>>;
31
+ }, z.core.$strip>;
32
+ export interface DimensionInterface {
33
+ name: string;
34
+ description: string;
35
+ type: DimensionTypesEnum;
36
+ format?: DimensionFormatsEnum;
37
+ explode?: boolean;
38
+ index?: boolean | string;
39
+ switch?: SwitchInterface;
40
+ field?: string | Array<string>;
41
+ sql?: string;
42
+ public?: boolean;
43
+ primaryKey?: boolean;
44
+ subQuery?: boolean;
45
+ meta?: MetaInterface;
46
+ granularities?: {
47
+ [key: string]: {
48
+ interval: string;
49
+ };
50
+ };
51
+ }
@@ -0,0 +1,32 @@
1
+ import { z } from 'zod';
2
+ import { DimensionInterface } from './dimension.interface';
3
+ export declare const DimensionsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
4
+ name: z.ZodString;
5
+ description: z.ZodString;
6
+ type: z.ZodEnum<typeof import("..").DimensionTypesEnum>;
7
+ format: z.ZodOptional<z.ZodEnum<typeof import("..").DimensionFormatsEnum>>;
8
+ explode: z.ZodOptional<z.ZodBoolean>;
9
+ index: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
10
+ switch: z.ZodOptional<z.ZodObject<{
11
+ when: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
12
+ sql: z.ZodOptional<z.ZodString>;
13
+ dimension: z.ZodOptional<z.ZodString>;
14
+ operator: z.ZodOptional<z.ZodEnum<typeof import("..").FilterOperatorsEnum>>;
15
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
16
+ }, z.core.$strip>, z.ZodObject<{
17
+ label: z.ZodString;
18
+ description: z.ZodOptional<z.ZodString>;
19
+ }, z.core.$strip>>, z.ZodLiteral<false>]>>;
20
+ else: z.ZodOptional<z.ZodString>;
21
+ segment: z.ZodOptional<z.ZodBoolean>;
22
+ }, z.core.$strip>>;
23
+ field: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
24
+ sql: z.ZodOptional<z.ZodString>;
25
+ public: z.ZodOptional<z.ZodBoolean>;
26
+ primaryKey: z.ZodOptional<z.ZodBoolean>;
27
+ subQuery: z.ZodOptional<z.ZodBoolean>;
28
+ 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]>>>;
29
+ }, z.core.$strip>, z.ZodLiteral<false>]>>;
30
+ export interface DimensionsInterface {
31
+ [key: string]: DimensionInterface | false;
32
+ }
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ import { FiltersInterface } from './filters.interface';
3
+ import { FilterGroupTypesEnum } from '../type-enums';
4
+ export declare const FilterGroupSchema: z.ZodType<FilterGroupInterface>;
5
+ export interface FilterGroupInterface {
6
+ type: FilterGroupTypesEnum;
7
+ filters: FiltersInterface;
8
+ }
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { FilterOperatorsEnum, FilterValueType } from '../type-enums';
3
+ export declare const FilterSchema: z.ZodObject<{
4
+ sql: z.ZodOptional<z.ZodString>;
5
+ dimension: z.ZodOptional<z.ZodString>;
6
+ operator: z.ZodOptional<z.ZodEnum<typeof FilterOperatorsEnum>>;
7
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
8
+ }, z.core.$strip>;
9
+ export interface FilterInterface {
10
+ dimension?: string;
11
+ operator?: FilterOperatorsEnum;
12
+ value?: FilterValueType;
13
+ sql?: string;
14
+ }