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

---
 CHANGELOG.md                                                | 2 ++
 spec/schemas/destination-possible-next-status-optional.yaml | 5 +++++
 spec/schemas/destination-possible-next-status.yaml          | 5 +++++
 spec/schemas/destination-private-or-public.yaml             | 2 ++
 spec/schemas/destination-private.yaml                       | 2 ++
 spec/schemas/destination-put.yaml                           | 2 ++
 6 files changed, 18 insertions(+)
 create mode 100644 spec/schemas/destination-possible-next-status-optional.yaml
 create mode 100644 spec/schemas/destination-possible-next-status.yaml

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4824a22..b67cd90 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## Unreleased
 
+* Erweiterung des destination Schemas um `possibleNextStatus`, welches die aktuell möglichen nächsten Zustände des Zustellpunktes zurück gibt ([planning#287](https://git.fitko.de/fit-connect/planning/-/issues/287)).
+
 ## [1.6.0]
 
 ### Changed
diff --git a/spec/schemas/destination-possible-next-status-optional.yaml b/spec/schemas/destination-possible-next-status-optional.yaml
new file mode 100644
index 0000000..d0ceaed
--- /dev/null
+++ b/spec/schemas/destination-possible-next-status-optional.yaml
@@ -0,0 +1,5 @@
+type: ['null', 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-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-or-public.yaml b/spec/schemas/destination-private-or-public.yaml
index 4255d56..5dc50fb 100644
--- a/spec/schemas/destination-private-or-public.yaml
+++ b/spec/schemas/destination-private-or-public.yaml
@@ -27,6 +27,8 @@ properties:
       $ref: './destination-service.yaml'
   status:
     $ref: './destination-status.yaml'
+  possibleNextStatus:
+    $ref: './destination-possible-next-status-optional.yaml'
   name:
     $ref: './destination-name.yaml'
   clientCount:
diff --git a/spec/schemas/destination-private.yaml b/spec/schemas/destination-private.yaml
index 433255b..b109f63 100644
--- a/spec/schemas/destination-private.yaml
+++ b/spec/schemas/destination-private.yaml
@@ -28,6 +28,8 @@ properties:
       $ref: './destination-service.yaml'
   status:
     $ref: './destination-status.yaml'
+  possibleNextStatus:
+    $ref: './destination-possible-next-status.yaml'
   name:
     $ref: './destination-name.yaml'
   clientCount:
diff --git a/spec/schemas/destination-put.yaml b/spec/schemas/destination-put.yaml
index 82e2268..29dde90 100644
--- a/spec/schemas/destination-put.yaml
+++ b/spec/schemas/destination-put.yaml
@@ -16,6 +16,8 @@ properties:
     $ref: './create-callback.yaml'
   destinationId:
     $ref: './destination-id.yaml'
+  possibleNextStatus:
+    $ref: './destination-possible-next-status-optional.yaml'
   encryptionKid:
     type: string
     maxLength: 64
-- 
GitLab