@libreflare/worker-runtime 0.4.7 → 0.4.9
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/README.md +4 -0
- package/dist/rule-evaluator/field-availability.d.ts +39 -0
- package/dist/rule-evaluator/field-availability.d.ts.map +1 -0
- package/dist/rule-evaluator/field-availability.js +148 -0
- package/dist/rule-evaluator/field-availability.js.map +1 -0
- package/dist/rule-evaluator/field-descriptions.d.ts +86 -0
- package/dist/rule-evaluator/field-descriptions.d.ts.map +1 -0
- package/dist/rule-evaluator/field-descriptions.generated.d.ts +1193 -0
- package/dist/rule-evaluator/field-descriptions.generated.d.ts.map +1 -0
- package/dist/rule-evaluator/field-descriptions.generated.js +2841 -0
- package/dist/rule-evaluator/field-descriptions.generated.js.map +1 -0
- package/dist/rule-evaluator/field-descriptions.js +107 -0
- package/dist/rule-evaluator/field-descriptions.js.map +1 -0
- package/dist/rule-evaluator/fields.d.ts.map +1 -1
- package/dist/rule-evaluator/fields.js +1 -3
- package/dist/rule-evaluator/fields.js.map +1 -1
- package/dist/rule-evaluator/function-descriptions.d.ts +75 -0
- package/dist/rule-evaluator/function-descriptions.d.ts.map +1 -0
- package/dist/rule-evaluator/function-descriptions.generated.d.ts +498 -0
- package/dist/rule-evaluator/function-descriptions.generated.d.ts.map +1 -0
- package/dist/rule-evaluator/function-descriptions.generated.js +866 -0
- package/dist/rule-evaluator/function-descriptions.generated.js.map +1 -0
- package/dist/rule-evaluator/function-descriptions.js +25 -0
- package/dist/rule-evaluator/function-descriptions.js.map +1 -0
- package/dist/rule-evaluator/validation.d.ts +2 -6
- package/dist/rule-evaluator/validation.d.ts.map +1 -1
- package/dist/rule-evaluator/validation.js +12 -141
- package/dist/rule-evaluator/validation.js.map +1 -1
- package/dist/rule-evaluator.d.ts +4 -0
- package/dist/rule-evaluator.d.ts.map +1 -1
- package/dist/rule-evaluator.js +2 -0
- package/dist/rule-evaluator.js.map +1 -1
- package/package.json +7 -1
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
export declare const RULE_EXPRESSION_FUNCTION_REFERENCE_URL = "https://developers.cloudflare.com/ruleset-engine/rules-language/functions/index.md";
|
|
2
|
+
export declare const RULE_EXPRESSION_FUNCTION_DESCRIPTIONS: {
|
|
3
|
+
readonly all: {
|
|
4
|
+
readonly summary: "Returns true when the comparison operator in the argument returns true for all values in the argument array. Returns false otherwise.";
|
|
5
|
+
readonly signature: "all(Array<Boolean>): Boolean";
|
|
6
|
+
readonly returnType: "Boolean";
|
|
7
|
+
readonly parameters: readonly [{
|
|
8
|
+
readonly name: "comparison";
|
|
9
|
+
readonly types: readonly ["Array<Boolean>"];
|
|
10
|
+
readonly role: "array-comparison";
|
|
11
|
+
}];
|
|
12
|
+
readonly categories: readonly ["Transformation functions"];
|
|
13
|
+
};
|
|
14
|
+
readonly any: {
|
|
15
|
+
readonly summary: "Returns true when the comparison operator in the argument returns true for any of the values in the argument array. Returns false otherwise.";
|
|
16
|
+
readonly signature: "any(Array<Boolean>): Boolean";
|
|
17
|
+
readonly returnType: "Boolean";
|
|
18
|
+
readonly parameters: readonly [{
|
|
19
|
+
readonly name: "comparison";
|
|
20
|
+
readonly types: readonly ["Array<Boolean>"];
|
|
21
|
+
readonly role: "array-comparison";
|
|
22
|
+
}];
|
|
23
|
+
readonly categories: readonly ["Transformation functions"];
|
|
24
|
+
};
|
|
25
|
+
readonly bit_slice: {
|
|
26
|
+
readonly summary: "This function looks for matches on a given slice of bits.";
|
|
27
|
+
readonly signature: "bit_slice(protocol String, offset_start Number, offset_end Number): Number";
|
|
28
|
+
readonly returnType: "Number";
|
|
29
|
+
readonly parameters: readonly [{
|
|
30
|
+
readonly name: "protocol";
|
|
31
|
+
readonly types: readonly ["String"];
|
|
32
|
+
readonly literal: true;
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "offset_start";
|
|
35
|
+
readonly types: readonly ["Number"];
|
|
36
|
+
readonly literal: true;
|
|
37
|
+
readonly min: 0;
|
|
38
|
+
readonly max: 2040;
|
|
39
|
+
}, {
|
|
40
|
+
readonly name: "offset_end";
|
|
41
|
+
readonly types: readonly ["Number"];
|
|
42
|
+
readonly literal: true;
|
|
43
|
+
readonly maxOffsetFromPrevious: 32;
|
|
44
|
+
}];
|
|
45
|
+
readonly categories: readonly ["Cloudflare Network Firewall Functions"];
|
|
46
|
+
};
|
|
47
|
+
readonly cidr: {
|
|
48
|
+
readonly summary: "Returns the network address corresponding to an IP address (IPv4 or IPv6), given the provided IPv4 and IPv6 network bits (which determine the corresponding netmasks).";
|
|
49
|
+
readonly signature: "cidr(address IP address, ipv4_network_bits Integer, ipv6_network_bits Integer): IP address";
|
|
50
|
+
readonly returnType: "IP address";
|
|
51
|
+
readonly parameters: readonly [{
|
|
52
|
+
readonly name: "address";
|
|
53
|
+
readonly types: readonly ["IP address"];
|
|
54
|
+
readonly field: true;
|
|
55
|
+
readonly role: "field";
|
|
56
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "ipv4_network_bits";
|
|
59
|
+
readonly types: readonly ["Integer"];
|
|
60
|
+
readonly literal: true;
|
|
61
|
+
readonly min: 1;
|
|
62
|
+
readonly max: 32;
|
|
63
|
+
}, {
|
|
64
|
+
readonly name: "ipv6_network_bits";
|
|
65
|
+
readonly types: readonly ["Integer"];
|
|
66
|
+
readonly literal: true;
|
|
67
|
+
readonly min: 1;
|
|
68
|
+
readonly max: 128;
|
|
69
|
+
}];
|
|
70
|
+
readonly categories: readonly ["Transformation functions"];
|
|
71
|
+
};
|
|
72
|
+
readonly cidr6: {
|
|
73
|
+
readonly summary: "Returns the IPv6 network address corresponding to an IPv6 address, given the provided network bits (which determine the netmask). If you provide an IPv4 address in the first parameter, it will be returned unchanged.";
|
|
74
|
+
readonly signature: "cidr6(address IP address, ipv6_network_bits Integer): IP address";
|
|
75
|
+
readonly returnType: "IP address";
|
|
76
|
+
readonly parameters: readonly [{
|
|
77
|
+
readonly name: "address";
|
|
78
|
+
readonly types: readonly ["IP address"];
|
|
79
|
+
readonly field: true;
|
|
80
|
+
readonly role: "field";
|
|
81
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "ipv6_network_bits";
|
|
84
|
+
readonly types: readonly ["Integer"];
|
|
85
|
+
readonly literal: true;
|
|
86
|
+
readonly min: 1;
|
|
87
|
+
readonly max: 128;
|
|
88
|
+
}];
|
|
89
|
+
readonly categories: readonly ["Transformation functions"];
|
|
90
|
+
};
|
|
91
|
+
readonly concat: {
|
|
92
|
+
readonly summary: "Takes a comma-separated list of values. Concatenates the argument values into a single String or array.";
|
|
93
|
+
readonly signature: "concat(value String | Bytes | Array, ...): String | Array";
|
|
94
|
+
readonly returnType: "String | Array";
|
|
95
|
+
readonly parameters: readonly [{
|
|
96
|
+
readonly name: "value";
|
|
97
|
+
readonly types: readonly ["String", "Bytes", "Array"];
|
|
98
|
+
readonly variadic: true;
|
|
99
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar", "array", "map-array"];
|
|
100
|
+
}];
|
|
101
|
+
readonly categories: readonly ["Transformation functions"];
|
|
102
|
+
};
|
|
103
|
+
readonly decode_base64: {
|
|
104
|
+
readonly summary: "Decodes a Base64-encoded String specified in source.";
|
|
105
|
+
readonly signature: "decode_base64(source String): String";
|
|
106
|
+
readonly returnType: "String";
|
|
107
|
+
readonly parameters: readonly [{
|
|
108
|
+
readonly name: "source";
|
|
109
|
+
readonly types: readonly ["String"];
|
|
110
|
+
readonly field: true;
|
|
111
|
+
readonly role: "field";
|
|
112
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar", "array", "map-array"];
|
|
113
|
+
}];
|
|
114
|
+
readonly categories: readonly ["Transformation functions"];
|
|
115
|
+
};
|
|
116
|
+
readonly encode_base64: {
|
|
117
|
+
readonly summary: "Encodes an input string or byte array to Base64 format.";
|
|
118
|
+
readonly signature: "encode_base64(input String | Bytes [, flags String]): String";
|
|
119
|
+
readonly returnType: "String";
|
|
120
|
+
readonly parameters: readonly [{
|
|
121
|
+
readonly name: "input";
|
|
122
|
+
readonly types: readonly ["String", "Bytes"];
|
|
123
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar", "array", "map-array"];
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "flags";
|
|
126
|
+
readonly types: readonly ["String"];
|
|
127
|
+
readonly optional: true;
|
|
128
|
+
readonly literal: true;
|
|
129
|
+
}];
|
|
130
|
+
readonly categories: readonly ["Transformation functions"];
|
|
131
|
+
};
|
|
132
|
+
readonly ends_with: {
|
|
133
|
+
readonly summary: "Returns true when the source ends with a given substring. Returns false otherwise. The source cannot be a literal value (like \"foo\").";
|
|
134
|
+
readonly signature: "ends_with(source String, substring String): Boolean";
|
|
135
|
+
readonly returnType: "Boolean";
|
|
136
|
+
readonly parameters: readonly [{
|
|
137
|
+
readonly name: "source";
|
|
138
|
+
readonly types: readonly ["String"];
|
|
139
|
+
readonly notLiteral: true;
|
|
140
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
141
|
+
}, {
|
|
142
|
+
readonly name: "substring";
|
|
143
|
+
readonly types: readonly ["String"];
|
|
144
|
+
}];
|
|
145
|
+
readonly categories: readonly ["Transformation functions"];
|
|
146
|
+
};
|
|
147
|
+
readonly has_key: {
|
|
148
|
+
readonly summary: "Returns true if the key specified in the second argument, which can be a literal or a dynamic string, is an existing key in the map provided as first argument; returns false otherwise.";
|
|
149
|
+
readonly signature: "has_key(map: Map<T>, key: String): Boolean";
|
|
150
|
+
readonly returnType: "Boolean";
|
|
151
|
+
readonly parameters: readonly [{
|
|
152
|
+
readonly name: "map";
|
|
153
|
+
readonly types: readonly ["Map<T>"];
|
|
154
|
+
readonly role: "map";
|
|
155
|
+
readonly acceptsFieldUsageKinds: readonly ["map", "map-array"];
|
|
156
|
+
}, {
|
|
157
|
+
readonly name: "key";
|
|
158
|
+
readonly types: readonly ["String"];
|
|
159
|
+
}];
|
|
160
|
+
readonly categories: readonly ["Transformation functions"];
|
|
161
|
+
};
|
|
162
|
+
readonly has_value: {
|
|
163
|
+
readonly summary: "Returns true if the value specified in the second argument, which can be a literal or a dynamic value, is found in the collection provided as first argument; returns false otherwise.";
|
|
164
|
+
readonly signature: "has_value(collection: Map<T> | Array<T>, value: T): Boolean";
|
|
165
|
+
readonly returnType: "Boolean";
|
|
166
|
+
readonly parameters: readonly [{
|
|
167
|
+
readonly name: "collection";
|
|
168
|
+
readonly types: readonly ["Map<T>", "Array<T>"];
|
|
169
|
+
readonly role: "collection";
|
|
170
|
+
readonly acceptsFieldUsageKinds: readonly ["array", "map", "map-array"];
|
|
171
|
+
}, {
|
|
172
|
+
readonly name: "value";
|
|
173
|
+
readonly types: readonly ["T"];
|
|
174
|
+
}];
|
|
175
|
+
readonly categories: readonly ["Transformation functions"];
|
|
176
|
+
};
|
|
177
|
+
readonly is_jwt_present: {
|
|
178
|
+
readonly summary: "Returns true if the request has a token as configured in the token configuration with the ID token_configuration_id.";
|
|
179
|
+
readonly signature: "is_jwt_present(token_configuration_id: String): Boolean";
|
|
180
|
+
readonly returnType: "Boolean";
|
|
181
|
+
readonly parameters: readonly [{
|
|
182
|
+
readonly name: "token_configuration_id";
|
|
183
|
+
readonly types: readonly ["String"];
|
|
184
|
+
readonly literal: true;
|
|
185
|
+
}];
|
|
186
|
+
readonly categories: readonly ["Transformation functions"];
|
|
187
|
+
};
|
|
188
|
+
readonly is_jwt_valid: {
|
|
189
|
+
readonly summary: "Returns true if the request has a valid token according to the token configuration with the ID token_configuration_id.";
|
|
190
|
+
readonly signature: "is_jwt_valid(token_configuration_id: String): Boolean";
|
|
191
|
+
readonly returnType: "Boolean";
|
|
192
|
+
readonly parameters: readonly [{
|
|
193
|
+
readonly name: "token_configuration_id";
|
|
194
|
+
readonly types: readonly ["String"];
|
|
195
|
+
readonly literal: true;
|
|
196
|
+
}];
|
|
197
|
+
readonly categories: readonly ["Transformation functions"];
|
|
198
|
+
};
|
|
199
|
+
readonly is_timed_hmac_valid_v0: {
|
|
200
|
+
readonly summary: "Validates hash-based message authentication code (HMAC) tokens in a rule expression.";
|
|
201
|
+
readonly signature: "is_timed_hmac_valid_v0(Key String literal, MessageMAC String field, ttl Integer literal, currentTimeStamp Integer, lengthOfSeparator Integer literal optional, flags String literal optional): Boolean";
|
|
202
|
+
readonly returnType: "Boolean";
|
|
203
|
+
readonly parameters: readonly [{
|
|
204
|
+
readonly name: "Key";
|
|
205
|
+
readonly types: readonly ["String"];
|
|
206
|
+
readonly literal: true;
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "MessageMAC";
|
|
209
|
+
readonly types: readonly ["String"];
|
|
210
|
+
readonly field: true;
|
|
211
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
212
|
+
}, {
|
|
213
|
+
readonly name: "ttl";
|
|
214
|
+
readonly types: readonly ["Integer"];
|
|
215
|
+
readonly literal: true;
|
|
216
|
+
}, {
|
|
217
|
+
readonly name: "currentTimeStamp";
|
|
218
|
+
readonly types: readonly ["Integer"];
|
|
219
|
+
}, {
|
|
220
|
+
readonly name: "lengthOfSeparator";
|
|
221
|
+
readonly types: readonly ["Integer"];
|
|
222
|
+
readonly optional: true;
|
|
223
|
+
readonly literal: true;
|
|
224
|
+
readonly defaultValue: 0;
|
|
225
|
+
}, {
|
|
226
|
+
readonly name: "flags";
|
|
227
|
+
readonly types: readonly ["String"];
|
|
228
|
+
readonly optional: true;
|
|
229
|
+
readonly literal: true;
|
|
230
|
+
}];
|
|
231
|
+
readonly categories: readonly ["HMAC validation"];
|
|
232
|
+
};
|
|
233
|
+
readonly join: {
|
|
234
|
+
readonly summary: "Returns a string which is the concatenation of the strings in items with the separator between each item.";
|
|
235
|
+
readonly signature: "join(items Array<String>, separator String): String";
|
|
236
|
+
readonly returnType: "String";
|
|
237
|
+
readonly parameters: readonly [{
|
|
238
|
+
readonly name: "items";
|
|
239
|
+
readonly types: readonly ["Array<String>"];
|
|
240
|
+
readonly role: "collection";
|
|
241
|
+
readonly acceptsFieldUsageKinds: readonly ["array"];
|
|
242
|
+
}, {
|
|
243
|
+
readonly name: "separator";
|
|
244
|
+
readonly types: readonly ["String"];
|
|
245
|
+
readonly literal: true;
|
|
246
|
+
}];
|
|
247
|
+
readonly categories: readonly ["Transformation functions"];
|
|
248
|
+
};
|
|
249
|
+
readonly len: {
|
|
250
|
+
readonly summary: "Returns the byte length of a String or Bytes value, or the number of elements in an array.";
|
|
251
|
+
readonly signature: "len(String | Bytes | Array): Integer";
|
|
252
|
+
readonly returnType: "Integer";
|
|
253
|
+
readonly parameters: readonly [{
|
|
254
|
+
readonly name: "value";
|
|
255
|
+
readonly types: readonly ["String", "Bytes", "Array"];
|
|
256
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar", "array", "map-array"];
|
|
257
|
+
}];
|
|
258
|
+
readonly categories: readonly ["Transformation functions"];
|
|
259
|
+
};
|
|
260
|
+
readonly lookup_json_integer: {
|
|
261
|
+
readonly summary: "Returns the integer value associated with the supplied key in field.";
|
|
262
|
+
readonly signature: "lookup_json_integer(field String, key String | Integer, key String | Integer optional, ...): Integer";
|
|
263
|
+
readonly returnType: "Integer";
|
|
264
|
+
readonly parameters: readonly [{
|
|
265
|
+
readonly name: "field";
|
|
266
|
+
readonly types: readonly ["String"];
|
|
267
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
268
|
+
}, {
|
|
269
|
+
readonly name: "key";
|
|
270
|
+
readonly types: readonly ["String", "Integer"];
|
|
271
|
+
readonly variadic: true;
|
|
272
|
+
}];
|
|
273
|
+
readonly categories: readonly ["Transformation functions"];
|
|
274
|
+
};
|
|
275
|
+
readonly lookup_json_string: {
|
|
276
|
+
readonly summary: "Returns the string value associated with the supplied key in field.";
|
|
277
|
+
readonly signature: "lookup_json_string(field String, key String | Integer, key String | Integer optional, ...): String";
|
|
278
|
+
readonly returnType: "String";
|
|
279
|
+
readonly parameters: readonly [{
|
|
280
|
+
readonly name: "field";
|
|
281
|
+
readonly types: readonly ["String"];
|
|
282
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
283
|
+
}, {
|
|
284
|
+
readonly name: "key";
|
|
285
|
+
readonly types: readonly ["String", "Integer"];
|
|
286
|
+
readonly variadic: true;
|
|
287
|
+
}];
|
|
288
|
+
readonly categories: readonly ["Transformation functions"];
|
|
289
|
+
};
|
|
290
|
+
readonly lower: {
|
|
291
|
+
readonly summary: "Converts a string field to lowercase. Only uppercase ASCII bytes are converted. All other bytes are unaffected.";
|
|
292
|
+
readonly signature: "lower(String): String";
|
|
293
|
+
readonly returnType: "String";
|
|
294
|
+
readonly parameters: readonly [{
|
|
295
|
+
readonly name: "value";
|
|
296
|
+
readonly types: readonly ["String"];
|
|
297
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar", "array", "map-array"];
|
|
298
|
+
}];
|
|
299
|
+
readonly categories: readonly ["Transformation functions"];
|
|
300
|
+
};
|
|
301
|
+
readonly regex_replace: {
|
|
302
|
+
readonly summary: "Replaces a part of a source string matched by a regular expression with a replacement string, returning the result. The replacement string can contain references to regular expression capture groups (for example, ${1} and ${2}), up to eight replacement references.";
|
|
303
|
+
readonly signature: "regex_replace(source String, regular_expression String, replacement String): String";
|
|
304
|
+
readonly returnType: "String";
|
|
305
|
+
readonly parameters: readonly [{
|
|
306
|
+
readonly name: "source";
|
|
307
|
+
readonly types: readonly ["String"];
|
|
308
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
309
|
+
}, {
|
|
310
|
+
readonly name: "regular_expression";
|
|
311
|
+
readonly types: readonly ["String"];
|
|
312
|
+
readonly literal: true;
|
|
313
|
+
}, {
|
|
314
|
+
readonly name: "replacement";
|
|
315
|
+
readonly types: readonly ["String"];
|
|
316
|
+
readonly literal: true;
|
|
317
|
+
}];
|
|
318
|
+
readonly categories: readonly ["Transformation functions"];
|
|
319
|
+
};
|
|
320
|
+
readonly remove_bytes: {
|
|
321
|
+
readonly summary: "Returns a new byte array with all the occurrences of the given bytes removed.";
|
|
322
|
+
readonly signature: "remove_bytes(source Bytes, bytes Bytes): Bytes";
|
|
323
|
+
readonly returnType: "Bytes";
|
|
324
|
+
readonly parameters: readonly [{
|
|
325
|
+
readonly name: "source";
|
|
326
|
+
readonly types: readonly ["Bytes"];
|
|
327
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
328
|
+
}, {
|
|
329
|
+
readonly name: "bytes";
|
|
330
|
+
readonly types: readonly ["Bytes"];
|
|
331
|
+
readonly literal: true;
|
|
332
|
+
}];
|
|
333
|
+
readonly categories: readonly ["Transformation functions"];
|
|
334
|
+
};
|
|
335
|
+
readonly remove_query_args: {
|
|
336
|
+
readonly summary: "Removes one or more query string parameters from a URI query string. Returns a string without the specified parameters.";
|
|
337
|
+
readonly signature: "remove_query_args(field String, query_param1 String, query_param2 String, ...): String";
|
|
338
|
+
readonly returnType: "String";
|
|
339
|
+
readonly parameters: readonly [{
|
|
340
|
+
readonly name: "field";
|
|
341
|
+
readonly types: readonly ["String"];
|
|
342
|
+
readonly field: true;
|
|
343
|
+
readonly role: "field";
|
|
344
|
+
readonly allowedFields: readonly ["http.request.uri.query", "raw.http.request.uri.query"];
|
|
345
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
346
|
+
}, {
|
|
347
|
+
readonly name: "query_param";
|
|
348
|
+
readonly types: readonly ["String"];
|
|
349
|
+
readonly variadic: true;
|
|
350
|
+
readonly literal: true;
|
|
351
|
+
}];
|
|
352
|
+
readonly categories: readonly ["Transformation functions"];
|
|
353
|
+
};
|
|
354
|
+
readonly sha256: {
|
|
355
|
+
readonly summary: "Computes the SHA-256 cryptographic hash of the input string or byte array. Returns a 32-byte hash value.";
|
|
356
|
+
readonly signature: "sha256(input String | Bytes): Bytes";
|
|
357
|
+
readonly returnType: "Bytes";
|
|
358
|
+
readonly parameters: readonly [{
|
|
359
|
+
readonly name: "input";
|
|
360
|
+
readonly types: readonly ["String", "Bytes"];
|
|
361
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar", "array", "map-array"];
|
|
362
|
+
}];
|
|
363
|
+
readonly categories: readonly ["Transformation functions"];
|
|
364
|
+
};
|
|
365
|
+
readonly split: {
|
|
366
|
+
readonly summary: "Splits the input string into an array of strings by breaking the initial string at every occurrence of the separator string. The returned array will contain at most limit number of elements.";
|
|
367
|
+
readonly signature: "split(input String, separator String, limit Integer): Array<String>";
|
|
368
|
+
readonly returnType: "Array<String>";
|
|
369
|
+
readonly parameters: readonly [{
|
|
370
|
+
readonly name: "input";
|
|
371
|
+
readonly types: readonly ["String"];
|
|
372
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
373
|
+
}, {
|
|
374
|
+
readonly name: "separator";
|
|
375
|
+
readonly types: readonly ["String"];
|
|
376
|
+
readonly literal: true;
|
|
377
|
+
readonly nonEmpty: true;
|
|
378
|
+
}, {
|
|
379
|
+
readonly name: "limit";
|
|
380
|
+
readonly types: readonly ["Integer"];
|
|
381
|
+
readonly literal: true;
|
|
382
|
+
readonly min: 1;
|
|
383
|
+
readonly max: 128;
|
|
384
|
+
}];
|
|
385
|
+
readonly categories: readonly ["Transformation functions"];
|
|
386
|
+
};
|
|
387
|
+
readonly starts_with: {
|
|
388
|
+
readonly summary: "Returns true when the source starts with a given substring. Returns false otherwise. The source cannot be a literal value (like \"foo\").";
|
|
389
|
+
readonly signature: "starts_with(source String, substring String): Boolean";
|
|
390
|
+
readonly returnType: "Boolean";
|
|
391
|
+
readonly parameters: readonly [{
|
|
392
|
+
readonly name: "source";
|
|
393
|
+
readonly types: readonly ["String"];
|
|
394
|
+
readonly notLiteral: true;
|
|
395
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
396
|
+
}, {
|
|
397
|
+
readonly name: "substring";
|
|
398
|
+
readonly types: readonly ["String"];
|
|
399
|
+
}];
|
|
400
|
+
readonly categories: readonly ["Transformation functions"];
|
|
401
|
+
};
|
|
402
|
+
readonly substring: {
|
|
403
|
+
readonly summary: "Returns part of the field value (the value of a String or Bytes field) from the start byte index up to (but excluding) the end byte index. The first byte in field has index 0. If you do not provide the optional end index, the function returns the part of the string from start index to the end of the string.";
|
|
404
|
+
readonly signature: "substring(field String | Bytes, start Integer, end Integer optional): String";
|
|
405
|
+
readonly returnType: "String";
|
|
406
|
+
readonly parameters: readonly [{
|
|
407
|
+
readonly name: "field";
|
|
408
|
+
readonly types: readonly ["String", "Bytes"];
|
|
409
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
410
|
+
}, {
|
|
411
|
+
readonly name: "start";
|
|
412
|
+
readonly types: readonly ["Integer"];
|
|
413
|
+
}, {
|
|
414
|
+
readonly name: "end";
|
|
415
|
+
readonly types: readonly ["Integer"];
|
|
416
|
+
readonly optional: true;
|
|
417
|
+
}];
|
|
418
|
+
readonly categories: readonly ["Transformation functions"];
|
|
419
|
+
};
|
|
420
|
+
readonly to_string: {
|
|
421
|
+
readonly summary: "Returns the string representation of an Integer, Boolean, or IP address value.";
|
|
422
|
+
readonly signature: "to_string(Integer | Boolean | IP address): String";
|
|
423
|
+
readonly returnType: "String";
|
|
424
|
+
readonly parameters: readonly [{
|
|
425
|
+
readonly name: "value";
|
|
426
|
+
readonly types: readonly ["Integer", "Boolean", "IP address"];
|
|
427
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
428
|
+
}];
|
|
429
|
+
readonly categories: readonly ["Transformation functions"];
|
|
430
|
+
};
|
|
431
|
+
readonly upper: {
|
|
432
|
+
readonly summary: "Converts a string field to uppercase. Only lowercase ASCII bytes are converted. All other bytes are unaffected.";
|
|
433
|
+
readonly signature: "upper(String): String";
|
|
434
|
+
readonly returnType: "String";
|
|
435
|
+
readonly parameters: readonly [{
|
|
436
|
+
readonly name: "value";
|
|
437
|
+
readonly types: readonly ["String"];
|
|
438
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar", "array", "map-array"];
|
|
439
|
+
}];
|
|
440
|
+
readonly categories: readonly ["Transformation functions"];
|
|
441
|
+
};
|
|
442
|
+
readonly url_decode: {
|
|
443
|
+
readonly summary: "Decodes a URL-formatted string.";
|
|
444
|
+
readonly signature: "url_decode(source String, options String optional): String";
|
|
445
|
+
readonly returnType: "String";
|
|
446
|
+
readonly parameters: readonly [{
|
|
447
|
+
readonly name: "source";
|
|
448
|
+
readonly types: readonly ["String"];
|
|
449
|
+
readonly field: true;
|
|
450
|
+
readonly role: "field";
|
|
451
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar", "array", "map-array"];
|
|
452
|
+
}, {
|
|
453
|
+
readonly name: "options";
|
|
454
|
+
readonly types: readonly ["String"];
|
|
455
|
+
readonly optional: true;
|
|
456
|
+
readonly literal: true;
|
|
457
|
+
}];
|
|
458
|
+
readonly categories: readonly ["Transformation functions"];
|
|
459
|
+
};
|
|
460
|
+
readonly uuidv4: {
|
|
461
|
+
readonly summary: "Generates a random UUIDv4 (Universally Unique Identifier, version 4) based on the given argument (a source of randomness). To obtain an array of random bytes, use the cf.random_seed field.";
|
|
462
|
+
readonly signature: "uuidv4(source Bytes): String";
|
|
463
|
+
readonly returnType: "String";
|
|
464
|
+
readonly parameters: readonly [{
|
|
465
|
+
readonly name: "source";
|
|
466
|
+
readonly types: readonly ["Bytes"];
|
|
467
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
468
|
+
}];
|
|
469
|
+
readonly categories: readonly ["Transformation functions"];
|
|
470
|
+
};
|
|
471
|
+
readonly wildcard_replace: {
|
|
472
|
+
readonly summary: "Replaces a source string, matched by a literal with zero or more wildcard metacharacters, with a replacement string, returning the result. The replacement string can contain references to wildcard capture groups (for example, ${1} and ${2}), up to eight replacement references.";
|
|
473
|
+
readonly signature: "wildcard_replace(source Bytes, wildcard_pattern Bytes, replacement Bytes, flags Bytes optional): String";
|
|
474
|
+
readonly returnType: "String";
|
|
475
|
+
readonly parameters: readonly [{
|
|
476
|
+
readonly name: "source";
|
|
477
|
+
readonly types: readonly ["Bytes"];
|
|
478
|
+
readonly field: true;
|
|
479
|
+
readonly role: "field";
|
|
480
|
+
readonly acceptsFieldUsageKinds: readonly ["scalar"];
|
|
481
|
+
}, {
|
|
482
|
+
readonly name: "wildcard_pattern";
|
|
483
|
+
readonly types: readonly ["Bytes"];
|
|
484
|
+
readonly literal: true;
|
|
485
|
+
}, {
|
|
486
|
+
readonly name: "replacement";
|
|
487
|
+
readonly types: readonly ["Bytes"];
|
|
488
|
+
readonly literal: true;
|
|
489
|
+
}, {
|
|
490
|
+
readonly name: "flags";
|
|
491
|
+
readonly types: readonly ["Bytes"];
|
|
492
|
+
readonly optional: true;
|
|
493
|
+
readonly literal: true;
|
|
494
|
+
}];
|
|
495
|
+
readonly categories: readonly ["Transformation functions"];
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
//# sourceMappingURL=function-descriptions.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-descriptions.generated.d.ts","sourceRoot":"","sources":["../../src/rule-evaluator/function-descriptions.generated.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,sCAAsC,uFAAuF,CAAC;AAE3I,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAy1B8B,CAAC"}
|