@hostwebhook/node-sdk 0.1.2 → 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/dist/contratos.d.ts +2 -1
- package/dist/contratos.js +49 -0
- package/package.json +1 -1
package/dist/contratos.d.ts
CHANGED
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
* que el motor sabe resolver y la base de datos rechaza al guardar. Es un
|
|
30
30
|
* fallo de la api, anterior a este paquete, y se arregla aparte.
|
|
31
31
|
*/
|
|
32
|
-
export
|
|
32
|
+
export declare const FILTER_OPERATORS: readonly ["eq", "neq", "gt", "gte", "lt", "lte", "contains", "not_contains", "starts_with", "not_starts_with", "ends_with", "not_ends_with", "matches_regex", "is_empty", "is_not_empty", "exists", "not_exists", "has_key", "is_true", "is_false", "array_contains", "array_not_contains", "array_empty", "array_not_empty", "array_length_eq", "array_length_gt", "array_length_lt", "date_eq", "date_before", "date_after"];
|
|
33
|
+
export type FilterOperator = (typeof FILTER_OPERATORS)[number];
|
|
33
34
|
export interface PayloadFilter {
|
|
34
35
|
field: string;
|
|
35
36
|
operator: FilterOperator;
|
package/dist/contratos.js
CHANGED
|
@@ -22,3 +22,52 @@
|
|
|
22
22
|
* conoce las entidades de nadie.
|
|
23
23
|
*/
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.FILTER_OPERATORS = void 0;
|
|
26
|
+
/* ── Filtros ─────────────────────────────────────────────────────── */
|
|
27
|
+
/**
|
|
28
|
+
* Los operadores que el SDK sabe EVALUAR, sacados de `filter-utils`.
|
|
29
|
+
*
|
|
30
|
+
* ⚠️ No coinciden con los `enum` de las entidades de la api, y esa es la
|
|
31
|
+
* lista buena: aquí vive el evaluador. Los enum de allá van de 7 a 32 segun
|
|
32
|
+
* la entidad —`webhook` admite 7 de estos 30— asi que hay filtros
|
|
33
|
+
* que el motor sabe resolver y la base de datos rechaza al guardar. Es un
|
|
34
|
+
* fallo de la api, anterior a este paquete, y se arregla aparte.
|
|
35
|
+
*/
|
|
36
|
+
exports.FILTER_OPERATORS = [
|
|
37
|
+
/* Comparación */
|
|
38
|
+
'eq',
|
|
39
|
+
'neq',
|
|
40
|
+
'gt',
|
|
41
|
+
'gte',
|
|
42
|
+
'lt',
|
|
43
|
+
'lte',
|
|
44
|
+
/* Texto */
|
|
45
|
+
'contains',
|
|
46
|
+
'not_contains',
|
|
47
|
+
'starts_with',
|
|
48
|
+
'not_starts_with',
|
|
49
|
+
'ends_with',
|
|
50
|
+
'not_ends_with',
|
|
51
|
+
'matches_regex',
|
|
52
|
+
'is_empty',
|
|
53
|
+
'is_not_empty',
|
|
54
|
+
/* Presencia */
|
|
55
|
+
'exists',
|
|
56
|
+
'not_exists',
|
|
57
|
+
'has_key',
|
|
58
|
+
/* Booleanos */
|
|
59
|
+
'is_true',
|
|
60
|
+
'is_false',
|
|
61
|
+
/* Listas */
|
|
62
|
+
'array_contains',
|
|
63
|
+
'array_not_contains',
|
|
64
|
+
'array_empty',
|
|
65
|
+
'array_not_empty',
|
|
66
|
+
'array_length_eq',
|
|
67
|
+
'array_length_gt',
|
|
68
|
+
'array_length_lt',
|
|
69
|
+
/* Fechas */
|
|
70
|
+
'date_eq',
|
|
71
|
+
'date_before',
|
|
72
|
+
'date_after',
|
|
73
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hostwebhook/node-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "El SDK de un nodo de HostWebhook: ciclo de vida, ejecución con iteración, reintentos, filtros y validación de esquema — lo que comparten la api y el futuro servicio de nodos",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|