|
3 | 3 | "type": "object", |
4 | 4 | "additionalProperties": false, |
5 | 5 | "definitions": { |
| 6 | + "run": { |
| 7 | + "type": "string", |
| 8 | + "pattern": "^run$" |
| 9 | + }, |
6 | 10 | "hourly": { |
7 | 11 | "type": "string", |
8 | 12 | "pattern": "^hourly\\([0-5][0-9]\\)$" |
9 | 13 | }, |
10 | 14 | "daily": { |
11 | 15 | "type": "string", |
12 | | - "pattern": "^daily\\((?:([01]?[0-9]|2[0-3]):([0-5][0-9])\\|)?([01]?[0-9]|2[0-3]):([0-5][0-9])\\)$" |
| 16 | + "pattern": "^daily\\(((?:[01]?[0-9]|2[0-3]):([0-5][0-9])(?:\\|(?:[01]?[0-9]|2[0-3]):([0-5][0-9]))*)\\)$" |
13 | 17 | }, |
14 | 18 | "weekly": { |
15 | 19 | "type": "string", |
16 | 20 | "pattern": "^weekly\\((monday|tuesday|wednesday|thursday|friday|saturday|sunday)@(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9])\\)$" |
17 | 21 | }, |
| 22 | + "monthly": { |
| 23 | + "type": "string", |
| 24 | + "pattern": "^monthly\\((?:28@(?:[01]?[0-9]|2[0-3]):([0-5][0-9]))\\)$" |
| 25 | + }, |
18 | 26 | "cron": { |
19 | 27 | "type": "string", |
20 | 28 | "pattern": "^cron\\(([^)\\s]+ [^)\\s]+ [^)\\s]+ [^)\\s]+ [^)\\s]+)\\)$" |
21 | 29 | }, |
| 30 | + "schedule": { |
| 31 | + "oneOf": [ |
| 32 | + { |
| 33 | + "$ref": "#/definitions/run" |
| 34 | + }, |
| 35 | + { |
| 36 | + "$ref": "#/definitions/hourly" |
| 37 | + }, |
| 38 | + { |
| 39 | + "$ref": "#/definitions/daily" |
| 40 | + }, |
| 41 | + { |
| 42 | + "$ref": "#/definitions/weekly" |
| 43 | + }, |
| 44 | + { |
| 45 | + "$ref": "#/definitions/monthly" |
| 46 | + }, |
| 47 | + { |
| 48 | + "$ref": "#/definitions/cron" |
| 49 | + }, |
| 50 | + { |
| 51 | + "type": "null" |
| 52 | + } |
| 53 | + ], |
| 54 | + "description": "A schedule of either run, hourly, daily, weekly, monthly, or cron. If null, the task will not be scheduled.\nExamples:\nrun\nhourly(30)\ndaily(12:23)\ndaily(10:18|12:23)\nweekly(monday@12:00)\nmonthly(15@12:00)\ncron(0 0 * * *)" |
| 55 | + }, |
22 | 56 | "instance": { |
23 | 57 | "type": "object", |
24 | 58 | "additionalProperties": { |
25 | 59 | "type": "object", |
26 | 60 | "additionalProperties": false, |
27 | 61 | "properties": { |
28 | 62 | "url": { |
29 | | - "type": "string" |
| 63 | + "type": "string", |
| 64 | + "description": "The URL of the instance, including the protocol and port. Example: http://localhost:8989", |
| 65 | + "pattern": "^https?://[^\\s]+(:[0-9]+)?$" |
30 | 66 | }, |
31 | 67 | "api": { |
32 | | - "type": "string" |
| 68 | + "type": "string", |
| 69 | + "description": "The API key of the instance" |
33 | 70 | } |
34 | 71 | }, |
35 | 72 | "required": [ |
|
42 | 79 | "type": "string", |
43 | 80 | "pattern": "^debug|info|warning|error$" |
44 | 81 | }, |
45 | | - "schedule": { |
46 | | - "oneOf": [ |
47 | | - { |
48 | | - "type": "null" |
49 | | - }, |
50 | | - { |
51 | | - "$ref": "#/definitions/hourly" |
52 | | - }, |
53 | | - { |
54 | | - "$ref": "#/definitions/daily" |
55 | | - }, |
56 | | - { |
57 | | - "$ref": "#/definitions/weekly" |
58 | | - }, |
59 | | - { |
60 | | - "$ref": "#/definitions/cron" |
61 | | - } |
62 | | - ] |
63 | | - }, |
64 | 82 | "stringOrNull": { |
65 | 83 | "type": [ |
66 | 84 | "string", |
|
78 | 96 | "additionalProperties": false, |
79 | 97 | "properties": { |
80 | 98 | "discord_webhook": { |
81 | | - "$ref": "#/definitions/stringOrNull" |
| 99 | + "$ref": "#/definitions/stringOrNull", |
| 100 | + "description": "The Discord webhook URL to send messages to. If null, no messages will be sent.", |
| 101 | + "pattern": "^https?://[^\\s]+(:[0-9]+)?$" |
82 | 102 | }, |
83 | 103 | "channel_id": { |
84 | | - "$ref": "#/definitions/integerOrNull" |
| 104 | + "$ref": "#/definitions/integerOrNull", |
| 105 | + "description": "The Discord channel ID to send messages to if you are using Notifarr. If null, no messages will be sent.\nhttps://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID" |
85 | 106 | } |
86 | 107 | }, |
87 | 108 | "required": [ |
88 | 109 | "discord_webhook", |
89 | 110 | "channel_id" |
90 | 111 | ] |
| 112 | + }, |
| 113 | + "uniqueArray": { |
| 114 | + "uniqueItems": true, |
| 115 | + "items": { |
| 116 | + "type": "string" |
| 117 | + } |
91 | 118 | } |
92 | 119 | }, |
93 | 120 | "properties": { |
|
172 | 199 | "additionalProperties": false, |
173 | 200 | "properties": { |
174 | 201 | "notifiarr_webhook": { |
175 | | - "$ref": "#/definitions/stringOrNull" |
| 202 | + "$ref": "#/definitions/stringOrNull", |
| 203 | + "pattern": "^https?://[^\\s]+(:[0-9]+)?$", |
| 204 | + "description": "Notifiarr Passthrough URL. If null, no messages will be sent." |
176 | 205 | }, |
177 | 206 | "main": { |
178 | 207 | "$ref": "#/definitions/discord" |
|
287 | 316 | "type": "boolean" |
288 | 317 | }, |
289 | 318 | "library_names": { |
290 | | - "type": "array" |
| 319 | + "$ref": "#/definitions/uniqueArray" |
291 | 320 | }, |
292 | 321 | "source_dirs": { |
293 | | - "type": "array" |
| 322 | + "$ref": "#/definitions/uniqueArray" |
294 | 323 | }, |
295 | 324 | "destination_dir": { |
296 | 325 | "type": "string" |
297 | 326 | }, |
298 | 327 | "instances": { |
299 | | - "type": "array" |
| 328 | + "$ref": "#/definitions/uniqueArray" |
300 | 329 | } |
301 | 330 | }, |
302 | 331 | "required": [ |
|
324 | 353 | "type": "boolean" |
325 | 354 | }, |
326 | 355 | "source_dirs": { |
327 | | - "type": "array" |
| 356 | + "$ref": "#/definitions/uniqueArray" |
328 | 357 | }, |
329 | 358 | "destination_dir": { |
330 | 359 | "type": "string" |
|
385 | 414 | "$ref": "#/definitions/logLevel" |
386 | 415 | }, |
387 | 416 | "instances": { |
388 | | - "type": "array" |
| 417 | + "$ref": "#/definitions/uniqueArray" |
389 | 418 | }, |
390 | 419 | "ignore_root_folders": { |
391 | 420 | "type": [ |
|
394 | 423 | ] |
395 | 424 | }, |
396 | 425 | "library_names": { |
397 | | - "type": "array" |
| 426 | + "$ref": "#/definitions/uniqueArray" |
398 | 427 | }, |
399 | 428 | "ignore_collections": { |
400 | | - "type": "array" |
| 429 | + "$ref": "#/definitions/uniqueArray" |
401 | 430 | }, |
402 | 431 | "source_dirs": { |
403 | | - "type": "array" |
| 432 | + "$ref": "#/definitions/uniqueArray" |
404 | 433 | } |
405 | 434 | }, |
406 | 435 | "required": [ |
|
423 | 452 | "type": "boolean" |
424 | 453 | }, |
425 | 454 | "library_names": { |
426 | | - "type": "array" |
| 455 | + "$ref": "#/definitions/uniqueArray" |
427 | 456 | }, |
428 | 457 | "ignore_collections": { |
429 | | - "type": "array" |
| 458 | + "$ref": "#/definitions/uniqueArray" |
430 | 459 | }, |
431 | 460 | "source_dirs": { |
432 | | - "type": "array" |
| 461 | + "$ref": "#/definitions/uniqueArray" |
433 | 462 | }, |
434 | 463 | "instances": { |
435 | | - "type": "array" |
| 464 | + "$ref": "#/definitions/uniqueArray" |
436 | 465 | } |
437 | 466 | }, |
438 | 467 | "required": [ |
|
505 | 534 | "type": "string" |
506 | 535 | }, |
507 | 536 | "instances": { |
508 | | - "type": "array" |
| 537 | + "$ref": "#/definitions/uniqueArray" |
509 | 538 | } |
510 | 539 | }, |
511 | 540 | "required": [ |
|
533 | 562 | "type": "boolean" |
534 | 563 | }, |
535 | 564 | "instances": { |
536 | | - "type": "array" |
| 565 | + "$ref": "#/definitions/uniqueArray" |
537 | 566 | }, |
538 | 567 | "paths": { |
539 | | - "type": "array" |
| 568 | + "$ref": "#/definitions/uniqueArray" |
540 | 569 | }, |
541 | 570 | "filters": { |
542 | 571 | "type": "object", |
|
546 | 575 | "type": "string" |
547 | 576 | }, |
548 | 577 | "exclude_movies": { |
549 | | - "type": "array" |
| 578 | + "$ref": "#/definitions/uniqueArray" |
550 | 579 | }, |
551 | 580 | "exclude_series": { |
552 | | - "type": "array" |
| 581 | + "$ref": "#/definitions/uniqueArray" |
553 | 582 | } |
554 | 583 | }, |
555 | 584 | "required": [ |
|
585 | 614 | "type": "object", |
586 | 615 | "properties": { |
587 | 616 | "library_names": { |
588 | | - "type": "array", |
589 | | - "items": { |
590 | | - "type": "string" |
591 | | - } |
| 617 | + "$ref": "#/definitions/uniqueArray" |
592 | 618 | }, |
593 | 619 | "plex_instances": { |
594 | | - "type": "array", |
595 | | - "items": { |
596 | | - "type": "string" |
597 | | - } |
| 620 | + "$ref": "#/definitions/uniqueArray" |
598 | 621 | }, |
599 | 622 | "labels": { |
600 | | - "type": "array", |
601 | | - "items": { |
602 | | - "type": "string" |
603 | | - } |
| 623 | + "$ref": "#/definitions/uniqueArray" |
604 | 624 | } |
605 | 625 | }, |
606 | 626 | "required": [ |
|
628 | 648 | "type": "boolean" |
629 | 649 | }, |
630 | 650 | "instances": { |
631 | | - "type": "array", |
632 | | - "items": { |
633 | | - "type": "string" |
634 | | - } |
| 651 | + "$ref": "#/definitions/uniqueArray" |
635 | 652 | } |
636 | 653 | }, |
637 | 654 | "required": [ |
|
655 | 672 | "$ref": "#/definitions/stringOrNull" |
656 | 673 | }, |
657 | 674 | "include": { |
658 | | - "type": "array" |
| 675 | + "$ref": "#/definitions/uniqueArray" |
659 | 676 | }, |
660 | 677 | "exclude": { |
661 | | - "type": "array" |
| 678 | + "$ref": "#/definitions/uniqueArray" |
662 | 679 | } |
663 | 680 | }, |
664 | 681 | "required": [ |
|
0 commit comments