@proofhound/shared 0.1.6
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/LICENSE +190 -0
- package/dist/classification-options.d.ts +9 -0
- package/dist/classification-options.d.ts.map +1 -0
- package/dist/classification-options.js +121 -0
- package/dist/classification-options.js.map +1 -0
- package/dist/dto/annotation.dto.d.ts +291 -0
- package/dist/dto/annotation.dto.d.ts.map +1 -0
- package/dist/dto/annotation.dto.js +127 -0
- package/dist/dto/annotation.dto.js.map +1 -0
- package/dist/dto/canary-release.dto.d.ts +483 -0
- package/dist/dto/canary-release.dto.d.ts.map +1 -0
- package/dist/dto/canary-release.dto.js +276 -0
- package/dist/dto/canary-release.dto.js.map +1 -0
- package/dist/dto/connector.dto.d.ts +1568 -0
- package/dist/dto/connector.dto.d.ts.map +1 -0
- package/dist/dto/connector.dto.js +472 -0
- package/dist/dto/connector.dto.js.map +1 -0
- package/dist/dto/dataset-import.dto.d.ts +128 -0
- package/dist/dto/dataset-import.dto.d.ts.map +1 -0
- package/dist/dto/dataset-import.dto.js +53 -0
- package/dist/dto/dataset-import.dto.js.map +1 -0
- package/dist/dto/dataset-modality.d.ts +9 -0
- package/dist/dto/dataset-modality.d.ts.map +1 -0
- package/dist/dto/dataset-modality.js +17 -0
- package/dist/dto/dataset-modality.js.map +1 -0
- package/dist/dto/dataset.dto.d.ts +240 -0
- package/dist/dto/dataset.dto.d.ts.map +1 -0
- package/dist/dto/dataset.dto.js +110 -0
- package/dist/dto/dataset.dto.js.map +1 -0
- package/dist/dto/experiment.dto.d.ts +393 -0
- package/dist/dto/experiment.dto.d.ts.map +1 -0
- package/dist/dto/experiment.dto.js +121 -0
- package/dist/dto/experiment.dto.js.map +1 -0
- package/dist/dto/model.dto.d.ts +356 -0
- package/dist/dto/model.dto.d.ts.map +1 -0
- package/dist/dto/model.dto.js +183 -0
- package/dist/dto/model.dto.js.map +1 -0
- package/dist/dto/monitoring.dto.d.ts +354 -0
- package/dist/dto/monitoring.dto.d.ts.map +1 -0
- package/dist/dto/monitoring.dto.js +102 -0
- package/dist/dto/monitoring.dto.js.map +1 -0
- package/dist/dto/optimization.dto.d.ts +2086 -0
- package/dist/dto/optimization.dto.d.ts.map +1 -0
- package/dist/dto/optimization.dto.js +418 -0
- package/dist/dto/optimization.dto.js.map +1 -0
- package/dist/dto/production-release.dto.d.ts +317 -0
- package/dist/dto/production-release.dto.d.ts.map +1 -0
- package/dist/dto/production-release.dto.js +146 -0
- package/dist/dto/production-release.dto.js.map +1 -0
- package/dist/dto/prompt.dto.d.ts +469 -0
- package/dist/dto/prompt.dto.d.ts.map +1 -0
- package/dist/dto/prompt.dto.js +177 -0
- package/dist/dto/prompt.dto.js.map +1 -0
- package/dist/dto/quick-start.dto.d.ts +450 -0
- package/dist/dto/quick-start.dto.d.ts.map +1 -0
- package/dist/dto/quick-start.dto.js +106 -0
- package/dist/dto/quick-start.dto.js.map +1 -0
- package/dist/dto/release-line.dto.d.ts +1099 -0
- package/dist/dto/release-line.dto.d.ts.map +1 -0
- package/dist/dto/release-line.dto.js +190 -0
- package/dist/dto/release-line.dto.js.map +1 -0
- package/dist/dto/run-result.dto.d.ts +419 -0
- package/dist/dto/run-result.dto.d.ts.map +1 -0
- package/dist/dto/run-result.dto.js +200 -0
- package/dist/dto/run-result.dto.js.map +1 -0
- package/dist/dto/token.dto.d.ts +80 -0
- package/dist/dto/token.dto.d.ts.map +1 -0
- package/dist/dto/token.dto.js +65 -0
- package/dist/dto/token.dto.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -0
- package/dist/model-presets.d.ts +28 -0
- package/dist/model-presets.d.ts.map +1 -0
- package/dist/model-presets.js +295 -0
- package/dist/model-presets.js.map +1 -0
- package/dist/output-format/build.d.ts +18 -0
- package/dist/output-format/build.d.ts.map +1 -0
- package/dist/output-format/build.js +126 -0
- package/dist/output-format/build.js.map +1 -0
- package/dist/output-format/index.d.ts +3 -0
- package/dist/output-format/index.d.ts.map +1 -0
- package/dist/output-format/index.js +9 -0
- package/dist/output-format/index.js.map +1 -0
- package/dist/output-format/schema-bridge.d.ts +14 -0
- package/dist/output-format/schema-bridge.d.ts.map +1 -0
- package/dist/output-format/schema-bridge.js +58 -0
- package/dist/output-format/schema-bridge.js.map +1 -0
- package/dist/project-context.d.ts +13 -0
- package/dist/project-context.d.ts.map +1 -0
- package/dist/project-context.js +9 -0
- package/dist/project-context.js.map +1 -0
- package/dist/run-result-failure.d.ts +4 -0
- package/dist/run-result-failure.d.ts.map +1 -0
- package/dist/run-result-failure.js +16 -0
- package/dist/run-result-failure.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector.dto.d.ts","sourceRoot":"","sources":["../../src/dto/connector.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB;;;;EAAsD,CAAC;AAC5F,eAAO,MAAM,2BAA2B;;;;;EAA6D,CAAC;AACtG,eAAO,MAAM,2BAA2B;;;;;EAA0D,CAAC;AACnG,eAAO,MAAM,yBAAyB;;;;EAAgD,CAAC;AACvF,eAAO,MAAM,uBAAuB;;;EAA6B,CAAC;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAOxE,eAAO,MAAM,wBAAwB;;;EAA8B,CAAC;AACpE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,mBAAmB;;;;EAAwC,CAAC;AACzE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA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BAErC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEjF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;iBAOtC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAMnF,eAAO,MAAM,iCAAiC;;;;iBAI5C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE/F,eAAO,MAAM,kCAAkC;;;;;;;iBAI7C,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEjG,eAAO,MAAM,kCAAkC;;;;;;;;;;iBAG7C,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAMjG,eAAO,MAAM,sBAAsB,aAAoB,CAAC;AAExD,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEjF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;iBAKnC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM7E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,kBAAkB,GAAG,CAAC,CAAC,UAAU,CAQzG"}
|
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.connectorListQuerySchema = exports.connectorDeleteQuerySchema = exports.connectorIdParamSchema = exports.bulkDeleteConnectorsResponseSchema = exports.bulkDeleteConnectorRejectionSchema = exports.bulkDeleteConnectorsRequestSchema = exports.peekConnectorResponseSchema = exports.peekConnectorRequestSchema = exports.probeConnectorResponseSchema = exports.connectorCreateResponseSchema = exports.connectorDetailSchema = exports.connectorListResponseSchema = exports.connectorListItemSchema = exports.revealWebhookTokenResponseSchema = exports.createWebhookTokenResponseSchema = exports.createWebhookTokenSchema = exports.connectorWebhookTokenListSchema = exports.connectorWebhookTokenSummarySchema = exports.connectorTokenSummarySchema = exports.connectorReferencesResponseSchema = exports.connectorReferenceItemSchema = exports.connectorReferencesSummarySchema = exports.updateConnectorSchema = exports.createConnectorSchemaByKind = exports.createConnectorSchema = exports.connectorConfigShapeSchema = exports.webhookOutputConfigSchema = exports.webhookInputConfigSchema = exports.kafkaOutputConfigSchema = exports.kafkaInputConfigSchema = exports.redisOutputConfigSchema = exports.redisInputConfigSchema = exports.peekConnectorMessageSchema = exports.webhookOutputMethodSchema = exports.webhookModeSchema = exports.connectorTypeSchema = exports.connectorDirectionSchema = exports.redisConsumerModeSchema = exports.redisDeploymentTypeSchema = exports.connectorHealthStatusSchema = exports.kafkaSecurityProtocolSchema = exports.kafkaSaslMechanismSchema = void 0;
|
|
4
|
+
exports.getConnectorConfigSchema = getConnectorConfigSchema;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.kafkaSaslMechanismSchema = zod_1.z.enum(['PLAIN', 'SCRAM-SHA-256', 'SCRAM-SHA-512']);
|
|
7
|
+
exports.kafkaSecurityProtocolSchema = zod_1.z.enum(['PLAINTEXT', 'SASL_PLAINTEXT', 'SASL_SSL', 'SSL']);
|
|
8
|
+
exports.connectorHealthStatusSchema = zod_1.z.enum(['healthy', 'degraded', 'unhealthy', 'unknown']);
|
|
9
|
+
exports.redisDeploymentTypeSchema = zod_1.z.enum(['standalone', 'sentinel', 'cluster']);
|
|
10
|
+
exports.redisConsumerModeSchema = zod_1.z.enum(['list', 'stream']);
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
// Connector (business term: connector; DB physical table: ph_assets.connectors)
|
|
13
|
+
// See docs/specs/26-connectors.md §3 / docs/specs/06-database-schema.md §4.5
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
exports.connectorDirectionSchema = zod_1.z.enum(['input', 'output']);
|
|
16
|
+
exports.connectorTypeSchema = zod_1.z.enum(['redis', 'kafka', 'webhook']);
|
|
17
|
+
exports.webhookModeSchema = zod_1.z.enum(['sync', 'async']);
|
|
18
|
+
exports.webhookOutputMethodSchema = zod_1.z.enum(['POST', 'PUT']);
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// config variants: one schema per (type, direction)
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
const redisStreamKeySchema = zod_1.z
|
|
23
|
+
.string()
|
|
24
|
+
.trim()
|
|
25
|
+
.min(1)
|
|
26
|
+
.max(255)
|
|
27
|
+
.regex(/^[\w:.\-+]+$/u, {
|
|
28
|
+
message: 'key must contain only word characters, ":", ".", "-", "+"',
|
|
29
|
+
});
|
|
30
|
+
const kafkaTopicSchema = zod_1.z
|
|
31
|
+
.string()
|
|
32
|
+
.trim()
|
|
33
|
+
.min(1)
|
|
34
|
+
.max(249)
|
|
35
|
+
.regex(/^[A-Za-z0-9._-]+$/u, {
|
|
36
|
+
message: 'topic must contain only [A-Za-z0-9._-]',
|
|
37
|
+
});
|
|
38
|
+
const consumerGroupSchema = zod_1.z
|
|
39
|
+
.string()
|
|
40
|
+
.trim()
|
|
41
|
+
.min(1)
|
|
42
|
+
.max(255)
|
|
43
|
+
.regex(/^[A-Za-z0-9._:-]+$/u, {
|
|
44
|
+
message: 'consumer group must contain only [A-Za-z0-9._:-]',
|
|
45
|
+
});
|
|
46
|
+
const jsonSchemaShape = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
|
|
47
|
+
const localConnectorSourceSchema = zod_1.z.literal('local_config');
|
|
48
|
+
const redisConnectionConfigSchema = zod_1.z.object({
|
|
49
|
+
source: localConnectorSourceSchema.default('local_config'),
|
|
50
|
+
host: zod_1.z.string().trim().min(1).max(255),
|
|
51
|
+
port: zod_1.z.coerce.number().int().min(1).max(65535),
|
|
52
|
+
username: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
53
|
+
defaultDbIndex: zod_1.z.coerce.number().int().min(0).max(15).nullable().optional(),
|
|
54
|
+
deploymentType: exports.redisDeploymentTypeSchema.nullable().optional(),
|
|
55
|
+
});
|
|
56
|
+
const kafkaConnectionConfigSchema = zod_1.z.object({
|
|
57
|
+
source: localConnectorSourceSchema.default('local_config'),
|
|
58
|
+
bootstrapBrokers: zod_1.z.array(zod_1.z.string().trim().min(1).max(255)).min(1),
|
|
59
|
+
securityProtocol: exports.kafkaSecurityProtocolSchema.default('PLAINTEXT'),
|
|
60
|
+
saslMechanism: exports.kafkaSaslMechanismSchema.nullable().optional(),
|
|
61
|
+
saslUsername: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
62
|
+
});
|
|
63
|
+
const redisConnectorCredentialsSchema = zod_1.z.object({
|
|
64
|
+
password: zod_1.z.string().min(1).optional(),
|
|
65
|
+
});
|
|
66
|
+
const kafkaConnectorCredentialsSchema = zod_1.z.object({
|
|
67
|
+
saslPassword: zod_1.z.string().min(1).optional(),
|
|
68
|
+
});
|
|
69
|
+
exports.peekConnectorMessageSchema = zod_1.z.object({
|
|
70
|
+
id: zod_1.z.string(),
|
|
71
|
+
receivedAt: zod_1.z.string().datetime().nullable(),
|
|
72
|
+
payload: zod_1.z.unknown(),
|
|
73
|
+
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
74
|
+
});
|
|
75
|
+
const latestPeekConfigSchema = {
|
|
76
|
+
lastPeekPayloadSchema: jsonSchemaShape.nullable().optional(),
|
|
77
|
+
lastPeekMessage: exports.peekConnectorMessageSchema.nullable().optional(),
|
|
78
|
+
lastPeekedAt: zod_1.z.string().datetime().optional(),
|
|
79
|
+
lastPeekMessageCount: zod_1.z.coerce.number().int().min(0).max(10).optional(),
|
|
80
|
+
};
|
|
81
|
+
exports.redisInputConfigSchema = zod_1.z.object({
|
|
82
|
+
connection: redisConnectionConfigSchema.optional(),
|
|
83
|
+
mode: exports.redisConsumerModeSchema,
|
|
84
|
+
key: redisStreamKeySchema,
|
|
85
|
+
blockMs: zod_1.z.coerce.number().int().min(0).max(60_000).optional(),
|
|
86
|
+
batchSize: zod_1.z.coerce.number().int().min(1).max(500).optional(),
|
|
87
|
+
...latestPeekConfigSchema,
|
|
88
|
+
});
|
|
89
|
+
exports.redisOutputConfigSchema = zod_1.z.object({
|
|
90
|
+
connection: redisConnectionConfigSchema.optional(),
|
|
91
|
+
mode: exports.redisConsumerModeSchema,
|
|
92
|
+
key: redisStreamKeySchema,
|
|
93
|
+
maxLen: zod_1.z.coerce.number().int().min(1).max(1_000_000).optional(),
|
|
94
|
+
});
|
|
95
|
+
exports.kafkaInputConfigSchema = zod_1.z.object({
|
|
96
|
+
connection: kafkaConnectionConfigSchema.optional(),
|
|
97
|
+
topic: kafkaTopicSchema,
|
|
98
|
+
consumerGroup: consumerGroupSchema,
|
|
99
|
+
fromBeginning: zod_1.z.boolean().optional(),
|
|
100
|
+
batchSize: zod_1.z.coerce.number().int().min(1).max(500).optional(),
|
|
101
|
+
...latestPeekConfigSchema,
|
|
102
|
+
});
|
|
103
|
+
exports.kafkaOutputConfigSchema = zod_1.z.object({
|
|
104
|
+
connection: kafkaConnectionConfigSchema.optional(),
|
|
105
|
+
topic: kafkaTopicSchema,
|
|
106
|
+
partitionKey: zod_1.z.string().trim().max(255).optional(),
|
|
107
|
+
});
|
|
108
|
+
exports.webhookInputConfigSchema = zod_1.z.object({
|
|
109
|
+
webhookMode: exports.webhookModeSchema,
|
|
110
|
+
webhookSlug: zod_1.z
|
|
111
|
+
.string()
|
|
112
|
+
.trim()
|
|
113
|
+
.min(2)
|
|
114
|
+
.max(80)
|
|
115
|
+
.regex(/^[a-z0-9][a-z0-9-]{0,78}[a-z0-9]$/u, {
|
|
116
|
+
message: 'webhook slug must use lowercase letters, numbers, and hyphens',
|
|
117
|
+
})
|
|
118
|
+
.optional(),
|
|
119
|
+
pathName: zod_1.z
|
|
120
|
+
.string()
|
|
121
|
+
.trim()
|
|
122
|
+
.min(1)
|
|
123
|
+
.max(120)
|
|
124
|
+
.regex(/^[A-Za-z0-9][A-Za-z0-9._/-]{0,119}$/u, {
|
|
125
|
+
message: 'path name must use letters, numbers, ".", "_", "-", or "/"',
|
|
126
|
+
})
|
|
127
|
+
.optional(),
|
|
128
|
+
timeoutSeconds: zod_1.z.coerce.number().int().min(1).max(300).optional(),
|
|
129
|
+
expectedPayloadSchema: jsonSchemaShape.optional(),
|
|
130
|
+
});
|
|
131
|
+
exports.webhookOutputConfigSchema = zod_1.z.object({
|
|
132
|
+
targetUrl: zod_1.z.string().trim().url().max(2_048),
|
|
133
|
+
method: exports.webhookOutputMethodSchema.default('POST'),
|
|
134
|
+
headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string().max(2_048)).optional(),
|
|
135
|
+
retryPolicy: zod_1.z
|
|
136
|
+
.object({
|
|
137
|
+
maxRetries: zod_1.z.coerce.number().int().min(0).max(10).default(3),
|
|
138
|
+
backoffMs: zod_1.z.coerce.number().int().min(0).max(60_000).default(1_000),
|
|
139
|
+
})
|
|
140
|
+
.optional(),
|
|
141
|
+
});
|
|
142
|
+
// Any persisted config (used by response DTO and form rehydration): one of six
|
|
143
|
+
exports.connectorConfigShapeSchema = zod_1.z.union([
|
|
144
|
+
exports.redisInputConfigSchema,
|
|
145
|
+
exports.redisOutputConfigSchema,
|
|
146
|
+
exports.kafkaInputConfigSchema,
|
|
147
|
+
exports.kafkaOutputConfigSchema,
|
|
148
|
+
exports.webhookInputConfigSchema,
|
|
149
|
+
exports.webhookOutputConfigSchema,
|
|
150
|
+
]);
|
|
151
|
+
// ---------------------------------------------------------------------------
|
|
152
|
+
// Common fields
|
|
153
|
+
// ---------------------------------------------------------------------------
|
|
154
|
+
const connectorNameSchema = zod_1.z
|
|
155
|
+
.string()
|
|
156
|
+
.trim()
|
|
157
|
+
.min(2)
|
|
158
|
+
.max(80)
|
|
159
|
+
.regex(/^[\w一-龥][\w一-龥 -]{0,79}$/u, {
|
|
160
|
+
message: 'name must start with letter/digit/underscore/CJK; allow spaces and hyphens; 2-80 chars',
|
|
161
|
+
});
|
|
162
|
+
const connectorDescriptionSchema = zod_1.z.string().trim().max(500).optional();
|
|
163
|
+
const ipWhitelistEntrySchema = zod_1.z
|
|
164
|
+
.string()
|
|
165
|
+
.trim()
|
|
166
|
+
.min(7)
|
|
167
|
+
.max(64)
|
|
168
|
+
.regex(/^(\d{1,3}\.){3}\d{1,3}(\/\d{1,2})?$/u, {
|
|
169
|
+
message: 'ip whitelist entry must be IPv4 or IPv4/CIDR',
|
|
170
|
+
});
|
|
171
|
+
const ipWhitelistSchema = zod_1.z.array(ipWhitelistEntrySchema).max(64);
|
|
172
|
+
// ---------------------------------------------------------------------------
|
|
173
|
+
// Create DTO: triple-nested discriminatedUnion (first by type, then by direction)
|
|
174
|
+
// Six concrete schemas each constrain their own local connection config / webhookPath / config / token / ipWhitelist, etc.
|
|
175
|
+
// ---------------------------------------------------------------------------
|
|
176
|
+
const createCommonBase = {
|
|
177
|
+
name: connectorNameSchema,
|
|
178
|
+
description: connectorDescriptionSchema,
|
|
179
|
+
};
|
|
180
|
+
const createRedisInputSchema = zod_1.z
|
|
181
|
+
.object({
|
|
182
|
+
...createCommonBase,
|
|
183
|
+
type: zod_1.z.literal('redis'),
|
|
184
|
+
direction: zod_1.z.literal('input'),
|
|
185
|
+
credentials: redisConnectorCredentialsSchema.optional(),
|
|
186
|
+
config: exports.redisInputConfigSchema,
|
|
187
|
+
})
|
|
188
|
+
.superRefine((value, ctx) => {
|
|
189
|
+
if (!value.config.connection) {
|
|
190
|
+
ctx.addIssue({
|
|
191
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
192
|
+
path: ['config', 'connection'],
|
|
193
|
+
message: 'redis connector requires config.connection',
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
const createRedisOutputSchema = zod_1.z
|
|
198
|
+
.object({
|
|
199
|
+
...createCommonBase,
|
|
200
|
+
type: zod_1.z.literal('redis'),
|
|
201
|
+
direction: zod_1.z.literal('output'),
|
|
202
|
+
credentials: redisConnectorCredentialsSchema.optional(),
|
|
203
|
+
config: exports.redisOutputConfigSchema,
|
|
204
|
+
})
|
|
205
|
+
.superRefine((value, ctx) => {
|
|
206
|
+
if (!value.config.connection) {
|
|
207
|
+
ctx.addIssue({
|
|
208
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
209
|
+
path: ['config', 'connection'],
|
|
210
|
+
message: 'redis connector requires config.connection',
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
const createKafkaInputSchema = zod_1.z
|
|
215
|
+
.object({
|
|
216
|
+
...createCommonBase,
|
|
217
|
+
type: zod_1.z.literal('kafka'),
|
|
218
|
+
direction: zod_1.z.literal('input'),
|
|
219
|
+
credentials: kafkaConnectorCredentialsSchema.optional(),
|
|
220
|
+
config: exports.kafkaInputConfigSchema,
|
|
221
|
+
})
|
|
222
|
+
.superRefine((value, ctx) => {
|
|
223
|
+
if (!value.config.connection) {
|
|
224
|
+
ctx.addIssue({
|
|
225
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
226
|
+
path: ['config', 'connection'],
|
|
227
|
+
message: 'kafka connector requires config.connection',
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
const createKafkaOutputSchema = zod_1.z
|
|
232
|
+
.object({
|
|
233
|
+
...createCommonBase,
|
|
234
|
+
type: zod_1.z.literal('kafka'),
|
|
235
|
+
direction: zod_1.z.literal('output'),
|
|
236
|
+
credentials: kafkaConnectorCredentialsSchema.optional(),
|
|
237
|
+
config: exports.kafkaOutputConfigSchema,
|
|
238
|
+
})
|
|
239
|
+
.superRefine((value, ctx) => {
|
|
240
|
+
if (!value.config.connection) {
|
|
241
|
+
ctx.addIssue({
|
|
242
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
243
|
+
path: ['config', 'connection'],
|
|
244
|
+
message: 'kafka connector requires config.connection',
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
const createWebhookInputSchema = zod_1.z.object({
|
|
249
|
+
...createCommonBase,
|
|
250
|
+
type: zod_1.z.literal('webhook'),
|
|
251
|
+
direction: zod_1.z.literal('input'),
|
|
252
|
+
// @deprecated webhook tokens are now self-managed by the connector (scope='webhook' AND connector_id=...);
|
|
253
|
+
// when creating a connector, the server auto-generates the first webhook token. The tokenId sent by the frontend is silently ignored;
|
|
254
|
+
// the field is kept for short-term compatibility with the legacy frontend form. See docs/specs/06-database-schema.md §3.2 / §4.5.
|
|
255
|
+
tokenId: zod_1.z.string().uuid().optional(),
|
|
256
|
+
ipWhitelist: ipWhitelistSchema.optional(),
|
|
257
|
+
config: exports.webhookInputConfigSchema,
|
|
258
|
+
});
|
|
259
|
+
const createWebhookOutputSchema = zod_1.z.object({
|
|
260
|
+
...createCommonBase,
|
|
261
|
+
type: zod_1.z.literal('webhook'),
|
|
262
|
+
direction: zod_1.z.literal('output'),
|
|
263
|
+
config: exports.webhookOutputConfigSchema,
|
|
264
|
+
});
|
|
265
|
+
// Note: Zod discriminatedUnion only supports a single-layer discriminator, so we use union here (narrowed by
|
|
266
|
+
// the combination of type+direction); on the frontend, pick the concrete schema by type/direction.
|
|
267
|
+
exports.createConnectorSchema = zod_1.z.union([
|
|
268
|
+
createRedisInputSchema,
|
|
269
|
+
createRedisOutputSchema,
|
|
270
|
+
createKafkaInputSchema,
|
|
271
|
+
createKafkaOutputSchema,
|
|
272
|
+
createWebhookInputSchema,
|
|
273
|
+
createWebhookOutputSchema,
|
|
274
|
+
]);
|
|
275
|
+
// Each branch schema is also exported so the frontend can explicitly pick validation by (type, direction).
|
|
276
|
+
exports.createConnectorSchemaByKind = {
|
|
277
|
+
'redis:input': createRedisInputSchema,
|
|
278
|
+
'redis:output': createRedisOutputSchema,
|
|
279
|
+
'kafka:input': createKafkaInputSchema,
|
|
280
|
+
'kafka:output': createKafkaOutputSchema,
|
|
281
|
+
'webhook:input': createWebhookInputSchema,
|
|
282
|
+
'webhook:output': createWebhookOutputSchema,
|
|
283
|
+
};
|
|
284
|
+
// ---------------------------------------------------------------------------
|
|
285
|
+
// Update DTO: flat partial; type / direction are forbidden
|
|
286
|
+
// ---------------------------------------------------------------------------
|
|
287
|
+
exports.updateConnectorSchema = zod_1.z
|
|
288
|
+
.object({
|
|
289
|
+
name: connectorNameSchema.optional(),
|
|
290
|
+
description: zod_1.z.string().trim().max(500).nullable().optional(),
|
|
291
|
+
config: exports.connectorConfigShapeSchema.optional(),
|
|
292
|
+
credentials: zod_1.z.union([redisConnectorCredentialsSchema, kafkaConnectorCredentialsSchema]).optional(),
|
|
293
|
+
// @deprecated see createWebhookInputSchema comment; silently ignored in the update path too.
|
|
294
|
+
tokenId: zod_1.z.string().uuid().optional(),
|
|
295
|
+
ipWhitelist: ipWhitelistSchema.nullable().optional(),
|
|
296
|
+
})
|
|
297
|
+
.strict()
|
|
298
|
+
.refine((value) => !('type' in value) && !('direction' in value), {
|
|
299
|
+
message: 'type / direction cannot be changed after creation',
|
|
300
|
+
});
|
|
301
|
+
// ---------------------------------------------------------------------------
|
|
302
|
+
// Reference counting (stubbed in this cycle)
|
|
303
|
+
// ---------------------------------------------------------------------------
|
|
304
|
+
exports.connectorReferencesSummarySchema = zod_1.z.object({
|
|
305
|
+
canaryReleases: zod_1.z.number().int().nonnegative(),
|
|
306
|
+
productionReleases: zod_1.z.number().int().nonnegative(),
|
|
307
|
+
});
|
|
308
|
+
exports.connectorReferenceItemSchema = zod_1.z.object({
|
|
309
|
+
id: zod_1.z.string().uuid(),
|
|
310
|
+
kind: zod_1.z.enum(['canary_release', 'production_release']),
|
|
311
|
+
name: zod_1.z.string().nullable(),
|
|
312
|
+
status: zod_1.z.string(),
|
|
313
|
+
});
|
|
314
|
+
exports.connectorReferencesResponseSchema = zod_1.z.object({
|
|
315
|
+
summary: exports.connectorReferencesSummarySchema,
|
|
316
|
+
references: zod_1.z.array(exports.connectorReferenceItemSchema),
|
|
317
|
+
});
|
|
318
|
+
// ---------------------------------------------------------------------------
|
|
319
|
+
// List item / detail
|
|
320
|
+
// ---------------------------------------------------------------------------
|
|
321
|
+
exports.connectorTokenSummarySchema = zod_1.z.object({
|
|
322
|
+
id: zod_1.z.string().uuid(),
|
|
323
|
+
name: zod_1.z.string(),
|
|
324
|
+
prefix: zod_1.z.string(),
|
|
325
|
+
});
|
|
326
|
+
// per-connector webhook token(scope='webhook' AND connector_id=...)
|
|
327
|
+
// See docs/specs/06-database-schema.md §3.2 and docs/specs/26-connectors.md
|
|
328
|
+
exports.connectorWebhookTokenSummarySchema = zod_1.z.object({
|
|
329
|
+
id: zod_1.z.string().uuid(),
|
|
330
|
+
name: zod_1.z.string(),
|
|
331
|
+
prefix: zod_1.z.string(),
|
|
332
|
+
expiresAt: zod_1.z.iso.datetime().nullable(),
|
|
333
|
+
lastUsedAt: zod_1.z.iso.datetime().nullable(),
|
|
334
|
+
createdAt: zod_1.z.iso.datetime(),
|
|
335
|
+
});
|
|
336
|
+
exports.connectorWebhookTokenListSchema = zod_1.z.object({
|
|
337
|
+
data: zod_1.z.array(exports.connectorWebhookTokenSummarySchema),
|
|
338
|
+
total: zod_1.z.number().int().nonnegative(),
|
|
339
|
+
});
|
|
340
|
+
exports.createWebhookTokenSchema = zod_1.z
|
|
341
|
+
.object({
|
|
342
|
+
name: zod_1.z.string().trim().min(1).max(120).optional(),
|
|
343
|
+
expiresAt: zod_1.z.iso
|
|
344
|
+
.datetime()
|
|
345
|
+
.optional()
|
|
346
|
+
.refine((value) => value === undefined || new Date(value).getTime() > Date.now(), {
|
|
347
|
+
message: 'expiresAt must be in the future',
|
|
348
|
+
}),
|
|
349
|
+
})
|
|
350
|
+
.strict();
|
|
351
|
+
exports.createWebhookTokenResponseSchema = zod_1.z.object({
|
|
352
|
+
id: zod_1.z.string().uuid(),
|
|
353
|
+
name: zod_1.z.string(),
|
|
354
|
+
prefix: zod_1.z.string(),
|
|
355
|
+
plaintext: zod_1.z.string(),
|
|
356
|
+
expiresAt: zod_1.z.iso.datetime().nullable(),
|
|
357
|
+
});
|
|
358
|
+
// reveal endpoint: decrypt from token_encrypted and return the plaintext, aligned with user token reveal.
|
|
359
|
+
// See docs/specs/06-database-schema.md §3.2 "token_encrypted is used for on-demand reveal of recoverable tokens on the local admin console"
|
|
360
|
+
exports.revealWebhookTokenResponseSchema = zod_1.z.object({
|
|
361
|
+
tokenId: zod_1.z.string().uuid(),
|
|
362
|
+
plaintext: zod_1.z.string().nullable(),
|
|
363
|
+
available: zod_1.z.boolean(),
|
|
364
|
+
});
|
|
365
|
+
exports.connectorListItemSchema = zod_1.z.object({
|
|
366
|
+
id: zod_1.z.string().uuid(),
|
|
367
|
+
projectId: zod_1.z.string().uuid(),
|
|
368
|
+
name: zod_1.z.string(),
|
|
369
|
+
description: zod_1.z.string().nullable(),
|
|
370
|
+
direction: exports.connectorDirectionSchema,
|
|
371
|
+
type: exports.connectorTypeSchema,
|
|
372
|
+
webhookPath: zod_1.z.string().nullable(),
|
|
373
|
+
hasToken: zod_1.z.boolean(),
|
|
374
|
+
ipWhitelistCount: zod_1.z.number().int().nonnegative(),
|
|
375
|
+
configSummary: zod_1.z.string(),
|
|
376
|
+
healthStatus: exports.connectorHealthStatusSchema,
|
|
377
|
+
lastProbedAt: zod_1.z.string().datetime().nullable(),
|
|
378
|
+
lastProbeError: zod_1.z.string().nullable(),
|
|
379
|
+
references: exports.connectorReferencesSummarySchema,
|
|
380
|
+
createdBy: zod_1.z.string().uuid(),
|
|
381
|
+
createdByDisplayName: zod_1.z.string().nullable(),
|
|
382
|
+
createdAt: zod_1.z.string().datetime(),
|
|
383
|
+
updatedAt: zod_1.z.string().datetime(),
|
|
384
|
+
});
|
|
385
|
+
exports.connectorListResponseSchema = zod_1.z.object({
|
|
386
|
+
data: zod_1.z.array(exports.connectorListItemSchema),
|
|
387
|
+
total: zod_1.z.number().int().nonnegative(),
|
|
388
|
+
});
|
|
389
|
+
exports.connectorDetailSchema = exports.connectorListItemSchema.extend({
|
|
390
|
+
config: exports.connectorConfigShapeSchema,
|
|
391
|
+
// Full list of all active webhook tokens currently held by this connector (scope='webhook', revoked_at IS NULL).
|
|
392
|
+
// Always an empty array for non-webhook-input connectors.
|
|
393
|
+
webhookTokens: zod_1.z.array(exports.connectorWebhookTokenSummarySchema),
|
|
394
|
+
ipWhitelist: zod_1.z.array(zod_1.z.string()).nullable(),
|
|
395
|
+
});
|
|
396
|
+
// The create response additionally returns the plaintext of the first auto-generated webhook token (only appears at creation time).
|
|
397
|
+
exports.connectorCreateResponseSchema = exports.connectorDetailSchema.extend({
|
|
398
|
+
initialWebhookToken: zod_1.z
|
|
399
|
+
.object({
|
|
400
|
+
id: zod_1.z.string().uuid(),
|
|
401
|
+
name: zod_1.z.string(),
|
|
402
|
+
prefix: zod_1.z.string(),
|
|
403
|
+
plaintext: zod_1.z.string(),
|
|
404
|
+
expiresAt: zod_1.z.iso.datetime().nullable(),
|
|
405
|
+
})
|
|
406
|
+
.optional(),
|
|
407
|
+
});
|
|
408
|
+
// ---------------------------------------------------------------------------
|
|
409
|
+
// Probe / Peek
|
|
410
|
+
// ---------------------------------------------------------------------------
|
|
411
|
+
exports.probeConnectorResponseSchema = zod_1.z.object({
|
|
412
|
+
connectorId: zod_1.z.string().uuid(),
|
|
413
|
+
status: zod_1.z.enum(['success', 'failed']),
|
|
414
|
+
probedAt: zod_1.z.string().datetime(),
|
|
415
|
+
durationMs: zod_1.z.number().int().nonnegative(),
|
|
416
|
+
error: zod_1.z.string().nullable(),
|
|
417
|
+
});
|
|
418
|
+
exports.peekConnectorRequestSchema = zod_1.z.object({
|
|
419
|
+
limit: zod_1.z.coerce.number().int().min(1).max(10).default(5),
|
|
420
|
+
});
|
|
421
|
+
exports.peekConnectorResponseSchema = zod_1.z.object({
|
|
422
|
+
connectorId: zod_1.z.string().uuid(),
|
|
423
|
+
source: zod_1.z.enum(['driver', 'unavailable']),
|
|
424
|
+
messages: zod_1.z.array(exports.peekConnectorMessageSchema),
|
|
425
|
+
payloadSchema: jsonSchemaShape.nullable(),
|
|
426
|
+
fetchedAt: zod_1.z.string().datetime(),
|
|
427
|
+
error: zod_1.z.string().nullable(),
|
|
428
|
+
});
|
|
429
|
+
// ---------------------------------------------------------------------------
|
|
430
|
+
// Batch delete
|
|
431
|
+
// ---------------------------------------------------------------------------
|
|
432
|
+
exports.bulkDeleteConnectorsRequestSchema = zod_1.z.object({
|
|
433
|
+
ids: zod_1.z.array(zod_1.z.string().uuid()).min(1).max(50),
|
|
434
|
+
force: zod_1.z.boolean().optional(),
|
|
435
|
+
reason: zod_1.z.string().trim().min(1).max(500).optional(),
|
|
436
|
+
});
|
|
437
|
+
exports.bulkDeleteConnectorRejectionSchema = zod_1.z.object({
|
|
438
|
+
id: zod_1.z.string().uuid(),
|
|
439
|
+
reason: zod_1.z.string(),
|
|
440
|
+
referencedBy: exports.connectorReferencesSummarySchema.optional(),
|
|
441
|
+
});
|
|
442
|
+
exports.bulkDeleteConnectorsResponseSchema = zod_1.z.object({
|
|
443
|
+
deletedIds: zod_1.z.array(zod_1.z.string().uuid()),
|
|
444
|
+
rejected: zod_1.z.array(exports.bulkDeleteConnectorRejectionSchema),
|
|
445
|
+
});
|
|
446
|
+
// ---------------------------------------------------------------------------
|
|
447
|
+
// param / query
|
|
448
|
+
// ---------------------------------------------------------------------------
|
|
449
|
+
exports.connectorIdParamSchema = zod_1.z.string().uuid();
|
|
450
|
+
exports.connectorDeleteQuerySchema = zod_1.z.object({
|
|
451
|
+
force: zod_1.z.coerce.boolean().optional(),
|
|
452
|
+
reason: zod_1.z.string().trim().min(1).max(500).optional(),
|
|
453
|
+
});
|
|
454
|
+
exports.connectorListQuerySchema = zod_1.z.object({
|
|
455
|
+
direction: exports.connectorDirectionSchema.optional(),
|
|
456
|
+
type: exports.connectorTypeSchema.optional(),
|
|
457
|
+
healthStatus: exports.connectorHealthStatusSchema.optional(),
|
|
458
|
+
search: zod_1.z.string().trim().min(1).max(120).optional(),
|
|
459
|
+
});
|
|
460
|
+
// ---------------------------------------------------------------------------
|
|
461
|
+
// Helper: runtime function that derives the config schema from (type, direction)
|
|
462
|
+
// ---------------------------------------------------------------------------
|
|
463
|
+
function getConnectorConfigSchema(type, direction) {
|
|
464
|
+
if (type === 'redis') {
|
|
465
|
+
return direction === 'input' ? exports.redisInputConfigSchema : exports.redisOutputConfigSchema;
|
|
466
|
+
}
|
|
467
|
+
if (type === 'kafka') {
|
|
468
|
+
return direction === 'input' ? exports.kafkaInputConfigSchema : exports.kafkaOutputConfigSchema;
|
|
469
|
+
}
|
|
470
|
+
return direction === 'input' ? exports.webhookInputConfigSchema : exports.webhookOutputConfigSchema;
|
|
471
|
+
}
|
|
472
|
+
//# sourceMappingURL=connector.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector.dto.js","sourceRoot":"","sources":["../../src/dto/connector.dto.ts"],"names":[],"mappings":";;;AAgkBA,4DAQC;AAxkBD,6BAAwB;AAEX,QAAA,wBAAwB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC;AAC/E,QAAA,2BAA2B,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;AACzF,QAAA,2BAA2B,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;AACtF,QAAA,yBAAyB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;AAC1E,QAAA,uBAA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OAAO,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,gCAAwB,CAAC,CAAC,CAAC,iCAAyB,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const datasetImportSourceFormatSchema: z.ZodEnum<{
|
|
3
|
+
csv: "csv";
|
|
4
|
+
jsonl: "jsonl";
|
|
5
|
+
tsv: "tsv";
|
|
6
|
+
}>;
|
|
7
|
+
export type DatasetImportSourceFormat = z.infer<typeof datasetImportSourceFormatSchema>;
|
|
8
|
+
export declare const datasetImportStatusSchema: z.ZodEnum<{
|
|
9
|
+
importing: "importing";
|
|
10
|
+
ready: "ready";
|
|
11
|
+
}>;
|
|
12
|
+
export type DatasetImportStatus = z.infer<typeof datasetImportStatusSchema>;
|
|
13
|
+
export declare const datasetImportSourceFileSchema: z.ZodObject<{
|
|
14
|
+
fileName: z.ZodString;
|
|
15
|
+
fileSizeBytes: z.ZodNumber;
|
|
16
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type DatasetImportSourceFileDto = z.infer<typeof datasetImportSourceFileSchema>;
|
|
19
|
+
export declare const createDatasetImportSchema: z.ZodObject<{
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
fieldMappings: z.ZodArray<z.ZodObject<{
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
role: z.ZodEnum<{
|
|
25
|
+
text: "text";
|
|
26
|
+
image: "image";
|
|
27
|
+
id: "id";
|
|
28
|
+
metadata: "metadata";
|
|
29
|
+
expected: "expected";
|
|
30
|
+
}>;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
sourceFile: z.ZodObject<{
|
|
33
|
+
fileName: z.ZodString;
|
|
34
|
+
fileSizeBytes: z.ZodNumber;
|
|
35
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
sourceFormat: z.ZodEnum<{
|
|
38
|
+
csv: "csv";
|
|
39
|
+
jsonl: "jsonl";
|
|
40
|
+
tsv: "tsv";
|
|
41
|
+
}>;
|
|
42
|
+
declaredTotalRows: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type CreateDatasetImportDto = z.infer<typeof createDatasetImportSchema>;
|
|
45
|
+
export declare const datasetImportBatchSchema: z.ZodObject<{
|
|
46
|
+
batchStartIndex: z.ZodNumber;
|
|
47
|
+
samples: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type DatasetImportBatchDto = z.infer<typeof datasetImportBatchSchema>;
|
|
50
|
+
export declare const datasetImportItemSchema: z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
projectId: z.ZodString;
|
|
53
|
+
datasetId: z.ZodNullable<z.ZodString>;
|
|
54
|
+
name: z.ZodString;
|
|
55
|
+
description: z.ZodNullable<z.ZodString>;
|
|
56
|
+
fileName: z.ZodString;
|
|
57
|
+
fileSizeBytes: z.ZodNumber;
|
|
58
|
+
sourceFormat: z.ZodEnum<{
|
|
59
|
+
csv: "csv";
|
|
60
|
+
jsonl: "jsonl";
|
|
61
|
+
tsv: "tsv";
|
|
62
|
+
}>;
|
|
63
|
+
declaredTotalRows: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
receivedRows: z.ZodNumber;
|
|
65
|
+
status: z.ZodEnum<{
|
|
66
|
+
importing: "importing";
|
|
67
|
+
ready: "ready";
|
|
68
|
+
}>;
|
|
69
|
+
createdAt: z.ZodString;
|
|
70
|
+
updatedAt: z.ZodString;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
export type DatasetImportItemDto = z.infer<typeof datasetImportItemSchema>;
|
|
73
|
+
export declare const datasetImportBatchResponseSchema: z.ZodObject<{
|
|
74
|
+
importId: z.ZodString;
|
|
75
|
+
receivedRows: z.ZodNumber;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
export type DatasetImportBatchResponseDto = z.infer<typeof datasetImportBatchResponseSchema>;
|
|
78
|
+
export declare const completeDatasetImportResponseSchema: z.ZodObject<{
|
|
79
|
+
dataset: z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
projectId: z.ZodString;
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
description: z.ZodNullable<z.ZodString>;
|
|
84
|
+
sampleCount: z.ZodNumber;
|
|
85
|
+
fieldSchema: z.ZodArray<z.ZodObject<{
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
role: z.ZodEnum<{
|
|
88
|
+
text: "text";
|
|
89
|
+
image: "image";
|
|
90
|
+
image_url: "image_url";
|
|
91
|
+
image_base64: "image_base64";
|
|
92
|
+
expected_output: "expected_output";
|
|
93
|
+
metadata: "metadata";
|
|
94
|
+
}>;
|
|
95
|
+
type: z.ZodEnum<{
|
|
96
|
+
string: "string";
|
|
97
|
+
number: "number";
|
|
98
|
+
boolean: "boolean";
|
|
99
|
+
object: "object";
|
|
100
|
+
null: "null";
|
|
101
|
+
unknown: "unknown";
|
|
102
|
+
array: "array";
|
|
103
|
+
}>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
categoryDistribution: z.ZodObject<{
|
|
106
|
+
field: z.ZodNullable<z.ZodString>;
|
|
107
|
+
total: z.ZodNumber;
|
|
108
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
109
|
+
label: z.ZodString;
|
|
110
|
+
count: z.ZodNumber;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
references: z.ZodObject<{
|
|
114
|
+
experiments: z.ZodNumber;
|
|
115
|
+
optimizations: z.ZodNumber;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
hasImages: z.ZodBoolean;
|
|
118
|
+
storagePrefix: z.ZodNullable<z.ZodString>;
|
|
119
|
+
createdBy: z.ZodString;
|
|
120
|
+
createdByDisplayName: z.ZodNullable<z.ZodString>;
|
|
121
|
+
createdAt: z.ZodString;
|
|
122
|
+
updatedAt: z.ZodString;
|
|
123
|
+
deletedAt: z.ZodNullable<z.ZodString>;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
sampleCount: z.ZodNumber;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
export type CompleteDatasetImportResponseDto = z.infer<typeof completeDatasetImportResponseSchema>;
|
|
128
|
+
//# sourceMappingURL=dataset-import.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataset-import.dto.d.ts","sourceRoot":"","sources":["../../src/dto/dataset-import.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,+BAA+B;;;;EAAkC,CAAC;AAC/E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,yBAAyB;;;EAAiC,CAAC;AACxE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,6BAA6B;;;;iBAIxC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEvF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;iBAclC,CAAC;AACL,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAG/E,eAAO,MAAM,wBAAwB;;;iBAGnC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE7E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;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