@handlebar/governance-schema 0.2.0 → 0.3.0-dev.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.
@@ -0,0 +1,136 @@
1
+ import { z } from "zod";
2
+ export declare const SensitiveDataDetectorSchema: z.ZodEnum<{
3
+ email: "email";
4
+ email_domain: "email_domain";
5
+ phone: "phone";
6
+ credit_card: "credit_card";
7
+ iban: "iban";
8
+ uk_nino: "uk_nino";
9
+ ip_address: "ip_address";
10
+ url: "url";
11
+ jwt: "jwt";
12
+ private_key: "private_key";
13
+ secret_key: "secret_key";
14
+ }>;
15
+ export type SensitiveDataDetector = z.infer<typeof SensitiveDataDetectorSchema>;
16
+ export declare const SensitiveDataSubConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
17
+ check: z.ZodLiteral<"domain">;
18
+ op: z.ZodEnum<{
19
+ in: "in";
20
+ eq: "eq";
21
+ neq: "neq";
22
+ endsWith: "endsWith";
23
+ }>;
24
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
25
+ }, z.core.$strict>, z.ZodObject<{
26
+ check: z.ZodLiteral<"tld">;
27
+ op: z.ZodEnum<{
28
+ in: "in";
29
+ eq: "eq";
30
+ neq: "neq";
31
+ }>;
32
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
33
+ }, z.core.$strict>, z.ZodObject<{
34
+ check: z.ZodLiteral<"scheme">;
35
+ op: z.ZodEnum<{
36
+ in: "in";
37
+ eq: "eq";
38
+ neq: "neq";
39
+ }>;
40
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
41
+ }, z.core.$strict>], "check">;
42
+ export type SensitiveDataSubCondition = z.infer<typeof SensitiveDataSubConditionSchema>;
43
+ declare const SensitiveDataDetectorEntrySchema: z.ZodObject<{
44
+ detector: z.ZodEnum<{
45
+ email: "email";
46
+ email_domain: "email_domain";
47
+ phone: "phone";
48
+ credit_card: "credit_card";
49
+ iban: "iban";
50
+ uk_nino: "uk_nino";
51
+ ip_address: "ip_address";
52
+ url: "url";
53
+ jwt: "jwt";
54
+ private_key: "private_key";
55
+ secret_key: "secret_key";
56
+ }>;
57
+ subCondition: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
58
+ check: z.ZodLiteral<"domain">;
59
+ op: z.ZodEnum<{
60
+ in: "in";
61
+ eq: "eq";
62
+ neq: "neq";
63
+ endsWith: "endsWith";
64
+ }>;
65
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
66
+ }, z.core.$strict>, z.ZodObject<{
67
+ check: z.ZodLiteral<"tld">;
68
+ op: z.ZodEnum<{
69
+ in: "in";
70
+ eq: "eq";
71
+ neq: "neq";
72
+ }>;
73
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
74
+ }, z.core.$strict>, z.ZodObject<{
75
+ check: z.ZodLiteral<"scheme">;
76
+ op: z.ZodEnum<{
77
+ in: "in";
78
+ eq: "eq";
79
+ neq: "neq";
80
+ }>;
81
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
82
+ }, z.core.$strict>], "check">>;
83
+ }, z.core.$strict>;
84
+ export type SensitiveDataDetectorEntry = z.infer<typeof SensitiveDataDetectorEntrySchema>;
85
+ export declare const SensitiveDataConditionSchema: z.ZodObject<{
86
+ kind: z.ZodLiteral<"sensitiveData">;
87
+ target: z.ZodLiteral<"toolArg">;
88
+ path: z.ZodOptional<z.ZodString>;
89
+ op: z.ZodDefault<z.ZodEnum<{
90
+ anyOf: "anyOf";
91
+ allOf: "allOf";
92
+ }>>;
93
+ detectors: z.ZodArray<z.ZodObject<{
94
+ detector: z.ZodEnum<{
95
+ email: "email";
96
+ email_domain: "email_domain";
97
+ phone: "phone";
98
+ credit_card: "credit_card";
99
+ iban: "iban";
100
+ uk_nino: "uk_nino";
101
+ ip_address: "ip_address";
102
+ url: "url";
103
+ jwt: "jwt";
104
+ private_key: "private_key";
105
+ secret_key: "secret_key";
106
+ }>;
107
+ subCondition: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
108
+ check: z.ZodLiteral<"domain">;
109
+ op: z.ZodEnum<{
110
+ in: "in";
111
+ eq: "eq";
112
+ neq: "neq";
113
+ endsWith: "endsWith";
114
+ }>;
115
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
116
+ }, z.core.$strict>, z.ZodObject<{
117
+ check: z.ZodLiteral<"tld">;
118
+ op: z.ZodEnum<{
119
+ in: "in";
120
+ eq: "eq";
121
+ neq: "neq";
122
+ }>;
123
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
124
+ }, z.core.$strict>, z.ZodObject<{
125
+ check: z.ZodLiteral<"scheme">;
126
+ op: z.ZodEnum<{
127
+ in: "in";
128
+ eq: "eq";
129
+ neq: "neq";
130
+ }>;
131
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
132
+ }, z.core.$strict>], "check">>;
133
+ }, z.core.$strict>>;
134
+ }, z.core.$strict>;
135
+ export type SensitiveDataCondition = z.infer<typeof SensitiveDataConditionSchema>;
136
+ export {};
@@ -11,11 +11,14 @@ declare const DaySchema: z.ZodEnum<{
11
11
  export type Day = z.infer<typeof DaySchema>;
12
12
  export declare const TimeGateConditionSchema: z.ZodObject<{
13
13
  kind: z.ZodLiteral<"timeGate">;
14
- timezone: z.ZodObject<{
14
+ timezone: z.ZodDiscriminatedUnion<[z.ZodObject<{
15
15
  source: z.ZodLiteral<"enduserTag">;
16
16
  tag: z.ZodString;
17
17
  fallback: z.ZodOptional<z.ZodLiteral<"org">>;
18
- }, z.core.$strict>;
18
+ }, z.core.$strict>, z.ZodObject<{
19
+ source: z.ZodLiteral<"static">;
20
+ tz: z.ZodString;
21
+ }, z.core.$strict>], "source">;
19
22
  windows: z.ZodArray<z.ZodObject<{
20
23
  days: z.ZodArray<z.ZodEnum<{
21
24
  mon: "mon";
@@ -4,9 +4,9 @@ export declare const ToolNameConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObje
4
4
  op: z.ZodEnum<{
5
5
  eq: "eq";
6
6
  neq: "neq";
7
+ endsWith: "endsWith";
7
8
  contains: "contains";
8
9
  startsWith: "startsWith";
9
- endsWith: "endsWith";
10
10
  glob: "glob";
11
11
  }>;
12
12
  value: z.ZodString;
@@ -16,18 +16,19 @@ export declare const ToolNameConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObje
16
16
  value: z.ZodArray<z.ZodString>;
17
17
  }, z.core.$strict>], "op">;
18
18
  export type ToolNameCondition = z.infer<typeof ToolNameConditionSchema>;
19
- export declare const ToolArgConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
19
+ export declare const ToolArgConditionSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
20
20
  kind: z.ZodLiteral<"toolArg">;
21
21
  type: z.ZodLiteral<"string">;
22
22
  op: z.ZodEnum<{
23
23
  in: "in";
24
24
  eq: "eq";
25
25
  neq: "neq";
26
+ endsWith: "endsWith";
26
27
  contains: "contains";
27
28
  startsWith: "startsWith";
28
- endsWith: "endsWith";
29
+ regex: "regex";
29
30
  }>;
30
- path: z.ZodString;
31
+ path: z.ZodOptional<z.ZodString>;
31
32
  value: z.ZodString;
32
33
  }, z.core.$strip>, z.ZodObject<{
33
34
  kind: z.ZodLiteral<"toolArg">;
@@ -40,15 +41,22 @@ export declare const ToolArgConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
40
41
  eq: "eq";
41
42
  neq: "neq";
42
43
  }>;
43
- path: z.ZodString;
44
+ path: z.ZodOptional<z.ZodString>;
44
45
  value: z.ZodNumber;
45
46
  }, z.core.$strip>, z.ZodObject<{
46
47
  kind: z.ZodLiteral<"toolArg">;
47
48
  type: z.ZodLiteral<"boolean">;
48
49
  op: z.ZodLiteral<"eq">;
49
- path: z.ZodString;
50
+ path: z.ZodOptional<z.ZodString>;
50
51
  value: z.ZodBoolean;
51
- }, z.core.$strip>], "type">;
52
+ }, z.core.$strip>], "type">, z.ZodObject<{
53
+ kind: z.ZodLiteral<"toolArg">;
54
+ op: z.ZodEnum<{
55
+ exists: "exists";
56
+ notExists: "notExists";
57
+ }>;
58
+ path: z.ZodString;
59
+ }, z.core.$strict>]>;
52
60
  export type ToolArgCondition = z.infer<typeof ToolArgConditionSchema>;
53
61
  export declare const ToolTagConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
54
62
  kind: z.ZodLiteral<"toolTag">;
@@ -64,10 +72,42 @@ export declare const ToolTagConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
64
72
  tags: z.ZodArray<z.ZodString>;
65
73
  }, z.core.$strict>], "op">;
66
74
  export type ToolTagCondition = z.infer<typeof ToolTagConditionSchema>;
75
+ export declare const SequenceEntrySchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
76
+ by: z.ZodLiteral<"toolName">;
77
+ patterns: z.ZodArray<z.ZodString>;
78
+ }, z.core.$strict>, z.ZodObject<{
79
+ by: z.ZodLiteral<"toolTag">;
80
+ tags: z.ZodArray<z.ZodString>;
81
+ op: z.ZodOptional<z.ZodEnum<{
82
+ anyOf: "anyOf";
83
+ allOf: "allOf";
84
+ }>>;
85
+ }, z.core.$strict>]>;
86
+ export type SequenceEntry = z.infer<typeof SequenceEntrySchema>;
67
87
  export declare const SequenceConditionSchema: z.ZodObject<{
68
88
  kind: z.ZodLiteral<"sequence">;
69
- mustHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
- mustNotHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
89
+ mustHaveCalled: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
90
+ by: z.ZodLiteral<"toolName">;
91
+ patterns: z.ZodArray<z.ZodString>;
92
+ }, z.core.$strict>, z.ZodObject<{
93
+ by: z.ZodLiteral<"toolTag">;
94
+ tags: z.ZodArray<z.ZodString>;
95
+ op: z.ZodOptional<z.ZodEnum<{
96
+ anyOf: "anyOf";
97
+ allOf: "allOf";
98
+ }>>;
99
+ }, z.core.$strict>]>>>;
100
+ mustNotHaveCalled: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
101
+ by: z.ZodLiteral<"toolName">;
102
+ patterns: z.ZodArray<z.ZodString>;
103
+ }, z.core.$strict>, z.ZodObject<{
104
+ by: z.ZodLiteral<"toolTag">;
105
+ tags: z.ZodArray<z.ZodString>;
106
+ op: z.ZodOptional<z.ZodEnum<{
107
+ anyOf: "anyOf";
108
+ allOf: "allOf";
109
+ }>>;
110
+ }, z.core.$strict>]>>>;
71
111
  }, z.core.$strict>;
72
112
  export type SequenceCondition = z.infer<typeof SequenceConditionSchema>;
73
113
  export declare const MaxCallsSelectorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -88,5 +128,11 @@ export declare const MaxCallsConditionSchema: z.ZodObject<{
88
128
  tags: z.ZodArray<z.ZodString>;
89
129
  }, z.core.$strict>], "by">;
90
130
  max: z.ZodNumber;
131
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
132
+ per: z.ZodOptional<z.ZodEnum<{
133
+ agent: "agent";
134
+ agent_user: "agent_user";
135
+ }>>;
136
+ tagFilter: z.ZodOptional<z.ZodArray<z.ZodString>>;
91
137
  }, z.core.$strict>;
92
138
  export type MaxCallsCondition = z.infer<typeof MaxCallsConditionSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handlebar/governance-schema",
3
- "version": "0.2.0",
3
+ "version": "0.3.0-dev.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",