diff --git a/server/pb_migrations/1756994399_updated__superusers.js b/server/pb_migrations/1756994399_updated__superusers.js new file mode 100644 index 0000000..c6f5aa1 --- /dev/null +++ b/server/pb_migrations/1756994399_updated__superusers.js @@ -0,0 +1,29 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_3142635823") + + // add field + collection.fields.addAt(9, new Field({ + "hidden": false, + "id": "file376926767", + "maxSelect": 1, + "maxSize": 0, + "mimeTypes": [], + "name": "avatar", + "presentable": false, + "protected": false, + "required": false, + "system": false, + "thumbs": [], + "type": "file" + })) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_3142635823") + + // remove field + collection.fields.removeById("file376926767") + + return app.save(collection) +}) diff --git a/server/pb_migrations/1757161629_updated_alert_configurations.js b/server/pb_migrations/1757161629_updated_alert_configurations.js new file mode 100644 index 0000000..092fd4b --- /dev/null +++ b/server/pb_migrations/1757161629_updated_alert_configurations.js @@ -0,0 +1,78 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_1938176441") + + // add field + collection.fields.addAt(23, new Field({ + "autogeneratePattern": "", + "hidden": false, + "id": "text3401535476", + "max": 0, + "min": 0, + "name": "server_url", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + })) + + // update field + collection.fields.addAt(9, new Field({ + "hidden": false, + "id": "select887233555", + "maxSelect": 1, + "name": "notification_type", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "telegram", + "signal", + "discord", + "slack", + "webhook", + "google_chat", + "email", + "ntfy", + "pushover", + "notifiarr", + "gotify" + ] + })) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_1938176441") + + // remove field + collection.fields.removeById("text3401535476") + + // update field + collection.fields.addAt(9, new Field({ + "hidden": false, + "id": "select887233555", + "maxSelect": 1, + "name": "notification_type", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "telegram", + "signal", + "discord", + "slack", + "webhook", + "google_chat", + "email", + "ntfy", + "pushover", + "notifiarr" + ] + })) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1757233868_updated_data_settings.js b/server/pb_migrations/1757233868_updated_data_settings.js new file mode 100644 index 0000000..c23f163 --- /dev/null +++ b/server/pb_migrations/1757233868_updated_data_settings.js @@ -0,0 +1,28 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_2889059272") + + // update collection data + unmarshal({ + "createRule": "@request.auth.id != \"\"", + "deleteRule": "@request.auth.id != \"\"", + "listRule": "@request.auth.id != \"\"", + "updateRule": "@request.auth.id != \"\"", + "viewRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_2889059272") + + // update collection data + unmarshal({ + "createRule": "", + "deleteRule": "", + "listRule": "", + "updateRule": "", + "viewRule": "" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1757233934_updated_incidents.js b/server/pb_migrations/1757233934_updated_incidents.js new file mode 100644 index 0000000..18f6efa --- /dev/null +++ b/server/pb_migrations/1757233934_updated_incidents.js @@ -0,0 +1,26 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_2189087560") + + // update collection data + unmarshal({ + "createRule": "@request.auth.id != \"\"", + "deleteRule": "@request.auth.id != \"\"", + "listRule": "@request.auth.id != \"\"", + "updateRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_2189087560") + + // update collection data + unmarshal({ + "createRule": "", + "deleteRule": "", + "listRule": "", + "updateRule": "" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1757233957_updated_maintenance.js b/server/pb_migrations/1757233957_updated_maintenance.js new file mode 100644 index 0000000..628d82b --- /dev/null +++ b/server/pb_migrations/1757233957_updated_maintenance.js @@ -0,0 +1,24 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_1738231158") + + // update collection data + unmarshal({ + "createRule": "@request.auth.id != \"\"", + "deleteRule": "@request.auth.id != \"\"", + "updateRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_1738231158") + + // update collection data + unmarshal({ + "createRule": "", + "deleteRule": "", + "updateRule": "" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1757233963_updated_incidents.js b/server/pb_migrations/1757233963_updated_incidents.js new file mode 100644 index 0000000..2289889 --- /dev/null +++ b/server/pb_migrations/1757233963_updated_incidents.js @@ -0,0 +1,20 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_2189087560") + + // update collection data + unmarshal({ + "listRule": "" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_2189087560") + + // update collection data + unmarshal({ + "listRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1757233983_updated_operational_page.js b/server/pb_migrations/1757233983_updated_operational_page.js new file mode 100644 index 0000000..cad9695 --- /dev/null +++ b/server/pb_migrations/1757233983_updated_operational_page.js @@ -0,0 +1,24 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_3662317132") + + // update collection data + unmarshal({ + "createRule": "@request.auth.id != \"\"", + "deleteRule": "@request.auth.id != \"\"", + "updateRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_3662317132") + + // update collection data + unmarshal({ + "createRule": "", + "deleteRule": "", + "updateRule": "" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1757234002_updated_ping_data.js b/server/pb_migrations/1757234002_updated_ping_data.js new file mode 100644 index 0000000..c12c81f --- /dev/null +++ b/server/pb_migrations/1757234002_updated_ping_data.js @@ -0,0 +1,20 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_1168766540") + + // update collection data + unmarshal({ + "deleteRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_1168766540") + + // update collection data + unmarshal({ + "deleteRule": "" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1757234055_updated_alert_configurations.js b/server/pb_migrations/1757234055_updated_alert_configurations.js new file mode 100644 index 0000000..a6f9db0 --- /dev/null +++ b/server/pb_migrations/1757234055_updated_alert_configurations.js @@ -0,0 +1,28 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_1938176441") + + // update collection data + unmarshal({ + "createRule": "@request.auth.id != \"\"", + "deleteRule": "@request.auth.id != \"\"", + "listRule": "@request.auth.id != \"\"", + "updateRule": "@request.auth.id != \"\"", + "viewRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_1938176441") + + // update collection data + unmarshal({ + "createRule": "", + "deleteRule": "", + "listRule": "", + "updateRule": "", + "viewRule": "" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1757769533_updated_alert_configurations.js b/server/pb_migrations/1757769533_updated_alert_configurations.js new file mode 100644 index 0000000..24a5dea --- /dev/null +++ b/server/pb_migrations/1757769533_updated_alert_configurations.js @@ -0,0 +1,28 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_1938176441") + + // update collection data + unmarshal({ + "createRule": "", + "deleteRule": "", + "listRule": "", + "updateRule": "", + "viewRule": "" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_1938176441") + + // update collection data + unmarshal({ + "createRule": "@request.auth.id != \"\"", + "deleteRule": "@request.auth.id != \"\"", + "listRule": "@request.auth.id != \"\"", + "updateRule": "@request.auth.id != \"\"", + "viewRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1760189594_deleted_webhook.js b/server/pb_migrations/1760189594_deleted_webhook.js new file mode 100644 index 0000000..c85a557 --- /dev/null +++ b/server/pb_migrations/1760189594_deleted_webhook.js @@ -0,0 +1,211 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_45665081"); + + return app.delete(collection); +}, (app) => { + const collection = new Collection({ + "createRule": null, + "deleteRule": null, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text2809058197", + "max": 0, + "min": 0, + "name": "user_id", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text4101391790", + "max": 0, + "min": 0, + "name": "url", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "hidden": false, + "id": "select1358543748", + "maxSelect": 1, + "name": "enabled", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "on", + "off" + ] + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text1554180325", + "max": 0, + "min": 0, + "name": "secret", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text4144189317", + "max": 0, + "min": 0, + "name": "headers", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text2129530235", + "max": 0, + "min": 0, + "name": "retry_count", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text2168550802", + "max": 0, + "min": 0, + "name": "trigger_events", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text1843675174", + "max": 0, + "min": 0, + "name": "description", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text1579384326", + "max": 0, + "min": 0, + "name": "name", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text1582905952", + "max": 0, + "min": 0, + "name": "method", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text1414600993", + "max": 0, + "min": 0, + "name": "payload_template", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": false, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": false, + "type": "autodate" + } + ], + "id": "pbc_45665081", + "indexes": [], + "listRule": null, + "name": "webhook", + "system": false, + "type": "base", + "updateRule": null, + "viewRule": null + }); + + return app.save(collection); +}) diff --git a/server/pb_migrations/1760190053_updated_data_settings.js b/server/pb_migrations/1760190053_updated_data_settings.js new file mode 100644 index 0000000..e65160f --- /dev/null +++ b/server/pb_migrations/1760190053_updated_data_settings.js @@ -0,0 +1,28 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_2889059272") + + // update collection data + unmarshal({ + "createRule": "", + "deleteRule": "", + "listRule": "", + "updateRule": "", + "viewRule": "" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_2889059272") + + // update collection data + unmarshal({ + "createRule": "@request.auth.id != \"\"", + "deleteRule": "@request.auth.id != \"\"", + "listRule": "@request.auth.id != \"\"", + "updateRule": "@request.auth.id != \"\"", + "viewRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1760190072_updated_incidents.js b/server/pb_migrations/1760190072_updated_incidents.js new file mode 100644 index 0000000..955eeff --- /dev/null +++ b/server/pb_migrations/1760190072_updated_incidents.js @@ -0,0 +1,24 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_2189087560") + + // update collection data + unmarshal({ + "createRule": "", + "deleteRule": "", + "updateRule": "" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_2189087560") + + // update collection data + unmarshal({ + "createRule": "@request.auth.id != \"\"", + "deleteRule": "@request.auth.id != \"\"", + "updateRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1760190080_updated_maintenance.js b/server/pb_migrations/1760190080_updated_maintenance.js new file mode 100644 index 0000000..8fc6f83 --- /dev/null +++ b/server/pb_migrations/1760190080_updated_maintenance.js @@ -0,0 +1,24 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_1738231158") + + // update collection data + unmarshal({ + "createRule": "", + "deleteRule": "", + "updateRule": "" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_1738231158") + + // update collection data + unmarshal({ + "createRule": "@request.auth.id != \"\"", + "deleteRule": "@request.auth.id != \"\"", + "updateRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1760190087_updated_operational_page.js b/server/pb_migrations/1760190087_updated_operational_page.js new file mode 100644 index 0000000..e88b76f --- /dev/null +++ b/server/pb_migrations/1760190087_updated_operational_page.js @@ -0,0 +1,24 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_3662317132") + + // update collection data + unmarshal({ + "createRule": "", + "deleteRule": "", + "updateRule": "" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_3662317132") + + // update collection data + unmarshal({ + "createRule": "@request.auth.id != \"\"", + "deleteRule": "@request.auth.id != \"\"", + "updateRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/1760190091_updated_ping_data.js b/server/pb_migrations/1760190091_updated_ping_data.js new file mode 100644 index 0000000..cb4d63f --- /dev/null +++ b/server/pb_migrations/1760190091_updated_ping_data.js @@ -0,0 +1,20 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_1168766540") + + // update collection data + unmarshal({ + "deleteRule": "" + }, collection) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_1168766540") + + // update collection data + unmarshal({ + "deleteRule": "@request.auth.id != \"\"" + }, collection) + + return app.save(collection) +}) diff --git a/server/pb_migrations/pb_schema.json b/server/pb_migrations/pb_schema.json index fe239ff..bc77385 100644 --- a/server/pb_migrations/pb_schema.json +++ b/server/pb_migrations/pb_schema.json @@ -217,7 +217,7 @@ "id": "_pb_users_auth_", "listRule": "id = @request.auth.id", "viewRule": "id = @request.auth.id", - "createRule": null, + "createRule": "", "updateRule": "id = @request.auth.id", "deleteRule": "id = @request.auth.id", "name": "users", @@ -271,7 +271,7 @@ "name": "email", "onlyDomains": null, "presentable": false, - "required": false, + "required": true, "system": true, "type": "email" }, @@ -341,20 +341,6 @@ "system": false, "type": "text" }, - { - "hidden": false, - "id": "select2063623452", - "maxSelect": 1, - "name": "status", - "presentable": false, - "required": false, - "system": false, - "type": "select", - "values": [ - "Active", - "Inactive" - ] - }, { "hidden": false, "id": "autodate2990389176", @@ -996,7 +982,9 @@ "webhook", "google_chat", "email", - "ntfy" + "ntfy", + "pushover", + "notifiarr" ] }, { @@ -1153,6 +1141,34 @@ "system": false, "type": "text" }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text2074277355", + "max": 0, + "min": 0, + "name": "api_token", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text1636223522", + "max": 0, + "min": 0, + "name": "user_key", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, { "hidden": false, "id": "autodate2990389176", @@ -5638,6 +5654,169 @@ "indexes": [], "system": false }, + { + "id": "pbc_1753185970", + "listRule": "", + "viewRule": "", + "createRule": "", + "updateRule": "", + "deleteRule": "", + "name": "ssl_history", + "type": "base", + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text2812878347", + "max": 0, + "min": 0, + "name": "cert_id", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text1881225410", + "max": 0, + "min": 0, + "name": "days_before_expiry", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text3062427817", + "max": 0, + "min": 0, + "name": "days_before_warning", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text98176952", + "max": 0, + "min": 0, + "name": "template_id", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text4011498884", + "max": 0, + "min": 0, + "name": "notification_id", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "hidden": false, + "id": "select3839288252", + "maxSelect": 1, + "name": "warning_status", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "sent", + "pending", + "failed" + ] + }, + { + "hidden": false, + "id": "select2670434693", + "maxSelect": 1, + "name": "expiry_status", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "sent", + "pending", + "failed" + ] + }, + { + "hidden": false, + "id": "select3824245652", + "maxSelect": 1, + "name": "critical_status", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "sent", + "pending", + "failed" + ] + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": false, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": false, + "type": "autodate" + } + ], + "indexes": [], + "system": false + }, { "id": "pbc_351174173", "listRule": "", @@ -6083,54 +6262,6 @@ "indexes": [], "system": false }, - { - "id": "pbc_4014804571", - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "name": "trigger_events", - "type": "base", - "fields": [ - { - "autogeneratePattern": "[a-z0-9]{15}", - "hidden": false, - "id": "text3208210256", - "max": 15, - "min": 15, - "name": "id", - "pattern": "^[a-z0-9]+$", - "presentable": false, - "primaryKey": true, - "required": true, - "system": true, - "type": "text" - }, - { - "hidden": false, - "id": "autodate2990389176", - "name": "created", - "onCreate": true, - "onUpdate": false, - "presentable": false, - "system": false, - "type": "autodate" - }, - { - "hidden": false, - "id": "autodate3332085495", - "name": "updated", - "onCreate": true, - "onUpdate": true, - "presentable": false, - "system": false, - "type": "autodate" - } - ], - "indexes": [], - "system": false - }, { "id": "pbc_67962705", "listRule": "", @@ -6544,4 +6675,4 @@ "indexes": [], "system": false } -] \ No newline at end of file +]