From 0b112e62dc67f46942a9eb23f3bba6f7ec90d57c Mon Sep 17 00:00:00 2001 From: BKadirkhodjaev Date: Mon, 5 Jan 2026 18:29:56 +0500 Subject: [PATCH 1/2] [MODORDERS-1371]. Implement endpoint whether to Show Delete/Keep Holdings Modal --- .../examples/holdingDetailCollection.sample | 6 ++ .../examples/holdingDetailResults.sample | 53 ++++++++++++++++ mod-orders/schemas/holdingDetail.json | 62 +++++++++++++++++++ .../schemas/holdingDetailCollection.json | 20 ++++++ mod-orders/schemas/holdingDetailResults.json | 8 +++ 5 files changed, 149 insertions(+) create mode 100644 mod-orders/examples/holdingDetailCollection.sample create mode 100644 mod-orders/examples/holdingDetailResults.sample create mode 100644 mod-orders/schemas/holdingDetail.json create mode 100644 mod-orders/schemas/holdingDetailCollection.json create mode 100644 mod-orders/schemas/holdingDetailResults.json diff --git a/mod-orders/examples/holdingDetailCollection.sample b/mod-orders/examples/holdingDetailCollection.sample new file mode 100644 index 00000000..8c72bd74 --- /dev/null +++ b/mod-orders/examples/holdingDetailCollection.sample @@ -0,0 +1,6 @@ +{ + "holdingIds": [ + "e54b1f4d-7d05-4b1a-9368-3c36b75d8ac1", + "f65c2g5e-8e16-5c2b-a479-4d47c86e9bd2" + ] +} diff --git a/mod-orders/examples/holdingDetailResults.sample b/mod-orders/examples/holdingDetailResults.sample new file mode 100644 index 00000000..340a62a2 --- /dev/null +++ b/mod-orders/examples/holdingDetailResults.sample @@ -0,0 +1,53 @@ +{ + "e54b1f4d-7d05-4b1a-9368-3c36b75d8ac1": { + "pieces_detail_collection": { + "pieces_detail": [ + { + "id": "8d0e7e3e-8e4f-4f3c-9c9e-1a2b3c4d5e6f", + "itemId": "7a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d", + "tenantId": "consortium" + }, + { + "id": "9e1f2a3b-4c5d-6e7f-8a9b-0c1d2e3f4a5b", + "itemId": "8b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e", + "tenantId": "consortium" + } + ], + "totalRecords": 2 + }, + "items_detail_collection": { + "items_detail": [ + { + "id": "7a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d", + "tenantId": "university" + }, + { + "id": "8b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e", + "tenantId": "university" + } + ], + "totalRecords": 2 + } + }, + "f65c2g5e-8e16-5c2b-a479-4d47c86e9bd2": { + "pieces_detail_collection": { + "pieces_detail": [ + { + "id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d", + "itemId": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e", + "tenantId": "consortium" + } + ], + "totalRecords": 1 + }, + "items_detail_collection": { + "items_detail": [ + { + "id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e", + "tenantId": "consortium" + } + ], + "totalRecords": 1 + } + } +} diff --git a/mod-orders/schemas/holdingDetail.json b/mod-orders/schemas/holdingDetail.json new file mode 100644 index 00000000..f7c753df --- /dev/null +++ b/mod-orders/schemas/holdingDetail.json @@ -0,0 +1,62 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "description": "The contents of the dynamic map holding details", + "properties": { + "pieces_detail_collection": { + "type": "object", + "properties": { + "pieces_detail": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "UUID of the piece record", + "$ref": "../../../raml-util/schemas/uuid.schema" + }, + "itemId": { + "description": "UUID of the associated item record", + "$ref": "../../../raml-util/schemas/uuid.schema" + }, + "tenantId": { + "description": "Associated tenant in ECS-enabled environments", + "type": "string" + } + } + } + }, + "totalRecords": { + "description": "Total number of records in the array", + "type": "integer" + } + } + }, + "items_detail_collection": { + "type": "object", + "properties": { + "items_detail": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "UUID of the item record", + "$ref": "../../../raml-util/schemas/uuid.schema" + }, + "tenantId": { + "description": "Associated tenant in ECS-enabled environments", + "type": "string" + } + } + } + }, + "totalRecords": { + "description": "Total number of records in the array", + "type": "integer" + } + } + } + }, + "additionalProperties": false +} diff --git a/mod-orders/schemas/holdingDetailCollection.json b/mod-orders/schemas/holdingDetailCollection.json new file mode 100644 index 00000000..41d8eb1b --- /dev/null +++ b/mod-orders/schemas/holdingDetailCollection.json @@ -0,0 +1,20 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "A collection of holding ids to retrieved the holding details", + "type": "object", + "properties": { + "holdingIds": { + "description": "An array of holding ids", + "id": "holdingIds", + "type": "array", + "items": { + "type": "object", + "$ref": "../../../raml-util/schemas/uuid.schema" + } + } + }, + "additionalProperties": false, + "required": [ + "holdingIds" + ] +} diff --git a/mod-orders/schemas/holdingDetailResults.json b/mod-orders/schemas/holdingDetailResults.json new file mode 100644 index 00000000..8ae97403 --- /dev/null +++ b/mod-orders/schemas/holdingDetailResults.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "A dynamic map of holding details", + "type": "object", + "additionalProperties": { + "$ref": "holdingDetail.json" + } +} From c5f86a70e78b8a351ab2ade3928348fff21996b3 Mon Sep 17 00:00:00 2001 From: BKadirkhodjaev Date: Mon, 5 Jan 2026 18:33:49 +0500 Subject: [PATCH 2/2] [MODORDERS-1371]. Fix linting issues --- mod-orders/schemas/holdingDetail.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod-orders/schemas/holdingDetail.json b/mod-orders/schemas/holdingDetail.json index f7c753df..843f4125 100644 --- a/mod-orders/schemas/holdingDetail.json +++ b/mod-orders/schemas/holdingDetail.json @@ -4,9 +4,11 @@ "description": "The contents of the dynamic map holding details", "properties": { "pieces_detail_collection": { + "description": "Collection of piece details for the holding", "type": "object", "properties": { "pieces_detail": { + "description": "Array of piece details", "type": "array", "items": { "type": "object", @@ -33,9 +35,11 @@ } }, "items_detail_collection": { + "description": "Collection of item details for the holding", "type": "object", "properties": { "items_detail": { + "description": "Array of item details", "type": "array", "items": { "type": "object",