@transai/connector-runner-ai-agent 0.29.0 → 0.29.2

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.
@@ -2,8 +2,6 @@ import { GroupInterface } from './group.interface';
2
2
  export interface GroupMemberInterface {
3
3
  userId: string;
4
4
  tenantIdentifier: string;
5
- firstName: string;
6
- lastName?: string;
7
5
  email: string;
8
6
  createdAt: Date;
9
7
  }
@@ -20,6 +20,7 @@ export * from './dataset/filter.interface';
20
20
  export * from './connector/connector.interface';
21
21
  export * from './connector/connectors.interface';
22
22
  export * from './webhook';
23
+ export * from './metrics';
23
24
  export * from './template.interface';
24
25
  export * from './template-implementation.interface';
25
26
  export * from './template-implementation-overrides.interface';
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const MetricDimensionSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ description: z.ZodOptional<z.ZodString>;
5
+ expr: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export declare const MetricDimensionsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
8
+ name: z.ZodString;
9
+ description: z.ZodOptional<z.ZodString>;
10
+ expr: z.ZodString;
11
+ }, z.core.$strip>, z.ZodBoolean]>>;
12
+ export type MetricDimensionType = z.infer<typeof MetricDimensionSchema>;
13
+ export type MetricDimensionsType = z.infer<typeof MetricDimensionsSchema>;
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const MetricExpressionSchema: z.ZodString;
3
+ export type MetricExpressionType = z.infer<typeof MetricExpressionSchema>;
@@ -0,0 +1,6 @@
1
+ export * from './dimensions';
2
+ export * from './expression';
3
+ export * from './measures';
4
+ export * from './metrics';
5
+ export * from './source';
6
+ export * from './mapping';
@@ -0,0 +1,12 @@
1
+ export interface MetricMappingSourceRule {
2
+ collection: string;
3
+ expr?: string;
4
+ }
5
+ export type MetricMappingExpressionRecordRule = Record<string, string>;
6
+ export interface MetricMappingConfig {
7
+ tenantIdentifier: string;
8
+ source: MetricMappingSourceRule;
9
+ measures: MetricMappingExpressionRecordRule;
10
+ dimensions: MetricMappingExpressionRecordRule;
11
+ updatedAt: string;
12
+ }
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ export declare enum MetricMeasureTypeEnum {
3
+ COUNT = "count",
4
+ GAUGE = "gauge",
5
+ STATE_SET = "state_set"
6
+ }
7
+ export declare const MetricMeasureSchema: z.ZodObject<{
8
+ name: z.ZodString;
9
+ description: z.ZodOptional<z.ZodString>;
10
+ type: z.ZodEnum<typeof MetricMeasureTypeEnum>;
11
+ expr: z.ZodString;
12
+ }, z.core.$strip>;
13
+ export declare const MetricMeasuresSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
14
+ name: z.ZodString;
15
+ description: z.ZodOptional<z.ZodString>;
16
+ type: z.ZodEnum<typeof MetricMeasureTypeEnum>;
17
+ expr: z.ZodString;
18
+ }, z.core.$strip>, z.ZodBoolean]>>;
19
+ export type MetricMeasureType = z.infer<typeof MetricMeasureSchema>;
20
+ export type MetricMeasuresType = z.infer<typeof MetricMeasuresSchema>;
@@ -0,0 +1,90 @@
1
+ import z from 'zod';
2
+ import { DatasetStatusEnum } from '../type-enums';
3
+ export declare const MetricSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ description: z.ZodOptional<z.ZodString>;
6
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
7
+ collection: z.ZodString;
8
+ expr: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>]>;
10
+ measures: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
11
+ name: z.ZodString;
12
+ description: z.ZodOptional<z.ZodString>;
13
+ type: z.ZodEnum<typeof import("./measures").MetricMeasureTypeEnum>;
14
+ expr: z.ZodString;
15
+ }, z.core.$strip>, z.ZodBoolean]>>;
16
+ dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
17
+ name: z.ZodString;
18
+ description: z.ZodOptional<z.ZodString>;
19
+ expr: z.ZodString;
20
+ }, z.core.$strip>, z.ZodBoolean]>>>;
21
+ }, z.core.$strip>;
22
+ export declare const MetricsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
23
+ name: z.ZodString;
24
+ description: z.ZodOptional<z.ZodString>;
25
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
26
+ collection: z.ZodString;
27
+ expr: z.ZodOptional<z.ZodString>;
28
+ }, z.core.$strip>]>;
29
+ measures: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
30
+ name: z.ZodString;
31
+ description: z.ZodOptional<z.ZodString>;
32
+ type: z.ZodEnum<typeof import("./measures").MetricMeasureTypeEnum>;
33
+ expr: z.ZodString;
34
+ }, z.core.$strip>, z.ZodBoolean]>>;
35
+ dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
36
+ name: z.ZodString;
37
+ description: z.ZodOptional<z.ZodString>;
38
+ expr: z.ZodString;
39
+ }, z.core.$strip>, z.ZodBoolean]>>>;
40
+ }, z.core.$strip>, z.ZodBoolean]>>;
41
+ export type MetricType = z.infer<typeof MetricSchema>;
42
+ export type MetricsType = z.infer<typeof MetricsSchema>;
43
+ export declare const MetricRecordCreateSchema: z.ZodObject<{
44
+ name: z.ZodString;
45
+ description: z.ZodOptional<z.ZodString>;
46
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
47
+ collection: z.ZodString;
48
+ expr: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strip>]>;
50
+ measures: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
51
+ name: z.ZodString;
52
+ description: z.ZodOptional<z.ZodString>;
53
+ type: z.ZodEnum<typeof import("./measures").MetricMeasureTypeEnum>;
54
+ expr: z.ZodString;
55
+ }, z.core.$strip>, z.ZodBoolean]>>;
56
+ dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
57
+ name: z.ZodString;
58
+ description: z.ZodOptional<z.ZodString>;
59
+ expr: z.ZodString;
60
+ }, z.core.$strip>, z.ZodBoolean]>>>;
61
+ key: z.ZodString;
62
+ status: z.ZodEnum<typeof DatasetStatusEnum>;
63
+ }, z.core.$strip>;
64
+ export type MetricRecordCreateType = z.infer<typeof MetricRecordCreateSchema>;
65
+ export declare const MetricRecordSchema: z.ZodObject<{
66
+ name: z.ZodString;
67
+ description: z.ZodOptional<z.ZodString>;
68
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
69
+ collection: z.ZodString;
70
+ expr: z.ZodOptional<z.ZodString>;
71
+ }, z.core.$strip>]>;
72
+ measures: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
73
+ name: z.ZodString;
74
+ description: z.ZodOptional<z.ZodString>;
75
+ type: z.ZodEnum<typeof import("./measures").MetricMeasureTypeEnum>;
76
+ expr: z.ZodString;
77
+ }, z.core.$strip>, z.ZodBoolean]>>;
78
+ dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
79
+ name: z.ZodString;
80
+ description: z.ZodOptional<z.ZodString>;
81
+ expr: z.ZodString;
82
+ }, z.core.$strip>, z.ZodBoolean]>>>;
83
+ key: z.ZodString;
84
+ status: z.ZodEnum<typeof DatasetStatusEnum>;
85
+ id: z.ZodString;
86
+ tenantIdentifier: z.ZodString;
87
+ createdAt: z.ZodDate;
88
+ updatedAt: z.ZodDate;
89
+ }, z.core.$strip>;
90
+ export type MetricRecordType = z.infer<typeof MetricRecordSchema>;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const MetricSourceSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3
+ collection: z.ZodString;
4
+ expr: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strip>]>;
6
+ export type MetricSourceType = z.infer<typeof MetricSourceSchema>;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { SemanticTriggersInterface, DatasetsInterface, ConnectorsInterface } from './index';
2
+ import { SemanticTriggersInterface, DatasetsInterface, ConnectorsInterface, MetricsType } from './index';
3
3
  export declare const TemplateImplementationOverridesSchema: z.ZodObject<{
4
4
  datasets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
5
5
  name: z.ZodString;
@@ -164,9 +164,29 @@ export declare const TemplateImplementationOverridesSchema: z.ZodObject<{
164
164
  createdAt: z.ZodOptional<z.ZodDate>;
165
165
  updatedAt: z.ZodOptional<z.ZodDate>;
166
166
  }, z.core.$strip>, z.ZodBoolean]>>>;
167
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
168
+ name: z.ZodString;
169
+ description: z.ZodOptional<z.ZodString>;
170
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
171
+ collection: z.ZodString;
172
+ expr: z.ZodOptional<z.ZodString>;
173
+ }, z.core.$strip>]>;
174
+ measures: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
175
+ name: z.ZodString;
176
+ description: z.ZodOptional<z.ZodString>;
177
+ type: z.ZodEnum<typeof import("./index").MetricMeasureTypeEnum>;
178
+ expr: z.ZodString;
179
+ }, z.core.$strip>, z.ZodBoolean]>>;
180
+ dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
181
+ name: z.ZodString;
182
+ description: z.ZodOptional<z.ZodString>;
183
+ expr: z.ZodString;
184
+ }, z.core.$strip>, z.ZodBoolean]>>>;
185
+ }, z.core.$strip>, z.ZodBoolean]>>>;
167
186
  }, z.core.$strip>;
168
187
  export interface TemplateImplementationOverridesInterface {
169
188
  datasets?: DatasetsInterface;
170
189
  semanticTriggers?: SemanticTriggersInterface;
171
190
  connectors?: ConnectorsInterface;
191
+ metrics?: MetricsType;
172
192
  }
@@ -169,6 +169,25 @@ export declare const TemplateImplementationSchema: z.ZodObject<{
169
169
  createdAt: z.ZodOptional<z.ZodDate>;
170
170
  updatedAt: z.ZodOptional<z.ZodDate>;
171
171
  }, z.core.$strip>, z.ZodBoolean]>>>;
172
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
173
+ name: z.ZodString;
174
+ description: z.ZodOptional<z.ZodString>;
175
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
176
+ collection: z.ZodString;
177
+ expr: z.ZodOptional<z.ZodString>;
178
+ }, z.core.$strip>]>;
179
+ measures: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
180
+ name: z.ZodString;
181
+ description: z.ZodOptional<z.ZodString>;
182
+ type: z.ZodEnum<typeof import("./metrics").MetricMeasureTypeEnum>;
183
+ expr: z.ZodString;
184
+ }, z.core.$strip>, z.ZodBoolean]>>;
185
+ dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
186
+ name: z.ZodString;
187
+ description: z.ZodOptional<z.ZodString>;
188
+ expr: z.ZodString;
189
+ }, z.core.$strip>, z.ZodBoolean]>>>;
190
+ }, z.core.$strip>, z.ZodBoolean]>>>;
172
191
  }, z.core.$strip>;
173
192
  }, z.core.$strip>;
174
193
  export declare const TemplateImplementationCreateSchema: z.ZodObject<{
@@ -339,6 +358,25 @@ export declare const TemplateImplementationCreateSchema: z.ZodObject<{
339
358
  createdAt: z.ZodOptional<z.ZodDate>;
340
359
  updatedAt: z.ZodOptional<z.ZodDate>;
341
360
  }, z.core.$strip>, z.ZodBoolean]>>>;
361
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
362
+ name: z.ZodString;
363
+ description: z.ZodOptional<z.ZodString>;
364
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
365
+ collection: z.ZodString;
366
+ expr: z.ZodOptional<z.ZodString>;
367
+ }, z.core.$strip>]>;
368
+ measures: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
369
+ name: z.ZodString;
370
+ description: z.ZodOptional<z.ZodString>;
371
+ type: z.ZodEnum<typeof import("./metrics").MetricMeasureTypeEnum>;
372
+ expr: z.ZodString;
373
+ }, z.core.$strip>, z.ZodBoolean]>>;
374
+ dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
375
+ name: z.ZodString;
376
+ description: z.ZodOptional<z.ZodString>;
377
+ expr: z.ZodString;
378
+ }, z.core.$strip>, z.ZodBoolean]>>>;
379
+ }, z.core.$strip>, z.ZodBoolean]>>>;
342
380
  }, z.core.$strip>;
343
381
  templateId: z.ZodString;
344
382
  tenantId: z.ZodString;
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { AuthorInterface } from './author.interface';
3
+ import { MetricsType } from './metrics';
3
4
  import { DatasetsInterface, SemanticTriggersInterface, ConnectorsInterface } from './index';
4
5
  export declare const TemplateSchema: z.ZodObject<{
5
6
  identifier: z.ZodString;
@@ -177,6 +178,25 @@ export declare const TemplateSchema: z.ZodObject<{
177
178
  createdAt: z.ZodOptional<z.ZodDate>;
178
179
  updatedAt: z.ZodOptional<z.ZodDate>;
179
180
  }, z.core.$strip>, z.ZodBoolean]>>>;
181
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
182
+ name: z.ZodString;
183
+ description: z.ZodOptional<z.ZodString>;
184
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
185
+ collection: z.ZodString;
186
+ expr: z.ZodOptional<z.ZodString>;
187
+ }, z.core.$strip>]>;
188
+ measures: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
189
+ name: z.ZodString;
190
+ description: z.ZodOptional<z.ZodString>;
191
+ type: z.ZodEnum<typeof import("./metrics").MetricMeasureTypeEnum>;
192
+ expr: z.ZodString;
193
+ }, z.core.$strip>, z.ZodBoolean]>>;
194
+ dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
195
+ name: z.ZodString;
196
+ description: z.ZodOptional<z.ZodString>;
197
+ expr: z.ZodString;
198
+ }, z.core.$strip>, z.ZodBoolean]>>>;
199
+ }, z.core.$strip>, z.ZodBoolean]>>>;
180
200
  }, z.core.$strip>;
181
201
  export interface TemplateInterface {
182
202
  id: string;
@@ -191,6 +211,7 @@ export interface TemplateInterface {
191
211
  datasets: DatasetsInterface;
192
212
  semanticTriggers: SemanticTriggersInterface;
193
213
  connectors?: ConnectorsInterface;
214
+ metrics?: MetricsType;
194
215
  }
195
216
  export type ShallowTemplateInterface = Omit<TemplateInterface, 'datasets' | 'semanticTriggers' | 'connectors'>;
196
217
  export interface PostTemplateInterface extends Omit<TemplateInterface, 'id'> {
@@ -202,6 +223,7 @@ export interface PostTemplateInterface extends Omit<TemplateInterface, 'id'> {
202
223
  datasets: DatasetsInterface;
203
224
  semanticTriggers: SemanticTriggersInterface;
204
225
  connectors?: ConnectorsInterface;
226
+ metrics?: MetricsType;
205
227
  }
206
228
  export interface TemplateVersionInterface {
207
229
  version: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transai/connector-runner-ai-agent",
3
- "version": "0.29.0",
3
+ "version": "0.29.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },