@camunda/camunda-api-zod-schemas 0.0.6 → 0.0.7
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { getQueryRequestBodySchema, basicStringFilterSchema, advancedDateTimeFilterSchema, getQueryResponseBodySchema, API_VERSION } from "../common.js";
|
|
3
3
|
import { matchedDecisionRuleItemSchema, evaluatedDecisionInputItemSchema } from "./decision-definition.js";
|
|
4
|
-
const decisionDefinitionTypeSchema = z.enum(["DECISION_TABLE", "LITERAL_EXPRESSION"
|
|
5
|
-
const decisionInstanceStateSchema = z.enum(["EVALUATED", "FAILED"
|
|
4
|
+
const decisionDefinitionTypeSchema = z.enum(["DECISION_TABLE", "LITERAL_EXPRESSION"]);
|
|
5
|
+
const decisionInstanceStateSchema = z.enum(["EVALUATED", "FAILED"]);
|
|
6
6
|
const decisionInstanceSchema = z.object({
|
|
7
7
|
decisionEvaluationInstanceKey: z.string(),
|
|
8
8
|
state: decisionInstanceStateSchema,
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Endpoint } from './common';
|
|
3
3
|
declare const decisionDefinitionTypeSchema: z.ZodEnum<{
|
|
4
|
-
UNSPECIFIED: "UNSPECIFIED";
|
|
5
|
-
UNKNOWN: "UNKNOWN";
|
|
6
4
|
DECISION_TABLE: "DECISION_TABLE";
|
|
7
5
|
LITERAL_EXPRESSION: "LITERAL_EXPRESSION";
|
|
8
6
|
}>;
|
|
9
7
|
type DecisionDefinitionType = z.infer<typeof decisionDefinitionTypeSchema>;
|
|
10
8
|
declare const decisionInstanceStateSchema: z.ZodEnum<{
|
|
11
|
-
UNSPECIFIED: "UNSPECIFIED";
|
|
12
|
-
UNKNOWN: "UNKNOWN";
|
|
13
9
|
FAILED: "FAILED";
|
|
14
10
|
EVALUATED: "EVALUATED";
|
|
15
11
|
}>;
|
|
@@ -17,8 +13,6 @@ type DecisionInstanceState = z.infer<typeof decisionInstanceStateSchema>;
|
|
|
17
13
|
declare const decisionInstanceSchema: z.ZodObject<{
|
|
18
14
|
decisionEvaluationInstanceKey: z.ZodString;
|
|
19
15
|
state: z.ZodEnum<{
|
|
20
|
-
UNSPECIFIED: "UNSPECIFIED";
|
|
21
|
-
UNKNOWN: "UNKNOWN";
|
|
22
16
|
FAILED: "FAILED";
|
|
23
17
|
EVALUATED: "EVALUATED";
|
|
24
18
|
}>;
|
|
@@ -28,8 +22,6 @@ declare const decisionInstanceSchema: z.ZodObject<{
|
|
|
28
22
|
decisionDefinitionName: z.ZodString;
|
|
29
23
|
decisionDefinitionVersion: z.ZodNumber;
|
|
30
24
|
decisionDefinitionType: z.ZodEnum<{
|
|
31
|
-
UNSPECIFIED: "UNSPECIFIED";
|
|
32
|
-
UNKNOWN: "UNKNOWN";
|
|
33
25
|
DECISION_TABLE: "DECISION_TABLE";
|
|
34
26
|
LITERAL_EXPRESSION: "LITERAL_EXPRESSION";
|
|
35
27
|
}>;
|
|
@@ -76,8 +68,6 @@ declare const queryDecisionInstancesRequestBodySchema: z.ZodObject<{
|
|
|
76
68
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
77
69
|
processDefinitionKey: z.ZodOptional<z.ZodString>;
|
|
78
70
|
state: z.ZodOptional<z.ZodEnum<{
|
|
79
|
-
UNSPECIFIED: "UNSPECIFIED";
|
|
80
|
-
UNKNOWN: "UNKNOWN";
|
|
81
71
|
FAILED: "FAILED";
|
|
82
72
|
EVALUATED: "EVALUATED";
|
|
83
73
|
}>>;
|
|
@@ -86,8 +76,6 @@ declare const queryDecisionInstancesRequestBodySchema: z.ZodObject<{
|
|
|
86
76
|
decisionDefinitionName: z.ZodOptional<z.ZodString>;
|
|
87
77
|
decisionDefinitionVersion: z.ZodOptional<z.ZodNumber>;
|
|
88
78
|
decisionDefinitionType: z.ZodOptional<z.ZodEnum<{
|
|
89
|
-
UNSPECIFIED: "UNSPECIFIED";
|
|
90
|
-
UNKNOWN: "UNKNOWN";
|
|
91
79
|
DECISION_TABLE: "DECISION_TABLE";
|
|
92
80
|
LITERAL_EXPRESSION: "LITERAL_EXPRESSION";
|
|
93
81
|
}>>;
|
|
@@ -117,13 +105,13 @@ declare const queryDecisionInstancesRequestBodySchema: z.ZodObject<{
|
|
|
117
105
|
type QueryDecisionInstancesRequestBody = z.infer<typeof queryDecisionInstancesRequestBodySchema>;
|
|
118
106
|
declare const queryDecisionInstancesResponseBodySchema: z.ZodType<import('./common').QueryResponseBody<{
|
|
119
107
|
decisionEvaluationInstanceKey: string;
|
|
120
|
-
state: "
|
|
108
|
+
state: "FAILED" | "EVALUATED";
|
|
121
109
|
evaluationDate: string;
|
|
122
110
|
evaluationFailure: string;
|
|
123
111
|
decisionDefinitionId: string;
|
|
124
112
|
decisionDefinitionName: string;
|
|
125
113
|
decisionDefinitionVersion: number;
|
|
126
|
-
decisionDefinitionType: "
|
|
114
|
+
decisionDefinitionType: "DECISION_TABLE" | "LITERAL_EXPRESSION";
|
|
127
115
|
result: string;
|
|
128
116
|
tenantId: string;
|
|
129
117
|
decisionEvaluationKey: string;
|
|
@@ -133,13 +121,13 @@ declare const queryDecisionInstancesResponseBodySchema: z.ZodType<import('./comm
|
|
|
133
121
|
elementInstanceKey: string;
|
|
134
122
|
}>, unknown, z.core.$ZodTypeInternals<import('./common').QueryResponseBody<{
|
|
135
123
|
decisionEvaluationInstanceKey: string;
|
|
136
|
-
state: "
|
|
124
|
+
state: "FAILED" | "EVALUATED";
|
|
137
125
|
evaluationDate: string;
|
|
138
126
|
evaluationFailure: string;
|
|
139
127
|
decisionDefinitionId: string;
|
|
140
128
|
decisionDefinitionName: string;
|
|
141
129
|
decisionDefinitionVersion: number;
|
|
142
|
-
decisionDefinitionType: "
|
|
130
|
+
decisionDefinitionType: "DECISION_TABLE" | "LITERAL_EXPRESSION";
|
|
143
131
|
result: string;
|
|
144
132
|
tenantId: string;
|
|
145
133
|
decisionEvaluationKey: string;
|
|
@@ -152,8 +140,6 @@ type QueryDecisionInstancesResponseBody = z.infer<typeof queryDecisionInstancesR
|
|
|
152
140
|
declare const getDecisionInstanceResponseBodySchema: z.ZodObject<{
|
|
153
141
|
decisionEvaluationInstanceKey: z.ZodString;
|
|
154
142
|
state: z.ZodEnum<{
|
|
155
|
-
UNSPECIFIED: "UNSPECIFIED";
|
|
156
|
-
UNKNOWN: "UNKNOWN";
|
|
157
143
|
FAILED: "FAILED";
|
|
158
144
|
EVALUATED: "EVALUATED";
|
|
159
145
|
}>;
|
|
@@ -163,8 +149,6 @@ declare const getDecisionInstanceResponseBodySchema: z.ZodObject<{
|
|
|
163
149
|
decisionDefinitionName: z.ZodString;
|
|
164
150
|
decisionDefinitionVersion: z.ZodNumber;
|
|
165
151
|
decisionDefinitionType: z.ZodEnum<{
|
|
166
|
-
UNSPECIFIED: "UNSPECIFIED";
|
|
167
|
-
UNKNOWN: "UNKNOWN";
|
|
168
152
|
DECISION_TABLE: "DECISION_TABLE";
|
|
169
153
|
LITERAL_EXPRESSION: "LITERAL_EXPRESSION";
|
|
170
154
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -43,13 +43,13 @@ declare const endpoints: {
|
|
|
43
43
|
readonly queryDecisionInstances: import('./common').Endpoint<undefined>;
|
|
44
44
|
readonly getDecisionInstance: import('./common').Endpoint<Pick<{
|
|
45
45
|
decisionEvaluationInstanceKey: string;
|
|
46
|
-
state: "
|
|
46
|
+
state: "FAILED" | "EVALUATED";
|
|
47
47
|
evaluationDate: string;
|
|
48
48
|
evaluationFailure: string;
|
|
49
49
|
decisionDefinitionId: string;
|
|
50
50
|
decisionDefinitionName: string;
|
|
51
51
|
decisionDefinitionVersion: number;
|
|
52
|
-
decisionDefinitionType: "
|
|
52
|
+
decisionDefinitionType: "DECISION_TABLE" | "LITERAL_EXPRESSION";
|
|
53
53
|
result: string;
|
|
54
54
|
tenantId: string;
|
|
55
55
|
decisionEvaluationKey: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/camunda-api-zod-schemas",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"license": "LicenseRef-Camunda-1.0",
|
|
5
5
|
"description": "Zod schemas and TypeScript types for Camunda 8 unified API",
|
|
6
6
|
"author": "Vinicius Goulart <vinicius.goulart@camunda.com>",
|