@warleon/n8n-nodes-payload-cms 1.4.1 → 1.4.2
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.
|
@@ -40,6 +40,7 @@ exports.PayloadCms = void 0;
|
|
|
40
40
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
41
41
|
const axios_1 = __importStar(require("axios"));
|
|
42
42
|
const form_data_1 = __importDefault(require("form-data"));
|
|
43
|
+
const qs_esm_1 = require("qs-esm");
|
|
43
44
|
class PayloadCms {
|
|
44
45
|
// Cache for authentication tokens
|
|
45
46
|
static authTokenCache = new Map();
|
|
@@ -422,7 +423,7 @@ class PayloadCms {
|
|
|
422
423
|
const whereClause = typeof additionalOptions.where === "string"
|
|
423
424
|
? JSON.parse(additionalOptions.where)
|
|
424
425
|
: additionalOptions.where;
|
|
425
|
-
params.where =
|
|
426
|
+
params.where = (0, qs_esm_1.stringify)(whereClause);
|
|
426
427
|
}
|
|
427
428
|
if (additionalOptions.select)
|
|
428
429
|
params.select = additionalOptions.select;
|
|
@@ -126,3 +126,35 @@ export type GlobalConfig<TSlug extends GlobalSlug = any> = {
|
|
|
126
126
|
fields: Field[];
|
|
127
127
|
label?: StaticLabel;
|
|
128
128
|
};
|
|
129
|
+
export declare const validOperators: readonly [
|
|
130
|
+
"equals",
|
|
131
|
+
"contains",
|
|
132
|
+
"not_equals",
|
|
133
|
+
"in",
|
|
134
|
+
"all",
|
|
135
|
+
"not_in",
|
|
136
|
+
"exists",
|
|
137
|
+
"greater_than",
|
|
138
|
+
"greater_than_equal",
|
|
139
|
+
"less_than",
|
|
140
|
+
"less_than_equal",
|
|
141
|
+
"like",
|
|
142
|
+
"not_like",
|
|
143
|
+
"within",
|
|
144
|
+
"intersects",
|
|
145
|
+
"near"
|
|
146
|
+
];
|
|
147
|
+
export type Operator = (typeof validOperators)[number];
|
|
148
|
+
export type JsonValue = JsonArray | JsonObject | unknown;
|
|
149
|
+
export type JsonArray = Array<JsonValue>;
|
|
150
|
+
export interface JsonObject {
|
|
151
|
+
[key: string]: any;
|
|
152
|
+
}
|
|
153
|
+
export type WhereField = {
|
|
154
|
+
[key in Operator]?: JsonValue;
|
|
155
|
+
};
|
|
156
|
+
export type Where = {
|
|
157
|
+
and?: Where[];
|
|
158
|
+
or?: Where[];
|
|
159
|
+
[key: string]: Where[] | WhereField | undefined;
|
|
160
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warleon/n8n-nodes-payload-cms",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Dynamic n8n node for Payload CMS that auto-discovers collections and operations forked and extended from https://github.com/leadership-institute/n8n-payload-dynamic",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "warleon",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"typescript": "^5.0.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"axios": "^1.10.0"
|
|
62
|
+
"axios": "^1.10.0",
|
|
63
|
+
"qs-esm": "^7.0.2"
|
|
63
64
|
}
|
|
64
65
|
}
|