@osva-ai/contracts 1.0.0
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 +202 -0
- package/README.md +5 -0
- package/dist/agent-manifest.d.ts +142 -0
- package/dist/agent-manifest.d.ts.map +1 -0
- package/dist/agent-manifest.js +13 -0
- package/dist/agent-manifest.js.map +1 -0
- package/dist/agent-registry.d.ts +34 -0
- package/dist/agent-registry.d.ts.map +1 -0
- package/dist/agent-registry.js +2 -0
- package/dist/agent-registry.js.map +1 -0
- package/dist/approval.d.ts +9 -0
- package/dist/approval.d.ts.map +1 -0
- package/dist/approval.js +13 -0
- package/dist/approval.js.map +1 -0
- package/dist/artifact-gateway.d.ts +12 -0
- package/dist/artifact-gateway.d.ts.map +1 -0
- package/dist/artifact-gateway.js +13 -0
- package/dist/artifact-gateway.js.map +1 -0
- package/dist/artifact.d.ts +11 -0
- package/dist/artifact.d.ts.map +1 -0
- package/dist/artifact.js +6 -0
- package/dist/artifact.js.map +1 -0
- package/dist/connector-public.d.ts +36 -0
- package/dist/connector-public.d.ts.map +1 -0
- package/dist/connector-public.js +48 -0
- package/dist/connector-public.js.map +1 -0
- package/dist/connector-registry.d.ts +73 -0
- package/dist/connector-registry.d.ts.map +1 -0
- package/dist/connector-registry.js +2 -0
- package/dist/connector-registry.js.map +1 -0
- package/dist/connector.d.ts +31 -0
- package/dist/connector.d.ts.map +1 -0
- package/dist/connector.js +15 -0
- package/dist/connector.js.map +1 -0
- package/dist/container-runtime.d.ts +17 -0
- package/dist/container-runtime.d.ts.map +1 -0
- package/dist/container-runtime.js +42 -0
- package/dist/container-runtime.js.map +1 -0
- package/dist/evaluation-suite.d.ts +107 -0
- package/dist/evaluation-suite.d.ts.map +1 -0
- package/dist/evaluation-suite.js +13 -0
- package/dist/evaluation-suite.js.map +1 -0
- package/dist/evaluation.d.ts +10 -0
- package/dist/evaluation.d.ts.map +1 -0
- package/dist/evaluation.js +5 -0
- package/dist/evaluation.js.map +1 -0
- package/dist/event-envelope.d.ts +20 -0
- package/dist/event-envelope.d.ts.map +1 -0
- package/dist/event-envelope.js +2 -0
- package/dist/event-envelope.js.map +1 -0
- package/dist/ids.d.ts +45 -0
- package/dist/ids.d.ts.map +1 -0
- package/dist/ids.js +2 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/job-queue.d.ts +17 -0
- package/dist/job-queue.d.ts.map +1 -0
- package/dist/job-queue.js +2 -0
- package/dist/job-queue.js.map +1 -0
- package/dist/json-pointer.d.ts +13 -0
- package/dist/json-pointer.d.ts.map +1 -0
- package/dist/json-pointer.js +68 -0
- package/dist/json-pointer.js.map +1 -0
- package/dist/json-schema.d.ts +6 -0
- package/dist/json-schema.d.ts.map +1 -0
- package/dist/json-schema.js +2 -0
- package/dist/json-schema.js.map +1 -0
- package/dist/json-value.d.ts +12 -0
- package/dist/json-value.d.ts.map +1 -0
- package/dist/json-value.js +35 -0
- package/dist/json-value.js.map +1 -0
- package/dist/knowledge-registry.d.ts +37 -0
- package/dist/knowledge-registry.d.ts.map +1 -0
- package/dist/knowledge-registry.js +2 -0
- package/dist/knowledge-registry.js.map +1 -0
- package/dist/knowledge-retrieval.d.ts +14 -0
- package/dist/knowledge-retrieval.d.ts.map +1 -0
- package/dist/knowledge-retrieval.js +2 -0
- package/dist/knowledge-retrieval.js.map +1 -0
- package/dist/knowledge-runtime.d.ts +16 -0
- package/dist/knowledge-runtime.d.ts.map +1 -0
- package/dist/knowledge-runtime.js +8 -0
- package/dist/knowledge-runtime.js.map +1 -0
- package/dist/knowledge.d.ts +106 -0
- package/dist/knowledge.d.ts.map +1 -0
- package/dist/knowledge.js +56 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/mcp-client.d.ts +39 -0
- package/dist/mcp-client.d.ts.map +1 -0
- package/dist/mcp-client.js +2 -0
- package/dist/mcp-client.js.map +1 -0
- package/dist/mcp-connector-execution.d.ts +10 -0
- package/dist/mcp-connector-execution.d.ts.map +1 -0
- package/dist/mcp-connector-execution.js +2 -0
- package/dist/mcp-connector-execution.js.map +1 -0
- package/dist/mcp-server.d.ts +87 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +57 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/memory-gateway.d.ts +65 -0
- package/dist/memory-gateway.d.ts.map +1 -0
- package/dist/memory-gateway.js +22 -0
- package/dist/memory-gateway.js.map +1 -0
- package/dist/memory-registry.d.ts +37 -0
- package/dist/memory-registry.d.ts.map +1 -0
- package/dist/memory-registry.js +2 -0
- package/dist/memory-registry.js.map +1 -0
- package/dist/model-gateway.d.ts +92 -0
- package/dist/model-gateway.d.ts.map +1 -0
- package/dist/model-gateway.js +37 -0
- package/dist/model-gateway.js.map +1 -0
- package/dist/model-pricing.d.ts +11 -0
- package/dist/model-pricing.d.ts.map +1 -0
- package/dist/model-pricing.js +7 -0
- package/dist/model-pricing.js.map +1 -0
- package/dist/model-profile-registry.d.ts +36 -0
- package/dist/model-profile-registry.d.ts.map +1 -0
- package/dist/model-profile-registry.js +2 -0
- package/dist/model-profile-registry.js.map +1 -0
- package/dist/office-registry.d.ts +144 -0
- package/dist/office-registry.d.ts.map +1 -0
- package/dist/office-registry.js +2 -0
- package/dist/office-registry.js.map +1 -0
- package/dist/office-state.d.ts +7 -0
- package/dist/office-state.d.ts.map +1 -0
- package/dist/office-state.js +18 -0
- package/dist/office-state.js.map +1 -0
- package/dist/remote-runtime.d.ts +7 -0
- package/dist/remote-runtime.d.ts.map +1 -0
- package/dist/remote-runtime.js +30 -0
- package/dist/remote-runtime.js.map +1 -0
- package/dist/run-lifecycle.d.ts +55 -0
- package/dist/run-lifecycle.d.ts.map +1 -0
- package/dist/run-lifecycle.js +2 -0
- package/dist/run-lifecycle.js.map +1 -0
- package/dist/run-state.d.ts +7 -0
- package/dist/run-state.d.ts.map +1 -0
- package/dist/run-state.js +24 -0
- package/dist/run-state.js.map +1 -0
- package/dist/run-step.d.ts +7 -0
- package/dist/run-step.d.ts.map +1 -0
- package/dist/run-step.js +9 -0
- package/dist/run-step.js.map +1 -0
- package/dist/runtime-protocol.d.ts +49 -0
- package/dist/runtime-protocol.d.ts.map +1 -0
- package/dist/runtime-protocol.js +2 -0
- package/dist/runtime-protocol.js.map +1 -0
- package/dist/schemas/agent-manifest.d.ts +89 -0
- package/dist/schemas/agent-manifest.d.ts.map +1 -0
- package/dist/schemas/agent-manifest.js +122 -0
- package/dist/schemas/agent-manifest.js.map +1 -0
- package/dist/schemas/agent-registry.d.ts +224 -0
- package/dist/schemas/agent-registry.d.ts.map +1 -0
- package/dist/schemas/agent-registry.js +35 -0
- package/dist/schemas/agent-registry.js.map +1 -0
- package/dist/schemas/api-key-registry.d.ts +77 -0
- package/dist/schemas/api-key-registry.d.ts.map +1 -0
- package/dist/schemas/api-key-registry.js +34 -0
- package/dist/schemas/api-key-registry.js.map +1 -0
- package/dist/schemas/artifact.d.ts +67 -0
- package/dist/schemas/artifact.d.ts.map +1 -0
- package/dist/schemas/artifact.js +65 -0
- package/dist/schemas/artifact.js.map +1 -0
- package/dist/schemas/connector-registry.d.ts +211 -0
- package/dist/schemas/connector-registry.d.ts.map +1 -0
- package/dist/schemas/connector-registry.js +101 -0
- package/dist/schemas/connector-registry.js.map +1 -0
- package/dist/schemas/connector.d.ts +57 -0
- package/dist/schemas/connector.d.ts.map +1 -0
- package/dist/schemas/connector.js +46 -0
- package/dist/schemas/connector.js.map +1 -0
- package/dist/schemas/evaluation-suite.d.ts +212 -0
- package/dist/schemas/evaluation-suite.d.ts.map +1 -0
- package/dist/schemas/evaluation-suite.js +101 -0
- package/dist/schemas/evaluation-suite.js.map +1 -0
- package/dist/schemas/evaluation.d.ts +45 -0
- package/dist/schemas/evaluation.d.ts.map +1 -0
- package/dist/schemas/evaluation.js +28 -0
- package/dist/schemas/evaluation.js.map +1 -0
- package/dist/schemas/event-envelope.d.ts +14 -0
- package/dist/schemas/event-envelope.d.ts.map +1 -0
- package/dist/schemas/event-envelope.js +17 -0
- package/dist/schemas/event-envelope.js.map +1 -0
- package/dist/schemas/ids.d.ts +42 -0
- package/dist/schemas/ids.d.ts.map +1 -0
- package/dist/schemas/ids.js +44 -0
- package/dist/schemas/ids.js.map +1 -0
- package/dist/schemas/index.d.ts +33 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +33 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/job-queue.d.ts +5 -0
- package/dist/schemas/job-queue.d.ts.map +1 -0
- package/dist/schemas/job-queue.js +6 -0
- package/dist/schemas/job-queue.js.map +1 -0
- package/dist/schemas/json-schema.d.ts +4 -0
- package/dist/schemas/json-schema.d.ts.map +1 -0
- package/dist/schemas/json-schema.js +3 -0
- package/dist/schemas/json-schema.js.map +1 -0
- package/dist/schemas/json-value.d.ts +4 -0
- package/dist/schemas/json-value.d.ts.map +1 -0
- package/dist/schemas/json-value.js +4 -0
- package/dist/schemas/json-value.js.map +1 -0
- package/dist/schemas/knowledge.d.ts +112 -0
- package/dist/schemas/knowledge.d.ts.map +1 -0
- package/dist/schemas/knowledge.js +109 -0
- package/dist/schemas/knowledge.js.map +1 -0
- package/dist/schemas/mcp-server.d.ts +18 -0
- package/dist/schemas/mcp-server.d.ts.map +1 -0
- package/dist/schemas/mcp-server.js +35 -0
- package/dist/schemas/mcp-server.js.map +1 -0
- package/dist/schemas/memory-registry.d.ts +49 -0
- package/dist/schemas/memory-registry.d.ts.map +1 -0
- package/dist/schemas/memory-registry.js +37 -0
- package/dist/schemas/memory-registry.js.map +1 -0
- package/dist/schemas/model-gateway.d.ts +61 -0
- package/dist/schemas/model-gateway.d.ts.map +1 -0
- package/dist/schemas/model-gateway.js +54 -0
- package/dist/schemas/model-gateway.js.map +1 -0
- package/dist/schemas/model-pricing.d.ts +12 -0
- package/dist/schemas/model-pricing.d.ts.map +1 -0
- package/dist/schemas/model-pricing.js +15 -0
- package/dist/schemas/model-pricing.js.map +1 -0
- package/dist/schemas/model-profile-registry.d.ts +80 -0
- package/dist/schemas/model-profile-registry.d.ts.map +1 -0
- package/dist/schemas/model-profile-registry.js +40 -0
- package/dist/schemas/model-profile-registry.js.map +1 -0
- package/dist/schemas/office-registry.d.ts +246 -0
- package/dist/schemas/office-registry.d.ts.map +1 -0
- package/dist/schemas/office-registry.js +177 -0
- package/dist/schemas/office-registry.js.map +1 -0
- package/dist/schemas/run-lifecycle.d.ts +166 -0
- package/dist/schemas/run-lifecycle.d.ts.map +1 -0
- package/dist/schemas/run-lifecycle.js +70 -0
- package/dist/schemas/run-lifecycle.js.map +1 -0
- package/dist/schemas/run-step.d.ts +89 -0
- package/dist/schemas/run-step.d.ts.map +1 -0
- package/dist/schemas/run-step.js +48 -0
- package/dist/schemas/run-step.js.map +1 -0
- package/dist/schemas/runtime-protocol.d.ts +77 -0
- package/dist/schemas/runtime-protocol.d.ts.map +1 -0
- package/dist/schemas/runtime-protocol.js +50 -0
- package/dist/schemas/runtime-protocol.js.map +1 -0
- package/dist/schemas/schedule-registry.d.ts +82 -0
- package/dist/schemas/schedule-registry.d.ts.map +1 -0
- package/dist/schemas/schedule-registry.js +63 -0
- package/dist/schemas/schedule-registry.js.map +1 -0
- package/dist/schemas/secret-reference.d.ts +6 -0
- package/dist/schemas/secret-reference.d.ts.map +1 -0
- package/dist/schemas/secret-reference.js +6 -0
- package/dist/schemas/secret-reference.js.map +1 -0
- package/dist/schemas/tool-gateway.d.ts +17 -0
- package/dist/schemas/tool-gateway.d.ts.map +1 -0
- package/dist/schemas/tool-gateway.js +18 -0
- package/dist/schemas/tool-gateway.js.map +1 -0
- package/dist/schemas/tool-registry.d.ts +110 -0
- package/dist/schemas/tool-registry.d.ts.map +1 -0
- package/dist/schemas/tool-registry.js +50 -0
- package/dist/schemas/tool-registry.js.map +1 -0
- package/dist/schemas/tool.d.ts +15 -0
- package/dist/schemas/tool.d.ts.map +1 -0
- package/dist/schemas/tool.js +16 -0
- package/dist/schemas/tool.js.map +1 -0
- package/dist/schemas/utc-instant.d.ts +9 -0
- package/dist/schemas/utc-instant.d.ts.map +1 -0
- package/dist/schemas/utc-instant.js +13 -0
- package/dist/schemas/utc-instant.js.map +1 -0
- package/dist/schemas/workflow-definition.d.ts +394 -0
- package/dist/schemas/workflow-definition.d.ts.map +1 -0
- package/dist/schemas/workflow-definition.js +138 -0
- package/dist/schemas/workflow-definition.js.map +1 -0
- package/dist/schemas/workflow-event.d.ts +21 -0
- package/dist/schemas/workflow-event.d.ts.map +1 -0
- package/dist/schemas/workflow-event.js +26 -0
- package/dist/schemas/workflow-event.js.map +1 -0
- package/dist/schemas/workflow-registry.d.ts +490 -0
- package/dist/schemas/workflow-registry.d.ts.map +1 -0
- package/dist/schemas/workflow-registry.js +125 -0
- package/dist/schemas/workflow-registry.js.map +1 -0
- package/dist/secret-reference.d.ts +8 -0
- package/dist/secret-reference.d.ts.map +1 -0
- package/dist/secret-reference.js +2 -0
- package/dist/secret-reference.js.map +1 -0
- package/dist/secret-resolver.d.ts +6 -0
- package/dist/secret-resolver.d.ts.map +1 -0
- package/dist/secret-resolver.js +2 -0
- package/dist/secret-resolver.js.map +1 -0
- package/dist/security.d.ts +50 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +33 -0
- package/dist/security.js.map +1 -0
- package/dist/stdio-transport.d.ts +5 -0
- package/dist/stdio-transport.d.ts.map +1 -0
- package/dist/stdio-transport.js +25 -0
- package/dist/stdio-transport.js.map +1 -0
- package/dist/telemetry.d.ts +24 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +2 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/tool-gateway.d.ts +67 -0
- package/dist/tool-gateway.d.ts.map +1 -0
- package/dist/tool-gateway.js +40 -0
- package/dist/tool-gateway.js.map +1 -0
- package/dist/tool-registry.d.ts +46 -0
- package/dist/tool-registry.d.ts.map +1 -0
- package/dist/tool-registry.js +2 -0
- package/dist/tool-registry.js.map +1 -0
- package/dist/tool.d.ts +60 -0
- package/dist/tool.d.ts.map +1 -0
- package/dist/tool.js +2 -0
- package/dist/tool.js.map +1 -0
- package/dist/trusted-runtime.d.ts +10 -0
- package/dist/trusted-runtime.d.ts.map +1 -0
- package/dist/trusted-runtime.js +47 -0
- package/dist/trusted-runtime.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/workflow-definition.d.ts +152 -0
- package/dist/workflow-definition.d.ts.map +1 -0
- package/dist/workflow-definition.js +86 -0
- package/dist/workflow-definition.js.map +1 -0
- package/dist/workflow-event.d.ts +8 -0
- package/dist/workflow-event.d.ts.map +1 -0
- package/dist/workflow-event.js +8 -0
- package/dist/workflow-event.js.map +1 -0
- package/dist/workflow-registry.d.ts +96 -0
- package/dist/workflow-registry.d.ts.map +1 -0
- package/dist/workflow-registry.js +2 -0
- package/dist/workflow-registry.js.map +1 -0
- package/dist/workflow-state.d.ts +10 -0
- package/dist/workflow-state.d.ts.map +1 -0
- package/dist/workflow-state.js +30 -0
- package/dist/workflow-state.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { jsonSchemaRecordSchema } from "./json-schema.js";
|
|
3
|
+
import { modelProfileVersionIdSchema } from "./ids.js";
|
|
4
|
+
import { MODEL_MAX_OUTPUT_TOKENS_MAX, MODEL_MAX_OUTPUT_TOKENS_MIN, MODEL_PROVIDERS, MODEL_TEXT_CONTENT_MAX_LENGTH, MODEL_TEXT_MAX_MESSAGES, MODEL_TEXT_ROLES, MODEL_PROVIDER_MODEL_ID_MAX_LENGTH, } from "../model-gateway.js";
|
|
5
|
+
const modelToolDefinitionSchema = z.strictObject({
|
|
6
|
+
name: z.string().min(1),
|
|
7
|
+
description: z.string().min(1).optional(),
|
|
8
|
+
inputSchema: jsonSchemaRecordSchema,
|
|
9
|
+
});
|
|
10
|
+
export const modelRequestSchema = z.strictObject({
|
|
11
|
+
modelProfileVersionId: modelProfileVersionIdSchema,
|
|
12
|
+
instructions: z.string(),
|
|
13
|
+
input: z.unknown(),
|
|
14
|
+
structuredOutputSchema: jsonSchemaRecordSchema.optional(),
|
|
15
|
+
toolDefinitions: z.array(modelToolDefinitionSchema).optional(),
|
|
16
|
+
timeoutMs: z.int().positive(),
|
|
17
|
+
metadata: z.record(z.string(), z.unknown()),
|
|
18
|
+
});
|
|
19
|
+
export const modelUsageSchema = z.strictObject({
|
|
20
|
+
inputUnits: z.int().nonnegative(),
|
|
21
|
+
outputUnits: z.int().nonnegative(),
|
|
22
|
+
cachedUnits: z.int().nonnegative().optional(),
|
|
23
|
+
});
|
|
24
|
+
export const modelResponseSchema = z.strictObject({
|
|
25
|
+
provider: z.string().min(1),
|
|
26
|
+
model: z.string().min(1),
|
|
27
|
+
providerResponseId: z.string().min(1).optional(),
|
|
28
|
+
output: z.unknown(),
|
|
29
|
+
usage: modelUsageSchema,
|
|
30
|
+
estimatedCost: z.number().nonnegative().optional(),
|
|
31
|
+
latencyMs: z.int().nonnegative(),
|
|
32
|
+
});
|
|
33
|
+
export const modelProviderSchema = z.enum(MODEL_PROVIDERS);
|
|
34
|
+
export const modelProviderModelIdSchema = z
|
|
35
|
+
.string()
|
|
36
|
+
.trim()
|
|
37
|
+
.min(1)
|
|
38
|
+
.max(MODEL_PROVIDER_MODEL_ID_MAX_LENGTH);
|
|
39
|
+
export const modelTextMessageSchema = z.strictObject({
|
|
40
|
+
role: z.enum(MODEL_TEXT_ROLES),
|
|
41
|
+
content: z.string().min(1).max(MODEL_TEXT_CONTENT_MAX_LENGTH),
|
|
42
|
+
});
|
|
43
|
+
export const generateTextInputSchema = z.strictObject({
|
|
44
|
+
messages: z.array(modelTextMessageSchema).min(1).max(MODEL_TEXT_MAX_MESSAGES),
|
|
45
|
+
maxOutputTokens: z
|
|
46
|
+
.int()
|
|
47
|
+
.min(MODEL_MAX_OUTPUT_TOKENS_MIN)
|
|
48
|
+
.max(MODEL_MAX_OUTPUT_TOKENS_MAX)
|
|
49
|
+
.optional(),
|
|
50
|
+
});
|
|
51
|
+
export const generateTextResultSchema = z.strictObject({
|
|
52
|
+
text: z.string().min(1),
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=model-gateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-gateway.js","sourceRoot":"","sources":["../../src/schemas/model-gateway.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const modelPricingCurrencySchema: z.ZodEnum<{
|
|
3
|
+
USD: "USD";
|
|
4
|
+
}>;
|
|
5
|
+
export declare const modelProfileVersionPricingSchema: z.ZodObject<{
|
|
6
|
+
currency: z.ZodEnum<{
|
|
7
|
+
USD: "USD";
|
|
8
|
+
}>;
|
|
9
|
+
inputUsdMicrosPerMillionTokens: z.ZodInt;
|
|
10
|
+
outputUsdMicrosPerMillionTokens: z.ZodInt;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
//# sourceMappingURL=model-pricing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-pricing.d.ts","sourceRoot":"","sources":["../../src/schemas/model-pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,0BAA0B;;EAAmC,CAAC;AAE3E,eAAO,MAAM,gCAAgC;;;;;;kBAU3C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { MODEL_PRICING_CURRENCIES, MODEL_PRICING_MAX_USD_MICROS_PER_MILLION_TOKENS, } from "../model-pricing.js";
|
|
3
|
+
export const modelPricingCurrencySchema = z.enum(MODEL_PRICING_CURRENCIES);
|
|
4
|
+
export const modelProfileVersionPricingSchema = z.strictObject({
|
|
5
|
+
currency: modelPricingCurrencySchema,
|
|
6
|
+
inputUsdMicrosPerMillionTokens: z
|
|
7
|
+
.int()
|
|
8
|
+
.nonnegative()
|
|
9
|
+
.max(MODEL_PRICING_MAX_USD_MICROS_PER_MILLION_TOKENS),
|
|
10
|
+
outputUsdMicrosPerMillionTokens: z
|
|
11
|
+
.int()
|
|
12
|
+
.nonnegative()
|
|
13
|
+
.max(MODEL_PRICING_MAX_USD_MICROS_PER_MILLION_TOKENS),
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=model-pricing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-pricing.js","sourceRoot":"","sources":["../../src/schemas/model-pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,wBAAwB,EACxB,+CAA+C,GAChD,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7D,QAAQ,EAAE,0BAA0B;IACpC,8BAA8B,EAAE,CAAC;SAC9B,GAAG,EAAE;SACL,WAAW,EAAE;SACb,GAAG,CAAC,+CAA+C,CAAC;IACvD,+BAA+B,EAAE,CAAC;SAC/B,GAAG,EAAE;SACL,WAAW,EAAE;SACb,GAAG,CAAC,+CAA+C,CAAC;CACxD,CAAC,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const createModelProfileRequestSchema: z.ZodObject<{
|
|
3
|
+
key: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
}, z.core.$strict>;
|
|
6
|
+
export declare const updateModelProfileRequestSchema: z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export declare const createModelProfileVersionRequestSchema: z.ZodObject<{
|
|
10
|
+
provider: z.ZodEnum<{
|
|
11
|
+
OPENAI: "OPENAI";
|
|
12
|
+
ANTHROPIC: "ANTHROPIC";
|
|
13
|
+
GOOGLE_GEMINI: "GOOGLE_GEMINI";
|
|
14
|
+
}>;
|
|
15
|
+
model: z.ZodString;
|
|
16
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
17
|
+
currency: z.ZodEnum<{
|
|
18
|
+
USD: "USD";
|
|
19
|
+
}>;
|
|
20
|
+
inputUsdMicrosPerMillionTokens: z.ZodInt;
|
|
21
|
+
outputUsdMicrosPerMillionTokens: z.ZodInt;
|
|
22
|
+
}, z.core.$strict>>;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
export declare const modelProfileResourceSchema: z.ZodObject<{
|
|
25
|
+
id: z.ZodType<import("../ids.js").OsvaId<"ModelProfileId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"ModelProfileId">, string>>;
|
|
26
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
27
|
+
key: z.ZodString;
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
createdAt: z.ZodString;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
export declare const modelProfileVersionResourceSchema: z.ZodObject<{
|
|
32
|
+
id: z.ZodType<import("../ids.js").OsvaId<"ModelProfileVersionId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"ModelProfileVersionId">, string>>;
|
|
33
|
+
modelProfileId: z.ZodType<import("../ids.js").OsvaId<"ModelProfileId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"ModelProfileId">, string>>;
|
|
34
|
+
version: z.ZodInt;
|
|
35
|
+
provider: z.ZodEnum<{
|
|
36
|
+
OPENAI: "OPENAI";
|
|
37
|
+
ANTHROPIC: "ANTHROPIC";
|
|
38
|
+
GOOGLE_GEMINI: "GOOGLE_GEMINI";
|
|
39
|
+
}>;
|
|
40
|
+
model: z.ZodString;
|
|
41
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
currency: z.ZodEnum<{
|
|
43
|
+
USD: "USD";
|
|
44
|
+
}>;
|
|
45
|
+
inputUsdMicrosPerMillionTokens: z.ZodInt;
|
|
46
|
+
outputUsdMicrosPerMillionTokens: z.ZodInt;
|
|
47
|
+
}, z.core.$strict>>;
|
|
48
|
+
createdAt: z.ZodString;
|
|
49
|
+
}, z.core.$strict>;
|
|
50
|
+
export declare const modelProfileListResourceSchema: z.ZodObject<{
|
|
51
|
+
modelProfiles: z.ZodArray<z.ZodObject<{
|
|
52
|
+
id: z.ZodType<import("../ids.js").OsvaId<"ModelProfileId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"ModelProfileId">, string>>;
|
|
53
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
54
|
+
key: z.ZodString;
|
|
55
|
+
name: z.ZodString;
|
|
56
|
+
createdAt: z.ZodString;
|
|
57
|
+
}, z.core.$strict>>;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
export declare const modelProfileVersionListResourceSchema: z.ZodObject<{
|
|
60
|
+
versions: z.ZodArray<z.ZodObject<{
|
|
61
|
+
id: z.ZodType<import("../ids.js").OsvaId<"ModelProfileVersionId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"ModelProfileVersionId">, string>>;
|
|
62
|
+
modelProfileId: z.ZodType<import("../ids.js").OsvaId<"ModelProfileId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"ModelProfileId">, string>>;
|
|
63
|
+
version: z.ZodInt;
|
|
64
|
+
provider: z.ZodEnum<{
|
|
65
|
+
OPENAI: "OPENAI";
|
|
66
|
+
ANTHROPIC: "ANTHROPIC";
|
|
67
|
+
GOOGLE_GEMINI: "GOOGLE_GEMINI";
|
|
68
|
+
}>;
|
|
69
|
+
model: z.ZodString;
|
|
70
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
71
|
+
currency: z.ZodEnum<{
|
|
72
|
+
USD: "USD";
|
|
73
|
+
}>;
|
|
74
|
+
inputUsdMicrosPerMillionTokens: z.ZodInt;
|
|
75
|
+
outputUsdMicrosPerMillionTokens: z.ZodInt;
|
|
76
|
+
}, z.core.$strict>>;
|
|
77
|
+
createdAt: z.ZodString;
|
|
78
|
+
}, z.core.$strict>>;
|
|
79
|
+
}, z.core.$strict>;
|
|
80
|
+
//# sourceMappingURL=model-profile-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-profile-registry.d.ts","sourceRoot":"","sources":["../../src/schemas/model-profile-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,+BAA+B;;;kBAG1C,CAAC;AAEH,eAAO,MAAM,+BAA+B;;kBAE1C,CAAC;AAEH,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;kBAIjD,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;kBAMrC,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;kBAQ5C,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;kBAEzC,CAAC;AAEH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;kBAEhD,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { modelProfileIdSchema, modelProfileVersionIdSchema, workspaceIdSchema, } from "./ids.js";
|
|
3
|
+
import { modelProviderModelIdSchema, modelProviderSchema, } from "./model-gateway.js";
|
|
4
|
+
import { modelProfileVersionPricingSchema } from "./model-pricing.js";
|
|
5
|
+
import { utcIso8601TimestampSchema } from "./utc-instant.js";
|
|
6
|
+
export const createModelProfileRequestSchema = z.strictObject({
|
|
7
|
+
key: z.string().min(1),
|
|
8
|
+
name: z.string().min(1),
|
|
9
|
+
});
|
|
10
|
+
export const updateModelProfileRequestSchema = z.strictObject({
|
|
11
|
+
name: z.string().min(1),
|
|
12
|
+
});
|
|
13
|
+
export const createModelProfileVersionRequestSchema = z.strictObject({
|
|
14
|
+
provider: modelProviderSchema,
|
|
15
|
+
model: modelProviderModelIdSchema,
|
|
16
|
+
pricing: modelProfileVersionPricingSchema.optional(),
|
|
17
|
+
});
|
|
18
|
+
export const modelProfileResourceSchema = z.strictObject({
|
|
19
|
+
id: modelProfileIdSchema,
|
|
20
|
+
workspaceId: workspaceIdSchema,
|
|
21
|
+
key: z.string().min(1),
|
|
22
|
+
name: z.string().min(1),
|
|
23
|
+
createdAt: utcIso8601TimestampSchema,
|
|
24
|
+
});
|
|
25
|
+
export const modelProfileVersionResourceSchema = z.strictObject({
|
|
26
|
+
id: modelProfileVersionIdSchema,
|
|
27
|
+
modelProfileId: modelProfileIdSchema,
|
|
28
|
+
version: z.int().positive(),
|
|
29
|
+
provider: modelProviderSchema,
|
|
30
|
+
model: modelProviderModelIdSchema,
|
|
31
|
+
pricing: modelProfileVersionPricingSchema.optional(),
|
|
32
|
+
createdAt: utcIso8601TimestampSchema,
|
|
33
|
+
});
|
|
34
|
+
export const modelProfileListResourceSchema = z.strictObject({
|
|
35
|
+
modelProfiles: z.array(modelProfileResourceSchema),
|
|
36
|
+
});
|
|
37
|
+
export const modelProfileVersionListResourceSchema = z.strictObject({
|
|
38
|
+
versions: z.array(modelProfileVersionResourceSchema),
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=model-profile-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-profile-registry.js","sourceRoot":"","sources":["../../src/schemas/model-profile-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC5D,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC5D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,YAAY,CAAC;IACnE,QAAQ,EAAE,mBAAmB;IAC7B,KAAK,EAAE,0BAA0B;IACjC,OAAO,EAAE,gCAAgC,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,YAAY,CAAC;IACvD,EAAE,EAAE,oBAAoB;IACxB,WAAW,EAAE,iBAAiB;IAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,SAAS,EAAE,yBAAyB;CACrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC9D,EAAE,EAAE,2BAA2B;IAC/B,cAAc,EAAE,oBAAoB;IACpC,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC3B,QAAQ,EAAE,mBAAmB;IAC7B,KAAK,EAAE,0BAA0B;IACjC,OAAO,EAAE,gCAAgC,CAAC,QAAQ,EAAE;IACpD,SAAS,EAAE,yBAAyB;CACrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3D,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC;CACnD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,YAAY,CAAC;IAClE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC;CACrD,CAAC,CAAC"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const goalStateSchema: z.ZodEnum<{
|
|
3
|
+
COMPLETED: "COMPLETED";
|
|
4
|
+
CANCELLED: "CANCELLED";
|
|
5
|
+
OPEN: "OPEN";
|
|
6
|
+
ACTIVE: "ACTIVE";
|
|
7
|
+
}>;
|
|
8
|
+
export declare const assignmentStateSchema: z.ZodEnum<{
|
|
9
|
+
PENDING: "PENDING";
|
|
10
|
+
RUNNING: "RUNNING";
|
|
11
|
+
COMPLETED: "COMPLETED";
|
|
12
|
+
FAILED: "FAILED";
|
|
13
|
+
CANCELLED: "CANCELLED";
|
|
14
|
+
}>;
|
|
15
|
+
export declare const assignmentTargetTypeSchema: z.ZodEnum<{
|
|
16
|
+
AGENT_VERSION: "AGENT_VERSION";
|
|
17
|
+
WORKFLOW_VERSION: "WORKFLOW_VERSION";
|
|
18
|
+
}>;
|
|
19
|
+
export declare const createOfficeWorkerRequestSchema: z.ZodObject<{
|
|
20
|
+
key: z.ZodString;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
description: z.ZodOptional<z.ZodString>;
|
|
23
|
+
agentId: z.ZodType<import("../ids.js").OsvaId<"AgentId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"AgentId">, string>>;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export declare const updateOfficeWorkerRequestSchema: z.ZodObject<{
|
|
26
|
+
name: z.ZodOptional<z.ZodString>;
|
|
27
|
+
description: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
export declare const officeWorkerResourceSchema: z.ZodObject<{
|
|
30
|
+
id: z.ZodType<import("../ids.js").OsvaId<"OfficeWorkerId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"OfficeWorkerId">, string>>;
|
|
31
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
32
|
+
key: z.ZodString;
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
description: z.ZodOptional<z.ZodString>;
|
|
35
|
+
agentId: z.ZodType<import("../ids.js").OsvaId<"AgentId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"AgentId">, string>>;
|
|
36
|
+
createdAt: z.ZodString;
|
|
37
|
+
updatedAt: z.ZodString;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
export declare const officeWorkerListResourceSchema: z.ZodObject<{
|
|
40
|
+
items: z.ZodArray<z.ZodObject<{
|
|
41
|
+
id: z.ZodType<import("../ids.js").OsvaId<"OfficeWorkerId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"OfficeWorkerId">, string>>;
|
|
42
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
43
|
+
key: z.ZodString;
|
|
44
|
+
name: z.ZodString;
|
|
45
|
+
description: z.ZodOptional<z.ZodString>;
|
|
46
|
+
agentId: z.ZodType<import("../ids.js").OsvaId<"AgentId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"AgentId">, string>>;
|
|
47
|
+
createdAt: z.ZodString;
|
|
48
|
+
updatedAt: z.ZodString;
|
|
49
|
+
}, z.core.$strict>>;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
export declare const createRoleRequestSchema: z.ZodObject<{
|
|
52
|
+
key: z.ZodString;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
description: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
export declare const updateRoleRequestSchema: z.ZodObject<{
|
|
57
|
+
name: z.ZodOptional<z.ZodString>;
|
|
58
|
+
description: z.ZodOptional<z.ZodString>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
export declare const roleResourceSchema: z.ZodObject<{
|
|
61
|
+
id: z.ZodType<import("../ids.js").OsvaId<"RoleId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"RoleId">, string>>;
|
|
62
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
63
|
+
key: z.ZodString;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
description: z.ZodOptional<z.ZodString>;
|
|
66
|
+
createdAt: z.ZodString;
|
|
67
|
+
updatedAt: z.ZodString;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
export declare const roleListResourceSchema: z.ZodObject<{
|
|
70
|
+
items: z.ZodArray<z.ZodObject<{
|
|
71
|
+
id: z.ZodType<import("../ids.js").OsvaId<"RoleId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"RoleId">, string>>;
|
|
72
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
73
|
+
key: z.ZodString;
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
description: z.ZodOptional<z.ZodString>;
|
|
76
|
+
createdAt: z.ZodString;
|
|
77
|
+
updatedAt: z.ZodString;
|
|
78
|
+
}, z.core.$strict>>;
|
|
79
|
+
}, z.core.$strict>;
|
|
80
|
+
export declare const createTeamRequestSchema: z.ZodObject<{
|
|
81
|
+
key: z.ZodString;
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
description: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
export declare const updateTeamRequestSchema: z.ZodObject<{
|
|
86
|
+
name: z.ZodOptional<z.ZodString>;
|
|
87
|
+
description: z.ZodOptional<z.ZodString>;
|
|
88
|
+
}, z.core.$strict>;
|
|
89
|
+
export declare const teamResourceSchema: z.ZodObject<{
|
|
90
|
+
id: z.ZodType<import("../ids.js").OsvaId<"TeamId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"TeamId">, string>>;
|
|
91
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
92
|
+
key: z.ZodString;
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
description: z.ZodOptional<z.ZodString>;
|
|
95
|
+
createdAt: z.ZodString;
|
|
96
|
+
updatedAt: z.ZodString;
|
|
97
|
+
}, z.core.$strict>;
|
|
98
|
+
export declare const teamListResourceSchema: z.ZodObject<{
|
|
99
|
+
items: z.ZodArray<z.ZodObject<{
|
|
100
|
+
id: z.ZodType<import("../ids.js").OsvaId<"TeamId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"TeamId">, string>>;
|
|
101
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
102
|
+
key: z.ZodString;
|
|
103
|
+
name: z.ZodString;
|
|
104
|
+
description: z.ZodOptional<z.ZodString>;
|
|
105
|
+
createdAt: z.ZodString;
|
|
106
|
+
updatedAt: z.ZodString;
|
|
107
|
+
}, z.core.$strict>>;
|
|
108
|
+
}, z.core.$strict>;
|
|
109
|
+
export declare const teamMembershipResourceSchema: z.ZodObject<{
|
|
110
|
+
teamId: z.ZodType<import("../ids.js").OsvaId<"TeamId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"TeamId">, string>>;
|
|
111
|
+
officeWorkerId: z.ZodType<import("../ids.js").OsvaId<"OfficeWorkerId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"OfficeWorkerId">, string>>;
|
|
112
|
+
roleId: z.ZodOptional<z.ZodType<import("../ids.js").OsvaId<"RoleId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"RoleId">, string>>>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
export declare const teamMembershipListResourceSchema: z.ZodObject<{
|
|
115
|
+
items: z.ZodArray<z.ZodObject<{
|
|
116
|
+
teamId: z.ZodType<import("../ids.js").OsvaId<"TeamId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"TeamId">, string>>;
|
|
117
|
+
officeWorkerId: z.ZodType<import("../ids.js").OsvaId<"OfficeWorkerId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"OfficeWorkerId">, string>>;
|
|
118
|
+
roleId: z.ZodOptional<z.ZodType<import("../ids.js").OsvaId<"RoleId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"RoleId">, string>>>;
|
|
119
|
+
}, z.core.$strict>>;
|
|
120
|
+
}, z.core.$strict>;
|
|
121
|
+
export declare const addTeamMembershipRequestSchema: z.ZodObject<{
|
|
122
|
+
officeWorkerId: z.ZodType<import("../ids.js").OsvaId<"OfficeWorkerId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"OfficeWorkerId">, string>>;
|
|
123
|
+
roleId: z.ZodOptional<z.ZodType<import("../ids.js").OsvaId<"RoleId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"RoleId">, string>>>;
|
|
124
|
+
}, z.core.$strict>;
|
|
125
|
+
export declare const createGoalRequestSchema: z.ZodObject<{
|
|
126
|
+
key: z.ZodString;
|
|
127
|
+
title: z.ZodString;
|
|
128
|
+
description: z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, z.core.$strict>;
|
|
130
|
+
export declare const updateGoalRequestSchema: z.ZodObject<{
|
|
131
|
+
title: z.ZodOptional<z.ZodString>;
|
|
132
|
+
description: z.ZodOptional<z.ZodString>;
|
|
133
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
134
|
+
COMPLETED: "COMPLETED";
|
|
135
|
+
CANCELLED: "CANCELLED";
|
|
136
|
+
OPEN: "OPEN";
|
|
137
|
+
ACTIVE: "ACTIVE";
|
|
138
|
+
}>>;
|
|
139
|
+
}, z.core.$strict>;
|
|
140
|
+
export declare const goalResourceSchema: z.ZodObject<{
|
|
141
|
+
id: z.ZodType<import("../ids.js").OsvaId<"GoalId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"GoalId">, string>>;
|
|
142
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
143
|
+
key: z.ZodString;
|
|
144
|
+
title: z.ZodString;
|
|
145
|
+
description: z.ZodOptional<z.ZodString>;
|
|
146
|
+
status: z.ZodEnum<{
|
|
147
|
+
COMPLETED: "COMPLETED";
|
|
148
|
+
CANCELLED: "CANCELLED";
|
|
149
|
+
OPEN: "OPEN";
|
|
150
|
+
ACTIVE: "ACTIVE";
|
|
151
|
+
}>;
|
|
152
|
+
createdAt: z.ZodString;
|
|
153
|
+
updatedAt: z.ZodString;
|
|
154
|
+
}, z.core.$strict>;
|
|
155
|
+
export declare const goalListResourceSchema: z.ZodObject<{
|
|
156
|
+
items: z.ZodArray<z.ZodObject<{
|
|
157
|
+
id: z.ZodType<import("../ids.js").OsvaId<"GoalId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"GoalId">, string>>;
|
|
158
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
159
|
+
key: z.ZodString;
|
|
160
|
+
title: z.ZodString;
|
|
161
|
+
description: z.ZodOptional<z.ZodString>;
|
|
162
|
+
status: z.ZodEnum<{
|
|
163
|
+
COMPLETED: "COMPLETED";
|
|
164
|
+
CANCELLED: "CANCELLED";
|
|
165
|
+
OPEN: "OPEN";
|
|
166
|
+
ACTIVE: "ACTIVE";
|
|
167
|
+
}>;
|
|
168
|
+
createdAt: z.ZodString;
|
|
169
|
+
updatedAt: z.ZodString;
|
|
170
|
+
}, z.core.$strict>>;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
export declare const createAssignmentRequestSchema: z.ZodObject<{
|
|
173
|
+
goalId: z.ZodOptional<z.ZodType<import("../ids.js").OsvaId<"GoalId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"GoalId">, string>>>;
|
|
174
|
+
officeWorkerId: z.ZodType<import("../ids.js").OsvaId<"OfficeWorkerId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"OfficeWorkerId">, string>>;
|
|
175
|
+
title: z.ZodString;
|
|
176
|
+
description: z.ZodOptional<z.ZodString>;
|
|
177
|
+
targetType: z.ZodEnum<{
|
|
178
|
+
AGENT_VERSION: "AGENT_VERSION";
|
|
179
|
+
WORKFLOW_VERSION: "WORKFLOW_VERSION";
|
|
180
|
+
}>;
|
|
181
|
+
targetVersionId: z.ZodString;
|
|
182
|
+
input: z.ZodCustom<import("../json-value.js").JsonValue, import("../json-value.js").JsonValue>;
|
|
183
|
+
}, z.core.$strict>;
|
|
184
|
+
export declare const updateAssignmentRequestSchema: z.ZodObject<{
|
|
185
|
+
title: z.ZodOptional<z.ZodString>;
|
|
186
|
+
description: z.ZodOptional<z.ZodString>;
|
|
187
|
+
goalId: z.ZodOptional<z.ZodNullable<z.ZodType<import("../ids.js").OsvaId<"GoalId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"GoalId">, string>>>>;
|
|
188
|
+
}, z.core.$strict>;
|
|
189
|
+
export declare const assignmentResourceSchema: z.ZodObject<{
|
|
190
|
+
id: z.ZodType<import("../ids.js").OsvaId<"AssignmentId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"AssignmentId">, string>>;
|
|
191
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
192
|
+
goalId: z.ZodOptional<z.ZodType<import("../ids.js").OsvaId<"GoalId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"GoalId">, string>>>;
|
|
193
|
+
officeWorkerId: z.ZodType<import("../ids.js").OsvaId<"OfficeWorkerId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"OfficeWorkerId">, string>>;
|
|
194
|
+
title: z.ZodString;
|
|
195
|
+
description: z.ZodOptional<z.ZodString>;
|
|
196
|
+
targetType: z.ZodEnum<{
|
|
197
|
+
AGENT_VERSION: "AGENT_VERSION";
|
|
198
|
+
WORKFLOW_VERSION: "WORKFLOW_VERSION";
|
|
199
|
+
}>;
|
|
200
|
+
targetVersionId: z.ZodString;
|
|
201
|
+
input: z.ZodCustom<import("../json-value.js").JsonValue, import("../json-value.js").JsonValue>;
|
|
202
|
+
status: z.ZodEnum<{
|
|
203
|
+
PENDING: "PENDING";
|
|
204
|
+
RUNNING: "RUNNING";
|
|
205
|
+
COMPLETED: "COMPLETED";
|
|
206
|
+
FAILED: "FAILED";
|
|
207
|
+
CANCELLED: "CANCELLED";
|
|
208
|
+
}>;
|
|
209
|
+
runId: z.ZodOptional<z.ZodType<import("../ids.js").OsvaId<"RunId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"RunId">, string>>>;
|
|
210
|
+
workflowRunId: z.ZodOptional<z.ZodType<import("../ids.js").OsvaId<"WorkflowRunId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkflowRunId">, string>>>;
|
|
211
|
+
createdAt: z.ZodString;
|
|
212
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
213
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
214
|
+
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
215
|
+
}, z.core.$strict>;
|
|
216
|
+
export declare const assignmentListResourceSchema: z.ZodObject<{
|
|
217
|
+
items: z.ZodArray<z.ZodObject<{
|
|
218
|
+
id: z.ZodType<import("../ids.js").OsvaId<"AssignmentId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"AssignmentId">, string>>;
|
|
219
|
+
workspaceId: z.ZodType<import("../ids.js").OsvaId<"WorkspaceId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkspaceId">, string>>;
|
|
220
|
+
goalId: z.ZodOptional<z.ZodType<import("../ids.js").OsvaId<"GoalId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"GoalId">, string>>>;
|
|
221
|
+
officeWorkerId: z.ZodType<import("../ids.js").OsvaId<"OfficeWorkerId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"OfficeWorkerId">, string>>;
|
|
222
|
+
title: z.ZodString;
|
|
223
|
+
description: z.ZodOptional<z.ZodString>;
|
|
224
|
+
targetType: z.ZodEnum<{
|
|
225
|
+
AGENT_VERSION: "AGENT_VERSION";
|
|
226
|
+
WORKFLOW_VERSION: "WORKFLOW_VERSION";
|
|
227
|
+
}>;
|
|
228
|
+
targetVersionId: z.ZodString;
|
|
229
|
+
input: z.ZodCustom<import("../json-value.js").JsonValue, import("../json-value.js").JsonValue>;
|
|
230
|
+
status: z.ZodEnum<{
|
|
231
|
+
PENDING: "PENDING";
|
|
232
|
+
RUNNING: "RUNNING";
|
|
233
|
+
COMPLETED: "COMPLETED";
|
|
234
|
+
FAILED: "FAILED";
|
|
235
|
+
CANCELLED: "CANCELLED";
|
|
236
|
+
}>;
|
|
237
|
+
runId: z.ZodOptional<z.ZodType<import("../ids.js").OsvaId<"RunId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"RunId">, string>>>;
|
|
238
|
+
workflowRunId: z.ZodOptional<z.ZodType<import("../ids.js").OsvaId<"WorkflowRunId">, string, z.core.$ZodTypeInternals<import("../ids.js").OsvaId<"WorkflowRunId">, string>>>;
|
|
239
|
+
createdAt: z.ZodString;
|
|
240
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
241
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
242
|
+
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
243
|
+
}, z.core.$strict>>;
|
|
244
|
+
}, z.core.$strict>;
|
|
245
|
+
export declare const listOfficeResourcesQuerySchema: z.ZodObject<{}, z.core.$strict>;
|
|
246
|
+
//# sourceMappingURL=office-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"office-registry.d.ts","sourceRoot":"","sources":["../../src/schemas/office-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,eAAe;;;;;EAK1B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;EAMhC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;EAGrC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;kBAK1C,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;kBAUzC,CAAC;AAEJ,eAAO,MAAM,0BAA0B;;;;;;;;;kBASrC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;kBAEzC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;kBAIlC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;kBAUjC,CAAC;AAEJ,eAAO,MAAM,kBAAkB;;;;;;;;kBAQ7B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;kBAEjC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;kBAIlC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;kBAUjC,CAAC;AAEJ,eAAO,MAAM,kBAAkB;;;;;;;;kBAQ7B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;kBAEjC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;kBAIvC,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;kBAE3C,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;kBAGzC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;kBAIlC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;kBAYjC,CAAC;AAEJ,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;kBAS7B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;kBAEjC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;kBAQxC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;kBAYvC,CAAC;AAEJ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiBnC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAEvC,CAAC;AAEH,eAAO,MAAM,8BAA8B,iCAAqB,CAAC"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { jsonValueSchema } from "./json-value.js";
|
|
3
|
+
import { agentIdSchema, assignmentIdSchema, goalIdSchema, officeWorkerIdSchema, roleIdSchema, runIdSchema, teamIdSchema, workflowRunIdSchema, workspaceIdSchema, } from "./ids.js";
|
|
4
|
+
export const goalStateSchema = z.enum([
|
|
5
|
+
"OPEN",
|
|
6
|
+
"ACTIVE",
|
|
7
|
+
"COMPLETED",
|
|
8
|
+
"CANCELLED",
|
|
9
|
+
]);
|
|
10
|
+
export const assignmentStateSchema = z.enum([
|
|
11
|
+
"PENDING",
|
|
12
|
+
"RUNNING",
|
|
13
|
+
"COMPLETED",
|
|
14
|
+
"FAILED",
|
|
15
|
+
"CANCELLED",
|
|
16
|
+
]);
|
|
17
|
+
export const assignmentTargetTypeSchema = z.enum([
|
|
18
|
+
"AGENT_VERSION",
|
|
19
|
+
"WORKFLOW_VERSION",
|
|
20
|
+
]);
|
|
21
|
+
export const createOfficeWorkerRequestSchema = z.strictObject({
|
|
22
|
+
key: z.string().min(1),
|
|
23
|
+
name: z.string().min(1),
|
|
24
|
+
description: z.string().min(1).optional(),
|
|
25
|
+
agentId: agentIdSchema,
|
|
26
|
+
});
|
|
27
|
+
export const updateOfficeWorkerRequestSchema = z
|
|
28
|
+
.strictObject({
|
|
29
|
+
name: z.string().min(1).optional(),
|
|
30
|
+
description: z.string().min(1).optional(),
|
|
31
|
+
})
|
|
32
|
+
.refine((value) => value.name !== undefined || value.description !== undefined, {
|
|
33
|
+
message: "At least one field must be provided.",
|
|
34
|
+
});
|
|
35
|
+
export const officeWorkerResourceSchema = z.strictObject({
|
|
36
|
+
id: officeWorkerIdSchema,
|
|
37
|
+
workspaceId: workspaceIdSchema,
|
|
38
|
+
key: z.string().min(1),
|
|
39
|
+
name: z.string().min(1),
|
|
40
|
+
description: z.string().min(1).optional(),
|
|
41
|
+
agentId: agentIdSchema,
|
|
42
|
+
createdAt: z.string().min(1),
|
|
43
|
+
updatedAt: z.string().min(1),
|
|
44
|
+
});
|
|
45
|
+
export const officeWorkerListResourceSchema = z.strictObject({
|
|
46
|
+
items: z.array(officeWorkerResourceSchema),
|
|
47
|
+
});
|
|
48
|
+
export const createRoleRequestSchema = z.strictObject({
|
|
49
|
+
key: z.string().min(1),
|
|
50
|
+
name: z.string().min(1),
|
|
51
|
+
description: z.string().min(1).optional(),
|
|
52
|
+
});
|
|
53
|
+
export const updateRoleRequestSchema = z
|
|
54
|
+
.strictObject({
|
|
55
|
+
name: z.string().min(1).optional(),
|
|
56
|
+
description: z.string().min(1).optional(),
|
|
57
|
+
})
|
|
58
|
+
.refine((value) => value.name !== undefined || value.description !== undefined, {
|
|
59
|
+
message: "At least one field must be provided.",
|
|
60
|
+
});
|
|
61
|
+
export const roleResourceSchema = z.strictObject({
|
|
62
|
+
id: roleIdSchema,
|
|
63
|
+
workspaceId: workspaceIdSchema,
|
|
64
|
+
key: z.string().min(1),
|
|
65
|
+
name: z.string().min(1),
|
|
66
|
+
description: z.string().min(1).optional(),
|
|
67
|
+
createdAt: z.string().min(1),
|
|
68
|
+
updatedAt: z.string().min(1),
|
|
69
|
+
});
|
|
70
|
+
export const roleListResourceSchema = z.strictObject({
|
|
71
|
+
items: z.array(roleResourceSchema),
|
|
72
|
+
});
|
|
73
|
+
export const createTeamRequestSchema = z.strictObject({
|
|
74
|
+
key: z.string().min(1),
|
|
75
|
+
name: z.string().min(1),
|
|
76
|
+
description: z.string().min(1).optional(),
|
|
77
|
+
});
|
|
78
|
+
export const updateTeamRequestSchema = z
|
|
79
|
+
.strictObject({
|
|
80
|
+
name: z.string().min(1).optional(),
|
|
81
|
+
description: z.string().min(1).optional(),
|
|
82
|
+
})
|
|
83
|
+
.refine((value) => value.name !== undefined || value.description !== undefined, {
|
|
84
|
+
message: "At least one field must be provided.",
|
|
85
|
+
});
|
|
86
|
+
export const teamResourceSchema = z.strictObject({
|
|
87
|
+
id: teamIdSchema,
|
|
88
|
+
workspaceId: workspaceIdSchema,
|
|
89
|
+
key: z.string().min(1),
|
|
90
|
+
name: z.string().min(1),
|
|
91
|
+
description: z.string().min(1).optional(),
|
|
92
|
+
createdAt: z.string().min(1),
|
|
93
|
+
updatedAt: z.string().min(1),
|
|
94
|
+
});
|
|
95
|
+
export const teamListResourceSchema = z.strictObject({
|
|
96
|
+
items: z.array(teamResourceSchema),
|
|
97
|
+
});
|
|
98
|
+
export const teamMembershipResourceSchema = z.strictObject({
|
|
99
|
+
teamId: teamIdSchema,
|
|
100
|
+
officeWorkerId: officeWorkerIdSchema,
|
|
101
|
+
roleId: roleIdSchema.optional(),
|
|
102
|
+
});
|
|
103
|
+
export const teamMembershipListResourceSchema = z.strictObject({
|
|
104
|
+
items: z.array(teamMembershipResourceSchema),
|
|
105
|
+
});
|
|
106
|
+
export const addTeamMembershipRequestSchema = z.strictObject({
|
|
107
|
+
officeWorkerId: officeWorkerIdSchema,
|
|
108
|
+
roleId: roleIdSchema.optional(),
|
|
109
|
+
});
|
|
110
|
+
export const createGoalRequestSchema = z.strictObject({
|
|
111
|
+
key: z.string().min(1),
|
|
112
|
+
title: z.string().min(1),
|
|
113
|
+
description: z.string().min(1).optional(),
|
|
114
|
+
});
|
|
115
|
+
export const updateGoalRequestSchema = z
|
|
116
|
+
.strictObject({
|
|
117
|
+
title: z.string().min(1).optional(),
|
|
118
|
+
description: z.string().min(1).optional(),
|
|
119
|
+
status: goalStateSchema.optional(),
|
|
120
|
+
})
|
|
121
|
+
.refine((value) => value.title !== undefined ||
|
|
122
|
+
value.description !== undefined ||
|
|
123
|
+
value.status !== undefined, { message: "At least one field must be provided." });
|
|
124
|
+
export const goalResourceSchema = z.strictObject({
|
|
125
|
+
id: goalIdSchema,
|
|
126
|
+
workspaceId: workspaceIdSchema,
|
|
127
|
+
key: z.string().min(1),
|
|
128
|
+
title: z.string().min(1),
|
|
129
|
+
description: z.string().min(1).optional(),
|
|
130
|
+
status: goalStateSchema,
|
|
131
|
+
createdAt: z.string().min(1),
|
|
132
|
+
updatedAt: z.string().min(1),
|
|
133
|
+
});
|
|
134
|
+
export const goalListResourceSchema = z.strictObject({
|
|
135
|
+
items: z.array(goalResourceSchema),
|
|
136
|
+
});
|
|
137
|
+
export const createAssignmentRequestSchema = z.strictObject({
|
|
138
|
+
goalId: goalIdSchema.optional(),
|
|
139
|
+
officeWorkerId: officeWorkerIdSchema,
|
|
140
|
+
title: z.string().min(1),
|
|
141
|
+
description: z.string().min(1).optional(),
|
|
142
|
+
targetType: assignmentTargetTypeSchema,
|
|
143
|
+
targetVersionId: z.string().min(1),
|
|
144
|
+
input: jsonValueSchema,
|
|
145
|
+
});
|
|
146
|
+
export const updateAssignmentRequestSchema = z
|
|
147
|
+
.strictObject({
|
|
148
|
+
title: z.string().min(1).optional(),
|
|
149
|
+
description: z.string().min(1).optional(),
|
|
150
|
+
goalId: goalIdSchema.nullable().optional(),
|
|
151
|
+
})
|
|
152
|
+
.refine((value) => value.title !== undefined ||
|
|
153
|
+
value.description !== undefined ||
|
|
154
|
+
value.goalId !== undefined, { message: "At least one field must be provided." });
|
|
155
|
+
export const assignmentResourceSchema = z.strictObject({
|
|
156
|
+
id: assignmentIdSchema,
|
|
157
|
+
workspaceId: workspaceIdSchema,
|
|
158
|
+
goalId: goalIdSchema.optional(),
|
|
159
|
+
officeWorkerId: officeWorkerIdSchema,
|
|
160
|
+
title: z.string().min(1),
|
|
161
|
+
description: z.string().min(1).optional(),
|
|
162
|
+
targetType: assignmentTargetTypeSchema,
|
|
163
|
+
targetVersionId: z.string().min(1),
|
|
164
|
+
input: jsonValueSchema,
|
|
165
|
+
status: assignmentStateSchema,
|
|
166
|
+
runId: runIdSchema.optional(),
|
|
167
|
+
workflowRunId: workflowRunIdSchema.optional(),
|
|
168
|
+
createdAt: z.string().min(1),
|
|
169
|
+
startedAt: z.string().min(1).optional(),
|
|
170
|
+
completedAt: z.string().min(1).optional(),
|
|
171
|
+
cancelledAt: z.string().min(1).optional(),
|
|
172
|
+
});
|
|
173
|
+
export const assignmentListResourceSchema = z.strictObject({
|
|
174
|
+
items: z.array(assignmentResourceSchema),
|
|
175
|
+
});
|
|
176
|
+
export const listOfficeResourcesQuerySchema = z.strictObject({});
|
|
177
|
+
//# sourceMappingURL=office-registry.js.map
|