@transai/connector-runner-dummy-node 0.2.0 → 0.2.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.
- package/CHANGELOG.md +26 -1
- package/index.cjs +2 -0
- package/index.cjs.map +7 -0
- package/index.js +2 -0
- package/index.js.map +7 -0
- package/libs/connector-runner-dummy-node/src/lib/connector-runner-dummy-node.d.ts +8 -0
- package/libs/connector-runtime-sdk/src/index.d.ts +3 -0
- package/libs/connector-runtime-sdk/src/lib/connector-runtime.d.ts +16 -0
- package/libs/connector-runtime-sdk/src/lib/connector-runtime.interface.d.ts +5 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/files.sdk.interface.d.ts +18 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/http-client.interface.d.ts +46 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/index.d.ts +10 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/logger.sdk.interface.d.ts +7 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/offset-store.sdk.interface.d.ts +12 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/processing.sdk.interface.d.ts +13 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/receiver.sdk.interface.d.ts +14 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/sdk.interface.d.ts +31 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/sender.sdk.interface.d.ts +22 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/telemetry.sdk.interface.d.ts +15 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/templating.sdk.interface.d.ts +12 -0
- package/libs/types/src/index.d.ts +7 -0
- package/libs/types/src/lib/cube-query-config.types.d.ts +20 -0
- package/libs/types/src/lib/file-action.types.d.ts +5 -0
- package/libs/types/src/lib/http-status-codes.enum.d.ts +64 -0
- package/libs/types/src/lib/management-api/action-definition.interface.d.ts +12 -0
- package/libs/types/src/lib/management-api/chart.interface.d.ts +9 -0
- package/libs/types/src/lib/management-api/connector/connector.interface.d.ts +52 -0
- package/libs/types/src/lib/management-api/connector/connectors.interface.d.ts +38 -0
- package/libs/types/src/lib/management-api/connector-orchestrator-config.interface.d.ts +14 -0
- package/libs/types/src/lib/management-api/cube-dataset.interface.d.ts +93 -0
- package/libs/types/src/lib/management-api/dashboard.interface.d.ts +35 -0
- package/libs/types/src/lib/management-api/dataset/collection.interface.d.ts +10 -0
- package/libs/types/src/lib/management-api/dataset/dataset-record.interface.d.ts +5 -0
- package/libs/types/src/lib/management-api/dataset/dataset.interface.d.ts +114 -0
- package/libs/types/src/lib/management-api/dataset/datasets.interface.d.ts +94 -0
- package/libs/types/src/lib/management-api/dataset/dimension.interface.d.ts +51 -0
- package/libs/types/src/lib/management-api/dataset/dimensions.interface.d.ts +32 -0
- package/libs/types/src/lib/management-api/dataset/filter-group.interface.d.ts +8 -0
- package/libs/types/src/lib/management-api/dataset/filter.interface.d.ts +14 -0
- package/libs/types/src/lib/management-api/dataset/filters.interface.d.ts +7 -0
- package/libs/types/src/lib/management-api/dataset/measure.interface.d.ts +25 -0
- package/libs/types/src/lib/management-api/dataset/measures.interface.d.ts +16 -0
- package/libs/types/src/lib/management-api/dataset/meta.interface.d.ts +9 -0
- package/libs/types/src/lib/management-api/dataset/pre-aggregate.interface.d.ts +41 -0
- package/libs/types/src/lib/management-api/dataset/pre-aggregations.interface.d.ts +26 -0
- package/libs/types/src/lib/management-api/dataset/relation.interface.d.ts +16 -0
- package/libs/types/src/lib/management-api/dataset/relations.interface.d.ts +12 -0
- package/libs/types/src/lib/management-api/dataset/segment.interface.d.ts +17 -0
- package/libs/types/src/lib/management-api/dataset/segments.interface.d.ts +15 -0
- package/libs/types/src/lib/management-api/dataset/switch.interface.d.ts +20 -0
- package/libs/types/src/lib/management-api/dataset/when-item.interface.d.ts +15 -0
- package/libs/types/src/lib/management-api/dataset/when-items.interface.d.ts +14 -0
- package/libs/types/src/lib/management-api/event-origin.interface.d.ts +24 -0
- package/libs/types/src/lib/management-api/index.d.ts +39 -0
- package/libs/types/src/lib/management-api/semantic-trigger/custom-cron-trigger-record.interface.d.ts +6 -0
- package/libs/types/src/lib/management-api/semantic-trigger/index.d.ts +6 -0
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filter.interface.d.ts +12 -0
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filters.interface.d.ts +10 -0
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-record.interface.d.ts +6 -0
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger.interface.d.ts +35 -0
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-triggers.interface.d.ts +22 -0
- package/libs/types/src/lib/management-api/template-implementation-overrides.interface.d.ts +148 -0
- package/libs/types/src/lib/management-api/template-implementation.interface.d.ts +307 -0
- package/libs/types/src/lib/management-api/template.interface.d.ts +177 -0
- package/libs/types/src/lib/management-api/tenant.interface.d.ts +8 -0
- package/libs/types/src/lib/management-api/type-enums.d.ts +85 -0
- package/libs/types/src/lib/management-api/web/generic-filter.dto.d.ts +37 -0
- package/libs/types/src/lib/management-api/web/index.d.ts +2 -0
- package/libs/types/src/lib/management-api/web/paginated-response.interface.d.ts +17 -0
- package/libs/types/src/lib/management-api/workflow/action.interface.d.ts +50 -0
- package/libs/types/src/lib/management-api/workflow/index.d.ts +6 -0
- package/libs/types/src/lib/management-api/workflow/offset.interface.d.ts +14 -0
- package/libs/types/src/lib/management-api/workflow/trigger-types.interface.d.ts +14 -0
- package/libs/types/src/lib/management-api/workflow/workflow-definition.interface.d.ts +57 -0
- package/libs/types/src/lib/management-api/workflow/workflow-run.d.ts +70 -0
- package/libs/types/src/lib/management-api/workflow/workflow.drawing.d.ts +102 -0
- package/libs/types/src/lib/message.types.d.ts +59 -0
- package/libs/types/src/lib/response.types.d.ts +27 -0
- package/libs/types/src/lib/types.d.ts +119 -0
- package/package.json +10 -1
- package/.eslintrc.json +0 -30
- package/jest.config.ts +0 -10
- package/project.json +0 -41
- package/src/lib/connector-runner-dummy-node.ts +0 -52
- package/tsconfig.json +0 -22
- package/tsconfig.lib.json +0 -10
- package/tsconfig.spec.json +0 -14
- /package/{src/index.ts → libs/connector-runner-dummy-node/src/index.d.ts} +0 -0
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TemplateInterface } from './template.interface';
|
|
3
|
+
import { TemplateImplementationOverridesInterface } from './template-implementation-overrides.interface';
|
|
4
|
+
export declare const TemplateImplementationSchema: z.ZodObject<{
|
|
5
|
+
templateVersion: z.ZodUnion<[z.ZodLiteral<"latest">, z.ZodString]>;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
description: z.ZodString;
|
|
8
|
+
overrides: z.ZodObject<{
|
|
9
|
+
datasets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
description: z.ZodString;
|
|
12
|
+
type: z.ZodEnum<typeof import("./type-enums").DatasetTypeEnum>;
|
|
13
|
+
prefix: z.ZodString;
|
|
14
|
+
parent: z.ZodOptional<z.ZodString>;
|
|
15
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
16
|
+
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]>>>;
|
|
17
|
+
collection: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
collection: z.ZodString;
|
|
19
|
+
filters: z.ZodOptional<z.ZodType<import(".").FiltersInterface, unknown, z.core.$ZodTypeInternals<import(".").FiltersInterface, unknown>>>;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
description: z.ZodString;
|
|
24
|
+
type: z.ZodEnum<typeof import("./type-enums").DimensionTypesEnum>;
|
|
25
|
+
format: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").DimensionFormatsEnum>>;
|
|
26
|
+
explode: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
index: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
28
|
+
switch: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
when: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
30
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
31
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
32
|
+
operator: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").FilterOperatorsEnum>>;
|
|
33
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
label: z.ZodString;
|
|
36
|
+
description: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>>, z.ZodLiteral<false>]>>;
|
|
38
|
+
else: z.ZodOptional<z.ZodString>;
|
|
39
|
+
segment: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
field: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
42
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
43
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
primaryKey: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
subQuery: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
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]>>>;
|
|
47
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
48
|
+
segments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
49
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
50
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
51
|
+
operator: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").FilterOperatorsEnum>>;
|
|
52
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
name: z.ZodOptional<z.ZodString>;
|
|
55
|
+
description: z.ZodOptional<z.ZodString>;
|
|
56
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
}, z.core.$strip>>, z.ZodLiteral<false>]>>>;
|
|
58
|
+
relations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
59
|
+
type: z.ZodEnum<typeof import("./type-enums").RelationTypesEnum>;
|
|
60
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
61
|
+
targetDataset: z.ZodString;
|
|
62
|
+
targetDimension: z.ZodOptional<z.ZodString>;
|
|
63
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
65
|
+
measures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
66
|
+
name: z.ZodString;
|
|
67
|
+
description: z.ZodOptional<z.ZodString>;
|
|
68
|
+
type: z.ZodEnum<typeof import("./type-enums").MeasureTypesEnum>;
|
|
69
|
+
format: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").MeasureFormatsEnum>>;
|
|
70
|
+
index: z.ZodOptional<z.ZodString>;
|
|
71
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
72
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
73
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
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]>>>;
|
|
75
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
76
|
+
preAggregations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
77
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
rollup: "rollup";
|
|
79
|
+
original_sql: "original_sql";
|
|
80
|
+
rollup_join: "rollup_join";
|
|
81
|
+
}>>;
|
|
82
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
83
|
+
dimensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
84
|
+
segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
85
|
+
timeDimension: z.ZodOptional<z.ZodString>;
|
|
86
|
+
granularity: z.ZodOptional<z.ZodString>;
|
|
87
|
+
partitionGranularity: z.ZodOptional<z.ZodString>;
|
|
88
|
+
rollups: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
89
|
+
refreshKeySql: z.ZodOptional<z.ZodString>;
|
|
90
|
+
refreshKeyEvery: z.ZodOptional<z.ZodString>;
|
|
91
|
+
refreshKeyIncremental: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
refreshKeyUpdateWindow: z.ZodOptional<z.ZodString>;
|
|
93
|
+
buildRangeStartSql: z.ZodOptional<z.ZodString>;
|
|
94
|
+
buildRangeEndSql: z.ZodOptional<z.ZodString>;
|
|
95
|
+
lambda: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
97
|
+
}, z.core.$strip>, z.ZodBoolean]>>>;
|
|
98
|
+
semanticTriggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
99
|
+
name: z.ZodOptional<z.ZodString>;
|
|
100
|
+
description: z.ZodOptional<z.ZodString>;
|
|
101
|
+
eventType: z.ZodString;
|
|
102
|
+
dataset: z.ZodString;
|
|
103
|
+
dimensions: z.ZodArray<z.ZodString>;
|
|
104
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
106
|
+
dimension: z.ZodString;
|
|
107
|
+
operator: z.ZodEnum<typeof import("./type-enums").SemanticTriggerFilterOperatorsEnum>;
|
|
108
|
+
values: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>;
|
|
109
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
110
|
+
cron: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
tz: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
|
+
incrementalField: z.ZodOptional<z.ZodString>;
|
|
113
|
+
ungrouped: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
}, z.core.$strip>, z.ZodBoolean]>>>;
|
|
115
|
+
connectors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
116
|
+
identifier: z.ZodString;
|
|
117
|
+
connectorType: z.ZodEnum<typeof import("../types").ConfiguredConnectorTypes>;
|
|
118
|
+
name: z.ZodString;
|
|
119
|
+
location: z.ZodString;
|
|
120
|
+
config: z.ZodObject<{}, z.core.$loose>;
|
|
121
|
+
enabled: z.ZodBoolean;
|
|
122
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
123
|
+
identifier: z.ZodString;
|
|
124
|
+
version: z.ZodString;
|
|
125
|
+
name: z.ZodString;
|
|
126
|
+
description: z.ZodOptional<z.ZodString>;
|
|
127
|
+
config: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
128
|
+
inputParameters: z.ZodArray<z.ZodObject<{
|
|
129
|
+
name: z.ZodString;
|
|
130
|
+
description: z.ZodOptional<z.ZodString>;
|
|
131
|
+
type: z.ZodEnum<{
|
|
132
|
+
string: "string";
|
|
133
|
+
number: "number";
|
|
134
|
+
boolean: "boolean";
|
|
135
|
+
array: "array";
|
|
136
|
+
}>;
|
|
137
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
+
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
outputParameters: z.ZodAny;
|
|
141
|
+
mode: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").ConnectorOrigin>>;
|
|
142
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
143
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
144
|
+
}, z.core.$strip>>>;
|
|
145
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
146
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
147
|
+
}, z.core.$strip>, z.ZodBoolean]>>>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
export declare const TemplateImplementationCreateSchema: z.ZodObject<{
|
|
151
|
+
templateVersion: z.ZodUnion<[z.ZodLiteral<"latest">, z.ZodString]>;
|
|
152
|
+
name: z.ZodString;
|
|
153
|
+
description: z.ZodString;
|
|
154
|
+
overrides: z.ZodObject<{
|
|
155
|
+
datasets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
156
|
+
name: z.ZodString;
|
|
157
|
+
description: z.ZodString;
|
|
158
|
+
type: z.ZodEnum<typeof import("./type-enums").DatasetTypeEnum>;
|
|
159
|
+
prefix: z.ZodString;
|
|
160
|
+
parent: z.ZodOptional<z.ZodString>;
|
|
161
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
162
|
+
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]>>>;
|
|
163
|
+
collection: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
collection: z.ZodString;
|
|
165
|
+
filters: z.ZodOptional<z.ZodType<import(".").FiltersInterface, unknown, z.core.$ZodTypeInternals<import(".").FiltersInterface, unknown>>>;
|
|
166
|
+
}, z.core.$strip>>;
|
|
167
|
+
dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
168
|
+
name: z.ZodString;
|
|
169
|
+
description: z.ZodString;
|
|
170
|
+
type: z.ZodEnum<typeof import("./type-enums").DimensionTypesEnum>;
|
|
171
|
+
format: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").DimensionFormatsEnum>>;
|
|
172
|
+
explode: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
index: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
174
|
+
switch: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
when: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
176
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
177
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
178
|
+
operator: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").FilterOperatorsEnum>>;
|
|
179
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
|
|
180
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
181
|
+
label: z.ZodString;
|
|
182
|
+
description: z.ZodOptional<z.ZodString>;
|
|
183
|
+
}, z.core.$strip>>, z.ZodLiteral<false>]>>;
|
|
184
|
+
else: z.ZodOptional<z.ZodString>;
|
|
185
|
+
segment: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
+
}, z.core.$strip>>;
|
|
187
|
+
field: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
188
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
189
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
190
|
+
primaryKey: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
+
subQuery: z.ZodOptional<z.ZodBoolean>;
|
|
192
|
+
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]>>>;
|
|
193
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
194
|
+
segments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
195
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
196
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
197
|
+
operator: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").FilterOperatorsEnum>>;
|
|
198
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
|
|
199
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
200
|
+
name: z.ZodOptional<z.ZodString>;
|
|
201
|
+
description: z.ZodOptional<z.ZodString>;
|
|
202
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
+
}, z.core.$strip>>, z.ZodLiteral<false>]>>>;
|
|
204
|
+
relations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
205
|
+
type: z.ZodEnum<typeof import("./type-enums").RelationTypesEnum>;
|
|
206
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
207
|
+
targetDataset: z.ZodString;
|
|
208
|
+
targetDimension: z.ZodOptional<z.ZodString>;
|
|
209
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
210
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
211
|
+
measures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
212
|
+
name: z.ZodString;
|
|
213
|
+
description: z.ZodOptional<z.ZodString>;
|
|
214
|
+
type: z.ZodEnum<typeof import("./type-enums").MeasureTypesEnum>;
|
|
215
|
+
format: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").MeasureFormatsEnum>>;
|
|
216
|
+
index: z.ZodOptional<z.ZodString>;
|
|
217
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
218
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
219
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
220
|
+
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]>>>;
|
|
221
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
222
|
+
preAggregations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
223
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
224
|
+
rollup: "rollup";
|
|
225
|
+
original_sql: "original_sql";
|
|
226
|
+
rollup_join: "rollup_join";
|
|
227
|
+
}>>;
|
|
228
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
229
|
+
dimensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
230
|
+
segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
231
|
+
timeDimension: z.ZodOptional<z.ZodString>;
|
|
232
|
+
granularity: z.ZodOptional<z.ZodString>;
|
|
233
|
+
partitionGranularity: z.ZodOptional<z.ZodString>;
|
|
234
|
+
rollups: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
235
|
+
refreshKeySql: z.ZodOptional<z.ZodString>;
|
|
236
|
+
refreshKeyEvery: z.ZodOptional<z.ZodString>;
|
|
237
|
+
refreshKeyIncremental: z.ZodOptional<z.ZodBoolean>;
|
|
238
|
+
refreshKeyUpdateWindow: z.ZodOptional<z.ZodString>;
|
|
239
|
+
buildRangeStartSql: z.ZodOptional<z.ZodString>;
|
|
240
|
+
buildRangeEndSql: z.ZodOptional<z.ZodString>;
|
|
241
|
+
lambda: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
243
|
+
}, z.core.$strip>, z.ZodBoolean]>>>;
|
|
244
|
+
semanticTriggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
245
|
+
name: z.ZodOptional<z.ZodString>;
|
|
246
|
+
description: z.ZodOptional<z.ZodString>;
|
|
247
|
+
eventType: z.ZodString;
|
|
248
|
+
dataset: z.ZodString;
|
|
249
|
+
dimensions: z.ZodArray<z.ZodString>;
|
|
250
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
251
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
252
|
+
dimension: z.ZodString;
|
|
253
|
+
operator: z.ZodEnum<typeof import("./type-enums").SemanticTriggerFilterOperatorsEnum>;
|
|
254
|
+
values: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>;
|
|
255
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
256
|
+
cron: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
257
|
+
tz: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
258
|
+
incrementalField: z.ZodOptional<z.ZodString>;
|
|
259
|
+
ungrouped: z.ZodOptional<z.ZodBoolean>;
|
|
260
|
+
}, z.core.$strip>, z.ZodBoolean]>>>;
|
|
261
|
+
connectors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
262
|
+
identifier: z.ZodString;
|
|
263
|
+
connectorType: z.ZodEnum<typeof import("../types").ConfiguredConnectorTypes>;
|
|
264
|
+
name: z.ZodString;
|
|
265
|
+
location: z.ZodString;
|
|
266
|
+
config: z.ZodObject<{}, z.core.$loose>;
|
|
267
|
+
enabled: z.ZodBoolean;
|
|
268
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
269
|
+
identifier: z.ZodString;
|
|
270
|
+
version: z.ZodString;
|
|
271
|
+
name: z.ZodString;
|
|
272
|
+
description: z.ZodOptional<z.ZodString>;
|
|
273
|
+
config: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
274
|
+
inputParameters: z.ZodArray<z.ZodObject<{
|
|
275
|
+
name: z.ZodString;
|
|
276
|
+
description: z.ZodOptional<z.ZodString>;
|
|
277
|
+
type: z.ZodEnum<{
|
|
278
|
+
string: "string";
|
|
279
|
+
number: "number";
|
|
280
|
+
boolean: "boolean";
|
|
281
|
+
array: "array";
|
|
282
|
+
}>;
|
|
283
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
284
|
+
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
285
|
+
}, z.core.$strip>>;
|
|
286
|
+
outputParameters: z.ZodAny;
|
|
287
|
+
mode: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").ConnectorOrigin>>;
|
|
288
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
289
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
290
|
+
}, z.core.$strip>>>;
|
|
291
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
292
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
293
|
+
}, z.core.$strip>, z.ZodBoolean]>>>;
|
|
294
|
+
}, z.core.$strip>;
|
|
295
|
+
templateId: z.ZodString;
|
|
296
|
+
tenantId: z.ZodString;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
export interface TemplateImplementationInterface {
|
|
299
|
+
id: string;
|
|
300
|
+
templateId: string;
|
|
301
|
+
template: TemplateInterface;
|
|
302
|
+
templateVersion: string | 'latest';
|
|
303
|
+
tenantId: string;
|
|
304
|
+
name: string;
|
|
305
|
+
description: string;
|
|
306
|
+
overrides: TemplateImplementationOverridesInterface;
|
|
307
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { DatasetsInterface, SemanticTriggersInterface, ConnectorsInterface } from './index';
|
|
3
|
+
export declare const TemplateSchema: z.ZodObject<{
|
|
4
|
+
identifier: z.ZodString;
|
|
5
|
+
version: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
prefix: z.ZodString;
|
|
8
|
+
description: z.ZodString;
|
|
9
|
+
datasets: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
description: z.ZodString;
|
|
12
|
+
type: z.ZodEnum<typeof import("./type-enums").DatasetTypeEnum>;
|
|
13
|
+
prefix: z.ZodString;
|
|
14
|
+
parent: z.ZodOptional<z.ZodString>;
|
|
15
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
16
|
+
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]>>>;
|
|
17
|
+
collection: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
collection: z.ZodString;
|
|
19
|
+
filters: z.ZodOptional<z.ZodType<import("./index").FiltersInterface, unknown, z.core.$ZodTypeInternals<import("./index").FiltersInterface, unknown>>>;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
description: z.ZodString;
|
|
24
|
+
type: z.ZodEnum<typeof import("./type-enums").DimensionTypesEnum>;
|
|
25
|
+
format: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").DimensionFormatsEnum>>;
|
|
26
|
+
explode: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
index: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
28
|
+
switch: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
when: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
30
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
31
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
32
|
+
operator: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").FilterOperatorsEnum>>;
|
|
33
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
label: z.ZodString;
|
|
36
|
+
description: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>>, z.ZodLiteral<false>]>>;
|
|
38
|
+
else: z.ZodOptional<z.ZodString>;
|
|
39
|
+
segment: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
field: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
42
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
43
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
primaryKey: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
subQuery: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
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]>>>;
|
|
47
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
48
|
+
segments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
49
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
50
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
51
|
+
operator: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").FilterOperatorsEnum>>;
|
|
52
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
name: z.ZodOptional<z.ZodString>;
|
|
55
|
+
description: z.ZodOptional<z.ZodString>;
|
|
56
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
}, z.core.$strip>>, z.ZodLiteral<false>]>>>;
|
|
58
|
+
relations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
59
|
+
type: z.ZodEnum<typeof import("./type-enums").RelationTypesEnum>;
|
|
60
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
61
|
+
targetDataset: z.ZodString;
|
|
62
|
+
targetDimension: z.ZodOptional<z.ZodString>;
|
|
63
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
65
|
+
measures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
66
|
+
name: z.ZodString;
|
|
67
|
+
description: z.ZodOptional<z.ZodString>;
|
|
68
|
+
type: z.ZodEnum<typeof import("./type-enums").MeasureTypesEnum>;
|
|
69
|
+
format: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").MeasureFormatsEnum>>;
|
|
70
|
+
index: z.ZodOptional<z.ZodString>;
|
|
71
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
72
|
+
dimension: z.ZodOptional<z.ZodString>;
|
|
73
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
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]>>>;
|
|
75
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
76
|
+
preAggregations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
77
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
rollup: "rollup";
|
|
79
|
+
original_sql: "original_sql";
|
|
80
|
+
rollup_join: "rollup_join";
|
|
81
|
+
}>>;
|
|
82
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
83
|
+
dimensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
84
|
+
segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
85
|
+
timeDimension: z.ZodOptional<z.ZodString>;
|
|
86
|
+
granularity: z.ZodOptional<z.ZodString>;
|
|
87
|
+
partitionGranularity: z.ZodOptional<z.ZodString>;
|
|
88
|
+
rollups: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
89
|
+
refreshKeySql: z.ZodOptional<z.ZodString>;
|
|
90
|
+
refreshKeyEvery: z.ZodOptional<z.ZodString>;
|
|
91
|
+
refreshKeyIncremental: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
refreshKeyUpdateWindow: z.ZodOptional<z.ZodString>;
|
|
93
|
+
buildRangeStartSql: z.ZodOptional<z.ZodString>;
|
|
94
|
+
buildRangeEndSql: z.ZodOptional<z.ZodString>;
|
|
95
|
+
lambda: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
97
|
+
}, z.core.$strip>, z.ZodBoolean]>>;
|
|
98
|
+
semanticTriggers: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
99
|
+
name: z.ZodOptional<z.ZodString>;
|
|
100
|
+
description: z.ZodOptional<z.ZodString>;
|
|
101
|
+
eventType: z.ZodString;
|
|
102
|
+
dataset: z.ZodString;
|
|
103
|
+
dimensions: z.ZodArray<z.ZodString>;
|
|
104
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
106
|
+
dimension: z.ZodString;
|
|
107
|
+
operator: z.ZodEnum<typeof import("./type-enums").SemanticTriggerFilterOperatorsEnum>;
|
|
108
|
+
values: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>;
|
|
109
|
+
}, z.core.$strip>, z.ZodLiteral<false>]>>>;
|
|
110
|
+
cron: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
tz: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
|
+
incrementalField: z.ZodOptional<z.ZodString>;
|
|
113
|
+
ungrouped: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
}, z.core.$strip>, z.ZodBoolean]>>;
|
|
115
|
+
connectors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
116
|
+
identifier: z.ZodString;
|
|
117
|
+
connectorType: z.ZodEnum<typeof import("../types").ConfiguredConnectorTypes>;
|
|
118
|
+
name: z.ZodString;
|
|
119
|
+
location: z.ZodString;
|
|
120
|
+
config: z.ZodObject<{}, z.core.$loose>;
|
|
121
|
+
enabled: z.ZodBoolean;
|
|
122
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
123
|
+
identifier: z.ZodString;
|
|
124
|
+
version: z.ZodString;
|
|
125
|
+
name: z.ZodString;
|
|
126
|
+
description: z.ZodOptional<z.ZodString>;
|
|
127
|
+
config: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
128
|
+
inputParameters: z.ZodArray<z.ZodObject<{
|
|
129
|
+
name: z.ZodString;
|
|
130
|
+
description: z.ZodOptional<z.ZodString>;
|
|
131
|
+
type: z.ZodEnum<{
|
|
132
|
+
string: "string";
|
|
133
|
+
number: "number";
|
|
134
|
+
boolean: "boolean";
|
|
135
|
+
array: "array";
|
|
136
|
+
}>;
|
|
137
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
+
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
outputParameters: z.ZodAny;
|
|
141
|
+
mode: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").ConnectorOrigin>>;
|
|
142
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
143
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
144
|
+
}, z.core.$strip>>>;
|
|
145
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
146
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
147
|
+
}, z.core.$strip>, z.ZodBoolean]>>>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
export interface TemplateInterface {
|
|
150
|
+
id: string;
|
|
151
|
+
identifier: string;
|
|
152
|
+
version: string;
|
|
153
|
+
name: string;
|
|
154
|
+
prefix: string;
|
|
155
|
+
description: string;
|
|
156
|
+
datasets: DatasetsInterface;
|
|
157
|
+
semanticTriggers: SemanticTriggersInterface;
|
|
158
|
+
connectors?: ConnectorsInterface;
|
|
159
|
+
}
|
|
160
|
+
export interface PostTemplateInterface extends Omit<TemplateInterface, 'id'> {
|
|
161
|
+
identifier: string;
|
|
162
|
+
version: string;
|
|
163
|
+
name: string;
|
|
164
|
+
prefix: string;
|
|
165
|
+
description: string;
|
|
166
|
+
datasets: DatasetsInterface;
|
|
167
|
+
semanticTriggers: SemanticTriggersInterface;
|
|
168
|
+
connectors?: ConnectorsInterface;
|
|
169
|
+
}
|
|
170
|
+
export interface TemplateVersionInterface {
|
|
171
|
+
version: string;
|
|
172
|
+
createdAt: Date;
|
|
173
|
+
count: number;
|
|
174
|
+
}
|
|
175
|
+
export interface TemplateDetailInterface extends TemplateInterface {
|
|
176
|
+
versions: Array<TemplateVersionInterface>;
|
|
177
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare enum DatasetTypeEnum {
|
|
3
|
+
documents = "documents",
|
|
4
|
+
metrics = "metrics",
|
|
5
|
+
events = "events"
|
|
6
|
+
}
|
|
7
|
+
export declare enum FilterOperatorsEnum {
|
|
8
|
+
equals = "=",
|
|
9
|
+
notEquals = "<>",
|
|
10
|
+
greaterThan = ">",
|
|
11
|
+
greaterThanOrEqual = ">=",
|
|
12
|
+
lessThan = "<",
|
|
13
|
+
lessThanOrEqual = "<=",
|
|
14
|
+
in = "IN"
|
|
15
|
+
}
|
|
16
|
+
export declare const FilterValueType: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>;
|
|
17
|
+
export type FilterValueType = z.infer<typeof FilterValueType>;
|
|
18
|
+
export declare enum FilterGroupTypesEnum {
|
|
19
|
+
and = "AND",
|
|
20
|
+
or = "OR"
|
|
21
|
+
}
|
|
22
|
+
export declare const FieldValueType: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
23
|
+
export type FieldValueType = z.infer<typeof FieldValueType>;
|
|
24
|
+
export declare enum DimensionTypesEnum {
|
|
25
|
+
string = "string",
|
|
26
|
+
number = "number",
|
|
27
|
+
boolean = "boolean",
|
|
28
|
+
time = "time"
|
|
29
|
+
}
|
|
30
|
+
export declare enum DimensionFormatsEnum {
|
|
31
|
+
id = "image_url",
|
|
32
|
+
imageUrl = "image_url",
|
|
33
|
+
link = "link",
|
|
34
|
+
percent = "percent",
|
|
35
|
+
currency = "currency"
|
|
36
|
+
}
|
|
37
|
+
export declare enum RelationTypesEnum {
|
|
38
|
+
oneToOne = "one_to_one",
|
|
39
|
+
oneToMany = "one_to_many",
|
|
40
|
+
manyToOne = "many_to_one",
|
|
41
|
+
manyToMany = "many_to_many"
|
|
42
|
+
}
|
|
43
|
+
export declare enum MeasureTypesEnum {
|
|
44
|
+
count = "count",
|
|
45
|
+
countDistinct = "count_distinct",
|
|
46
|
+
countDistinctApprox = "count_distinct_approx",
|
|
47
|
+
sum = "sum",
|
|
48
|
+
avg = "avg",
|
|
49
|
+
min = "min",
|
|
50
|
+
max = "max",
|
|
51
|
+
string = "string",
|
|
52
|
+
time = "time",
|
|
53
|
+
boolean = "boolean",
|
|
54
|
+
number = "number"
|
|
55
|
+
}
|
|
56
|
+
export declare enum MeasureFormatsEnum {
|
|
57
|
+
percent = "percent",
|
|
58
|
+
currency = "currency"
|
|
59
|
+
}
|
|
60
|
+
export declare enum SemanticTriggerFilterOperatorsEnum {
|
|
61
|
+
equals = "equals",
|
|
62
|
+
notEquals = "notEquals",
|
|
63
|
+
contains = "contains",
|
|
64
|
+
notContains = "notContains",
|
|
65
|
+
startsWith = "startsWith",
|
|
66
|
+
notStartsWith = "notStartsWith",
|
|
67
|
+
endsWith = "endsWith",
|
|
68
|
+
notEndsWith = "notEndsWith",
|
|
69
|
+
gt = "gt",
|
|
70
|
+
gte = "gte",
|
|
71
|
+
lt = "lt",
|
|
72
|
+
lte = "lte",
|
|
73
|
+
set = "set",
|
|
74
|
+
notSet = "notSet",
|
|
75
|
+
inDateRange = "inDateRange",
|
|
76
|
+
notInDateRange = "notInDateRange",
|
|
77
|
+
beforeDate = "beforeDate",
|
|
78
|
+
beforeOrOnDate = "beforeOrOnDate",
|
|
79
|
+
afterDate = "afterDate",
|
|
80
|
+
afterOrOnDate = "afterOrOnDate"
|
|
81
|
+
}
|
|
82
|
+
export declare enum ConnectorOrigin {
|
|
83
|
+
from_template = "from_template",
|
|
84
|
+
manual = "manual"
|
|
85
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PaginationInterface } from './index';
|
|
2
|
+
export declare const FilterOperator: {
|
|
3
|
+
readonly EQ: "eq";
|
|
4
|
+
readonly NEQ: "neq";
|
|
5
|
+
readonly CONTAINS: "ct";
|
|
6
|
+
readonly NOT_CONTAINS: "nct";
|
|
7
|
+
readonly STARTSWITH: "sw";
|
|
8
|
+
readonly ENDSWITH: "ew";
|
|
9
|
+
readonly NOT_STARTSWITH: "nsw";
|
|
10
|
+
readonly NOT_ENDSWITH: "new";
|
|
11
|
+
readonly BETWEEN: "bt";
|
|
12
|
+
readonly LT: "lt";
|
|
13
|
+
readonly LTE: "lte";
|
|
14
|
+
readonly GT: "gt";
|
|
15
|
+
readonly GTE: "gte";
|
|
16
|
+
readonly IN: "in";
|
|
17
|
+
readonly NOT_IN: "nin";
|
|
18
|
+
readonly LIKE: "like";
|
|
19
|
+
};
|
|
20
|
+
export type FilterOperator = (typeof FilterOperator)[keyof typeof FilterOperator];
|
|
21
|
+
export type FilterValue = {
|
|
22
|
+
[operator in FilterOperator]?: string | number | boolean | string[];
|
|
23
|
+
};
|
|
24
|
+
export declare const SortDirection: {
|
|
25
|
+
readonly ASC: "asc";
|
|
26
|
+
readonly DESC: "desc";
|
|
27
|
+
};
|
|
28
|
+
export type SortDirection = (typeof SortDirection)[keyof typeof SortDirection];
|
|
29
|
+
export type SortOrder<T> = {
|
|
30
|
+
[field in keyof T]?: (typeof SortDirection)[keyof typeof SortDirection];
|
|
31
|
+
};
|
|
32
|
+
export interface GenericFilterDto<T> extends PaginationInterface {
|
|
33
|
+
filter?: {
|
|
34
|
+
[field in keyof T]?: FilterValue;
|
|
35
|
+
};
|
|
36
|
+
sort?: SortOrder<T>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface PaginationInterface {
|
|
2
|
+
page: number;
|
|
3
|
+
limit: number;
|
|
4
|
+
}
|
|
5
|
+
export interface QueryPaginationInterface {
|
|
6
|
+
skip: number;
|
|
7
|
+
take: number;
|
|
8
|
+
}
|
|
9
|
+
export interface PaginationMeta {
|
|
10
|
+
page: number;
|
|
11
|
+
limit: number;
|
|
12
|
+
total: number;
|
|
13
|
+
}
|
|
14
|
+
export interface PaginatedResponse<T> {
|
|
15
|
+
meta: PaginationMeta;
|
|
16
|
+
data: Array<T>;
|
|
17
|
+
}
|