From 970df1352976675a657e28dbeebcaa92a260b5f6 Mon Sep 17 00:00:00 2001
From: Yves Adler <yves.adler@sinc.de>
Date: Fri, 20 Dec 2024 09:54:51 +0100
Subject: [PATCH] feat: add 'possibleNextStatus' to destination (planning#287)

---
 spec/schemas/destination-possible-next-status.yaml |  5 +++++
 spec/schemas/destination-private.yaml              | 12 +++---------
 spec/schemas/destination-public.yaml               | 10 +---------
 spec/schemas/destination-status.yaml               |  7 +++++++
 4 files changed, 16 insertions(+), 18 deletions(-)
 create mode 100644 spec/schemas/destination-possible-next-status.yaml
 create mode 100644 spec/schemas/destination-status.yaml

diff --git a/spec/schemas/destination-possible-next-status.yaml b/spec/schemas/destination-possible-next-status.yaml
new file mode 100644
index 0000000..66ef3b6
--- /dev/null
+++ b/spec/schemas/destination-possible-next-status.yaml
@@ -0,0 +1,5 @@
+type: array
+items:
+  $ref: './destination-status.yaml'
+minItems: 0
+description: Eine Liste von möglichen nächsten Status des Zustellpunktes, ausgehend vom aktuellen Zustand des Zustellpunktes. Eine Beschreibung der Status finden Sie in den Detailinformationen unter [Zustellpunktverwaltung](https://docs.fitko.de/fit-connect/docs/details/destination-management).
diff --git a/spec/schemas/destination-private.yaml b/spec/schemas/destination-private.yaml
index 6e15ea1..3ce6d77 100644
--- a/spec/schemas/destination-private.yaml
+++ b/spec/schemas/destination-private.yaml
@@ -34,15 +34,9 @@ properties:
     items:
       $ref: './destination-service.yaml'
   status:
-    type: string
-    enum:
-      - created
-      - active
-      - inactive
-      - decommissioned
-    description: >
-      Status des Zustellpunktes.
-      Eine Beschreibung der Status finden Sie in den Detailinformationen unter [Zustellpunktverwaltung](https://docs.fitko.de/fit-connect/docs/details/destination-management).
+    $ref: './destination-status.yaml'
+  possibleNextStatus:
+    $ref: './destination-possible-next-status.yaml'
   name:
     $ref: './destination-name.yaml'
   contactInformation:
diff --git a/spec/schemas/destination-public.yaml b/spec/schemas/destination-public.yaml
index 15ae3a1..8a80986 100644
--- a/spec/schemas/destination-public.yaml
+++ b/spec/schemas/destination-public.yaml
@@ -34,14 +34,6 @@ properties:
     items:
       $ref: './destination-service.yaml'
   status:
-    type: string
-    enum:
-      - created
-      - active
-      - inactive
-      - decommissioned
-    description: >
-      Status des Zustellpunktes.
-      Eine Beschreibung der Status finden Sie in den Detailinformationen unter [Zustellpunktverwaltung](https://docs.fitko.de/fit-connect/docs/details/destination-management).
+    $ref: './destination-status.yaml'
   senderAccessRestricted:
     $ref: './destination-sender-access-restricted.yaml'
diff --git a/spec/schemas/destination-status.yaml b/spec/schemas/destination-status.yaml
new file mode 100644
index 0000000..436e33b
--- /dev/null
+++ b/spec/schemas/destination-status.yaml
@@ -0,0 +1,7 @@
+type: string
+enum:
+  - created
+  - active
+  - inactive
+  - decommissioned
+description: Status des Zustellpunktes. Eine Beschreibung der Status finden Sie in den Detailinformationen unter [Zustellpunktverwaltung](https://docs.fitko.de/fit-connect/docs/details/destination-management).
-- 
GitLab