@aletheia-dev/core 0.1.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/CHANGELOG.md +10 -0
- package/LICENSE +202 -0
- package/README.md +18 -0
- package/dist/index.cjs +1635 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2691 -0
- package/dist/index.d.ts +2691 -0
- package/dist/index.js +1442 -0
- package/dist/index.js.map +1 -0
- package/dist/logger-DFA8nkvG.d.cts +15 -0
- package/dist/logger-DFA8nkvG.d.ts +15 -0
- package/dist/node.cjs +179 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.cts +86 -0
- package/dist/node.d.ts +86 -0
- package/dist/node.js +138 -0
- package/dist/node.js.map +1 -0
- package/package.json +61 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,2691 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export { L as LogFn, a as Logger, n as noopLogger } from './logger-DFA8nkvG.cjs';
|
|
3
|
+
|
|
4
|
+
/** UUID-shaped identifier (8-4-4-4-12 hex) used for every entity. `guid` rather than `uuid` so
|
|
5
|
+
* well-known fixed ids such as the dev tenant are accepted. */
|
|
6
|
+
declare const Id: z.ZodGUID;
|
|
7
|
+
type Id = z.infer<typeof Id>;
|
|
8
|
+
/** Arbitrary JSON object payload (stored as jsonb). Validated by domain code, not the DB. */
|
|
9
|
+
declare const JsonObject: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
10
|
+
type JsonObject = z.infer<typeof JsonObject>;
|
|
11
|
+
declare const Timestamps: z.ZodObject<{
|
|
12
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
13
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/** Every persisted, tenant-scoped entity. */
|
|
16
|
+
declare const BaseEntity: z.ZodObject<{
|
|
17
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
18
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
19
|
+
id: z.ZodGUID;
|
|
20
|
+
tenantId: z.ZodGUID;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
type BaseEntity = z.infer<typeof BaseEntity>;
|
|
23
|
+
/** Lifecycle of versioned definitions (workflows, rules, collection flows). */
|
|
24
|
+
declare const DefinitionStatus: z.ZodEnum<{
|
|
25
|
+
draft: "draft";
|
|
26
|
+
pending_approval: "pending_approval";
|
|
27
|
+
published: "published";
|
|
28
|
+
archived: "archived";
|
|
29
|
+
}>;
|
|
30
|
+
type DefinitionStatus = z.infer<typeof DefinitionStatus>;
|
|
31
|
+
/** Stable slug used to address definitions across versions. */
|
|
32
|
+
declare const DefinitionKey: z.ZodString;
|
|
33
|
+
type DefinitionKey = z.infer<typeof DefinitionKey>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Who performed an action: a human `user`, a machine `service` account, an end customer
|
|
37
|
+
* (`applicant`) acting through a submission token, the `system` itself, a `plugin` or a `workflow`.
|
|
38
|
+
*/
|
|
39
|
+
declare const ActorType: z.ZodEnum<{
|
|
40
|
+
user: "user";
|
|
41
|
+
service: "service";
|
|
42
|
+
applicant: "applicant";
|
|
43
|
+
system: "system";
|
|
44
|
+
plugin: "plugin";
|
|
45
|
+
workflow: "workflow";
|
|
46
|
+
}>;
|
|
47
|
+
type ActorType = z.infer<typeof ActorType>;
|
|
48
|
+
declare const Actor: z.ZodObject<{
|
|
49
|
+
type: z.ZodEnum<{
|
|
50
|
+
user: "user";
|
|
51
|
+
service: "service";
|
|
52
|
+
applicant: "applicant";
|
|
53
|
+
system: "system";
|
|
54
|
+
plugin: "plugin";
|
|
55
|
+
workflow: "workflow";
|
|
56
|
+
}>;
|
|
57
|
+
id: z.ZodString;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
type Actor = z.infer<typeof Actor>;
|
|
60
|
+
/** Passed as the first argument to every repository and service method. */
|
|
61
|
+
declare const TenantContext: z.ZodObject<{
|
|
62
|
+
tenantId: z.ZodGUID;
|
|
63
|
+
actor: z.ZodObject<{
|
|
64
|
+
type: z.ZodEnum<{
|
|
65
|
+
user: "user";
|
|
66
|
+
service: "service";
|
|
67
|
+
applicant: "applicant";
|
|
68
|
+
system: "system";
|
|
69
|
+
plugin: "plugin";
|
|
70
|
+
workflow: "workflow";
|
|
71
|
+
}>;
|
|
72
|
+
id: z.ZodString;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
type TenantContext = z.infer<typeof TenantContext>;
|
|
76
|
+
declare const SYSTEM_ACTOR: Actor;
|
|
77
|
+
/** Tenant created by `pnpm db:seed` and used by the UIs in development. */
|
|
78
|
+
declare const DEV_TENANT_ID = "00000000-0000-0000-0000-000000000001";
|
|
79
|
+
/** A browser origin (`scheme://host[:port]`), with no path, query or trailing slash. */
|
|
80
|
+
declare const WebOrigin: z.ZodString;
|
|
81
|
+
type WebOrigin = z.infer<typeof WebOrigin>;
|
|
82
|
+
/** Tenant-level settings an admin manages through the API (`tenants.settings`). */
|
|
83
|
+
declare const CaseSettings: z.ZodObject<{
|
|
84
|
+
defaultSlaHours: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
type CaseSettings = z.infer<typeof CaseSettings>;
|
|
87
|
+
declare const ApprovalSettings: z.ZodObject<{
|
|
88
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
89
|
+
fourEyes: z.ZodDefault<z.ZodBoolean>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
type ApprovalSettings = z.infer<typeof ApprovalSettings>;
|
|
92
|
+
declare const TenantSettings: z.ZodObject<{
|
|
93
|
+
embedOrigins: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
94
|
+
cases: z.ZodDefault<z.ZodObject<{
|
|
95
|
+
defaultSlaHours: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
}, z.core.$strip>>;
|
|
97
|
+
approvals: z.ZodDefault<z.ZodObject<{
|
|
98
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
99
|
+
fourEyes: z.ZodDefault<z.ZodBoolean>;
|
|
100
|
+
}, z.core.$strip>>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
type TenantSettings = z.infer<typeof TenantSettings>;
|
|
103
|
+
declare const Tenant: z.ZodObject<{
|
|
104
|
+
id: z.ZodGUID;
|
|
105
|
+
name: z.ZodString;
|
|
106
|
+
settings: z.ZodDefault<z.ZodObject<{
|
|
107
|
+
embedOrigins: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
108
|
+
cases: z.ZodDefault<z.ZodObject<{
|
|
109
|
+
defaultSlaHours: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
approvals: z.ZodDefault<z.ZodObject<{
|
|
112
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
113
|
+
fourEyes: z.ZodDefault<z.ZodBoolean>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
type Tenant = z.infer<typeof Tenant>;
|
|
119
|
+
declare function systemContext(tenantId: Id): TenantContext;
|
|
120
|
+
/** A reviewer as the user directory reports it (a human in the tenant's identity-provider org). */
|
|
121
|
+
declare const DirectoryUser: z.ZodObject<{
|
|
122
|
+
id: z.ZodString;
|
|
123
|
+
name: z.ZodString;
|
|
124
|
+
email: z.ZodOptional<z.ZodString>;
|
|
125
|
+
roles: z.ZodArray<z.ZodString>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
type DirectoryUser = z.infer<typeof DirectoryUser>;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* A single predicate over a dot-path into a data object. Shared by the comparison rule,
|
|
131
|
+
* workflow branch steps and collection-flow field visibility. Pure: safe inside Temporal
|
|
132
|
+
* workflow code.
|
|
133
|
+
*/
|
|
134
|
+
declare const ConditionOp: z.ZodEnum<{
|
|
135
|
+
in: "in";
|
|
136
|
+
eq: "eq";
|
|
137
|
+
neq: "neq";
|
|
138
|
+
gt: "gt";
|
|
139
|
+
gte: "gte";
|
|
140
|
+
lt: "lt";
|
|
141
|
+
lte: "lte";
|
|
142
|
+
exists: "exists";
|
|
143
|
+
}>;
|
|
144
|
+
type ConditionOp = z.infer<typeof ConditionOp>;
|
|
145
|
+
declare const Condition: z.ZodObject<{
|
|
146
|
+
path: z.ZodString;
|
|
147
|
+
op: z.ZodEnum<{
|
|
148
|
+
in: "in";
|
|
149
|
+
eq: "eq";
|
|
150
|
+
neq: "neq";
|
|
151
|
+
gt: "gt";
|
|
152
|
+
gte: "gte";
|
|
153
|
+
lt: "lt";
|
|
154
|
+
lte: "lte";
|
|
155
|
+
exists: "exists";
|
|
156
|
+
}>;
|
|
157
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
type Condition = z.infer<typeof Condition>;
|
|
160
|
+
/** Reads `a.b.c` from a nested object; returns undefined when any segment is missing. */
|
|
161
|
+
declare function getPath(source: unknown, path: string): unknown;
|
|
162
|
+
declare function evaluateCondition(condition: Condition, data: unknown): boolean;
|
|
163
|
+
|
|
164
|
+
declare const SubjectKind: z.ZodEnum<{
|
|
165
|
+
user: "user";
|
|
166
|
+
merchant: "merchant";
|
|
167
|
+
seller: "seller";
|
|
168
|
+
}>;
|
|
169
|
+
type SubjectKind = z.infer<typeof SubjectKind>;
|
|
170
|
+
declare const SubjectStatus: z.ZodEnum<{
|
|
171
|
+
active: "active";
|
|
172
|
+
blocked: "blocked";
|
|
173
|
+
closed: "closed";
|
|
174
|
+
}>;
|
|
175
|
+
type SubjectStatus = z.infer<typeof SubjectStatus>;
|
|
176
|
+
/** The thing being risk-assessed: a merchant, seller or end user. */
|
|
177
|
+
declare const Subject: z.ZodObject<{
|
|
178
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
179
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
180
|
+
id: z.ZodGUID;
|
|
181
|
+
tenantId: z.ZodGUID;
|
|
182
|
+
kind: z.ZodEnum<{
|
|
183
|
+
user: "user";
|
|
184
|
+
merchant: "merchant";
|
|
185
|
+
seller: "seller";
|
|
186
|
+
}>;
|
|
187
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
188
|
+
status: z.ZodEnum<{
|
|
189
|
+
active: "active";
|
|
190
|
+
blocked: "blocked";
|
|
191
|
+
closed: "closed";
|
|
192
|
+
}>;
|
|
193
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
194
|
+
riskScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
195
|
+
tags: z.ZodArray<z.ZodString>;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
type Subject = z.infer<typeof Subject>;
|
|
198
|
+
declare const CreateSubjectInput: z.ZodObject<{
|
|
199
|
+
kind: z.ZodEnum<{
|
|
200
|
+
user: "user";
|
|
201
|
+
merchant: "merchant";
|
|
202
|
+
seller: "seller";
|
|
203
|
+
}>;
|
|
204
|
+
externalId: z.ZodOptional<z.ZodString>;
|
|
205
|
+
data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
206
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
type CreateSubjectInput = z.infer<typeof CreateSubjectInput>;
|
|
209
|
+
/** Filters for `GET /subjects`; `search` matches `externalId`, `data.name` and `data.legalName`. */
|
|
210
|
+
declare const SubjectListQuery: z.ZodObject<{
|
|
211
|
+
search: z.ZodOptional<z.ZodString>;
|
|
212
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
213
|
+
user: "user";
|
|
214
|
+
merchant: "merchant";
|
|
215
|
+
seller: "seller";
|
|
216
|
+
}>>;
|
|
217
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
218
|
+
active: "active";
|
|
219
|
+
blocked: "blocked";
|
|
220
|
+
closed: "closed";
|
|
221
|
+
}>>;
|
|
222
|
+
riskScoreMin: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
223
|
+
riskScoreMax: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
224
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
225
|
+
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
type SubjectListQuery = z.infer<typeof SubjectListQuery>;
|
|
228
|
+
|
|
229
|
+
declare const RuleType: z.ZodEnum<{
|
|
230
|
+
plugin: "plugin";
|
|
231
|
+
comparison: "comparison";
|
|
232
|
+
list_lookup: "list_lookup";
|
|
233
|
+
score_threshold: "score_threshold";
|
|
234
|
+
expression: "expression";
|
|
235
|
+
velocity: "velocity";
|
|
236
|
+
}>;
|
|
237
|
+
type RuleType = z.infer<typeof RuleType>;
|
|
238
|
+
declare const RuleSeverity: z.ZodEnum<{
|
|
239
|
+
info: "info";
|
|
240
|
+
warn: "warn";
|
|
241
|
+
block: "block";
|
|
242
|
+
}>;
|
|
243
|
+
type RuleSeverity = z.infer<typeof RuleSeverity>;
|
|
244
|
+
/** A versioned rule. `config` is validated per `type` by the rule-engine registry. */
|
|
245
|
+
declare const RuleDefinition: z.ZodObject<{
|
|
246
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
247
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
248
|
+
id: z.ZodGUID;
|
|
249
|
+
tenantId: z.ZodGUID;
|
|
250
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
251
|
+
key: z.ZodString;
|
|
252
|
+
version: z.ZodNumber;
|
|
253
|
+
name: z.ZodString;
|
|
254
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
255
|
+
type: z.ZodEnum<{
|
|
256
|
+
plugin: "plugin";
|
|
257
|
+
comparison: "comparison";
|
|
258
|
+
list_lookup: "list_lookup";
|
|
259
|
+
score_threshold: "score_threshold";
|
|
260
|
+
expression: "expression";
|
|
261
|
+
velocity: "velocity";
|
|
262
|
+
}>;
|
|
263
|
+
config: z.ZodUnknown;
|
|
264
|
+
severity: z.ZodEnum<{
|
|
265
|
+
info: "info";
|
|
266
|
+
warn: "warn";
|
|
267
|
+
block: "block";
|
|
268
|
+
}>;
|
|
269
|
+
weight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
270
|
+
enabled: z.ZodBoolean;
|
|
271
|
+
tags: z.ZodArray<z.ZodString>;
|
|
272
|
+
status: z.ZodEnum<{
|
|
273
|
+
draft: "draft";
|
|
274
|
+
pending_approval: "pending_approval";
|
|
275
|
+
published: "published";
|
|
276
|
+
archived: "archived";
|
|
277
|
+
}>;
|
|
278
|
+
}, z.core.$strip>;
|
|
279
|
+
type RuleDefinition = z.infer<typeof RuleDefinition>;
|
|
280
|
+
declare const UpsertRuleDefinitionInput: z.ZodObject<{
|
|
281
|
+
name: z.ZodString;
|
|
282
|
+
description: z.ZodOptional<z.ZodString>;
|
|
283
|
+
type: z.ZodEnum<{
|
|
284
|
+
plugin: "plugin";
|
|
285
|
+
comparison: "comparison";
|
|
286
|
+
list_lookup: "list_lookup";
|
|
287
|
+
score_threshold: "score_threshold";
|
|
288
|
+
expression: "expression";
|
|
289
|
+
velocity: "velocity";
|
|
290
|
+
}>;
|
|
291
|
+
config: z.ZodUnknown;
|
|
292
|
+
severity: z.ZodDefault<z.ZodEnum<{
|
|
293
|
+
info: "info";
|
|
294
|
+
warn: "warn";
|
|
295
|
+
block: "block";
|
|
296
|
+
}>>;
|
|
297
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
298
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
299
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
300
|
+
}, z.core.$strip>;
|
|
301
|
+
type UpsertRuleDefinitionInput = z.infer<typeof UpsertRuleDefinitionInput>;
|
|
302
|
+
declare const RuleOutcome: z.ZodEnum<{
|
|
303
|
+
error: "error";
|
|
304
|
+
pass: "pass";
|
|
305
|
+
fail: "fail";
|
|
306
|
+
skipped: "skipped";
|
|
307
|
+
}>;
|
|
308
|
+
type RuleOutcome = z.infer<typeof RuleOutcome>;
|
|
309
|
+
/** Result of evaluating one rule. Carries severity/weight so aggregation is self-contained. */
|
|
310
|
+
declare const RuleEvaluationResult: z.ZodObject<{
|
|
311
|
+
ruleId: z.ZodString;
|
|
312
|
+
ruleKey: z.ZodString;
|
|
313
|
+
ruleVersion: z.ZodNumber;
|
|
314
|
+
severity: z.ZodEnum<{
|
|
315
|
+
info: "info";
|
|
316
|
+
warn: "warn";
|
|
317
|
+
block: "block";
|
|
318
|
+
}>;
|
|
319
|
+
weight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
320
|
+
outcome: z.ZodEnum<{
|
|
321
|
+
error: "error";
|
|
322
|
+
pass: "pass";
|
|
323
|
+
fail: "fail";
|
|
324
|
+
skipped: "skipped";
|
|
325
|
+
}>;
|
|
326
|
+
score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
327
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
328
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
329
|
+
durationMs: z.ZodNumber;
|
|
330
|
+
shadow: z.ZodOptional<z.ZodBoolean>;
|
|
331
|
+
}, z.core.$strip>;
|
|
332
|
+
type RuleEvaluationResult = z.infer<typeof RuleEvaluationResult>;
|
|
333
|
+
|
|
334
|
+
declare const DecisionOutcome: z.ZodEnum<{
|
|
335
|
+
approve: "approve";
|
|
336
|
+
reject: "reject";
|
|
337
|
+
manual_review: "manual_review";
|
|
338
|
+
}>;
|
|
339
|
+
type DecisionOutcome = z.infer<typeof DecisionOutcome>;
|
|
340
|
+
declare const DecisionReason: z.ZodObject<{
|
|
341
|
+
code: z.ZodString;
|
|
342
|
+
message: z.ZodString;
|
|
343
|
+
ruleKey: z.ZodOptional<z.ZodString>;
|
|
344
|
+
}, z.core.$strip>;
|
|
345
|
+
type DecisionReason = z.infer<typeof DecisionReason>;
|
|
346
|
+
declare const DecisionSource: z.ZodEnum<{
|
|
347
|
+
automated: "automated";
|
|
348
|
+
manual: "manual";
|
|
349
|
+
}>;
|
|
350
|
+
type DecisionSource = z.infer<typeof DecisionSource>;
|
|
351
|
+
/** Immutable record of a decision about a subject. */
|
|
352
|
+
declare const Decision: z.ZodObject<{
|
|
353
|
+
id: z.ZodGUID;
|
|
354
|
+
tenantId: z.ZodGUID;
|
|
355
|
+
subjectId: z.ZodGUID;
|
|
356
|
+
workflowRunId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
357
|
+
caseId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
358
|
+
outcome: z.ZodEnum<{
|
|
359
|
+
approve: "approve";
|
|
360
|
+
reject: "reject";
|
|
361
|
+
manual_review: "manual_review";
|
|
362
|
+
}>;
|
|
363
|
+
riskScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
364
|
+
reasons: z.ZodArray<z.ZodObject<{
|
|
365
|
+
code: z.ZodString;
|
|
366
|
+
message: z.ZodString;
|
|
367
|
+
ruleKey: z.ZodOptional<z.ZodString>;
|
|
368
|
+
}, z.core.$strip>>;
|
|
369
|
+
source: z.ZodEnum<{
|
|
370
|
+
automated: "automated";
|
|
371
|
+
manual: "manual";
|
|
372
|
+
}>;
|
|
373
|
+
decidedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
374
|
+
ruleResults: z.ZodArray<z.ZodObject<{
|
|
375
|
+
ruleId: z.ZodString;
|
|
376
|
+
ruleKey: z.ZodString;
|
|
377
|
+
ruleVersion: z.ZodNumber;
|
|
378
|
+
severity: z.ZodEnum<{
|
|
379
|
+
info: "info";
|
|
380
|
+
warn: "warn";
|
|
381
|
+
block: "block";
|
|
382
|
+
}>;
|
|
383
|
+
weight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
384
|
+
outcome: z.ZodEnum<{
|
|
385
|
+
error: "error";
|
|
386
|
+
pass: "pass";
|
|
387
|
+
fail: "fail";
|
|
388
|
+
skipped: "skipped";
|
|
389
|
+
}>;
|
|
390
|
+
score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
391
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
392
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
393
|
+
durationMs: z.ZodNumber;
|
|
394
|
+
shadow: z.ZodOptional<z.ZodBoolean>;
|
|
395
|
+
}, z.core.$strip>>;
|
|
396
|
+
ruleSetKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
397
|
+
ruleSetVersion: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
398
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
399
|
+
}, z.core.$strip>;
|
|
400
|
+
type Decision = z.infer<typeof Decision>;
|
|
401
|
+
|
|
402
|
+
declare const CaseStatus: z.ZodEnum<{
|
|
403
|
+
closed: "closed";
|
|
404
|
+
open: "open";
|
|
405
|
+
in_review: "in_review";
|
|
406
|
+
decided: "decided";
|
|
407
|
+
}>;
|
|
408
|
+
type CaseStatus = z.infer<typeof CaseStatus>;
|
|
409
|
+
declare const CasePriority: z.ZodEnum<{
|
|
410
|
+
low: "low";
|
|
411
|
+
medium: "medium";
|
|
412
|
+
high: "high";
|
|
413
|
+
critical: "critical";
|
|
414
|
+
}>;
|
|
415
|
+
type CasePriority = z.infer<typeof CasePriority>;
|
|
416
|
+
/** Derived from `dueAt` and `slaBreachedAt` at read time; never stored. */
|
|
417
|
+
declare const CaseSlaState: z.ZodEnum<{
|
|
418
|
+
none: "none";
|
|
419
|
+
ok: "ok";
|
|
420
|
+
due_soon: "due_soon";
|
|
421
|
+
breached: "breached";
|
|
422
|
+
}>;
|
|
423
|
+
type CaseSlaState = z.infer<typeof CaseSlaState>;
|
|
424
|
+
/** A manual-review item surfaced in the back office. */
|
|
425
|
+
declare const Case: z.ZodObject<{
|
|
426
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
427
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
428
|
+
id: z.ZodGUID;
|
|
429
|
+
tenantId: z.ZodGUID;
|
|
430
|
+
subjectId: z.ZodGUID;
|
|
431
|
+
workflowRunId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
432
|
+
type: z.ZodString;
|
|
433
|
+
status: z.ZodEnum<{
|
|
434
|
+
closed: "closed";
|
|
435
|
+
open: "open";
|
|
436
|
+
in_review: "in_review";
|
|
437
|
+
decided: "decided";
|
|
438
|
+
}>;
|
|
439
|
+
priority: z.ZodEnum<{
|
|
440
|
+
low: "low";
|
|
441
|
+
medium: "medium";
|
|
442
|
+
high: "high";
|
|
443
|
+
critical: "critical";
|
|
444
|
+
}>;
|
|
445
|
+
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
446
|
+
decisionId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
447
|
+
context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
448
|
+
dueAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
449
|
+
slaBreachedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
450
|
+
firstResponseAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
451
|
+
decidedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
452
|
+
closedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
453
|
+
closedReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
454
|
+
}, z.core.$strip>;
|
|
455
|
+
type Case = z.infer<typeof Case>;
|
|
456
|
+
/** A case as the API returns it: the row plus its derived SLA state. */
|
|
457
|
+
declare const CaseView: z.ZodObject<{
|
|
458
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
459
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
460
|
+
id: z.ZodGUID;
|
|
461
|
+
tenantId: z.ZodGUID;
|
|
462
|
+
subjectId: z.ZodGUID;
|
|
463
|
+
workflowRunId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
464
|
+
type: z.ZodString;
|
|
465
|
+
status: z.ZodEnum<{
|
|
466
|
+
closed: "closed";
|
|
467
|
+
open: "open";
|
|
468
|
+
in_review: "in_review";
|
|
469
|
+
decided: "decided";
|
|
470
|
+
}>;
|
|
471
|
+
priority: z.ZodEnum<{
|
|
472
|
+
low: "low";
|
|
473
|
+
medium: "medium";
|
|
474
|
+
high: "high";
|
|
475
|
+
critical: "critical";
|
|
476
|
+
}>;
|
|
477
|
+
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
478
|
+
decisionId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
479
|
+
context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
480
|
+
dueAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
481
|
+
slaBreachedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
482
|
+
firstResponseAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
483
|
+
decidedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
484
|
+
closedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
485
|
+
closedReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
486
|
+
slaState: z.ZodEnum<{
|
|
487
|
+
none: "none";
|
|
488
|
+
ok: "ok";
|
|
489
|
+
due_soon: "due_soon";
|
|
490
|
+
breached: "breached";
|
|
491
|
+
}>;
|
|
492
|
+
}, z.core.$strip>;
|
|
493
|
+
type CaseView = z.infer<typeof CaseView>;
|
|
494
|
+
/**
|
|
495
|
+
* `due_soon` starts at the larger of 20 % of the SLA window and two hours before `dueAt`, capped
|
|
496
|
+
* at half the window so short SLAs are not "due soon" from the start.
|
|
497
|
+
*/
|
|
498
|
+
declare function caseSlaState(c: Pick<Case, 'dueAt' | 'slaBreachedAt' | 'status' | 'createdAt'>, now?: Date): CaseSlaState;
|
|
499
|
+
declare const AssignCaseInput: z.ZodObject<{
|
|
500
|
+
assigneeId: z.ZodNullable<z.ZodString>;
|
|
501
|
+
}, z.core.$strip>;
|
|
502
|
+
type AssignCaseInput = z.infer<typeof AssignCaseInput>;
|
|
503
|
+
declare const CloseCaseInput: z.ZodObject<{
|
|
504
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
505
|
+
}, z.core.$strip>;
|
|
506
|
+
type CloseCaseInput = z.infer<typeof CloseCaseInput>;
|
|
507
|
+
declare const CaseNote: z.ZodObject<{
|
|
508
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
509
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
510
|
+
id: z.ZodGUID;
|
|
511
|
+
tenantId: z.ZodGUID;
|
|
512
|
+
caseId: z.ZodGUID;
|
|
513
|
+
authorId: z.ZodString;
|
|
514
|
+
body: z.ZodString;
|
|
515
|
+
editedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
516
|
+
}, z.core.$strip>;
|
|
517
|
+
type CaseNote = z.infer<typeof CaseNote>;
|
|
518
|
+
declare const CaseNoteInput: z.ZodObject<{
|
|
519
|
+
body: z.ZodString;
|
|
520
|
+
}, z.core.$strip>;
|
|
521
|
+
type CaseNoteInput = z.infer<typeof CaseNoteInput>;
|
|
522
|
+
declare const CaseSort: z.ZodEnum<{
|
|
523
|
+
createdAt: "createdAt";
|
|
524
|
+
priority: "priority";
|
|
525
|
+
dueAt: "dueAt";
|
|
526
|
+
}>;
|
|
527
|
+
type CaseSort = z.infer<typeof CaseSort>;
|
|
528
|
+
declare const SortOrder: z.ZodEnum<{
|
|
529
|
+
asc: "asc";
|
|
530
|
+
desc: "desc";
|
|
531
|
+
}>;
|
|
532
|
+
type SortOrder = z.infer<typeof SortOrder>;
|
|
533
|
+
/** What a case queue (saved filter) and `GET /cases` accept. */
|
|
534
|
+
declare const CaseFilter: z.ZodObject<{
|
|
535
|
+
status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
536
|
+
closed: "closed";
|
|
537
|
+
open: "open";
|
|
538
|
+
in_review: "in_review";
|
|
539
|
+
decided: "decided";
|
|
540
|
+
}>>>;
|
|
541
|
+
priority: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
542
|
+
low: "low";
|
|
543
|
+
medium: "medium";
|
|
544
|
+
high: "high";
|
|
545
|
+
critical: "critical";
|
|
546
|
+
}>>>;
|
|
547
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
548
|
+
type: z.ZodOptional<z.ZodString>;
|
|
549
|
+
subjectId: z.ZodOptional<z.ZodGUID>;
|
|
550
|
+
slaState: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
551
|
+
none: "none";
|
|
552
|
+
ok: "ok";
|
|
553
|
+
due_soon: "due_soon";
|
|
554
|
+
breached: "breached";
|
|
555
|
+
}>>>;
|
|
556
|
+
dueBefore: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
557
|
+
search: z.ZodOptional<z.ZodString>;
|
|
558
|
+
}, z.core.$strip>;
|
|
559
|
+
type CaseFilter = z.infer<typeof CaseFilter>;
|
|
560
|
+
declare const CaseQueue: z.ZodObject<{
|
|
561
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
562
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
563
|
+
id: z.ZodGUID;
|
|
564
|
+
tenantId: z.ZodGUID;
|
|
565
|
+
name: z.ZodString;
|
|
566
|
+
filter: z.ZodObject<{
|
|
567
|
+
status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
568
|
+
closed: "closed";
|
|
569
|
+
open: "open";
|
|
570
|
+
in_review: "in_review";
|
|
571
|
+
decided: "decided";
|
|
572
|
+
}>>>;
|
|
573
|
+
priority: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
574
|
+
low: "low";
|
|
575
|
+
medium: "medium";
|
|
576
|
+
high: "high";
|
|
577
|
+
critical: "critical";
|
|
578
|
+
}>>>;
|
|
579
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
580
|
+
type: z.ZodOptional<z.ZodString>;
|
|
581
|
+
subjectId: z.ZodOptional<z.ZodGUID>;
|
|
582
|
+
slaState: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
583
|
+
none: "none";
|
|
584
|
+
ok: "ok";
|
|
585
|
+
due_soon: "due_soon";
|
|
586
|
+
breached: "breached";
|
|
587
|
+
}>>>;
|
|
588
|
+
dueBefore: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
589
|
+
search: z.ZodOptional<z.ZodString>;
|
|
590
|
+
}, z.core.$strip>;
|
|
591
|
+
sort: z.ZodEnum<{
|
|
592
|
+
createdAt: "createdAt";
|
|
593
|
+
priority: "priority";
|
|
594
|
+
dueAt: "dueAt";
|
|
595
|
+
}>;
|
|
596
|
+
order: z.ZodEnum<{
|
|
597
|
+
asc: "asc";
|
|
598
|
+
desc: "desc";
|
|
599
|
+
}>;
|
|
600
|
+
position: z.ZodNumber;
|
|
601
|
+
createdBy: z.ZodString;
|
|
602
|
+
}, z.core.$strip>;
|
|
603
|
+
type CaseQueue = z.infer<typeof CaseQueue>;
|
|
604
|
+
declare const UpsertCaseQueueInput: z.ZodObject<{
|
|
605
|
+
name: z.ZodString;
|
|
606
|
+
filter: z.ZodDefault<z.ZodObject<{
|
|
607
|
+
status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
608
|
+
closed: "closed";
|
|
609
|
+
open: "open";
|
|
610
|
+
in_review: "in_review";
|
|
611
|
+
decided: "decided";
|
|
612
|
+
}>>>;
|
|
613
|
+
priority: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
614
|
+
low: "low";
|
|
615
|
+
medium: "medium";
|
|
616
|
+
high: "high";
|
|
617
|
+
critical: "critical";
|
|
618
|
+
}>>>;
|
|
619
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
620
|
+
type: z.ZodOptional<z.ZodString>;
|
|
621
|
+
subjectId: z.ZodOptional<z.ZodGUID>;
|
|
622
|
+
slaState: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
623
|
+
none: "none";
|
|
624
|
+
ok: "ok";
|
|
625
|
+
due_soon: "due_soon";
|
|
626
|
+
breached: "breached";
|
|
627
|
+
}>>>;
|
|
628
|
+
dueBefore: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
629
|
+
search: z.ZodOptional<z.ZodString>;
|
|
630
|
+
}, z.core.$strip>>;
|
|
631
|
+
sort: z.ZodDefault<z.ZodEnum<{
|
|
632
|
+
createdAt: "createdAt";
|
|
633
|
+
priority: "priority";
|
|
634
|
+
dueAt: "dueAt";
|
|
635
|
+
}>>;
|
|
636
|
+
order: z.ZodDefault<z.ZodEnum<{
|
|
637
|
+
asc: "asc";
|
|
638
|
+
desc: "desc";
|
|
639
|
+
}>>;
|
|
640
|
+
position: z.ZodDefault<z.ZodNumber>;
|
|
641
|
+
}, z.core.$strip>;
|
|
642
|
+
type UpsertCaseQueueInput = z.infer<typeof UpsertCaseQueueInput>;
|
|
643
|
+
declare const DecideCaseInput: z.ZodObject<{
|
|
644
|
+
outcome: z.ZodEnum<{
|
|
645
|
+
approve: "approve";
|
|
646
|
+
reject: "reject";
|
|
647
|
+
manual_review: "manual_review";
|
|
648
|
+
}>;
|
|
649
|
+
reasons: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
650
|
+
code: z.ZodString;
|
|
651
|
+
message: z.ZodString;
|
|
652
|
+
ruleKey: z.ZodOptional<z.ZodString>;
|
|
653
|
+
}, z.core.$strip>>>;
|
|
654
|
+
note: z.ZodOptional<z.ZodString>;
|
|
655
|
+
}, z.core.$strip>;
|
|
656
|
+
type DecideCaseInput = z.infer<typeof DecideCaseInput>;
|
|
657
|
+
/** Payload of the `manualDecision` workflow signal. */
|
|
658
|
+
declare const ManualDecision: z.ZodObject<{
|
|
659
|
+
caseId: z.ZodGUID;
|
|
660
|
+
decisionId: z.ZodGUID;
|
|
661
|
+
outcome: z.ZodEnum<{
|
|
662
|
+
approve: "approve";
|
|
663
|
+
reject: "reject";
|
|
664
|
+
manual_review: "manual_review";
|
|
665
|
+
}>;
|
|
666
|
+
reasons: z.ZodArray<z.ZodObject<{
|
|
667
|
+
code: z.ZodString;
|
|
668
|
+
message: z.ZodString;
|
|
669
|
+
ruleKey: z.ZodOptional<z.ZodString>;
|
|
670
|
+
}, z.core.$strip>>;
|
|
671
|
+
decidedBy: z.ZodString;
|
|
672
|
+
}, z.core.$strip>;
|
|
673
|
+
type ManualDecision = z.infer<typeof ManualDecision>;
|
|
674
|
+
|
|
675
|
+
declare const EvaluateRulesStep: z.ZodObject<{
|
|
676
|
+
id: z.ZodString;
|
|
677
|
+
name: z.ZodOptional<z.ZodString>;
|
|
678
|
+
next: z.ZodOptional<z.ZodString>;
|
|
679
|
+
type: z.ZodLiteral<"evaluate_rules">;
|
|
680
|
+
ruleKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
681
|
+
ruleSetKey: z.ZodOptional<z.ZodString>;
|
|
682
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
683
|
+
}, z.core.$strip>;
|
|
684
|
+
declare const CallPluginStep: z.ZodObject<{
|
|
685
|
+
id: z.ZodString;
|
|
686
|
+
name: z.ZodOptional<z.ZodString>;
|
|
687
|
+
next: z.ZodOptional<z.ZodString>;
|
|
688
|
+
type: z.ZodLiteral<"call_plugin">;
|
|
689
|
+
plugin: z.ZodString;
|
|
690
|
+
action: z.ZodString;
|
|
691
|
+
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
692
|
+
inputMapping: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
693
|
+
outputKey: z.ZodString;
|
|
694
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
695
|
+
maximumAttempts: z.ZodOptional<z.ZodNumber>;
|
|
696
|
+
initialIntervalSeconds: z.ZodOptional<z.ZodNumber>;
|
|
697
|
+
}, z.core.$strip>>;
|
|
698
|
+
}, z.core.$strip>;
|
|
699
|
+
declare const WaitForCollectionStep: z.ZodObject<{
|
|
700
|
+
id: z.ZodString;
|
|
701
|
+
name: z.ZodOptional<z.ZodString>;
|
|
702
|
+
next: z.ZodOptional<z.ZodString>;
|
|
703
|
+
type: z.ZodLiteral<"wait_for_collection">;
|
|
704
|
+
flowKey: z.ZodString;
|
|
705
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
706
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
707
|
+
}, z.core.$strip>;
|
|
708
|
+
declare const CreateCaseStep: z.ZodObject<{
|
|
709
|
+
id: z.ZodString;
|
|
710
|
+
name: z.ZodOptional<z.ZodString>;
|
|
711
|
+
next: z.ZodOptional<z.ZodString>;
|
|
712
|
+
type: z.ZodLiteral<"create_case">;
|
|
713
|
+
caseType: z.ZodString;
|
|
714
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
715
|
+
low: "low";
|
|
716
|
+
medium: "medium";
|
|
717
|
+
high: "high";
|
|
718
|
+
critical: "critical";
|
|
719
|
+
}>>;
|
|
720
|
+
slaHours: z.ZodOptional<z.ZodNumber>;
|
|
721
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
722
|
+
}, z.core.$strip>;
|
|
723
|
+
declare const EmitDecisionStep: z.ZodObject<{
|
|
724
|
+
id: z.ZodString;
|
|
725
|
+
name: z.ZodOptional<z.ZodString>;
|
|
726
|
+
next: z.ZodOptional<z.ZodString>;
|
|
727
|
+
type: z.ZodLiteral<"emit_decision">;
|
|
728
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
729
|
+
from_rules: "from_rules";
|
|
730
|
+
fixed: "fixed";
|
|
731
|
+
}>>;
|
|
732
|
+
rulesKey: z.ZodDefault<z.ZodString>;
|
|
733
|
+
manualDecisionKey: z.ZodDefault<z.ZodString>;
|
|
734
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
735
|
+
approve: "approve";
|
|
736
|
+
reject: "reject";
|
|
737
|
+
manual_review: "manual_review";
|
|
738
|
+
}>>;
|
|
739
|
+
}, z.core.$strip>;
|
|
740
|
+
declare const BranchStep: z.ZodObject<{
|
|
741
|
+
id: z.ZodString;
|
|
742
|
+
name: z.ZodOptional<z.ZodString>;
|
|
743
|
+
next: z.ZodOptional<z.ZodString>;
|
|
744
|
+
type: z.ZodLiteral<"branch">;
|
|
745
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
746
|
+
when: z.ZodObject<{
|
|
747
|
+
path: z.ZodString;
|
|
748
|
+
op: z.ZodEnum<{
|
|
749
|
+
in: "in";
|
|
750
|
+
eq: "eq";
|
|
751
|
+
neq: "neq";
|
|
752
|
+
gt: "gt";
|
|
753
|
+
gte: "gte";
|
|
754
|
+
lt: "lt";
|
|
755
|
+
lte: "lte";
|
|
756
|
+
exists: "exists";
|
|
757
|
+
}>;
|
|
758
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
759
|
+
}, z.core.$strip>;
|
|
760
|
+
next: z.ZodString;
|
|
761
|
+
}, z.core.$strip>>;
|
|
762
|
+
default: z.ZodString;
|
|
763
|
+
}, z.core.$strip>;
|
|
764
|
+
declare const WorkflowStep: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
765
|
+
id: z.ZodString;
|
|
766
|
+
name: z.ZodOptional<z.ZodString>;
|
|
767
|
+
next: z.ZodOptional<z.ZodString>;
|
|
768
|
+
type: z.ZodLiteral<"evaluate_rules">;
|
|
769
|
+
ruleKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
770
|
+
ruleSetKey: z.ZodOptional<z.ZodString>;
|
|
771
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
772
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
773
|
+
id: z.ZodString;
|
|
774
|
+
name: z.ZodOptional<z.ZodString>;
|
|
775
|
+
next: z.ZodOptional<z.ZodString>;
|
|
776
|
+
type: z.ZodLiteral<"call_plugin">;
|
|
777
|
+
plugin: z.ZodString;
|
|
778
|
+
action: z.ZodString;
|
|
779
|
+
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
780
|
+
inputMapping: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
781
|
+
outputKey: z.ZodString;
|
|
782
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
783
|
+
maximumAttempts: z.ZodOptional<z.ZodNumber>;
|
|
784
|
+
initialIntervalSeconds: z.ZodOptional<z.ZodNumber>;
|
|
785
|
+
}, z.core.$strip>>;
|
|
786
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
787
|
+
id: z.ZodString;
|
|
788
|
+
name: z.ZodOptional<z.ZodString>;
|
|
789
|
+
next: z.ZodOptional<z.ZodString>;
|
|
790
|
+
type: z.ZodLiteral<"wait_for_collection">;
|
|
791
|
+
flowKey: z.ZodString;
|
|
792
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
793
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
794
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
795
|
+
id: z.ZodString;
|
|
796
|
+
name: z.ZodOptional<z.ZodString>;
|
|
797
|
+
next: z.ZodOptional<z.ZodString>;
|
|
798
|
+
type: z.ZodLiteral<"create_case">;
|
|
799
|
+
caseType: z.ZodString;
|
|
800
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
801
|
+
low: "low";
|
|
802
|
+
medium: "medium";
|
|
803
|
+
high: "high";
|
|
804
|
+
critical: "critical";
|
|
805
|
+
}>>;
|
|
806
|
+
slaHours: z.ZodOptional<z.ZodNumber>;
|
|
807
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
808
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
809
|
+
id: z.ZodString;
|
|
810
|
+
name: z.ZodOptional<z.ZodString>;
|
|
811
|
+
next: z.ZodOptional<z.ZodString>;
|
|
812
|
+
type: z.ZodLiteral<"emit_decision">;
|
|
813
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
814
|
+
from_rules: "from_rules";
|
|
815
|
+
fixed: "fixed";
|
|
816
|
+
}>>;
|
|
817
|
+
rulesKey: z.ZodDefault<z.ZodString>;
|
|
818
|
+
manualDecisionKey: z.ZodDefault<z.ZodString>;
|
|
819
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
820
|
+
approve: "approve";
|
|
821
|
+
reject: "reject";
|
|
822
|
+
manual_review: "manual_review";
|
|
823
|
+
}>>;
|
|
824
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
825
|
+
id: z.ZodString;
|
|
826
|
+
name: z.ZodOptional<z.ZodString>;
|
|
827
|
+
next: z.ZodOptional<z.ZodString>;
|
|
828
|
+
type: z.ZodLiteral<"branch">;
|
|
829
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
830
|
+
when: z.ZodObject<{
|
|
831
|
+
path: z.ZodString;
|
|
832
|
+
op: z.ZodEnum<{
|
|
833
|
+
in: "in";
|
|
834
|
+
eq: "eq";
|
|
835
|
+
neq: "neq";
|
|
836
|
+
gt: "gt";
|
|
837
|
+
gte: "gte";
|
|
838
|
+
lt: "lt";
|
|
839
|
+
lte: "lte";
|
|
840
|
+
exists: "exists";
|
|
841
|
+
}>;
|
|
842
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
843
|
+
}, z.core.$strip>;
|
|
844
|
+
next: z.ZodString;
|
|
845
|
+
}, z.core.$strip>>;
|
|
846
|
+
default: z.ZodString;
|
|
847
|
+
}, z.core.$strip>], "type">;
|
|
848
|
+
type WorkflowStep = z.infer<typeof WorkflowStep>;
|
|
849
|
+
type WorkflowStepType = WorkflowStep['type'];
|
|
850
|
+
/** Collects every step id a step can transition to. */
|
|
851
|
+
declare function stepTargets(step: WorkflowStep): string[];
|
|
852
|
+
/** Editor-only layout stored with a definition; the engine never reads it. */
|
|
853
|
+
declare const WorkflowUi: z.ZodObject<{
|
|
854
|
+
positions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
855
|
+
x: z.ZodNumber;
|
|
856
|
+
y: z.ZodNumber;
|
|
857
|
+
}, z.core.$strip>>>;
|
|
858
|
+
}, z.core.$strip>;
|
|
859
|
+
type WorkflowUi = z.infer<typeof WorkflowUi>;
|
|
860
|
+
declare const WorkflowDefinitionBody: z.ZodObject<{
|
|
861
|
+
entryStepId: z.ZodString;
|
|
862
|
+
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
863
|
+
id: z.ZodString;
|
|
864
|
+
name: z.ZodOptional<z.ZodString>;
|
|
865
|
+
next: z.ZodOptional<z.ZodString>;
|
|
866
|
+
type: z.ZodLiteral<"evaluate_rules">;
|
|
867
|
+
ruleKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
868
|
+
ruleSetKey: z.ZodOptional<z.ZodString>;
|
|
869
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
870
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
871
|
+
id: z.ZodString;
|
|
872
|
+
name: z.ZodOptional<z.ZodString>;
|
|
873
|
+
next: z.ZodOptional<z.ZodString>;
|
|
874
|
+
type: z.ZodLiteral<"call_plugin">;
|
|
875
|
+
plugin: z.ZodString;
|
|
876
|
+
action: z.ZodString;
|
|
877
|
+
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
878
|
+
inputMapping: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
879
|
+
outputKey: z.ZodString;
|
|
880
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
881
|
+
maximumAttempts: z.ZodOptional<z.ZodNumber>;
|
|
882
|
+
initialIntervalSeconds: z.ZodOptional<z.ZodNumber>;
|
|
883
|
+
}, z.core.$strip>>;
|
|
884
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
885
|
+
id: z.ZodString;
|
|
886
|
+
name: z.ZodOptional<z.ZodString>;
|
|
887
|
+
next: z.ZodOptional<z.ZodString>;
|
|
888
|
+
type: z.ZodLiteral<"wait_for_collection">;
|
|
889
|
+
flowKey: z.ZodString;
|
|
890
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
891
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
892
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
893
|
+
id: z.ZodString;
|
|
894
|
+
name: z.ZodOptional<z.ZodString>;
|
|
895
|
+
next: z.ZodOptional<z.ZodString>;
|
|
896
|
+
type: z.ZodLiteral<"create_case">;
|
|
897
|
+
caseType: z.ZodString;
|
|
898
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
899
|
+
low: "low";
|
|
900
|
+
medium: "medium";
|
|
901
|
+
high: "high";
|
|
902
|
+
critical: "critical";
|
|
903
|
+
}>>;
|
|
904
|
+
slaHours: z.ZodOptional<z.ZodNumber>;
|
|
905
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
906
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
907
|
+
id: z.ZodString;
|
|
908
|
+
name: z.ZodOptional<z.ZodString>;
|
|
909
|
+
next: z.ZodOptional<z.ZodString>;
|
|
910
|
+
type: z.ZodLiteral<"emit_decision">;
|
|
911
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
912
|
+
from_rules: "from_rules";
|
|
913
|
+
fixed: "fixed";
|
|
914
|
+
}>>;
|
|
915
|
+
rulesKey: z.ZodDefault<z.ZodString>;
|
|
916
|
+
manualDecisionKey: z.ZodDefault<z.ZodString>;
|
|
917
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
918
|
+
approve: "approve";
|
|
919
|
+
reject: "reject";
|
|
920
|
+
manual_review: "manual_review";
|
|
921
|
+
}>>;
|
|
922
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
923
|
+
id: z.ZodString;
|
|
924
|
+
name: z.ZodOptional<z.ZodString>;
|
|
925
|
+
next: z.ZodOptional<z.ZodString>;
|
|
926
|
+
type: z.ZodLiteral<"branch">;
|
|
927
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
928
|
+
when: z.ZodObject<{
|
|
929
|
+
path: z.ZodString;
|
|
930
|
+
op: z.ZodEnum<{
|
|
931
|
+
in: "in";
|
|
932
|
+
eq: "eq";
|
|
933
|
+
neq: "neq";
|
|
934
|
+
gt: "gt";
|
|
935
|
+
gte: "gte";
|
|
936
|
+
lt: "lt";
|
|
937
|
+
lte: "lte";
|
|
938
|
+
exists: "exists";
|
|
939
|
+
}>;
|
|
940
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
941
|
+
}, z.core.$strip>;
|
|
942
|
+
next: z.ZodString;
|
|
943
|
+
}, z.core.$strip>>;
|
|
944
|
+
default: z.ZodString;
|
|
945
|
+
}, z.core.$strip>], "type">>;
|
|
946
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
947
|
+
positions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
948
|
+
x: z.ZodNumber;
|
|
949
|
+
y: z.ZodNumber;
|
|
950
|
+
}, z.core.$strip>>>;
|
|
951
|
+
}, z.core.$strip>>;
|
|
952
|
+
}, z.core.$strip>;
|
|
953
|
+
type WorkflowDefinitionBody = z.infer<typeof WorkflowDefinitionBody>;
|
|
954
|
+
declare const WorkflowTrigger: z.ZodEnum<{
|
|
955
|
+
manual: "manual";
|
|
956
|
+
"subject.created": "subject.created";
|
|
957
|
+
event: "event";
|
|
958
|
+
}>;
|
|
959
|
+
type WorkflowTrigger = z.infer<typeof WorkflowTrigger>;
|
|
960
|
+
declare const WorkflowDefinition: z.ZodObject<{
|
|
961
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
962
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
963
|
+
id: z.ZodGUID;
|
|
964
|
+
tenantId: z.ZodGUID;
|
|
965
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
966
|
+
key: z.ZodString;
|
|
967
|
+
version: z.ZodNumber;
|
|
968
|
+
name: z.ZodString;
|
|
969
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
970
|
+
trigger: z.ZodEnum<{
|
|
971
|
+
manual: "manual";
|
|
972
|
+
"subject.created": "subject.created";
|
|
973
|
+
event: "event";
|
|
974
|
+
}>;
|
|
975
|
+
status: z.ZodEnum<{
|
|
976
|
+
draft: "draft";
|
|
977
|
+
pending_approval: "pending_approval";
|
|
978
|
+
published: "published";
|
|
979
|
+
archived: "archived";
|
|
980
|
+
}>;
|
|
981
|
+
definition: z.ZodObject<{
|
|
982
|
+
entryStepId: z.ZodString;
|
|
983
|
+
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
984
|
+
id: z.ZodString;
|
|
985
|
+
name: z.ZodOptional<z.ZodString>;
|
|
986
|
+
next: z.ZodOptional<z.ZodString>;
|
|
987
|
+
type: z.ZodLiteral<"evaluate_rules">;
|
|
988
|
+
ruleKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
989
|
+
ruleSetKey: z.ZodOptional<z.ZodString>;
|
|
990
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
991
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
992
|
+
id: z.ZodString;
|
|
993
|
+
name: z.ZodOptional<z.ZodString>;
|
|
994
|
+
next: z.ZodOptional<z.ZodString>;
|
|
995
|
+
type: z.ZodLiteral<"call_plugin">;
|
|
996
|
+
plugin: z.ZodString;
|
|
997
|
+
action: z.ZodString;
|
|
998
|
+
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
999
|
+
inputMapping: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1000
|
+
outputKey: z.ZodString;
|
|
1001
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1002
|
+
maximumAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1003
|
+
initialIntervalSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1004
|
+
}, z.core.$strip>>;
|
|
1005
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1006
|
+
id: z.ZodString;
|
|
1007
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1008
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1009
|
+
type: z.ZodLiteral<"wait_for_collection">;
|
|
1010
|
+
flowKey: z.ZodString;
|
|
1011
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1012
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
1013
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1014
|
+
id: z.ZodString;
|
|
1015
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1016
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1017
|
+
type: z.ZodLiteral<"create_case">;
|
|
1018
|
+
caseType: z.ZodString;
|
|
1019
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
1020
|
+
low: "low";
|
|
1021
|
+
medium: "medium";
|
|
1022
|
+
high: "high";
|
|
1023
|
+
critical: "critical";
|
|
1024
|
+
}>>;
|
|
1025
|
+
slaHours: z.ZodOptional<z.ZodNumber>;
|
|
1026
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
1027
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1028
|
+
id: z.ZodString;
|
|
1029
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1030
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1031
|
+
type: z.ZodLiteral<"emit_decision">;
|
|
1032
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
1033
|
+
from_rules: "from_rules";
|
|
1034
|
+
fixed: "fixed";
|
|
1035
|
+
}>>;
|
|
1036
|
+
rulesKey: z.ZodDefault<z.ZodString>;
|
|
1037
|
+
manualDecisionKey: z.ZodDefault<z.ZodString>;
|
|
1038
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
1039
|
+
approve: "approve";
|
|
1040
|
+
reject: "reject";
|
|
1041
|
+
manual_review: "manual_review";
|
|
1042
|
+
}>>;
|
|
1043
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1044
|
+
id: z.ZodString;
|
|
1045
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1046
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1047
|
+
type: z.ZodLiteral<"branch">;
|
|
1048
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
1049
|
+
when: z.ZodObject<{
|
|
1050
|
+
path: z.ZodString;
|
|
1051
|
+
op: z.ZodEnum<{
|
|
1052
|
+
in: "in";
|
|
1053
|
+
eq: "eq";
|
|
1054
|
+
neq: "neq";
|
|
1055
|
+
gt: "gt";
|
|
1056
|
+
gte: "gte";
|
|
1057
|
+
lt: "lt";
|
|
1058
|
+
lte: "lte";
|
|
1059
|
+
exists: "exists";
|
|
1060
|
+
}>;
|
|
1061
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1062
|
+
}, z.core.$strip>;
|
|
1063
|
+
next: z.ZodString;
|
|
1064
|
+
}, z.core.$strip>>;
|
|
1065
|
+
default: z.ZodString;
|
|
1066
|
+
}, z.core.$strip>], "type">>;
|
|
1067
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
1068
|
+
positions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1069
|
+
x: z.ZodNumber;
|
|
1070
|
+
y: z.ZodNumber;
|
|
1071
|
+
}, z.core.$strip>>>;
|
|
1072
|
+
}, z.core.$strip>>;
|
|
1073
|
+
}, z.core.$strip>;
|
|
1074
|
+
}, z.core.$strip>;
|
|
1075
|
+
type WorkflowDefinition = z.infer<typeof WorkflowDefinition>;
|
|
1076
|
+
declare const UpsertWorkflowDefinitionInput: z.ZodObject<{
|
|
1077
|
+
name: z.ZodString;
|
|
1078
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
trigger: z.ZodDefault<z.ZodEnum<{
|
|
1080
|
+
manual: "manual";
|
|
1081
|
+
"subject.created": "subject.created";
|
|
1082
|
+
event: "event";
|
|
1083
|
+
}>>;
|
|
1084
|
+
definition: z.ZodObject<{
|
|
1085
|
+
entryStepId: z.ZodString;
|
|
1086
|
+
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1087
|
+
id: z.ZodString;
|
|
1088
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1089
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1090
|
+
type: z.ZodLiteral<"evaluate_rules">;
|
|
1091
|
+
ruleKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1092
|
+
ruleSetKey: z.ZodOptional<z.ZodString>;
|
|
1093
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
1094
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1095
|
+
id: z.ZodString;
|
|
1096
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1097
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1098
|
+
type: z.ZodLiteral<"call_plugin">;
|
|
1099
|
+
plugin: z.ZodString;
|
|
1100
|
+
action: z.ZodString;
|
|
1101
|
+
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1102
|
+
inputMapping: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1103
|
+
outputKey: z.ZodString;
|
|
1104
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1105
|
+
maximumAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1106
|
+
initialIntervalSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1107
|
+
}, z.core.$strip>>;
|
|
1108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1109
|
+
id: z.ZodString;
|
|
1110
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1111
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1112
|
+
type: z.ZodLiteral<"wait_for_collection">;
|
|
1113
|
+
flowKey: z.ZodString;
|
|
1114
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1115
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
1116
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1117
|
+
id: z.ZodString;
|
|
1118
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1119
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1120
|
+
type: z.ZodLiteral<"create_case">;
|
|
1121
|
+
caseType: z.ZodString;
|
|
1122
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
1123
|
+
low: "low";
|
|
1124
|
+
medium: "medium";
|
|
1125
|
+
high: "high";
|
|
1126
|
+
critical: "critical";
|
|
1127
|
+
}>>;
|
|
1128
|
+
slaHours: z.ZodOptional<z.ZodNumber>;
|
|
1129
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
1130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1131
|
+
id: z.ZodString;
|
|
1132
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1133
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1134
|
+
type: z.ZodLiteral<"emit_decision">;
|
|
1135
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
1136
|
+
from_rules: "from_rules";
|
|
1137
|
+
fixed: "fixed";
|
|
1138
|
+
}>>;
|
|
1139
|
+
rulesKey: z.ZodDefault<z.ZodString>;
|
|
1140
|
+
manualDecisionKey: z.ZodDefault<z.ZodString>;
|
|
1141
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
1142
|
+
approve: "approve";
|
|
1143
|
+
reject: "reject";
|
|
1144
|
+
manual_review: "manual_review";
|
|
1145
|
+
}>>;
|
|
1146
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1147
|
+
id: z.ZodString;
|
|
1148
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1149
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1150
|
+
type: z.ZodLiteral<"branch">;
|
|
1151
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
1152
|
+
when: z.ZodObject<{
|
|
1153
|
+
path: z.ZodString;
|
|
1154
|
+
op: z.ZodEnum<{
|
|
1155
|
+
in: "in";
|
|
1156
|
+
eq: "eq";
|
|
1157
|
+
neq: "neq";
|
|
1158
|
+
gt: "gt";
|
|
1159
|
+
gte: "gte";
|
|
1160
|
+
lt: "lt";
|
|
1161
|
+
lte: "lte";
|
|
1162
|
+
exists: "exists";
|
|
1163
|
+
}>;
|
|
1164
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1165
|
+
}, z.core.$strip>;
|
|
1166
|
+
next: z.ZodString;
|
|
1167
|
+
}, z.core.$strip>>;
|
|
1168
|
+
default: z.ZodString;
|
|
1169
|
+
}, z.core.$strip>], "type">>;
|
|
1170
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
1171
|
+
positions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1172
|
+
x: z.ZodNumber;
|
|
1173
|
+
y: z.ZodNumber;
|
|
1174
|
+
}, z.core.$strip>>>;
|
|
1175
|
+
}, z.core.$strip>>;
|
|
1176
|
+
}, z.core.$strip>;
|
|
1177
|
+
}, z.core.$strip>;
|
|
1178
|
+
type UpsertWorkflowDefinitionInput = z.infer<typeof UpsertWorkflowDefinitionInput>;
|
|
1179
|
+
declare const WorkflowRunStatus: z.ZodEnum<{
|
|
1180
|
+
running: "running";
|
|
1181
|
+
waiting_collection: "waiting_collection";
|
|
1182
|
+
waiting_manual: "waiting_manual";
|
|
1183
|
+
waiting_callback: "waiting_callback";
|
|
1184
|
+
completed: "completed";
|
|
1185
|
+
failed: "failed";
|
|
1186
|
+
cancelled: "cancelled";
|
|
1187
|
+
}>;
|
|
1188
|
+
type WorkflowRunStatus = z.infer<typeof WorkflowRunStatus>;
|
|
1189
|
+
/** One execution of a workflow definition for one subject. Mirrors a Temporal workflow execution. */
|
|
1190
|
+
declare const WorkflowRun: z.ZodObject<{
|
|
1191
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
1192
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
1193
|
+
id: z.ZodGUID;
|
|
1194
|
+
tenantId: z.ZodGUID;
|
|
1195
|
+
definitionId: z.ZodGUID;
|
|
1196
|
+
definitionKey: z.ZodString;
|
|
1197
|
+
definitionVersion: z.ZodNumber;
|
|
1198
|
+
subjectId: z.ZodGUID;
|
|
1199
|
+
temporalWorkflowId: z.ZodString;
|
|
1200
|
+
temporalRunId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1201
|
+
status: z.ZodEnum<{
|
|
1202
|
+
running: "running";
|
|
1203
|
+
waiting_collection: "waiting_collection";
|
|
1204
|
+
waiting_manual: "waiting_manual";
|
|
1205
|
+
waiting_callback: "waiting_callback";
|
|
1206
|
+
completed: "completed";
|
|
1207
|
+
failed: "failed";
|
|
1208
|
+
cancelled: "cancelled";
|
|
1209
|
+
}>;
|
|
1210
|
+
currentStepId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1211
|
+
context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1212
|
+
decisionId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
1213
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1214
|
+
startedAt: z.ZodCoercedDate<unknown>;
|
|
1215
|
+
finishedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
1216
|
+
}, z.core.$strip>;
|
|
1217
|
+
type WorkflowRun = z.infer<typeof WorkflowRun>;
|
|
1218
|
+
declare const StartWorkflowRunInput: z.ZodObject<{
|
|
1219
|
+
definitionKey: z.ZodString;
|
|
1220
|
+
subjectId: z.ZodGUID;
|
|
1221
|
+
}, z.core.$strip>;
|
|
1222
|
+
type StartWorkflowRunInput = z.infer<typeof StartWorkflowRunInput>;
|
|
1223
|
+
/** Argument of the generic Temporal interpreter workflow. */
|
|
1224
|
+
declare const RunDefinitionInput: z.ZodObject<{
|
|
1225
|
+
tenantId: z.ZodGUID;
|
|
1226
|
+
runId: z.ZodGUID;
|
|
1227
|
+
definitionId: z.ZodGUID;
|
|
1228
|
+
definitionVersion: z.ZodNumber;
|
|
1229
|
+
subjectId: z.ZodGUID;
|
|
1230
|
+
}, z.core.$strip>;
|
|
1231
|
+
type RunDefinitionInput = z.infer<typeof RunDefinitionInput>;
|
|
1232
|
+
declare function temporalWorkflowId(tenantId: string, runId: string): string;
|
|
1233
|
+
|
|
1234
|
+
/** Tenant-level installation of a plugin package. Non-secret config only; secrets are referenced. */
|
|
1235
|
+
declare const PluginDefinition: z.ZodObject<{
|
|
1236
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
1237
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
1238
|
+
id: z.ZodGUID;
|
|
1239
|
+
tenantId: z.ZodGUID;
|
|
1240
|
+
name: z.ZodString;
|
|
1241
|
+
version: z.ZodString;
|
|
1242
|
+
capabilities: z.ZodArray<z.ZodString>;
|
|
1243
|
+
enabled: z.ZodBoolean;
|
|
1244
|
+
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1245
|
+
secretRefs: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1246
|
+
}, z.core.$strip>;
|
|
1247
|
+
type PluginDefinition = z.infer<typeof PluginDefinition>;
|
|
1248
|
+
declare const PluginInvocationStatus: z.ZodEnum<{
|
|
1249
|
+
success: "success";
|
|
1250
|
+
error: "error";
|
|
1251
|
+
timeout: "timeout";
|
|
1252
|
+
pending: "pending";
|
|
1253
|
+
}>;
|
|
1254
|
+
type PluginInvocationStatus = z.infer<typeof PluginInvocationStatus>;
|
|
1255
|
+
/** Audit record of one call into a plugin action. */
|
|
1256
|
+
declare const PluginInvocation: z.ZodObject<{
|
|
1257
|
+
id: z.ZodGUID;
|
|
1258
|
+
tenantId: z.ZodGUID;
|
|
1259
|
+
pluginName: z.ZodString;
|
|
1260
|
+
action: z.ZodString;
|
|
1261
|
+
subjectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
1262
|
+
workflowRunId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
1263
|
+
input: z.ZodUnknown;
|
|
1264
|
+
output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
1265
|
+
status: z.ZodEnum<{
|
|
1266
|
+
success: "success";
|
|
1267
|
+
error: "error";
|
|
1268
|
+
timeout: "timeout";
|
|
1269
|
+
pending: "pending";
|
|
1270
|
+
}>;
|
|
1271
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1272
|
+
durationMs: z.ZodNumber;
|
|
1273
|
+
invokedAt: z.ZodCoercedDate<unknown>;
|
|
1274
|
+
idempotencyKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1275
|
+
attempt: z.ZodDefault<z.ZodNumber>;
|
|
1276
|
+
}, z.core.$strip>;
|
|
1277
|
+
type PluginInvocation = z.infer<typeof PluginInvocation>;
|
|
1278
|
+
/** Tenant-level enablement and configuration of an installed plugin (`PUT /plugins/:name`). */
|
|
1279
|
+
declare const ConfigurePluginInput: z.ZodObject<{
|
|
1280
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1281
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1282
|
+
secretRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1283
|
+
}, z.core.$strip>;
|
|
1284
|
+
type ConfigurePluginInput = z.infer<typeof ConfigurePluginInput>;
|
|
1285
|
+
|
|
1286
|
+
declare const FieldType: z.ZodEnum<{
|
|
1287
|
+
number: "number";
|
|
1288
|
+
boolean: "boolean";
|
|
1289
|
+
date: "date";
|
|
1290
|
+
file: "file";
|
|
1291
|
+
email: "email";
|
|
1292
|
+
text: "text";
|
|
1293
|
+
select: "select";
|
|
1294
|
+
}>;
|
|
1295
|
+
type FieldType = z.infer<typeof FieldType>;
|
|
1296
|
+
declare const FieldOption: z.ZodObject<{
|
|
1297
|
+
value: z.ZodString;
|
|
1298
|
+
label: z.ZodString;
|
|
1299
|
+
}, z.core.$strip>;
|
|
1300
|
+
type FieldOption = z.infer<typeof FieldOption>;
|
|
1301
|
+
declare const FieldValidation: z.ZodObject<{
|
|
1302
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1303
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1304
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1305
|
+
}, z.core.$strip>;
|
|
1306
|
+
type FieldValidation = z.infer<typeof FieldValidation>;
|
|
1307
|
+
declare const Field: z.ZodObject<{
|
|
1308
|
+
key: z.ZodString;
|
|
1309
|
+
label: z.ZodString;
|
|
1310
|
+
type: z.ZodEnum<{
|
|
1311
|
+
number: "number";
|
|
1312
|
+
boolean: "boolean";
|
|
1313
|
+
date: "date";
|
|
1314
|
+
file: "file";
|
|
1315
|
+
email: "email";
|
|
1316
|
+
text: "text";
|
|
1317
|
+
select: "select";
|
|
1318
|
+
}>;
|
|
1319
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
1320
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1321
|
+
help: z.ZodOptional<z.ZodString>;
|
|
1322
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1323
|
+
value: z.ZodString;
|
|
1324
|
+
label: z.ZodString;
|
|
1325
|
+
}, z.core.$strip>>>;
|
|
1326
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
1327
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1328
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1329
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1330
|
+
}, z.core.$strip>>;
|
|
1331
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
1332
|
+
path: z.ZodString;
|
|
1333
|
+
op: z.ZodEnum<{
|
|
1334
|
+
in: "in";
|
|
1335
|
+
eq: "eq";
|
|
1336
|
+
neq: "neq";
|
|
1337
|
+
gt: "gt";
|
|
1338
|
+
gte: "gte";
|
|
1339
|
+
lt: "lt";
|
|
1340
|
+
lte: "lte";
|
|
1341
|
+
exists: "exists";
|
|
1342
|
+
}>;
|
|
1343
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1344
|
+
}, z.core.$strip>>;
|
|
1345
|
+
}, z.core.$strip>;
|
|
1346
|
+
type Field = z.infer<typeof Field>;
|
|
1347
|
+
declare const FlowStep: z.ZodObject<{
|
|
1348
|
+
id: z.ZodString;
|
|
1349
|
+
title: z.ZodString;
|
|
1350
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1351
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
1352
|
+
key: z.ZodString;
|
|
1353
|
+
label: z.ZodString;
|
|
1354
|
+
type: z.ZodEnum<{
|
|
1355
|
+
number: "number";
|
|
1356
|
+
boolean: "boolean";
|
|
1357
|
+
date: "date";
|
|
1358
|
+
file: "file";
|
|
1359
|
+
email: "email";
|
|
1360
|
+
text: "text";
|
|
1361
|
+
select: "select";
|
|
1362
|
+
}>;
|
|
1363
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
1364
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1365
|
+
help: z.ZodOptional<z.ZodString>;
|
|
1366
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1367
|
+
value: z.ZodString;
|
|
1368
|
+
label: z.ZodString;
|
|
1369
|
+
}, z.core.$strip>>>;
|
|
1370
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
1371
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1372
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1373
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1374
|
+
}, z.core.$strip>>;
|
|
1375
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
1376
|
+
path: z.ZodString;
|
|
1377
|
+
op: z.ZodEnum<{
|
|
1378
|
+
in: "in";
|
|
1379
|
+
eq: "eq";
|
|
1380
|
+
neq: "neq";
|
|
1381
|
+
gt: "gt";
|
|
1382
|
+
gte: "gte";
|
|
1383
|
+
lt: "lt";
|
|
1384
|
+
lte: "lte";
|
|
1385
|
+
exists: "exists";
|
|
1386
|
+
}>;
|
|
1387
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1388
|
+
}, z.core.$strip>>;
|
|
1389
|
+
}, z.core.$strip>>;
|
|
1390
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1391
|
+
branches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1392
|
+
when: z.ZodObject<{
|
|
1393
|
+
path: z.ZodString;
|
|
1394
|
+
op: z.ZodEnum<{
|
|
1395
|
+
in: "in";
|
|
1396
|
+
eq: "eq";
|
|
1397
|
+
neq: "neq";
|
|
1398
|
+
gt: "gt";
|
|
1399
|
+
gte: "gte";
|
|
1400
|
+
lt: "lt";
|
|
1401
|
+
lte: "lte";
|
|
1402
|
+
exists: "exists";
|
|
1403
|
+
}>;
|
|
1404
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1405
|
+
}, z.core.$strip>;
|
|
1406
|
+
next: z.ZodString;
|
|
1407
|
+
}, z.core.$strip>>>;
|
|
1408
|
+
}, z.core.$strip>;
|
|
1409
|
+
type FlowStep = z.infer<typeof FlowStep>;
|
|
1410
|
+
/** Default and ceiling for how long an applicant's submission link stays valid. */
|
|
1411
|
+
declare const DEFAULT_LINK_TTL_SECONDS: number;
|
|
1412
|
+
declare const MAX_LINK_TTL_SECONDS: number;
|
|
1413
|
+
declare const CollectionFlowBody: z.ZodObject<{
|
|
1414
|
+
entryStepId: z.ZodString;
|
|
1415
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
1416
|
+
id: z.ZodString;
|
|
1417
|
+
title: z.ZodString;
|
|
1418
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1419
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
1420
|
+
key: z.ZodString;
|
|
1421
|
+
label: z.ZodString;
|
|
1422
|
+
type: z.ZodEnum<{
|
|
1423
|
+
number: "number";
|
|
1424
|
+
boolean: "boolean";
|
|
1425
|
+
date: "date";
|
|
1426
|
+
file: "file";
|
|
1427
|
+
email: "email";
|
|
1428
|
+
text: "text";
|
|
1429
|
+
select: "select";
|
|
1430
|
+
}>;
|
|
1431
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
1432
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1433
|
+
help: z.ZodOptional<z.ZodString>;
|
|
1434
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1435
|
+
value: z.ZodString;
|
|
1436
|
+
label: z.ZodString;
|
|
1437
|
+
}, z.core.$strip>>>;
|
|
1438
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
1439
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1440
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1441
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1442
|
+
}, z.core.$strip>>;
|
|
1443
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
1444
|
+
path: z.ZodString;
|
|
1445
|
+
op: z.ZodEnum<{
|
|
1446
|
+
in: "in";
|
|
1447
|
+
eq: "eq";
|
|
1448
|
+
neq: "neq";
|
|
1449
|
+
gt: "gt";
|
|
1450
|
+
gte: "gte";
|
|
1451
|
+
lt: "lt";
|
|
1452
|
+
lte: "lte";
|
|
1453
|
+
exists: "exists";
|
|
1454
|
+
}>;
|
|
1455
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1456
|
+
}, z.core.$strip>>;
|
|
1457
|
+
}, z.core.$strip>>;
|
|
1458
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1459
|
+
branches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1460
|
+
when: z.ZodObject<{
|
|
1461
|
+
path: z.ZodString;
|
|
1462
|
+
op: z.ZodEnum<{
|
|
1463
|
+
in: "in";
|
|
1464
|
+
eq: "eq";
|
|
1465
|
+
neq: "neq";
|
|
1466
|
+
gt: "gt";
|
|
1467
|
+
gte: "gte";
|
|
1468
|
+
lt: "lt";
|
|
1469
|
+
lte: "lte";
|
|
1470
|
+
exists: "exists";
|
|
1471
|
+
}>;
|
|
1472
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1473
|
+
}, z.core.$strip>;
|
|
1474
|
+
next: z.ZodString;
|
|
1475
|
+
}, z.core.$strip>>>;
|
|
1476
|
+
}, z.core.$strip>>;
|
|
1477
|
+
linkTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
1478
|
+
}, z.core.$strip>;
|
|
1479
|
+
type CollectionFlowBody = z.infer<typeof CollectionFlowBody>;
|
|
1480
|
+
declare const CollectionFlowDefinition: z.ZodObject<{
|
|
1481
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
1482
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
1483
|
+
id: z.ZodGUID;
|
|
1484
|
+
tenantId: z.ZodGUID;
|
|
1485
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1486
|
+
key: z.ZodString;
|
|
1487
|
+
version: z.ZodNumber;
|
|
1488
|
+
name: z.ZodString;
|
|
1489
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1490
|
+
status: z.ZodEnum<{
|
|
1491
|
+
draft: "draft";
|
|
1492
|
+
pending_approval: "pending_approval";
|
|
1493
|
+
published: "published";
|
|
1494
|
+
archived: "archived";
|
|
1495
|
+
}>;
|
|
1496
|
+
definition: z.ZodObject<{
|
|
1497
|
+
entryStepId: z.ZodString;
|
|
1498
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
1499
|
+
id: z.ZodString;
|
|
1500
|
+
title: z.ZodString;
|
|
1501
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1502
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
1503
|
+
key: z.ZodString;
|
|
1504
|
+
label: z.ZodString;
|
|
1505
|
+
type: z.ZodEnum<{
|
|
1506
|
+
number: "number";
|
|
1507
|
+
boolean: "boolean";
|
|
1508
|
+
date: "date";
|
|
1509
|
+
file: "file";
|
|
1510
|
+
email: "email";
|
|
1511
|
+
text: "text";
|
|
1512
|
+
select: "select";
|
|
1513
|
+
}>;
|
|
1514
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
1515
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1516
|
+
help: z.ZodOptional<z.ZodString>;
|
|
1517
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1518
|
+
value: z.ZodString;
|
|
1519
|
+
label: z.ZodString;
|
|
1520
|
+
}, z.core.$strip>>>;
|
|
1521
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
1522
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1523
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1524
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1525
|
+
}, z.core.$strip>>;
|
|
1526
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
1527
|
+
path: z.ZodString;
|
|
1528
|
+
op: z.ZodEnum<{
|
|
1529
|
+
in: "in";
|
|
1530
|
+
eq: "eq";
|
|
1531
|
+
neq: "neq";
|
|
1532
|
+
gt: "gt";
|
|
1533
|
+
gte: "gte";
|
|
1534
|
+
lt: "lt";
|
|
1535
|
+
lte: "lte";
|
|
1536
|
+
exists: "exists";
|
|
1537
|
+
}>;
|
|
1538
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1539
|
+
}, z.core.$strip>>;
|
|
1540
|
+
}, z.core.$strip>>;
|
|
1541
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1542
|
+
branches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1543
|
+
when: z.ZodObject<{
|
|
1544
|
+
path: z.ZodString;
|
|
1545
|
+
op: z.ZodEnum<{
|
|
1546
|
+
in: "in";
|
|
1547
|
+
eq: "eq";
|
|
1548
|
+
neq: "neq";
|
|
1549
|
+
gt: "gt";
|
|
1550
|
+
gte: "gte";
|
|
1551
|
+
lt: "lt";
|
|
1552
|
+
lte: "lte";
|
|
1553
|
+
exists: "exists";
|
|
1554
|
+
}>;
|
|
1555
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1556
|
+
}, z.core.$strip>;
|
|
1557
|
+
next: z.ZodString;
|
|
1558
|
+
}, z.core.$strip>>>;
|
|
1559
|
+
}, z.core.$strip>>;
|
|
1560
|
+
linkTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
1561
|
+
}, z.core.$strip>;
|
|
1562
|
+
}, z.core.$strip>;
|
|
1563
|
+
type CollectionFlowDefinition = z.infer<typeof CollectionFlowDefinition>;
|
|
1564
|
+
declare const UpsertCollectionFlowInput: z.ZodObject<{
|
|
1565
|
+
name: z.ZodString;
|
|
1566
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1567
|
+
definition: z.ZodObject<{
|
|
1568
|
+
entryStepId: z.ZodString;
|
|
1569
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
1570
|
+
id: z.ZodString;
|
|
1571
|
+
title: z.ZodString;
|
|
1572
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1573
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
1574
|
+
key: z.ZodString;
|
|
1575
|
+
label: z.ZodString;
|
|
1576
|
+
type: z.ZodEnum<{
|
|
1577
|
+
number: "number";
|
|
1578
|
+
boolean: "boolean";
|
|
1579
|
+
date: "date";
|
|
1580
|
+
file: "file";
|
|
1581
|
+
email: "email";
|
|
1582
|
+
text: "text";
|
|
1583
|
+
select: "select";
|
|
1584
|
+
}>;
|
|
1585
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
1586
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1587
|
+
help: z.ZodOptional<z.ZodString>;
|
|
1588
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1589
|
+
value: z.ZodString;
|
|
1590
|
+
label: z.ZodString;
|
|
1591
|
+
}, z.core.$strip>>>;
|
|
1592
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
1593
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1594
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1595
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1596
|
+
}, z.core.$strip>>;
|
|
1597
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
1598
|
+
path: z.ZodString;
|
|
1599
|
+
op: z.ZodEnum<{
|
|
1600
|
+
in: "in";
|
|
1601
|
+
eq: "eq";
|
|
1602
|
+
neq: "neq";
|
|
1603
|
+
gt: "gt";
|
|
1604
|
+
gte: "gte";
|
|
1605
|
+
lt: "lt";
|
|
1606
|
+
lte: "lte";
|
|
1607
|
+
exists: "exists";
|
|
1608
|
+
}>;
|
|
1609
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1610
|
+
}, z.core.$strip>>;
|
|
1611
|
+
}, z.core.$strip>>;
|
|
1612
|
+
next: z.ZodOptional<z.ZodString>;
|
|
1613
|
+
branches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1614
|
+
when: z.ZodObject<{
|
|
1615
|
+
path: z.ZodString;
|
|
1616
|
+
op: z.ZodEnum<{
|
|
1617
|
+
in: "in";
|
|
1618
|
+
eq: "eq";
|
|
1619
|
+
neq: "neq";
|
|
1620
|
+
gt: "gt";
|
|
1621
|
+
gte: "gte";
|
|
1622
|
+
lt: "lt";
|
|
1623
|
+
lte: "lte";
|
|
1624
|
+
exists: "exists";
|
|
1625
|
+
}>;
|
|
1626
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1627
|
+
}, z.core.$strip>;
|
|
1628
|
+
next: z.ZodString;
|
|
1629
|
+
}, z.core.$strip>>>;
|
|
1630
|
+
}, z.core.$strip>>;
|
|
1631
|
+
linkTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
1632
|
+
}, z.core.$strip>;
|
|
1633
|
+
}, z.core.$strip>;
|
|
1634
|
+
type UpsertCollectionFlowInput = z.infer<typeof UpsertCollectionFlowInput>;
|
|
1635
|
+
declare const SubmissionStatus: z.ZodEnum<{
|
|
1636
|
+
in_progress: "in_progress";
|
|
1637
|
+
submitted: "submitted";
|
|
1638
|
+
}>;
|
|
1639
|
+
type SubmissionStatus = z.infer<typeof SubmissionStatus>;
|
|
1640
|
+
/** A user's progress through a collection flow. Submitting signals the waiting workflow run. */
|
|
1641
|
+
declare const CollectionSubmission: z.ZodObject<{
|
|
1642
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
1643
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
1644
|
+
id: z.ZodGUID;
|
|
1645
|
+
tenantId: z.ZodGUID;
|
|
1646
|
+
flowDefinitionId: z.ZodGUID;
|
|
1647
|
+
flowKey: z.ZodString;
|
|
1648
|
+
flowVersion: z.ZodNumber;
|
|
1649
|
+
subjectId: z.ZodGUID;
|
|
1650
|
+
workflowRunId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
1651
|
+
status: z.ZodEnum<{
|
|
1652
|
+
in_progress: "in_progress";
|
|
1653
|
+
submitted: "submitted";
|
|
1654
|
+
}>;
|
|
1655
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1656
|
+
currentStepId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1657
|
+
submittedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
1658
|
+
}, z.core.$strip>;
|
|
1659
|
+
type CollectionSubmission = z.infer<typeof CollectionSubmission>;
|
|
1660
|
+
declare const CreateSubmissionInput: z.ZodObject<{
|
|
1661
|
+
flowKey: z.ZodString;
|
|
1662
|
+
subjectId: z.ZodGUID;
|
|
1663
|
+
workflowRunId: z.ZodOptional<z.ZodGUID>;
|
|
1664
|
+
}, z.core.$strip>;
|
|
1665
|
+
type CreateSubmissionInput = z.infer<typeof CreateSubmissionInput>;
|
|
1666
|
+
declare const SaveSubmissionInput: z.ZodObject<{
|
|
1667
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1668
|
+
currentStepId: z.ZodOptional<z.ZodString>;
|
|
1669
|
+
}, z.core.$strip>;
|
|
1670
|
+
type SaveSubmissionInput = z.infer<typeof SaveSubmissionInput>;
|
|
1671
|
+
/** Payload of the `collectionSubmitted` workflow signal. */
|
|
1672
|
+
declare const CollectionSubmitted: z.ZodObject<{
|
|
1673
|
+
submissionId: z.ZodGUID;
|
|
1674
|
+
flowKey: z.ZodString;
|
|
1675
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1676
|
+
submittedAt: z.ZodCoercedDate<unknown>;
|
|
1677
|
+
}, z.core.$strip>;
|
|
1678
|
+
type CollectionSubmitted = z.infer<typeof CollectionSubmitted>;
|
|
1679
|
+
|
|
1680
|
+
/** Append-only record of who did what to which resource. */
|
|
1681
|
+
declare const AuditEvent: z.ZodObject<{
|
|
1682
|
+
id: z.ZodGUID;
|
|
1683
|
+
tenantId: z.ZodGUID;
|
|
1684
|
+
actorType: z.ZodEnum<{
|
|
1685
|
+
user: "user";
|
|
1686
|
+
service: "service";
|
|
1687
|
+
applicant: "applicant";
|
|
1688
|
+
system: "system";
|
|
1689
|
+
plugin: "plugin";
|
|
1690
|
+
workflow: "workflow";
|
|
1691
|
+
}>;
|
|
1692
|
+
actorId: z.ZodString;
|
|
1693
|
+
action: z.ZodString;
|
|
1694
|
+
resourceType: z.ZodString;
|
|
1695
|
+
resourceId: z.ZodString;
|
|
1696
|
+
payload: z.ZodUnknown;
|
|
1697
|
+
occurredAt: z.ZodCoercedDate<unknown>;
|
|
1698
|
+
}, z.core.$strip>;
|
|
1699
|
+
type AuditEvent = z.infer<typeof AuditEvent>;
|
|
1700
|
+
|
|
1701
|
+
/** What a list's entries are; drives validation and matching. */
|
|
1702
|
+
declare const ListKind: z.ZodEnum<{
|
|
1703
|
+
string: "string";
|
|
1704
|
+
number: "number";
|
|
1705
|
+
email: "email";
|
|
1706
|
+
country: "country";
|
|
1707
|
+
ip_cidr: "ip_cidr";
|
|
1708
|
+
}>;
|
|
1709
|
+
type ListKind = z.infer<typeof ListKind>;
|
|
1710
|
+
/** A tenant-managed blocklist or allowlist. Lists are live data, not versioned. */
|
|
1711
|
+
declare const List: z.ZodObject<{
|
|
1712
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
1713
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
1714
|
+
id: z.ZodGUID;
|
|
1715
|
+
tenantId: z.ZodGUID;
|
|
1716
|
+
key: z.ZodString;
|
|
1717
|
+
name: z.ZodString;
|
|
1718
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1719
|
+
kind: z.ZodEnum<{
|
|
1720
|
+
string: "string";
|
|
1721
|
+
number: "number";
|
|
1722
|
+
email: "email";
|
|
1723
|
+
country: "country";
|
|
1724
|
+
ip_cidr: "ip_cidr";
|
|
1725
|
+
}>;
|
|
1726
|
+
caseInsensitive: z.ZodBoolean;
|
|
1727
|
+
entryCount: z.ZodNumber;
|
|
1728
|
+
}, z.core.$strip>;
|
|
1729
|
+
type List = z.infer<typeof List>;
|
|
1730
|
+
declare const UpsertListInput: z.ZodObject<{
|
|
1731
|
+
name: z.ZodString;
|
|
1732
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1733
|
+
kind: z.ZodEnum<{
|
|
1734
|
+
string: "string";
|
|
1735
|
+
number: "number";
|
|
1736
|
+
email: "email";
|
|
1737
|
+
country: "country";
|
|
1738
|
+
ip_cidr: "ip_cidr";
|
|
1739
|
+
}>;
|
|
1740
|
+
caseInsensitive: z.ZodDefault<z.ZodBoolean>;
|
|
1741
|
+
}, z.core.$strip>;
|
|
1742
|
+
type UpsertListInput = z.infer<typeof UpsertListInput>;
|
|
1743
|
+
declare const ListEntry: z.ZodObject<{
|
|
1744
|
+
id: z.ZodGUID;
|
|
1745
|
+
tenantId: z.ZodGUID;
|
|
1746
|
+
listId: z.ZodGUID;
|
|
1747
|
+
value: z.ZodString;
|
|
1748
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1749
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
1750
|
+
addedBy: z.ZodString;
|
|
1751
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
1752
|
+
}, z.core.$strip>;
|
|
1753
|
+
type ListEntry = z.infer<typeof ListEntry>;
|
|
1754
|
+
declare const NewListEntry: z.ZodObject<{
|
|
1755
|
+
value: z.ZodString;
|
|
1756
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1757
|
+
expiresAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1758
|
+
}, z.core.$strip>;
|
|
1759
|
+
type NewListEntry = z.infer<typeof NewListEntry>;
|
|
1760
|
+
declare const AddListEntriesInput: z.ZodObject<{
|
|
1761
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
1762
|
+
value: z.ZodString;
|
|
1763
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1764
|
+
expiresAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1765
|
+
}, z.core.$strip>>;
|
|
1766
|
+
}, z.core.$strip>;
|
|
1767
|
+
type AddListEntriesInput = z.infer<typeof AddListEntriesInput>;
|
|
1768
|
+
declare const RemoveListEntriesInput: z.ZodObject<{
|
|
1769
|
+
ids: z.ZodArray<z.ZodGUID>;
|
|
1770
|
+
}, z.core.$strip>;
|
|
1771
|
+
type RemoveListEntriesInput = z.infer<typeof RemoveListEntriesInput>;
|
|
1772
|
+
/** Outcome of a CSV import; `invalid` holds at most the first 100 rejected rows. */
|
|
1773
|
+
declare const ListImportResult: z.ZodObject<{
|
|
1774
|
+
added: z.ZodNumber;
|
|
1775
|
+
skipped: z.ZodNumber;
|
|
1776
|
+
invalid: z.ZodArray<z.ZodObject<{
|
|
1777
|
+
line: z.ZodNumber;
|
|
1778
|
+
value: z.ZodString;
|
|
1779
|
+
reason: z.ZodString;
|
|
1780
|
+
}, z.core.$strip>>;
|
|
1781
|
+
}, z.core.$strip>;
|
|
1782
|
+
type ListImportResult = z.infer<typeof ListImportResult>;
|
|
1783
|
+
/**
|
|
1784
|
+
* Canonical form of an entry for a list kind, or an error message. Used by the API on write and
|
|
1785
|
+
* by the lookup service on read so both sides agree on matching.
|
|
1786
|
+
*/
|
|
1787
|
+
declare function normalizeListValue(kind: ListKind, raw: string, caseInsensitive?: boolean): {
|
|
1788
|
+
ok: true;
|
|
1789
|
+
value: string;
|
|
1790
|
+
} | {
|
|
1791
|
+
ok: false;
|
|
1792
|
+
reason: string;
|
|
1793
|
+
};
|
|
1794
|
+
|
|
1795
|
+
/** Group-by keys velocity rules can count over, besides the subject itself. */
|
|
1796
|
+
declare const EventKey: z.ZodEnum<{
|
|
1797
|
+
email: "email";
|
|
1798
|
+
ip: "ip";
|
|
1799
|
+
device_id: "device_id";
|
|
1800
|
+
card_fingerprint: "card_fingerprint";
|
|
1801
|
+
}>;
|
|
1802
|
+
type EventKey = z.infer<typeof EventKey>;
|
|
1803
|
+
/**
|
|
1804
|
+
* An append-only fact about a subject (a transaction, a login, a signup). Promoted keys are
|
|
1805
|
+
* indexed for velocity rules; everything else lives in `attributes`.
|
|
1806
|
+
*/
|
|
1807
|
+
declare const Event: z.ZodObject<{
|
|
1808
|
+
id: z.ZodString;
|
|
1809
|
+
tenantId: z.ZodGUID;
|
|
1810
|
+
subjectId: z.ZodGUID;
|
|
1811
|
+
type: z.ZodString;
|
|
1812
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1813
|
+
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1814
|
+
occurredAt: z.ZodCoercedDate<unknown>;
|
|
1815
|
+
ingestedAt: z.ZodCoercedDate<unknown>;
|
|
1816
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1817
|
+
idempotencyKey: z.ZodString;
|
|
1818
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1819
|
+
deviceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1820
|
+
cardFingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1821
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1822
|
+
}, z.core.$strip>;
|
|
1823
|
+
type Event = z.infer<typeof Event>;
|
|
1824
|
+
declare const NewEvent: z.ZodObject<{
|
|
1825
|
+
subjectId: z.ZodGUID;
|
|
1826
|
+
type: z.ZodString;
|
|
1827
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
1828
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
1829
|
+
occurredAt: z.ZodCoercedDate<unknown>;
|
|
1830
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1831
|
+
idempotencyKey: z.ZodString;
|
|
1832
|
+
ip: z.ZodOptional<z.ZodString>;
|
|
1833
|
+
deviceId: z.ZodOptional<z.ZodString>;
|
|
1834
|
+
cardFingerprint: z.ZodOptional<z.ZodString>;
|
|
1835
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1836
|
+
}, z.core.$strip>;
|
|
1837
|
+
type NewEvent = z.infer<typeof NewEvent>;
|
|
1838
|
+
declare const IngestEventsInput: z.ZodObject<{
|
|
1839
|
+
events: z.ZodArray<z.ZodObject<{
|
|
1840
|
+
subjectId: z.ZodGUID;
|
|
1841
|
+
type: z.ZodString;
|
|
1842
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
1843
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
1844
|
+
occurredAt: z.ZodCoercedDate<unknown>;
|
|
1845
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1846
|
+
idempotencyKey: z.ZodString;
|
|
1847
|
+
ip: z.ZodOptional<z.ZodString>;
|
|
1848
|
+
deviceId: z.ZodOptional<z.ZodString>;
|
|
1849
|
+
cardFingerprint: z.ZodOptional<z.ZodString>;
|
|
1850
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1851
|
+
}, z.core.$strip>>;
|
|
1852
|
+
}, z.core.$strip>;
|
|
1853
|
+
type IngestEventsInput = z.infer<typeof IngestEventsInput>;
|
|
1854
|
+
declare const IngestEventsResult: z.ZodObject<{
|
|
1855
|
+
accepted: z.ZodNumber;
|
|
1856
|
+
duplicates: z.ZodNumber;
|
|
1857
|
+
}, z.core.$strip>;
|
|
1858
|
+
type IngestEventsResult = z.infer<typeof IngestEventsResult>;
|
|
1859
|
+
|
|
1860
|
+
declare const RuleSetUseCase: z.ZodEnum<{
|
|
1861
|
+
custom: "custom";
|
|
1862
|
+
onboarding: "onboarding";
|
|
1863
|
+
underwriting: "underwriting";
|
|
1864
|
+
monitoring: "monitoring";
|
|
1865
|
+
}>;
|
|
1866
|
+
type RuleSetUseCase = z.infer<typeof RuleSetUseCase>;
|
|
1867
|
+
/** `[min, max)` maps to `outcome`; the last band includes its `max`. */
|
|
1868
|
+
declare const ScoreBand: z.ZodObject<{
|
|
1869
|
+
min: z.ZodNumber;
|
|
1870
|
+
max: z.ZodNumber;
|
|
1871
|
+
outcome: z.ZodEnum<{
|
|
1872
|
+
approve: "approve";
|
|
1873
|
+
reject: "reject";
|
|
1874
|
+
manual_review: "manual_review";
|
|
1875
|
+
}>;
|
|
1876
|
+
}, z.core.$strip>;
|
|
1877
|
+
type ScoreBand = z.infer<typeof ScoreBand>;
|
|
1878
|
+
declare const ScoreClamp: z.ZodObject<{
|
|
1879
|
+
min: z.ZodDefault<z.ZodNumber>;
|
|
1880
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
1881
|
+
}, z.core.$strip>;
|
|
1882
|
+
/**
|
|
1883
|
+
* How a rule set turns rule results into a decision. Rules in `error` force manual review in
|
|
1884
|
+
* every mode: a rule the engine could not run must never silently approve.
|
|
1885
|
+
*/
|
|
1886
|
+
declare const AggregationPolicy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1887
|
+
mode: z.ZodLiteral<"max_severity">;
|
|
1888
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1889
|
+
mode: z.ZodLiteral<"sum_weights">;
|
|
1890
|
+
clamp: z.ZodDefault<z.ZodObject<{
|
|
1891
|
+
min: z.ZodDefault<z.ZodNumber>;
|
|
1892
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
1893
|
+
}, z.core.$strip>>;
|
|
1894
|
+
bands: z.ZodArray<z.ZodObject<{
|
|
1895
|
+
min: z.ZodNumber;
|
|
1896
|
+
max: z.ZodNumber;
|
|
1897
|
+
outcome: z.ZodEnum<{
|
|
1898
|
+
approve: "approve";
|
|
1899
|
+
reject: "reject";
|
|
1900
|
+
manual_review: "manual_review";
|
|
1901
|
+
}>;
|
|
1902
|
+
}, z.core.$strip>>;
|
|
1903
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1904
|
+
mode: z.ZodLiteral<"first_match">;
|
|
1905
|
+
default: z.ZodDefault<z.ZodEnum<{
|
|
1906
|
+
approve: "approve";
|
|
1907
|
+
reject: "reject";
|
|
1908
|
+
manual_review: "manual_review";
|
|
1909
|
+
}>>;
|
|
1910
|
+
}, z.core.$strip>], "mode">;
|
|
1911
|
+
type AggregationPolicy = z.infer<typeof AggregationPolicy>;
|
|
1912
|
+
declare const RuleSetRule: z.ZodObject<{
|
|
1913
|
+
ruleKey: z.ZodString;
|
|
1914
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1915
|
+
weightOverride: z.ZodOptional<z.ZodNumber>;
|
|
1916
|
+
shadow: z.ZodDefault<z.ZodBoolean>;
|
|
1917
|
+
}, z.core.$strip>;
|
|
1918
|
+
type RuleSetRule = z.infer<typeof RuleSetRule>;
|
|
1919
|
+
declare const RuleSetBody: z.ZodObject<{
|
|
1920
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
1921
|
+
ruleKey: z.ZodString;
|
|
1922
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1923
|
+
weightOverride: z.ZodOptional<z.ZodNumber>;
|
|
1924
|
+
shadow: z.ZodDefault<z.ZodBoolean>;
|
|
1925
|
+
}, z.core.$strip>>;
|
|
1926
|
+
policy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1927
|
+
mode: z.ZodLiteral<"max_severity">;
|
|
1928
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1929
|
+
mode: z.ZodLiteral<"sum_weights">;
|
|
1930
|
+
clamp: z.ZodDefault<z.ZodObject<{
|
|
1931
|
+
min: z.ZodDefault<z.ZodNumber>;
|
|
1932
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
1933
|
+
}, z.core.$strip>>;
|
|
1934
|
+
bands: z.ZodArray<z.ZodObject<{
|
|
1935
|
+
min: z.ZodNumber;
|
|
1936
|
+
max: z.ZodNumber;
|
|
1937
|
+
outcome: z.ZodEnum<{
|
|
1938
|
+
approve: "approve";
|
|
1939
|
+
reject: "reject";
|
|
1940
|
+
manual_review: "manual_review";
|
|
1941
|
+
}>;
|
|
1942
|
+
}, z.core.$strip>>;
|
|
1943
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1944
|
+
mode: z.ZodLiteral<"first_match">;
|
|
1945
|
+
default: z.ZodDefault<z.ZodEnum<{
|
|
1946
|
+
approve: "approve";
|
|
1947
|
+
reject: "reject";
|
|
1948
|
+
manual_review: "manual_review";
|
|
1949
|
+
}>>;
|
|
1950
|
+
}, z.core.$strip>], "mode">;
|
|
1951
|
+
}, z.core.$strip>;
|
|
1952
|
+
type RuleSetBody = z.infer<typeof RuleSetBody>;
|
|
1953
|
+
/** A versioned, ordered group of rules with one aggregation policy. */
|
|
1954
|
+
declare const RuleSetDefinition: z.ZodObject<{
|
|
1955
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
1956
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
1957
|
+
id: z.ZodGUID;
|
|
1958
|
+
tenantId: z.ZodGUID;
|
|
1959
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1960
|
+
key: z.ZodString;
|
|
1961
|
+
version: z.ZodNumber;
|
|
1962
|
+
name: z.ZodString;
|
|
1963
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1964
|
+
useCase: z.ZodEnum<{
|
|
1965
|
+
custom: "custom";
|
|
1966
|
+
onboarding: "onboarding";
|
|
1967
|
+
underwriting: "underwriting";
|
|
1968
|
+
monitoring: "monitoring";
|
|
1969
|
+
}>;
|
|
1970
|
+
status: z.ZodEnum<{
|
|
1971
|
+
draft: "draft";
|
|
1972
|
+
pending_approval: "pending_approval";
|
|
1973
|
+
published: "published";
|
|
1974
|
+
archived: "archived";
|
|
1975
|
+
}>;
|
|
1976
|
+
definition: z.ZodObject<{
|
|
1977
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
1978
|
+
ruleKey: z.ZodString;
|
|
1979
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1980
|
+
weightOverride: z.ZodOptional<z.ZodNumber>;
|
|
1981
|
+
shadow: z.ZodDefault<z.ZodBoolean>;
|
|
1982
|
+
}, z.core.$strip>>;
|
|
1983
|
+
policy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1984
|
+
mode: z.ZodLiteral<"max_severity">;
|
|
1985
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1986
|
+
mode: z.ZodLiteral<"sum_weights">;
|
|
1987
|
+
clamp: z.ZodDefault<z.ZodObject<{
|
|
1988
|
+
min: z.ZodDefault<z.ZodNumber>;
|
|
1989
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
1990
|
+
}, z.core.$strip>>;
|
|
1991
|
+
bands: z.ZodArray<z.ZodObject<{
|
|
1992
|
+
min: z.ZodNumber;
|
|
1993
|
+
max: z.ZodNumber;
|
|
1994
|
+
outcome: z.ZodEnum<{
|
|
1995
|
+
approve: "approve";
|
|
1996
|
+
reject: "reject";
|
|
1997
|
+
manual_review: "manual_review";
|
|
1998
|
+
}>;
|
|
1999
|
+
}, z.core.$strip>>;
|
|
2000
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2001
|
+
mode: z.ZodLiteral<"first_match">;
|
|
2002
|
+
default: z.ZodDefault<z.ZodEnum<{
|
|
2003
|
+
approve: "approve";
|
|
2004
|
+
reject: "reject";
|
|
2005
|
+
manual_review: "manual_review";
|
|
2006
|
+
}>>;
|
|
2007
|
+
}, z.core.$strip>], "mode">;
|
|
2008
|
+
}, z.core.$strip>;
|
|
2009
|
+
}, z.core.$strip>;
|
|
2010
|
+
type RuleSetDefinition = z.infer<typeof RuleSetDefinition>;
|
|
2011
|
+
declare const UpsertRuleSetInput: z.ZodObject<{
|
|
2012
|
+
name: z.ZodString;
|
|
2013
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2014
|
+
useCase: z.ZodDefault<z.ZodEnum<{
|
|
2015
|
+
custom: "custom";
|
|
2016
|
+
onboarding: "onboarding";
|
|
2017
|
+
underwriting: "underwriting";
|
|
2018
|
+
monitoring: "monitoring";
|
|
2019
|
+
}>>;
|
|
2020
|
+
definition: z.ZodObject<{
|
|
2021
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
2022
|
+
ruleKey: z.ZodString;
|
|
2023
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2024
|
+
weightOverride: z.ZodOptional<z.ZodNumber>;
|
|
2025
|
+
shadow: z.ZodDefault<z.ZodBoolean>;
|
|
2026
|
+
}, z.core.$strip>>;
|
|
2027
|
+
policy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2028
|
+
mode: z.ZodLiteral<"max_severity">;
|
|
2029
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2030
|
+
mode: z.ZodLiteral<"sum_weights">;
|
|
2031
|
+
clamp: z.ZodDefault<z.ZodObject<{
|
|
2032
|
+
min: z.ZodDefault<z.ZodNumber>;
|
|
2033
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
2034
|
+
}, z.core.$strip>>;
|
|
2035
|
+
bands: z.ZodArray<z.ZodObject<{
|
|
2036
|
+
min: z.ZodNumber;
|
|
2037
|
+
max: z.ZodNumber;
|
|
2038
|
+
outcome: z.ZodEnum<{
|
|
2039
|
+
approve: "approve";
|
|
2040
|
+
reject: "reject";
|
|
2041
|
+
manual_review: "manual_review";
|
|
2042
|
+
}>;
|
|
2043
|
+
}, z.core.$strip>>;
|
|
2044
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2045
|
+
mode: z.ZodLiteral<"first_match">;
|
|
2046
|
+
default: z.ZodDefault<z.ZodEnum<{
|
|
2047
|
+
approve: "approve";
|
|
2048
|
+
reject: "reject";
|
|
2049
|
+
manual_review: "manual_review";
|
|
2050
|
+
}>>;
|
|
2051
|
+
}, z.core.$strip>], "mode">;
|
|
2052
|
+
}, z.core.$strip>;
|
|
2053
|
+
}, z.core.$strip>;
|
|
2054
|
+
type UpsertRuleSetInput = z.infer<typeof UpsertRuleSetInput>;
|
|
2055
|
+
/** The band a score falls into: `[min, max)`, with the last band including its `max`. */
|
|
2056
|
+
declare function bandFor(bands: ScoreBand[], score: number): ScoreBand | undefined;
|
|
2057
|
+
|
|
2058
|
+
/**
|
|
2059
|
+
* Snapshot of one `evaluate_rules` step execution: the exact inputs the rules saw and what they
|
|
2060
|
+
* returned. Append-only; backtests replay these rows.
|
|
2061
|
+
*/
|
|
2062
|
+
declare const RuleEvaluation: z.ZodObject<{
|
|
2063
|
+
id: z.ZodGUID;
|
|
2064
|
+
tenantId: z.ZodGUID;
|
|
2065
|
+
workflowRunId: z.ZodGUID;
|
|
2066
|
+
stepId: z.ZodString;
|
|
2067
|
+
subjectId: z.ZodGUID;
|
|
2068
|
+
ruleSetKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2069
|
+
ruleSetVersion: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2070
|
+
ruleKeys: z.ZodArray<z.ZodString>;
|
|
2071
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2072
|
+
results: z.ZodArray<z.ZodObject<{
|
|
2073
|
+
ruleId: z.ZodString;
|
|
2074
|
+
ruleKey: z.ZodString;
|
|
2075
|
+
ruleVersion: z.ZodNumber;
|
|
2076
|
+
severity: z.ZodEnum<{
|
|
2077
|
+
info: "info";
|
|
2078
|
+
warn: "warn";
|
|
2079
|
+
block: "block";
|
|
2080
|
+
}>;
|
|
2081
|
+
weight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2082
|
+
outcome: z.ZodEnum<{
|
|
2083
|
+
error: "error";
|
|
2084
|
+
pass: "pass";
|
|
2085
|
+
fail: "fail";
|
|
2086
|
+
skipped: "skipped";
|
|
2087
|
+
}>;
|
|
2088
|
+
score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2089
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
2090
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
2091
|
+
durationMs: z.ZodNumber;
|
|
2092
|
+
shadow: z.ZodOptional<z.ZodBoolean>;
|
|
2093
|
+
}, z.core.$strip>>;
|
|
2094
|
+
outcome: z.ZodEnum<{
|
|
2095
|
+
approve: "approve";
|
|
2096
|
+
reject: "reject";
|
|
2097
|
+
manual_review: "manual_review";
|
|
2098
|
+
}>;
|
|
2099
|
+
riskScore: z.ZodNumber;
|
|
2100
|
+
evaluatedAt: z.ZodCoercedDate<unknown>;
|
|
2101
|
+
}, z.core.$strip>;
|
|
2102
|
+
type RuleEvaluation = z.infer<typeof RuleEvaluation>;
|
|
2103
|
+
|
|
2104
|
+
declare const BacktestStatus: z.ZodEnum<{
|
|
2105
|
+
running: "running";
|
|
2106
|
+
completed: "completed";
|
|
2107
|
+
failed: "failed";
|
|
2108
|
+
queued: "queued";
|
|
2109
|
+
}>;
|
|
2110
|
+
type BacktestStatus = z.infer<typeof BacktestStatus>;
|
|
2111
|
+
declare const BacktestSample: z.ZodObject<{
|
|
2112
|
+
lastDays: z.ZodDefault<z.ZodNumber>;
|
|
2113
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
2114
|
+
}, z.core.$strip>;
|
|
2115
|
+
type BacktestSample = z.infer<typeof BacktestSample>;
|
|
2116
|
+
declare const StartBacktestInput: z.ZodObject<{
|
|
2117
|
+
ruleKey: z.ZodString;
|
|
2118
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
2119
|
+
sample: z.ZodDefault<z.ZodObject<{
|
|
2120
|
+
lastDays: z.ZodDefault<z.ZodNumber>;
|
|
2121
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
2122
|
+
}, z.core.$strip>>;
|
|
2123
|
+
compareWithRuleSetKey: z.ZodOptional<z.ZodString>;
|
|
2124
|
+
}, z.core.$strip>;
|
|
2125
|
+
type StartBacktestInput = z.infer<typeof StartBacktestInput>;
|
|
2126
|
+
declare const BacktestProgress: z.ZodObject<{
|
|
2127
|
+
done: z.ZodNumber;
|
|
2128
|
+
total: z.ZodNumber;
|
|
2129
|
+
}, z.core.$strip>;
|
|
2130
|
+
type BacktestProgress = z.infer<typeof BacktestProgress>;
|
|
2131
|
+
declare const BacktestSampleFailure: z.ZodObject<{
|
|
2132
|
+
evaluationId: z.ZodGUID;
|
|
2133
|
+
subjectId: z.ZodGUID;
|
|
2134
|
+
evaluatedAt: z.ZodCoercedDate<unknown>;
|
|
2135
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
2136
|
+
}, z.core.$strip>;
|
|
2137
|
+
type BacktestSampleFailure = z.infer<typeof BacktestSampleFailure>;
|
|
2138
|
+
declare const BacktestSummary: z.ZodObject<{
|
|
2139
|
+
evaluated: z.ZodNumber;
|
|
2140
|
+
outcomes: z.ZodRecord<z.ZodEnum<{
|
|
2141
|
+
error: "error";
|
|
2142
|
+
pass: "pass";
|
|
2143
|
+
fail: "fail";
|
|
2144
|
+
skipped: "skipped";
|
|
2145
|
+
}>, z.ZodNumber>;
|
|
2146
|
+
wouldChange: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
2147
|
+
overlap: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
2148
|
+
sampleFailures: z.ZodArray<z.ZodObject<{
|
|
2149
|
+
evaluationId: z.ZodGUID;
|
|
2150
|
+
subjectId: z.ZodGUID;
|
|
2151
|
+
evaluatedAt: z.ZodCoercedDate<unknown>;
|
|
2152
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
2153
|
+
}, z.core.$strip>>;
|
|
2154
|
+
durationMs: z.ZodNumber;
|
|
2155
|
+
}, z.core.$strip>;
|
|
2156
|
+
type BacktestSummary = z.infer<typeof BacktestSummary>;
|
|
2157
|
+
declare const Backtest: z.ZodObject<{
|
|
2158
|
+
id: z.ZodGUID;
|
|
2159
|
+
tenantId: z.ZodGUID;
|
|
2160
|
+
ruleKey: z.ZodString;
|
|
2161
|
+
ruleVersion: z.ZodNumber;
|
|
2162
|
+
ruleSetKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2163
|
+
sample: z.ZodObject<{
|
|
2164
|
+
lastDays: z.ZodDefault<z.ZodNumber>;
|
|
2165
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
2166
|
+
}, z.core.$strip>;
|
|
2167
|
+
status: z.ZodEnum<{
|
|
2168
|
+
running: "running";
|
|
2169
|
+
completed: "completed";
|
|
2170
|
+
failed: "failed";
|
|
2171
|
+
queued: "queued";
|
|
2172
|
+
}>;
|
|
2173
|
+
progress: z.ZodObject<{
|
|
2174
|
+
done: z.ZodNumber;
|
|
2175
|
+
total: z.ZodNumber;
|
|
2176
|
+
}, z.core.$strip>;
|
|
2177
|
+
summary: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2178
|
+
evaluated: z.ZodNumber;
|
|
2179
|
+
outcomes: z.ZodRecord<z.ZodEnum<{
|
|
2180
|
+
error: "error";
|
|
2181
|
+
pass: "pass";
|
|
2182
|
+
fail: "fail";
|
|
2183
|
+
skipped: "skipped";
|
|
2184
|
+
}>, z.ZodNumber>;
|
|
2185
|
+
wouldChange: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
2186
|
+
overlap: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
2187
|
+
sampleFailures: z.ZodArray<z.ZodObject<{
|
|
2188
|
+
evaluationId: z.ZodGUID;
|
|
2189
|
+
subjectId: z.ZodGUID;
|
|
2190
|
+
evaluatedAt: z.ZodCoercedDate<unknown>;
|
|
2191
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
2192
|
+
}, z.core.$strip>>;
|
|
2193
|
+
durationMs: z.ZodNumber;
|
|
2194
|
+
}, z.core.$strip>>>;
|
|
2195
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2196
|
+
temporalWorkflowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2197
|
+
requestedBy: z.ZodString;
|
|
2198
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
2199
|
+
finishedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
2200
|
+
}, z.core.$strip>;
|
|
2201
|
+
type Backtest = z.infer<typeof Backtest>;
|
|
2202
|
+
/** The decision outcome before and after substituting the draft rule, per evaluation. */
|
|
2203
|
+
declare const OutcomeChange: z.ZodObject<{
|
|
2204
|
+
before: z.ZodEnum<{
|
|
2205
|
+
approve: "approve";
|
|
2206
|
+
reject: "reject";
|
|
2207
|
+
manual_review: "manual_review";
|
|
2208
|
+
}>;
|
|
2209
|
+
after: z.ZodEnum<{
|
|
2210
|
+
approve: "approve";
|
|
2211
|
+
reject: "reject";
|
|
2212
|
+
manual_review: "manual_review";
|
|
2213
|
+
}>;
|
|
2214
|
+
}, z.core.$strip>;
|
|
2215
|
+
type OutcomeChange = z.infer<typeof OutcomeChange>;
|
|
2216
|
+
|
|
2217
|
+
declare const PluginCallbackStatus: z.ZodEnum<{
|
|
2218
|
+
completed: "completed";
|
|
2219
|
+
failed: "failed";
|
|
2220
|
+
pending: "pending";
|
|
2221
|
+
timed_out: "timed_out";
|
|
2222
|
+
}>;
|
|
2223
|
+
type PluginCallbackStatus = z.infer<typeof PluginCallbackStatus>;
|
|
2224
|
+
/**
|
|
2225
|
+
* A vendor session started by an asynchronous plugin action, waiting for the vendor's webhook.
|
|
2226
|
+
* Maps the vendor's external id back to the tenant, run and step.
|
|
2227
|
+
*/
|
|
2228
|
+
declare const PluginCallback: z.ZodObject<{
|
|
2229
|
+
id: z.ZodGUID;
|
|
2230
|
+
tenantId: z.ZodGUID;
|
|
2231
|
+
pluginName: z.ZodString;
|
|
2232
|
+
action: z.ZodString;
|
|
2233
|
+
externalId: z.ZodString;
|
|
2234
|
+
workflowRunId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
2235
|
+
stepId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2236
|
+
status: z.ZodEnum<{
|
|
2237
|
+
completed: "completed";
|
|
2238
|
+
failed: "failed";
|
|
2239
|
+
pending: "pending";
|
|
2240
|
+
timed_out: "timed_out";
|
|
2241
|
+
}>;
|
|
2242
|
+
output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
2243
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2244
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
2245
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
2246
|
+
}, z.core.$strip>;
|
|
2247
|
+
type PluginCallback = z.infer<typeof PluginCallback>;
|
|
2248
|
+
/** Payload of the `pluginCallback` workflow signal. */
|
|
2249
|
+
declare const PluginCallbackSignal: z.ZodObject<{
|
|
2250
|
+
externalId: z.ZodString;
|
|
2251
|
+
status: z.ZodEnum<{
|
|
2252
|
+
completed: "completed";
|
|
2253
|
+
failed: "failed";
|
|
2254
|
+
}>;
|
|
2255
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
2256
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2257
|
+
}, z.core.$strip>;
|
|
2258
|
+
type PluginCallbackSignal = z.infer<typeof PluginCallbackSignal>;
|
|
2259
|
+
/** A received vendor webhook, kept for de-duplication. */
|
|
2260
|
+
declare const WebhookEventRecord: z.ZodObject<{
|
|
2261
|
+
id: z.ZodGUID;
|
|
2262
|
+
tenantId: z.ZodGUID;
|
|
2263
|
+
pluginName: z.ZodString;
|
|
2264
|
+
eventId: z.ZodString;
|
|
2265
|
+
externalId: z.ZodString;
|
|
2266
|
+
receivedAt: z.ZodCoercedDate<unknown>;
|
|
2267
|
+
}, z.core.$strip>;
|
|
2268
|
+
type WebhookEventRecord = z.infer<typeof WebhookEventRecord>;
|
|
2269
|
+
|
|
2270
|
+
/** Upper bound on one uploaded file; enforced by the presigned policy and again on finalize. */
|
|
2271
|
+
declare const DOCUMENT_MAX_BYTES: number;
|
|
2272
|
+
/**
|
|
2273
|
+
* Content types a client may declare. The stored type is always the sniffed one. HEIC is not
|
|
2274
|
+
* accepted: images are re-encoded on ingest and the bundled libvips cannot decode HEVC.
|
|
2275
|
+
*/
|
|
2276
|
+
declare const DOCUMENT_CONTENT_TYPES: readonly ["image/jpeg", "image/png", "image/webp", "application/pdf"];
|
|
2277
|
+
declare const DocumentContentType: z.ZodEnum<{
|
|
2278
|
+
"image/jpeg": "image/jpeg";
|
|
2279
|
+
"image/png": "image/png";
|
|
2280
|
+
"image/webp": "image/webp";
|
|
2281
|
+
"application/pdf": "application/pdf";
|
|
2282
|
+
}>;
|
|
2283
|
+
type DocumentContentType = z.infer<typeof DocumentContentType>;
|
|
2284
|
+
/**
|
|
2285
|
+
* `pending`: row exists, nothing uploaded yet. `uploaded`: finalize verified the object.
|
|
2286
|
+
* `scanning`: the scan workflow owns it. `clean` / `infected`: the scanner's verdict.
|
|
2287
|
+
* `rejected`: finalize or processing refused the file (type mismatch, size, dangerous PDF).
|
|
2288
|
+
*/
|
|
2289
|
+
declare const DocumentStatus: z.ZodEnum<{
|
|
2290
|
+
pending: "pending";
|
|
2291
|
+
uploaded: "uploaded";
|
|
2292
|
+
scanning: "scanning";
|
|
2293
|
+
clean: "clean";
|
|
2294
|
+
infected: "infected";
|
|
2295
|
+
rejected: "rejected";
|
|
2296
|
+
}>;
|
|
2297
|
+
type DocumentStatus = z.infer<typeof DocumentStatus>;
|
|
2298
|
+
/** Statuses from which a document can still change. */
|
|
2299
|
+
declare const DOCUMENT_OPEN_STATUSES: readonly DocumentStatus[];
|
|
2300
|
+
declare const DocumentScan: z.ZodObject<{
|
|
2301
|
+
engine: z.ZodString;
|
|
2302
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
2303
|
+
scannedAt: z.ZodCoercedDate<unknown>;
|
|
2304
|
+
}, z.core.$strip>;
|
|
2305
|
+
type DocumentScan = z.infer<typeof DocumentScan>;
|
|
2306
|
+
declare const Document: z.ZodObject<{
|
|
2307
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
2308
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
2309
|
+
id: z.ZodGUID;
|
|
2310
|
+
tenantId: z.ZodGUID;
|
|
2311
|
+
subjectId: z.ZodGUID;
|
|
2312
|
+
submissionId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
2313
|
+
caseId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
2314
|
+
fieldKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2315
|
+
fileName: z.ZodString;
|
|
2316
|
+
contentType: z.ZodString;
|
|
2317
|
+
sizeBytes: z.ZodNumber;
|
|
2318
|
+
sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2319
|
+
storageKey: z.ZodString;
|
|
2320
|
+
status: z.ZodEnum<{
|
|
2321
|
+
pending: "pending";
|
|
2322
|
+
uploaded: "uploaded";
|
|
2323
|
+
scanning: "scanning";
|
|
2324
|
+
clean: "clean";
|
|
2325
|
+
infected: "infected";
|
|
2326
|
+
rejected: "rejected";
|
|
2327
|
+
}>;
|
|
2328
|
+
scan: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2329
|
+
engine: z.ZodString;
|
|
2330
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
2331
|
+
scannedAt: z.ZodCoercedDate<unknown>;
|
|
2332
|
+
}, z.core.$strip>>>;
|
|
2333
|
+
rejectionReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2334
|
+
uploadedBy: z.ZodString;
|
|
2335
|
+
}, z.core.$strip>;
|
|
2336
|
+
type Document = z.infer<typeof Document>;
|
|
2337
|
+
declare const CreateDocumentInput: z.ZodObject<{
|
|
2338
|
+
fileName: z.ZodString;
|
|
2339
|
+
contentType: z.ZodEnum<{
|
|
2340
|
+
"image/jpeg": "image/jpeg";
|
|
2341
|
+
"image/png": "image/png";
|
|
2342
|
+
"image/webp": "image/webp";
|
|
2343
|
+
"application/pdf": "application/pdf";
|
|
2344
|
+
}>;
|
|
2345
|
+
sizeBytes: z.ZodNumber;
|
|
2346
|
+
subjectId: z.ZodOptional<z.ZodGUID>;
|
|
2347
|
+
submissionId: z.ZodOptional<z.ZodGUID>;
|
|
2348
|
+
caseId: z.ZodOptional<z.ZodGUID>;
|
|
2349
|
+
fieldKey: z.ZodOptional<z.ZodString>;
|
|
2350
|
+
}, z.core.$strip>;
|
|
2351
|
+
type CreateDocumentInput = z.infer<typeof CreateDocumentInput>;
|
|
2352
|
+
/** What a client needs to POST the file straight to object storage. */
|
|
2353
|
+
declare const DocumentUploadTicket: z.ZodObject<{
|
|
2354
|
+
documentId: z.ZodGUID;
|
|
2355
|
+
upload: z.ZodObject<{
|
|
2356
|
+
url: z.ZodURL;
|
|
2357
|
+
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2358
|
+
expiresAt: z.ZodCoercedDate<unknown>;
|
|
2359
|
+
maxBytes: z.ZodNumber;
|
|
2360
|
+
}, z.core.$strip>;
|
|
2361
|
+
}, z.core.$strip>;
|
|
2362
|
+
type DocumentUploadTicket = z.infer<typeof DocumentUploadTicket>;
|
|
2363
|
+
declare const DocumentDownload: z.ZodObject<{
|
|
2364
|
+
url: z.ZodURL;
|
|
2365
|
+
expiresAt: z.ZodCoercedDate<unknown>;
|
|
2366
|
+
fileName: z.ZodString;
|
|
2367
|
+
contentType: z.ZodString;
|
|
2368
|
+
}, z.core.$strip>;
|
|
2369
|
+
type DocumentDownload = z.infer<typeof DocumentDownload>;
|
|
2370
|
+
/** Value stored in a collection-flow `file` field. */
|
|
2371
|
+
declare const FileFieldValue: z.ZodObject<{
|
|
2372
|
+
fileId: z.ZodGUID;
|
|
2373
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2374
|
+
}, z.core.$strip>;
|
|
2375
|
+
type FileFieldValue = z.infer<typeof FileFieldValue>;
|
|
2376
|
+
|
|
2377
|
+
/** What a subject's history is made of. Each kind maps to a read permission on the API. */
|
|
2378
|
+
declare const TimelineKind: z.ZodEnum<{
|
|
2379
|
+
note: "note";
|
|
2380
|
+
submission: "submission";
|
|
2381
|
+
event: "event";
|
|
2382
|
+
decision: "decision";
|
|
2383
|
+
case: "case";
|
|
2384
|
+
run: "run";
|
|
2385
|
+
document: "document";
|
|
2386
|
+
audit: "audit";
|
|
2387
|
+
}>;
|
|
2388
|
+
type TimelineKind = z.infer<typeof TimelineKind>;
|
|
2389
|
+
/**
|
|
2390
|
+
* One entry of a subject's chronological history, projected server-side from the entity tables
|
|
2391
|
+
* and the audit log. `data` carries the kind-specific record (a `Decision`, a `Case`, ...).
|
|
2392
|
+
*/
|
|
2393
|
+
declare const TimelineEntry: z.ZodObject<{
|
|
2394
|
+
id: z.ZodString;
|
|
2395
|
+
kind: z.ZodEnum<{
|
|
2396
|
+
note: "note";
|
|
2397
|
+
submission: "submission";
|
|
2398
|
+
event: "event";
|
|
2399
|
+
decision: "decision";
|
|
2400
|
+
case: "case";
|
|
2401
|
+
run: "run";
|
|
2402
|
+
document: "document";
|
|
2403
|
+
audit: "audit";
|
|
2404
|
+
}>;
|
|
2405
|
+
at: z.ZodCoercedDate<unknown>;
|
|
2406
|
+
title: z.ZodString;
|
|
2407
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
2408
|
+
resourceType: z.ZodString;
|
|
2409
|
+
resourceId: z.ZodString;
|
|
2410
|
+
actor: z.ZodOptional<z.ZodObject<{
|
|
2411
|
+
type: z.ZodEnum<{
|
|
2412
|
+
user: "user";
|
|
2413
|
+
service: "service";
|
|
2414
|
+
applicant: "applicant";
|
|
2415
|
+
system: "system";
|
|
2416
|
+
plugin: "plugin";
|
|
2417
|
+
workflow: "workflow";
|
|
2418
|
+
}>;
|
|
2419
|
+
id: z.ZodString;
|
|
2420
|
+
}, z.core.$strip>>;
|
|
2421
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
2422
|
+
}, z.core.$strip>;
|
|
2423
|
+
type TimelineEntry = z.infer<typeof TimelineEntry>;
|
|
2424
|
+
declare const TimelineQuery: z.ZodObject<{
|
|
2425
|
+
from: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
2426
|
+
to: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
2427
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2428
|
+
note: "note";
|
|
2429
|
+
submission: "submission";
|
|
2430
|
+
event: "event";
|
|
2431
|
+
decision: "decision";
|
|
2432
|
+
case: "case";
|
|
2433
|
+
run: "run";
|
|
2434
|
+
document: "document";
|
|
2435
|
+
audit: "audit";
|
|
2436
|
+
}>>>;
|
|
2437
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
2438
|
+
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
2439
|
+
}, z.core.$strip>;
|
|
2440
|
+
type TimelineQuery = z.infer<typeof TimelineQuery>;
|
|
2441
|
+
|
|
2442
|
+
/** Display hints the builder applies to a schema-driven form (`uiSchema` inputs for rjsf). */
|
|
2443
|
+
declare const FormUiHints: z.ZodObject<{
|
|
2444
|
+
fieldOrder: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2445
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2446
|
+
help: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2447
|
+
pickers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2448
|
+
}, z.core.$strip>;
|
|
2449
|
+
type FormUiHints = z.infer<typeof FormUiHints>;
|
|
2450
|
+
/** One workflow step type as `GET /workflow-step-types` describes it. */
|
|
2451
|
+
declare const StepTypeDescription: z.ZodObject<{
|
|
2452
|
+
type: z.ZodString;
|
|
2453
|
+
title: z.ZodString;
|
|
2454
|
+
description: z.ZodString;
|
|
2455
|
+
configSchema: z.ZodUnknown;
|
|
2456
|
+
dataPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2457
|
+
outputs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2458
|
+
terminal: z.ZodDefault<z.ZodBoolean>;
|
|
2459
|
+
uiHints: z.ZodOptional<z.ZodObject<{
|
|
2460
|
+
fieldOrder: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2461
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2462
|
+
help: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2463
|
+
pickers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2464
|
+
}, z.core.$strip>>;
|
|
2465
|
+
}, z.core.$strip>;
|
|
2466
|
+
type StepTypeDescription = z.infer<typeof StepTypeDescription>;
|
|
2467
|
+
/** One collection-flow field type as `GET /collection-field-types` describes it. */
|
|
2468
|
+
declare const FieldTypeDescription: z.ZodObject<{
|
|
2469
|
+
type: z.ZodString;
|
|
2470
|
+
title: z.ZodString;
|
|
2471
|
+
description: z.ZodString;
|
|
2472
|
+
optionsSchema: z.ZodUnknown;
|
|
2473
|
+
valueSchema: z.ZodUnknown;
|
|
2474
|
+
}, z.core.$strip>;
|
|
2475
|
+
type FieldTypeDescription = z.infer<typeof FieldTypeDescription>;
|
|
2476
|
+
declare const IssueSeverity: z.ZodEnum<{
|
|
2477
|
+
error: "error";
|
|
2478
|
+
warning: "warning";
|
|
2479
|
+
}>;
|
|
2480
|
+
type IssueSeverity = z.infer<typeof IssueSeverity>;
|
|
2481
|
+
/** A problem found while validating a definition body without saving it. */
|
|
2482
|
+
declare const DefinitionIssue: z.ZodObject<{
|
|
2483
|
+
severity: z.ZodEnum<{
|
|
2484
|
+
error: "error";
|
|
2485
|
+
warning: "warning";
|
|
2486
|
+
}>;
|
|
2487
|
+
path: z.ZodString;
|
|
2488
|
+
stepId: z.ZodOptional<z.ZodString>;
|
|
2489
|
+
fieldKey: z.ZodOptional<z.ZodString>;
|
|
2490
|
+
code: z.ZodString;
|
|
2491
|
+
message: z.ZodString;
|
|
2492
|
+
}, z.core.$strip>;
|
|
2493
|
+
type DefinitionIssue = z.infer<typeof DefinitionIssue>;
|
|
2494
|
+
declare const ValidationReport: z.ZodObject<{
|
|
2495
|
+
ok: z.ZodBoolean;
|
|
2496
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
2497
|
+
severity: z.ZodEnum<{
|
|
2498
|
+
error: "error";
|
|
2499
|
+
warning: "warning";
|
|
2500
|
+
}>;
|
|
2501
|
+
path: z.ZodString;
|
|
2502
|
+
stepId: z.ZodOptional<z.ZodString>;
|
|
2503
|
+
fieldKey: z.ZodOptional<z.ZodString>;
|
|
2504
|
+
code: z.ZodString;
|
|
2505
|
+
message: z.ZodString;
|
|
2506
|
+
}, z.core.$strip>>;
|
|
2507
|
+
}, z.core.$strip>;
|
|
2508
|
+
type ValidationReport = z.infer<typeof ValidationReport>;
|
|
2509
|
+
|
|
2510
|
+
/** The four versioned definition kinds and the URL prefix each is served under. */
|
|
2511
|
+
declare const DefinitionKind: z.ZodEnum<{
|
|
2512
|
+
workflow: "workflow";
|
|
2513
|
+
rule: "rule";
|
|
2514
|
+
rule_set: "rule_set";
|
|
2515
|
+
collection_flow: "collection_flow";
|
|
2516
|
+
}>;
|
|
2517
|
+
type DefinitionKind = z.infer<typeof DefinitionKind>;
|
|
2518
|
+
declare const DEFINITION_PATHS: Record<DefinitionKind, string>;
|
|
2519
|
+
declare const ApprovalDecision: z.ZodEnum<{
|
|
2520
|
+
rejected: "rejected";
|
|
2521
|
+
approved: "approved";
|
|
2522
|
+
}>;
|
|
2523
|
+
type ApprovalDecision = z.infer<typeof ApprovalDecision>;
|
|
2524
|
+
/** One request to publish a version, and its outcome once an approver acts. */
|
|
2525
|
+
declare const DefinitionApproval: z.ZodObject<{
|
|
2526
|
+
id: z.ZodGUID;
|
|
2527
|
+
tenantId: z.ZodGUID;
|
|
2528
|
+
kind: z.ZodEnum<{
|
|
2529
|
+
workflow: "workflow";
|
|
2530
|
+
rule: "rule";
|
|
2531
|
+
rule_set: "rule_set";
|
|
2532
|
+
collection_flow: "collection_flow";
|
|
2533
|
+
}>;
|
|
2534
|
+
key: z.ZodString;
|
|
2535
|
+
version: z.ZodNumber;
|
|
2536
|
+
requestedBy: z.ZodString;
|
|
2537
|
+
requestedAt: z.ZodCoercedDate<unknown>;
|
|
2538
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2539
|
+
decidedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2540
|
+
decidedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
2541
|
+
decision: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2542
|
+
rejected: "rejected";
|
|
2543
|
+
approved: "approved";
|
|
2544
|
+
}>>>;
|
|
2545
|
+
decisionComment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2546
|
+
}, z.core.$strip>;
|
|
2547
|
+
type DefinitionApproval = z.infer<typeof DefinitionApproval>;
|
|
2548
|
+
declare const ApprovalCommentInput: z.ZodObject<{
|
|
2549
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
2550
|
+
}, z.core.$strip>;
|
|
2551
|
+
type ApprovalCommentInput = z.infer<typeof ApprovalCommentInput>;
|
|
2552
|
+
/** A row of a definition's version history. */
|
|
2553
|
+
declare const DefinitionVersionSummary: z.ZodObject<{
|
|
2554
|
+
kind: z.ZodEnum<{
|
|
2555
|
+
workflow: "workflow";
|
|
2556
|
+
rule: "rule";
|
|
2557
|
+
rule_set: "rule_set";
|
|
2558
|
+
collection_flow: "collection_flow";
|
|
2559
|
+
}>;
|
|
2560
|
+
key: z.ZodString;
|
|
2561
|
+
version: z.ZodNumber;
|
|
2562
|
+
status: z.ZodEnum<{
|
|
2563
|
+
draft: "draft";
|
|
2564
|
+
pending_approval: "pending_approval";
|
|
2565
|
+
published: "published";
|
|
2566
|
+
archived: "archived";
|
|
2567
|
+
}>;
|
|
2568
|
+
name: z.ZodString;
|
|
2569
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2570
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
2571
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
2572
|
+
approval: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2573
|
+
id: z.ZodGUID;
|
|
2574
|
+
tenantId: z.ZodGUID;
|
|
2575
|
+
kind: z.ZodEnum<{
|
|
2576
|
+
workflow: "workflow";
|
|
2577
|
+
rule: "rule";
|
|
2578
|
+
rule_set: "rule_set";
|
|
2579
|
+
collection_flow: "collection_flow";
|
|
2580
|
+
}>;
|
|
2581
|
+
key: z.ZodString;
|
|
2582
|
+
version: z.ZodNumber;
|
|
2583
|
+
requestedBy: z.ZodString;
|
|
2584
|
+
requestedAt: z.ZodCoercedDate<unknown>;
|
|
2585
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2586
|
+
decidedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2587
|
+
decidedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
2588
|
+
decision: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2589
|
+
rejected: "rejected";
|
|
2590
|
+
approved: "approved";
|
|
2591
|
+
}>>>;
|
|
2592
|
+
decisionComment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2593
|
+
}, z.core.$strip>>>;
|
|
2594
|
+
}, z.core.$strip>;
|
|
2595
|
+
type DefinitionVersionSummary = z.infer<typeof DefinitionVersionSummary>;
|
|
2596
|
+
declare const DiffOp: z.ZodEnum<{
|
|
2597
|
+
added: "added";
|
|
2598
|
+
removed: "removed";
|
|
2599
|
+
changed: "changed";
|
|
2600
|
+
moved: "moved";
|
|
2601
|
+
}>;
|
|
2602
|
+
type DiffOp = z.infer<typeof DiffOp>;
|
|
2603
|
+
/** One readable change between two versions, e.g. `step "idv" added`. */
|
|
2604
|
+
declare const DiffChange: z.ZodObject<{
|
|
2605
|
+
op: z.ZodEnum<{
|
|
2606
|
+
added: "added";
|
|
2607
|
+
removed: "removed";
|
|
2608
|
+
changed: "changed";
|
|
2609
|
+
moved: "moved";
|
|
2610
|
+
}>;
|
|
2611
|
+
path: z.ZodString;
|
|
2612
|
+
summary: z.ZodString;
|
|
2613
|
+
before: z.ZodOptional<z.ZodUnknown>;
|
|
2614
|
+
after: z.ZodOptional<z.ZodUnknown>;
|
|
2615
|
+
}, z.core.$strip>;
|
|
2616
|
+
type DiffChange = z.infer<typeof DiffChange>;
|
|
2617
|
+
declare const DefinitionDiff: z.ZodObject<{
|
|
2618
|
+
kind: z.ZodEnum<{
|
|
2619
|
+
workflow: "workflow";
|
|
2620
|
+
rule: "rule";
|
|
2621
|
+
rule_set: "rule_set";
|
|
2622
|
+
collection_flow: "collection_flow";
|
|
2623
|
+
}>;
|
|
2624
|
+
key: z.ZodString;
|
|
2625
|
+
from: z.ZodNumber;
|
|
2626
|
+
to: z.ZodNumber;
|
|
2627
|
+
changes: z.ZodArray<z.ZodObject<{
|
|
2628
|
+
op: z.ZodEnum<{
|
|
2629
|
+
added: "added";
|
|
2630
|
+
removed: "removed";
|
|
2631
|
+
changed: "changed";
|
|
2632
|
+
moved: "moved";
|
|
2633
|
+
}>;
|
|
2634
|
+
path: z.ZodString;
|
|
2635
|
+
summary: z.ZodString;
|
|
2636
|
+
before: z.ZodOptional<z.ZodUnknown>;
|
|
2637
|
+
after: z.ZodOptional<z.ZodUnknown>;
|
|
2638
|
+
}, z.core.$strip>>;
|
|
2639
|
+
delta: z.ZodUnknown;
|
|
2640
|
+
}, z.core.$strip>;
|
|
2641
|
+
type DefinitionDiff = z.infer<typeof DefinitionDiff>;
|
|
2642
|
+
declare const AuditExportFormat: z.ZodEnum<{
|
|
2643
|
+
csv: "csv";
|
|
2644
|
+
jsonl: "jsonl";
|
|
2645
|
+
}>;
|
|
2646
|
+
type AuditExportFormat = z.infer<typeof AuditExportFormat>;
|
|
2647
|
+
/** Filters shared by `GET /audit-events` and its export. */
|
|
2648
|
+
declare const AuditFilter: z.ZodObject<{
|
|
2649
|
+
action: z.ZodOptional<z.ZodString>;
|
|
2650
|
+
actorId: z.ZodOptional<z.ZodString>;
|
|
2651
|
+
actorType: z.ZodOptional<z.ZodEnum<{
|
|
2652
|
+
user: "user";
|
|
2653
|
+
service: "service";
|
|
2654
|
+
applicant: "applicant";
|
|
2655
|
+
system: "system";
|
|
2656
|
+
plugin: "plugin";
|
|
2657
|
+
workflow: "workflow";
|
|
2658
|
+
}>>;
|
|
2659
|
+
resourceType: z.ZodOptional<z.ZodString>;
|
|
2660
|
+
resourceId: z.ZodOptional<z.ZodString>;
|
|
2661
|
+
from: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
2662
|
+
to: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
2663
|
+
}, z.core.$strip>;
|
|
2664
|
+
type AuditFilter = z.infer<typeof AuditFilter>;
|
|
2665
|
+
|
|
2666
|
+
declare class AletheiaError extends Error {
|
|
2667
|
+
readonly code: string;
|
|
2668
|
+
readonly status: number;
|
|
2669
|
+
readonly details?: unknown | undefined;
|
|
2670
|
+
constructor(message: string, code: string, status?: number, details?: unknown | undefined);
|
|
2671
|
+
}
|
|
2672
|
+
declare class NotFoundError extends AletheiaError {
|
|
2673
|
+
constructor(resource: string, id: string);
|
|
2674
|
+
}
|
|
2675
|
+
declare class ValidationError extends AletheiaError {
|
|
2676
|
+
constructor(message: string, details?: unknown);
|
|
2677
|
+
}
|
|
2678
|
+
declare class ConflictError extends AletheiaError {
|
|
2679
|
+
constructor(message: string);
|
|
2680
|
+
}
|
|
2681
|
+
declare class NotImplementedError extends AletheiaError {
|
|
2682
|
+
constructor(feature: string);
|
|
2683
|
+
}
|
|
2684
|
+
declare class TimeoutError extends AletheiaError {
|
|
2685
|
+
constructor(operation: string, timeoutMs: number);
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
/** UUID v4. Uses the platform crypto so it works in Node, browsers and tests alike. */
|
|
2689
|
+
declare function createId(): string;
|
|
2690
|
+
|
|
2691
|
+
export { Actor, ActorType, AddListEntriesInput, AggregationPolicy, AletheiaError, ApprovalCommentInput, ApprovalDecision, ApprovalSettings, AssignCaseInput, AuditEvent, AuditExportFormat, AuditFilter, Backtest, BacktestProgress, BacktestSample, BacktestSampleFailure, BacktestStatus, BacktestSummary, BaseEntity, BranchStep, CallPluginStep, Case, CaseFilter, CaseNote, CaseNoteInput, CasePriority, CaseQueue, CaseSettings, CaseSlaState, CaseSort, CaseStatus, CaseView, CloseCaseInput, CollectionFlowBody, CollectionFlowDefinition, CollectionSubmission, CollectionSubmitted, Condition, ConditionOp, ConfigurePluginInput, ConflictError, CreateCaseStep, CreateDocumentInput, CreateSubjectInput, CreateSubmissionInput, DEFAULT_LINK_TTL_SECONDS, DEFINITION_PATHS, DEV_TENANT_ID, DOCUMENT_CONTENT_TYPES, DOCUMENT_MAX_BYTES, DOCUMENT_OPEN_STATUSES, DecideCaseInput, Decision, DecisionOutcome, DecisionReason, DecisionSource, DefinitionApproval, DefinitionDiff, DefinitionIssue, DefinitionKey, DefinitionKind, DefinitionStatus, DefinitionVersionSummary, DiffChange, DiffOp, DirectoryUser, Document, DocumentContentType, DocumentDownload, DocumentScan, DocumentStatus, DocumentUploadTicket, EmitDecisionStep, EvaluateRulesStep, Event, EventKey, Field, FieldOption, FieldType, FieldTypeDescription, FieldValidation, FileFieldValue, FlowStep, FormUiHints, Id, IngestEventsInput, IngestEventsResult, IssueSeverity, JsonObject, List, ListEntry, ListImportResult, ListKind, MAX_LINK_TTL_SECONDS, ManualDecision, NewEvent, NewListEntry, NotFoundError, NotImplementedError, OutcomeChange, PluginCallback, PluginCallbackSignal, PluginCallbackStatus, PluginDefinition, PluginInvocation, PluginInvocationStatus, RemoveListEntriesInput, RuleDefinition, RuleEvaluation, RuleEvaluationResult, RuleOutcome, RuleSetBody, RuleSetDefinition, RuleSetRule, RuleSetUseCase, RuleSeverity, RuleType, RunDefinitionInput, SYSTEM_ACTOR, SaveSubmissionInput, ScoreBand, ScoreClamp, SortOrder, StartBacktestInput, StartWorkflowRunInput, StepTypeDescription, Subject, SubjectKind, SubjectListQuery, SubjectStatus, SubmissionStatus, Tenant, TenantContext, TenantSettings, TimelineEntry, TimelineKind, TimelineQuery, TimeoutError, Timestamps, UpsertCaseQueueInput, UpsertCollectionFlowInput, UpsertListInput, UpsertRuleDefinitionInput, UpsertRuleSetInput, UpsertWorkflowDefinitionInput, ValidationError, ValidationReport, WaitForCollectionStep, WebOrigin, WebhookEventRecord, WorkflowDefinition, WorkflowDefinitionBody, WorkflowRun, WorkflowRunStatus, WorkflowStep, type WorkflowStepType, WorkflowTrigger, WorkflowUi, bandFor, caseSlaState, createId, evaluateCondition, getPath, normalizeListValue, stepTargets, systemContext, temporalWorkflowId };
|