@aletheia-dev/core 0.1.0 → 0.2.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/dist/index.cjs +141 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +900 -1
- package/dist/index.d.ts +900 -1
- package/dist/index.js +122 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2663,6 +2663,905 @@ declare const AuditFilter: z.ZodObject<{
|
|
|
2663
2663
|
}, z.core.$strip>;
|
|
2664
2664
|
type AuditFilter = z.infer<typeof AuditFilter>;
|
|
2665
2665
|
|
|
2666
|
+
/**
|
|
2667
|
+
* A policy pack: a portable set of definitions (rules, rule sets, workflows, collection flows)
|
|
2668
|
+
* and lists that `POST /definitions/import` loads into a tenant and `GET /definitions/export`
|
|
2669
|
+
* produces from one. Every item is the body the matching `PUT` route accepts plus the `key` it
|
|
2670
|
+
* is stored under, so a pack is validated by the same schemas as the API. Plugin configuration
|
|
2671
|
+
* is never part of a pack: it carries secret references that belong to one deployment.
|
|
2672
|
+
*/
|
|
2673
|
+
/** Rows per list in a pack: the cap one `addEntries` call accepts (the CSV import batch size). */
|
|
2674
|
+
declare const POLICY_PACK_MAX_LIST_ROWS = 10000;
|
|
2675
|
+
declare const PolicyPackRule: z.ZodObject<{
|
|
2676
|
+
name: z.ZodString;
|
|
2677
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2678
|
+
type: z.ZodEnum<{
|
|
2679
|
+
plugin: "plugin";
|
|
2680
|
+
comparison: "comparison";
|
|
2681
|
+
list_lookup: "list_lookup";
|
|
2682
|
+
score_threshold: "score_threshold";
|
|
2683
|
+
expression: "expression";
|
|
2684
|
+
velocity: "velocity";
|
|
2685
|
+
}>;
|
|
2686
|
+
config: z.ZodUnknown;
|
|
2687
|
+
severity: z.ZodDefault<z.ZodEnum<{
|
|
2688
|
+
info: "info";
|
|
2689
|
+
warn: "warn";
|
|
2690
|
+
block: "block";
|
|
2691
|
+
}>>;
|
|
2692
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2693
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2694
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2695
|
+
key: z.ZodString;
|
|
2696
|
+
}, z.core.$strip>;
|
|
2697
|
+
type PolicyPackRule = z.infer<typeof PolicyPackRule>;
|
|
2698
|
+
declare const PolicyPackRuleSet: z.ZodObject<{
|
|
2699
|
+
name: z.ZodString;
|
|
2700
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2701
|
+
useCase: z.ZodDefault<z.ZodEnum<{
|
|
2702
|
+
custom: "custom";
|
|
2703
|
+
onboarding: "onboarding";
|
|
2704
|
+
underwriting: "underwriting";
|
|
2705
|
+
monitoring: "monitoring";
|
|
2706
|
+
}>>;
|
|
2707
|
+
definition: z.ZodObject<{
|
|
2708
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
2709
|
+
ruleKey: z.ZodString;
|
|
2710
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2711
|
+
weightOverride: z.ZodOptional<z.ZodNumber>;
|
|
2712
|
+
shadow: z.ZodDefault<z.ZodBoolean>;
|
|
2713
|
+
}, z.core.$strip>>;
|
|
2714
|
+
policy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2715
|
+
mode: z.ZodLiteral<"max_severity">;
|
|
2716
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2717
|
+
mode: z.ZodLiteral<"sum_weights">;
|
|
2718
|
+
clamp: z.ZodDefault<z.ZodObject<{
|
|
2719
|
+
min: z.ZodDefault<z.ZodNumber>;
|
|
2720
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
2721
|
+
}, z.core.$strip>>;
|
|
2722
|
+
bands: z.ZodArray<z.ZodObject<{
|
|
2723
|
+
min: z.ZodNumber;
|
|
2724
|
+
max: z.ZodNumber;
|
|
2725
|
+
outcome: z.ZodEnum<{
|
|
2726
|
+
approve: "approve";
|
|
2727
|
+
reject: "reject";
|
|
2728
|
+
manual_review: "manual_review";
|
|
2729
|
+
}>;
|
|
2730
|
+
}, z.core.$strip>>;
|
|
2731
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2732
|
+
mode: z.ZodLiteral<"first_match">;
|
|
2733
|
+
default: z.ZodDefault<z.ZodEnum<{
|
|
2734
|
+
approve: "approve";
|
|
2735
|
+
reject: "reject";
|
|
2736
|
+
manual_review: "manual_review";
|
|
2737
|
+
}>>;
|
|
2738
|
+
}, z.core.$strip>], "mode">;
|
|
2739
|
+
}, z.core.$strip>;
|
|
2740
|
+
key: z.ZodString;
|
|
2741
|
+
}, z.core.$strip>;
|
|
2742
|
+
type PolicyPackRuleSet = z.infer<typeof PolicyPackRuleSet>;
|
|
2743
|
+
declare const PolicyPackWorkflow: z.ZodObject<{
|
|
2744
|
+
name: z.ZodString;
|
|
2745
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2746
|
+
trigger: z.ZodDefault<z.ZodEnum<{
|
|
2747
|
+
manual: "manual";
|
|
2748
|
+
"subject.created": "subject.created";
|
|
2749
|
+
event: "event";
|
|
2750
|
+
}>>;
|
|
2751
|
+
definition: z.ZodObject<{
|
|
2752
|
+
entryStepId: z.ZodString;
|
|
2753
|
+
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2754
|
+
id: z.ZodString;
|
|
2755
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2756
|
+
next: z.ZodOptional<z.ZodString>;
|
|
2757
|
+
type: z.ZodLiteral<"evaluate_rules">;
|
|
2758
|
+
ruleKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2759
|
+
ruleSetKey: z.ZodOptional<z.ZodString>;
|
|
2760
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
2761
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2762
|
+
id: z.ZodString;
|
|
2763
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2764
|
+
next: z.ZodOptional<z.ZodString>;
|
|
2765
|
+
type: z.ZodLiteral<"call_plugin">;
|
|
2766
|
+
plugin: z.ZodString;
|
|
2767
|
+
action: z.ZodString;
|
|
2768
|
+
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2769
|
+
inputMapping: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2770
|
+
outputKey: z.ZodString;
|
|
2771
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
2772
|
+
maximumAttempts: z.ZodOptional<z.ZodNumber>;
|
|
2773
|
+
initialIntervalSeconds: z.ZodOptional<z.ZodNumber>;
|
|
2774
|
+
}, z.core.$strip>>;
|
|
2775
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2776
|
+
id: z.ZodString;
|
|
2777
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2778
|
+
next: z.ZodOptional<z.ZodString>;
|
|
2779
|
+
type: z.ZodLiteral<"wait_for_collection">;
|
|
2780
|
+
flowKey: z.ZodString;
|
|
2781
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
2782
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
2783
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2784
|
+
id: z.ZodString;
|
|
2785
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2786
|
+
next: z.ZodOptional<z.ZodString>;
|
|
2787
|
+
type: z.ZodLiteral<"create_case">;
|
|
2788
|
+
caseType: z.ZodString;
|
|
2789
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
2790
|
+
low: "low";
|
|
2791
|
+
medium: "medium";
|
|
2792
|
+
high: "high";
|
|
2793
|
+
critical: "critical";
|
|
2794
|
+
}>>;
|
|
2795
|
+
slaHours: z.ZodOptional<z.ZodNumber>;
|
|
2796
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
2797
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2798
|
+
id: z.ZodString;
|
|
2799
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2800
|
+
next: z.ZodOptional<z.ZodString>;
|
|
2801
|
+
type: z.ZodLiteral<"emit_decision">;
|
|
2802
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
2803
|
+
from_rules: "from_rules";
|
|
2804
|
+
fixed: "fixed";
|
|
2805
|
+
}>>;
|
|
2806
|
+
rulesKey: z.ZodDefault<z.ZodString>;
|
|
2807
|
+
manualDecisionKey: z.ZodDefault<z.ZodString>;
|
|
2808
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
2809
|
+
approve: "approve";
|
|
2810
|
+
reject: "reject";
|
|
2811
|
+
manual_review: "manual_review";
|
|
2812
|
+
}>>;
|
|
2813
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2814
|
+
id: z.ZodString;
|
|
2815
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2816
|
+
next: z.ZodOptional<z.ZodString>;
|
|
2817
|
+
type: z.ZodLiteral<"branch">;
|
|
2818
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
2819
|
+
when: z.ZodObject<{
|
|
2820
|
+
path: z.ZodString;
|
|
2821
|
+
op: z.ZodEnum<{
|
|
2822
|
+
in: "in";
|
|
2823
|
+
eq: "eq";
|
|
2824
|
+
neq: "neq";
|
|
2825
|
+
gt: "gt";
|
|
2826
|
+
gte: "gte";
|
|
2827
|
+
lt: "lt";
|
|
2828
|
+
lte: "lte";
|
|
2829
|
+
exists: "exists";
|
|
2830
|
+
}>;
|
|
2831
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
2832
|
+
}, z.core.$strip>;
|
|
2833
|
+
next: z.ZodString;
|
|
2834
|
+
}, z.core.$strip>>;
|
|
2835
|
+
default: z.ZodString;
|
|
2836
|
+
}, z.core.$strip>], "type">>;
|
|
2837
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
2838
|
+
positions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2839
|
+
x: z.ZodNumber;
|
|
2840
|
+
y: z.ZodNumber;
|
|
2841
|
+
}, z.core.$strip>>>;
|
|
2842
|
+
}, z.core.$strip>>;
|
|
2843
|
+
}, z.core.$strip>;
|
|
2844
|
+
key: z.ZodString;
|
|
2845
|
+
}, z.core.$strip>;
|
|
2846
|
+
type PolicyPackWorkflow = z.infer<typeof PolicyPackWorkflow>;
|
|
2847
|
+
declare const PolicyPackCollectionFlow: z.ZodObject<{
|
|
2848
|
+
name: z.ZodString;
|
|
2849
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2850
|
+
definition: z.ZodObject<{
|
|
2851
|
+
entryStepId: z.ZodString;
|
|
2852
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
2853
|
+
id: z.ZodString;
|
|
2854
|
+
title: z.ZodString;
|
|
2855
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2856
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
2857
|
+
key: z.ZodString;
|
|
2858
|
+
label: z.ZodString;
|
|
2859
|
+
type: z.ZodEnum<{
|
|
2860
|
+
number: "number";
|
|
2861
|
+
boolean: "boolean";
|
|
2862
|
+
date: "date";
|
|
2863
|
+
file: "file";
|
|
2864
|
+
email: "email";
|
|
2865
|
+
text: "text";
|
|
2866
|
+
select: "select";
|
|
2867
|
+
}>;
|
|
2868
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
2869
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
2870
|
+
help: z.ZodOptional<z.ZodString>;
|
|
2871
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2872
|
+
value: z.ZodString;
|
|
2873
|
+
label: z.ZodString;
|
|
2874
|
+
}, z.core.$strip>>>;
|
|
2875
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
2876
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
2877
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
2878
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
2879
|
+
}, z.core.$strip>>;
|
|
2880
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
2881
|
+
path: z.ZodString;
|
|
2882
|
+
op: z.ZodEnum<{
|
|
2883
|
+
in: "in";
|
|
2884
|
+
eq: "eq";
|
|
2885
|
+
neq: "neq";
|
|
2886
|
+
gt: "gt";
|
|
2887
|
+
gte: "gte";
|
|
2888
|
+
lt: "lt";
|
|
2889
|
+
lte: "lte";
|
|
2890
|
+
exists: "exists";
|
|
2891
|
+
}>;
|
|
2892
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
2893
|
+
}, z.core.$strip>>;
|
|
2894
|
+
}, z.core.$strip>>;
|
|
2895
|
+
next: z.ZodOptional<z.ZodString>;
|
|
2896
|
+
branches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2897
|
+
when: z.ZodObject<{
|
|
2898
|
+
path: z.ZodString;
|
|
2899
|
+
op: z.ZodEnum<{
|
|
2900
|
+
in: "in";
|
|
2901
|
+
eq: "eq";
|
|
2902
|
+
neq: "neq";
|
|
2903
|
+
gt: "gt";
|
|
2904
|
+
gte: "gte";
|
|
2905
|
+
lt: "lt";
|
|
2906
|
+
lte: "lte";
|
|
2907
|
+
exists: "exists";
|
|
2908
|
+
}>;
|
|
2909
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
2910
|
+
}, z.core.$strip>;
|
|
2911
|
+
next: z.ZodString;
|
|
2912
|
+
}, z.core.$strip>>>;
|
|
2913
|
+
}, z.core.$strip>>;
|
|
2914
|
+
linkTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
2915
|
+
}, z.core.$strip>;
|
|
2916
|
+
key: z.ZodString;
|
|
2917
|
+
}, z.core.$strip>;
|
|
2918
|
+
type PolicyPackCollectionFlow = z.infer<typeof PolicyPackCollectionFlow>;
|
|
2919
|
+
/** A list with its rows; lists are live data, so an import adds the rows that are not there yet. */
|
|
2920
|
+
declare const PolicyPackList: z.ZodObject<{
|
|
2921
|
+
name: z.ZodString;
|
|
2922
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2923
|
+
kind: z.ZodEnum<{
|
|
2924
|
+
string: "string";
|
|
2925
|
+
number: "number";
|
|
2926
|
+
email: "email";
|
|
2927
|
+
country: "country";
|
|
2928
|
+
ip_cidr: "ip_cidr";
|
|
2929
|
+
}>;
|
|
2930
|
+
caseInsensitive: z.ZodDefault<z.ZodBoolean>;
|
|
2931
|
+
key: z.ZodString;
|
|
2932
|
+
rows: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2933
|
+
value: z.ZodString;
|
|
2934
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
2935
|
+
expiresAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
2936
|
+
}, z.core.$strip>>>;
|
|
2937
|
+
}, z.core.$strip>;
|
|
2938
|
+
type PolicyPackList = z.infer<typeof PolicyPackList>;
|
|
2939
|
+
/** The item groups of a pack, in the order an import writes them. */
|
|
2940
|
+
declare const POLICY_PACK_GROUPS: readonly ["lists", "rules", "ruleSets", "collectionFlows", "workflows"];
|
|
2941
|
+
type PolicyPackGroup = (typeof POLICY_PACK_GROUPS)[number];
|
|
2942
|
+
/** The kind of an item in a pack: a definition kind, or `list`. */
|
|
2943
|
+
declare const PolicyPackItemKind: z.ZodEnum<{
|
|
2944
|
+
workflow: "workflow";
|
|
2945
|
+
rule: "rule";
|
|
2946
|
+
rule_set: "rule_set";
|
|
2947
|
+
collection_flow: "collection_flow";
|
|
2948
|
+
list: "list";
|
|
2949
|
+
}>;
|
|
2950
|
+
type PolicyPackItemKind = z.infer<typeof PolicyPackItemKind>;
|
|
2951
|
+
declare const POLICY_PACK_GROUP_KINDS: Record<PolicyPackGroup, PolicyPackItemKind>;
|
|
2952
|
+
declare const PolicyPackDefinitions: z.ZodObject<{
|
|
2953
|
+
rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2954
|
+
name: z.ZodString;
|
|
2955
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2956
|
+
type: z.ZodEnum<{
|
|
2957
|
+
plugin: "plugin";
|
|
2958
|
+
comparison: "comparison";
|
|
2959
|
+
list_lookup: "list_lookup";
|
|
2960
|
+
score_threshold: "score_threshold";
|
|
2961
|
+
expression: "expression";
|
|
2962
|
+
velocity: "velocity";
|
|
2963
|
+
}>;
|
|
2964
|
+
config: z.ZodUnknown;
|
|
2965
|
+
severity: z.ZodDefault<z.ZodEnum<{
|
|
2966
|
+
info: "info";
|
|
2967
|
+
warn: "warn";
|
|
2968
|
+
block: "block";
|
|
2969
|
+
}>>;
|
|
2970
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2971
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2972
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2973
|
+
key: z.ZodString;
|
|
2974
|
+
}, z.core.$strip>>>;
|
|
2975
|
+
ruleSets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2976
|
+
name: z.ZodString;
|
|
2977
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2978
|
+
useCase: z.ZodDefault<z.ZodEnum<{
|
|
2979
|
+
custom: "custom";
|
|
2980
|
+
onboarding: "onboarding";
|
|
2981
|
+
underwriting: "underwriting";
|
|
2982
|
+
monitoring: "monitoring";
|
|
2983
|
+
}>>;
|
|
2984
|
+
definition: z.ZodObject<{
|
|
2985
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
2986
|
+
ruleKey: z.ZodString;
|
|
2987
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2988
|
+
weightOverride: z.ZodOptional<z.ZodNumber>;
|
|
2989
|
+
shadow: z.ZodDefault<z.ZodBoolean>;
|
|
2990
|
+
}, z.core.$strip>>;
|
|
2991
|
+
policy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2992
|
+
mode: z.ZodLiteral<"max_severity">;
|
|
2993
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2994
|
+
mode: z.ZodLiteral<"sum_weights">;
|
|
2995
|
+
clamp: z.ZodDefault<z.ZodObject<{
|
|
2996
|
+
min: z.ZodDefault<z.ZodNumber>;
|
|
2997
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
2998
|
+
}, z.core.$strip>>;
|
|
2999
|
+
bands: z.ZodArray<z.ZodObject<{
|
|
3000
|
+
min: z.ZodNumber;
|
|
3001
|
+
max: z.ZodNumber;
|
|
3002
|
+
outcome: z.ZodEnum<{
|
|
3003
|
+
approve: "approve";
|
|
3004
|
+
reject: "reject";
|
|
3005
|
+
manual_review: "manual_review";
|
|
3006
|
+
}>;
|
|
3007
|
+
}, z.core.$strip>>;
|
|
3008
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3009
|
+
mode: z.ZodLiteral<"first_match">;
|
|
3010
|
+
default: z.ZodDefault<z.ZodEnum<{
|
|
3011
|
+
approve: "approve";
|
|
3012
|
+
reject: "reject";
|
|
3013
|
+
manual_review: "manual_review";
|
|
3014
|
+
}>>;
|
|
3015
|
+
}, z.core.$strip>], "mode">;
|
|
3016
|
+
}, z.core.$strip>;
|
|
3017
|
+
key: z.ZodString;
|
|
3018
|
+
}, z.core.$strip>>>;
|
|
3019
|
+
workflows: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3020
|
+
name: z.ZodString;
|
|
3021
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3022
|
+
trigger: z.ZodDefault<z.ZodEnum<{
|
|
3023
|
+
manual: "manual";
|
|
3024
|
+
"subject.created": "subject.created";
|
|
3025
|
+
event: "event";
|
|
3026
|
+
}>>;
|
|
3027
|
+
definition: z.ZodObject<{
|
|
3028
|
+
entryStepId: z.ZodString;
|
|
3029
|
+
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3030
|
+
id: z.ZodString;
|
|
3031
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3032
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3033
|
+
type: z.ZodLiteral<"evaluate_rules">;
|
|
3034
|
+
ruleKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3035
|
+
ruleSetKey: z.ZodOptional<z.ZodString>;
|
|
3036
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
3037
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3038
|
+
id: z.ZodString;
|
|
3039
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3040
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3041
|
+
type: z.ZodLiteral<"call_plugin">;
|
|
3042
|
+
plugin: z.ZodString;
|
|
3043
|
+
action: z.ZodString;
|
|
3044
|
+
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3045
|
+
inputMapping: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3046
|
+
outputKey: z.ZodString;
|
|
3047
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
3048
|
+
maximumAttempts: z.ZodOptional<z.ZodNumber>;
|
|
3049
|
+
initialIntervalSeconds: z.ZodOptional<z.ZodNumber>;
|
|
3050
|
+
}, z.core.$strip>>;
|
|
3051
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3052
|
+
id: z.ZodString;
|
|
3053
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3054
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3055
|
+
type: z.ZodLiteral<"wait_for_collection">;
|
|
3056
|
+
flowKey: z.ZodString;
|
|
3057
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
3058
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
3059
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3060
|
+
id: z.ZodString;
|
|
3061
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3062
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3063
|
+
type: z.ZodLiteral<"create_case">;
|
|
3064
|
+
caseType: z.ZodString;
|
|
3065
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
3066
|
+
low: "low";
|
|
3067
|
+
medium: "medium";
|
|
3068
|
+
high: "high";
|
|
3069
|
+
critical: "critical";
|
|
3070
|
+
}>>;
|
|
3071
|
+
slaHours: z.ZodOptional<z.ZodNumber>;
|
|
3072
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
3073
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3074
|
+
id: z.ZodString;
|
|
3075
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3076
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3077
|
+
type: z.ZodLiteral<"emit_decision">;
|
|
3078
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
3079
|
+
from_rules: "from_rules";
|
|
3080
|
+
fixed: "fixed";
|
|
3081
|
+
}>>;
|
|
3082
|
+
rulesKey: z.ZodDefault<z.ZodString>;
|
|
3083
|
+
manualDecisionKey: z.ZodDefault<z.ZodString>;
|
|
3084
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
3085
|
+
approve: "approve";
|
|
3086
|
+
reject: "reject";
|
|
3087
|
+
manual_review: "manual_review";
|
|
3088
|
+
}>>;
|
|
3089
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3090
|
+
id: z.ZodString;
|
|
3091
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3092
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3093
|
+
type: z.ZodLiteral<"branch">;
|
|
3094
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
3095
|
+
when: z.ZodObject<{
|
|
3096
|
+
path: z.ZodString;
|
|
3097
|
+
op: z.ZodEnum<{
|
|
3098
|
+
in: "in";
|
|
3099
|
+
eq: "eq";
|
|
3100
|
+
neq: "neq";
|
|
3101
|
+
gt: "gt";
|
|
3102
|
+
gte: "gte";
|
|
3103
|
+
lt: "lt";
|
|
3104
|
+
lte: "lte";
|
|
3105
|
+
exists: "exists";
|
|
3106
|
+
}>;
|
|
3107
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
3108
|
+
}, z.core.$strip>;
|
|
3109
|
+
next: z.ZodString;
|
|
3110
|
+
}, z.core.$strip>>;
|
|
3111
|
+
default: z.ZodString;
|
|
3112
|
+
}, z.core.$strip>], "type">>;
|
|
3113
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
3114
|
+
positions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3115
|
+
x: z.ZodNumber;
|
|
3116
|
+
y: z.ZodNumber;
|
|
3117
|
+
}, z.core.$strip>>>;
|
|
3118
|
+
}, z.core.$strip>>;
|
|
3119
|
+
}, z.core.$strip>;
|
|
3120
|
+
key: z.ZodString;
|
|
3121
|
+
}, z.core.$strip>>>;
|
|
3122
|
+
collectionFlows: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3123
|
+
name: z.ZodString;
|
|
3124
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3125
|
+
definition: z.ZodObject<{
|
|
3126
|
+
entryStepId: z.ZodString;
|
|
3127
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
3128
|
+
id: z.ZodString;
|
|
3129
|
+
title: z.ZodString;
|
|
3130
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3131
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
3132
|
+
key: z.ZodString;
|
|
3133
|
+
label: z.ZodString;
|
|
3134
|
+
type: z.ZodEnum<{
|
|
3135
|
+
number: "number";
|
|
3136
|
+
boolean: "boolean";
|
|
3137
|
+
date: "date";
|
|
3138
|
+
file: "file";
|
|
3139
|
+
email: "email";
|
|
3140
|
+
text: "text";
|
|
3141
|
+
select: "select";
|
|
3142
|
+
}>;
|
|
3143
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
3144
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
3145
|
+
help: z.ZodOptional<z.ZodString>;
|
|
3146
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3147
|
+
value: z.ZodString;
|
|
3148
|
+
label: z.ZodString;
|
|
3149
|
+
}, z.core.$strip>>>;
|
|
3150
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
3151
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
3152
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
3153
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
3154
|
+
}, z.core.$strip>>;
|
|
3155
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
3156
|
+
path: z.ZodString;
|
|
3157
|
+
op: z.ZodEnum<{
|
|
3158
|
+
in: "in";
|
|
3159
|
+
eq: "eq";
|
|
3160
|
+
neq: "neq";
|
|
3161
|
+
gt: "gt";
|
|
3162
|
+
gte: "gte";
|
|
3163
|
+
lt: "lt";
|
|
3164
|
+
lte: "lte";
|
|
3165
|
+
exists: "exists";
|
|
3166
|
+
}>;
|
|
3167
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
3168
|
+
}, z.core.$strip>>;
|
|
3169
|
+
}, z.core.$strip>>;
|
|
3170
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3171
|
+
branches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3172
|
+
when: z.ZodObject<{
|
|
3173
|
+
path: z.ZodString;
|
|
3174
|
+
op: z.ZodEnum<{
|
|
3175
|
+
in: "in";
|
|
3176
|
+
eq: "eq";
|
|
3177
|
+
neq: "neq";
|
|
3178
|
+
gt: "gt";
|
|
3179
|
+
gte: "gte";
|
|
3180
|
+
lt: "lt";
|
|
3181
|
+
lte: "lte";
|
|
3182
|
+
exists: "exists";
|
|
3183
|
+
}>;
|
|
3184
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
3185
|
+
}, z.core.$strip>;
|
|
3186
|
+
next: z.ZodString;
|
|
3187
|
+
}, z.core.$strip>>>;
|
|
3188
|
+
}, z.core.$strip>>;
|
|
3189
|
+
linkTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
3190
|
+
}, z.core.$strip>;
|
|
3191
|
+
key: z.ZodString;
|
|
3192
|
+
}, z.core.$strip>>>;
|
|
3193
|
+
lists: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3194
|
+
name: z.ZodString;
|
|
3195
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3196
|
+
kind: z.ZodEnum<{
|
|
3197
|
+
string: "string";
|
|
3198
|
+
number: "number";
|
|
3199
|
+
email: "email";
|
|
3200
|
+
country: "country";
|
|
3201
|
+
ip_cidr: "ip_cidr";
|
|
3202
|
+
}>;
|
|
3203
|
+
caseInsensitive: z.ZodDefault<z.ZodBoolean>;
|
|
3204
|
+
key: z.ZodString;
|
|
3205
|
+
rows: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3206
|
+
value: z.ZodString;
|
|
3207
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3208
|
+
expiresAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
3209
|
+
}, z.core.$strip>>>;
|
|
3210
|
+
}, z.core.$strip>>>;
|
|
3211
|
+
}, z.core.$strip>;
|
|
3212
|
+
type PolicyPackDefinitions = z.infer<typeof PolicyPackDefinitions>;
|
|
3213
|
+
/** A pack name is a slug like a definition key; the version is free text (`1.0.0`, `2026-10`). */
|
|
3214
|
+
declare const PolicyPackName: z.ZodString;
|
|
3215
|
+
declare const PolicyPack: z.ZodObject<{
|
|
3216
|
+
name: z.ZodString;
|
|
3217
|
+
version: z.ZodString;
|
|
3218
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3219
|
+
definitions: z.ZodObject<{
|
|
3220
|
+
rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3221
|
+
name: z.ZodString;
|
|
3222
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3223
|
+
type: z.ZodEnum<{
|
|
3224
|
+
plugin: "plugin";
|
|
3225
|
+
comparison: "comparison";
|
|
3226
|
+
list_lookup: "list_lookup";
|
|
3227
|
+
score_threshold: "score_threshold";
|
|
3228
|
+
expression: "expression";
|
|
3229
|
+
velocity: "velocity";
|
|
3230
|
+
}>;
|
|
3231
|
+
config: z.ZodUnknown;
|
|
3232
|
+
severity: z.ZodDefault<z.ZodEnum<{
|
|
3233
|
+
info: "info";
|
|
3234
|
+
warn: "warn";
|
|
3235
|
+
block: "block";
|
|
3236
|
+
}>>;
|
|
3237
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
3238
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3239
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3240
|
+
key: z.ZodString;
|
|
3241
|
+
}, z.core.$strip>>>;
|
|
3242
|
+
ruleSets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3243
|
+
name: z.ZodString;
|
|
3244
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3245
|
+
useCase: z.ZodDefault<z.ZodEnum<{
|
|
3246
|
+
custom: "custom";
|
|
3247
|
+
onboarding: "onboarding";
|
|
3248
|
+
underwriting: "underwriting";
|
|
3249
|
+
monitoring: "monitoring";
|
|
3250
|
+
}>>;
|
|
3251
|
+
definition: z.ZodObject<{
|
|
3252
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
3253
|
+
ruleKey: z.ZodString;
|
|
3254
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3255
|
+
weightOverride: z.ZodOptional<z.ZodNumber>;
|
|
3256
|
+
shadow: z.ZodDefault<z.ZodBoolean>;
|
|
3257
|
+
}, z.core.$strip>>;
|
|
3258
|
+
policy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3259
|
+
mode: z.ZodLiteral<"max_severity">;
|
|
3260
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3261
|
+
mode: z.ZodLiteral<"sum_weights">;
|
|
3262
|
+
clamp: z.ZodDefault<z.ZodObject<{
|
|
3263
|
+
min: z.ZodDefault<z.ZodNumber>;
|
|
3264
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
3265
|
+
}, z.core.$strip>>;
|
|
3266
|
+
bands: z.ZodArray<z.ZodObject<{
|
|
3267
|
+
min: z.ZodNumber;
|
|
3268
|
+
max: z.ZodNumber;
|
|
3269
|
+
outcome: z.ZodEnum<{
|
|
3270
|
+
approve: "approve";
|
|
3271
|
+
reject: "reject";
|
|
3272
|
+
manual_review: "manual_review";
|
|
3273
|
+
}>;
|
|
3274
|
+
}, z.core.$strip>>;
|
|
3275
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3276
|
+
mode: z.ZodLiteral<"first_match">;
|
|
3277
|
+
default: z.ZodDefault<z.ZodEnum<{
|
|
3278
|
+
approve: "approve";
|
|
3279
|
+
reject: "reject";
|
|
3280
|
+
manual_review: "manual_review";
|
|
3281
|
+
}>>;
|
|
3282
|
+
}, z.core.$strip>], "mode">;
|
|
3283
|
+
}, z.core.$strip>;
|
|
3284
|
+
key: z.ZodString;
|
|
3285
|
+
}, z.core.$strip>>>;
|
|
3286
|
+
workflows: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3287
|
+
name: z.ZodString;
|
|
3288
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3289
|
+
trigger: z.ZodDefault<z.ZodEnum<{
|
|
3290
|
+
manual: "manual";
|
|
3291
|
+
"subject.created": "subject.created";
|
|
3292
|
+
event: "event";
|
|
3293
|
+
}>>;
|
|
3294
|
+
definition: z.ZodObject<{
|
|
3295
|
+
entryStepId: z.ZodString;
|
|
3296
|
+
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3297
|
+
id: z.ZodString;
|
|
3298
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3299
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3300
|
+
type: z.ZodLiteral<"evaluate_rules">;
|
|
3301
|
+
ruleKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3302
|
+
ruleSetKey: z.ZodOptional<z.ZodString>;
|
|
3303
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
3304
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3305
|
+
id: z.ZodString;
|
|
3306
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3307
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3308
|
+
type: z.ZodLiteral<"call_plugin">;
|
|
3309
|
+
plugin: z.ZodString;
|
|
3310
|
+
action: z.ZodString;
|
|
3311
|
+
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3312
|
+
inputMapping: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3313
|
+
outputKey: z.ZodString;
|
|
3314
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
3315
|
+
maximumAttempts: z.ZodOptional<z.ZodNumber>;
|
|
3316
|
+
initialIntervalSeconds: z.ZodOptional<z.ZodNumber>;
|
|
3317
|
+
}, z.core.$strip>>;
|
|
3318
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3319
|
+
id: z.ZodString;
|
|
3320
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3321
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3322
|
+
type: z.ZodLiteral<"wait_for_collection">;
|
|
3323
|
+
flowKey: z.ZodString;
|
|
3324
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
3325
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
3326
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3327
|
+
id: z.ZodString;
|
|
3328
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3329
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3330
|
+
type: z.ZodLiteral<"create_case">;
|
|
3331
|
+
caseType: z.ZodString;
|
|
3332
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
3333
|
+
low: "low";
|
|
3334
|
+
medium: "medium";
|
|
3335
|
+
high: "high";
|
|
3336
|
+
critical: "critical";
|
|
3337
|
+
}>>;
|
|
3338
|
+
slaHours: z.ZodOptional<z.ZodNumber>;
|
|
3339
|
+
outputKey: z.ZodDefault<z.ZodString>;
|
|
3340
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3341
|
+
id: z.ZodString;
|
|
3342
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3343
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3344
|
+
type: z.ZodLiteral<"emit_decision">;
|
|
3345
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
3346
|
+
from_rules: "from_rules";
|
|
3347
|
+
fixed: "fixed";
|
|
3348
|
+
}>>;
|
|
3349
|
+
rulesKey: z.ZodDefault<z.ZodString>;
|
|
3350
|
+
manualDecisionKey: z.ZodDefault<z.ZodString>;
|
|
3351
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
3352
|
+
approve: "approve";
|
|
3353
|
+
reject: "reject";
|
|
3354
|
+
manual_review: "manual_review";
|
|
3355
|
+
}>>;
|
|
3356
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3357
|
+
id: z.ZodString;
|
|
3358
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3359
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3360
|
+
type: z.ZodLiteral<"branch">;
|
|
3361
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
3362
|
+
when: z.ZodObject<{
|
|
3363
|
+
path: z.ZodString;
|
|
3364
|
+
op: z.ZodEnum<{
|
|
3365
|
+
in: "in";
|
|
3366
|
+
eq: "eq";
|
|
3367
|
+
neq: "neq";
|
|
3368
|
+
gt: "gt";
|
|
3369
|
+
gte: "gte";
|
|
3370
|
+
lt: "lt";
|
|
3371
|
+
lte: "lte";
|
|
3372
|
+
exists: "exists";
|
|
3373
|
+
}>;
|
|
3374
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
3375
|
+
}, z.core.$strip>;
|
|
3376
|
+
next: z.ZodString;
|
|
3377
|
+
}, z.core.$strip>>;
|
|
3378
|
+
default: z.ZodString;
|
|
3379
|
+
}, z.core.$strip>], "type">>;
|
|
3380
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
3381
|
+
positions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3382
|
+
x: z.ZodNumber;
|
|
3383
|
+
y: z.ZodNumber;
|
|
3384
|
+
}, z.core.$strip>>>;
|
|
3385
|
+
}, z.core.$strip>>;
|
|
3386
|
+
}, z.core.$strip>;
|
|
3387
|
+
key: z.ZodString;
|
|
3388
|
+
}, z.core.$strip>>>;
|
|
3389
|
+
collectionFlows: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3390
|
+
name: z.ZodString;
|
|
3391
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3392
|
+
definition: z.ZodObject<{
|
|
3393
|
+
entryStepId: z.ZodString;
|
|
3394
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
3395
|
+
id: z.ZodString;
|
|
3396
|
+
title: z.ZodString;
|
|
3397
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3398
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
3399
|
+
key: z.ZodString;
|
|
3400
|
+
label: z.ZodString;
|
|
3401
|
+
type: z.ZodEnum<{
|
|
3402
|
+
number: "number";
|
|
3403
|
+
boolean: "boolean";
|
|
3404
|
+
date: "date";
|
|
3405
|
+
file: "file";
|
|
3406
|
+
email: "email";
|
|
3407
|
+
text: "text";
|
|
3408
|
+
select: "select";
|
|
3409
|
+
}>;
|
|
3410
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
3411
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
3412
|
+
help: z.ZodOptional<z.ZodString>;
|
|
3413
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3414
|
+
value: z.ZodString;
|
|
3415
|
+
label: z.ZodString;
|
|
3416
|
+
}, z.core.$strip>>>;
|
|
3417
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
3418
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
3419
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
3420
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
3421
|
+
}, z.core.$strip>>;
|
|
3422
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
3423
|
+
path: z.ZodString;
|
|
3424
|
+
op: z.ZodEnum<{
|
|
3425
|
+
in: "in";
|
|
3426
|
+
eq: "eq";
|
|
3427
|
+
neq: "neq";
|
|
3428
|
+
gt: "gt";
|
|
3429
|
+
gte: "gte";
|
|
3430
|
+
lt: "lt";
|
|
3431
|
+
lte: "lte";
|
|
3432
|
+
exists: "exists";
|
|
3433
|
+
}>;
|
|
3434
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
3435
|
+
}, z.core.$strip>>;
|
|
3436
|
+
}, z.core.$strip>>;
|
|
3437
|
+
next: z.ZodOptional<z.ZodString>;
|
|
3438
|
+
branches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3439
|
+
when: z.ZodObject<{
|
|
3440
|
+
path: z.ZodString;
|
|
3441
|
+
op: z.ZodEnum<{
|
|
3442
|
+
in: "in";
|
|
3443
|
+
eq: "eq";
|
|
3444
|
+
neq: "neq";
|
|
3445
|
+
gt: "gt";
|
|
3446
|
+
gte: "gte";
|
|
3447
|
+
lt: "lt";
|
|
3448
|
+
lte: "lte";
|
|
3449
|
+
exists: "exists";
|
|
3450
|
+
}>;
|
|
3451
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
3452
|
+
}, z.core.$strip>;
|
|
3453
|
+
next: z.ZodString;
|
|
3454
|
+
}, z.core.$strip>>>;
|
|
3455
|
+
}, z.core.$strip>>;
|
|
3456
|
+
linkTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
3457
|
+
}, z.core.$strip>;
|
|
3458
|
+
key: z.ZodString;
|
|
3459
|
+
}, z.core.$strip>>>;
|
|
3460
|
+
lists: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3461
|
+
name: z.ZodString;
|
|
3462
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3463
|
+
kind: z.ZodEnum<{
|
|
3464
|
+
string: "string";
|
|
3465
|
+
number: "number";
|
|
3466
|
+
email: "email";
|
|
3467
|
+
country: "country";
|
|
3468
|
+
ip_cidr: "ip_cidr";
|
|
3469
|
+
}>;
|
|
3470
|
+
caseInsensitive: z.ZodDefault<z.ZodBoolean>;
|
|
3471
|
+
key: z.ZodString;
|
|
3472
|
+
rows: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3473
|
+
value: z.ZodString;
|
|
3474
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3475
|
+
expiresAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
3476
|
+
}, z.core.$strip>>>;
|
|
3477
|
+
}, z.core.$strip>>>;
|
|
3478
|
+
}, z.core.$strip>;
|
|
3479
|
+
}, z.core.$strip>;
|
|
3480
|
+
type PolicyPack = z.infer<typeof PolicyPack>;
|
|
3481
|
+
/** The pack as written in `pack.json`: defaults may be omitted. */
|
|
3482
|
+
type PolicyPackInput = z.input<typeof PolicyPack>;
|
|
3483
|
+
/** Items per group, for audit payloads and summaries. */
|
|
3484
|
+
declare function policyPackCounts(pack: PolicyPack): Record<PolicyPackGroup, number>;
|
|
3485
|
+
/** One item addressed as `<kind>:<key>`, the form `GET /definitions/export?keys=` takes. */
|
|
3486
|
+
declare const PolicyPackKeyRef: z.ZodObject<{
|
|
3487
|
+
kind: z.ZodEnum<{
|
|
3488
|
+
workflow: "workflow";
|
|
3489
|
+
rule: "rule";
|
|
3490
|
+
rule_set: "rule_set";
|
|
3491
|
+
collection_flow: "collection_flow";
|
|
3492
|
+
list: "list";
|
|
3493
|
+
}>;
|
|
3494
|
+
key: z.ZodString;
|
|
3495
|
+
}, z.core.$strip>;
|
|
3496
|
+
type PolicyPackKeyRef = z.infer<typeof PolicyPackKeyRef>;
|
|
3497
|
+
/** Parses `rule:country_allowed` into `{ kind, key }`; throws a `ZodError` on a bad reference. */
|
|
3498
|
+
declare function parsePolicyPackKeyRef(value: string): PolicyPackKeyRef;
|
|
3499
|
+
/** `<kind>:<key>` for every item of a pack, in group order. */
|
|
3500
|
+
declare function policyPackKeyRefs(pack: PolicyPack): string[];
|
|
3501
|
+
/** One definition version `POST /definitions/import` created (and published or queued for approval). */
|
|
3502
|
+
declare const PolicyPackImportedDefinition: z.ZodObject<{
|
|
3503
|
+
kind: z.ZodEnum<{
|
|
3504
|
+
workflow: "workflow";
|
|
3505
|
+
rule: "rule";
|
|
3506
|
+
rule_set: "rule_set";
|
|
3507
|
+
collection_flow: "collection_flow";
|
|
3508
|
+
}>;
|
|
3509
|
+
key: z.ZodString;
|
|
3510
|
+
id: z.ZodGUID;
|
|
3511
|
+
version: z.ZodNumber;
|
|
3512
|
+
status: z.ZodEnum<{
|
|
3513
|
+
draft: "draft";
|
|
3514
|
+
pending_approval: "pending_approval";
|
|
3515
|
+
published: "published";
|
|
3516
|
+
archived: "archived";
|
|
3517
|
+
}>;
|
|
3518
|
+
approvalId: z.ZodNullable<z.ZodGUID>;
|
|
3519
|
+
}, z.core.$strip>;
|
|
3520
|
+
type PolicyPackImportedDefinition = z.infer<typeof PolicyPackImportedDefinition>;
|
|
3521
|
+
/** One list the import created or updated, with the row counts `addEntries` reported. */
|
|
3522
|
+
declare const PolicyPackImportedList: z.ZodObject<{
|
|
3523
|
+
key: z.ZodString;
|
|
3524
|
+
id: z.ZodGUID;
|
|
3525
|
+
created: z.ZodBoolean;
|
|
3526
|
+
added: z.ZodNumber;
|
|
3527
|
+
skipped: z.ZodNumber;
|
|
3528
|
+
invalid: z.ZodNumber;
|
|
3529
|
+
}, z.core.$strip>;
|
|
3530
|
+
type PolicyPackImportedList = z.infer<typeof PolicyPackImportedList>;
|
|
3531
|
+
declare const PolicyPackImportResult: z.ZodObject<{
|
|
3532
|
+
name: z.ZodString;
|
|
3533
|
+
version: z.ZodString;
|
|
3534
|
+
publish: z.ZodBoolean;
|
|
3535
|
+
approvalRequired: z.ZodBoolean;
|
|
3536
|
+
definitions: z.ZodArray<z.ZodObject<{
|
|
3537
|
+
kind: z.ZodEnum<{
|
|
3538
|
+
workflow: "workflow";
|
|
3539
|
+
rule: "rule";
|
|
3540
|
+
rule_set: "rule_set";
|
|
3541
|
+
collection_flow: "collection_flow";
|
|
3542
|
+
}>;
|
|
3543
|
+
key: z.ZodString;
|
|
3544
|
+
id: z.ZodGUID;
|
|
3545
|
+
version: z.ZodNumber;
|
|
3546
|
+
status: z.ZodEnum<{
|
|
3547
|
+
draft: "draft";
|
|
3548
|
+
pending_approval: "pending_approval";
|
|
3549
|
+
published: "published";
|
|
3550
|
+
archived: "archived";
|
|
3551
|
+
}>;
|
|
3552
|
+
approvalId: z.ZodNullable<z.ZodGUID>;
|
|
3553
|
+
}, z.core.$strip>>;
|
|
3554
|
+
lists: z.ZodArray<z.ZodObject<{
|
|
3555
|
+
key: z.ZodString;
|
|
3556
|
+
id: z.ZodGUID;
|
|
3557
|
+
created: z.ZodBoolean;
|
|
3558
|
+
added: z.ZodNumber;
|
|
3559
|
+
skipped: z.ZodNumber;
|
|
3560
|
+
invalid: z.ZodNumber;
|
|
3561
|
+
}, z.core.$strip>>;
|
|
3562
|
+
}, z.core.$strip>;
|
|
3563
|
+
type PolicyPackImportResult = z.infer<typeof PolicyPackImportResult>;
|
|
3564
|
+
|
|
2666
3565
|
declare class AletheiaError extends Error {
|
|
2667
3566
|
readonly code: string;
|
|
2668
3567
|
readonly status: number;
|
|
@@ -2688,4 +3587,4 @@ declare class TimeoutError extends AletheiaError {
|
|
|
2688
3587
|
/** UUID v4. Uses the platform crypto so it works in Node, browsers and tests alike. */
|
|
2689
3588
|
declare function createId(): string;
|
|
2690
3589
|
|
|
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 };
|
|
3590
|
+
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, POLICY_PACK_GROUPS, POLICY_PACK_GROUP_KINDS, POLICY_PACK_MAX_LIST_ROWS, PluginCallback, PluginCallbackSignal, PluginCallbackStatus, PluginDefinition, PluginInvocation, PluginInvocationStatus, PolicyPack, PolicyPackCollectionFlow, PolicyPackDefinitions, type PolicyPackGroup, PolicyPackImportResult, PolicyPackImportedDefinition, PolicyPackImportedList, type PolicyPackInput, PolicyPackItemKind, PolicyPackKeyRef, PolicyPackList, PolicyPackName, PolicyPackRule, PolicyPackRuleSet, PolicyPackWorkflow, 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, parsePolicyPackKeyRef, policyPackCounts, policyPackKeyRefs, stepTargets, systemContext, temporalWorkflowId };
|