70 lines
2.4 KiB
JSON
70 lines
2.4 KiB
JSON
[
|
|||
|
|
{
|
||
|
|
"id": "tab_license_watch",
|
||
|
|
"type": "tab",
|
||
|
|
"label": "veille-ia : license-watch",
|
||
|
|
"disabled": false,
|
||
|
|
"info": "PRD §5.2 — Réception des webhooks changedetection_ynh (URLs ToS/licences : BFL, MiniMax Community License, cards HF, Midjourney, Runway, Suno, Steam/itch.io policies) → POST classifier avec type changement_licence et urgence haute.\n\nDans changedetection : Notification URL = post://127.0.0.1:1880/veille-ia/license-watch (adapter si Node-RED sur un autre hôte).\n\nVariables d'environnement :\n- CLASSIFIER_URL (défaut http://127.0.0.1:1880/veille-ia/classifier)"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "lw_http_in",
|
||
|
|
"type": "http in",
|
||
|
|
"z": "tab_license_watch",
|
||
|
|
"name": "webhook changedetection",
|
||
|
|
"url": "/veille-ia/license-watch",
|
||
|
|
"method": "post",
|
||
|
|
"upload": false,
|
||
|
|
"swaggerDoc": "",
|
||
|
|
"x": 170,
|
||
|
|
"y": 100,
|
||
|
|
"wires": [["lw_preparer"]]
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "lw_preparer",
|
||
|
|
"type": "function",
|
||
|
|
"z": "tab_license_watch",
|
||
|
|
"name": "Préparer (type licence, urgence haute)",
|
||
|
|
"func": "// changedetection.io envoie selon sa configuration :\n// title, watch_url, diff_url, body/diff…\nconst p = msg.payload || {};\nmsg.titreOriginal = `Changement détecté : ${p.title || p.watch_url || 'page surveillée'}`;\nmsg.texte = [\n `Page surveillée : ${p.watch_url || '(inconnue)'}`,\n p.diff_url ? `Diff : ${p.diff_url}` : '',\n '',\n p.body || p.diff || JSON.stringify(p)\n].join('\\n');\nmsg.lien = p.watch_url || null;\nmsg.typeSuggere = 'changement_licence';\nmsg.urgenceSuggeree = 'haute';\nmsg.method = 'POST';\nmsg.url = env.get('CLASSIFIER_URL') || 'http://127.0.0.1:1880/veille-ia/classifier';\nmsg.headers = { 'content-type': 'application/json' };\nmsg.payload = msg.texte;\nreturn msg;",
|
||
|
|
"outputs": 1,
|
||
|
|
"timeout": "",
|
||
|
|
"noerr": 0,
|
||
|
|
"initialize": "",
|
||
|
|
"finalize": "",
|
||
|
|
"libs": [],
|
||
|
|
"x": 460,
|
||
|
|
"y": 100,
|
||
|
|
"wires": [["lw_vers_classifier"]]
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "lw_vers_classifier",
|
||
|
|
"type": "http request",
|
||
|
|
"z": "tab_license_watch",
|
||
|
|
"name": "POST classifier",
|
||
|
|
"method": "use",
|
||
|
|
"ret": "txt",
|
||
|
|
"paytoqs": "ignore",
|
||
|
|
"url": "",
|
||
|
|
"tls": "",
|
||
|
|
"persist": false,
|
||
|
|
"proxy": "",
|
||
|
|
"insecureHTTPParser": false,
|
||
|
|
"authType": "",
|
||
|
|
"senderr": false,
|
||
|
|
"headers": [],
|
||
|
|
"x": 730,
|
||
|
|
"y": 100,
|
||
|
|
"wires": [["lw_response"]]
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "lw_response",
|
||
|
|
"type": "http response",
|
||
|
|
"z": "tab_license_watch",
|
||
|
|
"name": "202",
|
||
|
|
"statusCode": "202",
|
||
|
|
"headers": {},
|
||
|
|
"x": 890,
|
||
|
|
"y": 100,
|
||
|
|
"wires": []
|
||
|
|
}
|
||
|
|
]
|