diff --git a/.github/ISSUE_TEMPLATE/issue.md b/.github/ISSUE_TEMPLATE/issue.md new file mode 100644 index 0000000..7b10298 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue.md @@ -0,0 +1,64 @@ +## Description + + + +## Goals + +- [ ] Goal 1 +- [ ] +- [ ] + +## Expected Outcome + +**Objective Outcomes:** +1. Outcome 1 +2. Outcome 2 + +## Acceptance Criteria + +- [ ] Criteria 1 +- [ ] Criteria 2 +- [ ] Criteria 3 + +## Implementation Details + +1. +2. +3. + +## Screenshots & Videos + +## Mockups / Wireframes + +(Placeholder for any mockups or wireframes, if available) + +### Product Name + +Beckn + +### Project Name + +beckn-onix-gui + +### Organization Name: + +Beckn Open Collective + +### Domain + + +### Tech Skills Needed: + +React,bash,javascript,nextjs + +### Mentors + +@venkatramanm @raviprakash + +### Category + +Feature + +### Sub Category + +API, Frontend, Backend diff --git a/.gitignore b/.gitignore index c6bba59..b546895 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Logs +.DS_Store logs *.log npm-debug.log* diff --git a/README.md b/README.md index 0512dd0..ee5d669 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,32 @@ -# onix -beckn onix +# Beckn-ONIX + +Beckn-ONIX is [FIDE](https://fide.org/) project aimed at easing setup and maintainance of a [Beckn](https://becknprotocol.io/) Network using reference implementations. Objectives include setting up reliable, configurable and fast Beckn network as a virtual appliance. This initiative is independent of the evolution of the Beckn protocol. This effort is also aimed at inviting contributions from the community to create secure, reliable builds for production environments. + +> Disclaimer : Beckn-onix is a reference implementation of the Beckn-onix stack. It is a reference application only and has not been tested for production environmens. However, implementers can fork this repository and build it for scale. The maintainer of this repository holds no liabillity for deployments of this application in production environments. + +## GUI Installer + +There is a community contributed browser based GUI installer to install multi-node reference implementation Beckn network. Refer to the [Installation Guide](./onix-gui/GUI/README.md) and [wizard guide](./onix-gui/README.md) for details. + +Here is a [Demo Video](https://drive.google.com/file/d/1p1c1N9vCj-Rv0kBAsRIQ-KFfORTc1DjJ/view?usp=sharing) on how to use beckn-onix GUI: + +[![Beckn Onix GUI](https://mishalabdullah.xyz/images/beckn-cli-youtube.png)](https://drive.google.com/file/d/1p1c1N9vCj-Rv0kBAsRIQ-KFfORTc1DjJ/view?usp=sharing) + +## CLI Installer + +For those comfortable with CLI, there is a command line installer to install multi-node reference implementation Beckn network. Refer to the [User Guide](./docs/user_guide.md) and [Setup Walkthrough](./docs/setup_walkthrough.md) for details. + +Here is a [Demo Video](https://drive.google.com/file/d/1PfdhIpq-Qo6sDy0wAnO0zllCMGX718FW/view?usp=sharing) on how to use beckn-onix CLI: + +[![Beckn Onix CLI](https://mishalabdullah.xyz/images/beckn-gui-youtube.png)](https://drive.google.com/file/d/1PfdhIpq-Qo6sDy0wAnO0zllCMGX718FW/view?usp=sharing) + +## Other documents + +- [Release Notes](./docs/release_notes.md) +- [Known Issues](./docs/known_issues.md) +- [Frequently asked questions (FAQ)](./docs/faq.md) +- **[Note on mandatory layer 2 configuration(Important)](./docs/notes/mandatory_layer_2_config.md).** +- **[Troubleshooting doc](https://github.com/beckn/missions/blob/main/docs/troubleshoot.md).** +- **[Log Interpretation](https://github.com/beckn/missions/blob/main/docs/log-interpretation.md).** + +Experience the convenience and efficiency of Beckn-ONIX as you embark on your journey with Beckn protocols and open networks. diff --git a/artifacts/ONIX - PS Client.postman_collection.json b/artifacts/ONIX - PS Client.postman_collection.json new file mode 100644 index 0000000..82a2ad8 --- /dev/null +++ b/artifacts/ONIX - PS Client.postman_collection.json @@ -0,0 +1,237 @@ +{ + "info": { + "_postman_id": "cacfa6d5-ccdd-4225-9fdd-3d4a507e9884", + "name": "ONIX - PS Client", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "13127879" + }, + "item": [ + { + "name": "Industry-4.0", + "item": [ + { + "name": "Search", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"context\": {\n \"domain\": \"{{supply_chain}}\",\n \"location\": {\n \"city\": {\n \"name\": \"Bangalore\",\n \"code\": \"std:080\"\n },\n \"country\": {\n \"name\": \"India\",\n \"code\": \"IND\"\n }\n },\n \"action\": \"search\",\n \"version\": \"1.1.0\",\n \"timestamp\": \"2023-10-09T04:46:28.012Z\",\n \"bap_id\": \"{{bap_id}}\",\n \"bap_uri\": \"{{bap_uri}}\",\n \"bpp_id\": \"{{bpp_id}}\",\n \"bpp_uri\": \"{{bpp_uri}}\",\n \"transaction_id\": \"a9aaecca-10b7-4d19-b640-b047a7c62195\",\n \"message_id\": \"{{$randomUUID}}\"\n },\n \"message\": {\n \"intent\": {\n \"category\": {\n \"descriptor\": {\n \"name\": \"assembly\"\n }\n }\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url_assembly}}/search", + "host": [ + "{{base_url_assembly}}" + ], + "path": [ + "search" + ] + } + }, + "response": [] + }, + { + "name": "Select", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"context\": {\n \"domain\": \"{{supply_chain}}\",\n \"location\": {\n \"country\": {\n \"code\": \"IND\"\n }\n },\n \"action\": \"select\",\n \"timestamp\": \"2023-05-25T05:23:03.443Z\",\n \"version\": \"1.1.0\",\n \"bap_id\": \"{{bap_id}}\",\n \"bap_uri\": \"{{bap_uri}}\",\n \"bpp_id\": \"{{bpp_id}}\",\n \"bpp_uri\": \"{{bpp_uri}}\",\n \"transaction_id\": \"a9aaecca-10b7-4d19-b640-b047a7c62195\",\n \"message_id\": \"{{$randomUUID}}\",\n \"ttl\": \"PT10M\"\n },\n \"message\": {\n \"order\": {\n \"provider\":{\n \"id\":\"6\"\n },\n \"items\": [\n {\n \"id\": \"11\"\n }\n ]\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url_assembly}}/select", + "host": [ + "{{base_url_assembly}}" + ], + "path": [ + "select" + ] + } + }, + "response": [] + }, + { + "name": "Init", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"context\": {\n \"domain\": \"{{supply_chain}}\",\n \"location\": {\n \"country\": {\n \"code\": \"IND\"\n }\n },\n \"action\": \"init\",\n \"timestamp\": \"2023-05-25T05:23:03.443Z\",\n \"version\": \"1.1.0\",\n \"bap_id\": \"{{bap_id}}\",\n \"bap_uri\": \"{{bap_uri}}\",\n \"bpp_id\": \"{{bpp_id}}\",\n \"bpp_uri\": \"{{bpp_uri}}\",\n \"transaction_id\": \"a9aaecca-10b7-4d19-b640-b047a7c62195\",\n \"message_id\": \"{{$randomUUID}}\",\n \"ttl\": \"PT10M\"\n },\n \"message\": {\n \"order\": {\n \"provider\": {\n \"id\": \"6\"\n },\n \"items\": [\n {\n \"id\": \"11\"\n }\n ],\n \"billing\": {\n \"name\": \"Alice Smith\",\n \"address\": \"Apt 303, Maple Towers, Richmond Road, 560001\",\n \"state\": {\n \"name\": \"Jurong East\"\n },\n \"city\": {\n \"name\": \"Jurong East\"\n },\n \"email\": \"alice.smith@example.com\",\n \"phone\": \"9886098860\"\n }\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url_assembly}}/init", + "host": [ + "{{base_url_assembly}}" + ], + "path": [ + "init" + ] + } + }, + "response": [] + }, + { + "name": "Confirm", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"context\": {\n \"domain\": \"{{supply_chain}}\",\n \"location\": {\n \"country\": {\n \"code\": \"IND\"\n }\n },\n \"action\": \"confirm\",\n \"timestamp\": \"2023-05-25T05:23:03.443Z\",\n \"version\": \"1.1.0\",\n \"bap_id\": \"{{bap_id}}\",\n \"bap_uri\": \"{{bap_uri}}\",\n \"bpp_id\": \"{{bpp_id}}\",\n \"bpp_uri\": \"{{bpp_uri}}\",\n \"transaction_id\": \"a9aaecca-10b7-4d19-b640-b047a7c62195\",\n \"message_id\": \"{{$randomUUID}}\",\n \"ttl\": \"PT10M\"\n },\n \"message\": {\n \"order\": {\n \"items\": [\n {\n \"id\": \"11\"\n }\n ],\n \"fulfillments\": [\n {\n \"id\": \"10\",\n \"customer\": {\n \"contact\": {\n \"email\": \"fox.judie61234@abc.org\",\n \"phone\": \"+91-9999999999\"\n },\n \"person\": {\n \"name\": \"Judie Fox6\"\n }\n }\n }\n ],\n \"billing\": {\n \"name\": \"Industry buyer\",\n \"address\": \"B005 aspire heights, Jurong East, SGP, 680230\",\n \"state\": {\n \"name\": \"Jurong East\"\n },\n \"city\": {\n \"name\": \"Jurong East\"\n },\n \"email\": \"nobody@nomail.com\",\n \"phone\": \"9886098860\"\n }\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url_assembly}}/confirm", + "host": [ + "{{base_url_assembly}}" + ], + "path": [ + "confirm" + ] + } + }, + "response": [] + }, + { + "name": "Status", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"context\": {\n \"domain\": \"{{supply_chain}}\",\n \"location\": {\n \"country\": {\n \"code\": \"DE\"\n }\n },\n \"action\": \"status\",\n \"version\": \"1.1.0\",\n \"bap_id\": \"{{bap_id}}\",\n \"bap_uri\": \"{{bap_uri}}\",\n \"bpp_id\": \"{{bpp_id}}\",\n \"bpp_uri\": \"{{bpp_uri}}\",\n \"transaction_id\": \"a9aaecca-10b7-4d19-b640-b047a7c62195\",\n \"message_id\": \"{{$randomUUID}}\",\n \"timestamp\": \"2023-05-25T05:23:03.443Z\",\n \"ttl\": \"P30M\"\n },\n \"message\": {\n \"order_id\": \"9\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url_assembly}}/status", + "host": [ + "{{base_url_assembly}}" + ], + "path": [ + "status" + ] + } + }, + "response": [] + } + ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "base_url_prod", + "value": "https://strapi-bpp.becknprotocol.io/beckn-bpp-adapter/health-check", + "type": "string" + }, + { + "key": "base_url_dev", + "value": "https://strapi-bpp-dev.becknprotocol.io/beckn-bpp-adapter", + "type": "string" + }, + { + "key": "base_url_local", + "value": "http://localhost:1337/beckn-bpp-adapter", + "type": "string" + }, + { + "key": "dhp_consultation", + "value": "dhp:consultation:0.1.0", + "type": "string" + }, + { + "key": "supply_chain", + "value": "supply-chain-services:assembly", + "type": "string" + }, + { + "key": "odr", + "value": "online-dispute-resolution:0.1.0", + "type": "string" + }, + { + "key": "bpp_id", + "value": "onix-bpp.becknprotocol.io", + "type": "string" + }, + { + "key": "bpp_uri", + "value": "https://onix-bpp.becknprotocol.io", + "type": "string" + }, + { + "key": "bap_id", + "value": "onix-bap.becknprotocol.io", + "type": "string" + }, + { + "key": "bap_uri", + "value": "https://onix-bap.becknprotocol.io", + "type": "string" + }, + { + "key": "core_version", + "value": "1.1.0", + "type": "string" + }, + { + "key": "uei", + "value": "uei:charging", + "type": "string" + }, + { + "key": "base_url_ev", + "value": "http://ec2-13-126-143-70.ap-south-1.compute.amazonaws.com:5001", + "type": "string" + }, + { + "key": "base_url_assembly", + "value": "https://onix-bap-client.becknprotocol.io", + "type": "string" + } + ] +} \ No newline at end of file diff --git a/artifacts/ONIX Demo Collection.postman_collection.json b/artifacts/ONIX Demo Collection.postman_collection.json new file mode 100644 index 0000000..46c8f30 --- /dev/null +++ b/artifacts/ONIX Demo Collection.postman_collection.json @@ -0,0 +1,197 @@ +{ + "info": { + "_postman_id": "303038a6-0aee-4094-b5c3-45fef219cdef", + "name": "ONIX Demo Collection", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "31540449" + }, + "item": [ + { + "name": "UEI", + "item": [ + { + "name": "Search", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"context\": {\n \"domain\": \"uei:charging\",\n \"location\": {\n \"city\": {\n \"name\": \"Bangalore\",\n \"code\": \"std:080\"\n },\n \"country\": {\n \"name\": \"India\",\n \"code\": \"IND\"\n }\n },\n \"action\": \"search\",\n \"version\": \"1.1.0\",\n \"transaction_id\": \"fc24f1e9-6d01-44bf-888c-d5884ca0f66f\",\n \"message_id\": \"{{$randomUUID}}\",\n \"timestamp\": \"2023-10-09T04:46:28.012Z\",\n \"bpp_id\": \"{{bpp_id}}\",\n \"bpp_uri\": \"{{bpp_uri}}\",\n \"bap_id\": \"{{bap_id}}\",\n \"bap_uri\": \"{{bap_uri}}\"\n },\n \"message\": {\n \"intent\": {\n \"location\": {\n \"circle\": {\n \"gps\": \"12.423423,77.325647\",\n \"radius\": {\n \"type\": \"CONSTANT\",\n \"value\": \"5\",\n \"unit\": \"km\"\n }\n }\n }\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url}}/search", + "host": [ + "{{base_url}}" + ], + "path": [ + "search" + ] + } + }, + "response": [] + }, + { + "name": "Select", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"context\": {\n \"domain\": \"{{uei}}\",\n \"location\": {\n \"city\": {\n \"name\": \"Bangalore\",\n \"code\": \"std:080\"\n },\n \"country\": {\n \"name\": \"India\",\n \"code\": \"IND\"\n }\n },\n \"action\": \"select\",\n \"version\": \"1.1.0\",\n \"transaction_id\": \"fc24f1e9-6d01-44bf-888c-d5884ca0f66f\",\n \"message_id\": \"{{$randomUUID}}\",\n \"timestamp\": \"2023-10-09T04:46:28.012Z\",\n \"bpp_id\": \"{{bpp_id}}\",\n \"bpp_uri\": \"{{bpp_uri}}\",\n \"bap_id\": \"{{bap_id}}\",\n \"bap_uri\": \"{{bap_uri}}\"\n },\n \"message\": {\n \"order\": {\n \"provider\": {\n \"id\": \"1\"\n },\n \"items\": [\n {\n \"id\": \"1\"\n }\n ]\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url}}/select", + "host": [ + "{{base_url}}" + ], + "path": [ + "select" + ] + } + }, + "response": [] + }, + { + "name": "Init", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"context\": {\n \"domain\": \"{{uei}}\",\n \"location\": {\n \"city\": {\n \"name\": \"Bangalore\",\n \"code\": \"std:080\"\n },\n \"country\": {\n \"name\": \"India\",\n \"code\": \"IND\"\n }\n },\n \"action\": \"init\",\n \"version\": \"1.1.0\",\n \"transaction_id\": \"fc24f1e9-6d01-44bf-888c-d5884ca0f66f\",\n \"message_id\": \"{{$randomUUID}}\",\n \"timestamp\": \"2023-10-09T04:46:28.012Z\",\n \"bpp_id\": \"{{bpp_id}}\",\n \"bpp_uri\": \"{{bpp_uri}}\",\n \"bap_id\": \"{{bap_id}}\",\n \"bap_uri\": \"{{bap_uri}}\"\n },\n \"message\": {\n \"order\": {\n \"provider\": {\n \"id\": \"1\"\n },\n \"items\": [\n {\n \"id\": \"1\"\n }\n ],\n \"billing\": {\n \"name\": \"Alice Smith\",\n \"address\": \"Apt 303, Maple Towers, Richmond Road, 560001\",\n \"state\": {\n \"name\": \"Jurong East\"\n },\n \"city\": {\n \"name\": \"Jurong East\"\n },\n \"email\": \"alice.smith@example.com\",\n \"phone\": \"9886098860\"\n }\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url}}/init", + "host": [ + "{{base_url}}" + ], + "path": [ + "init" + ] + } + }, + "response": [] + }, + { + "name": "Confirm", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"context\": {\n \"domain\": \"{{uei}}\",\n \"location\": {\n \"city\": {\n \"name\": \"Bangalore\",\n \"code\": \"std:080\"\n },\n \"country\": {\n \"name\": \"India\",\n \"code\": \"IND\"\n }\n },\n \"action\": \"confirm\",\n \"version\": \"1.1.0\",\n \"transaction_id\": \"fc24f1e9-6d01-44bf-888c-d5884ca0f66f\",\n \"message_id\": \"{{$randomUUID}}\",\n \"timestamp\": \"2023-10-09T04:46:28.012Z\",\n \"bpp_id\": \"{{bpp_id}}\",\n \"bpp_uri\": \"{{bpp_uri}}\",\n \"bap_id\": \"{{bap_id}}\",\n \"bap_uri\": \"{{bap_uri}}\"\n },\n \"message\": {\n \"order\": {\n \"items\": [\n {\n \"id\": \"1\"\n }\n ],\n \"fulfillments\": [\n {\n \"id\": \"1\",\n \"customer\": {\n \"contact\": {\n \"email\": \"fox.judie61234@abc.org\",\n \"phone\": \"+91-9999999999\"\n },\n \"person\": {\n \"name\": \"Judie Fox6\"\n }\n }\n }\n ],\n \"billing\": {\n \"name\": \"Industry buyer\",\n \"address\": \"B005 aspire heights, Jurong East, SGP, 680230\",\n \"state\": {\n \"name\": \"Jurong East\"\n },\n \"city\": {\n \"name\": \"Jurong East\"\n },\n \"email\": \"nobody@nomail.com\",\n \"phone\": \"9886098860\"\n }\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url}}/confirm", + "host": [ + "{{base_url}}" + ], + "path": [ + "confirm" + ] + } + }, + "response": [] + }, + { + "name": "Status", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"context\": {\n \"domain\": \"{{uei}}\",\n \"location\": {\n \"city\": {\n \"name\": \"Bangalore\",\n \"code\": \"std:080\"\n },\n \"country\": {\n \"name\": \"India\",\n \"code\": \"IND\"\n }\n },\n \"action\": \"status\",\n \"version\": \"1.1.0\",\n \"transaction_id\": \"fc24f1e9-6d01-44bf-888c-d5884ca0f66f\",\n \"message_id\": \"{{$randomUUID}}\",\n \"timestamp\": \"2023-10-09T04:46:28.012Z\",\n \"bpp_id\": \"{{bpp_id}}\",\n \"bpp_uri\": \"{{bpp_uri}}\",\n \"bap_id\": \"{{bap_id}}\",\n \"bap_uri\": \"{{bap_uri}}\"\n },\n \"message\": {\n \"order_id\": \"1\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url}}/status", + "host": [ + "{{base_url}}" + ], + "path": [ + "status" + ] + } + }, + "response": [] + } + ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "bpp_id", + "value": "onix-bpp.becknprotocol.io", + "type": "string" + }, + { + "key": "bpp_uri", + "value": "https://onix-bpp.becknprotocol.io", + "type": "string" + }, + { + "key": "bap_id", + "value": "onix-bap.becknprotocol.io", + "type": "string" + }, + { + "key": "bap_uri", + "value": "https://onix-bap.becknprotocol.io", + "type": "string" + }, + { + "key": "core_version", + "value": "1.1.0", + "type": "string" + }, + { + "key": "base_url", + "value": "https://onix-bap-client.becknprotocol.io", + "type": "string" + } + ] +} \ No newline at end of file diff --git a/aws-cdk/.gitignore b/aws-cdk/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/aws-cdk/.gitignore @@ -0,0 +1 @@ + diff --git a/aws-cdk/readme.md b/aws-cdk/readme.md new file mode 100644 index 0000000..b2dfdc6 --- /dev/null +++ b/aws-cdk/readme.md @@ -0,0 +1 @@ +### readme for aws-cdk diff --git a/docs/archive/START_BECKN.md b/docs/archive/START_BECKN.md new file mode 100644 index 0000000..827b4bd --- /dev/null +++ b/docs/archive/START_BECKN.md @@ -0,0 +1,95 @@ +# Beckn-ONIX Setup Script + +## Overview + +This shell script, `start_beckn_v2.sh`, automates the setup of Beckn components, including the Registry, Gateway, Protocol Server BAP, Protocol Server BPP, Sandbox, Webhook, and supporting services such as MongoDB, Redis, and RabbitMQ. + +## How to Use + +1. **Clone the Repository:** + + ```bash + git clone -b main https://github.com/beckn/onix.git + ``` + +2. **Navigate to the Script Directory:** + + ```bash + cd onix/install + ``` + +3. **Run the Setup Script:** + + ```bash + ./start_beckn_v2.sh + ``` + + The script will guide you through the installation. + +## Installation Sequence - Design + +1. **Install Required Packages:** + It will install Docker, Docker-Compose, and jq packages which are required for this setup. + + ```bash + ./package_manager.sh + ``` + +2. **Install Registry Service:** + + ```bash + ./start_container registry + ``` + +3. **Install Gateway Service:** + + ```bash + ./update_gateway_details.sh registry + ./start_container gateway + ./register_gateway.sh + ``` + +4. **Start Supporting Services:** + + - MongoDB + - RabbitMQ + - Redis + + ```bash + ./start_support_services + ``` + +5. **Install Protocol Server for BAP:** + + ```bash + ./update_bap_config.sh + ./start_container "bap-client" + ./start_container "bap-network" + ``` + +6. **Install Sandbox:** + + ```bash + ./start_container "sandbox-api" + ``` + +7. **Install Protocol Server for BPP:** + + ```bash + ./update_bpp_config.sh + ./start_container "bpp-client" + ./start_container "bpp-network" + ``` + +## Post-Installation Details + +Upon successful execution, the script provides the following details for use in the Postman collection: +For Example + +```bash +BASE_URL=http://172.18.0.7:5001/ +BAP_ID=bap-network +BAP_URI=http://172.18.0.11:5002/ +BPP_ID=bpp-network +BPP_URI=http://172.18.0.12:6002/ +``` diff --git a/docs/contribution.md b/docs/contribution.md new file mode 100644 index 0000000..2c60789 --- /dev/null +++ b/docs/contribution.md @@ -0,0 +1,19 @@ +## Contribution + +We welcome contribution from the community both for Beckn-ONIX project as well as initiatives to add such tools in different production environment. Use the following process to contribute to this project + +### Process to raise issues + +- Check in the [issues](https://github.com/beckn/beckn-onix/issues) section to see if a similar issue or enhancement has been already raised +- If there is an issue already present, use the comment facility in the issue to add your input +- If there is no issue and you feel it needs to be raised, use the New Issue button. A template will be present. Use it to fill the various parts. +- Track the issue you raised and communicate using comments + +### Process to fix issues + +- Once an issue has been raised and validated, any interested contributor can assign it to himself and work on it. +- Use the comment section of the issue to develop any concensus or for clarification +- Use the [forking and raising pull request](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project) guide here for the process of making your change and asking for it to be incorporated in the project +- Use the mentions (@ symbol followed by username e.g. @jjohn) to draw attention to the maintainers of the project. Usually the person committing the last few commits on the main branch is a good candidate to approach +- Once the maintainer has agreed with the changes, he will merge the changes into the right branch based on the branching strategy of the project. +- The issue will be closed after validation. diff --git a/docs/demo_scenarios.md b/docs/demo_scenarios.md new file mode 100644 index 0000000..8dc6a61 --- /dev/null +++ b/docs/demo_scenarios.md @@ -0,0 +1,45 @@ +## Introduction + +The [setup walkthrough](../docs/setup_walkthrough.md) and the accompanying video shows a story where we have the following steps + +1. We install a core Beckn network using Beckn-ONIX +2. We try to conduct a retail transaction, but it fails due to layer 2 config not being present +3. We install the layer 2 config for retail from and successfully complete a retail transaction +4. We try to perform a query to find charging station nearby (energy transaction), but it fails due to the layer 2 for energy being absent +5. We install the layer 2 config for energy +6. Now the energy transaction completes. + +In this document we list a few other demo stories where we can show a similar flow but with different domains. The steps are identical, but the story changes to involve different domains. + +## Healthcare + Mobility + +Alice wants to book a wellness center appointment and then book a cab to reach the clinic. + +1. We install a core Beckn network using Beckn-ONIX +2. Alice tries to conduct a healthcare booking, but it fails due to layer 2 config not being present +3. We install the layer 2 config for healthcare `https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples/dhp_1.1.0.yaml` and successfully complete a healthcare appointment booking +4. She tries to book a cab to reach the clinic, but it fails due to the layer 2 for mobility not being present +5. We install the layer 2 config for mobility `https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples/mobility_1.1.0.yaml` +6. Now Alice can book a cab and reach the clinic. + +## Mobility + Retail + +Bob wants to book a cab back home. He wants to buy groceries so he can pick it up on the way + +1. We install a core Beckn network using Beckn-ONIX +2. Bob tries to book a cab, but it fails due to layer 2 config not being present +3. We install the layer 2 config for mobility `https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples/mobility_1.1.0.yaml` and successfully complete the booking +4. He now wants to buy groceries from a shop on the way, but it fails due to the layer 2 for retail not being present +5. We install the layer 2 config for retail `https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples/retail_1.1.0.yaml` +6. Now Bob can complete the retail order and pick it up on the way home + +## Healthcare + Energy + +Cindy wants to schedule a wellness clinic visit, find charging stations near the clinic to get her bike charged while she is attending her appointment + +1. We install a core Beckn network using Beckn-ONIX +2. Cindy tries to book a wellness clinic appointment. It fails due to healthcare layer 2 being missing +3. We install the layer 2 config for healthcare `https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples/dhp_1.1.0.yaml` and Cindy can successfully book the appointment +4. Now she wants to find charging stations near the clinic, but it fails as energy layer 2 config is absent. +5. We install the layer 2 config for energy `https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples/uei_charging_1.1.0.yaml` +6. Now Cindy can find charging stations near the clinic where she can drop the bike and have it charged while finishing her appointment diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 0000000..c341395 --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,37 @@ +## Beckn-ONIX FAQ + +**Q: What is Beckn-ONIX?** + +**A:** Beckn-ONIX is [FIDE](https://fide.org/) project aimed at easing setup and maintainance of a [Beckn](https://becknprotocol.io/) Network using reference implementations. Objectives include setting up reliable, configurable and fast Beckn network as a virtual appliance. + +**Q: Is Beckn-ONIX a protocol? Is Beckn-ONIX a new version of Beckn?** + +**A:** No Beckn-ONIX is not a protocol. Beckn-ONIX is not a new version of Beckn. Beckn-ONIX project just helps setup and maintain a Beckn network. This initiative is independent of the evolution of Beckn + +**Q: What components are installed when we setup a Beckn network with Beckn-ONIX?** + +**A:** When you setup a new Beckn network using Beckn-ONIX, the reference implementations of [Beckn Registry](https://github.com/beckn/beckn-registry-app), [Beckn Gateway](https://github.com/beckn/beckn-gateway-app), [BAP Beckn Adapter](https://github.com/beckn/protocol-server) and [BPP Beckn Adapter](https://github.com/beckn/protocol-server) + +**Q: Do I need anything more than Beckn-ONIX to do transactions?** + +**A:** Yes. Beckn-ONIX only installs the core network components. Refer to the [Sample deployment diagram](./user_guide.md/#sample-deployment-diagram) for a simple illustration of the various components. As you see in that diagram, apart from the core network components, you would need a buyer side application and a seller side application to perform transactions. Typically you will be implementing one or both of these. If you are only implementing one side of it, you can use sample applications or postman as the other application. + +**Q: Do I have to use Beckn-ONIX to install these reference components?** + +**A:** No. If you are comfortable you can install the reference implementations of [Beckn Registry](https://github.com/beckn/beckn-registry-app), [Beckn Gateway](https://github.com/beckn/beckn-gateway-app), [BAP Beckn Adapter](https://github.com/beckn/protocol-server) and [BPP Beckn Adapter](https://github.com/beckn/protocol-server) directly from the repositories. Beckn-ONIX makes the tasks easier through guided installation. + +**Q: Do I have to use these reference components to get onto Beckn network? Can I write them myself** + +**A:** Sure. As the name suggests, these are just reference components and their objective is to get you started easily. You can however write your own implementation of the Beckn protocol using the tech stack you like. + +**Q: The user guide mentions Nginx for reverse proxy. Can I use any other program as reverse proxy** + +**A:** Yes. You can use other programs. The user guide uses Nginx primarily as an example. The instructions to configure the reverse proxy might change. In particular, for the flow we have you might need to identify how to install SSL certificates and how to proxy a request to a port based on the requested URL. + +**Q: Is Beckn-ONIX the best way to setup and manage Beckn network?** + +**A:** No. Beckn-ONIX is just one effort to kick start the process of creating tools to aid easy creation and operation of Beckn networks. We want the community to create even better tools for different production environments. + +**Q: How do I contribute to this project?** + +**A:** We welcome contributions both to this project as well as initiatives in other production environment. Refer to the [contribution guide](./contribution.md) for more details on the process. diff --git a/docs/images/message_validation_in_ba.png b/docs/images/message_validation_in_ba.png new file mode 100644 index 0000000..6107222 Binary files /dev/null and b/docs/images/message_validation_in_ba.png differ diff --git a/docs/images/request_flow.png b/docs/images/request_flow.png new file mode 100644 index 0000000..08f4e7f Binary files /dev/null and b/docs/images/request_flow.png differ diff --git a/docs/images/reverse_proxy_configuration.png b/docs/images/reverse_proxy_configuration.png new file mode 100644 index 0000000..144df85 Binary files /dev/null and b/docs/images/reverse_proxy_configuration.png differ diff --git a/docs/images/sample_deployment.png b/docs/images/sample_deployment.png new file mode 100644 index 0000000..3343f7a Binary files /dev/null and b/docs/images/sample_deployment.png differ diff --git a/docs/known_issues.md b/docs/known_issues.md new file mode 100644 index 0000000..3ea1530 --- /dev/null +++ b/docs/known_issues.md @@ -0,0 +1,21 @@ +# Known issues + +## Gateway is not working after restart + +**First Reported:** +2024-07-19 + +**Problem:** +Gateway keeps on restarting on bootup. It happened after the machine was restarted. The gateway has not been updated and still it is crashing. + +**Root Cause:** +The version of Gateway that was installed prior to July 18 2024, had hard coded a short list of standard registries. This included a registry which has been decomissioned in August. The result of this is that the gateway tries to contact this decomissioned registry during bootup and since it cannot find it, crashes and restarts. This happens with older gateways even without updating the software. If the old gateway software was restarted due to whatever reason, this issue starts to show up. + +**Solution:** +Update the gateway software with the new image (built after July 18 2024). This has removed the hard code of the decomissioned registry and everything should work ok. The following is one way of updating the gateway software. Perform these on the machine that has the gateway container within the beckn-onix/install folder after updating the beckn-onix git clone. + +``` +$ docker-compose -f docker-compose-gateway.yml down +$ docker rmi fidedocker/gateway +$ docker-compose -f docker-compose-gateway.yml up --detach +``` diff --git a/docs/notes/mandatory_layer_2_config.md b/docs/notes/mandatory_layer_2_config.md new file mode 100644 index 0000000..e283eb7 --- /dev/null +++ b/docs/notes/mandatory_layer_2_config.md @@ -0,0 +1,24 @@ +## Note on mandatory Layer 2 Config (Important) + +This note will eventually be moved to a proper place in the documentation. It has been put here to alert people who run Beckn-ONIX in the meantime. +Beckn-ONIX mandates availability of Layer 2 Config for a particular domain before any transactions can be conducted on it. If the layer 2 config is not present, on either the BAP or the BPP, the following error is returned back to the caller. "Config error : Layer 2 config not found." + +Usually the network facilitators will host the Layer 2 config and provide a way to access it. Currently we have a small script (layer2/download_layer_2_config_bap.sh and layer2/download_layer_2_config_bpp.sh) that can download the layer 2 config from a fixed location and insert it into the docker container that runs the Protocol Server Client. + +- In case you do not have layer 2 config file with you, some sample files are hosted in this repo in this [folder](../../layer2/samples/) +- In case you do not have layer 2 config file with you, and the samples folder does not have the domain that you need, as developer machine workaround, you can copy the core_version.yaml(e.g. core_1.1.0.yaml) and rename it as the layer 2 config for a domain (e.g. for a domain named retail for core version 1.1.0, retail_1.1.0.yaml). This is strictly not recommended for production networks. +- If you have the Layer 2 config file with you and not hosted, you can use the following procedure to update it manually. + +Process to manually update layer 2 config. + +``` +docker cp "$FILENAME" "$CONTAINER_NAME":"$CONTAINER_PATH/$FILENAME" + +# example +docker cp retail_1.1.0.yaml bap-client:/usr/src/app/schemas/retail_1.1.0.yaml +docker cp retail_1.1.0.yaml bap-network:/usr/src/app/schemas/retail_1.1.0.yaml + +docker cp retail_1.1.0.yaml bpp-client:/usr/src/app/schemas/retail_1.1.0.yaml +docker cp retail_1.1.0.yaml bpp-netork:/usr/src/app/schemas/retail_1.1.0.yaml + +``` diff --git a/docs/notes/sample_nginx_configurations.md b/docs/notes/sample_nginx_configurations.md new file mode 100644 index 0000000..03d191e --- /dev/null +++ b/docs/notes/sample_nginx_configurations.md @@ -0,0 +1,518 @@ +# Nginx sample configuration for the different components + +This document lists the various Nginx configuration sample files used in the demo. These use the URLs used as example in the user guide and demo walkthrough. These can be used as a reference. This diagram illustrates the proxy_pass configuration (which is the primary part required) of all the nodes. If you know reverse proxy configuration, this diagram is all you need and you can ignore the rest of this page. + +![Reverse Proxy Configuration](../images/reverse_proxy_configuration.png) + +## Nginx sample configuration for Registry + +Here is a sample Nginx configuration file for the registry. It uses the 'https://onix-registry.becnkprotocol.io' as the example Registry URL. + +``` +server { + listen 80; + listen [::]:80; + server_name onix-registry.becknprotocol.io; + + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + underscores_in_headers on; + gzip on; + gzip_disable "msie6"; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_buffers 16 8k; + gzip_http_version 1.1; + gzip_min_length 256; + gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss application/javascript text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon font/woff font/woff2 application/octet-stream font/ttf ; + + server_name onix-registry.becknprotocol.io; + + ssl_certificate /etc/letsencrypt/live/onix-registry.becknprotocol.io/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/onix-registry.becknprotocol.io/privkey.pem; + #include /etc/letsencrypt/options-ssl-nginx.conf; + #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + access_log /var/log/nginx/app_beckn_registry_access.log; + error_log /var/log/nginx/app_beckn_registry_error.log debug; + client_max_body_size 10M; + + location / { + if ($uri ~* "\.(jpg|jpeg|png|gif|ico|ttf|eot|svg|woff|woff2|css|js)$") { + add_header 'Cache-Control' 'no-cache'; + } + + #aio threads=default; + + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + #proxy_http_version 1.1; + proxy_set_header X-URIScheme https; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_pass "http://localhost:3030"; + + + set $cors 'true'; + +# if ($http_origin ~ '^https?://(localhost|registry-energy\.becknprotocol\.io)$') { +# set $cors 'true'; +# } +# + add_header 'Access-Control-Allow-Origin' "$http_origin" always; + + if ($cors = 'true') { + add_header 'Access-Control-Allow-Credentials' 'true' always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,Range,ApiKey,pub_key_format' always; + } + + if ($request_method = 'OPTIONS') { + add_header 'Access-Control-Allow-Origin' "$http_origin" always; + add_header 'Access-Control-Allow-Credentials' 'true' always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,Range,ApiKey,pub_key_format' always; + add_header 'Access-Control-Max-Age' 1728000; + add_header 'Content-Type' 'text/plain charset=UTF-8'; + add_header 'Content-Length' 0; + return 204; + } + } +} +``` + +## Nginx sample configuration for Gateway + +Here is a sample Nginx configuration for the gateway. It uses the 'https://onix-gateway.becknprotocol.io' as the example Gateway URL. + +``` +server { + server_name onix-gateway.becknprotocol.io; + + gzip on; + gzip_disable "msie6"; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_buffers 16 8k; + gzip_http_version 1.1; + gzip_min_length 256; + gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss application/javascript text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon font/woff font/woff2 application/octet-stream font/ttf ; + + + + access_log /var/log/nginx/app_beckn_gateway_access.log; + error_log /var/log/nginx/app_beckn_gateway_error.log; + client_max_body_size 10M; + + ### ssl config - customize as per your setup ### +keepalive_timeout 70; +ignore_invalid_headers off; + + location / { + if ($uri ~ "^(.*)\.(jpg|jpeg|png|gif|ico|ttf|eot|svg|woff|woff2|css|js)$") { + add_header 'Cache-Control' no-cache ; + } + aio threads=default ; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-URIScheme https; + proxy_pass http://localhost:4030/; + set $cors ''; + if ($http_origin ~ '^https?://(localhost|onix\-gateway\.becknprotocol\.io)') { + set $cors 'true'; + } + add_header 'Access-Control-Allow-Origin' "$http_origin" always; + + if ($cors = 'true') { + #add_header 'Access-Control-Allow-Origin' "$http_origin" always; + add_header 'Access-Control-Allow-Credentials' 'true' always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,Range,ApiKey,pub_key_format' always; + } + + if ($request_method = 'OPTIONS') { + add_header 'Access-Control-Allow-Origin' "$http_origin" always; + add_header 'Access-Control-Allow-Credentials' 'true' always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,Range,ApiKey,pub_key_format' always; + # Tell client that this pre-flight info is valid for 20 days + add_header 'Access-Control-Max-Age' 1728000; + add_header 'Content-Type' 'text/plain charset=UTF-8'; + add_header 'Content-Length' 0; + return 204; + } + } + + + listen 443 ssl; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/onix-gateway.becknprotocol.io/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/onix-gateway.becknprotocol.io/privkey.pem; + #include /etc/letsencrypt/options-ssl-nginx.conf; + #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + +} + +server { + if ($host = onix-gateway.becknprotocol.io) { + return 301 https://$host$request_uri; + } + + + listen 80; +listen [::]:80; +server_name onix-gateway.becknprotocol.io; + return 404; + + +} +``` + +## Nginx sample configuration for BAP + +The BAP requires two URLs. One is for the BAP network (e.g https://onix-bap.becknprotocol.io') which faces the Beckn network. The other is for the BAP client 'https://onix-bap-client.becknprotocol.io' which faces the buyer side applications. + +The following is a sample Nginx configuration for BAP client (e.g 'https://onix-bap-client.becknprotocol.io') + +``` +server { + listen 80; + listen [::]:80; + # Put the server name as website name . + server_name onix-bap-client.becknprotocol.io; + + location / { + # This for Host, Client and Forwarded For + #proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # For Web Sockets. + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + # For Proxy. + proxy_pass "http://localhost:5001"; + } +} + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + # Put the server name as website name . + server_name onix-bap-client.becknprotocol.io; + + # Point it to the port in which you want to run the server http://localhost:. + location / { + # This for Host, Client and Forwarded For + #proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # For Web Sockets. + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + # For Proxy. + proxy_pass "http://localhost:5001"; + } + + + # This is the path to certificate. /etc/letsencrypt/live//fullchain.pem + ssl_certificate /etc/letsencrypt/live/onix-bap-client.becknprotocol.io/fullchain.pem; + + + # This is the path to certificate. /etc/letsencrypt/live//privkey.pem + ssl_certificate_key /etc/letsencrypt/live/onix-bap-client.becknprotocol.io/privkey.pem; + + ssl_session_timeout 1d; + ssl_session_cache shared:MozSSL:10m; # about 40000 sessions + ssl_session_tickets off; + + # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam + # ssl_dhparam /path/to/dhparam; + + # intermediate configuration + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; + ssl_prefer_server_ciphers on; + + # HSTS (ngx_http_headers_module is required) (63072000 seconds) + add_header Strict-Transport-Security "max-age=63072000" always; + + # OCSP stapling + ssl_stapling on; + ssl_stapling_verify on; + + # verify chain of trust of OCSP response using Root CA and Intermediate certs + # ssl_trusted_certificate /path/to/root_CA_cert_plus_intermediates; + + # replace with the IP address of your resolver + resolver 8.8.8.8; +} +``` + +The following is a sample Nginx configuration for BAP Network (e.g. 'https://onix-bap.becknprotocol.io') + +``` +server { + listen 80; + listen [::]:80; + # Put the server name as website name . + server_name onix-bap.becknprotocol.io; + + location / { + # This for Host, Client and Forwarded For + #proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # For Web Sockets. + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + # For Proxy. + proxy_pass "http://localhost:5002"; + } +} + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + # Put the server name as website name . + server_name onix-bap.becknprotocol.io; + + # Point it to the port in which you want to run the server http://localhost:. + location / { + # This for Host, Client and Forwarded For + #proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # For Web Sockets. + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + # For Proxy. + proxy_pass "http://localhost:5002"; + } + + + # This is the path to certificate. /etc/letsencrypt/live//fullchain.pem + ssl_certificate /etc/letsencrypt/live/onix-bap.becknprotocol.io/fullchain.pem; + + + # This is the path to certificate. /etc/letsencrypt/live//privkey.pem + ssl_certificate_key /etc/letsencrypt/live/onix-bap.becknprotocol.io/privkey.pem; + + ssl_session_timeout 1d; + ssl_session_cache shared:MozSSL:10m; # about 40000 sessions + ssl_session_tickets off; + + # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam + # ssl_dhparam /path/to/dhparam; + + # intermediate configuration + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; + ssl_prefer_server_ciphers on; + + # HSTS (ngx_http_headers_module is required) (63072000 seconds) + add_header Strict-Transport-Security "max-age=63072000" always; + + # OCSP stapling + ssl_stapling on; + ssl_stapling_verify on; + + # verify chain of trust of OCSP response using Root CA and Intermediate certs + # ssl_trusted_certificate /path/to/root_CA_cert_plus_intermediates; + + # replace with the IP address of your resolver + resolver 8.8.8.8; +} +``` + +## Nginx sample configuration for BPP + +The BPP requires two URLs. One is for the BPP Network 'https://onix-bpp.becknprotocol.io' which faces the Beckn network. The other is for the BPP client 'https://onix-bpp-client.becknprotocol.io' which faces the seller side applciation. + +The following is the sample Nginx configuration for BPP client (e.g. 'https://onix-bpp-client.becknprotocol.io') + +``` +server { + listen 80; + listen [::]:80; + # Put the server name as website name . + server_name onix-bpp-client.becknprotocol.io; + + location / { + # This for Host, Client and Forwarded For + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # For Web Sockets. + #proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + # For Proxy. + proxy_pass "http://localhost:6001"; + } +} + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + # Put the server name as website name . + server_name onix-bpp-client.becknprotocol.io; + + # Point it to the port in which you want to run the server http://localhost:. + location / { + # This for Host, Client and Forwarded For + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # For Web Sockets. + #proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + # For Proxy. + proxy_pass "http://localhost:6001"; + } + + + # This is the path to certificate. /etc/letsencrypt/live//fullchain.pem + ssl_certificate /etc/letsencrypt/live/onix-bpp-client.becknprotocol.io/fullchain.pem; + + + # This is the path to certificate. /etc/letsencrypt/live//privkey.pem + ssl_certificate_key /etc/letsencrypt/live/onix-bpp-client.becknprotocol.io/privkey.pem; + + ssl_session_timeout 1d; + ssl_session_cache shared:MozSSL:10m; # about 40000 sessions + ssl_session_tickets off; + + # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam + # ssl_dhparam /path/to/dhparam; + + # intermediate configuration + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; + ssl_prefer_server_ciphers on; + + # HSTS (ngx_http_headers_module is required) (63072000 seconds) + add_header Strict-Transport-Security "max-age=63072000" always; + + # OCSP stapling + ssl_stapling on; + ssl_stapling_verify on; + + # verify chain of trust of OCSP response using Root CA and Intermediate certs + # ssl_trusted_certificate /path/to/root_CA_cert_plus_intermediates; + + # replace with the IP address of your resolver + resolver 8.8.8.8; +} +``` + +The following is the sample Nginx configuration for BPP Network (e.g. 'https://onix-bpp.becknprotocol.io') + +``` +server { + listen 80; + listen [::]:80; + # Put the server name as website name . + server_name onix-bpp.becknprotocol.io; + + location / { + # This for Host, Client and Forwarded For + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # For Web Sockets. + #proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + # For Proxy. + proxy_pass "http://localhost:6002"; + } +} + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + # Put the server name as website name . + server_name onix-bpp.becknprotocol.io; + + # Point it to the port in which you want to run the server http://localhost:. + location / { + # This for Host, Client and Forwarded For + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # For Web Sockets. + #proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + # For Proxy. + proxy_pass "http://localhost:6002"; + } + + + # This is the path to certificate. /etc/letsencrypt/live//fullchain.pem + ssl_certificate /etc/letsencrypt/live/onix-bpp.becknprotocol.io/fullchain.pem; + + + # This is the path to certificate. /etc/letsencrypt/live//privkey.pem + ssl_certificate_key /etc/letsencrypt/live/onix-bpp.becknprotocol.io/privkey.pem; + + ssl_session_timeout 1d; + ssl_session_cache shared:MozSSL:10m; # about 40000 sessions + ssl_session_tickets off; + + # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam + # ssl_dhparam /path/to/dhparam; + + # intermediate configuration + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; + ssl_prefer_server_ciphers on; + + # HSTS (ngx_http_headers_module is required) (63072000 seconds) + add_header Strict-Transport-Security "max-age=63072000" always; + + # OCSP stapling + ssl_stapling on; + ssl_stapling_verify on; + + # verify chain of trust of OCSP response using Root CA and Intermediate certs + # ssl_trusted_certificate /path/to/root_CA_cert_plus_intermediates; + + # replace with the IP address of your resolver + resolver 8.8.8.8; +} +``` diff --git a/docs/release_notes.md b/docs/release_notes.md new file mode 100644 index 0000000..7b98660 --- /dev/null +++ b/docs/release_notes.md @@ -0,0 +1,198 @@ +# Release Notes + +## Introduction + +Beckn-ONIX is [FIDE](https://fide.org/) project aimed at easing setup and maintainance of a [Beckn](https://becknprotocol.io/) Network using reference implementations. Objectives include setting up reliable, configurable and fast Beckn network as a virtual appliance. This initiative is independent of the evolution of the Beckn protocol. + +Experience the convenience and efficiency of Beckn-ONIX as you embark on your journey with Beckn protocols and open networks. + +| Version | Release Date | +| -------------------------------------------- | ------------ | +| [v0.4.1](#beckn-onix-version-041-2024-06-22) | 2024-06-22 | +| [v0.4.0](#beckn-onix-version-040-2024-05-06) | 2024-05-06 | +| [v0.3.0](#beckn-onix-version-030-2024-03-20) | 2024-03-20 | +| [v0.2.0](#beckn-onix-version-020-2024-03-01) | 2024-03-01 | +| [v0.1.0](#beckn-onix-version-010-2024-02-16) | 2024-02-16 | + +## Beckn-ONIX Version 0.4.1 (2024-06-22) + +- This release adds a new feature for in CLI where its will be able to merge multiple registries. + +### New Features + +- Merging registry A to registry B +- Creting a new super-registry from multiple registries. + +### Enhancements + +- None + +### Bug fixes + +- None + +### Limitations + +- None + +### Upcoming Version + +- GUI support for the Merging feature. + +### Release date + +2024-06-22 + +## Beckn-ONIX Version 0.4.0 (2024-05-06) + +- This release adds a new browser based GUI for installing Beckn network components + +### New Features + +- A new Browser based GUI installation wizard + +### Enhancements + +- Docker volumes used for data and config. Makes migration to new version of components easy +- New User Guide and Setup Walkthrough documents added to CLI installation + +### Bug fixes + +- BPP Beckn Adapter installation does not automatically install additional software (sandbox) +- Required Gateway configuration files are automatically filled (There was an error due to which this had to be manually done) + +### Limitations + +- GUI based installer only works on Ubuntu Linux +- There is a small error due to which the installation in progress toast for BAP and BPP does not stop, though the installation itself has succeeded +- The GUI installer needs Node, NPM and LocalTunnel to be installed before starting. + +### Release date + +2024-05-06 + +## Beckn-ONIX Version 0.3.0 (2024-03-20) + +- This release supports streamlined multi-node installation. +- Support added to mandata layer 2 configuration files for the domain +- The CLI has been modified to lead the user through the journey of bringing up a Beckn Network. +- Based on whether the user is setting up a new network or joining an existing one, workflow prompt is changed + +### New Features + +- Multi node installation +- New CLI interface to lead user through installation +- Layer 2 Config file is mandated before transactions can happen +- Ability to download layer 2 config file from web and install in BAP/BPP Beckn Adapter + +### Bug Fixes + +- None + +### Known Issues + +- Sometimes installation fails on machines without docker due to user not getting new group membership. Running installation again fixes the issue. +- Mount binds are used instead of docker volumes. Due to this data has to be migrated before deleting the installation folder. +- BPP installs Sandbox even when not requested. + +### Limitations + +- The beckn-onix.sh installer used for multi node. For single node installation the start_beckn.sh file has to be used. (This is not true anymore. The beckn-onix.sh has an option to install all components on a single machine) + +### Upcoming Version + +- A community driven GUI installer is in works + +### Release Date + +- 2024-03-01 + +## Beckn-ONIX Version 0.2.0 (2024-03-01) + +### New Features + +- This release focuses on enabling the installation of individual components with user-provided configurations. +- It extends support to the Windows operating system, specifically Windows 10. +- Additionally, it now supports the Mac operating system. + +This release is specifically designed to facilitate the deployment of individual components, offering users the flexibility to customize configurations. Furthermore, it ensures seamless compatibility with both Windows and Mac operating systems. + +For a comprehensive summary of the features, refer [here](https://github.com/beckn/beckn-utilities/milestone/1?closed=1) + +### Enhancements + +- Support for Windows operating system. +- Support for Mac operating system. +- Can be used to install specific components with custom configuration. + +### Bug Fixes + +- None + +### Known Issues + +- None + +### Limitations + +- The current installer is tested only for Linux (Ubuntu) / Windows (windows 10) / Mac, it might support other flavors also. +- The current version supports only vertical scaling, horizontal scaling (ECS / EKS) is planned for an upcoming release +- When installing individual components, registration with the registry has to be done manually, this is explicitly done to avoid confusion and to prevent the network from incorrect or wrong registrations. + +### Upcoming Version + +- Support for horizontal scaling using Elastic Kubernetes Cluster. + +### Release Date + +- 2024-03-01 + +## Beckn-ONIX Version 0.1.0 (2024-02-16) + +### Objective + +Beckn-ONIX - Open Network In A Box, is a utility designed to effortlessly set up all Beckn components on a machine using a one-click installer. This tool serves as a valuable resource for developers and network participants eager to explore Beckn protocols or join open networks supported by the Beckn protocol. By simplifying the installation process, Beckn-ONIX streamlines the onboarding experience. + +The current version installs all components automatically without requiring user input, facilitating a seamless setup process. However, we are committed to further enhancing Beckn-ONIX's functionality. In the upcoming release, we will introduce the capability to selectively install specific components and accommodate user-provided configurations. + +For a comprehensive summary of the features, refer [here](https://github.com/beckn/beckn-utilities/milestone/2?closed=1) + +Experience the convenience and efficiency of Beckn-ONIX as you embark on your journey with Beckn protocols and open networks. + +### New Features + +- Implemented installation support for the following Beckn components: + - Protocol Server BAP + - Protocol Server BPP + - Webhook BPP + - Sandbox + - Registry + - Gateway + - Infrastructure required for the above services + +This release is specifically tailored for deployment on Linux machines, encompassing all aforementioned components with default configurations. + +### Enhancements + +- None + +### Bug Fixes + +- None + +### Known Issues + +- None + +### Limitations + +- None + +### Upcoming Version + +- Installation of individual components with user-provided configuration. +- Support for Windows and Mac OS will be added. + +### Release Date + +- 2024-02-16 diff --git a/docs/setup_walkthrough.md b/docs/setup_walkthrough.md new file mode 100644 index 0000000..eedcbe5 --- /dev/null +++ b/docs/setup_walkthrough.md @@ -0,0 +1,421 @@ +# Steps to setup a new Beckn network and conduct transactions on it + +## Introduction + +This document describes setting up of a [Beckn network](https://becknprotocol.io/) with Beckn-ONIX and conducting transactions in a couple of domains (retail and energy). The general flow will involve the following steps: + +- [Setup the prerequisites](#overall-prerequisites) +- [Create a new network and install the registry](#create-a-new-network-and-install-the-registry) +- [Install a gateway for the network](#install-a-gateway-for-the-network) +- [Install a Beckn Adaptor for the BAP](#install-a-beckn-adaptor-for-the-bap) +- [Install a Beckn Adaptor for the BPP](#install-a-beckn-adaptor-for-the-bpp) +- [Change the status of the BAP and BPP on the registry as Subscribed](#change-the-status-of-the-bap-and-bpp-on-registry-to-subscribed) +- [Update BAP and BPP with the layer 2 configuration files for the domains we are interested in](#update-bap-and-bpp-with-the-layer-2-configuration-files-for-the-domains-we-are-interested-in) +- [Conduct successful transactions on the network](#conduct-successful-transactions-on-the-network) + +For the sake of illustration, all the urls are shown as subdomains of becknprotocol.io. These will not be available for you to configure on your network. When you are installing on your network, replace them with your own domain name. For example when the instruction below says "https://onix-registry.becknprotocol.io", if you own a domain "example.org", then what you enter will be "https://onix-registry.example.org". Of course you can give a different subdomain than `onix-registry`. However you should be consistent in using the same URL wherever registry url is required. + +Some of the outputs listed below might be different when you run the script for the first time. The output depends on whether the required docker containers are present in the machine or not. + +Run the following two commands on all machines where the script is being run for the first time. Login to a new shell for the command to take effect and continue with the installation. Not doing so will result in docker permisssion error + +``` +sudo groupadd docker +sudo usermod -aG docker $USER +``` + +Please refer to the [Beckn-ONIX User Guide](./user_guide.md) for detailed explanation of the below steps. + +## Sample deployment diagram + +The following diagram shows a conceptual view of a multi-node Bekn network that we will be setting up. The urls shown here are the same as those used in the examples. + +![Typical deployment](./images/sample_deployment.png) + +## Overall prerequisites + +- Setup the following subdomains at the registrar. Refer to [registering or adding domain or subdomain section](./user_guide.md/#appendix-a---registering-or-adding-domain-or-subdomains) + + - https://onix-registry.becknprotocol.io - point to machine with registry + - https://onix-gateway.becknprotocol.io - point to machine with gateway + - https://onix-bap-client.becknprotocol.io - point to machine with BAP + - https://onix-bap.becknprotocol.io - point to machine with BAP + - https://onix-bpp-client.becknprotocol.io - point to machine with BPP + - https://onix-bpp.becknprotocol.io - point to machine with BPP + +- Configure the reverse proxy to have the right ssl certificate installed for all the addresses above. Refer to [configuring ssl certificates on in reverse proxy](./user_guide.md/#ssl-certificates-configured-in-reverse-proxy) for more details +- Configure the reverse proxy with proxy_pass to configure the following routes. Refer to [configuring reverse proxy using proxy_pass](./user_guide.md/#configuring-nginx-reverse-proxy-using-proxy-pass) for details. + + - https://onix-registry.becknprotocol.io to port 3030 on the machine + - https://onix-gateway.becknprotocol.io to port 4030 on the machine + - https://onix-bap-client.becknprotocol.io to port 5001 on the machine + - https://onix-bap.becknprotocol.io to port 5002 on the machine + - https://onix-bpp-client.becknprotocol.io to port 6001 on the machine + - https://onix-bpp.becknprotocol.io to port 6002 on the machine + +![Reverse Proxy Configuration Illustrated](./images/reverse_proxy_configuration.png) + +- This guide assumes you have a marketplace or a headless store and want to set it up to work with the Beckn network. It is still useful for people who are developing the buyer side software and want to set it up with the network. In such cases a [sandbox](https://github.com/beckn/beckn-sandbox) might be required to mimic a marketplace or a headless shop. + +## Create a new network and install the registry + +- ssh into the virtual server that will hold the registry, clone the repo, change into the install folder and run the beckn-onix.sh script. + +``` +git clone https://github.com/beckn/beckn-onix.git +cd beckn-onix/install +./beckn-onix.sh +``` + +- In the prompt that comes up, choose setting up a new network. + +``` +Beckn-ONIX is a platform that helps you quickly launch and configure beckn-enabled networks. + +What would you like to do? +1. Join an existing network +2. Create new production network +3. Set up a network on your local machine +4. Merge multiple networks +5. Configure Existing Network +(Press Ctrl+C to exit) +Enter your choice: 2 + +``` + +- Further choose Registry as the platform you want to install + +``` +Which platform would you like to set up? +1. Registry +2. Gateway +3. BAP +4. BPP +Enter your choice: 1 +``` + +- Input the host name where the registry will reside as https://onix-registry.becknprotocol.io + +``` +Enter publicly accessible registry URL: https://onix-registry.becknprotocol.io +``` + +- The installation will complete to indicate that the registry has been installed. + +``` +................Installing required packages................ +Docker Bash completion is already installed. +docker-compose is already installed. +Package Installation is done +onix-registry.becknprotocol.io +................Installing Registry service................ +WARN[0000] /home/ec2-user/beckn-onix/install/docker-compose-v2.yml: `version` is obsolete +[+] Running 1/1 + ✔ Container registry Started 0.5s +Registry installation successful +[Installation Logs] +Your Registry setup is complete. +You can access your Registry at https://onix-registry.becknprotocol.io +Process complete. Thank you for using Beckn-ONIX! +``` + +## Install a gateway for the network + +Please refer to the [Setting up a gateway](./user_guide.md/#setting-up-a-gateway) section of the user guide for the prerequisites and additional information. + +- On the virtual server that will hold the gateway, clone the repo + +``` +git clone https://github.com/beckn/beckn-onix.git + +``` + +- Change into the install folder and run the beckn-onix.sh script. + +``` +cd beckn-onix/install +./beckn-onix.sh + +``` + +- In the prompt that comes up, choose joining an existing network. + +``` +Beckn-ONIX is a platform that helps you quickly launch and configure beckn-enabled networks. + +What would you like to do? +1. Join an existing network +2. Create new production network +3. Set up a network on your local machine +4. Merge multiple networks +5. Configure Existing Network +(Press Ctrl+C to exit) +Enter your choice: 1 + +``` + +- Choose the component to install as Gateway + +``` +Which platform would you like to set up? +1. Gateway +2. BAP +3. BPP +Enter your choice: 1 +``` + +- Input the URL of the registry we just now installed https://onix-registry.becknprotocol.io + +``` +Enter your registry URL: https://onix-registry.becknprotocol.io +``` + +- Input the Gateway URL https://onix-gateway.becknprotocol.io + +``` +Enter publicly accessible gateway URL: https://onix-gateway.becknprotocol.io +``` + +- The installation will complete to indicate the Gateway has been installed and registered with the registry + +``` +................Installing required packages................ +Docker Bash completion is already installed. +docker-compose is already installed. +Package Installation is done + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed +100 555 0 533 100 22 3551 146 --:--:-- --:--:-- --:--:-- 3724 +Signing Public Key: LlT+DXNzpEKenZuBfhaRl4vvgRxAI2wm8O7/2vmsb0E= +Encryption Public Key: qhlWmkfy6WgzSSsGFc9dDfu3Sm3ZbbFf1bYiG+2RjFw= +URL https://onix-registry.becknprotocol.io/subscribers +................Installing Gateway service................ +Creating gateway ... done +Registering Gateway in the registry +{ + "SWFHttpResponse" : { + "Message" : "" + ,"Status" : "OK" + } +} +Gateway installation successful +[Installation Logs] +Your Gateway setup is complete. +You can access your Gateway at https://onix-gateway.becknprotocol.io +Process complete. Thank you for using Beckn-ONIX! +``` + +## Install a Beckn Adaptor for the BAP + +- On the virtual server that will hold the BAP, clone the repo, change into the install folder and run the beckn-onix.sh script. + +``` +git clone https://github.com/beckn/beckn-onix.git +cd beckn-onix/install +./beckn-onix.sh + +``` + +- In the prompt that comes up, choose joining an existing network. + +``` +What would you like to do? +1. Join an existing network +2. Create new production network +3. Set up a network on your local machine +4. Merge multiple networks +5. Configure Existing Network +(Press Ctrl+C to exit) +Enter your choice: 1 +``` + +- Choose the component to install as BAP + +``` +Which platform would you like to set up? +1. Gateway +2. BAP +3. BPP +Enter your choice: 2 +``` + +- Input the BAP subscriber id - onix-bap.becknprotocol.io +- Input the BAP URL - https://onix-bap.becknprotocol.io +- Input the subscription endpoint of the registry - https://onix-registry.becknprotocol.io/subscribers + +``` +Enter BAP Subscriber ID: onix-bap.becknprotocol.io +Enter BAP Subscriber URL: https://onix-bap.becknprotocol.io +Enter the registry_url(e.g. https://registry.becknprotocol.io/subscribers)https://onix-registry.becknprotocol.io/subscribers +``` + +- The installation will complete to indicate the BAP Beckn Adaptor has installed. + +``` +................Installing required packages................ +Docker Bash completion is already installed. +docker-compose is already installed. +Package Installation is done +................Installing MongoDB................ +WARN[0000] /home/ubuntu/beckn-onix/install/docker-compose-app.yml: `version` is obsolete +[+] Running 1/1 + ✔ Container mongoDB Started 0.4s +MongoDB installation successful +................Installing RabbitMQ................ +WARN[0000] /home/ubuntu/beckn-onix/install/docker-compose-app.yml: `version` is obsolete +[+] Running 1/1 + ✔ Container rabbitmq Started 0.5s +RabbitMQ installation successful +................Installing Redis................ +WARN[0000] /home/ubuntu/beckn-onix/install/docker-compose-app.yml: `version` is obsolete +[+] Running 1/1 + ✔ Container redis Started 0.6s +Redis installation successful +Generating public/private key pair +Your Private Key: o1t1TvdFaHU1H+2wDTsCEJgMRU9zdVt20SeFRyT0nyOlZujB4B0XZX1bMlchKBUpHQ65/9BCj6aMzS0Rdf+dRw== +Your Public Key: pWboweAdF2V9WzJXISgVKR0Ouf/QQo+mjM0tEXX/nUc= +Configuring BAP protocol server +Registering BAP protocol server on the registry +Network Participant Entry is created. Please login to registry https://onix-registry.becknprotocol.io/subscribers and subscribe you Network Participant. +WARN[0000] /home/ubuntu/beckn-onix/install/docker-compose-v2.yml: `version` is obsolete +[+] Running 1/1 + ✔ Container bap-client Started 0.4s +WARN[0000] /home/ubuntu/beckn-onix/install/docker-compose-v2.yml: `version` is obsolete +[+] Running 1/1 + ✔ Container bap-network Started 0.5s +Protocol server BAP installation successful +[Installation Logs] +Your BAP setup is complete. +You can access your BAP at https://onix-bap.becknprotocol.io +Process complete. Thank you for using Beckn-ONIX! + +``` + +## Install a Beckn Adaptor for the BPP + +- On the virtual server that will hold the BPP, clone the repo, change into the install folder and run the beckn-onix.sh script. + +``` +git clone https://github.com/beckn/beckn-onix.git +cd beckn-onix/install +./beckn-onix.sh + +``` + +- In the prompt that comes up, choose joining an existing network. + +``` +What would you like to do? +1. Join an existing network +2. Create new production network +3. Set up a network on your local machine +4. Merge multiple networks +5. Configure Existing Network +(Press Ctrl+C to exit) +Enter your choice: 1 + +``` + +- Choose the component to install as BPP + +``` +Which platform would you like to set up? +1. Gateway +2. BAP +3. BPP +Enter your choice: 3 +``` + +- Input BPP subscriber id as onix-bpp.becknprotocol.io +- Input the BPP URL as https://onix-bpp.becknprotocol.io +- Input the registry URL to subscribe as https://onix-registry.becknprotocol.io/subscribers +- Input the webhook URL as the endpoint where your seller app or marketplace is. In case you do not have one, you can try 'https://unified-bpp.becknprotocol.io/beckn-bpp-adapter'. However the availability of a seller software for ever at this endpoint is not guaranteed (It currently is present) + +``` +Enter BPP Subscriber ID: onix-bpp.becknprotocol.io +Enter BPP Subscriber URL: https://onix-bpp.becknprotocol.io +Enter the registry_url(e.g. https://registry.becknprotocol.io/subscribers): https://onix-registry.becknprotocol.io/subscribers +Enter Webhook URL: https://unified-bpp.becknprotocol.io/beckn-bpp-adapter +``` + +- The installation will complete to indicate the BPP Beckn Adaptor has installed. + +``` +................Installing required packages................ +Docker Bash completion is already installed. +docker-compose is already installed. +Package Installation is done +................Installing MongoDB................ +WARN[0000] /home/ec2-user/beckn-onix/install/docker-compose-app.yml: `version` is obsolete +[+] Running 1/1 + ✔ Container mongoDB Started 0.4s +MongoDB installation successful +................Installing RabbitMQ................ +WARN[0000] /home/ec2-user/beckn-onix/install/docker-compose-app.yml: `version` is obsolete +[+] Running 1/1 + ✔ Container rabbitmq Started 0.6s +RabbitMQ installation successful +................Installing Redis................ +WARN[0000] /home/ec2-user/beckn-onix/install/docker-compose-app.yml: `version` is obsolete +[+] Running 1/1 + ✔ Container redis Started 0.6s +Redis installation successful +................Installing Protocol Server for BPP................ +Generating public/private key pair +Configuring BAP protocol server +Registering BPP protocol server on the registry +Network Participant Entry is created. Please login to registry https://onix-registry.becknprotocol.io/subscribers and subscribe you Network Participant. +WARN[0000] /home/ec2-user/beckn-onix/install/docker-compose-v2.yml: `version` is obsolete +[+] Running 1/1 + ✔ Container bpp-client Started 0.4s +WARN[0000] /home/ec2-user/beckn-onix/install/docker-compose-v2.yml: `version` is obsolete +[+] Running 1/1 + ✔ Container bpp-network Started 0.5s +Protocol server BPP installation successful +[Installation Logs] +Your BPP setup is complete. +You can access your BPP at https://onix-bpp.becknprotocol.io +Process complete. Thank you for using Beckn-ONIX! +``` + +## Change the status of the BAP and BPP on registry to Subscribed + +The newly added BAP and BPP should be transitioned to the "SUBSCRIBED" state in the registry. + +- Login to the newly installed registry (e.g. https://onix-registry.becknprotocol.io). The default username and password are root/root +- In the Admin menu, click Network Participant +- Click the pencil icon next to the onix-bap.becknprotocol.io +- Click on the Network Role tab +- Click on the pencil icon in the row of onix-bap.becknprotocol.io +- Change the status to SUBSCRIBED +- Click the Done button. + +- In the Admin menu, click Network Participant +- Click the pencil icon next to the onix-bpp.becknprotocol.io +- Click on the Network Role tab +- Click on the pencil icon in the row of onix-bpp.becknprotocol.io +- Change the status to SUBSCRIBED +- Click the Done button. + +## Update BAP and BPP with the layer 2 configuration files for the domains we are interested in + +The installation so far has installed a core Beckn network with the registry, gateway, BAP and the BPP. We cannot perform tranasctions on it till we have a layer 2 config file installed for the domains we want to transact in. + +- Login to the virtual server with the BAP +- Change into the beckn-onix/layer2 folder +- Run the download_layer_2_config_bap.sh file. +- Specify the path to the layer 2 config file for the domain of interest. For example, for retail, we have https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples/retail_1.1.0.yaml and for energy https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples/uei_charging_1.1.0.yaml + +- Login to the virtual server with the BPP +- Change into the beckn-onix/layer2 folder +- Run the download_layer_2_config_bpp.sh file. +- Specify the path to the layer 2 config file for the domain of interest. For example, for retail, we have https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples/retail_1.1.0.yaml and for energy https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples/uei_charging_1.1.0.yaml + +- Now with these layer 2 configs installed, we can conduct retail and energy transactions on the network. + +## Conduct successful transactions on the network + +- Load the collection available at `artifacts\ONIX Demo Collection.postman_collection.json` in this repo. +- Run the UEI >> Search request +- The request should succeed without any errors. +- Additional folders and tests will be addded to this collection. diff --git a/docs/user_guide.md b/docs/user_guide.md new file mode 100644 index 0000000..19aa960 --- /dev/null +++ b/docs/user_guide.md @@ -0,0 +1,299 @@ +# Beckn-ONIX - User Guide + +## Table of Contents + +- [Introduction](#introduction) +- [Running Beckn-ONIX on the cloud](#running-beckn-onix-on-the-cloud) + - [Sample deployment diagram](#sample-deployment-diagram) + - [Overall Prerequisites](#overall-pre-requisites) + - [Setting up a new network - Registry](#setting-up-a-new-network---registry) + - [Setting up a Gateway](#setting-up-a-gateway) + - [Setting up a BAP Beckn Adapter](#setting-up-a-bap-beckn-adapter) + - [Setting up a BPP Beckn Adapter](#setting-up-a-bpp-beckn-adapter) + - [Downloading Layer 2 Configuration for a domain](#downloading-layer-2-configuration-for-a-domain) + - [Testing transactions on the network](#testing-transactions-on-the-new-network) + - [Connecting BAP Beckn Adapter to BAP Software](#connecting-bap-beckn-adapter-to-bapbuyer-side-software) + - [Connecting BPP Beckn Adapter to BPP Software](#connecting-bpp-beckn-adapter-to-bppseller-side-software) +- [Running Beckn-ONIX locally](#running-beckn-onix-locally) +- [Upgrading to a new version](#upgrading-to-a-new-version) +- [Appendix A - subdomain/domain name configuration](#appendix-a---registering-or-adding-domain-or-subdomains) +- [Appendix B - Nginx reverse proxy configuration](#appendix-b---nginx-reverse-proxy-configuration) + +## Introduction + +Beckn-ONIX is [FIDE](https://fide.org/) project aimed at easing setup and maintainance of a [Beckn](https://becknprotocol.io/) Network using reference implementations. Objectives include setting up reliable, configurable and fast Beckn network as a virtual appliance. This initiative is independent of the evolution of the Beckn protocol. This effort is also aimed at inviting contributions from the community to create secure, reliable builds for production environments. + +This user guide provides all information necessary to setup a Beckn network and conduct transactions on it. For a better understanding of Beckn and the terminologies associated with the ecosystem, please refer to the [Beckn for Developers site](https://developers.becknprotocol.io/). + +There are two primary setups covered in this document. + +- A typical production setup with the various Beckn components on different nodes - This is explained in the Running Beckn-ONIX on the cloud section. +- A developer all in one setup - This is explained in the Running Beckn-ONIX locally section. + +## Running Beckn-ONIX on the Cloud + +Using Beckn-ONIX, we can install a Beckn network on the cloud. This will be similar to a simple production instance of Beckn network. In the sections below, we use Amazon EC2 as an example for VPS provider. The guide can be useful for other cloud environments with simple changes on methods of accessing them etc. In this part of the guide, we explain installation of the four components of Registry, Gateway, BAP and BPP Beckn Adapter on different instances of virtual servers. You can however use the same process with minimal changes to install multiple nodes on the same virtual server (e.g. Registry and Gateway on a single virtual server) + +### Sample deployment diagram + +The following diagram shows a conceptual view of a multi-node Beckn network. The urls shown here are the same as those used in the examples. + +![Typical deployment](./images/sample_deployment.png) + +The following diagram shows the reverse proxy configuration (referred to also in the individual installations below) using the URLs used in the examples. Refer to this diagram during the reverse proxy configuration steps. + +![Reverse Proxy Configuration](./images/reverse_proxy_configuration.png) + +**Use of docker and reference implementations** +Docker compose and docker are extensively used in the installation and running of the various component software. Similarly the Beckn-ONIX installer, itself being a reference implementation, installs the reference implentation of the Beckn Adapter for the BAP and BPP, reference implementation of the registry and gateway. In order to interact with the internals of these components, we will need to enter the container. Familiarity with Docker will be useful in working with the installation. To list the running containers use `docker ps`. Similarly for example to connect to a container and browse it using shell, use `docker exec -it bap-client sh` + +### Overall Pre-requisites + +- OS supported and test Beckn-ONIX installer are Ubuntu (20.04, 22.04 and 24.04), Debian (12), Amazon Linux 2, Windows with WSL support and MacOS. +- Atleast four virtual servers (EC2 instances) configured on the cloud provider with administrator login (e.g. ssh access) to them. +- Access to domain name management with ability to create domain-name/subdomains for each of the components. +- Latest docker version. +- Run the following two commands on all machines where the script is being run for the first time. Login to a new shell for the command to take effect and continue with the installation. Not doing so will result in docker permisssion error + +``` +sudo groupadd docker +sudo usermod -aG docker $USER +``` + +- Each of the various sections below list additional pre-requisites which build on these. + +### Setting up a new network - Registry + +In the Beckn ecosystem, a new network starts with the setting up of the Registry. All network participant register with the Registry with their public key. They also call the lookup endpoint on the Registry to discover and validate other network participants. + +**Prerequisites for installation** + +- A domain or subdomain where the registry will be accessible (e.g https://onix-registry.becknprotocol.io) +- A virtual server with the above mentioned domain/subdomain pointing to it. Refer [Appendix A](#appendix-a---registering-or-adding-domain-or-subdomains) for details +- SSL certificate for the server and configured in Nginx. Refer [Appendix B](#ssl-certificates-configured-in-reverse-proxy) +- Reverse proxy configured to route the traffic at the registry url (e.g. https://onix-registry.becknprotocol.io) to port 3030. Refer [Appendix B](#configuring-nginx-reverse-proxy-using-proxy-pass) + +**Installation Steps** + +- Clone the Beckn-ONIX repository `git clone https://github.com/beckn/beckn-onix.git` +- Change into the installation folder `cd beckn-onix/install` +- Run the installation script `./beckn-onix.sh` +- Specify you want to start a new network and install the registry +- Enter the publicly accessible address of the registry (e.g. https://onix-registry.becknprotocol.io) +- The registry installation will continue to completion. + +### Setting up a Gateway + +In the Beckn ecosystem, the role of the Gateway is limited to the discovery phase. When the BAP wants to search for an item, it sends it to the Gateway and the Gateway broadcasts the request to all BPPs registered for the domain. It registers itself with the registry upon installation. + +**Prerequisites** + +- Address of the registry of the network the gateway will join (e.g. https://onix-registry.becknprotocol.io) +- A domain or subdomain where the gateway will be accessible (e.g https://onix-gateway.becknprotocol.io) +- A virtual server with the above mentioned domain/subdomain pointing to it. Refer [Appendix A](#appendix-a---registering-or-adding-domain-or-subdomains) for details +- SSL certificate for the server and configured in Nginx. Refer [Appendix B](#ssl-certificates-configured-in-reverse-proxy) +- Reverse proxy configured to route the traffic at the gateway url (e.g. https://onix-gateway.becknprotocol.io) to port 4030. Refer [Appendix B](#configuring-nginx-reverse-proxy-using-proxy-pass) + +**Installation Steps** + +- Clone the Beckn-ONIX repository (git clone https://github.com/beckn/beckn-onix.git) +- Change into the installation folder `cd beckn-onix/install` +- Run the installation script `./beckn-onix.sh` +- Specify you want to join an existing network and install the gateway +- Enter the address of the registry of the network you want to join (e.g. https://onix-registry.becknprotocol.io) +- Enter the publicly accessible address of the gateway (e.g. https://onix-gateway.becknprotocol.io) +- The gateway installation will continue to completion and it will register itself with the registry as a participant with role BG(Beckn Gateway) + +### Setting up a BAP Beckn Adapter + +The BAP (Beckn Application Platform) is the bridge between buyer side applications and the Beckn Network. As part of Beckn-ONIX installation, a reference implementation of the Beckn Adapter for the BAP is installed. This adapter talks to two logical entities. On the one side you have the buyer applications which call the BAP with Beckn requests. The BAP forwards these requests to the Beckn network and other participants call back the BAP with responses. These two endpoints are referred to as client and network endpoints in this document. + +**Prerequisites** + +- Address of the registry's subscription endpoint of the network the BAP will join (e.g. https://onix-registry.becknprotocol.io/subscribers) +- A domain or subdomain where the client endpoint of BAP will be accessible (e.g https://onix-bap-client.becknprotocol.io) +- A domain or subdomain where the network endpoint of BAP will be accessible (e.g. https://onix-bap.becknprtocol.io) +- A virtual server with both the above mentioned domains/subdomains pointing to it. Refer [Appendix A](#appendix-a---registering-or-adding-domain-or-subdomains) for details +- SSL certificate for the two endpoints and configured in Nginx. Refer [Appendix B](#ssl-certificates-configured-in-reverse-proxy) +- Reverse proxy configured to route the traffic at the bap client url (e.g. https://onix-bap-client.becknprotocol.io) to port 5001. Refer [Appendix B](#configuring-nginx-reverse-proxy-using-proxy-pass) +- Reverse proxy configured to route the traffic at the bap network url (e.g. https://onix-bap.becknprotocol.io) to port 5002. Refer [Appendix B](#configuring-nginx-reverse-proxy-using-proxy-pass) + +**Installation Steps** + +- Clone the Beckn-ONIX repository (git clone https://github.com/beckn/beckn-onix.git) +- Change into the installation folder `cd beckn-onix/install` +- Run the installation script `./beckn-onix.sh` +- Specify you want to join an existing network and install the BAP. +- Enter the Subscriber id for the BAP. When setting up a new network, its value can be anything you want. However it is recommended to have it the same as the BAP URL without the https:// part (e.g. onix-bap.becknprotocol.io). In existing networks this might be further validated for uniqueness by the registry. +- Enter the Subscriber URI for the BAP. This is the network endpoint of the BAP Beckn Adapter. (e.g. https://onix-bap.becknprotocol.io) +- Enter the address of the subscription endpoint of the registry of the network you want to join (e.g. https://onix-registry.becknprotocol.io/subscribers). Note the suffix subscribers in the endpoint address. +- The BAP installation will continue to completion and it will register itself with the registry as a network participant. + +### Setting up a BPP Beckn Adapter + +The BPP (Beckn Provider Platform) is the bridge between the seller side applications such as a market place or a headless shop and the Beckn network. As part of Beckn-ONIX installation, a reference implementation of the Beckn Adapter for the BPP is installed. This adapter talks to two entities. On the one side, it talks to the seller side apps. It forwards the requests from the Beckn network to this/these software. It also recieves the responses from the seller side apps. This interface towards the seller side applications is called as BPP-Client (client within the context of BPP)within this document. The BPP adapter also receives requests from the Beckn network and returns back the responses to the requesting participant. This part of the Beckn Adapter is called the BPP Network (or just network when the BPP context is implied.) + +**Prerequisites** + +- Address of the registry's subscription endpoint of the network the BPP will join (e.g. https://onix-registry.becknprotocol.io/subscribers) +- A domain or subdomain where the client endpoint of BPP will be accessible (e.g https://onix-bpp-client.becknprotocol.io) +- A domain or subdomain where the network endpoint of BPP will be accessible (e.g. https://onix-bpp.becknprtocol.io) +- A virtual server with both the above mentioned domains/subdomains pointing to it. Refer [Appendix A](#appendix-a---registering-or-adding-domain-or-subdomains) for details +- SSL certificate for the two endpoints and configured in Nginx. Refer [Appendix B](#ssl-certificates-configured-in-reverse-proxy) +- Reverse proxy configured to route the traffic at the bpp client url (e.g. https://onix-bpp-client.becknprotocol.io) to port 6001. Refer [Appendix B](#configuring-nginx-reverse-proxy-using-proxy-pass) +- Reverse proxy configured to route the traffic at the bpp network url (e.g. https://onix-bpp.becknprotocol.io) to port 6002. Refer [Appendix B](#configuring-nginx-reverse-proxy-using-proxy-pass) + +**Installation Steps** + +- Clone the Beckn-ONIX repository (git clone https://github.com/beckn/beckn-onix.git) +- Change into the installation folder `cd beckn-onix/install` +- Run the installation script `./beckn-onix.sh` +- Specify you want to join an existing network and install the BPP. +- Enter the Subscriber id for the BPP. When setting up a new network, its value can be anything you want. However it is recommended to have it the same as the BPP URL without the https:// part (e.g. onix-bpp.becknprotocol.io). In existing networks this might be further validated for uniqueness by the registry. +- Enter the Subscriber URL for the BPP (e.g. https://onix-bpp.becknprotocol.io). This is the network endpoint of the BPP Beckn Adapter. +- Enter the webhook URL. This is the endpoint on your custom market place or headless shop which will receive Beckn requests. The endpoint usually contains the address of the market place or shop as a substring. (e.g. https://unified-bpp.becknprotocol.io/beckn-bpp-adapter) +- Enter the address of the subscription endpoint of the registry of the network you want to join (e.g. https://onix-registry.becknprotocol.io/subscribers). Note the suffix subscribers in the endpoint address. +- The BPP installation will continue to completion and it will register itself with the registry as a network participant. + +### Changing subscription status of BAP and BPP at the registry + +While the Beckn-ONIX installs network participant beckn adapter as well as registers them with the Registry, they need to be manually put to the 'Subscribed' status. Its only then that they can transact. In real networks, the network facilitator might require additional documentation or validation before transitioning the BAP/BPP to the Subscribed state. When we are setting up the entire network ourselves, we do this task ourselves. + +**Steps** + +- Log into your registry at the url you specified (e.g. https://onix-registry.becknprotocol.io). The default username, password is root/root +- Select Network Participants Under Admin menu +- Edit the BAP record. In the Network Role tab, edit the entry and change the state to 'Subscribed' +- Repeat the same for the BPP record. + +### Downloading Layer 2 Configuration for a domain + +With Beckn network setup by Beckn-ONIX, we have a core network with all required network participants. However we cannot still do any transactions on this network. In order to do transactions, we need the Layer 2 Config file for the domain in which we want to transact. Layer 2 configuration files contain + +- rules and policies agreed upon by entities operating in the domain through working group and other consultations +- rules and policies required by the network facilitator + +Currently the layer-2 config are per domain, though this might change with future evolution of the Beckn core specification. The layer 2 config file is usually hosted by the network facilitator. Participants have to get this from the hosted location and install it within the respective containers. This is currently done by a script that needs to be run and provided with address of the layer 2 config file. + +**Steps** + +- Change into the beckn-onix/layer2 folder. +- Start the `download_layer_2_config_bap.sh` +- Specify the path of the layer 2 config file for the required domain. (e.g. https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples/retail_1.1.0.yaml). Some sample layer 2 config files are present at `https://raw.githubusercontent.com/beckn/beckn-onix/main/layer2/samples` +- This file is downloaded and installed into the container. +- Repeat the same process for the BPP. However run the `download_layer_2_config_bpp.sh` file instead. + +### Testing transactions on the new network + +- We can use postman collection for the specific domain to test end to end communication on the domain. Some sample postman collections for testing are [present here](https://github.com/beckn/beckn-sandbox/tree/main/artefacts) +- When running postman collection from the buyer side, the base url to which the requests are sent should be the client side endpoint of the BAP Beckn Adapter instance. (e.g https://onix-bap-client.becknprotocol.io) + +### Connecting BAP Beckn Adapter to BAP(buyer side) software + +Currently Beckn ONIX only installs the reference BAP Adapter on the BAP machine. It does not install any reference buyer side software. However in real-world, buyer side BAP software will interact with this BAP Adapter to perform Beckn transactions. This section provides guidance on how to integrate the two. The following diagram shows the message flow from BAP all the way through to the BPP and back. + +![Request and response flow with BAP and BPP illustrated](./images/request_flow.png) + +The BAP software will typically be a Backend server that provides buying side functionality to users. It takes care of functionalities such as user authentication, profile management, Order flow, Order history and other functionalities common in a commerce application. Many of these functionalities are outside of Beckn scope. The Order flow is primarily where the software will use the BAP Beckn Adapter to communicate to the Beckn network. Typically the order flow within Beckn has four stages (Discovery, Order, Fulfillment and Post Fulfillment). Please refer to this [document](https://developers.becknprotocol.io/docs/introduction/beckn-protocol-specification/) for details on how the individual Beckn requests (currently ten) map to these. + +Taking an example of a user searching for an item, the user will typically enter his search request (say Arabica Coffee Powder) into the UI which will be conveyed to the BAP Backend server. The BAP backend server will call the BAP-Client endpoint with a Search request. This endpoint in the running example will be https://onix-bap-client.becknprotocol.io/search This endpoint as mentioned in the [Setting up a BAP Beckn Adapter](#setting-up-a-bap-beckn-adapter) should be configured to point to the BAP Beckn Adapter Client softare running at a port (default 5001) through Nginx configuration. The format of the message to be sent is explained in the [core specification](https://github.com/beckn/protocol-specifications/blob/master/api/transaction/build/transaction.yaml). An example is below + +``` +{ + "context": { + "domain": "retail", + "location": { + "country": { + "code": "IND" + }, + "city": { + "code": "std:080" + } + }, + "action": "search", + "version": "1.1.0", + "bap_id": "onix-bap.becknprotocol.io", + "bap_uri": "https://onix-bap.becknprotocol.io", + "transaction_id": "{{$randomUUID}}", + "message_id": "{{$randomUUID}}", + "timestamp": "{{$timestamp}}" + }, + "message": { + "intent": { + "item": { + "descriptor": { + "name": "Arabica Coffee Powder" + } + } + } + } +} +``` + +The reference implentation of the BAP Beckn Adapter will forward this to the Beckn network and return back with matching search results from different providers for the retail domain in the network. By default this happens in a synchronous manner, though it can be configured in the BAP Beckn Adapter Client Configuration (Refer to the "Protocol Server BAP Client Setup section" of this [document](https://github.com/beckn/protocol-server/blob/master/setup.md#protocol-server-bap-client-setup)) Refer to the [core protocol specification](https://github.com/beckn/protocol-specifications/blob/master/api/transaction/build/transaction.yaml) for the various other request and response formats for the rest of the order flow requests. + +### Connecting BPP Beckn Adapter to BPP(Seller side) software + +Currently Beckn-ONIX only installs the BPP Beckn Adapter reference implementation on the BPP machine. It does not install a reference implemenation of a market-place or BPP. Typically in real-world there is a backend server that provides seller functionality that talks to the BPP Beckn Adapter. This section describes how the interaction between BPP Beckn Adapter and such a server should occur. Refer to the image in the previous [section](#connecting-bap-beckn-adapter-to-bapbuyer-side-software) for an illustration of BAP and BPP integration along with message flow. + +The BPP software or market-place typically provides functionalities such as Login for shop owners, ability to manage inventory, list products, add product details, take an order, mark fulfillment of orders and aggregate post fulfillment feedback etc. While many of these functionalities are outside of the Beckn protocol, the BPP software will interact with the BPP Beckn Adapter for the order flow. The order flow typically involves Discovery, Order, Fulfillment and Post fulfillment phases and is explained in the context of Beckn [here](https://developers.becknprotocol.io/docs/introduction/beckn-protocol-specification/). The [core protocol specification](https://github.com/beckn/protocol-specifications/blob/master/api/transaction/build/transaction.yaml) explains the format of the various (currently ten) messages that need to flow between the BAP and BPP during the transaction. + +The communication between the BPP Beckn Adapter and the BPP software is asynchronous by default. [This document](https://github.com/beckn/protocol-specifications/blob/master/docs/BECKN-003-Beckn-Protocol-Communication-Draft-01.md) explains how the communication happens. In order to connect any BPP software with the BPP Beckn Adapter, we need to do two things. + +1. Configure the webhook address on the BPP Beckn Adapter to a endpoint in the BPP software. This endpoint will receive all the Beckn messages. The BPP software should identify the message through the action attribute in the context field of the request. Refer to the [Protocol Server BPP Client Setup](https://github.com/beckn/protocol-server/blob/master/setup.md#protocol-server-bpp-client-setup) section - webhook configuration for details. +2. Once the BPP software is ready with a response (say the item results for the search query), it has to call the BPP Beckn Adapter Client endpoint. In the example, that would be https://onix-bpp-client.becknprotocol.io. + +Refer to the [core specification](https://github.com/beckn/protocol-specifications/blob/master/api/transaction/build/transaction.yaml) for details on the format of other responses (on_search, on_select, on_init etc) to complete the order flow. + +## Running Beckn-ONIX locally + +- In order for people new to Beckn who want to try out Beckn on their own machine, choose the option to "Set up a network on your local machine" in the main screen. The all in one installation has preconfigured values for variables and so pretty much does not ask for any input. +- In order to run the installation on a Macintosh computer, run the following command in the terminal where you run the install before you start the installation. `export DOCKER_DEFAULT_PLATFORM=linux/amd64`. Ensure you close the terminal after installation, so this setting does not affect other docker containers you might install. + +## Upgrading to a new version + +- The following commands illustrate upgrade of the docker image for Protocol Server (here BPP). Use similar process for other components + +``` +docker compose -f docker-compose-bpp.yml down +docker rmi fidedocker/protocol-server +docker compose -f docker-compose-bpp.yml up -d +``` + +## Appendix A - Registering or adding domain or subdomains + +All the components of Beckn network need to be publicly accessible. Using domain names for them is the easiest. There are two options for domain names. One is a separate domain name for each component(e.g. registrybp.io). Second is to use subdomains for the individual componetns (e.g. onix-registry.becknprotocol.io , onix-gateway.becknprotocol.io etc). Which one of these two to use depends on the business requirement. For example if an organization is the network facilitator, they might go for a domain name for the registry instead of subdomain. In the examples given above we have primarily used subdomain approach. + +The process of registering domain names differs by the Domain Registrar. An example is here https://www.cloudflare.com/en-gb/products/registrar/ + +Similarly the process of adding subdomains differs by the Domain Registrar. An example is here https://developers.cloudflare.com/dns/manage-dns-records/how-to/create-subdomain/ + +For example in the prerequesites when it says "Subdomain name added(e.g. onix-gateway.becknprotocol.io) and point to this virtual server", what needs to be done is + +- Decide on a name (here it is onix-gateway) +- Add the name as subdomain at your registrar (here the registrar would be that of becknnprotocol.io) +- Point the record at the registrar to the machine on which you are installing the gateway + +## Appendix B - NGINX reverse proxy configuration + +All components of Beckn network need to be publicly accessible. Also it is required that they run on the https server for additional security. In addition some of the components of the reference implementation have two webservers running on the same node and require to be each publicly accessible through https. In order to achieve all of these requirements, it is recommended to install reverse-proxy on all the machines where the Beckn network components installed. This document uses Nginx as Reverse proxy, but the same can be configured through other programs. + +### SSL certificates configured in reverse proxy + +To enable https communication, SSL certificates need to be obtained and configured in Nginx. Depending on where you get the SSL certificate from, the process will vary. One such process for a provider [letsencrypt is documented here](https://letsencrypt.org/getting-started/) + +Once the SSL certificate is obtained, it needs to be configured. For Nginx, this [configuration is explained here] (https://nginx.org/en/docs/http/configuring_https_servers.html) + +When the prerequisite in this document says: "Nginx is configured with ssl certificate for the registry URL(e.g. https://onix-registry.becknprotocol.io)", it involves the following: + +- Obtain ssl certificate for `https://onix-registry.becknprotocol.io` +- Configure Nginx on the virtual server to create a server at https://onix-registry.becknprotocol.io. +- Configure this server to use the ssl certificate + +### Configuring Nginx reverse proxy using proxy pass + +In the role of reverse proxy, Nginx will forward communication that came on a particular url to a different destination (usually a server running on the same machine at a different port). This facility is used extensively in the reference Beckn components. For example the reference implementation of the BAP Protocol Server installs two servers. One at port 5001 and another at port 5002. We will need to configure two URLs (e.g. https://onix-bap-client.becknprotocol.io and https://onix-bap.becknprotocol.io) for this virtual server and Nginx should forward the first to server running on port 5001 and second to server running on port 5002. + +[This document](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) explains the configuration of reverse proxy using proxy_pass + +You can find sample Nginx configuration for the Registry, Gateway, BAP and BPP [here](./notes/sample_nginx_configurations.md) diff --git a/install/.gitignore b/install/.gitignore new file mode 100644 index 0000000..6a5de0f --- /dev/null +++ b/install/.gitignore @@ -0,0 +1,14 @@ +docker_data +gateway_data/config/swf.properties +gateway_data/config/networks/onix.json +registry_data/config/swf.properties +.vscode +gateway_data/config/networks/onix.json +gateway_data/database/standalone.mv.db +protocol-server-data/bap-client.yml +protocol-server-data/bap-network.yml +protocol-server-data/bpp-client.yml +protocol-server-data/bpp-network.yml +ENV/.env-generic-client-layer +registry.*db +gateway.*db diff --git a/install/ENV/.env-generic-client-layer-sample b/install/ENV/.env-generic-client-layer-sample new file mode 100644 index 0000000..f92d5bd --- /dev/null +++ b/install/ENV/.env-generic-client-layer-sample @@ -0,0 +1,19 @@ +APP_NAME="Generic Client Layer" +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_PORT=3000 +APP_URL=http://localhost + +LOG_CHANNEL=stack +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +PS_BASE_URI=BAP_CLIENT_URL +PS_BAP_ID=BAP_SUBSCRIBER_ID +PS_BAP_URI=BAP_SUBSCRIBER_URL + +PS_CITY_NAME=Bangalore +PS_CITY_CODE=std:080 +PS_COUNTRY_NAME=India +PS_COUNTRY_CODE=IND \ No newline at end of file diff --git a/install/ENV/.env-sandbox b/install/ENV/.env-sandbox new file mode 100644 index 0000000..d71b848 --- /dev/null +++ b/install/ENV/.env-sandbox @@ -0,0 +1,2 @@ +BPPCLIENTURL=http://bpp-client:6001 +BASE_URL=http://sandbox-api:3000 diff --git a/install/ENV/.env-webhook b/install/ENV/.env-webhook new file mode 100644 index 0000000..880b376 --- /dev/null +++ b/install/ENV/.env-webhook @@ -0,0 +1,2 @@ +SANDBOXURL=http://sandbox-api:3000 +BPPCLIENTURL=http://bpp-client:6001 diff --git a/install/beckn-onix.sh b/install/beckn-onix.sh new file mode 100755 index 0000000..8850c51 --- /dev/null +++ b/install/beckn-onix.sh @@ -0,0 +1,386 @@ +#!/bin/bash +source scripts/variables.sh +source scripts/get_container_details.sh + +# Function to start a specific service inside docker-compose file +install_package(){ + echo "${GREEN}................Installing required packages................${NC}" + bash scripts/package_manager.sh + echo "Package Installation is done" + +} +start_container(){ + #ignore orphaned containers warning + export COMPOSE_IGNORE_ORPHANS=1 + docker compose -f $1 up -d $2 +} + +update_registry_details() { + if [[ $1 ]];then + if [[ $1 == https://* ]]; then + if [[ $(uname -s) == 'Darwin' ]]; then + registry_url=$(echo "$1" | sed -E 's/https:\/\///') + else + registry_url=$(echo "$1" | sed 's/https:\/\///') + fi + registry_port=443 + protocol=https + elif [[ $1 == http://* ]]; then + if [[ $(uname -s) == 'Darwin' ]]; then + registry_url=$(echo "$1" | sed -E 's/http:\/\///') + else + registry_url=$(echo "$1" | sed 's/http:\/\///') + fi + registry_port=80 + protocol=http + fi + + else + registry_url=registry + registry_port=3030 + protocol=http + fi + echo $registry_url + cp $SCRIPT_DIR/../registry_data/config/swf.properties-sample $SCRIPT_DIR/../registry_data/config/swf.properties + config_file="$SCRIPT_DIR/../registry_data/config/swf.properties" + + tmp_file=$(mktemp "tempfile.XXXXXXXXXX") + sed "s|REGISTRY_URL|$registry_url|g; s|REGISTRY_PORT|$registry_port|g; s|PROTOCOL|$protocol|g" "$config_file" > "$tmp_file" + mv "$tmp_file" "$config_file" + docker volume create registry_data_volume + docker volume create registry_database_volume + docker run --rm -v $SCRIPT_DIR/../registry_data/config:/source -v registry_data_volume:/target busybox cp /source/{envvars,logger.properties,swf.properties} /target/ + docker rmi busybox +} +# Function to start the MongoDB, Redis, and RabbitMQ Services +start_support_services(){ + #ignore orphaned containers warning + export COMPOSE_IGNORE_ORPHANS=1 + echo "${GREEN}................Installing MongoDB................${NC}" + docker compose -f docker-compose-app.yml up -d mongo_db + echo "MongoDB installation successful" + + echo "${GREEN}................Installing RabbitMQ................${NC}" + docker compose -f docker-compose-app.yml up -d queue_service + echo "RabbitMQ installation successful" + + echo "${GREEN}................Installing Redis................${NC}" + docker compose -f docker-compose-app.yml up -d redis_db + echo "Redis installation successful" +} + +install_gateway() { + if [[ $1 && $2 ]]; then + bash scripts/update_gateway_details.sh $1 $2 + else + bash scripts/update_gateway_details.sh http://registry:3030 + fi + echo "${GREEN}................Installing Gateway service................${NC}" + start_container $gateway_docker_compose_file gateway + echo "Registering Gateway in the registry" + + sleep 10 + # if [[ $1 && $2 ]]; then + # bash scripts/register_gateway.sh $2 + # else + # bash scripts/register_gateway.sh + # fi + echo " " + echo "Gateway installation successful" +} + +# Function to install Beckn Gateway and Beckn Registry +install_registry(){ + if [[ $1 ]]; then + update_registry_details $1 + else + update_registry_details + fi + + echo "${GREEN}................Installing Registry service................${NC}" + start_container $registry_docker_compose_file registry + sleep 10 + echo "Registry installation successful" +} + +# Function to install BAP Protocol Server +install_bap_protocol_server(){ + start_support_services + if [[ $1 ]];then + registry_url=$1 + bap_subscriber_id=$2 + bap_subscriber_key_id=$3 + bap_subscriber_url=$4 + bash scripts/update_bap_config.sh $registry_url $bap_subscriber_id $bap_subscriber_key_id $bap_subscriber_url + else + bash scripts/update_bap_config.sh + fi + sleep 10 + docker volume create bap_client_config_volume + docker volume create bap_network_config_volume + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bap_client_config_volume:/target busybox cp /source/bap-client.yml /target/default.yml + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bap_client_config_volume:/target busybox cp /source/bap-client.yaml-sample /target + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bap_network_config_volume:/target busybox cp /source/bap-network.yml /target/default.yml + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bap_network_config_volume:/target busybox cp /source/bap-network.yaml-sample /target + docker rmi busybox + + start_container $bap_docker_compose_file "bap-client" + start_container $bap_docker_compose_file "bap-network" + sleep 10 + echo "Protocol server BAP installation successful" +} + + +# Function to install BPP Protocol Server without Sandbox +install_bpp_protocol_server(){ + start_support_services + echo "${GREEN}................Installing Protocol Server for BPP................${NC}" + + if [[ $1 ]];then + registry_url=$1 + bpp_subscriber_id=$2 + bpp_subscriber_key_id=$3 + bpp_subscriber_url=$4 + webhook_url=$5 + bash scripts/update_bpp_config.sh $registry_url $bpp_subscriber_id $bpp_subscriber_key_id $bpp_subscriber_url $webhook_url + else + bash scripts/update_bpp_config.sh + fi + + sleep 10 + docker volume create bpp_client_config_volume + docker volume create bpp_network_config_volume + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_client_config_volume:/target busybox cp /source/bpp-client.yml /target/default.yml + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_client_config_volume:/target busybox cp /source/bpp-client.yaml-sample /target + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_network_config_volume:/target busybox cp /source/bpp-network.yml /target/default.yml + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_network_config_volume:/target busybox cp /source/bpp-network.yaml-sample /target + docker rmi busybox + + start_container $bpp_docker_compose_file "bpp-client" + start_container $bpp_docker_compose_file "bpp-network" + sleep 10 + echo "Protocol server BPP installation successful" +} + +mergingNetworks(){ + echo -e "1. Merge Two Different Registries \n2. Merge Multiple Registries into a Super Registry" + read -p "Enter your choice: " merging_network + urls=() + if [ "$merging_network" = "2" ]; then + while true; do + read -p "Enter registry URL (or 'N' to stop): " url + if [[ $url == 'N' ]]; then + break + else + urls+=("$url") + fi + done + read -p "Enter the Super Registry URL: " registry_super_url + else + read -p "Enter A registry URL: " registry_a_url + read -p "Enter B registry URL: " registry_b_url + urls+=("$registry_a_url") + + fi + if [[ ${#urls[@]} -gt 0 ]]; then + echo "Entered registry URLs:" + all_responses="" + for url in "${urls[@]}"; do + response=$(curl -s -H 'ACCEPT: application/json' -H 'CONTENT-TYPE: application/json' "$url"+/subscribers/lookup -d '{}') + all_responses+="$response" + done + for element in $(echo "$all_responses" | jq -c '.[]'); do + if [ "$merging_network" -eq 1 ]; then + curl --location "$registry_b_url"+/subscribers/register \ + --header 'Content-Type: application/json' \ + --data "$element" + echo + else + curl --location "$registry_super_url"+/subscribers/register \ + --header 'Content-Type: application/json' \ + --data "$element" + echo + fi + done + echo "Merging Multiple Registries into a Super Registry Done ..." + else + echo "No registry URLs entered." + fi + + if [ "$merging_network" = "2" ]; then + echo "Merging Multiple Registries into a Super Registry" + else + echo "Invalid option. Please restart the script and select a valid option." + exit 1 + fi +} + + + +# Function to install BPP Protocol Server with Sandbox +install_bpp_protocol_server_with_sandbox(){ + start_support_services + + docker volume create bpp_client_config_volume + docker volume create bpp_network_config_volume + + echo "${GREEN}................Installing Sandbox................${NC}" + start_container $bpp_docker_compose_file_sandbox "sandbox-api" + sleep 5 + echo "Sandbox installation successful" + + echo "${GREEN}................Installing Protocol Server for BPP................${NC}" + + if [[ $1 ]];then + registry_url=$1 + bpp_subscriber_id=$2 + bpp_subscriber_key_id=$3 + bpp_subscriber_url=$4 + webhook_url=$5 + bash scripts/update_bpp_config.sh $registry_url $bpp_subscriber_id $bpp_subscriber_key_id $bpp_subscriber_url $webhook_url + else + bash scripts/update_bpp_config.sh + fi + + sleep 10 + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_client_config_volume:/target busybox cp /source/bpp-client.yml /target/default.yml + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_client_config_volume:/target busybox cp /source/bpp-client.yaml-sample /target + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_network_config_volume:/target busybox cp /source/bpp-network.yml /target/default.yml + docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_network_config_volume:/target busybox cp /source/bpp-network.yaml-sample /target + docker rmi busybox + + start_container $bpp_docker_compose_file "bpp-client" + start_container $bpp_docker_compose_file "bpp-network" + sleep 10 + echo "Protocol server BPP installation successful" +} + + +# Function to handle the setup process for each platform +completeSetup() { + platform=$1 + + public_address="https://" + + echo "Proceeding with the setup for $platform..." + + # Insert the specific commands for each platform, including requesting network config if necessary + case $platform in + "Registry") + read -p "Enter publicly accessible registry URL: " registry_url + if [[ $registry_url =~ /$ ]]; then + new_registry_url=${registry_url%/} + else + new_registry_url=$registry_url + fi + public_address=$registry_url + install_package + install_registry $new_registry_url + ;; + "Gateway"|"Beckn Gateway") + read -p "Enter your registry URL: " registry_url + read -p "Enter publicly accessible gateway URL: " gateway_url + + if [[ $registry_url =~ /$ ]]; then + new_registry_url=${registry_url%/} + else + new_registry_url=$registry_url + fi + if [[ $gateway_url =~ /$ ]]; then + gateway_url=${gateway_url%/} + fi + + public_address=$gateway_url + install_package + install_gateway $new_registry_url $gateway_url + ;; + "BAP") + echo "${GREEN}................Installing Protocol Server for BAP................${NC}" + + read -p "Enter BAP Subscriber ID: " bap_subscriber_id + read -p "Enter BAP Subscriber URL: " bap_subscriber_url + read -p "Enter the registry_url(e.g. https://registry.becknprotocol.io/subscribers): " registry_url + bap_subscriber_key_id=$bap_subscriber_id-key + public_address=$bap_subscriber_url + install_package + install_bap_protocol_server $registry_url $bap_subscriber_id $bap_subscriber_key_id $bap_subscriber_url + ;; + "BPP") + echo "${GREEN}................Installing Protocol Server for BAP................${NC}" + read -p "Enter BPP Subscriber ID: " bpp_subscriber_id + read -p "Enter BPP Subscriber URL: " bpp_subscriber_url + read -p "Enter the registry_url(e.g. https://registry.becknprotocol.io/subscribers): " registry_url + read -p "Enter Webhook URL: " webhook_url + + bpp_subscriber_key_id=$bpp_subscriber_id-key + public_address=$bpp_subscriber_url + install_package + install_bpp_protocol_server $registry_url $bpp_subscriber_id $bpp_subscriber_key_id $bpp_subscriber_url $webhook_url + ;; + *) + echo "Invalid platform selected." + exit 1 + ;; + esac + + echo "[Installation Logs]" + echo -e "${boldGreen}Your $platform setup is complete.${reset}" + echo -e "${boldGreen}You can access your $platform at $public_address ${reset}" + # Key generation and subscription logic follows here +} + + +# MAIN SCRIPT STARTS HERE + +echo "Welcome to Beckn-ONIX!" +if [ -f ./onix_ascii_art.txt ]; then + cat ./onix_ascii_art.txt +else + echo "[Display Beckn-ONIX ASCII Art]" +fi + +echo "Beckn-ONIX is a platform that helps you quickly launch and configure beckn-enabled networks." +echo -e "\nWhat would you like to do?\n1. Join an existing network\n2. Create new production network\n3. Set up a network on your local machine\n4. Merge multiple networks\n5. Configure Existing Network\n(Press Ctrl+C to exit)" +read -p "Enter your choice: " choice + +boldGreen="\e[1m\e[92m" +reset="\e[0m" +if [[ $choice -eq 3 ]]; then + echo "Installing all components on the local machine" + install_package + install_registry + install_gateway + install_bap_protocol_server + install_bpp_protocol_server_with_sandbox +elif [[ $choice -eq 4 ]]; then + echo "Determining the platforms available based on the initial choice" + mergingNetworks +else + # Determine the platforms available based on the initial choice + platforms=("Gateway" "BAP" "BPP") + [ "$choice" -eq 2 ] && platforms=("Registry" "${platforms[@]}") # Add Registry for new network setups + + echo "Great choice! Get ready." + echo -e "\nWhich platform would you like to set up?" + for i in "${!platforms[@]}"; do + echo "$((i+1)). ${platforms[$i]}" + done + + read -p "Enter your choice: " platform_choice + + selected_platform="${platforms[$((platform_choice-1))]}" + + if [[ -n $selected_platform ]]; then + completeSetup "$selected_platform" + else + echo "Invalid option. Please restart the script and select a valid option." + exit 1 + fi +fi + +echo "Process complete. Thank you for using Beckn-ONIX!" + + +echo "Process complete. Thank you for using Beckn-ONIX!" + + diff --git a/install/docker-compose-app.yml b/install/docker-compose-app.yml new file mode 100644 index 0000000..c986658 --- /dev/null +++ b/install/docker-compose-app.yml @@ -0,0 +1,58 @@ +services: + mongo_db: + image: mongo + restart: unless-stopped + container_name: mongoDB + volumes: + - beckn_mongo_db:/data/db + - beckn_mongo_config:/data/configdb + networks: + - beckn_network + ports: + - "27017:27017" + environment: + - MONGO_INITDB_ROOT_USERNAME=beckn + - MONGO_INITDB_ROOT_PASSWORD=beckn123 + - MONGO_INITDB_DATABASE=protocol_server + + redis_db: + image: redis:6.2.5-alpine + restart: unless-stopped + container_name: redis + networks: + - beckn_network + ports: + - "6379:6379" + volumes: + - beckn_redis:/data + + queue_service: + image: rabbitmq:3.9.11-management-alpine + restart: unless-stopped + container_name: rabbitmq + networks: + - beckn_network + ports: + - "5672:5672" + - "15672:15672" + volumes: + - beckn_rabbitmq:/var/lib/rabbitmq + environment: + AMQP_URL: "amqp://queue_service?connection_attempts=3&retry_delay=5" + RABBITMQ_DEFAULT_USER: beckn + RABBITMQ_DEFAULT_PASS: beckn123 + +networks: + beckn_network: + name: beckn_network + driver: bridge + +volumes: + beckn_mongo_db: + name: beckn_mongo_db + beckn_mongo_config: + name: beckn_mongo_config + beckn_redis: + name: beckn_redis + beckn_rabbitmq: + name: beckn_rabbitmq diff --git a/install/docker-compose-bap.yml b/install/docker-compose-bap.yml new file mode 100644 index 0000000..d9bb6a8 --- /dev/null +++ b/install/docker-compose-bap.yml @@ -0,0 +1,49 @@ +services: + bap-client: + image: fidedocker/protocol-server + container_name: bap-client + platform: linux/amd64 + networks: + - beckn_network + ports: + - 5001:5001 + restart: unless-stopped + volumes: + - bap_client_config_volume:/usr/src/app/config + - bap_client_schemas_volume:/usr/src/app/schemas + - bap_client_logs_volume:/usr/src/app/logs + + bap-network: + image: fidedocker/protocol-server + container_name: bap-network + platform: linux/amd64 + networks: + - beckn_network + ports: + - 5002:5002 + restart: unless-stopped + volumes: + - bap_network_config_volume:/usr/src/app/config + - bap_network_schemas_volume:/usr/src/app/schemas + - bap_network_logs_volume:/usr/src/app/logs + +networks: + beckn_network: + name: beckn_network + driver: bridge + +volumes: + bap_client_config_volume: + name: bap_client_config_volume + external: true + bap_client_schemas_volume: + name: bap_client_schemas_volume + bap_client_logs_volume: + name: bap_client_logs_volume + bap_network_config_volume: + name: bap_network_config_volume + external: true + bap_network_schemas_volume: + name: bap_network_schemas_volume + bap_network_logs_volume: + name: bap_network_logs_volume diff --git a/install/docker-compose-bpp-with-sandbox.yml b/install/docker-compose-bpp-with-sandbox.yml new file mode 100644 index 0000000..cd242d1 --- /dev/null +++ b/install/docker-compose-bpp-with-sandbox.yml @@ -0,0 +1,61 @@ +services: + bpp-client: + image: fidedocker/protocol-server + container_name: bpp-client + platform: linux/amd64 + networks: + - beckn_network + ports: + - 6001:6001 + restart: unless-stopped + volumes: + - bpp_client_config_volume:/usr/src/app/config + - bpp_client_schemas_volume:/usr/src/app/schemas + - bpp_client_logs_volume:/usr/src/app/logs + + bpp-network: + image: fidedocker/protocol-server + container_name: bpp-network + platform: linux/amd64 + networks: + - beckn_network + ports: + - 6002:6002 + restart: unless-stopped + volumes: + - bpp_network_config_volume:/usr/src/app/config + - bpp_network_schemas_volume:/usr/src/app/schemas + - bpp_network_logs_volume:/usr/src/app/logs + + sandbox-api: + image: fidedocker/sandbox-api + container_name: sandbox-api + platform: linux/amd64 + networks: + - beckn_network + ports: + - 4010:4000 + restart: unless-stopped + volumes: + - ./ENV/.env-sandbox:/usr/src/app/.env + +networks: + beckn_network: + name: beckn_network + driver: bridge + +volumes: + bpp_client_config_volume: + name: bpp_client_config_volume + external: true + bpp_client_schemas_volume: + name: bpp_client_schemas_volume + bpp_client_logs_volume: + name: bpp_client_logs_volume + bpp_network_config_volume: + name: bpp_network_config_volume + external: true + bpp_network_schemas_volume: + name: bpp_network_schemas_volume + bpp_network_logs_volume: + name: bpp_network_logs_volume diff --git a/install/docker-compose-bpp.yml b/install/docker-compose-bpp.yml new file mode 100644 index 0000000..5282b8b --- /dev/null +++ b/install/docker-compose-bpp.yml @@ -0,0 +1,49 @@ +services: + bpp-client: + image: fidedocker/protocol-server + container_name: bpp-client + platform: linux/amd64 + networks: + - beckn_network + ports: + - 6001:6001 + restart: unless-stopped + volumes: + - bpp_client_config_volume:/usr/src/app/config + - bpp_client_schemas_volume:/usr/src/app/schemas + - bpp_client_logs_volume:/usr/src/app/logs + + bpp-network: + image: fidedocker/protocol-server + container_name: bpp-network + platform: linux/amd64 + networks: + - beckn_network + ports: + - 6002:6002 + restart: unless-stopped + volumes: + - bpp_network_config_volume:/usr/src/app/config + - bpp_network_schemas_volume:/usr/src/app/schemas + - bpp_network_logs_volume:/usr/src/app/logs + +networks: + beckn_network: + name: beckn_network + driver: bridge + +volumes: + bpp_client_config_volume: + name: bpp_client_config_volume + external: true + bpp_client_schemas_volume: + name: bpp_client_schemas_volume + bpp_client_logs_volume: + name: bpp_client_logs_volume + bpp_network_config_volume: + name: bpp_network_config_volume + external: true + bpp_network_schemas_volume: + name: bpp_network_schemas_volume + bpp_network_logs_volume: + name: bpp_network_logs_volume diff --git a/install/docker-compose-gateway.yml b/install/docker-compose-gateway.yml new file mode 100644 index 0000000..0c2a3f7 --- /dev/null +++ b/install/docker-compose-gateway.yml @@ -0,0 +1,27 @@ +services: + gateway: + image: fidedocker/gateway + container_name: gateway + platform: linux/amd64 + networks: + - beckn_network + ports: + - 4000:4000 + - 4030:4030 + restart: unless-stopped + volumes: + - gateway_data_volume:/gateway/overrideProperties/config + - gateway_database_volume:/gateway/database + +networks: + beckn_network: + name: beckn_network + driver: bridge + +volumes: + gateway_data_volume: + name: gateway_data_volume + external: true + gateway_database_volume: + name: gateway_database_volume + external: true diff --git a/install/docker-compose-gcl.yml b/install/docker-compose-gcl.yml new file mode 100644 index 0000000..aa0953c --- /dev/null +++ b/install/docker-compose-gcl.yml @@ -0,0 +1,119 @@ +services: + registry: + image: fidedocker/registry + container_name: registry + platform: linux/amd64 + networks: + - beckn_network + ports: + - 3000:3000 + - 3030:3030 + restart: unless-stopped + volumes: + - registry_data_volume:/registry/overrideProperties/config + - registry_database_volume:/registry/database + + gateway: + image: fidedocker/gateway + container_name: gateway + platform: linux/amd64 + networks: + - beckn_network + ports: + - 4000:4000 + - 4030:4030 + restart: unless-stopped + volumes: + - gateway_data_volume:/gateway/overrideProperties/config + - gateway_database_volume:/gateway/database + + bap-client: + image: fidedocker/protocol-server + container_name: bap-client + platform: linux/amd64 + networks: + - beckn_network + ports: + - 5001:5001 + restart: unless-stopped + volumes: + - ./protocol-server-data/bap-client.yml:/usr/src/app/config/default.yml + + bap-network: + image: fidedocker/protocol-server + container_name: bap-network + platform: linux/amd64 + networks: + - beckn_network + ports: + - 5002:5002 + restart: unless-stopped + volumes: + - ./protocol-server-data/bap-network.yml:/usr/src/app/config/default.yml + + sandbox-api: + image: fidedocker/sandbox-api + container_name: sandbox-api + platform: linux/amd64 + networks: + - beckn_network + ports: + - 4010:4000 + restart: unless-stopped + volumes: + - ./ENV/.env-sandbox:/usr/src/app/.env + + bpp-client: + image: fidedocker/protocol-server + container_name: bpp-client + platform: linux/amd64 + networks: + - beckn_network + ports: + - 6001:6001 + restart: unless-stopped + volumes: + - ./protocol-server-data/bpp-client.yml:/usr/src/app/config/default.yml + + bpp-network: + image: fidedocker/protocol-server + container_name: bpp-network + platform: linux/amd64 + networks: + - beckn_network + ports: + - 6002:6002 + restart: unless-stopped + volumes: + - ./protocol-server-data/bpp-network.yml:/usr/src/app/config/default.yml + + generic-client-layer: + image: fidedocker/generic-client-layer + container_name: generic-client-layer + platform: linux/amd64 + networks: + - beckn_network + ports: + - 3015:3000 + restart: unless-stopped + volumes: + - ./ENV/.env-generic-client-layer:/app/.env + +networks: + beckn_network: + name: beckn_network + driver: bridge + +volumes: + registry_data_volume: + name: registry_data_volume + external: true + registry_database_volume: + name: registry_database_volume + external: true + gateway_data_volume: + name: gateway_data_volume + external: true + gateway_database_volume: + name: gateway_database_volume + external: true diff --git a/install/docker-compose-registry.yml b/install/docker-compose-registry.yml new file mode 100644 index 0000000..21cc8e8 --- /dev/null +++ b/install/docker-compose-registry.yml @@ -0,0 +1,27 @@ +services: + registry: + image: fidedocker/registry + container_name: registry + platform: linux/amd64 + networks: + - beckn_network + ports: + - 3000:3000 + - 3030:3030 + restart: unless-stopped + volumes: + - registry_data_volume:/registry/overrideProperties/config + - registry_database_volume:/registry/database + +networks: + beckn_network: + name: beckn_network + driver: bridge + +volumes: + registry_data_volume: + name: registry_data_volume + external: true + registry_database_volume: + name: registry_database_volume + external: true diff --git a/install/docker-compose-v2.yml b/install/docker-compose-v2.yml new file mode 100644 index 0000000..aa0953c --- /dev/null +++ b/install/docker-compose-v2.yml @@ -0,0 +1,119 @@ +services: + registry: + image: fidedocker/registry + container_name: registry + platform: linux/amd64 + networks: + - beckn_network + ports: + - 3000:3000 + - 3030:3030 + restart: unless-stopped + volumes: + - registry_data_volume:/registry/overrideProperties/config + - registry_database_volume:/registry/database + + gateway: + image: fidedocker/gateway + container_name: gateway + platform: linux/amd64 + networks: + - beckn_network + ports: + - 4000:4000 + - 4030:4030 + restart: unless-stopped + volumes: + - gateway_data_volume:/gateway/overrideProperties/config + - gateway_database_volume:/gateway/database + + bap-client: + image: fidedocker/protocol-server + container_name: bap-client + platform: linux/amd64 + networks: + - beckn_network + ports: + - 5001:5001 + restart: unless-stopped + volumes: + - ./protocol-server-data/bap-client.yml:/usr/src/app/config/default.yml + + bap-network: + image: fidedocker/protocol-server + container_name: bap-network + platform: linux/amd64 + networks: + - beckn_network + ports: + - 5002:5002 + restart: unless-stopped + volumes: + - ./protocol-server-data/bap-network.yml:/usr/src/app/config/default.yml + + sandbox-api: + image: fidedocker/sandbox-api + container_name: sandbox-api + platform: linux/amd64 + networks: + - beckn_network + ports: + - 4010:4000 + restart: unless-stopped + volumes: + - ./ENV/.env-sandbox:/usr/src/app/.env + + bpp-client: + image: fidedocker/protocol-server + container_name: bpp-client + platform: linux/amd64 + networks: + - beckn_network + ports: + - 6001:6001 + restart: unless-stopped + volumes: + - ./protocol-server-data/bpp-client.yml:/usr/src/app/config/default.yml + + bpp-network: + image: fidedocker/protocol-server + container_name: bpp-network + platform: linux/amd64 + networks: + - beckn_network + ports: + - 6002:6002 + restart: unless-stopped + volumes: + - ./protocol-server-data/bpp-network.yml:/usr/src/app/config/default.yml + + generic-client-layer: + image: fidedocker/generic-client-layer + container_name: generic-client-layer + platform: linux/amd64 + networks: + - beckn_network + ports: + - 3015:3000 + restart: unless-stopped + volumes: + - ./ENV/.env-generic-client-layer:/app/.env + +networks: + beckn_network: + name: beckn_network + driver: bridge + +volumes: + registry_data_volume: + name: registry_data_volume + external: true + registry_database_volume: + name: registry_database_volume + external: true + gateway_data_volume: + name: gateway_data_volume + external: true + gateway_database_volume: + name: gateway_database_volume + external: true diff --git a/install/docker-compose.yml b/install/docker-compose.yml new file mode 100644 index 0000000..deeec38 --- /dev/null +++ b/install/docker-compose.yml @@ -0,0 +1,103 @@ +services: + registry: + image: fidedocker/registry + container_name: registry + networks: + - beckn_network + ports: + - 3000:3000 + - 3030:3030 + restart: unless-stopped + volumes: + - ./registry_data/config/swf.properties:/registry/overrideProperties/config/swf.properties + - ./registry_data/database:/registry/database + + gateway: + image: fidedocker/gateway + depends_on: + - registry + container_name: gateway + networks: + - beckn_network + ports: + - 4000:4000 + - 4030:4030 + restart: unless-stopped + volumes: + - ./gateway_data/config/swf.properties:/gateway/overrideProperties/config/swf.properties + - ./gateway_data/database:/gateway/database + + bap-client: + image: fidedocker/protocol-server + depends_on: + - registry + - gateway + container_name: bap-client + networks: + - beckn_network + ports: + - 5001:5001 + restart: unless-stopped + volumes: + - ./protocol-server-data/bap-client.yml:/usr/src/app/config/default.yml + + bap-network: + image: fidedocker/protocol-server + depends_on: + - registry + - gateway + container_name: bap-network + networks: + - beckn_network + ports: + - 5002:5002 + restart: unless-stopped + volumes: + - ./protocol-server-data/bap-network.yml:/usr/src/app/config/default.yml + + sandbox-api: + image: fidedocker/sandbox-api + depends_on: + - registry + - gateway + container_name: sandbox-api + networks: + - beckn_network + ports: + - 4010:4000 + restart: unless-stopped + volumes: + - ./ENV/.env-sandbox:/usr/src/app/.env + + bpp-client: + image: fidedocker/protocol-server + depends_on: + - registry + - gateway + container_name: bpp-client + networks: + - beckn_network + ports: + - 6001:6001 + restart: unless-stopped + volumes: + - ./protocol-server-data/bpp-client.yml:/usr/src/app/config/default.yml + + bpp-network: + image: fidedocker/protocol-server + depends_on: + - registry + - gateway + container_name: bpp-network + networks: + - beckn_network + ports: + - 6002:6002 + restart: unless-stopped + volumes: + - ./protocol-server-data/bpp-network.yml:/usr/src/app/config/default.yml + +networks: + beckn_network: + name: beckn_network + driver: bridge diff --git a/install/gateway_data/config/envvars b/install/gateway_data/config/envvars new file mode 100644 index 0000000..b078dd9 --- /dev/null +++ b/install/gateway_data/config/envvars @@ -0,0 +1,2 @@ +export dport=4000 +export wport=4030 diff --git a/install/gateway_data/config/logger.properties b/install/gateway_data/config/logger.properties new file mode 100644 index 0000000..a9711be --- /dev/null +++ b/install/gateway_data/config/logger.properties @@ -0,0 +1,20 @@ +com.venky.core.log.InfoFileHandler.limit=500000 +com.venky.core.log.InfoFileHandler.count=2 +com.venky.core.log.InfoFileHandler.formatter=java.util.logging.SimpleFormatter +com.venky.core.log.InfoFileHandler.pattern=tmp/java_info%u.log +com.venky.core.log.InfoFileHandler.level=ALL + +com.venky.core.log.WarningFileHandler.limit=500000 +com.venky.core.log.WarningFileHandler.count=2 +com.venky.core.log.WarningFileHandler.formatter=java.util.logging.SimpleFormatter +com.venky.core.log.WarningFileHandler.pattern=tmp/java_warn%u.log +com.venky.core.log.WarningFileHandler.level=WARNING + + +handlers=com.venky.core.log.WarningFileHandler com.venky.core.log.InfoFileHandler +logger.useParentHandlers=false + +.level=INFO +com.venky.swf.plugins.background.core.level=FINEST +com.venky.swf.db.Database.level=FINEST +#com.venky.core.log.TimerStatistics.level=FINE diff --git a/install/gateway_data/config/networks/onix.json b/install/gateway_data/config/networks/onix.json new file mode 100644 index 0000000..2bb446a --- /dev/null +++ b/install/gateway_data/config/networks/onix.json @@ -0,0 +1,11 @@ +{ + "core_version" : "1.1.0", + "registry_id": "registry-dev.becknprotocol.io..LREG", + "search_provider_id" : "gateway-dev.becknprotocol.io", + "self_registration_supported": true, + "subscription_needed_post_registration" : true, + "base_url": "https://registry-dev.becknprotocol.io", + "registry_url" : "https://registry-dev.becknprotocol.io/subscribers", + "extension_package": "in.succinct.beckn.boc", + "wild_card" : "" +} \ No newline at end of file diff --git a/install/gateway_data/config/networks/onix.json-sample b/install/gateway_data/config/networks/onix.json-sample new file mode 100644 index 0000000..8990d63 --- /dev/null +++ b/install/gateway_data/config/networks/onix.json-sample @@ -0,0 +1,11 @@ +{ + "core_version" : "1.1.0", + "registry_id": "REGISTRY_ID..LREG", + "search_provider_id" : "GATEWAY_ID", + "self_registration_supported": true, + "subscription_needed_post_registration" : true, + "base_url": "REGISTRY_URL", + "registry_url" : "REGISTRY_URL/subscribers", + "extension_package": "in.succinct.beckn.boc", + "wild_card" : "" +} diff --git a/install/gateway_data/config/swf.properties-sample b/install/gateway_data/config/swf.properties-sample new file mode 100644 index 0000000..64c1c08 --- /dev/null +++ b/install/gateway_data/config/swf.properties-sample @@ -0,0 +1,43 @@ +swf.load.complete.config.tables.if.count.less.than=500 +swf.user.password.encrypted=false +swf.plugins.background.core.workers.numThreads=1 +swf.application.authentication.required=false + +swf.encryption.support=false +swf.key.store.directory=./.keystore +swf.key.store.password=venky12 +swf.key.entry.succinct.password=succinct12 + + +swf.host=GATEWAY_URL +swf.external.port=GATEWAY_PORT +swf.external.scheme=PROTOCOL + +swf.jdbc.driver=org.h2.Driver +swf.jdbc.url=jdbc:h2:./database/standalone;AUTO_SERVER=TRUE; +swf.jdbc.userid=standalone +swf.jdbc.password=standalone +swf.jdbc.validationQuery=values(1) +swf.jdbc.dbschema=PUBLIC +swf.jdbc.dbschema.setonconnection=true +swf.jdbc.set.dbschema.command=set schema public + + +# These keys are needed if you want to in.succinct.beckn.gateway.subscriber_iduse push notifications. +# you can generate this from https://d3v.one/vapid-key-generator/ or similiar sites. +# you also need to specify the public key in src/main/resources/scripts/application.js + +#push.server.private.key=your_private_key +#push.server.public.key=your_public_key + +## Beckn Gateway configurations. + +beckn.auth.enabled=true + +in.succinct.beckn.gateway.subscriber_id=SUBSCRIBER_ID +in.succinct.beckn.gateway.public_key_id=SUBSCRIBER_ID.k1 + + +in.succinct.onet.country.iso.3=IND +in.succinct.onet.country.iso.2=IN +in.succinct.onet.name=onix diff --git a/install/gateway_data/database/.gitignore b/install/gateway_data/database/.gitignore new file mode 100644 index 0000000..38d6f13 --- /dev/null +++ b/install/gateway_data/database/.gitignore @@ -0,0 +1,11 @@ +docker_data +gateway_data/config/swf.properties +registry_data/config/swf.properties +.vscode +protocol-server-data/bap-client.yml +protocol-server-data/bap-network.yml +protocol-server-data/bpp-client.yml +protocol-server-data/bpp-network.yml +ENV/.env-generic-client-layer +registry.lock* +gateway.lock* diff --git a/install/onix_ascii_art.txt b/install/onix_ascii_art.txt new file mode 100644 index 0000000..f8975a8 --- /dev/null +++ b/install/onix_ascii_art.txt @@ -0,0 +1,27 @@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@::;;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:;;;;:;;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;;::;:::;;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;:;;;;:;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@::::@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@..................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@.........,,::,,.........@@@@@........@@.......@@@@@@@........@.........@@@@@........@@@@@@@ +@@@@@@.........,,::;;;;::,.........@@@...................@@@@@........@..........@@@.........@@@@@@@ +@@@@@@.......,::;;;:,::;;;::,......@@@....................@@@@........@@..........@.........@@@@@@@@ +@@@@@@.....,:;;;::,....,::;;;:,....@@@.....................@@@........@@@..................@@@@@@@@@ +@@@@@@.....:;;:,..........,:;;,....@@@.....................@@@........@@@@................@@@@@@@@@@ +@@@@@@.....:;;:............:;;,....@@@........@@@@@........@@@........@@@@@@.............@@@@@@@@@@@ +@@@@@@.....:;;:............:;;,....@@@........@@@@@........@@@........@@@@@@@..........@@@@@@@@@@@@@ +@@@@@@.....:;;:............:;;,....@@@........@@@@@........@@@........@@@@@@............@@@@@@@@@@@@ +@@@@@@.....:;;:............:;;,....@@@........@@@@@........@@@........@@@@@..............@@@@@@@@@@@ +@@@@@@.....,;;;:,,......,::;;;,....@@@........@@@@@........@@@........@@@@................@@@@@@@@@@ +@@@@@@......,::;;;:,,,::;;;::,.....@@@........@@@@@........@@@........@@@..................@@@@@@@@@ +@@@@@@........,,:;;;;;;;::,........@@@........@@@@@........@@@........@@.........@@.........@@@@@@@@ +@@@@@@@@.........,,::::,,.........@@@@........@@@@@........@@@........@.........@@@@.........@@@@@@@ +@@@@@@@@@@@.........,..........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@..............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + + diff --git a/install/protocol-server-data/bap-client.yaml-sample b/install/protocol-server-data/bap-client.yaml-sample new file mode 100644 index 0000000..ad3e1cc --- /dev/null +++ b/install/protocol-server-data/bap-client.yaml-sample @@ -0,0 +1,138 @@ +# Mandatory +server: + port: BAP_CLIENT_PORT + +# Mandatory. +cache: + host: "REDIS_URL" + port: 6379 + ttl: "PT10M" + # Optional. Default is 0. + db: 1 + +# Optional. +responseCache: + mongoURL: "mongodb://MONGO_USERNAME:MONGO_PASSWORD@MONOG_URL/MONGO_DB_NAME?authSource=admin" + ttl: "PT10M" + +# Mandatory. +# Priority order will be +# 1. Synchronous +# 2. webhook +# 3. pubSub +client: + synchronous: + mongoURL: "mongodb://MONGO_USERNAME:MONGO_PASSWORD@MONOG_URL/MONGO_DB_NAME?authSource=admin" + + #webhook: + # url: "https://beckn.free.beeceptor.com/clientURL" + + #messageQueue: + # amqpURL: "amqp://guest:guest@localhost:5672" + # incomingQueue: "protocol-server-incoming" + # outgoingQueue: "protocol-server-outgoing" + +# Mandatory. +app: + # Mandatory. + mode: bap + + # Two types of gateway mode present. + # client and network. + gateway: + mode: client + inboxQueue: "inbox" + outboxQueue: "outbox" + amqpURL: "amqp://RABBITMQ_USERNAME:RABBITMQ_PASSWORD@RABBITMQ_URL:5672" + + # Mandatory. + actions: + requests: + search: + ttl : "PT15S" + init: + ttl : "PT10S" + select: + ttl : "PT10S" + confirm: + ttl : "PT10S" + status: + ttl : "PT10S" + track: + ttl : "PT10S" + cancel: + ttl : "PT10S" + update: + ttl : "PT10S" + rating: + ttl : "PT10S" + support: + ttl : "PT10S" + get_cancellation_reasons: + ttl : "PT10S" + get_rating_categories: + ttl : "PT10S" + cancellation: + ttl : "PT10S" + + responses: + on_search: + ttl: "PT15S" + on_init: + ttl: "PT10S" + on_select: + ttl: "PT10S" + on_confirm: + ttl: "PT10S" + on_status: + ttl: "PT10S" + on_track: + ttl: "PT10S" + on_cancel: + ttl: "PT10S" + on_update: + ttl: "PT10S" + on_rating: + ttl: "PT10S" + on_support: + ttl: "PT10S" + cancellation_reasons: + ttl: "PT10S" + rating_categories: + ttl: "PT10S" + + # Mandatory. + privateKey: "PRIVATE_KEY" + publicKey: "PUBLIC_KEY" + + # Mandatory. + subscriberId: "BAP_SUBSCRIBER_ID" + subscriberUri: "BAP_SUBSCRIBER_URL" + + # Mandatory. + registryUrl: REGISTRY_URL + auth: false + uniqueKey: "BAP_SUBSCRIBER_KEY_ID" + + # Mandatory. + city: "std:080" + country: "IND" + + # Mandatory. + ttl: "PT10M" + + # Mandatory. + httpTimeout: "PT3S" + httpRetryCount: 2 + telemetry: + enabled: false + url: "" + batchSize: 100 + # In minutes + syncInterval: 30 + redis_db: 3 + + useLayer2Config: USE_LAYER_2_CONFIG + mandateLayer2Config: MANDATE_LAYER_2_CONFIG + + diff --git a/install/protocol-server-data/bap-network.yaml-sample b/install/protocol-server-data/bap-network.yaml-sample new file mode 100644 index 0000000..8ed78c1 --- /dev/null +++ b/install/protocol-server-data/bap-network.yaml-sample @@ -0,0 +1,136 @@ +# Mandatory +server: + port: BAP_NETWORK_PORT + +# Mandatory. +cache: + host: "REDIS_URL" + port: 6379 + ttl: "PT10M" + # Optional. Default is 0. + db: 1 + +# Optional. +responseCache: + mongoURL: "mongodb://MONGO_USERNAME:MONGO_PASSWORD@MONOG_URL/MONGO_DB_NAME?authSource=admin" + ttl: "PT10M" + +# Mandatory. +# Priority order will be +# 1. Synchronous +# 2. webhook +# 3. pubSub +client: + synchronous: + mongoURL: "mongodb://MONGO_USERNAME:MONGO_PASSWORD@MONOG_URL/MONGO_DB_NAME?authSource=admin" + + #webhook: + # url: "https://beckn.free.beeceptor.com/clientURL" + + #messageQueue: + # amqpURL: "amqp://guest:guest@localhost:5672" + # incomingQueue: "protocol-server-incoming" + # outgoingQueue: "protocol-server-outgoing" + +# Mandatory. +app: + # Mandatory. + mode: bap + + # Two types of gateway mode present. + # client and network. + gateway: + mode: network + inboxQueue: "inbox" + outboxQueue: "outbox" + amqpURL: "amqp://RABBITMQ_USERNAME:RABBITMQ_PASSWORD@RABBITMQ_URL:5672" + + # Mandatory. + actions: + requests: + search: + ttl : "PT15S" + init: + ttl : "PT10S" + select: + ttl : "PT10S" + confirm: + ttl : "PT10S" + status: + ttl : "PT10S" + track: + ttl : "PT10S" + cancel: + ttl : "PT10S" + update: + ttl : "PT10S" + rating: + ttl : "PT10S" + support: + ttl : "PT10S" + get_cancellation_reasons: + ttl : "PT10S" + get_rating_categories: + ttl : "PT10S" + cancellation: + ttl : "PT10S" + + responses: + on_search: + ttl: "PT15S" + on_init: + ttl: "PT10S" + on_select: + ttl: "PT10S" + on_confirm: + ttl: "PT10S" + on_status: + ttl: "PT10S" + on_track: + ttl: "PT10S" + on_cancel: + ttl: "PT10S" + on_update: + ttl: "PT10S" + on_rating: + ttl: "PT10S" + on_support: + ttl: "PT10S" + cancellation_reasons: + ttl: "PT10S" + rating_categories: + ttl: "PT10S" + + # Mandatory. + privateKey: "PRIVATE_KEY" + publicKey: "PUBLIC_KEY" + + # Mandatory. + subscriberId: "BAP_SUBSCRIBER_ID" + subscriberUri: "BAP_SUBSCRIBER_URL" + + # Mandatory. + registryUrl: REGISTRY_URL + auth: false + uniqueKey: "BAP_SUBSCRIBER_KEY_ID" + + # Mandatory. + city: "std:080" + country: "IND" + + # Mandatory. + ttl: "PT10M" + + # Mandatory. + httpTimeout: "PT3S" + httpRetryCount: 2 + telemetry: + enabled: false + url: "" + batchSize: 100 + # In minutes + syncInterval: 30 + redis_db: 3 + + useLayer2Config: USE_LAYER_2_CONFIG + mandateLayer2Config: MANDATE_LAYER_2_CONFIG \ No newline at end of file diff --git a/install/protocol-server-data/bpp-client.yaml-sample b/install/protocol-server-data/bpp-client.yaml-sample new file mode 100644 index 0000000..2da36ac --- /dev/null +++ b/install/protocol-server-data/bpp-client.yaml-sample @@ -0,0 +1,134 @@ +# Mandatory +server: + port: BPP_CLIENT_PORT + +# Mandatory. +cache: + host: "REDIS_URL" + port: 6379 + ttl: "PT10M" + # Optional. Default is 0. + db: 0 + +# Optional. +responseCache: + mongoURL: "mongodb://MONGO_USERNAME:MONGO_PASSWORD@MONOG_URL/MONGO_DB_NAME?authSource=admin" + ttl: "PT10M" + +# Mandatory. +# Priority order will be +# 1. Synchronous +# 2. webhook +# 3. pubSub +client: +# synchronous: +# mongoURL: "mongodb://tvast:password@mongoDB:27017/ps?authSource=admin" + + webhook: + url: "WEBHOOK_URL" + + #messageQueue: + # amqpURL: "amqp://guest:guest@localhost:5672" + # incomingQueue: "protocol-server-incoming" + # outgoingQueue: "protocol-server-outgoing" + +# Mandatory. +app: + # Mandatory. + mode: bpp + + # Two types of gateway mode present. + # client and network. + gateway: + mode: client + inboxQueue: "inbox-bpp" + outboxQueue: "outbox-bpp" + amqpURL: "amqp://RABBITMQ_USERNAME:RABBITMQ_PASSWORD@RABBITMQ_URL:5672" + + # Mandatory. + actions: + requests: + search: + ttl : "PT15S" + init: + ttl : "PT10S" + select: + ttl : "PT10S" + confirm: + ttl : "PT10S" + status: + ttl : "PT10S" + track: + ttl : "PT10S" + cancel: + ttl : "PT10S" + update: + ttl : "PT10S" + rating: + ttl : "PT10S" + support: + ttl : "PT10S" + get_cancellation_reasons: + ttl: "PT10S" + get_rating_categories: + ttl: "PT10S" + + responses: + on_search: + ttl: "PT15S" + on_init: + ttl: "PT10S" + on_select: + ttl: "PT10S" + on_confirm: + ttl: "PT10S" + on_status: + ttl: "PT10S" + on_track: + ttl: "PT10S" + on_cancel: + ttl: "PT10S" + on_update: + ttl: "PT10S" + on_rating: + ttl: "PT10S" + on_support: + ttl: "PT10S" + cancellation_reasons: + ttl: "PT10S" + rating_categories: + ttl: "PT10S" + + # Mandatory. + privateKey: "PRIVATE_KEY" + publicKey: "PUBLIC_KEY" + + # Mandatory. + subscriberId: "BPP_SUBSCRIBER_ID" + subscriberUri: "BPP_SUBSCRIBER_URL" + + # Mandatory. + registryUrl: REGISTRY_URL + auth: true + uniqueKey: "BPP_SUBSCRIBER_KEY_ID" + + # Mandatory. + city: "std:080" + country: "IND" + + # Mandatory. + ttl: "PT10M" + + # Mandatory. + httpTimeout: "PT3S" + httpRetryCount: 2 + telemetry: + enabled: false + url: "" + batchSize: 100 + # In minutes + syncInterval: 30 + redis_db: 3 + + useLayer2Config: USE_LAYER_2_CONFIG + mandateLayer2Config: MANDATE_LAYER_2_CONFIG \ No newline at end of file diff --git a/install/protocol-server-data/bpp-network.yaml-sample b/install/protocol-server-data/bpp-network.yaml-sample new file mode 100644 index 0000000..ce7623b --- /dev/null +++ b/install/protocol-server-data/bpp-network.yaml-sample @@ -0,0 +1,134 @@ +# Mandatory +server: + port: BPP_NETWORK_PORT + +# Mandatory. +cache: + host: "REDIS_URL" + port: 6379 + ttl: "PT10M" + # Optional. Default is 0. + db: 0 + +# Optional. +responseCache: + mongoURL: "mongodb://MONGO_USERNAME:MONGO_PASSWORD@MONOG_URL/MONGO_DB_NAME?authSource=admin" + ttl: "PT10M" + +# Mandatory. +# Priority order will be +# 1. Synchronous +# 2. webhook +# 3. pubSub +client: +# synchronous: +# mongoURL: "mongodb://tvast:password@mongoDB:27017/ps?authSource=admin" + + webhook: + url: "WEBHOOK_URL" + + #messageQueue: + # amqpURL: "amqp://guest:guest@localhost:5672" + # incomingQueue: "protocol-server-incoming" + # outgoingQueue: "protocol-server-outgoing" + +# Mandatory. +app: + # Mandatory. + mode: bpp + + # Two types of gateway mode present. + # client and network. + gateway: + mode: network + inboxQueue: "inbox-bpp" + outboxQueue: "outbox-bpp" + amqpURL: "amqp://RABBITMQ_USERNAME:RABBITMQ_PASSWORD@RABBITMQ_URL:5672" + + # Mandatory. + actions: + requests: + search: + ttl : "PT15S" + init: + ttl : "PT10S" + select: + ttl : "PT10S" + confirm: + ttl : "PT10S" + status: + ttl : "PT10S" + track: + ttl : "PT10S" + cancel: + ttl : "PT10S" + update: + ttl : "PT10S" + rating: + ttl : "PT10S" + support: + ttl : "PT10S" + get_cancellation_reasons: + ttl: "PT10S" + get_rating_categories: + ttl: "PT10S" + + responses: + on_search: + ttl: "PT15S" + on_init: + ttl: "PT10S" + on_select: + ttl: "PT10S" + on_confirm: + ttl: "PT10S" + on_status: + ttl: "PT10S" + on_track: + ttl: "PT10S" + on_cancel: + ttl: "PT10S" + on_update: + ttl: "PT10S" + on_rating: + ttl: "PT10S" + on_support: + ttl: "PT10S" + cancellation_reasons: + ttl: "PT10S" + rating_categories: + ttl: "PT10S" + + # Mandatory. + privateKey: "PRIVATE_KEY" + publicKey: "PUBLIC_KEY" + + # Mandatory. + subscriberId: "BPP_SUBSCRIBER_ID" + subscriberUri: "BPP_SUBSCRIBER_URL" + + # Mandatory. + registryUrl: REGISTRY_URL + auth: true + uniqueKey: "BPP_SUBSCRIBER_KEY_ID" + + # Mandatory. + city: "std:080" + country: "IND" + + # Mandatory. + ttl: "PT10M" + + # Mandatory. + httpTimeout: "PT3S" + httpRetryCount: 2 + telemetry: + enabled: false + url: "" + batchSize: 100 + # In minutes + syncInterval: 30 + redis_db: 3 + + useLayer2Config: USE_LAYER_2_CONFIG + mandateLayer2Config: MANDATE_LAYER_2_CONFIG \ No newline at end of file diff --git a/install/registry_data/config/envvars b/install/registry_data/config/envvars new file mode 100644 index 0000000..0965d04 --- /dev/null +++ b/install/registry_data/config/envvars @@ -0,0 +1,2 @@ +export dport=3000 +export wport=3030 diff --git a/install/registry_data/config/logger.properties b/install/registry_data/config/logger.properties new file mode 100644 index 0000000..a9711be --- /dev/null +++ b/install/registry_data/config/logger.properties @@ -0,0 +1,20 @@ +com.venky.core.log.InfoFileHandler.limit=500000 +com.venky.core.log.InfoFileHandler.count=2 +com.venky.core.log.InfoFileHandler.formatter=java.util.logging.SimpleFormatter +com.venky.core.log.InfoFileHandler.pattern=tmp/java_info%u.log +com.venky.core.log.InfoFileHandler.level=ALL + +com.venky.core.log.WarningFileHandler.limit=500000 +com.venky.core.log.WarningFileHandler.count=2 +com.venky.core.log.WarningFileHandler.formatter=java.util.logging.SimpleFormatter +com.venky.core.log.WarningFileHandler.pattern=tmp/java_warn%u.log +com.venky.core.log.WarningFileHandler.level=WARNING + + +handlers=com.venky.core.log.WarningFileHandler com.venky.core.log.InfoFileHandler +logger.useParentHandlers=false + +.level=INFO +com.venky.swf.plugins.background.core.level=FINEST +com.venky.swf.db.Database.level=FINEST +#com.venky.core.log.TimerStatistics.level=FINE diff --git a/install/registry_data/config/swf.properties-sample b/install/registry_data/config/swf.properties-sample new file mode 100644 index 0000000..1506f09 --- /dev/null +++ b/install/registry_data/config/swf.properties-sample @@ -0,0 +1,43 @@ +swf.load.complete.config.tables.if.count.less.than=500 +swf.user.password.encrypted=false +swf.plugins.background.core.workers.numThreads=3 +swf.application.authentication.required=false +swf.application.requires.registration=true + +#swf.host=localhost +swf.host=REGISTRY_URL +swf.external.port=REGISTRY_PORT +swf.external.scheme=PROTOCOL + + +swf.jdbc.driver=org.h2.Driver +swf.jdbc.url=jdbc:h2:./database/registry;AUTO_SERVER=TRUE; +swf.jdbc.userid=registry +swf.jdbc.password=registry +swf.jdbc.validationQuery=values(1) +swf.jdbc.dbschema=PUBLIC +swf.jdbc.dbschema.setonconnection=true +swf.jdbc.set.dbschema.command=set schema public + + +# These keys are needed if you want to use push notifications. +# you can generate this from https://d3v.one/vapid-key-generator/ or similiar sites. +# you also need to specify the public key in src/main/resources/scripts/application.js + +#push.server.private.key=your_private_key +#push.server.public.key=your_public_key + +swf.api.keys.case=SNAKE +swf.api.root.required=false + +# Needed for Google Login +#swf.GOOGLE.client.id= +#swf.GOOGLE.client.secret= + +swf.encryption.support=false +## Uncomment below if encryption is needed and set appropriate passwords +#swf.key.store.directory=./.keystore +#swf.key.store.password=venky12 +#swf.key.entry.succinct.password=succinct12 + +swf.ftl.dir=src/main/resources/templates \ No newline at end of file diff --git a/install/registry_data/database/.gitignore b/install/registry_data/database/.gitignore new file mode 100644 index 0000000..38d6f13 --- /dev/null +++ b/install/registry_data/database/.gitignore @@ -0,0 +1,11 @@ +docker_data +gateway_data/config/swf.properties +registry_data/config/swf.properties +.vscode +protocol-server-data/bap-client.yml +protocol-server-data/bap-network.yml +protocol-server-data/bpp-client.yml +protocol-server-data/bpp-network.yml +ENV/.env-generic-client-layer +registry.lock* +gateway.lock* diff --git a/install/scripts/banner.sh b/install/scripts/banner.sh new file mode 100755 index 0000000..1043418 --- /dev/null +++ b/install/scripts/banner.sh @@ -0,0 +1,27 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source $SCRIPT_DIR/variables.sh + +# Define the text to print in the banner +text=" + ###### ####### ##### # # # # + # # # # # # # ## # + # # # # # # # # # + ###### ##### # ### # # # + # # # # # # # # # + # # # # # # # # ## + ###### ####### ##### # # # # +" + +text2=" + ######## ######## ###### ## ## ## ## + ## ## ## ## ## ## ## ### ## + ## ## ## ## ## ## #### ## + ######## ###### ## ##### ## ## ## + ## ## ## ## ## ## ## #### + ## ## ## ## ## ## ## ## ### + ######## ######## ###### ## ## ## ## +" +# Clear the terminal screen +clear +echo "${GREEN}$text2${NC}" diff --git a/install/scripts/generate_keys.sh b/install/scripts/generate_keys.sh new file mode 100755 index 0000000..4f00306 --- /dev/null +++ b/install/scripts/generate_keys.sh @@ -0,0 +1,27 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source $SCRIPT_DIR/variables.sh + +# Run the script that generates keys and capture the output +get_keys() { + docker pull fidedocker/protocol-server > /dev/null 2>&1 + docker run --name temp -itd fidedocker/protocol-server > /dev/null 2>&1 + output=$(docker exec -i temp node /usr/src/app/scripts/generate-keys 2>&1) + docker stop temp > /dev/null 2>&1 + docker rm temp > /dev/null 2>&1 +# Check if the script executed successfully +if [ $? -eq 0 ]; then + # Extract Public Key and Private Key using grep and awk + public_key=$(echo "$output" | awk '/Your Public Key/ {getline; print $0}') + private_key=$(echo "$output" | awk '/Your Private Key/ {getline; print $0}') + # Remove leading and trailing whitespaces + public_key=$(echo "$public_key" | tr -d '[:space:]') + private_key=$(echo "$private_key" | tr -d '[:space:]') + +else + # Print an error message if the script failed + echo "${RED}Error: Key generation script failed. Please check the script output.${NC}" +fi +} + +#get_keys diff --git a/install/scripts/generic-client-layer.sh b/install/scripts/generic-client-layer.sh new file mode 100755 index 0000000..f8dc7f4 --- /dev/null +++ b/install/scripts/generic-client-layer.sh @@ -0,0 +1,21 @@ +#!/bin/bash +update_env_file(){ + cp ../ENV/.env-generic-client-layer-sample ../ENV/.env-generic-client-layer + envFile=../ENV/.env-generic-client-layer + bap_subscriber_id=$1 + bap_subscriber_url=$2 + bap_client_url=$3 + + if [[ $(uname) == "Darwin" ]]; then + sed -i '' "s|BAP_SUBSCRIBER_ID|$bap_subscriber_id|" $envFile + sed -i '' "s|BAP_SUBSCRIBER_URL|$bap_subscriber_url|" $envFile + sed -i '' "s|BAP_CLIENT_URL|$bap_client_url|" $envFile + else + sed -i "s|BAP_SUBSCRIBER_ID|$bap_subscriber_id|" $envFile + sed -i "s|BAP_SUBSCRIBER_URL|$bap_subscriber_url|" $envFile + sed -i "s|BAP_CLIENT_URL|$bap_client_url|" $envFile + fi + +} + +update_env_file $1 $2 $3 \ No newline at end of file diff --git a/install/scripts/get_container_details.sh b/install/scripts/get_container_details.sh new file mode 100755 index 0000000..4b093e6 --- /dev/null +++ b/install/scripts/get_container_details.sh @@ -0,0 +1,8 @@ +#!/bin/bash +get_container_ip() { + container_name=$1 + container_ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $container_name) + echo $container_ip +} + +#get_container_ip $1 \ No newline at end of file diff --git a/install/scripts/k8s/ConfigMap.yaml b/install/scripts/k8s/ConfigMap.yaml new file mode 100644 index 0000000..04ef557 --- /dev/null +++ b/install/scripts/k8s/ConfigMap.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: swf-config +data: + swf.properties: | + # Content of swf.properties file for registry diff --git a/install/scripts/k8s/deployment.yaml b/install/scripts/k8s/deployment.yaml new file mode 100644 index 0000000..012efed --- /dev/null +++ b/install/scripts/k8s/deployment.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: registry-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: registry + template: + metadata: + labels: + app: registry + spec: + containers: + - name: registry + image: fidedocker/registry + ports: + - containerPort: 3000 + - containerPort: 3030 + volumeMounts: + - name: registry-data + mountPath: /registry + volumes: + - name: registry-data + hostPath: + path: /absolute/path/to/registry_data/ + +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gateway-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: gateway + template: + metadata: + labels: + app: gateway + spec: + containers: + - name: gateway + image: fidedocker/gateway + ports: + - containerPort: 4000 + - containerPort: 4030 + volumeMounts: + - name: gateway-data + mountPath: /gateway + volumes: + - name: gateway-data + hostPath: + path: /path/to/gateway_data + +# Repeat the above structure for other services diff --git a/install/scripts/k8s/ingress.yaml b/install/scripts/k8s/ingress.yaml new file mode 100644 index 0000000..67888e5 --- /dev/null +++ b/install/scripts/k8s/ingress.yaml @@ -0,0 +1,24 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: beckn-ingress +spec: + rules: + - host: localhost + http: + paths: + - path: /registry + pathType: Prefix + backend: + service: + name: registry-service + port: + number: 3000 + - path: /gateway + pathType: Prefix + backend: + service: + name: gateway-service + port: + number: 4000 + # Repeat the above structure for other services diff --git a/install/scripts/k8s/service.yaml b/install/scripts/k8s/service.yaml new file mode 100644 index 0000000..bdd818c --- /dev/null +++ b/install/scripts/k8s/service.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +kind: Service +metadata: + name: registry-service +spec: + selector: + app: registry + ports: + - protocol: TCP + port: 3000 + targetPort: 3000 + - protocol: TCP + port: 3030 + targetPort: 3030 + +--- + +apiVersion: v1 +kind: Service +metadata: + name: gateway-service +spec: + selector: + app: gateway + ports: + - protocol: TCP + port: 4000 + targetPort: 4000 + - protocol: TCP + port: 4030 + targetPort: 4030 + +# Repeat the above structure for other services diff --git a/install/scripts/package_manager.sh b/install/scripts/package_manager.sh new file mode 100755 index 0000000..b510879 --- /dev/null +++ b/install/scripts/package_manager.sh @@ -0,0 +1,172 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source $SCRIPT_DIR/variables.sh + +#Required packages list as below. +package_list=("docker" "docker-compose" "jq") + +command_exists() { + command -v "$1" &>/dev/null +} + +# Redirect input from /dev/null to silence prompts +export DEBIAN_FRONTEND=noninteractive +export APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 + + +#Install Package +install_package() { + if [ -x "$(command -v apt-get)" ]; then + # APT (Debian/Ubuntu) + if [ "$1" == "docker" ]; then + if ! docker --version > /dev/null 2>&1; then + if [ -f /etc/debian_version ]; then + curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + else + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + fi + sudo apt update >/dev/null 2>&1 + sudo apt install -y docker-ce docker-ce-cli containerd.io >/dev/null 2>&1 + sudo usermod -aG docker $USER + source ~/.bashrc + sudo systemctl enable docker.service + sudo systemctl restart docker.service + else + echo "Docker is already installed." + fi + else + if ! dpkg -l | grep -q "^ii $1 "; then + sudo apt-get update >/dev/null 2>&1 + sudo apt-get install -y $1 >/dev/null 2>&1 + else + echo "$1 is already installed." + fi + fi + elif [ -x "$(command -v yum)" ]; then + # YUM (Red Hat/CentOS/Amazon Linux) + if [ "$1" == "docker" ]; then + if ! docker --version > /dev/null 2>&1; then + if [ -f /etc/centos-release ]; then + sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo + elif [ -f /etc/redhat-release ]; then + sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo + elif grep -q "Amazon Linux release 2" /etc/system-release; then + sudo amazon-linux-extras install docker -y + elif grep -q "Amazon Linux release" /etc/system-release; then + sudo yum install -y docker + fi + sudo yum install -y docker-ce docker-ce-cli containerd.io >/dev/null 2>&1 + sudo usermod -aG docker $USER + source ~/.bashrc + sudo systemctl enable docker.service + sudo systemctl restart docker.service + else + echo "Docker is already installed." + fi + else + if ! rpm -qa | grep -q "^$1-"; then + sudo yum install -y $1 >/dev/null 2>&1 + else + echo "$1 is already installed." + fi + fi + elif [ -x "$(command -v amazon-linux-extras)" ]; then + # Amazon Linux 2 specific + if [ "$1" == "docker" ]; then + if ! docker --version > /dev/null 2>&1; then + sudo amazon-linux-extras install docker -y >/dev/null 2>&1 + sudo systemctl enable docker.service + sudo systemctl start docker.service + sudo usermod -aG docker $USER + source ~/.bashrc + else + echo "Docker is already installed." + fi + else + if ! amazon-linux-extras list | grep -q "$1"; then + sudo amazon-linux-extras install $1 -y >/dev/null 2>&1 + else + echo "$1 is already installed." + fi + fi + else + echo "Unsupported package manager. Please install $1 manually." + exit 1 + fi +} + + + +remove_package(){ + if [ -x "$(command -v apt-get)" ]; then + # APT (Debian/Ubuntu) + sudo apt-get purge -y $1 >/dev/null 2>&1 + sudo apt autoremove -y >/dev/null 2>&1 + elif [ -x "$(command -v yum)" ]; then + # YUM (Red Hat/CentOS) + sudo yum remove -y $1 >/dev/null 2>&1 + sudo yum autoremove -y >/dev/null 2>&1 + fi +} + +# Function to install Docker +install_docker_bash() { + # Install Docker Bash completion + echo "Installing Docker Bash completion..." + sudo curl -L https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -o /etc/bash_completion.d/docker +} + +# Function to install Docker Compose +install_docker_compose() { + command_exists docker-compose + if [ $? -eq 0 ]; then + echo "docker-compose is already installed." + return + else + echo "Installing Docker Compose..." + sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker-compose + fi + + # Check if Docker Compose installation was successful + if [ $? -eq 0 ]; then + echo "Docker Compose installed successfully." + else + echo "${RED}Failed to install Docker Compose. Exiting.${NC}" + exit 1 + fi + + if [ -f /etc/bash_completion.d/docker-compose ]; then + echo "Docker Compose Bash completion is already installed." + else + # Install Docker Compose Bash completion + echo "Installing Docker Compose Bash completion..." + sudo curl -L https://raw.githubusercontent.com/docker/compose/master/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose + fi +} + + +# Check if package is already installed + +for package in "${package_list[@]}"; do + if ! command_exists $package; then + install_package "$package" + fi + if [ "$package" == "docker" ]; then + if [[ $(uname -s ) == 'Linux' ]];then + if [ -f /etc/bash_completion.d/docker ]; then + echo "Docker Bash completion is already installed." + else + install_docker_bash + fi + fi + fi + if [ "$package" == "docker-compose" ]; then + if [[ $(uname -s ) == 'Linux' ]];then + install_docker_compose + fi + fi +done + diff --git a/install/scripts/register_gateway.sh b/install/scripts/register_gateway.sh new file mode 100755 index 0000000..3d19407 --- /dev/null +++ b/install/scripts/register_gateway.sh @@ -0,0 +1,32 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source $SCRIPT_DIR/get_container_details.sh + +register_gw() { +cookie_file="cookies.txt" +# Step 1: Perform login and save the session cookies to a file +curl --cookie-jar $cookie_file --request POST $login_url + +curl --request GET --cookie $cookie_file $subscribe_url +rm -rf $cookie_file +} + +if [[ $(uname -s) == 'Darwin' ]]; then + ip=localhost +elif [[ $(systemd-detect-virt) == 'wsl' ]]; then + ip=$(hostname -I | awk '{print $1}') +else + ip=$(get_container_ip gateway) +fi + +if [[ $1 ]]; then + if [[ $1 == https://* ]]; then + login_url="$1/login?name=root&password=root&_LOGIN=Login" + subscribe_url="$1/bg/subscribe" + register_gw + fi +else + login_url="http://$ip:4030/login?name=root&password=root&_LOGIN=Login" + subscribe_url="http://$ip:4030/bg/subscribe" + register_gw +fi diff --git a/install/scripts/registry_entry.sh b/install/scripts/registry_entry.sh new file mode 100755 index 0000000..0a8f66b --- /dev/null +++ b/install/scripts/registry_entry.sh @@ -0,0 +1,46 @@ +#!/bin/bash +source $SCRIPT_DIR/variables.sh + +create_network_participant() { + # Set your variables + registry_url="$1" + content_type="$2" + subscriber_id="$3" + pub_key_id="$4" + subscriber_url="$5" + encr_public_key="$6" + signing_public_key="$7" + valid_from="$8" + valid_until="$9" + type="${10}" + + json_data=$(cat <&1) + + if [ $? -eq 0 ]; then + + echo "${GREEN}Network Participant Entry is created. Please login to registry $registry_url and subscribe you Network Participant.${NC}" + else + echo "${RED}Error: $response${NC}" + fi +} diff --git a/install/scripts/update_bap_config.sh b/install/scripts/update_bap_config.sh new file mode 100755 index 0000000..be65d06 --- /dev/null +++ b/install/scripts/update_bap_config.sh @@ -0,0 +1,126 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +source $SCRIPT_DIR/registry_entry.sh +source $SCRIPT_DIR/generate_keys.sh +source $SCRIPT_DIR/variables.sh +source $SCRIPT_DIR/get_container_details.sh + + +newClientFile=$(echo "$bapClientFile" | sed 's/yaml-sample/yml/') +newNetworkFile=$(echo "$bapNetworkFile" | sed 's/yaml-sample/yml/') + +cp $bapClientFile $newClientFile +cp $bapNetworkFile $newNetworkFile + +clientFile=$newClientFile +networkFile=$newNetworkFile + +client_port=$bap_client_port +network_port=$bap_network_port + +if [[ $(uname) == "Darwin" ]]; then + sed -i '' "s|BAP_NETWORK_PORT|$network_port|" $networkFile + sed -i '' "s|BAP_CLIENT_PORT|$client_port|" $clientFile +else + sed -i "s|BAP_NETWORK_PORT|$network_port|" $networkFile + sed -i "s|BAP_CLIENT_PORT|$client_port|" $clientFile +fi + +if [[ $1 ]]; then + registry_url=$1 + bap_subscriber_id=$2 + bap_subscriber_key_id=$3 + bap_subscriber_url=$4 +else + if [[ $(uname -s) == 'Darwin' ]]; then + ip=localhost + registry_url="http://$ip:3030/subscribers" + elif [[ $(systemd-detect-virt) == 'wsl' ]]; then + ip=$(hostname -I | awk '{print $1}') + registry_url="http://$ip:3030/subscribers" + else + registry_url="http://$(get_container_ip registry):3030/subscribers" + fi +fi + +echo "Generating public/private key pair" +get_keys +echo "Your Private Key: $private_key" +echo "Your Public Key: $public_key" + + +if [[ $(uname -s ) == 'Darwin' ]];then + valid_from=$(date -u -v-1d +"%Y-%m-%dT%H:%M:%S.%000Z") + valid_until=$(date -u -v+3y +"%Y-%m-%dT%H:%M:%S.%000Z") +else + valid_from=$(date -u -d "-1 day" +"%Y-%m-%dT%H:%M:%S.%3NZ") + valid_until=$(date -u -d "+3 year" +"%Y-%m-%dT%H:%M:%S.%3NZ") +fi + +type=BAP + + +# Define an associative array for replacements +if [[ $(uname -s ) == 'Darwin' ]];then + replacements=( + "REDIS_URL=$redisUrl" + "REGISTRY_URL=$registry_url" + "MONGO_USERNAME=$mongo_initdb_root_username" + "MONGO_PASSWORD=$mongo_initdb_root_password" + "MONGO_DB_NAME=$mongo_initdb_database" + "MONOG_URL=$mongoUrl" + "RABBITMQ_USERNAME=$rabbitmq_default_user" + "RABBITMQ_PASSWORD=$rabbitmq_default_pass" + "RABBITMQ_URL=$rabbitmqUrl" + "PRIVATE_KEY=$private_key" + "PUBLIC_KEY=$public_key" + "BAP_SUBSCRIBER_ID=$bap_subscriber_id" + "BAP_SUBSCRIBER_URL=$bap_subscriber_url" + "BAP_SUBSCRIBER_KEY_ID=$bap_subscriber_key_id" + "USE_LAYER_2_CONFIG"=true + "MANDATE_LAYER_2_CONFIG"=true + ) + + echo "Configuring BAP protocol server" + # Apply replacements in both files + for file in "$clientFile" "$networkFile"; do + for line in "${replacements[@]}"; do + key=$(echo "$line" | cut -d '=' -f1) + value=$(echo "$line" | cut -d '=' -f2) + sed -i '' "s|$key|$value|" "$file" + done + + done +else + declare -A replacements=( + ["REDIS_URL"]=$redisUrl + ["REGISTRY_URL"]=$registry_url + ["MONGO_USERNAME"]=$mongo_initdb_root_username + ["MONGO_PASSWORD"]=$mongo_initdb_root_password + ["MONGO_DB_NAME"]=$mongo_initdb_database + ["MONOG_URL"]=$mongoUrl + ["RABBITMQ_USERNAME"]=$rabbitmq_default_user + ["RABBITMQ_PASSWORD"]=$rabbitmq_default_pass + ["RABBITMQ_URL"]=$rabbitmqUrl + ["PRIVATE_KEY"]=$private_key + ["PUBLIC_KEY"]=$public_key + ["BAP_SUBSCRIBER_ID"]=$bap_subscriber_id + ["BAP_SUBSCRIBER_URL"]=$bap_subscriber_url + ["BAP_SUBSCRIBER_KEY_ID"]=$bap_subscriber_key_id + ["USE_LAYER_2_CONFIG"]=true + ["MANDATE_LAYER_2_CONFIG"]=true + ) + + echo "Configuring BAP protocol server" + # Apply replacements in both files + for file in "$clientFile" "$networkFile"; do + for key in "${!replacements[@]}"; do + sed -i "s|$key|${replacements[$key]}|" "$file" + done + done +fi + +echo "Registering BAP protocol server on the registry" + +create_network_participant "$registry_url" "application/json" "$bap_subscriber_id" "$bap_subscriber_key_id" "$bap_subscriber_url" "$public_key" "$public_key" "$valid_from" "$valid_until" "$type" \ No newline at end of file diff --git a/install/scripts/update_bpp_config.sh b/install/scripts/update_bpp_config.sh new file mode 100755 index 0000000..e20cc3a --- /dev/null +++ b/install/scripts/update_bpp_config.sh @@ -0,0 +1,132 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +source $SCRIPT_DIR/registry_entry.sh +source $SCRIPT_DIR/generate_keys.sh +source $SCRIPT_DIR/variables.sh +source $SCRIPT_DIR/get_container_details.sh + + +newClientFile=$(echo "$bppClientFile" | sed 's/yaml-sample/yml/') +newNetworkFile=$(echo "$bppNetworkFile" | sed 's/yaml-sample/yml/') + +cp $bppClientFile $newClientFile +cp $bppNetworkFile $newNetworkFile + +clientFile=$newClientFile +networkFile=$newNetworkFile + +client_port=$bpp_client_port +network_port=$bpp_network_port + +if [[ $(uname) == "Darwin" ]]; then + sed -i '' "s|BPP_NETWORK_PORT|$network_port|" $networkFile + sed -i '' "s|BPP_CLIENT_PORT|$client_port|" $clientFile +else + sed -i "s|BPP_NETWORK_PORT|$network_port|" $networkFile + sed -i "s|BPP_CLIENT_PORT|$client_port|" $clientFile +fi + +if [[ $1 ]]; then + registry_url=$1 + bpp_subscriber_id=$2 + bpp_subscriber_key_id=$3 + bpp_subscriber_url=$4 + webhook_url=$5 +else + if [[ $(uname -s) == 'Darwin' ]]; then + ip=localhost + registry_url="http://$ip:3030/subscribers" + elif [[ $(systemd-detect-virt) == 'wsl' ]]; then + ip=$(hostname -I | awk '{print $1}') + registry_url="http://$ip:3030/subscribers" + else + registry_url="http://$(get_container_ip registry):3030/subscribers" + fi +fi + +echo "Generating public/private key pair" +get_keys +#echo "Your Private Key: $private_key" +#echo "Your Public Key: $public_key" + + +if [[ $(uname -s ) == 'Darwin' ]];then + valid_from=$(date -u -v-1d +"%Y-%m-%dT%H:%M:%S.%000Z") + valid_until=$(date -u -v+3y +"%Y-%m-%dT%H:%M:%S.%000Z") +else + valid_from=$(date -u -d "-1 day" +"%Y-%m-%dT%H:%M:%S.%3NZ") + valid_until=$(date -u -d "+3 year" +"%Y-%m-%dT%H:%M:%S.%3NZ") +fi + +type=BPP + + +# Define an associative array for replacements +if [[ $(uname -s ) == 'Darwin' ]];then + replacements=( + "REDIS_URL=$redisUrl" + "REGISTRY_URL=$registry_url" + "MONGO_USERNAME=$mongo_initdb_root_username" + "MONGO_PASSWORD=$mongo_initdb_root_password" + "MONGO_DB_NAME=$mongo_initdb_database" + "MONOG_URL=$mongoUrl" + "RABBITMQ_USERNAME=$rabbitmq_default_user" + "RABBITMQ_PASSWORD=$rabbitmq_default_pass" + "RABBITMQ_URL=$rabbitmqUrl" + "PRIVATE_KEY=$private_key" + "PUBLIC_KEY=$public_key" + "BPP_SUBSCRIBER_URL=$bpp_subscriber_url" + "BPP_SUBSCRIBER_ID=$bpp_subscriber_id" + "BPP_SUBSCRIBER_KEY_ID=$bpp_subscriber_key_id" + "WEBHOOK_URL=$webhook_url" + "USE_LAYER_2_CONFIG"=true + "MANDATE_LAYER_2_CONFIG"=true + + ) + + echo "Configuring BPP protocol server" + # Apply replacements in both files + for file in "$clientFile" "$networkFile"; do + for line in "${replacements[@]}"; do + key=$(echo "$line" | cut -d '=' -f1) + value=$(echo "$line" | cut -d '=' -f2) + sed -i '' "s|$key|$value|" "$file" + done + + done + +else + declare -A replacements=( + ["REDIS_URL"]=$redisUrl + ["REGISTRY_URL"]=$registry_url + ["MONGO_USERNAME"]=$mongo_initdb_root_username + ["MONGO_PASSWORD"]=$mongo_initdb_root_password + ["MONGO_DB_NAME"]=$mongo_initdb_database + ["MONOG_URL"]=$mongoUrl + ["RABBITMQ_USERNAME"]=$rabbitmq_default_user + ["RABBITMQ_PASSWORD"]=$rabbitmq_default_pass + ["RABBITMQ_URL"]=$rabbitmqUrl + ["PRIVATE_KEY"]=$private_key + ["PUBLIC_KEY"]=$public_key + ["BPP_SUBSCRIBER_URL"]=$bpp_subscriber_url + ["BPP_SUBSCRIBER_ID"]=$bpp_subscriber_id + ["BPP_SUBSCRIBER_KEY_ID"]=$bpp_subscriber_key_id + ["WEBHOOK_URL"]=$webhook_url + ["USE_LAYER_2_CONFIG"]=true + ["MANDATE_LAYER_2_CONFIG"]=true + + ) + + echo "Configuring BPP protocol server" + # Apply replacements in both files + for file in "$clientFile" "$networkFile"; do + for key in "${!replacements[@]}"; do + sed -i "s|$key|${replacements[$key]}|" "$file" + done + done +fi + +echo "Registering BPP protocol server on the registry" + +create_network_participant "$registry_url" "application/json" "$bpp_subscriber_id" "$bpp_subscriber_key_id" "$bpp_subscriber_url" "$public_key" "$public_key" "$valid_from" "$valid_until" "$type" \ No newline at end of file diff --git a/install/scripts/update_gateway_details.sh b/install/scripts/update_gateway_details.sh new file mode 100755 index 0000000..5bcb187 --- /dev/null +++ b/install/scripts/update_gateway_details.sh @@ -0,0 +1,120 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source $SCRIPT_DIR/get_container_details.sh + +gateway_id=gateway +gateway_port=4030 +protocol=http +reg_url=http://$1:3030/subscribers/lookup +registry_id=registry +registry_url=http://registry:3030 + +update_network_json(){ + cp $SCRIPT_DIR/../gateway_data/config/networks/onix.json-sample $SCRIPT_DIR/../gateway_data/config/networks/onix.json + networks_config_file="$SCRIPT_DIR/../gateway_data/config/networks/onix.json" + tmp_file=$(mktemp "tempfile.XXXXXXXXXX") + sed " s|GATEWAY_ID|$gateway_id|g; s|REGISTRY_ID|$registry_id|g; s|REGISTRY_URL|$registry_url|g" "$networks_config_file" > "$tmp_file" + mv "$tmp_file" "$networks_config_file" + docker run --rm -v $SCRIPT_DIR/../gateway_data/config:/source -v gateway_data_volume:/target busybox cp -r /source/networks /target/ +} + +get_details_registry() { + # Make the curl request and store the output in a variable + response=$(curl --location --request POST "$reg_url" \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "type": "LREG" +}') + # Check if the curl command was successful (HTTP status code 2xx) + if [ $? -eq 0 ]; then + # Extract signing_public_key and encr_public_key using jq + signing_public_key=$(echo "$response" | jq -r '.[0].signing_public_key') + encr_public_key=$(echo "$response" | jq -r '.[0].encr_public_key') + subscriber_url=$(echo "$response" | jq -r '.[0].subscriber_url') + + else + echo "Error: Unable to fetch data from the server." + fi +} + +update_gateway_config() { + # Print the extracted keys + # echo "Signing Public Key: $signing_public_key" + # echo "Encryption Public Key: $encr_public_key" + # echo "URL $subscriber_url" + + cp $SCRIPT_DIR/../gateway_data/config/swf.properties-sample $SCRIPT_DIR/../gateway_data/config/swf.properties + config_file="$SCRIPT_DIR/../gateway_data/config/swf.properties" + + tmp_file=$(mktemp "tempfile.XXXXXXXXXX") + #sed " s|SUBSCRIBER_ID|$gateway_id|g; s|SIGNING_PUBLIC_KEY|$signing_public_key|g; s|ENCRYPTION_PUBLIC_KEY|$encr_public_key|g; s|GATEWAY_URL|$gateway_id|g; s|GATEWAY_PORT|$gateway_port|g; s|PROTOCOL|$protocol|g; s|REGISTRY_URL|$subscriber_url|g" "$config_file" > "$tmp_file" + sed " s|SUBSCRIBER_ID|$gateway_id|g; s|GATEWAY_URL|$gateway_id|g; s|GATEWAY_PORT|$gateway_port|g; s|PROTOCOL|$protocol|g; s|REGISTRY_URL|$subscriber_url|g" "$config_file" > "$tmp_file" + mv "$tmp_file" "$config_file" + docker volume create gateway_data_volume + docker volume create gateway_database_volume + docker run --rm -v $SCRIPT_DIR/../gateway_data/config:/source -v gateway_data_volume:/target busybox cp /source/{envvars,logger.properties,swf.properties} /target/ + update_network_json + +} + +# if [[ $1 == https://* ]]; then +# reg_url=$1/subscribers/lookup +# get_details_registry $reg_url +# else +# service_name=$1 +# if [[ $(uname -s) == 'Darwin' ]]; then +# ip=localhost +# elif [[ $(systemd-detect-virt) == 'wsl' ]]; then +# ip=$(hostname -I | awk '{print $1}') +# else +# ip=$(get_container_ip $service_name) +# fi +# reg_url=http://$ip:3030/subscribers/lookup +# get_details_registry $reg_url +# fi + +echo "Registry: $1 && Gateway: $2" + +if [[ $1 ]]; then + registry_url=$1 + if [[ $1 == https://* ]]; then + if [[ $(uname -s) == 'Darwin' ]]; then + registry_id=$(echo "$1" | sed -E 's/https:\/\///') + else + registry_id=$(echo "$1" | sed 's/https:\/\///') + fi + elif [[ $1 == http://* ]]; then + if [[ $(uname -s) == 'Darwin' ]]; then + registry_id=$(echo "$1" | sed -E 's/http:\/\///') + else + registry_id=$(echo "$1" | sed 's/http:\/\///') + fi + fi + if [[ $registry_id = "registry:3030" ]]; then + registry_id="registry" + fi +fi + +if [[ $2 ]]; then + if [[ $2 == https://* ]]; then + if [[ $(uname -s) == 'Darwin' ]]; then + gateway_id=$(echo "$2" | sed -E 's/https:\/\///') + else + gateway_id=$(echo "$2" | sed 's/https:\/\///') + fi + gateway_port=443 + protocol=https + update_gateway_config + elif [[ $2 == http://* ]]; then + if [[ $(uname -s) == 'Darwin' ]]; then + gateway_id=$(echo "$2" | sed -E 's/http:\/\///') + else + gateway_id=$(echo "$2" | sed 's/http:\/\///') + fi + gateway_port=80 + protocol=http + update_gateway_config + fi +else + update_gateway_config +fi \ No newline at end of file diff --git a/install/scripts/variables.sh b/install/scripts/variables.sh new file mode 100755 index 0000000..fcda32f --- /dev/null +++ b/install/scripts/variables.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +#Colour Code +RED=$(tput setaf 1) +GREEN=$(tput setaf 2) +YELLOW=$(tput setaf 3) +NC=$(tput sgr0) + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +#Comman Variables with Default values +mongo_initdb_root_username="beckn" +mongo_initdb_root_password="beckn123" +mongo_initdb_database="protocol_server" +mongoUrl="mongoDB:27017" + +rabbitmq_default_user="beckn" +rabbitmq_default_pass="beckn123" +rabbitmqUrl="rabbitmq" + +redisUrl="redis" + +registry_url="http://registry:3030/subscribers" +beckn_registry_url="https://registry.becknprotocol.io/subscribers" + +#public_key="KKHOpMKQCbJHzjme+CPKI3HQxIhzKMpcLLRGMhzf7rk=" +#private_key="W7HkCMPWvxv6/jWqHlyUI4vWX8704+rN3kCwBGIA7rcooc6kwpAJskfOOZ74I8ojcdDEiHMoylwstEYyHN/uuQ==" + +#BAP varibales. + +bapClientFile="$SCRIPT_DIR/../protocol-server-data/bap-client.yaml-sample" +bapNetworkFile="$SCRIPT_DIR/../protocol-server-data/bap-network.yaml-sample" + +bap_client_port=5001 +bap_network_port=5002 + +bap_subscriber_id="bap-network" +bap_subscriber_key_id="bap-network-key" +bap_subscriber_url="http://bap-network:5002" +bap_client_url="http://bap-client:5002" + +#BPP varibales. + +bppClientFile="$SCRIPT_DIR/../protocol-server-data/bpp-client.yaml-sample" +bppNetworkFile="$SCRIPT_DIR/../protocol-server-data/bpp-network.yaml-sample" + +bpp_client_port=6001 +bpp_network_port=6002 + +bpp_subscriber_id="bpp-network" +bpp_subscriber_key_id="bpp-network-key" +bpp_subscriber_url="http://bpp-network:6002" +webhook_url="http://sandbox-api:3000" + +bpp_docker_compose_file=docker-compose-bpp.yml +bpp_docker_compose_file_sandbox=docker-compose-bpp-with-sandbox.yml +bap_docker_compose_file=docker-compose-bap.yml +registry_docker_compose_file=docker-compose-registry.yml +gateway_docker_compose_file=docker-compose-gateway.yml +gcl_docker_compose_file=docker-compose-gcl.yml \ No newline at end of file diff --git a/layer2/docs/demo_healthcare.md b/layer2/docs/demo_healthcare.md new file mode 100644 index 0000000..4076a17 --- /dev/null +++ b/layer2/docs/demo_healthcare.md @@ -0,0 +1,142 @@ +# Creating a Beckn network for healthcare using Beckn-ONIX and transacting on it. + +## Introduction + +[Beckn](https://becknprotocol.io/) as a protocol allows creation of decentralised commerce network across many domains. Healthcare is one of them. Beckn-ONIX is a project aimed at easing setup and maintanence of Beckn network for different domains. It provides utilities to quickly setup the core Beckn network as well as provides tools to enable domain specific transactions. The latter is achieved through the use of layer 2 configuration files. + +The [Beckn-ONIX User Guide](./user_guide.md) provides an overall understanding of setup of the core Beckn network as well as download and ingestion of Layer 2 configuration files. The [step by step setup](./setup_walkthrough.md) walks through one such installation in great detail. The layer 2 configurations illustrated in that demo belong to the retail and energy domain. + +## Healthcare usecases on Beckn network + +A sample of the usecases that can be imagined on Beckn networks include + +- Discovery and request for ambulance service including scenarios such as + - Requesting an immediate ambulance service + - Scheduled pickup by ambulance + - Querying special ambulances for certain category of patients + - Requesting with both start and destination locations +- Blood bank related use cases including + - Finding and transacting for emergency blood + - Identifying and enrolling for donation +- Doctor consultation including + - search by location + - search by speciality +- Diagnostics related transactions including +- Pharmacy related transactions including + - Location aware search + +## Setting up Beckn network for healthcare usecases + +Setting up of a network for healthcare related use cases follows the same steps as illustrated in the [step by step setup](./setup_walkthrough.md) document. The primary differences is the layer 2 configuration file downloaded will be specific to healthcare and suited to conduct healthcare transactions. A sample layer 2 config for healthcare is available in the beckn_onix/layer2/samples folder and its path can be provided when running download_layer_2_config_bap.sh and download_layer_2_config_bpp.sh. If you are joining a network administered by a network facilitator, they might have a different layer 2 config and that should be used instead of the sample. + +The following is a conceptual view of core and layer 2 config from a perspective of validation +![Validation in Beckn Adaptor](./images/message_validation_in_ba.png) + +## Writing Layer 2 configuration file for healthcare domain + +Layer 2 configuration file addresses two primary concerns + +- The rules and policies agreed by participants from the healtcare domain and agreed upon usually through working groups or other mechanisms +- The rules and policies required by the network facilitator. + +At an implementation level, the layer 2 configuration has additional data over core in two primary areas + +- Description, examples and other non-machine enforceable information. These are useful for implementors to get the big picture, perform semantic validation and use example requests as base for their own modifications. +- Rules and policies against which incoming messages can be validated. These are over and above those in the core and cover domain specific scenarios. + +## Sample validations that can be encoded into layer 2 configuration + +1. Limiting values to a fixed set of enumerations. Examples include + +- Limiting fulfillment type to ["walk-in","doorstep service"] for diagnostics +- Limiting fulfillment type to ["IN-STORE_PICKUP","HOME-DELIVERY"] for items in pharmacy +- Limiting fulfillment type to ["EMERGENCY","NORMAL"] for blood bank related queries + +``` +type: object +properties: + type: + type: string + enum: + - EMERGENCY + - NORMAL +required: + - type +``` + +2. Limiting values using minimum and maximum + +- Setting minimum and maximum of count field of unitized object to indicate a single unit item in medicine packages + +``` +unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: '#/components/schemas/Scalar' +``` + +3. Marking an optional field in the core as required in the layer 2 config + +- Mandating feedback form be filled after consultation during rating +- Mandating cancellation reason for appointment cancellation +- Mandating credentials of doctor be present in search + +``` +type: object +properties: + cancellation_reason: + type: string +required: + - cancellation_reason +``` + +4. Mandating custom tags to be present in the tag list + +- Requiring the symptoms field be filled before the doctor's appointment is confirmed +- Requiring the qualifications of doctor to be returned ih search results in either skills or verifiable creds + +``` +type: object +properties: + creds: + type: object + skills: + type: object +oneOf: +- required: + - skills +- required: + - creds +``` + +5. Conditional requirement based on value of a different field + +- If item is medical equipment, additinoal description should be present + +``` +type: object +properties: + code: + type: string + additional_desc: + type: string +anyOf: +- not: + properties: + code: + const: "medical-equipment" + required: + - code +- required: + - additional_desc +``` + +## Conclusion + +Multitide DHP related use cases can be implemented on the Beckn networks. The process Beckn-ONIX follows to create core Beckn network and allowing participants to download layer 2 configuration is identical across domains. Layer 2 configuration captures both domain policies and rules as well as those enforced by the network facilitators. Layer 2 configuration are both prescriptive as well as mandatory. The mandatory rules and policies can be written on top of the core spec within the layer 2 config and can be enforced by incorporating a validator in the workflow. diff --git a/layer2/download_layer_2_config_bap.sh b/layer2/download_layer_2_config_bap.sh new file mode 100755 index 0000000..bdf53aa --- /dev/null +++ b/layer2/download_layer_2_config_bap.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +read -p "Enter the path from where to download the layer 2 configuration file:" FILE_URL + +CONTAINER_NAME="bap-network" +CONTAINER_ID=`docker ps -aqf "name=$CONTAINER_NAME"` +CONTAINER_PATH="/usr/src/app/schemas" +wget -O "$(basename "$FILE_URL")" "$FILE_URL" + +echo + +if [ $? -eq 0 ]; then + echo "File downloaded successfully." + FILENAME="$(basename "$FILE_URL")" + CONTAINER_NAME="bap-network" + CONTAINER_ID=`docker ps -aqf "name=$CONTAINER_NAME"` + CONTAINER_PATH="/usr/src/app/schemas" + + docker cp "$FILENAME" "$CONTAINER_NAME":"$CONTAINER_PATH/$FILENAME" + if [ $? -eq 0 ]; then + echo "File copied to Docker container $CONTAINER_NAME successfully." + fi + + CONTAINER_NAME="bap-client" + CONTAINER_ID=`docker ps -aqf "name=$CONTAINER_NAME"` + + docker cp "$FILENAME" "$CONTAINER_NAME":"$CONTAINER_PATH/$FILENAME" + + if [ $? -eq 0 ]; then + echo "File copied to Docker container $CONTAINER_NAME successfully." + rm "$(basename "$FILE_URL")" + if [ $? -eq 0 ]; then + echo "Local copy of the file deleted successfully." + else + echo "Failed to delete the local copy of the file." + fi + else + echo "Failed to copy the file to Docker container." + fi +else + echo "Failed to download the file." +fi \ No newline at end of file diff --git a/layer2/download_layer_2_config_bpp.sh b/layer2/download_layer_2_config_bpp.sh new file mode 100755 index 0000000..6853be5 --- /dev/null +++ b/layer2/download_layer_2_config_bpp.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +read -p "Enter the path from where to download the layer 2 configuration file:" FILE_URL + +CONTAINER_NAME="bap-network" +CONTAINER_ID=`docker ps -aqf "name=$CONTAINER_NAME"` +CONTAINER_PATH="/usr/src/app/schemas" +wget -O "$(basename "$FILE_URL")" "$FILE_URL" + +echo + +if [ $? -eq 0 ]; then + echo "File downloaded successfully." + FILENAME="$(basename "$FILE_URL")" + CONTAINER_NAME="bpp-network" + CONTAINER_ID=`docker ps -aqf "name=$CONTAINER_NAME"` + CONTAINER_PATH="/usr/src/app/schemas" + + docker cp "$FILENAME" "$CONTAINER_NAME":"$CONTAINER_PATH/$FILENAME" + if [ $? -eq 0 ]; then + echo "File copied to Docker container $CONTAINER_NAME successfully." + fi + + CONTAINER_NAME="bpp-client" + CONTAINER_ID=`docker ps -aqf "name=$CONTAINER_NAME"` + + docker cp "$FILENAME" "$CONTAINER_NAME":"$CONTAINER_PATH/$FILENAME" + + if [ $? -eq 0 ]; then + echo "File copied to Docker container $CONTAINER_NAME successfully." + rm "$(basename "$FILE_URL")" + if [ $? -eq 0 ]; then + echo "Local copy of the file deleted successfully." + else + echo "Failed to delete the local copy of the file." + fi + else + echo "Failed to copy the file to Docker container." + fi +else + echo "Failed to download the file." +fi \ No newline at end of file diff --git a/layer2/samples/dhp_0.7.3_1.1.0.yaml b/layer2/samples/dhp_0.7.3_1.1.0.yaml new file mode 100644 index 0000000..8ce8b4f --- /dev/null +++ b/layer2/samples/dhp_0.7.3_1.1.0.yaml @@ -0,0 +1,2164 @@ +openapi: 3.0.0 +info: + title: DHP Core API + description: DHP Core API specification. This is an adaptation of Beckn core version 1.1.0 + version: 0.7.3 +security: + - SubscriberAuth: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: BAP declares the customer's intent to buy/avail healthcare services/products. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + $ref: "#/components/schemas/Intent" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: BAP declares the customer's cart (or equivalent) created by selecting objects from the catalog + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: "#/components/schemas/Ack" + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: Fetch the latest order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /track: + post: + tags: + - Beckn Provider Platform (BPP) + description: Track an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - track + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + callback_url: + type: string + format: uri + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: Cancel an order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - cancel + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + cancellation_reason_id: + $ref: "#/components/schemas/Option/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /update: + post: + tags: + - Beckn Provider Platform (BPP) + description: Remove object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - update + required: + - action + message: + type: object + properties: + update_target: + description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' + type: string + order: + description: Updated order object + allOf: + - $ref: "#/components/schemas/Order" + required: + - update_target + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /rating: + post: + tags: + - Beckn Provider Platform (BPP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - rating + required: + - action + message: + type: object + properties: + ratings: + type: array + items: + $ref: "#/components/schemas/Rating" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /support: + post: + tags: + - Beckn Provider Platform (BPP) + description: Contact support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_search: + post: + tags: + - Beckn Application Platform (BAP) + - Beckn Gateway (BG) + description: BPP sends its catalog in response to a search request. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: "#/components/schemas/Catalog" + required: + - catalog + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_select: + post: + tags: + - Beckn Application Platform (BAP) + description: Send draft order object with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_init: + post: + tags: + - Beckn Application Platform (BAP) + description: Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_confirm: + post: + tags: + - Beckn Application Platform (BAP) + description: Send active order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_track: + post: + tags: + - Beckn Application Platform (BAP) + description: Send tracking details of an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_track + required: + - action + message: + type: object + properties: + tracking: + $ref: "#/components/schemas/Tracking" + required: + - tracking + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_cancel: + post: + tags: + - Beckn Application Platform (BAP) + description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_cancel + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_update: + post: + tags: + - Beckn Application Platform (BAP) + description: Returns updated service with updated runtime object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_update + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_status: + post: + tags: + - Beckn Application Platform (BAP) + description: Fetch the status of a Service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_status + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_rating: + post: + tags: + - Beckn Application Platform (BAP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_rating + required: + - action + message: + type: object + properties: + feedback_form: + description: A feedback form to allow the user to provide additional information on the rating provided + allOf: + - $ref: "#/components/schemas/XInput" + error: + $ref: "#/components/schemas/Error" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_support: + post: + tags: + - Beckn Application Platform (BAP) + description: Contact Support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" +components: + securitySchemes: + SubscriberAuth: + type: apiKey + in: header + name: Authorization + description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + schemas: + Ack: + description: "Describes the acknowledgement sent in response to an API call. If the implementation uses HTTP/S, then Ack must be returned in the same session. Every API call to a BPP must be responded to with an Ack whether the BPP intends to respond with a callback or not. This has one property called `status` that indicates the status of the Acknowledgement." + type: object + properties: + status: + type: string + description: "The status of the acknowledgement. If the request passes the validation criteria of the BPP, then this is set to ACK. If a BPP responds with status = `ACK` to a request, it is required to respond with a callback. If the request fails the validation criteria, then this is set to NACK. Additionally, if a BPP does not intend to respond with a callback even after the request meets the validation criteria, it should set this value to `NACK`." + enum: + - ACK + - NACK + tags: + description: A list of tags containing any additional information sent along with the Acknowledgement. + type: array + items: + $ref: "#/components/schemas/TagGroup" + AddOn: + description: Describes an additional item offered as a value-addition to a product or service. This does not exist independently in a catalog and is always associated with an item. + type: object + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + price: + $ref: "#/components/schemas/Price" + Address: + description: Describes a postal address. + type: string + Agent: + description: "Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor's name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride." + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + organization: + $ref: "#/components/schemas/Organization" + rating: + $ref: "#/components/schemas/Rating/properties/value" + Authorization: + description: "Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation." + type: object + properties: + type: + description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. + type: string + token: + description: "Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering." + type: string + valid_from: + description: Timestamp in RFC3339 format from which token is valid + type: string + format: date-time + valid_to: + description: Timestamp in RFC3339 format until which token is valid + type: string + format: date-time + status: + description: Status of the token + type: string + Billing: + description: "Describes the billing details of an entity.
This has properties like name,organization,address,email,phone,time,tax_number, created_at,updated_at" + type: object + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - $ref: "#/components/schemas/Organization" + address: + description: The address of the billable entity + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the billable entity resides. This is important for state-level tax calculation + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the billable entity resides. + allOf: + - $ref: "#/components/schemas/City" + email: + description: Email address where the bill is sent to + type: string + format: email + phone: + description: Phone number of the billable entity + type: string + time: + description: Details regarding the billing period + allOf: + - $ref: "#/components/schemas/Time" + tax_id: + description: ID of the billable entity as recognized by the taxation authority + type: string + Cancellation: + description: Describes a cancellation event + type: object + properties: + time: + description: Date-time when the order was cancelled by the buyer + type: string + format: date-time + cancelled_by: + type: string + enum: + - CONSUMER + - PROVIDER + reason: + description: The reason for cancellation + allOf: + - $ref: "#/components/schemas/Option" + additional_description: + description: Any additional information regarding the nature of cancellation + allOf: + - $ref: "#/components/schemas/Descriptor" + CancellationTerm: + description: Describes the cancellation terms of an item or an order. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean + cancel_by: + description: Information related to the time of cancellation. + allOf: + - $ref: "#/components/schemas/Time" + cancellation_fee: + $ref: "#/components/schemas/Fee" + xinput: + $ref: "#/components/schemas/XInput" + external_ref: + $ref: "#/components/schemas/MediaFile" + Catalog: + description: "Describes the products or services offered by a BPP. This is typically sent as the response to a search intent from a BAP. The payment terms, offers and terms of fulfillment supported by the BPP can also be included here. The BPP can show hierarchical nature of products/services in its catalog using the parent_category_id in categories. The BPP can also send a ttl (time to live) in the context which is the duration for which a BAP can cache the catalog and use the cached catalog.
This has properties like bbp/descriptor,bbp/categories,bbp/fulfillments,bbp/payments,bbp/offers,bbp/providers and exp
This is used in the following situations.
  • This is typically used in the discovery stage when the BPP sends the details of the products and services it offers as response to a search intent from the BAP.
" + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + type: array + items: + $ref: "#/components/schemas/Payment" + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + type: array + items: + $ref: "#/components/schemas/Offer" + providers: + type: array + items: + $ref: "#/components/schemas/Provider" + exp: + description: Timestamp after which catalog will expire + type: string + format: date-time + ttl: + description: Duration in seconds after which this catalog will expire + type: string + Category: + description: A label under which a collection of items can be grouped. + type: object + properties: + id: + description: ID of the category + type: string + parent_category_id: + $ref: "#/components/schemas/Category/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + time: + $ref: "#/components/schemas/Time" + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Circle: + description: Describes a circular region of a specified radius centered at a specified GPS coordinate. + type: object + properties: + gps: + $ref: "#/components/schemas/Gps" + radius: + $ref: "#/components/schemas/Scalar" + City: + description: Describes a city + type: object + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + Contact: + description: Describes the contact information of an entity + type: object + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + Context: + description: "Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer's location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform's ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver's endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions," + type: object + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - $ref: "#/components/schemas/Domain/properties/code" + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - $ref: "#/components/schemas/Location" + action: + description: The Beckn protocol method being called by the sender and executed at the receiver. + type: string + version: + type: string + description: Version of transaction protocol being used by the sender. + bap_id: + description: Subscriber ID of the BAP + allOf: + - description: "A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform." + type: string + bap_uri: + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + allOf: + - description: The callback URL of the Subscriber. This should necessarily contain the same domain name as set in `subscriber_id``. + type: string + format: uri + bpp_id: + description: Subscriber ID of the BPP + allOf: + - $ref: "#/components/schemas/Context/properties/bap_id/allOf/0" + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - $ref: "#/components/schemas/Context/properties/bap_uri/allOf/0" + transaction_id: + description: "This is a unique value which persists across all API calls from `search` through `confirm`. This is done to indicate an active user session across multiple requests. The BPPs can use this value to push personalized recommendations, and dynamic offerings related to an ongoing transaction despite being unaware of the user active on the BAP." + type: string + format: uuid + message_id: + description: "This is a unique value which persists during a request / callback cycle. Since beckn protocol APIs are asynchronous, BAPs need a common value to match an incoming callback from a BPP to an earlier call. This value can also be used to ignore duplicate messages coming from the BPP. It is recommended to generate a fresh message_id for every new interaction. When sending unsolicited callbacks, BPPs must generate a new message_id." + type: string + format: uuid + timestamp: + description: Time of request generation in RFC3339 format + type: string + format: date-time + key: + description: The encryption public key of the sender + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this message holds valid + type: string + Country: + description: Describes a country + type: object + properties: + name: + type: string + description: Name of the country + code: + type: string + description: Country code as per ISO 3166-1 and ISO 3166-2 format + Credential: + description: Describes a credential of an entity - Person or Organization + type: object + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + Customer: + description: Describes a customer buying/availing a product or a service + type: object + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + DecimalValue: + description: Describes a numerical value in decimal form + type: string + pattern: "[+-]?([0-9]*[.])?[0-9]+" + Descriptor: + description: Physical description of something. + type: object + properties: + name: + type: string + code: + type: string + short_desc: + type: string + long_desc: + type: string + additional_desc: + type: object + properties: + url: + type: string + content_type: + type: string + enum: + - text/plain + - text/html + - application/json + media: + type: array + items: + $ref: "#/components/schemas/MediaFile" + images: + type: array + items: + $ref: "#/components/schemas/Image" + Domain: + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + type: object + properties: + name: + description: Name of the domain + type: string + code: + description: "Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network." + additional_info: + description: A url that contains addtional information about that domain. + allOf: + - $ref: "#/components/schemas/MediaFile" + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + description: "Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback." + type: object + properties: + code: + type: string + description: 'Standard error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo"' + paths: + type: string + description: Path to json schema generating the error. Used only during json schema validation errors + message: + type: string + description: Human readable message describing the error. Used mainly for logging. Not recommended to be shown to the user. + Fee: + description: A fee applied on a particular entity + type: object + properties: + percentage: + description: Percentage of a value + allOf: + - $ref: "#/components/schemas/DecimalValue" + amount: + description: A fixed value + allOf: + - $ref: "#/components/schemas/Price" + Form: + description: Describes a form + type: object + properties: + url: + description: "The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form." + type: string + format: uri + data: + description: The form submission data + type: object + additionalProperties: + type: string + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + type: string + enum: + - text/html + - application/xml + submission_id: + type: string + format: uuid + Fulfillment: + description: Describes how a an order will be rendered/fulfilled to the end-customer + type: object + properties: + id: + description: Unique reference ID to the fulfillment of an order + type: string + type: + description: "A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment." + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + description: The rating value of the fulfullment service. + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + state: + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - $ref: "#/components/schemas/Customer" + agent: + description: The agent that is currently handling the fulfillment of the order + allOf: + - $ref: "#/components/schemas/Agent" + contact: + $ref: "#/components/schemas/Contact" + vehicle: + $ref: "#/components/schemas/Vehicle" + stops: + description: The list of logical stops encountered during the fulfillment of an order. + type: array + items: + $ref: "#/components/schemas/Stop" + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + FulfillmentState: + description: Describes the state of fulfillment + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + Gps: + description: Describes a GPS coordinate + type: string + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + Image: + description: Describes an image + type: object + properties: + url: + description: URL to the image. This can be a data url or an remote url + type: string + format: uri + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + type: string + enum: + - xs + - sm + - md + - lg + - xl + - custom + width: + description: Width of the image in pixels + type: string + height: + description: Height of the image in pixels + type: string + Intent: + description: "The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + type: object + properties: + descriptor: + description: "A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object." + allOf: + - $ref: "#/components/schemas/Descriptor" + provider: + description: The provider from which the customer wants to place to the order from + allOf: + - $ref: "#/components/schemas/Provider" + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - $ref: "#/components/schemas/Fulfillment" + payment: + description: Details on how the customer wants to pay for the order + allOf: + - $ref: "#/components/schemas/Payment" + category: + description: Details on the item category + allOf: + - $ref: "#/components/schemas/Category" + offer: + description: details on the offer the customer wants to avail + allOf: + - $ref: "#/components/schemas/Offer" + item: + description: Details of the item that the consumer wants to order + allOf: + - $ref: "#/components/schemas/Item" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + ItemQuantity: + description: Describes the count or amount of an item + type: object + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + maximum: + description: This represents the maximum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: + $ref: "#/components/schemas/Scalar" + minimum: + description: This represents the minimum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + selected: + description: This represents the quantity selected for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: "#/components/schemas/Scalar" + Item: + description: "Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item." + type: object + properties: + id: + description: ID of the item. + type: string + parent_item_id: + description: "ID of the item, this item is a variant of" + allOf: + - $ref: "#/components/schemas/Item/properties/id" + parent_item_quantity: + description: The number of units of the parent item this item is a multiple of + allOf: + - $ref: "#/components/schemas/ItemQuantity" + descriptor: + description: Physical description of the item + allOf: + - $ref: "#/components/schemas/Descriptor" + creator: + description: The creator of this item + allOf: + - $ref: "#/components/schemas/Organization" + price: + description: "The price of this item, if it has intrinsic value" + allOf: + - $ref: "#/components/schemas/Price" + quantity: + description: The selling quantity of the item + allOf: + - $ref: "#/components/schemas/ItemQuantity" + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - $ref: "#/components/schemas/Category/properties/id" + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - $ref: "#/components/schemas/Fulfillment/properties/id" + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - $ref: "#/components/schemas/Location/properties/id" + payment_ids: + description: Payment modalities through which this item can be ordered + type: array + items: + allOf: + - $ref: "#/components/schemas/Payment/properties/id" + add_ons: + type: array + items: + $ref: "#/components/schemas/AddOn" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + description: Time within which refund will be processed after successful cancellation. + allOf: + - $ref: "#/components/schemas/Time" + refund_amount: + $ref: "#/components/schemas/Price" + replacement_terms: + description: Terms that are applicable be met when this item is replaced + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + xinput: + description: Additional input required from the customer to purchase / avail this item + allOf: + - $ref: "#/components/schemas/XInput" + time: + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + allOf: + - $ref: "#/components/schemas/Time" + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + matched: + description: Whether this item is an exact match of the request + type: boolean + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + recommended: + description: Whether this item is a recommended item to a response + type: boolean + ttl: + description: Time to live in seconds for an instance of this schema + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Location: + description: The physical location of something + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + type: string + format: uri + gps: + description: The GPS co-ordinates of this location. + allOf: + - $ref: "#/components/schemas/Gps" + address: + description: The address of this location. + allOf: + - $ref: "#/components/schemas/Address" + city: + description: "The city this location is, or is located within" + allOf: + - $ref: "#/components/schemas/City" + district: + description: "The state this location is, or is located within" + type: string + state: + description: "The state this location is, or is located within" + allOf: + - $ref: "#/components/schemas/State" + country: + description: "The country this location is, or is located within" + allOf: + - $ref: "#/components/schemas/Country" + area_code: + type: string + circle: + $ref: "#/components/schemas/Circle" + polygon: + description: The boundary polygon of this location + type: string + 3dspace: + description: The three dimensional region describing this location + type: string + rating: + description: The rating of this location + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + MediaFile: + description: This object contains a url to a media file. + type: object + properties: + mimetype: + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + type: string + url: + description: The URL of the file + type: string + format: uri + signature: + description: The digital signature of the file signed by the sender + type: string + dsa: + description: The signing algorithm used by the sender + type: string + Offer: + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + location_ids: + type: array + items: + $ref: "#/components/schemas/Location/properties/id" + category_ids: + type: array + items: + $ref: "#/components/schemas/Category/properties/id" + item_ids: + type: array + items: + $ref: "#/components/schemas/Item/properties/id" + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Option: + description: Describes a selectable option + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + Order: + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + type: object + properties: + id: + type: string + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + type: array + items: + type: string + description: ID of a previous order + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: + description: "This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level." + type: string + default: DEFAULT + enum: + - DRAFT + - DEFAULT + provider: + description: Details of the provider whose catalog items have been selected. + allOf: + - $ref: "#/components/schemas/Provider" + items: + description: The items purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/Item" + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/AddOn" + offers: + description: The offers applied in this order + type: array + items: + $ref: "#/components/schemas/Offer" + billing: + description: The billing details of this order + allOf: + - $ref: "#/components/schemas/Billing" + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: + $ref: "#/components/schemas/Fulfillment" + cancellation: + description: The cancellation details of this order + allOf: + - $ref: "#/components/schemas/Cancellation" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + $ref: "#/components/schemas/Item/properties/refund_terms/items" + replacement_terms: + description: Replacement terms of this item + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Return terms of this item + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - $ref: "#/components/schemas/Quotation" + payments: + description: The terms of settlement for this order + type: array + items: + $ref: "#/components/schemas/Payment" + created_at: + description: The date-time of creation of this order + type: string + format: date-time + updated_at: + description: The date-time of updated of this order + type: string + format: date-time + xinput: + description: Additional input required from the customer to confirm this order + allOf: + - $ref: "#/components/schemas/XInput" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Organization: + description: An organization. Usually a recognized business entity. + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + address: + description: The postal address of the organization + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the organization's address is registered + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the the organization's address is registered + allOf: + - $ref: "#/components/schemas/City" + contact: + $ref: "#/components/schemas/Contact" + Payment: + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + type: object + properties: + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + collected_by: + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + url: + type: string + description: "A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory." + format: uri + params: + type: object + properties: + transaction_id: + type: string + description: The reference transaction ID associated with a payment activity + amount: + type: string + currency: + type: string + bank_code: + type: string + bank_account_number: + type: string + virtual_payment_address: + type: string + source_bank_code: + type: string + source_bank_account_number: + type: string + source_virtual_payment_address: + type: string + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Person: + description: Describes a person as any individual + type: object + properties: + id: + type: string + description: Describes the identity of the person + url: + description: Profile url of the person + type: string + format: uri + name: + description: the name of the person + type: string + image: + $ref: "#/components/schemas/Image" + age: + description: Age of the person + allOf: + - $ref: "#/components/schemas/Duration" + dob: + description: Date of birth of the person + type: string + format: date + gender: + type: string + description: "Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy" + creds: + type: array + items: + $ref: "#/components/schemas/Credential" + languages: + type: array + items: + description: Describes a language known to the person. + type: object + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + properties: + code: + type: string + name: + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Price: + description: Describes the price of a product or service + type: object + properties: + currency: + type: string + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + listed_value: + $ref: "#/components/schemas/DecimalValue" + offered_value: + $ref: "#/components/schemas/DecimalValue" + minimum_value: + $ref: "#/components/schemas/DecimalValue" + maximum_value: + $ref: "#/components/schemas/DecimalValue" + Provider: + description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: + $ref: "#/components/schemas/Descriptor" + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: + $ref: "#/components/schemas/Rating/properties/value" + time: + $ref: "#/components/schemas/Time" + categories: + type: array + items: + $ref: "#/components/schemas/Category" + fulfillments: + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + type: array + items: + $ref: "#/components/schemas/Payment" + locations: + type: array + items: + $ref: "#/components/schemas/Location" + offers: + type: array + items: + $ref: "#/components/schemas/Offer" + items: + type: array + items: + $ref: "#/components/schemas/Item" + exp: + type: string + description: Time after which catalog has to be refreshed + format: date-time + rateable: + description: Whether this provider can be rated or not + type: boolean + ttl: + description: "The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable." + type: integer + minimum: -1 + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Quotation: + description: "Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl" + type: object + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - $ref: "#/components/schemas/Price" + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: + $ref: "#/components/schemas/Item" + title: + type: string + price: + $ref: "#/components/schemas/Price" + ttl: + $ref: "#/components/schemas/Duration" + Rating: + description: Describes the rating of an entity + type: object + properties: + rating_category: + description: Category of the entity being rated + type: string + enum: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + id: + description: Id of the object being rated + type: string + value: + description: "Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||." + type: string + Region: + description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. + type: object + properties: + dimensions: + description: "The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services." + type: string + enum: + - "1" + - "2" + - "3" + type: + description: "The type of region. This is used to specify the granularity of the region represented by this object. Various examples of two-dimensional region types are city, country, state, district, and so on. The network policy should contain a list of all possible region types supported by the network." + type: string + name: + type: string + description: Name of the region as specified on the map where that region exists. + code: + type: string + description: A standard code representing the region. This should be interpreted in the same way by all network participants. + boundary: + type: string + description: "A string representing the boundary of the region. One-dimensional regions are represented by polylines. Two-dimensional regions are represented by polygons, and three-dimensional regions can represented by polyhedra." + map_url: + type: string + description: The url to the map of the region. This can be a globally recognized map or the one specified by the network policy. + ReplacementTerm: + description: The replacement policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + replace_within: + description: "Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement" + allOf: + - $ref: "#/components/schemas/Time" + external_ref: + $ref: "#/components/schemas/MediaFile" + ReturnTerm: + description: Describes the return policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term IETF''s applicable. + allOf: + - $ref: "#/components/schemas/State" + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_time: + description: "Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund." + allOf: + - $ref: "#/components/schemas/Time" + return_location: + description: The location where the item or order must / will be returned to + allOf: + - $ref: "#/components/schemas/Location" + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + Scalar: + description: Describes a scalar + type: object + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + range: + type: object + properties: + min: + $ref: "#/components/schemas/DecimalValue" + max: + $ref: "#/components/schemas/DecimalValue" + unit: + type: string + Schedule: + description: "Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times" + type: object + properties: + frequency: + $ref: "#/components/schemas/Duration" + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + State: + description: A bounded geopolitical region of governance inside a country. + type: object + properties: + name: + type: string + description: Name of the state + code: + type: string + description: State code as per country or international standards + Stop: + description: A logical point in space and time during the fulfillment of an order. + type: object + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - $ref: "#/components/schemas/Location" + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + type: string + time: + description: Timings applicable at the stop. + allOf: + - $ref: "#/components/schemas/Time" + instructions: + description: Instructions that need to be followed at the stop + allOf: + - $ref: "#/components/schemas/Descriptor" + contact: + description: Contact details of the stop + allOf: + - $ref: "#/components/schemas/Contact" + person: + description: The details of the person present at the stop + allOf: + - $ref: "#/components/schemas/Person" + authorization: + $ref: "#/components/schemas/Authorization" + Support: + description: Details of customer support + type: object + properties: + ref_id: + type: string + callback_phone: + type: string + format: phone + phone: + type: string + format: phone + email: + type: string + format: email + url: + type: string + format: uri + Tag: + description: "Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service." + type: object + properties: + descriptor: + description: "Description of the Tag, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + display: + description: "This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value." + type: boolean + TagGroup: + description: "A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316" + type: object + properties: + display: + description: "Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search." + type: boolean + default: true + descriptor: + description: "Description of the TagGroup, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + list: + description: "An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema." + type: array + items: + $ref: "#/components/schemas/Tag" + Time: + description: "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations
This has properties like label, time stamp,duration,range, days, schedule" + type: object + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: + $ref: "#/components/schemas/Duration" + range: + type: object + properties: + start: + type: string + format: date-time + end: + type: string + format: date-time + days: + type: string + description: comma separated values representing days of the week + schedule: + $ref: "#/components/schemas/Schedule" + Tracking: + description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. + type: object + properties: + id: + description: A unique tracking reference number + type: string + url: + description: "A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data." + type: string + format: uri + location: + description: "In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API." + allOf: + - $ref: "#/components/schemas/Location" + status: + description: "This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order." + type: string + enum: + - active + - inactive + Vehicle: + description: "Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration" + type: object + properties: + category: + type: string + capacity: + type: integer + make: + type: string + model: + type: string + size: + type: string + variant: + type: string + color: + type: string + energy_type: + type: string + registration: + type: string + wheels_count: + type: string + cargo_volumne: + type: string + wheelchair_access: + type: string + code: + type: string + emission_standard: + type: string + XInput: + description: "Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation." + type: object + properties: + form: + $ref: "#/components/schemas/Form" + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean diff --git a/layer2/samples/dhp_1.1.0.yaml b/layer2/samples/dhp_1.1.0.yaml new file mode 100644 index 0000000..8ce8b4f --- /dev/null +++ b/layer2/samples/dhp_1.1.0.yaml @@ -0,0 +1,2164 @@ +openapi: 3.0.0 +info: + title: DHP Core API + description: DHP Core API specification. This is an adaptation of Beckn core version 1.1.0 + version: 0.7.3 +security: + - SubscriberAuth: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: BAP declares the customer's intent to buy/avail healthcare services/products. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + $ref: "#/components/schemas/Intent" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: BAP declares the customer's cart (or equivalent) created by selecting objects from the catalog + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: "#/components/schemas/Ack" + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: Fetch the latest order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /track: + post: + tags: + - Beckn Provider Platform (BPP) + description: Track an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - track + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + callback_url: + type: string + format: uri + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: Cancel an order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - cancel + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + cancellation_reason_id: + $ref: "#/components/schemas/Option/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /update: + post: + tags: + - Beckn Provider Platform (BPP) + description: Remove object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - update + required: + - action + message: + type: object + properties: + update_target: + description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' + type: string + order: + description: Updated order object + allOf: + - $ref: "#/components/schemas/Order" + required: + - update_target + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /rating: + post: + tags: + - Beckn Provider Platform (BPP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - rating + required: + - action + message: + type: object + properties: + ratings: + type: array + items: + $ref: "#/components/schemas/Rating" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /support: + post: + tags: + - Beckn Provider Platform (BPP) + description: Contact support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_search: + post: + tags: + - Beckn Application Platform (BAP) + - Beckn Gateway (BG) + description: BPP sends its catalog in response to a search request. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: "#/components/schemas/Catalog" + required: + - catalog + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_select: + post: + tags: + - Beckn Application Platform (BAP) + description: Send draft order object with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_init: + post: + tags: + - Beckn Application Platform (BAP) + description: Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_confirm: + post: + tags: + - Beckn Application Platform (BAP) + description: Send active order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_track: + post: + tags: + - Beckn Application Platform (BAP) + description: Send tracking details of an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_track + required: + - action + message: + type: object + properties: + tracking: + $ref: "#/components/schemas/Tracking" + required: + - tracking + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_cancel: + post: + tags: + - Beckn Application Platform (BAP) + description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_cancel + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_update: + post: + tags: + - Beckn Application Platform (BAP) + description: Returns updated service with updated runtime object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_update + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_status: + post: + tags: + - Beckn Application Platform (BAP) + description: Fetch the status of a Service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_status + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_rating: + post: + tags: + - Beckn Application Platform (BAP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_rating + required: + - action + message: + type: object + properties: + feedback_form: + description: A feedback form to allow the user to provide additional information on the rating provided + allOf: + - $ref: "#/components/schemas/XInput" + error: + $ref: "#/components/schemas/Error" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_support: + post: + tags: + - Beckn Application Platform (BAP) + description: Contact Support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" +components: + securitySchemes: + SubscriberAuth: + type: apiKey + in: header + name: Authorization + description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + schemas: + Ack: + description: "Describes the acknowledgement sent in response to an API call. If the implementation uses HTTP/S, then Ack must be returned in the same session. Every API call to a BPP must be responded to with an Ack whether the BPP intends to respond with a callback or not. This has one property called `status` that indicates the status of the Acknowledgement." + type: object + properties: + status: + type: string + description: "The status of the acknowledgement. If the request passes the validation criteria of the BPP, then this is set to ACK. If a BPP responds with status = `ACK` to a request, it is required to respond with a callback. If the request fails the validation criteria, then this is set to NACK. Additionally, if a BPP does not intend to respond with a callback even after the request meets the validation criteria, it should set this value to `NACK`." + enum: + - ACK + - NACK + tags: + description: A list of tags containing any additional information sent along with the Acknowledgement. + type: array + items: + $ref: "#/components/schemas/TagGroup" + AddOn: + description: Describes an additional item offered as a value-addition to a product or service. This does not exist independently in a catalog and is always associated with an item. + type: object + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + price: + $ref: "#/components/schemas/Price" + Address: + description: Describes a postal address. + type: string + Agent: + description: "Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor's name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride." + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + organization: + $ref: "#/components/schemas/Organization" + rating: + $ref: "#/components/schemas/Rating/properties/value" + Authorization: + description: "Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation." + type: object + properties: + type: + description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. + type: string + token: + description: "Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering." + type: string + valid_from: + description: Timestamp in RFC3339 format from which token is valid + type: string + format: date-time + valid_to: + description: Timestamp in RFC3339 format until which token is valid + type: string + format: date-time + status: + description: Status of the token + type: string + Billing: + description: "Describes the billing details of an entity.
This has properties like name,organization,address,email,phone,time,tax_number, created_at,updated_at" + type: object + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - $ref: "#/components/schemas/Organization" + address: + description: The address of the billable entity + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the billable entity resides. This is important for state-level tax calculation + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the billable entity resides. + allOf: + - $ref: "#/components/schemas/City" + email: + description: Email address where the bill is sent to + type: string + format: email + phone: + description: Phone number of the billable entity + type: string + time: + description: Details regarding the billing period + allOf: + - $ref: "#/components/schemas/Time" + tax_id: + description: ID of the billable entity as recognized by the taxation authority + type: string + Cancellation: + description: Describes a cancellation event + type: object + properties: + time: + description: Date-time when the order was cancelled by the buyer + type: string + format: date-time + cancelled_by: + type: string + enum: + - CONSUMER + - PROVIDER + reason: + description: The reason for cancellation + allOf: + - $ref: "#/components/schemas/Option" + additional_description: + description: Any additional information regarding the nature of cancellation + allOf: + - $ref: "#/components/schemas/Descriptor" + CancellationTerm: + description: Describes the cancellation terms of an item or an order. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean + cancel_by: + description: Information related to the time of cancellation. + allOf: + - $ref: "#/components/schemas/Time" + cancellation_fee: + $ref: "#/components/schemas/Fee" + xinput: + $ref: "#/components/schemas/XInput" + external_ref: + $ref: "#/components/schemas/MediaFile" + Catalog: + description: "Describes the products or services offered by a BPP. This is typically sent as the response to a search intent from a BAP. The payment terms, offers and terms of fulfillment supported by the BPP can also be included here. The BPP can show hierarchical nature of products/services in its catalog using the parent_category_id in categories. The BPP can also send a ttl (time to live) in the context which is the duration for which a BAP can cache the catalog and use the cached catalog.
This has properties like bbp/descriptor,bbp/categories,bbp/fulfillments,bbp/payments,bbp/offers,bbp/providers and exp
This is used in the following situations.
  • This is typically used in the discovery stage when the BPP sends the details of the products and services it offers as response to a search intent from the BAP.
" + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + type: array + items: + $ref: "#/components/schemas/Payment" + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + type: array + items: + $ref: "#/components/schemas/Offer" + providers: + type: array + items: + $ref: "#/components/schemas/Provider" + exp: + description: Timestamp after which catalog will expire + type: string + format: date-time + ttl: + description: Duration in seconds after which this catalog will expire + type: string + Category: + description: A label under which a collection of items can be grouped. + type: object + properties: + id: + description: ID of the category + type: string + parent_category_id: + $ref: "#/components/schemas/Category/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + time: + $ref: "#/components/schemas/Time" + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Circle: + description: Describes a circular region of a specified radius centered at a specified GPS coordinate. + type: object + properties: + gps: + $ref: "#/components/schemas/Gps" + radius: + $ref: "#/components/schemas/Scalar" + City: + description: Describes a city + type: object + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + Contact: + description: Describes the contact information of an entity + type: object + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + Context: + description: "Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer's location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform's ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver's endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions," + type: object + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - $ref: "#/components/schemas/Domain/properties/code" + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - $ref: "#/components/schemas/Location" + action: + description: The Beckn protocol method being called by the sender and executed at the receiver. + type: string + version: + type: string + description: Version of transaction protocol being used by the sender. + bap_id: + description: Subscriber ID of the BAP + allOf: + - description: "A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform." + type: string + bap_uri: + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + allOf: + - description: The callback URL of the Subscriber. This should necessarily contain the same domain name as set in `subscriber_id``. + type: string + format: uri + bpp_id: + description: Subscriber ID of the BPP + allOf: + - $ref: "#/components/schemas/Context/properties/bap_id/allOf/0" + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - $ref: "#/components/schemas/Context/properties/bap_uri/allOf/0" + transaction_id: + description: "This is a unique value which persists across all API calls from `search` through `confirm`. This is done to indicate an active user session across multiple requests. The BPPs can use this value to push personalized recommendations, and dynamic offerings related to an ongoing transaction despite being unaware of the user active on the BAP." + type: string + format: uuid + message_id: + description: "This is a unique value which persists during a request / callback cycle. Since beckn protocol APIs are asynchronous, BAPs need a common value to match an incoming callback from a BPP to an earlier call. This value can also be used to ignore duplicate messages coming from the BPP. It is recommended to generate a fresh message_id for every new interaction. When sending unsolicited callbacks, BPPs must generate a new message_id." + type: string + format: uuid + timestamp: + description: Time of request generation in RFC3339 format + type: string + format: date-time + key: + description: The encryption public key of the sender + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this message holds valid + type: string + Country: + description: Describes a country + type: object + properties: + name: + type: string + description: Name of the country + code: + type: string + description: Country code as per ISO 3166-1 and ISO 3166-2 format + Credential: + description: Describes a credential of an entity - Person or Organization + type: object + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + Customer: + description: Describes a customer buying/availing a product or a service + type: object + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + DecimalValue: + description: Describes a numerical value in decimal form + type: string + pattern: "[+-]?([0-9]*[.])?[0-9]+" + Descriptor: + description: Physical description of something. + type: object + properties: + name: + type: string + code: + type: string + short_desc: + type: string + long_desc: + type: string + additional_desc: + type: object + properties: + url: + type: string + content_type: + type: string + enum: + - text/plain + - text/html + - application/json + media: + type: array + items: + $ref: "#/components/schemas/MediaFile" + images: + type: array + items: + $ref: "#/components/schemas/Image" + Domain: + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + type: object + properties: + name: + description: Name of the domain + type: string + code: + description: "Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network." + additional_info: + description: A url that contains addtional information about that domain. + allOf: + - $ref: "#/components/schemas/MediaFile" + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + description: "Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback." + type: object + properties: + code: + type: string + description: 'Standard error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo"' + paths: + type: string + description: Path to json schema generating the error. Used only during json schema validation errors + message: + type: string + description: Human readable message describing the error. Used mainly for logging. Not recommended to be shown to the user. + Fee: + description: A fee applied on a particular entity + type: object + properties: + percentage: + description: Percentage of a value + allOf: + - $ref: "#/components/schemas/DecimalValue" + amount: + description: A fixed value + allOf: + - $ref: "#/components/schemas/Price" + Form: + description: Describes a form + type: object + properties: + url: + description: "The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form." + type: string + format: uri + data: + description: The form submission data + type: object + additionalProperties: + type: string + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + type: string + enum: + - text/html + - application/xml + submission_id: + type: string + format: uuid + Fulfillment: + description: Describes how a an order will be rendered/fulfilled to the end-customer + type: object + properties: + id: + description: Unique reference ID to the fulfillment of an order + type: string + type: + description: "A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment." + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + description: The rating value of the fulfullment service. + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + state: + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - $ref: "#/components/schemas/Customer" + agent: + description: The agent that is currently handling the fulfillment of the order + allOf: + - $ref: "#/components/schemas/Agent" + contact: + $ref: "#/components/schemas/Contact" + vehicle: + $ref: "#/components/schemas/Vehicle" + stops: + description: The list of logical stops encountered during the fulfillment of an order. + type: array + items: + $ref: "#/components/schemas/Stop" + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + FulfillmentState: + description: Describes the state of fulfillment + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + Gps: + description: Describes a GPS coordinate + type: string + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + Image: + description: Describes an image + type: object + properties: + url: + description: URL to the image. This can be a data url or an remote url + type: string + format: uri + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + type: string + enum: + - xs + - sm + - md + - lg + - xl + - custom + width: + description: Width of the image in pixels + type: string + height: + description: Height of the image in pixels + type: string + Intent: + description: "The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + type: object + properties: + descriptor: + description: "A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object." + allOf: + - $ref: "#/components/schemas/Descriptor" + provider: + description: The provider from which the customer wants to place to the order from + allOf: + - $ref: "#/components/schemas/Provider" + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - $ref: "#/components/schemas/Fulfillment" + payment: + description: Details on how the customer wants to pay for the order + allOf: + - $ref: "#/components/schemas/Payment" + category: + description: Details on the item category + allOf: + - $ref: "#/components/schemas/Category" + offer: + description: details on the offer the customer wants to avail + allOf: + - $ref: "#/components/schemas/Offer" + item: + description: Details of the item that the consumer wants to order + allOf: + - $ref: "#/components/schemas/Item" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + ItemQuantity: + description: Describes the count or amount of an item + type: object + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + maximum: + description: This represents the maximum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: + $ref: "#/components/schemas/Scalar" + minimum: + description: This represents the minimum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + selected: + description: This represents the quantity selected for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: "#/components/schemas/Scalar" + Item: + description: "Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item." + type: object + properties: + id: + description: ID of the item. + type: string + parent_item_id: + description: "ID of the item, this item is a variant of" + allOf: + - $ref: "#/components/schemas/Item/properties/id" + parent_item_quantity: + description: The number of units of the parent item this item is a multiple of + allOf: + - $ref: "#/components/schemas/ItemQuantity" + descriptor: + description: Physical description of the item + allOf: + - $ref: "#/components/schemas/Descriptor" + creator: + description: The creator of this item + allOf: + - $ref: "#/components/schemas/Organization" + price: + description: "The price of this item, if it has intrinsic value" + allOf: + - $ref: "#/components/schemas/Price" + quantity: + description: The selling quantity of the item + allOf: + - $ref: "#/components/schemas/ItemQuantity" + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - $ref: "#/components/schemas/Category/properties/id" + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - $ref: "#/components/schemas/Fulfillment/properties/id" + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - $ref: "#/components/schemas/Location/properties/id" + payment_ids: + description: Payment modalities through which this item can be ordered + type: array + items: + allOf: + - $ref: "#/components/schemas/Payment/properties/id" + add_ons: + type: array + items: + $ref: "#/components/schemas/AddOn" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + description: Time within which refund will be processed after successful cancellation. + allOf: + - $ref: "#/components/schemas/Time" + refund_amount: + $ref: "#/components/schemas/Price" + replacement_terms: + description: Terms that are applicable be met when this item is replaced + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + xinput: + description: Additional input required from the customer to purchase / avail this item + allOf: + - $ref: "#/components/schemas/XInput" + time: + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + allOf: + - $ref: "#/components/schemas/Time" + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + matched: + description: Whether this item is an exact match of the request + type: boolean + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + recommended: + description: Whether this item is a recommended item to a response + type: boolean + ttl: + description: Time to live in seconds for an instance of this schema + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Location: + description: The physical location of something + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + type: string + format: uri + gps: + description: The GPS co-ordinates of this location. + allOf: + - $ref: "#/components/schemas/Gps" + address: + description: The address of this location. + allOf: + - $ref: "#/components/schemas/Address" + city: + description: "The city this location is, or is located within" + allOf: + - $ref: "#/components/schemas/City" + district: + description: "The state this location is, or is located within" + type: string + state: + description: "The state this location is, or is located within" + allOf: + - $ref: "#/components/schemas/State" + country: + description: "The country this location is, or is located within" + allOf: + - $ref: "#/components/schemas/Country" + area_code: + type: string + circle: + $ref: "#/components/schemas/Circle" + polygon: + description: The boundary polygon of this location + type: string + 3dspace: + description: The three dimensional region describing this location + type: string + rating: + description: The rating of this location + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + MediaFile: + description: This object contains a url to a media file. + type: object + properties: + mimetype: + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + type: string + url: + description: The URL of the file + type: string + format: uri + signature: + description: The digital signature of the file signed by the sender + type: string + dsa: + description: The signing algorithm used by the sender + type: string + Offer: + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + location_ids: + type: array + items: + $ref: "#/components/schemas/Location/properties/id" + category_ids: + type: array + items: + $ref: "#/components/schemas/Category/properties/id" + item_ids: + type: array + items: + $ref: "#/components/schemas/Item/properties/id" + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Option: + description: Describes a selectable option + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + Order: + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + type: object + properties: + id: + type: string + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + type: array + items: + type: string + description: ID of a previous order + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: + description: "This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level." + type: string + default: DEFAULT + enum: + - DRAFT + - DEFAULT + provider: + description: Details of the provider whose catalog items have been selected. + allOf: + - $ref: "#/components/schemas/Provider" + items: + description: The items purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/Item" + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/AddOn" + offers: + description: The offers applied in this order + type: array + items: + $ref: "#/components/schemas/Offer" + billing: + description: The billing details of this order + allOf: + - $ref: "#/components/schemas/Billing" + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: + $ref: "#/components/schemas/Fulfillment" + cancellation: + description: The cancellation details of this order + allOf: + - $ref: "#/components/schemas/Cancellation" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + $ref: "#/components/schemas/Item/properties/refund_terms/items" + replacement_terms: + description: Replacement terms of this item + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Return terms of this item + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - $ref: "#/components/schemas/Quotation" + payments: + description: The terms of settlement for this order + type: array + items: + $ref: "#/components/schemas/Payment" + created_at: + description: The date-time of creation of this order + type: string + format: date-time + updated_at: + description: The date-time of updated of this order + type: string + format: date-time + xinput: + description: Additional input required from the customer to confirm this order + allOf: + - $ref: "#/components/schemas/XInput" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Organization: + description: An organization. Usually a recognized business entity. + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + address: + description: The postal address of the organization + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the organization's address is registered + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the the organization's address is registered + allOf: + - $ref: "#/components/schemas/City" + contact: + $ref: "#/components/schemas/Contact" + Payment: + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + type: object + properties: + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + collected_by: + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + url: + type: string + description: "A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory." + format: uri + params: + type: object + properties: + transaction_id: + type: string + description: The reference transaction ID associated with a payment activity + amount: + type: string + currency: + type: string + bank_code: + type: string + bank_account_number: + type: string + virtual_payment_address: + type: string + source_bank_code: + type: string + source_bank_account_number: + type: string + source_virtual_payment_address: + type: string + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Person: + description: Describes a person as any individual + type: object + properties: + id: + type: string + description: Describes the identity of the person + url: + description: Profile url of the person + type: string + format: uri + name: + description: the name of the person + type: string + image: + $ref: "#/components/schemas/Image" + age: + description: Age of the person + allOf: + - $ref: "#/components/schemas/Duration" + dob: + description: Date of birth of the person + type: string + format: date + gender: + type: string + description: "Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy" + creds: + type: array + items: + $ref: "#/components/schemas/Credential" + languages: + type: array + items: + description: Describes a language known to the person. + type: object + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + properties: + code: + type: string + name: + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Price: + description: Describes the price of a product or service + type: object + properties: + currency: + type: string + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + listed_value: + $ref: "#/components/schemas/DecimalValue" + offered_value: + $ref: "#/components/schemas/DecimalValue" + minimum_value: + $ref: "#/components/schemas/DecimalValue" + maximum_value: + $ref: "#/components/schemas/DecimalValue" + Provider: + description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: + $ref: "#/components/schemas/Descriptor" + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: + $ref: "#/components/schemas/Rating/properties/value" + time: + $ref: "#/components/schemas/Time" + categories: + type: array + items: + $ref: "#/components/schemas/Category" + fulfillments: + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + type: array + items: + $ref: "#/components/schemas/Payment" + locations: + type: array + items: + $ref: "#/components/schemas/Location" + offers: + type: array + items: + $ref: "#/components/schemas/Offer" + items: + type: array + items: + $ref: "#/components/schemas/Item" + exp: + type: string + description: Time after which catalog has to be refreshed + format: date-time + rateable: + description: Whether this provider can be rated or not + type: boolean + ttl: + description: "The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable." + type: integer + minimum: -1 + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Quotation: + description: "Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl" + type: object + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - $ref: "#/components/schemas/Price" + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: + $ref: "#/components/schemas/Item" + title: + type: string + price: + $ref: "#/components/schemas/Price" + ttl: + $ref: "#/components/schemas/Duration" + Rating: + description: Describes the rating of an entity + type: object + properties: + rating_category: + description: Category of the entity being rated + type: string + enum: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + id: + description: Id of the object being rated + type: string + value: + description: "Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||." + type: string + Region: + description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. + type: object + properties: + dimensions: + description: "The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services." + type: string + enum: + - "1" + - "2" + - "3" + type: + description: "The type of region. This is used to specify the granularity of the region represented by this object. Various examples of two-dimensional region types are city, country, state, district, and so on. The network policy should contain a list of all possible region types supported by the network." + type: string + name: + type: string + description: Name of the region as specified on the map where that region exists. + code: + type: string + description: A standard code representing the region. This should be interpreted in the same way by all network participants. + boundary: + type: string + description: "A string representing the boundary of the region. One-dimensional regions are represented by polylines. Two-dimensional regions are represented by polygons, and three-dimensional regions can represented by polyhedra." + map_url: + type: string + description: The url to the map of the region. This can be a globally recognized map or the one specified by the network policy. + ReplacementTerm: + description: The replacement policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + replace_within: + description: "Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement" + allOf: + - $ref: "#/components/schemas/Time" + external_ref: + $ref: "#/components/schemas/MediaFile" + ReturnTerm: + description: Describes the return policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term IETF''s applicable. + allOf: + - $ref: "#/components/schemas/State" + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_time: + description: "Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund." + allOf: + - $ref: "#/components/schemas/Time" + return_location: + description: The location where the item or order must / will be returned to + allOf: + - $ref: "#/components/schemas/Location" + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + Scalar: + description: Describes a scalar + type: object + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + range: + type: object + properties: + min: + $ref: "#/components/schemas/DecimalValue" + max: + $ref: "#/components/schemas/DecimalValue" + unit: + type: string + Schedule: + description: "Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times" + type: object + properties: + frequency: + $ref: "#/components/schemas/Duration" + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + State: + description: A bounded geopolitical region of governance inside a country. + type: object + properties: + name: + type: string + description: Name of the state + code: + type: string + description: State code as per country or international standards + Stop: + description: A logical point in space and time during the fulfillment of an order. + type: object + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - $ref: "#/components/schemas/Location" + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + type: string + time: + description: Timings applicable at the stop. + allOf: + - $ref: "#/components/schemas/Time" + instructions: + description: Instructions that need to be followed at the stop + allOf: + - $ref: "#/components/schemas/Descriptor" + contact: + description: Contact details of the stop + allOf: + - $ref: "#/components/schemas/Contact" + person: + description: The details of the person present at the stop + allOf: + - $ref: "#/components/schemas/Person" + authorization: + $ref: "#/components/schemas/Authorization" + Support: + description: Details of customer support + type: object + properties: + ref_id: + type: string + callback_phone: + type: string + format: phone + phone: + type: string + format: phone + email: + type: string + format: email + url: + type: string + format: uri + Tag: + description: "Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service." + type: object + properties: + descriptor: + description: "Description of the Tag, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + display: + description: "This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value." + type: boolean + TagGroup: + description: "A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316" + type: object + properties: + display: + description: "Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search." + type: boolean + default: true + descriptor: + description: "Description of the TagGroup, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + list: + description: "An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema." + type: array + items: + $ref: "#/components/schemas/Tag" + Time: + description: "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations
This has properties like label, time stamp,duration,range, days, schedule" + type: object + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: + $ref: "#/components/schemas/Duration" + range: + type: object + properties: + start: + type: string + format: date-time + end: + type: string + format: date-time + days: + type: string + description: comma separated values representing days of the week + schedule: + $ref: "#/components/schemas/Schedule" + Tracking: + description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. + type: object + properties: + id: + description: A unique tracking reference number + type: string + url: + description: "A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data." + type: string + format: uri + location: + description: "In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API." + allOf: + - $ref: "#/components/schemas/Location" + status: + description: "This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order." + type: string + enum: + - active + - inactive + Vehicle: + description: "Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration" + type: object + properties: + category: + type: string + capacity: + type: integer + make: + type: string + model: + type: string + size: + type: string + variant: + type: string + color: + type: string + energy_type: + type: string + registration: + type: string + wheels_count: + type: string + cargo_volumne: + type: string + wheelchair_access: + type: string + code: + type: string + emission_standard: + type: string + XInput: + description: "Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation." + type: object + properties: + form: + $ref: "#/components/schemas/Form" + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean diff --git a/layer2/samples/dsep_1.1.0.yaml b/layer2/samples/dsep_1.1.0.yaml new file mode 100644 index 0000000..bfac183 --- /dev/null +++ b/layer2/samples/dsep_1.1.0.yaml @@ -0,0 +1,3063 @@ +openapi: 3.0.0 +info: + title: Decentralized Skilling and Education Protocol Specification + description: Adaptation of beckn protocol for the domain of skilling and education + version: 0.7.0 + +security: + - SubscriberAuth: [] + - GatewaySubscriberAuthNew: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: This allows a BAP to discover for catalogs offering
a) Jobs and Internships
b) Trainings and Courses
c) Mentors and Coaches and,
d) Scholarships and Grants + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + $ref: "#/components/schemas/Intent" + required: + - context + - message + examples: + Search for 'web design' jobs by category code in the region of Delhi: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + category: + descriptor: + name: Web design jobs + code: nic2008:62012 + Search for jobs by skills like carpentry and painting: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + fulfillment: + customer: + person: + skills: + - name: Painting + - name: Carpentry + tags: + - descriptor: + name: Competence + list: + - descriptor: + name: Experience + value: 12Y + + Search for jobs along with expected salary: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + fulfillment: + customer: + person: + skills: + - name: Java Programming + tags: + - descriptor: + name: Competence + list: + - descriptor: + name: Experience + value: 12Y + tags: + - descriptor: + name: Expectations + list: + - descriptor: + name: expected_payment + value: 250000INR/Month + + Search for jobs offered by a specific provider: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + provider: + descriptor: + name: Infosys + Search for online courses matching a specific topic: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + item: + descriptor: + name: AI basics + tags: + - descriptor: + name: course_labels + list: + - descriptor: + name: label_1 + value: AI + - descriptor: + name: label_2 + value: ML + - descriptor: + name: label_3 + value: beginners + - descriptor: + name: label_4 + value: Artifical Intelligence + - descriptor: + name: label_5 + value: machine learning + - descriptor: + name: label_6 + value: neural networks + fulfillment: + type: FULL-TIME + Search for BTech courses offered by an engineering instituition like IIT Delhi: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + provider: + descriptor: + name: IIT Delhi + tags: + - descriptor: + name: course_labels + list: + - descriptor: + name: label_1 + value: AI + - descriptor: + name: label_2 + value: ML + - descriptor: + name: label_3 + value: beginners + - descriptor: + name: label_4 + value: Artifical Intelligence + - descriptor: + name: label_5 + value: machine learning + - descriptor: + name: label_6 + value: neural networks + category: + descriptor: + name: B.Tech + code: BTECH + fulfillment: + type: FULL-TIME + Searching for a mentor by name: + value: + context: + domain: mentorship-and-coaching + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + fulfillment: + agent: + name: Dr Rajiv Manocha + Search for scholarships: + value: + context: + domain: mentorship + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + category: + id: "4" + descriptor: + name: Engineering and Technology + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: API for Selecting items from the catalog. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: Fetch the latest order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /track: + post: + tags: + - Beckn Provider Platform (BPP) + description: Track an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - track + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + callback_url: + type: string + format: uri + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: Cancel an order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - cancel + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + cancellation_reason_id: + $ref: "#/components/schemas/Option/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /update: + post: + tags: + - Beckn Provider Platform (BPP) + description: Remove object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - update + required: + - action + message: + type: object + properties: + update_target: + description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' + type: string + order: + $ref: "#/components/schemas/Order" + required: + - update_target + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /rating: + post: + tags: + - Beckn Provider Platform (BPP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - rating + required: + - action + message: + type: object + properties: + ratings: + type: array + items: + $ref: "#/components/schemas/Rating" + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /support: + post: + tags: + - Beckn Provider Platform (BPP) + description: Contact support + requestBody: + description: Contact support + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /on_search: + post: + tags: + - Beckn App Platform (BAP) + - Beckn Gateway (BG) + description: Send catalog + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: "#/components/schemas/Catalog" + required: + - catalog + error: + $ref: "#/components/schemas/Error" + required: + - context + examples: + Publish a catalog of software jobs by a software agency: + value: + context: + domain: jobs:nic2008:62XXX + location: + city: + code: "*" + country: + code: IND + action: on_search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + bpp_id: https://naukri.com/ + bpp_uri: https://api.naukri.com/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + catalog: + descriptor: + name: Naukri Recruitment Platform + providers: + - descriptor: + name: Infosys + categories: + - id: "1" + name: Frontend Jobs + - id: "2" + name: Backend Jobs + items: + - descriptor: + name: Senior Software Developer + code: SSFD + fulfillment_ids: + - "1" + category_ids: + - "1" + matched: true + - descriptor: + name: Software Consultant - On site + code: SWCO + fulfillment_ids: + - "1" + category_ids: + - "1" + matched: "false" + - descriptor: + name: Software Consultant - Remote + code: SWCR + fulfillment_ids: + - "2" + category_ids: + - "2" + matched: "false" + fulfillments: + - id: "1" + descriptor: + name: Full-time + stops: + - location: + city: + code: BLR + - id: "2" + descriptor: + name: On-site + stops: + - location: + city: + code: BLR + type: start + time: + timestamp: "2022-08-10" + - location: + city: BLR + type: end + time: + timestamp: "2022-08-10" + - id: "3" + descriptor: + name: Remote + stops: + - time: + timestamp: "2022-08-10" + type: start + - time: + timestamp: "2022-08-10" + type: end + Publish a catalog of online courses: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: on_search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + catalog: + descriptor: + name: XAcademy + providers: + - descriptor: + name: XAcademy + categories: + - id: "1" + name: Software + - id: "2" + name: Management + items: + - id: "1" + descriptor: + name: Basics of AI + price: + value: "6000" + fulfillment_ids: + - "1" + category_ids: + - "1" + - id: "2" + descriptor: + name: AI for Data Analysis + price: + value: "7000" + fulfillment_ids: + - "1" + category_ids: + - "1" + fulfillments: + - id: "1" + type: ONLINE + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - context + /on_select: + post: + tags: + - Beckn App Platform (BAP) + description: Send draft order object with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_init: + post: + tags: + - Beckn App Platform (BAP) + description: Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_confirm: + post: + tags: + - Beckn App Platform (BAP) + description: Send active order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_track: + post: + tags: + - Beckn App Platform (BAP) + description: Send tracking details of an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_track + required: + - action + message: + type: object + properties: + tracking: + $ref: "#/components/schemas/Tracking" + required: + - tracking + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_cancel: + post: + tags: + - Beckn App Platform (BAP) + description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_cancel + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_update: + post: + tags: + - Beckn App Platform (BAP) + description: Returns updated service with updated runtime object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_update + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_status: + post: + tags: + - Beckn App Platform (BAP) + description: Fetch the status of a Service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_status + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_rating: + post: + tags: + - Beckn App Platform (BAP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_rating + required: + - action + message: + type: object + properties: + feedback_form: + description: A feedback form to allow the user to provide additional information on the rating provided + allOf: + - $ref: "#/components/schemas/XInput" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_support: + post: + tags: + - Beckn App Platform (BAP) + description: Contact Support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_cancellation_reasons: + post: + tags: + - BPP Meta APIs + description: Get cancellation reasons from the BPP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /cancellation_reasons: + post: + tags: + - BAP Meta APIs + description: Get cancellation reasons from the BPP + requestBody: + description: List of cancellation reasons + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + message: + type: object + properties: + cancellation_reasons: + type: array + items: + $ref: "#/components/schemas/Option" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_return_reasons: + post: + tags: + - BPP Meta APIs + description: Get return reasons from the BPP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /return_reasons: + post: + tags: + - BAP Meta APIs + description: Get return reasons from the BPP + requestBody: + description: List of return reasons + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + return_reasons: + type: array + items: + $ref: "#/components/schemas/Option" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_rating_categories: + post: + tags: + - BPP Meta APIs + description: Get a list of categories that can be rated by the BAP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /rating_categories: + post: + tags: + - BAP Meta APIs + description: Get a list of categories that can be rated by the BAP + requestBody: + description: Array of categories which can be rated + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + rating_categories: + type: array + items: + $ref: "#/components/schemas/Rating/properties/rating_category" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message +components: + securitySchemes: + SubscriberAuth: + type: apiKey + in: header + name: Authorization + description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + GatewaySubscriberAuth: + type: apiKey + in: header + name: Proxy-Authorization + description: 'Signature of message body + BAP/BPP''s Authorization header using BG''s signing public key. Format:

Proxy-Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"

Note:This header will be deprecated soon and will no longer be supported in future releases. New implementors are requested to use the X-Gateway-Authorization header. Existing implementations are requested to migrate their header to the new header. The deprecation date will be set after discussion as per the standard specification governance process.

' + GatewaySubscriberAuthNew: + type: apiKey + in: header + name: X-Gateway-Authorization + description: 'Signature of message body + BAP/BPP''s Authorization header using BG''s signing public key. Format:

X-Gateway-Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + schemas: + Ack: + description: This describes an acknowledgement of receipt of a message. Upon receiving a message, the receiver must first authenticate the sender by verifying its digital signature. Upon successful verification of the signature, the receiver must validate the schema of the message. After performing both the operations, the receiver should send an Ack object in response. + type: object + properties: + status: + type: string + description: "Describe the status of the ACK response. If the message passes the acknowledgement criteria, then the receiver shouls set this value equal to ACK else it should be set to NACK" + enum: + - ACK + - NACK + tags: + description: A list of tags containing any additional information sent along with the Acknowledgement. + type: array + items: + $ref: "#/components/schemas/TagGroup" + AddOn: + description: This is typically an optional product or service that can be offered in addition to a product or a service of type Item. Objects of type AddOn should not exist without an associated Item. If a BAP receives an Item with an add-on, it must show it to the user as a selectable object. If any AddOn object is found without an associated Item object, then the validator must throw an error 'NO-PARENT=ITEM' with message 'No parent found' + type: object + properties: + id: + type: string + description: ID of the add-on as present in the source catalog + optional: + type: boolean + default: false + description: This value indicates if the add-on is optional or required to be selected by the user along with an Item. If this value is set to true, then the BAP must ensure that the add-on is mandatorily selected by the user while creating the Order object with the Item. + descriptor: + $ref: "#/components/schemas/Descriptor" + price: + $ref: "#/components/schemas/Price" + Address: + description: Describes a postal address. + type: string + Agent: + description: "Describes a person who fulfills this order." + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + organization: + $ref: "#/components/schemas/Organization" + rating: + $ref: "#/components/schemas/Rating/properties/value" + Authorization: + description: "Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation." + type: object + properties: + type: + description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. + type: string + token: + description: "Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering." + type: string + valid_from: + description: Timestamp in RFC3339 format from which token is valid + type: string + format: date-time + valid_to: + description: Timestamp in RFC3339 format until which token is valid + type: string + format: date-time + status: + description: Status of the token + type: string + Billing: + description: Describes the billing details of an order. This must be provided by BAP user before confirmation of the order. + type: object + properties: + name: + description: Name of the person under who's name the bill will be generated. + type: string + organization: + description: Name of the organization under who's name the bill will be generated. + allOf: + - $ref: "#/components/schemas/Organization" + address: + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the billable entity resides. This is important for state-level tax calculation + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the billable entity resides. + allOf: + - $ref: "#/components/schemas/City" + email: + description: Email address of the person / organization being billed. The BPP must send the bill to this email address. The format of the bill may be defined in the network policy. + type: string + format: email + phone: + description: Phone number of the person / organization being billed. The BPP must send the bill to this phone number as per the format specified in the network policy. In case the bill is a downloadable file, it is recommended the bill should be sent to the phone number as a downloadable link. + type: string + time: + $ref: "#/components/schemas/Time" + tax_id: + description: This is the identity of a Tax-paying person or an organization. This number can be provided to the BPP to avail tax benefits, if applicable. The format of this string should be specified in the network policy + type: string + created_at: + description: Date and time at which this bill was generated by the BPP. + type: string + format: date-time + + Cancellation: + description: Describes a cancellation event + type: object + properties: + time: + description: Date-time when the order was cancelled by the seeker + type: string + format: date-time + cancelled_by: + type: string + enum: + - SEEKER + - PROVIDER + reason: + description: The reason for cancellation + allOf: + - $ref: "#/components/schemas/Option" + additional_description: + description: Any additional information regarding the nature of cancellation + allOf: + - $ref: "#/components/schemas/Descriptor" + + CancellationTerm: + description: Describes the cancellation terms of an order, i.e, scholarship application, course etc. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean + cancel_by: + description: Information related to the time of cancellation. + allOf: + - $ref: "#/components/schemas/Time" + cancellation_fee: + $ref: "#/components/schemas/Fee" + xinput: + $ref: "#/components/schemas/XInput" + external_ref: + $ref: "#/components/schemas/MediaFile" + Catalog: + description: "Describes a skilling and education catalog" + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + type: array + items: + $ref: "#/components/schemas/Payment" + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + type: array + items: + $ref: "#/components/schemas/Offer" + providers: + type: array + items: + $ref: "#/components/schemas/Provider" + exp: + description: Timestamp after which catalog will expire + type: string + format: date-time + ttl: + description: Duration in seconds after which this catalog will expire + type: string + Category: + description: Describes a category + type: object + properties: + id: + type: string + description: Unique id of the category + parent_category_id: + $ref: "#/components/schemas/Category/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + time: + $ref: "#/components/schemas/Time" + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Circle: + description: Describes a circular area on the map + type: object + properties: + gps: + $ref: "#/components/schemas/Gps" + radius: + $ref: "#/components/schemas/Scalar" + City: + description: Describes a city + type: object + properties: + name: + type: string + description: Name of the city + code: + type: string + description: City code + Contact: + description: Describes the contact information of an entity + type: object + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + Context: + description: Describes a beckn message context + type: object + properties: + domain: + allOf: + - $ref: "#/components/schemas/Domain/properties/code" + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - $ref: "#/components/schemas/Location" + action: + type: string + description: Defines the Beckn API call type. + version: + type: string + description: Version of Beckn core API specification being used + bap_id: + type: string + description: Unique id of the BAP. By default it is the fully qualified domain name of the BAP + bap_uri: + type: string + format: uri + description: URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id + bpp_id: + type: string + description: Unique id of the BPP. By default it is the fully qualified domain name of the BPP + bpp_uri: + type: string + format: uri + description: URI of the BPP. Must have the same domain name as the bap_id + transaction_id: + type: string + format: uuid + description: This is a unique value which persists across all API calls from search through confirm + message_id: + type: string + format: uuid + description: This is a unique value which persists during a request / callback cycle + timestamp: + type: string + format: date-time + description: Time of request generation in RFC3339 format + key: + type: string + description: The encryption public key of the sender + ttl: + type: string + description: The duration in ISO8601 format after timestamp for which this message holds valid + Country: + description: Describes a country. + type: object + properties: + name: + type: string + description: Name of the country + code: + type: string + description: Country code as per ISO 3166-1 and ISO 3166-2 format + Credential: + description: Describes a credential of an entity - Person or Organization + type: object + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + Customer: + description: Describes a customer buying/availing a product or a service + type: object + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + Domain: + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + type: object + properties: + name: + description: Name of the domain + type: string + code: + description: "Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network." + additional_info: + description: A url that contains addtional information about that domain. + allOf: + - $ref: "#/components/schemas/MediaFile" + DecimalValue: + description: Describes a decimal value + type: string + pattern: "[+-]?([0-9]*[.])?[0-9]+" + Descriptor: + description: Physical description of something. + type: object + properties: + name: + type: string + code: + type: string + short_desc: + type: string + long_desc: + type: string + additional_desc: + type: object + properties: + url: + type: string + content_type: + type: string + enum: + - text/plain + - text/html + - application/json + media: + type: array + items: + $ref: "#/components/schemas/MediaFile" + images: + type: array + items: + $ref: "#/components/schemas/Image" + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + description: Describes an error object + type: object + properties: + type: + type: string + enum: + - CONTEXT-ERROR + - CORE-ERROR + - DOMAIN-ERROR + - POLICY-ERROR + - JSON-SCHEMA-ERROR + code: + type: string + description: "Beckn specific error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-RFC-005-ERROR-CODES-DRAFT-01.md of this repo" + path: + type: string + description: Path to json schema generating the error. Used only during json schema validation errors + message: + type: string + description: Human readable message describing the error + required: + - type + - code + Fee: + description: A fee applied on a particular entity + type: object + properties: + percentage: + description: Percentage of a value + allOf: + - $ref: "#/components/schemas/DecimalValue" + amount: + description: A fixed value + allOf: + - $ref: "#/components/schemas/Price" + Form: + description: Describes a form + type: object + properties: + url: + description: "The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form." + type: string + format: uri + data: + description: The form submission data + type: object + additionalProperties: + type: string + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + type: string + enum: + - text/html + - application/xml + submission_id: + type: string + format: uuid + Fulfillment: + description: Describes how a an order will be rendered/fulfilled to the end-customer + type: object + properties: + id: + description: Unique reference ID to the fulfillment of an order + type: string + type: + description: "A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment." + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + description: The rating value of the fulfullment service. + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + state: + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - $ref: "#/components/schemas/Customer" + agent: + description: The agent that is currently handling the fulfillment of the order + allOf: + - $ref: "#/components/schemas/Agent" + contact: + $ref: "#/components/schemas/Contact" + vehicle: + $ref: "#/components/schemas/Vehicle" + stops: + description: The list of logical stops encountered during the fulfillment of an order. + type: array + items: + $ref: "#/components/schemas/Stop" + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + FulfillmentState: + description: Describes the state of fulfillment + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + Gps: + description: Describes a GPS coordinate + type: string + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + Image: + description: Describes an image + type: object + properties: + url: + description: URL to the image. This can be a data url or an remote url + type: string + format: uri + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + type: string + enum: + - xs + - sm + - md + - lg + - xl + - custom + width: + description: Width of the image in pixels + type: string + height: + description: Height of the image in pixels + type: string + Intent: + description: "The intent to get a Learning and Career Development Resources. The BAP can declare the intent of the consumer containing
  • What they want (scholarship, job, course etc)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + type: object + properties: + descriptor: + description: "A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object." + allOf: + - $ref: "#/components/schemas/Descriptor" + provider: + description: The provider from which the customer wants to place to the order from + allOf: + - $ref: "#/components/schemas/Provider" + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - $ref: "#/components/schemas/Fulfillment" + payment: + description: Details on how the customer wants to pay for the order + allOf: + - $ref: "#/components/schemas/Payment" + category: + description: Details on the item category + allOf: + - $ref: "#/components/schemas/Category" + offer: + description: details on the offer the customer wants to avail + allOf: + - $ref: "#/components/schemas/Offer" + item: + description: Details of the item that the consumer wants to order + allOf: + - $ref: "#/components/schemas/Item" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + ItemQuantity: + description: Describes the count or amount of an item + type: object + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + maximum: + description: This represents the maximum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: + $ref: "#/components/schemas/Scalar" + minimum: + description: This represents the minimum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + selected: + description: This represents the quantity selected for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: "#/components/schemas/Scalar" + Item: + description: "Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item." + type: object + properties: + id: + description: ID of the item. + type: string + parent_item_id: + description: "ID of the item, this item is a variant of" + allOf: + - $ref: "#/components/schemas/Item/properties/id" + parent_item_quantity: + description: The number of units of the parent item this item is a multiple of + allOf: + - $ref: "#/components/schemas/ItemQuantity" + descriptor: + description: Physical description of the item + allOf: + - $ref: "#/components/schemas/Descriptor" + creator: + description: The creator of this item + allOf: + - $ref: "#/components/schemas/Organization" + price: + description: "The price of this item, if it has intrinsic value" + allOf: + - $ref: "#/components/schemas/Price" + quantity: + description: The selling quantity of the item + allOf: + - $ref: "#/components/schemas/ItemQuantity" + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - $ref: "#/components/schemas/Category/properties/id" + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - $ref: "#/components/schemas/Fulfillment/properties/id" + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - $ref: "#/components/schemas/Location/properties/id" + payment_ids: + description: Payment modalities through which this item can be ordered + type: array + items: + allOf: + - $ref: "#/components/schemas/Payment/properties/id" + add_ons: + type: array + items: + $ref: "#/components/schemas/AddOn" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + description: Time within which refund will be processed after successful cancellation. + allOf: + - $ref: "#/components/schemas/Time" + refund_amount: + $ref: "#/components/schemas/Price" + replacement_terms: + description: Terms that are applicable be met when this item is replaced + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + xinput: + description: Additional input required from the customer to purchase / avail this item + allOf: + - $ref: "#/components/schemas/XInput" + time: + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + allOf: + - $ref: "#/components/schemas/Time" + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + matched: + description: Whether this item is an exact match of the request + type: boolean + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + recommended: + description: Whether this item is a recommended item to a response + type: boolean + ttl: + description: Time to live in seconds for an instance of this schema + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Location: + description: The physical location of something + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + type: string + format: uri + gps: + description: The GPS co-ordinates of this location. + allOf: + - $ref: "#/components/schemas/Gps" + address: + description: The address of this location. + allOf: + - $ref: "#/components/schemas/Address" + city: + description: "The city this location is, or is located within" + allOf: + - $ref: "#/components/schemas/City" + district: + description: "The state this location is, or is located within" + type: string + state: + description: "The state this location is, or is located within" + allOf: + - $ref: "#/components/schemas/State" + country: + description: "The country this location is, or is located within" + allOf: + - $ref: "#/components/schemas/Country" + area_code: + type: string + circle: + $ref: "#/components/schemas/Circle" + polygon: + description: The boundary polygon of this location + type: string + 3dspace: + description: The three dimensional region describing this location + type: string + rating: + description: The rating of this location + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + MediaFile: + description: This object contains a url to a media file. + type: object + properties: + mimetype: + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + type: string + url: + description: The URL of the file + type: string + format: uri + signature: + description: The digital signature of the file signed by the sender + type: string + dsa: + description: The signing algorithm used by the sender + type: string + Offer: + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + location_ids: + type: array + items: + $ref: "#/components/schemas/Location/properties/id" + category_ids: + type: array + items: + $ref: "#/components/schemas/Category/properties/id" + item_ids: + type: array + items: + $ref: "#/components/schemas/Item/properties/id" + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Option: + description: Describes a selectable option + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + Order: + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + type: object + properties: + id: + type: string + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + type: array + items: + type: string + description: ID of a previous order + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: + description: "This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level." + type: string + default: DEFAULT + enum: + - DRAFT + - DEFAULT + provider: + description: Details of the provider whose catalog items have been selected. + allOf: + - $ref: "#/components/schemas/Provider" + items: + description: The items purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/Item" + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/AddOn" + offers: + description: The offers applied in this order + type: array + items: + $ref: "#/components/schemas/Offer" + billing: + description: The billing details of this order + allOf: + - $ref: "#/components/schemas/Billing" + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: + $ref: "#/components/schemas/Fulfillment" + cancellation: + description: The cancellation details of this order + allOf: + - $ref: "#/components/schemas/Cancellation" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + $ref: "#/components/schemas/Item/properties/refund_terms/items" + replacement_terms: + description: Replacement terms of this item + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Return terms of this item + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - $ref: "#/components/schemas/Quotation" + payments: + description: The terms of settlement for this order + type: array + items: + $ref: "#/components/schemas/Payment" + created_at: + description: The date-time of creation of this order + type: string + format: date-time + updated_at: + description: The date-time of updated of this order + type: string + format: date-time + xinput: + description: Additional input required from the customer to confirm this order + allOf: + - $ref: "#/components/schemas/XInput" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Organization: + description: An organization. Usually a recognized business entity. + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + address: + description: The postal address of the organization + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the organization's address is registered + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the the organization's address is registered + allOf: + - $ref: "#/components/schemas/City" + contact: + $ref: "#/components/schemas/Contact" + Payment: + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + type: object + properties: + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + collected_by: + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + url: + type: string + description: "A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory." + format: uri + params: + type: object + properties: + transaction_id: + type: string + description: The reference transaction ID associated with a payment activity + amount: + type: string + currency: + type: string + bank_code: + type: string + bank_account_number: + type: string + virtual_payment_address: + type: string + source_bank_code: + type: string + source_bank_account_number: + type: string + source_virtual_payment_address: + type: string + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Person: + description: Describes a person as any individual + type: object + properties: + id: + type: string + description: Describes the identity of the person + url: + description: Profile url of the person + type: string + format: uri + name: + description: the name of the person + type: string + image: + $ref: "#/components/schemas/Image" + age: + description: Age of the person + allOf: + - $ref: "#/components/schemas/Duration" + dob: + description: Date of birth of the person + type: string + format: date + gender: + type: string + description: "Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy" + creds: + type: array + items: + $ref: "#/components/schemas/Credential" + languages: + type: array + items: + description: Describes a language known to the person. + type: object + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + properties: + code: + type: string + name: + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Price: + description: Describes the price of a product or service + type: object + properties: + currency: + type: string + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + listed_value: + $ref: "#/components/schemas/DecimalValue" + offered_value: + $ref: "#/components/schemas/DecimalValue" + minimum_value: + $ref: "#/components/schemas/DecimalValue" + maximum_value: + $ref: "#/components/schemas/DecimalValue" + Provider: + description: Describes the catalog of an entity, entitiy can be a scholarship facilitator, course provider etc + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: + $ref: "#/components/schemas/Descriptor" + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: + $ref: "#/components/schemas/Rating/properties/value" + time: + $ref: "#/components/schemas/Time" + categories: + type: array + items: + $ref: "#/components/schemas/Category" + fulfillments: + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + type: array + items: + $ref: "#/components/schemas/Payment" + locations: + type: array + items: + $ref: "#/components/schemas/Location" + offers: + type: array + items: + $ref: "#/components/schemas/Offer" + items: + type: array + items: + $ref: "#/components/schemas/Item" + exp: + type: string + description: Time after which catalog has to be refreshed + format: date-time + rateable: + description: Whether this provider can be rated or not + type: boolean + ttl: + description: "The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable." + type: integer + minimum: -1 + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Quotation: + description: "Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl" + type: object + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - $ref: "#/components/schemas/Price" + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: + $ref: "#/components/schemas/Item" + title: + type: string + price: + $ref: "#/components/schemas/Price" + ttl: + $ref: "#/components/schemas/Duration" + Rating: + description: Describes the rating of an entity + type: object + properties: + rating_category: + description: Category of the entity being rated + type: string + enum: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + id: + description: Id of the object being rated + type: string + value: + description: "Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||." + + ReplacementTerm: + description: The replacement policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + replace_within: + description: "Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement" + allOf: + - $ref: "#/components/schemas/Time" + external_ref: + $ref: "#/components/schemas/MediaFile" + + ReturnTerm: + description: Describes the return policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term IETF''s applicable. + allOf: + - $ref: "#/components/schemas/State" + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_time: + description: "Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund." + allOf: + - $ref: "#/components/schemas/Time" + return_location: + description: The location where the item or order must / will be returned to + allOf: + - $ref: "#/components/schemas/Location" + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + Scalar: + description: Describes a scalar + type: object + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + range: + type: object + properties: + min: + $ref: "#/components/schemas/DecimalValue" + max: + $ref: "#/components/schemas/DecimalValue" + unit: + type: string + Schedule: + description: "Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times" + type: object + properties: + frequency: + $ref: "#/components/schemas/Duration" + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + State: + description: A bounded geopolitical region of governance inside a country. + type: object + properties: + name: + type: string + description: Name of the state + code: + type: string + description: State code as per country or international standards + Stop: + description: A logical point in space and time during the fulfillment of an order. + type: object + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - $ref: "#/components/schemas/Location" + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + type: string + time: + description: Timings applicable at the stop. + allOf: + - $ref: "#/components/schemas/Time" + instructions: + description: Instructions that need to be followed at the stop + allOf: + - $ref: "#/components/schemas/Descriptor" + contact: + description: Contact details of the stop + allOf: + - $ref: "#/components/schemas/Contact" + person: + description: The details of the person present at the stop + allOf: + - $ref: "#/components/schemas/Person" + authorization: + $ref: "#/components/schemas/Authorization" + Support: + description: Details of customer support + type: object + properties: + ref_id: + type: string + callback_phone: + type: string + format: phone + phone: + type: string + format: phone + email: + type: string + format: email + url: + type: string + format: uri + Tag: + description: "Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service." + type: object + properties: + descriptor: + description: "Description of the Tag, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + display: + description: "This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value." + type: boolean + TagGroup: + description: "A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316" + type: object + properties: + display: + description: "Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search." + type: boolean + default: true + descriptor: + description: "Description of the TagGroup, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + list: + description: "An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema." + type: array + items: + $ref: "#/components/schemas/Tag" + Time: + description: Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations + type: object + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: + $ref: "#/components/schemas/Duration" + range: + type: object + properties: + start: + type: string + format: date-time + end: + type: string + format: date-time + days: + type: string + description: comma separated values representing days of the week + schedule: + $ref: "#/components/schemas/Schedule" + Tracking: + description: Describes a tracking object. it can be used to track the status of a service, i.e, a scholarship application, a course etc. + type: object + properties: + id: + description: A unique tracking reference number + type: string + url: + description: "A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data." + type: string + format: uri + location: + description: "In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API." + allOf: + - $ref: "#/components/schemas/Location" + status: + description: "This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order." + type: string + enum: + - active + - inactive + Vehicle: + description: "Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration" + type: object + properties: + category: + type: string + capacity: + type: integer + make: + type: string + model: + type: string + size: + type: string + variant: + type: string + color: + type: string + energy_type: + type: string + registration: + type: string + wheels_count: + type: string + cargo_volumne: + type: string + wheelchair_access: + type: string + code: + type: string + emission_standard: + type: string + XInput: + description: "Contains any additional or extended inputs required for the order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, A scholarship application may require additional details on the applicant as a proof of eligibility. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation." + type: object + properties: + form: + $ref: "#/components/schemas/Form" + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean diff --git a/layer2/samples/dsep_courses_1.1.0.yaml b/layer2/samples/dsep_courses_1.1.0.yaml new file mode 100644 index 0000000..bfac183 --- /dev/null +++ b/layer2/samples/dsep_courses_1.1.0.yaml @@ -0,0 +1,3063 @@ +openapi: 3.0.0 +info: + title: Decentralized Skilling and Education Protocol Specification + description: Adaptation of beckn protocol for the domain of skilling and education + version: 0.7.0 + +security: + - SubscriberAuth: [] + - GatewaySubscriberAuthNew: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: This allows a BAP to discover for catalogs offering
a) Jobs and Internships
b) Trainings and Courses
c) Mentors and Coaches and,
d) Scholarships and Grants + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + $ref: "#/components/schemas/Intent" + required: + - context + - message + examples: + Search for 'web design' jobs by category code in the region of Delhi: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + category: + descriptor: + name: Web design jobs + code: nic2008:62012 + Search for jobs by skills like carpentry and painting: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + fulfillment: + customer: + person: + skills: + - name: Painting + - name: Carpentry + tags: + - descriptor: + name: Competence + list: + - descriptor: + name: Experience + value: 12Y + + Search for jobs along with expected salary: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + fulfillment: + customer: + person: + skills: + - name: Java Programming + tags: + - descriptor: + name: Competence + list: + - descriptor: + name: Experience + value: 12Y + tags: + - descriptor: + name: Expectations + list: + - descriptor: + name: expected_payment + value: 250000INR/Month + + Search for jobs offered by a specific provider: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + provider: + descriptor: + name: Infosys + Search for online courses matching a specific topic: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + item: + descriptor: + name: AI basics + tags: + - descriptor: + name: course_labels + list: + - descriptor: + name: label_1 + value: AI + - descriptor: + name: label_2 + value: ML + - descriptor: + name: label_3 + value: beginners + - descriptor: + name: label_4 + value: Artifical Intelligence + - descriptor: + name: label_5 + value: machine learning + - descriptor: + name: label_6 + value: neural networks + fulfillment: + type: FULL-TIME + Search for BTech courses offered by an engineering instituition like IIT Delhi: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + provider: + descriptor: + name: IIT Delhi + tags: + - descriptor: + name: course_labels + list: + - descriptor: + name: label_1 + value: AI + - descriptor: + name: label_2 + value: ML + - descriptor: + name: label_3 + value: beginners + - descriptor: + name: label_4 + value: Artifical Intelligence + - descriptor: + name: label_5 + value: machine learning + - descriptor: + name: label_6 + value: neural networks + category: + descriptor: + name: B.Tech + code: BTECH + fulfillment: + type: FULL-TIME + Searching for a mentor by name: + value: + context: + domain: mentorship-and-coaching + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + fulfillment: + agent: + name: Dr Rajiv Manocha + Search for scholarships: + value: + context: + domain: mentorship + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + category: + id: "4" + descriptor: + name: Engineering and Technology + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: API for Selecting items from the catalog. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: Fetch the latest order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /track: + post: + tags: + - Beckn Provider Platform (BPP) + description: Track an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - track + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + callback_url: + type: string + format: uri + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: Cancel an order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - cancel + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + cancellation_reason_id: + $ref: "#/components/schemas/Option/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /update: + post: + tags: + - Beckn Provider Platform (BPP) + description: Remove object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - update + required: + - action + message: + type: object + properties: + update_target: + description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' + type: string + order: + $ref: "#/components/schemas/Order" + required: + - update_target + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /rating: + post: + tags: + - Beckn Provider Platform (BPP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - rating + required: + - action + message: + type: object + properties: + ratings: + type: array + items: + $ref: "#/components/schemas/Rating" + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /support: + post: + tags: + - Beckn Provider Platform (BPP) + description: Contact support + requestBody: + description: Contact support + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /on_search: + post: + tags: + - Beckn App Platform (BAP) + - Beckn Gateway (BG) + description: Send catalog + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: "#/components/schemas/Catalog" + required: + - catalog + error: + $ref: "#/components/schemas/Error" + required: + - context + examples: + Publish a catalog of software jobs by a software agency: + value: + context: + domain: jobs:nic2008:62XXX + location: + city: + code: "*" + country: + code: IND + action: on_search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + bpp_id: https://naukri.com/ + bpp_uri: https://api.naukri.com/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + catalog: + descriptor: + name: Naukri Recruitment Platform + providers: + - descriptor: + name: Infosys + categories: + - id: "1" + name: Frontend Jobs + - id: "2" + name: Backend Jobs + items: + - descriptor: + name: Senior Software Developer + code: SSFD + fulfillment_ids: + - "1" + category_ids: + - "1" + matched: true + - descriptor: + name: Software Consultant - On site + code: SWCO + fulfillment_ids: + - "1" + category_ids: + - "1" + matched: "false" + - descriptor: + name: Software Consultant - Remote + code: SWCR + fulfillment_ids: + - "2" + category_ids: + - "2" + matched: "false" + fulfillments: + - id: "1" + descriptor: + name: Full-time + stops: + - location: + city: + code: BLR + - id: "2" + descriptor: + name: On-site + stops: + - location: + city: + code: BLR + type: start + time: + timestamp: "2022-08-10" + - location: + city: BLR + type: end + time: + timestamp: "2022-08-10" + - id: "3" + descriptor: + name: Remote + stops: + - time: + timestamp: "2022-08-10" + type: start + - time: + timestamp: "2022-08-10" + type: end + Publish a catalog of online courses: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: on_search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + catalog: + descriptor: + name: XAcademy + providers: + - descriptor: + name: XAcademy + categories: + - id: "1" + name: Software + - id: "2" + name: Management + items: + - id: "1" + descriptor: + name: Basics of AI + price: + value: "6000" + fulfillment_ids: + - "1" + category_ids: + - "1" + - id: "2" + descriptor: + name: AI for Data Analysis + price: + value: "7000" + fulfillment_ids: + - "1" + category_ids: + - "1" + fulfillments: + - id: "1" + type: ONLINE + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - context + /on_select: + post: + tags: + - Beckn App Platform (BAP) + description: Send draft order object with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_init: + post: + tags: + - Beckn App Platform (BAP) + description: Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_confirm: + post: + tags: + - Beckn App Platform (BAP) + description: Send active order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_track: + post: + tags: + - Beckn App Platform (BAP) + description: Send tracking details of an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_track + required: + - action + message: + type: object + properties: + tracking: + $ref: "#/components/schemas/Tracking" + required: + - tracking + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_cancel: + post: + tags: + - Beckn App Platform (BAP) + description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_cancel + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_update: + post: + tags: + - Beckn App Platform (BAP) + description: Returns updated service with updated runtime object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_update + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_status: + post: + tags: + - Beckn App Platform (BAP) + description: Fetch the status of a Service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_status + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_rating: + post: + tags: + - Beckn App Platform (BAP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_rating + required: + - action + message: + type: object + properties: + feedback_form: + description: A feedback form to allow the user to provide additional information on the rating provided + allOf: + - $ref: "#/components/schemas/XInput" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_support: + post: + tags: + - Beckn App Platform (BAP) + description: Contact Support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_cancellation_reasons: + post: + tags: + - BPP Meta APIs + description: Get cancellation reasons from the BPP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /cancellation_reasons: + post: + tags: + - BAP Meta APIs + description: Get cancellation reasons from the BPP + requestBody: + description: List of cancellation reasons + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + message: + type: object + properties: + cancellation_reasons: + type: array + items: + $ref: "#/components/schemas/Option" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_return_reasons: + post: + tags: + - BPP Meta APIs + description: Get return reasons from the BPP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /return_reasons: + post: + tags: + - BAP Meta APIs + description: Get return reasons from the BPP + requestBody: + description: List of return reasons + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + return_reasons: + type: array + items: + $ref: "#/components/schemas/Option" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_rating_categories: + post: + tags: + - BPP Meta APIs + description: Get a list of categories that can be rated by the BAP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /rating_categories: + post: + tags: + - BAP Meta APIs + description: Get a list of categories that can be rated by the BAP + requestBody: + description: Array of categories which can be rated + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + rating_categories: + type: array + items: + $ref: "#/components/schemas/Rating/properties/rating_category" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message +components: + securitySchemes: + SubscriberAuth: + type: apiKey + in: header + name: Authorization + description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + GatewaySubscriberAuth: + type: apiKey + in: header + name: Proxy-Authorization + description: 'Signature of message body + BAP/BPP''s Authorization header using BG''s signing public key. Format:

Proxy-Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"

Note:This header will be deprecated soon and will no longer be supported in future releases. New implementors are requested to use the X-Gateway-Authorization header. Existing implementations are requested to migrate their header to the new header. The deprecation date will be set after discussion as per the standard specification governance process.

' + GatewaySubscriberAuthNew: + type: apiKey + in: header + name: X-Gateway-Authorization + description: 'Signature of message body + BAP/BPP''s Authorization header using BG''s signing public key. Format:

X-Gateway-Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + schemas: + Ack: + description: This describes an acknowledgement of receipt of a message. Upon receiving a message, the receiver must first authenticate the sender by verifying its digital signature. Upon successful verification of the signature, the receiver must validate the schema of the message. After performing both the operations, the receiver should send an Ack object in response. + type: object + properties: + status: + type: string + description: "Describe the status of the ACK response. If the message passes the acknowledgement criteria, then the receiver shouls set this value equal to ACK else it should be set to NACK" + enum: + - ACK + - NACK + tags: + description: A list of tags containing any additional information sent along with the Acknowledgement. + type: array + items: + $ref: "#/components/schemas/TagGroup" + AddOn: + description: This is typically an optional product or service that can be offered in addition to a product or a service of type Item. Objects of type AddOn should not exist without an associated Item. If a BAP receives an Item with an add-on, it must show it to the user as a selectable object. If any AddOn object is found without an associated Item object, then the validator must throw an error 'NO-PARENT=ITEM' with message 'No parent found' + type: object + properties: + id: + type: string + description: ID of the add-on as present in the source catalog + optional: + type: boolean + default: false + description: This value indicates if the add-on is optional or required to be selected by the user along with an Item. If this value is set to true, then the BAP must ensure that the add-on is mandatorily selected by the user while creating the Order object with the Item. + descriptor: + $ref: "#/components/schemas/Descriptor" + price: + $ref: "#/components/schemas/Price" + Address: + description: Describes a postal address. + type: string + Agent: + description: "Describes a person who fulfills this order." + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + organization: + $ref: "#/components/schemas/Organization" + rating: + $ref: "#/components/schemas/Rating/properties/value" + Authorization: + description: "Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation." + type: object + properties: + type: + description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. + type: string + token: + description: "Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering." + type: string + valid_from: + description: Timestamp in RFC3339 format from which token is valid + type: string + format: date-time + valid_to: + description: Timestamp in RFC3339 format until which token is valid + type: string + format: date-time + status: + description: Status of the token + type: string + Billing: + description: Describes the billing details of an order. This must be provided by BAP user before confirmation of the order. + type: object + properties: + name: + description: Name of the person under who's name the bill will be generated. + type: string + organization: + description: Name of the organization under who's name the bill will be generated. + allOf: + - $ref: "#/components/schemas/Organization" + address: + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the billable entity resides. This is important for state-level tax calculation + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the billable entity resides. + allOf: + - $ref: "#/components/schemas/City" + email: + description: Email address of the person / organization being billed. The BPP must send the bill to this email address. The format of the bill may be defined in the network policy. + type: string + format: email + phone: + description: Phone number of the person / organization being billed. The BPP must send the bill to this phone number as per the format specified in the network policy. In case the bill is a downloadable file, it is recommended the bill should be sent to the phone number as a downloadable link. + type: string + time: + $ref: "#/components/schemas/Time" + tax_id: + description: This is the identity of a Tax-paying person or an organization. This number can be provided to the BPP to avail tax benefits, if applicable. The format of this string should be specified in the network policy + type: string + created_at: + description: Date and time at which this bill was generated by the BPP. + type: string + format: date-time + + Cancellation: + description: Describes a cancellation event + type: object + properties: + time: + description: Date-time when the order was cancelled by the seeker + type: string + format: date-time + cancelled_by: + type: string + enum: + - SEEKER + - PROVIDER + reason: + description: The reason for cancellation + allOf: + - $ref: "#/components/schemas/Option" + additional_description: + description: Any additional information regarding the nature of cancellation + allOf: + - $ref: "#/components/schemas/Descriptor" + + CancellationTerm: + description: Describes the cancellation terms of an order, i.e, scholarship application, course etc. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean + cancel_by: + description: Information related to the time of cancellation. + allOf: + - $ref: "#/components/schemas/Time" + cancellation_fee: + $ref: "#/components/schemas/Fee" + xinput: + $ref: "#/components/schemas/XInput" + external_ref: + $ref: "#/components/schemas/MediaFile" + Catalog: + description: "Describes a skilling and education catalog" + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + type: array + items: + $ref: "#/components/schemas/Payment" + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + type: array + items: + $ref: "#/components/schemas/Offer" + providers: + type: array + items: + $ref: "#/components/schemas/Provider" + exp: + description: Timestamp after which catalog will expire + type: string + format: date-time + ttl: + description: Duration in seconds after which this catalog will expire + type: string + Category: + description: Describes a category + type: object + properties: + id: + type: string + description: Unique id of the category + parent_category_id: + $ref: "#/components/schemas/Category/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + time: + $ref: "#/components/schemas/Time" + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Circle: + description: Describes a circular area on the map + type: object + properties: + gps: + $ref: "#/components/schemas/Gps" + radius: + $ref: "#/components/schemas/Scalar" + City: + description: Describes a city + type: object + properties: + name: + type: string + description: Name of the city + code: + type: string + description: City code + Contact: + description: Describes the contact information of an entity + type: object + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + Context: + description: Describes a beckn message context + type: object + properties: + domain: + allOf: + - $ref: "#/components/schemas/Domain/properties/code" + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - $ref: "#/components/schemas/Location" + action: + type: string + description: Defines the Beckn API call type. + version: + type: string + description: Version of Beckn core API specification being used + bap_id: + type: string + description: Unique id of the BAP. By default it is the fully qualified domain name of the BAP + bap_uri: + type: string + format: uri + description: URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id + bpp_id: + type: string + description: Unique id of the BPP. By default it is the fully qualified domain name of the BPP + bpp_uri: + type: string + format: uri + description: URI of the BPP. Must have the same domain name as the bap_id + transaction_id: + type: string + format: uuid + description: This is a unique value which persists across all API calls from search through confirm + message_id: + type: string + format: uuid + description: This is a unique value which persists during a request / callback cycle + timestamp: + type: string + format: date-time + description: Time of request generation in RFC3339 format + key: + type: string + description: The encryption public key of the sender + ttl: + type: string + description: The duration in ISO8601 format after timestamp for which this message holds valid + Country: + description: Describes a country. + type: object + properties: + name: + type: string + description: Name of the country + code: + type: string + description: Country code as per ISO 3166-1 and ISO 3166-2 format + Credential: + description: Describes a credential of an entity - Person or Organization + type: object + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + Customer: + description: Describes a customer buying/availing a product or a service + type: object + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + Domain: + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + type: object + properties: + name: + description: Name of the domain + type: string + code: + description: "Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network." + additional_info: + description: A url that contains addtional information about that domain. + allOf: + - $ref: "#/components/schemas/MediaFile" + DecimalValue: + description: Describes a decimal value + type: string + pattern: "[+-]?([0-9]*[.])?[0-9]+" + Descriptor: + description: Physical description of something. + type: object + properties: + name: + type: string + code: + type: string + short_desc: + type: string + long_desc: + type: string + additional_desc: + type: object + properties: + url: + type: string + content_type: + type: string + enum: + - text/plain + - text/html + - application/json + media: + type: array + items: + $ref: "#/components/schemas/MediaFile" + images: + type: array + items: + $ref: "#/components/schemas/Image" + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + description: Describes an error object + type: object + properties: + type: + type: string + enum: + - CONTEXT-ERROR + - CORE-ERROR + - DOMAIN-ERROR + - POLICY-ERROR + - JSON-SCHEMA-ERROR + code: + type: string + description: "Beckn specific error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-RFC-005-ERROR-CODES-DRAFT-01.md of this repo" + path: + type: string + description: Path to json schema generating the error. Used only during json schema validation errors + message: + type: string + description: Human readable message describing the error + required: + - type + - code + Fee: + description: A fee applied on a particular entity + type: object + properties: + percentage: + description: Percentage of a value + allOf: + - $ref: "#/components/schemas/DecimalValue" + amount: + description: A fixed value + allOf: + - $ref: "#/components/schemas/Price" + Form: + description: Describes a form + type: object + properties: + url: + description: "The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form." + type: string + format: uri + data: + description: The form submission data + type: object + additionalProperties: + type: string + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + type: string + enum: + - text/html + - application/xml + submission_id: + type: string + format: uuid + Fulfillment: + description: Describes how a an order will be rendered/fulfilled to the end-customer + type: object + properties: + id: + description: Unique reference ID to the fulfillment of an order + type: string + type: + description: "A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment." + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + description: The rating value of the fulfullment service. + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + state: + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - $ref: "#/components/schemas/Customer" + agent: + description: The agent that is currently handling the fulfillment of the order + allOf: + - $ref: "#/components/schemas/Agent" + contact: + $ref: "#/components/schemas/Contact" + vehicle: + $ref: "#/components/schemas/Vehicle" + stops: + description: The list of logical stops encountered during the fulfillment of an order. + type: array + items: + $ref: "#/components/schemas/Stop" + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + FulfillmentState: + description: Describes the state of fulfillment + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + Gps: + description: Describes a GPS coordinate + type: string + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + Image: + description: Describes an image + type: object + properties: + url: + description: URL to the image. This can be a data url or an remote url + type: string + format: uri + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + type: string + enum: + - xs + - sm + - md + - lg + - xl + - custom + width: + description: Width of the image in pixels + type: string + height: + description: Height of the image in pixels + type: string + Intent: + description: "The intent to get a Learning and Career Development Resources. The BAP can declare the intent of the consumer containing
  • What they want (scholarship, job, course etc)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + type: object + properties: + descriptor: + description: "A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object." + allOf: + - $ref: "#/components/schemas/Descriptor" + provider: + description: The provider from which the customer wants to place to the order from + allOf: + - $ref: "#/components/schemas/Provider" + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - $ref: "#/components/schemas/Fulfillment" + payment: + description: Details on how the customer wants to pay for the order + allOf: + - $ref: "#/components/schemas/Payment" + category: + description: Details on the item category + allOf: + - $ref: "#/components/schemas/Category" + offer: + description: details on the offer the customer wants to avail + allOf: + - $ref: "#/components/schemas/Offer" + item: + description: Details of the item that the consumer wants to order + allOf: + - $ref: "#/components/schemas/Item" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + ItemQuantity: + description: Describes the count or amount of an item + type: object + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + maximum: + description: This represents the maximum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: + $ref: "#/components/schemas/Scalar" + minimum: + description: This represents the minimum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + selected: + description: This represents the quantity selected for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: "#/components/schemas/Scalar" + Item: + description: "Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item." + type: object + properties: + id: + description: ID of the item. + type: string + parent_item_id: + description: "ID of the item, this item is a variant of" + allOf: + - $ref: "#/components/schemas/Item/properties/id" + parent_item_quantity: + description: The number of units of the parent item this item is a multiple of + allOf: + - $ref: "#/components/schemas/ItemQuantity" + descriptor: + description: Physical description of the item + allOf: + - $ref: "#/components/schemas/Descriptor" + creator: + description: The creator of this item + allOf: + - $ref: "#/components/schemas/Organization" + price: + description: "The price of this item, if it has intrinsic value" + allOf: + - $ref: "#/components/schemas/Price" + quantity: + description: The selling quantity of the item + allOf: + - $ref: "#/components/schemas/ItemQuantity" + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - $ref: "#/components/schemas/Category/properties/id" + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - $ref: "#/components/schemas/Fulfillment/properties/id" + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - $ref: "#/components/schemas/Location/properties/id" + payment_ids: + description: Payment modalities through which this item can be ordered + type: array + items: + allOf: + - $ref: "#/components/schemas/Payment/properties/id" + add_ons: + type: array + items: + $ref: "#/components/schemas/AddOn" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + description: Time within which refund will be processed after successful cancellation. + allOf: + - $ref: "#/components/schemas/Time" + refund_amount: + $ref: "#/components/schemas/Price" + replacement_terms: + description: Terms that are applicable be met when this item is replaced + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + xinput: + description: Additional input required from the customer to purchase / avail this item + allOf: + - $ref: "#/components/schemas/XInput" + time: + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + allOf: + - $ref: "#/components/schemas/Time" + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + matched: + description: Whether this item is an exact match of the request + type: boolean + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + recommended: + description: Whether this item is a recommended item to a response + type: boolean + ttl: + description: Time to live in seconds for an instance of this schema + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Location: + description: The physical location of something + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + type: string + format: uri + gps: + description: The GPS co-ordinates of this location. + allOf: + - $ref: "#/components/schemas/Gps" + address: + description: The address of this location. + allOf: + - $ref: "#/components/schemas/Address" + city: + description: "The city this location is, or is located within" + allOf: + - $ref: "#/components/schemas/City" + district: + description: "The state this location is, or is located within" + type: string + state: + description: "The state this location is, or is located within" + allOf: + - $ref: "#/components/schemas/State" + country: + description: "The country this location is, or is located within" + allOf: + - $ref: "#/components/schemas/Country" + area_code: + type: string + circle: + $ref: "#/components/schemas/Circle" + polygon: + description: The boundary polygon of this location + type: string + 3dspace: + description: The three dimensional region describing this location + type: string + rating: + description: The rating of this location + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + MediaFile: + description: This object contains a url to a media file. + type: object + properties: + mimetype: + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + type: string + url: + description: The URL of the file + type: string + format: uri + signature: + description: The digital signature of the file signed by the sender + type: string + dsa: + description: The signing algorithm used by the sender + type: string + Offer: + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + location_ids: + type: array + items: + $ref: "#/components/schemas/Location/properties/id" + category_ids: + type: array + items: + $ref: "#/components/schemas/Category/properties/id" + item_ids: + type: array + items: + $ref: "#/components/schemas/Item/properties/id" + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Option: + description: Describes a selectable option + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + Order: + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + type: object + properties: + id: + type: string + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + type: array + items: + type: string + description: ID of a previous order + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: + description: "This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level." + type: string + default: DEFAULT + enum: + - DRAFT + - DEFAULT + provider: + description: Details of the provider whose catalog items have been selected. + allOf: + - $ref: "#/components/schemas/Provider" + items: + description: The items purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/Item" + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/AddOn" + offers: + description: The offers applied in this order + type: array + items: + $ref: "#/components/schemas/Offer" + billing: + description: The billing details of this order + allOf: + - $ref: "#/components/schemas/Billing" + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: + $ref: "#/components/schemas/Fulfillment" + cancellation: + description: The cancellation details of this order + allOf: + - $ref: "#/components/schemas/Cancellation" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + $ref: "#/components/schemas/Item/properties/refund_terms/items" + replacement_terms: + description: Replacement terms of this item + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Return terms of this item + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - $ref: "#/components/schemas/Quotation" + payments: + description: The terms of settlement for this order + type: array + items: + $ref: "#/components/schemas/Payment" + created_at: + description: The date-time of creation of this order + type: string + format: date-time + updated_at: + description: The date-time of updated of this order + type: string + format: date-time + xinput: + description: Additional input required from the customer to confirm this order + allOf: + - $ref: "#/components/schemas/XInput" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Organization: + description: An organization. Usually a recognized business entity. + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + address: + description: The postal address of the organization + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the organization's address is registered + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the the organization's address is registered + allOf: + - $ref: "#/components/schemas/City" + contact: + $ref: "#/components/schemas/Contact" + Payment: + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + type: object + properties: + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + collected_by: + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + url: + type: string + description: "A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory." + format: uri + params: + type: object + properties: + transaction_id: + type: string + description: The reference transaction ID associated with a payment activity + amount: + type: string + currency: + type: string + bank_code: + type: string + bank_account_number: + type: string + virtual_payment_address: + type: string + source_bank_code: + type: string + source_bank_account_number: + type: string + source_virtual_payment_address: + type: string + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Person: + description: Describes a person as any individual + type: object + properties: + id: + type: string + description: Describes the identity of the person + url: + description: Profile url of the person + type: string + format: uri + name: + description: the name of the person + type: string + image: + $ref: "#/components/schemas/Image" + age: + description: Age of the person + allOf: + - $ref: "#/components/schemas/Duration" + dob: + description: Date of birth of the person + type: string + format: date + gender: + type: string + description: "Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy" + creds: + type: array + items: + $ref: "#/components/schemas/Credential" + languages: + type: array + items: + description: Describes a language known to the person. + type: object + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + properties: + code: + type: string + name: + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Price: + description: Describes the price of a product or service + type: object + properties: + currency: + type: string + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + listed_value: + $ref: "#/components/schemas/DecimalValue" + offered_value: + $ref: "#/components/schemas/DecimalValue" + minimum_value: + $ref: "#/components/schemas/DecimalValue" + maximum_value: + $ref: "#/components/schemas/DecimalValue" + Provider: + description: Describes the catalog of an entity, entitiy can be a scholarship facilitator, course provider etc + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: + $ref: "#/components/schemas/Descriptor" + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: + $ref: "#/components/schemas/Rating/properties/value" + time: + $ref: "#/components/schemas/Time" + categories: + type: array + items: + $ref: "#/components/schemas/Category" + fulfillments: + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + type: array + items: + $ref: "#/components/schemas/Payment" + locations: + type: array + items: + $ref: "#/components/schemas/Location" + offers: + type: array + items: + $ref: "#/components/schemas/Offer" + items: + type: array + items: + $ref: "#/components/schemas/Item" + exp: + type: string + description: Time after which catalog has to be refreshed + format: date-time + rateable: + description: Whether this provider can be rated or not + type: boolean + ttl: + description: "The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable." + type: integer + minimum: -1 + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Quotation: + description: "Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl" + type: object + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - $ref: "#/components/schemas/Price" + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: + $ref: "#/components/schemas/Item" + title: + type: string + price: + $ref: "#/components/schemas/Price" + ttl: + $ref: "#/components/schemas/Duration" + Rating: + description: Describes the rating of an entity + type: object + properties: + rating_category: + description: Category of the entity being rated + type: string + enum: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + id: + description: Id of the object being rated + type: string + value: + description: "Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||." + + ReplacementTerm: + description: The replacement policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + replace_within: + description: "Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement" + allOf: + - $ref: "#/components/schemas/Time" + external_ref: + $ref: "#/components/schemas/MediaFile" + + ReturnTerm: + description: Describes the return policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term IETF''s applicable. + allOf: + - $ref: "#/components/schemas/State" + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_time: + description: "Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund." + allOf: + - $ref: "#/components/schemas/Time" + return_location: + description: The location where the item or order must / will be returned to + allOf: + - $ref: "#/components/schemas/Location" + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + Scalar: + description: Describes a scalar + type: object + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + range: + type: object + properties: + min: + $ref: "#/components/schemas/DecimalValue" + max: + $ref: "#/components/schemas/DecimalValue" + unit: + type: string + Schedule: + description: "Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times" + type: object + properties: + frequency: + $ref: "#/components/schemas/Duration" + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + State: + description: A bounded geopolitical region of governance inside a country. + type: object + properties: + name: + type: string + description: Name of the state + code: + type: string + description: State code as per country or international standards + Stop: + description: A logical point in space and time during the fulfillment of an order. + type: object + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - $ref: "#/components/schemas/Location" + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + type: string + time: + description: Timings applicable at the stop. + allOf: + - $ref: "#/components/schemas/Time" + instructions: + description: Instructions that need to be followed at the stop + allOf: + - $ref: "#/components/schemas/Descriptor" + contact: + description: Contact details of the stop + allOf: + - $ref: "#/components/schemas/Contact" + person: + description: The details of the person present at the stop + allOf: + - $ref: "#/components/schemas/Person" + authorization: + $ref: "#/components/schemas/Authorization" + Support: + description: Details of customer support + type: object + properties: + ref_id: + type: string + callback_phone: + type: string + format: phone + phone: + type: string + format: phone + email: + type: string + format: email + url: + type: string + format: uri + Tag: + description: "Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service." + type: object + properties: + descriptor: + description: "Description of the Tag, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + display: + description: "This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value." + type: boolean + TagGroup: + description: "A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316" + type: object + properties: + display: + description: "Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search." + type: boolean + default: true + descriptor: + description: "Description of the TagGroup, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + list: + description: "An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema." + type: array + items: + $ref: "#/components/schemas/Tag" + Time: + description: Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations + type: object + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: + $ref: "#/components/schemas/Duration" + range: + type: object + properties: + start: + type: string + format: date-time + end: + type: string + format: date-time + days: + type: string + description: comma separated values representing days of the week + schedule: + $ref: "#/components/schemas/Schedule" + Tracking: + description: Describes a tracking object. it can be used to track the status of a service, i.e, a scholarship application, a course etc. + type: object + properties: + id: + description: A unique tracking reference number + type: string + url: + description: "A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data." + type: string + format: uri + location: + description: "In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API." + allOf: + - $ref: "#/components/schemas/Location" + status: + description: "This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order." + type: string + enum: + - active + - inactive + Vehicle: + description: "Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration" + type: object + properties: + category: + type: string + capacity: + type: integer + make: + type: string + model: + type: string + size: + type: string + variant: + type: string + color: + type: string + energy_type: + type: string + registration: + type: string + wheels_count: + type: string + cargo_volumne: + type: string + wheelchair_access: + type: string + code: + type: string + emission_standard: + type: string + XInput: + description: "Contains any additional or extended inputs required for the order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, A scholarship application may require additional details on the applicant as a proof of eligibility. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation." + type: object + properties: + form: + $ref: "#/components/schemas/Form" + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean diff --git a/layer2/samples/dsep_jobs_1.1.0.yaml b/layer2/samples/dsep_jobs_1.1.0.yaml new file mode 100644 index 0000000..bfac183 --- /dev/null +++ b/layer2/samples/dsep_jobs_1.1.0.yaml @@ -0,0 +1,3063 @@ +openapi: 3.0.0 +info: + title: Decentralized Skilling and Education Protocol Specification + description: Adaptation of beckn protocol for the domain of skilling and education + version: 0.7.0 + +security: + - SubscriberAuth: [] + - GatewaySubscriberAuthNew: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: This allows a BAP to discover for catalogs offering
a) Jobs and Internships
b) Trainings and Courses
c) Mentors and Coaches and,
d) Scholarships and Grants + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + $ref: "#/components/schemas/Intent" + required: + - context + - message + examples: + Search for 'web design' jobs by category code in the region of Delhi: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + category: + descriptor: + name: Web design jobs + code: nic2008:62012 + Search for jobs by skills like carpentry and painting: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + fulfillment: + customer: + person: + skills: + - name: Painting + - name: Carpentry + tags: + - descriptor: + name: Competence + list: + - descriptor: + name: Experience + value: 12Y + + Search for jobs along with expected salary: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + fulfillment: + customer: + person: + skills: + - name: Java Programming + tags: + - descriptor: + name: Competence + list: + - descriptor: + name: Experience + value: 12Y + tags: + - descriptor: + name: Expectations + list: + - descriptor: + name: expected_payment + value: 250000INR/Month + + Search for jobs offered by a specific provider: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + provider: + descriptor: + name: Infosys + Search for online courses matching a specific topic: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + item: + descriptor: + name: AI basics + tags: + - descriptor: + name: course_labels + list: + - descriptor: + name: label_1 + value: AI + - descriptor: + name: label_2 + value: ML + - descriptor: + name: label_3 + value: beginners + - descriptor: + name: label_4 + value: Artifical Intelligence + - descriptor: + name: label_5 + value: machine learning + - descriptor: + name: label_6 + value: neural networks + fulfillment: + type: FULL-TIME + Search for BTech courses offered by an engineering instituition like IIT Delhi: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + provider: + descriptor: + name: IIT Delhi + tags: + - descriptor: + name: course_labels + list: + - descriptor: + name: label_1 + value: AI + - descriptor: + name: label_2 + value: ML + - descriptor: + name: label_3 + value: beginners + - descriptor: + name: label_4 + value: Artifical Intelligence + - descriptor: + name: label_5 + value: machine learning + - descriptor: + name: label_6 + value: neural networks + category: + descriptor: + name: B.Tech + code: BTECH + fulfillment: + type: FULL-TIME + Searching for a mentor by name: + value: + context: + domain: mentorship-and-coaching + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + fulfillment: + agent: + name: Dr Rajiv Manocha + Search for scholarships: + value: + context: + domain: mentorship + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + category: + id: "4" + descriptor: + name: Engineering and Technology + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: API for Selecting items from the catalog. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: Fetch the latest order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /track: + post: + tags: + - Beckn Provider Platform (BPP) + description: Track an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - track + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + callback_url: + type: string + format: uri + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: Cancel an order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - cancel + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + cancellation_reason_id: + $ref: "#/components/schemas/Option/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /update: + post: + tags: + - Beckn Provider Platform (BPP) + description: Remove object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - update + required: + - action + message: + type: object + properties: + update_target: + description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' + type: string + order: + $ref: "#/components/schemas/Order" + required: + - update_target + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /rating: + post: + tags: + - Beckn Provider Platform (BPP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - rating + required: + - action + message: + type: object + properties: + ratings: + type: array + items: + $ref: "#/components/schemas/Rating" + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /support: + post: + tags: + - Beckn Provider Platform (BPP) + description: Contact support + requestBody: + description: Contact support + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /on_search: + post: + tags: + - Beckn App Platform (BAP) + - Beckn Gateway (BG) + description: Send catalog + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: "#/components/schemas/Catalog" + required: + - catalog + error: + $ref: "#/components/schemas/Error" + required: + - context + examples: + Publish a catalog of software jobs by a software agency: + value: + context: + domain: jobs:nic2008:62XXX + location: + city: + code: "*" + country: + code: IND + action: on_search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + bpp_id: https://naukri.com/ + bpp_uri: https://api.naukri.com/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + catalog: + descriptor: + name: Naukri Recruitment Platform + providers: + - descriptor: + name: Infosys + categories: + - id: "1" + name: Frontend Jobs + - id: "2" + name: Backend Jobs + items: + - descriptor: + name: Senior Software Developer + code: SSFD + fulfillment_ids: + - "1" + category_ids: + - "1" + matched: true + - descriptor: + name: Software Consultant - On site + code: SWCO + fulfillment_ids: + - "1" + category_ids: + - "1" + matched: "false" + - descriptor: + name: Software Consultant - Remote + code: SWCR + fulfillment_ids: + - "2" + category_ids: + - "2" + matched: "false" + fulfillments: + - id: "1" + descriptor: + name: Full-time + stops: + - location: + city: + code: BLR + - id: "2" + descriptor: + name: On-site + stops: + - location: + city: + code: BLR + type: start + time: + timestamp: "2022-08-10" + - location: + city: BLR + type: end + time: + timestamp: "2022-08-10" + - id: "3" + descriptor: + name: Remote + stops: + - time: + timestamp: "2022-08-10" + type: start + - time: + timestamp: "2022-08-10" + type: end + Publish a catalog of online courses: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: on_search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + catalog: + descriptor: + name: XAcademy + providers: + - descriptor: + name: XAcademy + categories: + - id: "1" + name: Software + - id: "2" + name: Management + items: + - id: "1" + descriptor: + name: Basics of AI + price: + value: "6000" + fulfillment_ids: + - "1" + category_ids: + - "1" + - id: "2" + descriptor: + name: AI for Data Analysis + price: + value: "7000" + fulfillment_ids: + - "1" + category_ids: + - "1" + fulfillments: + - id: "1" + type: ONLINE + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - context + /on_select: + post: + tags: + - Beckn App Platform (BAP) + description: Send draft order object with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_init: + post: + tags: + - Beckn App Platform (BAP) + description: Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_confirm: + post: + tags: + - Beckn App Platform (BAP) + description: Send active order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_track: + post: + tags: + - Beckn App Platform (BAP) + description: Send tracking details of an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_track + required: + - action + message: + type: object + properties: + tracking: + $ref: "#/components/schemas/Tracking" + required: + - tracking + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_cancel: + post: + tags: + - Beckn App Platform (BAP) + description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_cancel + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_update: + post: + tags: + - Beckn App Platform (BAP) + description: Returns updated service with updated runtime object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_update + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_status: + post: + tags: + - Beckn App Platform (BAP) + description: Fetch the status of a Service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_status + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_rating: + post: + tags: + - Beckn App Platform (BAP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_rating + required: + - action + message: + type: object + properties: + feedback_form: + description: A feedback form to allow the user to provide additional information on the rating provided + allOf: + - $ref: "#/components/schemas/XInput" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_support: + post: + tags: + - Beckn App Platform (BAP) + description: Contact Support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_cancellation_reasons: + post: + tags: + - BPP Meta APIs + description: Get cancellation reasons from the BPP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /cancellation_reasons: + post: + tags: + - BAP Meta APIs + description: Get cancellation reasons from the BPP + requestBody: + description: List of cancellation reasons + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + message: + type: object + properties: + cancellation_reasons: + type: array + items: + $ref: "#/components/schemas/Option" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_return_reasons: + post: + tags: + - BPP Meta APIs + description: Get return reasons from the BPP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /return_reasons: + post: + tags: + - BAP Meta APIs + description: Get return reasons from the BPP + requestBody: + description: List of return reasons + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + return_reasons: + type: array + items: + $ref: "#/components/schemas/Option" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_rating_categories: + post: + tags: + - BPP Meta APIs + description: Get a list of categories that can be rated by the BAP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /rating_categories: + post: + tags: + - BAP Meta APIs + description: Get a list of categories that can be rated by the BAP + requestBody: + description: Array of categories which can be rated + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + rating_categories: + type: array + items: + $ref: "#/components/schemas/Rating/properties/rating_category" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message +components: + securitySchemes: + SubscriberAuth: + type: apiKey + in: header + name: Authorization + description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + GatewaySubscriberAuth: + type: apiKey + in: header + name: Proxy-Authorization + description: 'Signature of message body + BAP/BPP''s Authorization header using BG''s signing public key. Format:

Proxy-Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"

Note:This header will be deprecated soon and will no longer be supported in future releases. New implementors are requested to use the X-Gateway-Authorization header. Existing implementations are requested to migrate their header to the new header. The deprecation date will be set after discussion as per the standard specification governance process.

' + GatewaySubscriberAuthNew: + type: apiKey + in: header + name: X-Gateway-Authorization + description: 'Signature of message body + BAP/BPP''s Authorization header using BG''s signing public key. Format:

X-Gateway-Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + schemas: + Ack: + description: This describes an acknowledgement of receipt of a message. Upon receiving a message, the receiver must first authenticate the sender by verifying its digital signature. Upon successful verification of the signature, the receiver must validate the schema of the message. After performing both the operations, the receiver should send an Ack object in response. + type: object + properties: + status: + type: string + description: "Describe the status of the ACK response. If the message passes the acknowledgement criteria, then the receiver shouls set this value equal to ACK else it should be set to NACK" + enum: + - ACK + - NACK + tags: + description: A list of tags containing any additional information sent along with the Acknowledgement. + type: array + items: + $ref: "#/components/schemas/TagGroup" + AddOn: + description: This is typically an optional product or service that can be offered in addition to a product or a service of type Item. Objects of type AddOn should not exist without an associated Item. If a BAP receives an Item with an add-on, it must show it to the user as a selectable object. If any AddOn object is found without an associated Item object, then the validator must throw an error 'NO-PARENT=ITEM' with message 'No parent found' + type: object + properties: + id: + type: string + description: ID of the add-on as present in the source catalog + optional: + type: boolean + default: false + description: This value indicates if the add-on is optional or required to be selected by the user along with an Item. If this value is set to true, then the BAP must ensure that the add-on is mandatorily selected by the user while creating the Order object with the Item. + descriptor: + $ref: "#/components/schemas/Descriptor" + price: + $ref: "#/components/schemas/Price" + Address: + description: Describes a postal address. + type: string + Agent: + description: "Describes a person who fulfills this order." + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + organization: + $ref: "#/components/schemas/Organization" + rating: + $ref: "#/components/schemas/Rating/properties/value" + Authorization: + description: "Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation." + type: object + properties: + type: + description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. + type: string + token: + description: "Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering." + type: string + valid_from: + description: Timestamp in RFC3339 format from which token is valid + type: string + format: date-time + valid_to: + description: Timestamp in RFC3339 format until which token is valid + type: string + format: date-time + status: + description: Status of the token + type: string + Billing: + description: Describes the billing details of an order. This must be provided by BAP user before confirmation of the order. + type: object + properties: + name: + description: Name of the person under who's name the bill will be generated. + type: string + organization: + description: Name of the organization under who's name the bill will be generated. + allOf: + - $ref: "#/components/schemas/Organization" + address: + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the billable entity resides. This is important for state-level tax calculation + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the billable entity resides. + allOf: + - $ref: "#/components/schemas/City" + email: + description: Email address of the person / organization being billed. The BPP must send the bill to this email address. The format of the bill may be defined in the network policy. + type: string + format: email + phone: + description: Phone number of the person / organization being billed. The BPP must send the bill to this phone number as per the format specified in the network policy. In case the bill is a downloadable file, it is recommended the bill should be sent to the phone number as a downloadable link. + type: string + time: + $ref: "#/components/schemas/Time" + tax_id: + description: This is the identity of a Tax-paying person or an organization. This number can be provided to the BPP to avail tax benefits, if applicable. The format of this string should be specified in the network policy + type: string + created_at: + description: Date and time at which this bill was generated by the BPP. + type: string + format: date-time + + Cancellation: + description: Describes a cancellation event + type: object + properties: + time: + description: Date-time when the order was cancelled by the seeker + type: string + format: date-time + cancelled_by: + type: string + enum: + - SEEKER + - PROVIDER + reason: + description: The reason for cancellation + allOf: + - $ref: "#/components/schemas/Option" + additional_description: + description: Any additional information regarding the nature of cancellation + allOf: + - $ref: "#/components/schemas/Descriptor" + + CancellationTerm: + description: Describes the cancellation terms of an order, i.e, scholarship application, course etc. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean + cancel_by: + description: Information related to the time of cancellation. + allOf: + - $ref: "#/components/schemas/Time" + cancellation_fee: + $ref: "#/components/schemas/Fee" + xinput: + $ref: "#/components/schemas/XInput" + external_ref: + $ref: "#/components/schemas/MediaFile" + Catalog: + description: "Describes a skilling and education catalog" + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + type: array + items: + $ref: "#/components/schemas/Payment" + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + type: array + items: + $ref: "#/components/schemas/Offer" + providers: + type: array + items: + $ref: "#/components/schemas/Provider" + exp: + description: Timestamp after which catalog will expire + type: string + format: date-time + ttl: + description: Duration in seconds after which this catalog will expire + type: string + Category: + description: Describes a category + type: object + properties: + id: + type: string + description: Unique id of the category + parent_category_id: + $ref: "#/components/schemas/Category/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + time: + $ref: "#/components/schemas/Time" + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Circle: + description: Describes a circular area on the map + type: object + properties: + gps: + $ref: "#/components/schemas/Gps" + radius: + $ref: "#/components/schemas/Scalar" + City: + description: Describes a city + type: object + properties: + name: + type: string + description: Name of the city + code: + type: string + description: City code + Contact: + description: Describes the contact information of an entity + type: object + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + Context: + description: Describes a beckn message context + type: object + properties: + domain: + allOf: + - $ref: "#/components/schemas/Domain/properties/code" + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - $ref: "#/components/schemas/Location" + action: + type: string + description: Defines the Beckn API call type. + version: + type: string + description: Version of Beckn core API specification being used + bap_id: + type: string + description: Unique id of the BAP. By default it is the fully qualified domain name of the BAP + bap_uri: + type: string + format: uri + description: URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id + bpp_id: + type: string + description: Unique id of the BPP. By default it is the fully qualified domain name of the BPP + bpp_uri: + type: string + format: uri + description: URI of the BPP. Must have the same domain name as the bap_id + transaction_id: + type: string + format: uuid + description: This is a unique value which persists across all API calls from search through confirm + message_id: + type: string + format: uuid + description: This is a unique value which persists during a request / callback cycle + timestamp: + type: string + format: date-time + description: Time of request generation in RFC3339 format + key: + type: string + description: The encryption public key of the sender + ttl: + type: string + description: The duration in ISO8601 format after timestamp for which this message holds valid + Country: + description: Describes a country. + type: object + properties: + name: + type: string + description: Name of the country + code: + type: string + description: Country code as per ISO 3166-1 and ISO 3166-2 format + Credential: + description: Describes a credential of an entity - Person or Organization + type: object + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + Customer: + description: Describes a customer buying/availing a product or a service + type: object + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + Domain: + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + type: object + properties: + name: + description: Name of the domain + type: string + code: + description: "Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network." + additional_info: + description: A url that contains addtional information about that domain. + allOf: + - $ref: "#/components/schemas/MediaFile" + DecimalValue: + description: Describes a decimal value + type: string + pattern: "[+-]?([0-9]*[.])?[0-9]+" + Descriptor: + description: Physical description of something. + type: object + properties: + name: + type: string + code: + type: string + short_desc: + type: string + long_desc: + type: string + additional_desc: + type: object + properties: + url: + type: string + content_type: + type: string + enum: + - text/plain + - text/html + - application/json + media: + type: array + items: + $ref: "#/components/schemas/MediaFile" + images: + type: array + items: + $ref: "#/components/schemas/Image" + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + description: Describes an error object + type: object + properties: + type: + type: string + enum: + - CONTEXT-ERROR + - CORE-ERROR + - DOMAIN-ERROR + - POLICY-ERROR + - JSON-SCHEMA-ERROR + code: + type: string + description: "Beckn specific error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-RFC-005-ERROR-CODES-DRAFT-01.md of this repo" + path: + type: string + description: Path to json schema generating the error. Used only during json schema validation errors + message: + type: string + description: Human readable message describing the error + required: + - type + - code + Fee: + description: A fee applied on a particular entity + type: object + properties: + percentage: + description: Percentage of a value + allOf: + - $ref: "#/components/schemas/DecimalValue" + amount: + description: A fixed value + allOf: + - $ref: "#/components/schemas/Price" + Form: + description: Describes a form + type: object + properties: + url: + description: "The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form." + type: string + format: uri + data: + description: The form submission data + type: object + additionalProperties: + type: string + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + type: string + enum: + - text/html + - application/xml + submission_id: + type: string + format: uuid + Fulfillment: + description: Describes how a an order will be rendered/fulfilled to the end-customer + type: object + properties: + id: + description: Unique reference ID to the fulfillment of an order + type: string + type: + description: "A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment." + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + description: The rating value of the fulfullment service. + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + state: + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - $ref: "#/components/schemas/Customer" + agent: + description: The agent that is currently handling the fulfillment of the order + allOf: + - $ref: "#/components/schemas/Agent" + contact: + $ref: "#/components/schemas/Contact" + vehicle: + $ref: "#/components/schemas/Vehicle" + stops: + description: The list of logical stops encountered during the fulfillment of an order. + type: array + items: + $ref: "#/components/schemas/Stop" + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + FulfillmentState: + description: Describes the state of fulfillment + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + Gps: + description: Describes a GPS coordinate + type: string + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + Image: + description: Describes an image + type: object + properties: + url: + description: URL to the image. This can be a data url or an remote url + type: string + format: uri + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + type: string + enum: + - xs + - sm + - md + - lg + - xl + - custom + width: + description: Width of the image in pixels + type: string + height: + description: Height of the image in pixels + type: string + Intent: + description: "The intent to get a Learning and Career Development Resources. The BAP can declare the intent of the consumer containing
  • What they want (scholarship, job, course etc)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + type: object + properties: + descriptor: + description: "A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object." + allOf: + - $ref: "#/components/schemas/Descriptor" + provider: + description: The provider from which the customer wants to place to the order from + allOf: + - $ref: "#/components/schemas/Provider" + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - $ref: "#/components/schemas/Fulfillment" + payment: + description: Details on how the customer wants to pay for the order + allOf: + - $ref: "#/components/schemas/Payment" + category: + description: Details on the item category + allOf: + - $ref: "#/components/schemas/Category" + offer: + description: details on the offer the customer wants to avail + allOf: + - $ref: "#/components/schemas/Offer" + item: + description: Details of the item that the consumer wants to order + allOf: + - $ref: "#/components/schemas/Item" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + ItemQuantity: + description: Describes the count or amount of an item + type: object + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + maximum: + description: This represents the maximum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: + $ref: "#/components/schemas/Scalar" + minimum: + description: This represents the minimum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + selected: + description: This represents the quantity selected for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: "#/components/schemas/Scalar" + Item: + description: "Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item." + type: object + properties: + id: + description: ID of the item. + type: string + parent_item_id: + description: "ID of the item, this item is a variant of" + allOf: + - $ref: "#/components/schemas/Item/properties/id" + parent_item_quantity: + description: The number of units of the parent item this item is a multiple of + allOf: + - $ref: "#/components/schemas/ItemQuantity" + descriptor: + description: Physical description of the item + allOf: + - $ref: "#/components/schemas/Descriptor" + creator: + description: The creator of this item + allOf: + - $ref: "#/components/schemas/Organization" + price: + description: "The price of this item, if it has intrinsic value" + allOf: + - $ref: "#/components/schemas/Price" + quantity: + description: The selling quantity of the item + allOf: + - $ref: "#/components/schemas/ItemQuantity" + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - $ref: "#/components/schemas/Category/properties/id" + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - $ref: "#/components/schemas/Fulfillment/properties/id" + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - $ref: "#/components/schemas/Location/properties/id" + payment_ids: + description: Payment modalities through which this item can be ordered + type: array + items: + allOf: + - $ref: "#/components/schemas/Payment/properties/id" + add_ons: + type: array + items: + $ref: "#/components/schemas/AddOn" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + description: Time within which refund will be processed after successful cancellation. + allOf: + - $ref: "#/components/schemas/Time" + refund_amount: + $ref: "#/components/schemas/Price" + replacement_terms: + description: Terms that are applicable be met when this item is replaced + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + xinput: + description: Additional input required from the customer to purchase / avail this item + allOf: + - $ref: "#/components/schemas/XInput" + time: + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + allOf: + - $ref: "#/components/schemas/Time" + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + matched: + description: Whether this item is an exact match of the request + type: boolean + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + recommended: + description: Whether this item is a recommended item to a response + type: boolean + ttl: + description: Time to live in seconds for an instance of this schema + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Location: + description: The physical location of something + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + type: string + format: uri + gps: + description: The GPS co-ordinates of this location. + allOf: + - $ref: "#/components/schemas/Gps" + address: + description: The address of this location. + allOf: + - $ref: "#/components/schemas/Address" + city: + description: "The city this location is, or is located within" + allOf: + - $ref: "#/components/schemas/City" + district: + description: "The state this location is, or is located within" + type: string + state: + description: "The state this location is, or is located within" + allOf: + - $ref: "#/components/schemas/State" + country: + description: "The country this location is, or is located within" + allOf: + - $ref: "#/components/schemas/Country" + area_code: + type: string + circle: + $ref: "#/components/schemas/Circle" + polygon: + description: The boundary polygon of this location + type: string + 3dspace: + description: The three dimensional region describing this location + type: string + rating: + description: The rating of this location + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + MediaFile: + description: This object contains a url to a media file. + type: object + properties: + mimetype: + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + type: string + url: + description: The URL of the file + type: string + format: uri + signature: + description: The digital signature of the file signed by the sender + type: string + dsa: + description: The signing algorithm used by the sender + type: string + Offer: + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + location_ids: + type: array + items: + $ref: "#/components/schemas/Location/properties/id" + category_ids: + type: array + items: + $ref: "#/components/schemas/Category/properties/id" + item_ids: + type: array + items: + $ref: "#/components/schemas/Item/properties/id" + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Option: + description: Describes a selectable option + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + Order: + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + type: object + properties: + id: + type: string + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + type: array + items: + type: string + description: ID of a previous order + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: + description: "This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level." + type: string + default: DEFAULT + enum: + - DRAFT + - DEFAULT + provider: + description: Details of the provider whose catalog items have been selected. + allOf: + - $ref: "#/components/schemas/Provider" + items: + description: The items purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/Item" + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/AddOn" + offers: + description: The offers applied in this order + type: array + items: + $ref: "#/components/schemas/Offer" + billing: + description: The billing details of this order + allOf: + - $ref: "#/components/schemas/Billing" + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: + $ref: "#/components/schemas/Fulfillment" + cancellation: + description: The cancellation details of this order + allOf: + - $ref: "#/components/schemas/Cancellation" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + $ref: "#/components/schemas/Item/properties/refund_terms/items" + replacement_terms: + description: Replacement terms of this item + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Return terms of this item + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - $ref: "#/components/schemas/Quotation" + payments: + description: The terms of settlement for this order + type: array + items: + $ref: "#/components/schemas/Payment" + created_at: + description: The date-time of creation of this order + type: string + format: date-time + updated_at: + description: The date-time of updated of this order + type: string + format: date-time + xinput: + description: Additional input required from the customer to confirm this order + allOf: + - $ref: "#/components/schemas/XInput" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Organization: + description: An organization. Usually a recognized business entity. + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + address: + description: The postal address of the organization + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the organization's address is registered + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the the organization's address is registered + allOf: + - $ref: "#/components/schemas/City" + contact: + $ref: "#/components/schemas/Contact" + Payment: + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + type: object + properties: + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + collected_by: + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + url: + type: string + description: "A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory." + format: uri + params: + type: object + properties: + transaction_id: + type: string + description: The reference transaction ID associated with a payment activity + amount: + type: string + currency: + type: string + bank_code: + type: string + bank_account_number: + type: string + virtual_payment_address: + type: string + source_bank_code: + type: string + source_bank_account_number: + type: string + source_virtual_payment_address: + type: string + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Person: + description: Describes a person as any individual + type: object + properties: + id: + type: string + description: Describes the identity of the person + url: + description: Profile url of the person + type: string + format: uri + name: + description: the name of the person + type: string + image: + $ref: "#/components/schemas/Image" + age: + description: Age of the person + allOf: + - $ref: "#/components/schemas/Duration" + dob: + description: Date of birth of the person + type: string + format: date + gender: + type: string + description: "Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy" + creds: + type: array + items: + $ref: "#/components/schemas/Credential" + languages: + type: array + items: + description: Describes a language known to the person. + type: object + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + properties: + code: + type: string + name: + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Price: + description: Describes the price of a product or service + type: object + properties: + currency: + type: string + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + listed_value: + $ref: "#/components/schemas/DecimalValue" + offered_value: + $ref: "#/components/schemas/DecimalValue" + minimum_value: + $ref: "#/components/schemas/DecimalValue" + maximum_value: + $ref: "#/components/schemas/DecimalValue" + Provider: + description: Describes the catalog of an entity, entitiy can be a scholarship facilitator, course provider etc + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: + $ref: "#/components/schemas/Descriptor" + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: + $ref: "#/components/schemas/Rating/properties/value" + time: + $ref: "#/components/schemas/Time" + categories: + type: array + items: + $ref: "#/components/schemas/Category" + fulfillments: + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + type: array + items: + $ref: "#/components/schemas/Payment" + locations: + type: array + items: + $ref: "#/components/schemas/Location" + offers: + type: array + items: + $ref: "#/components/schemas/Offer" + items: + type: array + items: + $ref: "#/components/schemas/Item" + exp: + type: string + description: Time after which catalog has to be refreshed + format: date-time + rateable: + description: Whether this provider can be rated or not + type: boolean + ttl: + description: "The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable." + type: integer + minimum: -1 + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Quotation: + description: "Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl" + type: object + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - $ref: "#/components/schemas/Price" + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: + $ref: "#/components/schemas/Item" + title: + type: string + price: + $ref: "#/components/schemas/Price" + ttl: + $ref: "#/components/schemas/Duration" + Rating: + description: Describes the rating of an entity + type: object + properties: + rating_category: + description: Category of the entity being rated + type: string + enum: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + id: + description: Id of the object being rated + type: string + value: + description: "Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||." + + ReplacementTerm: + description: The replacement policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + replace_within: + description: "Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement" + allOf: + - $ref: "#/components/schemas/Time" + external_ref: + $ref: "#/components/schemas/MediaFile" + + ReturnTerm: + description: Describes the return policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term IETF''s applicable. + allOf: + - $ref: "#/components/schemas/State" + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_time: + description: "Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund." + allOf: + - $ref: "#/components/schemas/Time" + return_location: + description: The location where the item or order must / will be returned to + allOf: + - $ref: "#/components/schemas/Location" + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + Scalar: + description: Describes a scalar + type: object + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + range: + type: object + properties: + min: + $ref: "#/components/schemas/DecimalValue" + max: + $ref: "#/components/schemas/DecimalValue" + unit: + type: string + Schedule: + description: "Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times" + type: object + properties: + frequency: + $ref: "#/components/schemas/Duration" + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + State: + description: A bounded geopolitical region of governance inside a country. + type: object + properties: + name: + type: string + description: Name of the state + code: + type: string + description: State code as per country or international standards + Stop: + description: A logical point in space and time during the fulfillment of an order. + type: object + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - $ref: "#/components/schemas/Location" + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + type: string + time: + description: Timings applicable at the stop. + allOf: + - $ref: "#/components/schemas/Time" + instructions: + description: Instructions that need to be followed at the stop + allOf: + - $ref: "#/components/schemas/Descriptor" + contact: + description: Contact details of the stop + allOf: + - $ref: "#/components/schemas/Contact" + person: + description: The details of the person present at the stop + allOf: + - $ref: "#/components/schemas/Person" + authorization: + $ref: "#/components/schemas/Authorization" + Support: + description: Details of customer support + type: object + properties: + ref_id: + type: string + callback_phone: + type: string + format: phone + phone: + type: string + format: phone + email: + type: string + format: email + url: + type: string + format: uri + Tag: + description: "Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service." + type: object + properties: + descriptor: + description: "Description of the Tag, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + display: + description: "This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value." + type: boolean + TagGroup: + description: "A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316" + type: object + properties: + display: + description: "Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search." + type: boolean + default: true + descriptor: + description: "Description of the TagGroup, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + list: + description: "An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema." + type: array + items: + $ref: "#/components/schemas/Tag" + Time: + description: Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations + type: object + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: + $ref: "#/components/schemas/Duration" + range: + type: object + properties: + start: + type: string + format: date-time + end: + type: string + format: date-time + days: + type: string + description: comma separated values representing days of the week + schedule: + $ref: "#/components/schemas/Schedule" + Tracking: + description: Describes a tracking object. it can be used to track the status of a service, i.e, a scholarship application, a course etc. + type: object + properties: + id: + description: A unique tracking reference number + type: string + url: + description: "A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data." + type: string + format: uri + location: + description: "In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API." + allOf: + - $ref: "#/components/schemas/Location" + status: + description: "This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order." + type: string + enum: + - active + - inactive + Vehicle: + description: "Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration" + type: object + properties: + category: + type: string + capacity: + type: integer + make: + type: string + model: + type: string + size: + type: string + variant: + type: string + color: + type: string + energy_type: + type: string + registration: + type: string + wheels_count: + type: string + cargo_volumne: + type: string + wheelchair_access: + type: string + code: + type: string + emission_standard: + type: string + XInput: + description: "Contains any additional or extended inputs required for the order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, A scholarship application may require additional details on the applicant as a proof of eligibility. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation." + type: object + properties: + form: + $ref: "#/components/schemas/Form" + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean diff --git a/layer2/samples/dsep_scholarships_1.1.0.yaml b/layer2/samples/dsep_scholarships_1.1.0.yaml new file mode 100644 index 0000000..bfac183 --- /dev/null +++ b/layer2/samples/dsep_scholarships_1.1.0.yaml @@ -0,0 +1,3063 @@ +openapi: 3.0.0 +info: + title: Decentralized Skilling and Education Protocol Specification + description: Adaptation of beckn protocol for the domain of skilling and education + version: 0.7.0 + +security: + - SubscriberAuth: [] + - GatewaySubscriberAuthNew: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: This allows a BAP to discover for catalogs offering
a) Jobs and Internships
b) Trainings and Courses
c) Mentors and Coaches and,
d) Scholarships and Grants + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + $ref: "#/components/schemas/Intent" + required: + - context + - message + examples: + Search for 'web design' jobs by category code in the region of Delhi: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + category: + descriptor: + name: Web design jobs + code: nic2008:62012 + Search for jobs by skills like carpentry and painting: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + fulfillment: + customer: + person: + skills: + - name: Painting + - name: Carpentry + tags: + - descriptor: + name: Competence + list: + - descriptor: + name: Experience + value: 12Y + + Search for jobs along with expected salary: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + fulfillment: + customer: + person: + skills: + - name: Java Programming + tags: + - descriptor: + name: Competence + list: + - descriptor: + name: Experience + value: 12Y + tags: + - descriptor: + name: Expectations + list: + - descriptor: + name: expected_payment + value: 250000INR/Month + + Search for jobs offered by a specific provider: + value: + context: + domain: jobs + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + intent: + provider: + descriptor: + name: Infosys + Search for online courses matching a specific topic: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + item: + descriptor: + name: AI basics + tags: + - descriptor: + name: course_labels + list: + - descriptor: + name: label_1 + value: AI + - descriptor: + name: label_2 + value: ML + - descriptor: + name: label_3 + value: beginners + - descriptor: + name: label_4 + value: Artifical Intelligence + - descriptor: + name: label_5 + value: machine learning + - descriptor: + name: label_6 + value: neural networks + fulfillment: + type: FULL-TIME + Search for BTech courses offered by an engineering instituition like IIT Delhi: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + provider: + descriptor: + name: IIT Delhi + tags: + - descriptor: + name: course_labels + list: + - descriptor: + name: label_1 + value: AI + - descriptor: + name: label_2 + value: ML + - descriptor: + name: label_3 + value: beginners + - descriptor: + name: label_4 + value: Artifical Intelligence + - descriptor: + name: label_5 + value: machine learning + - descriptor: + name: label_6 + value: neural networks + category: + descriptor: + name: B.Tech + code: BTECH + fulfillment: + type: FULL-TIME + Searching for a mentor by name: + value: + context: + domain: mentorship-and-coaching + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + fulfillment: + agent: + name: Dr Rajiv Manocha + Search for scholarships: + value: + context: + domain: mentorship + location: + city: + code: std:011 + country: + code: IND + action: search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/v0/ + bpp_id: https://mymentor.com/ + bpp_uri: https://api.mymentor.com/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + ttl: P10S + message: + intent: + category: + id: "4" + descriptor: + name: Engineering and Technology + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: API for Selecting items from the catalog. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: Fetch the latest order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /track: + post: + tags: + - Beckn Provider Platform (BPP) + description: Track an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - track + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + callback_url: + type: string + format: uri + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: Cancel an order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - cancel + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + cancellation_reason_id: + $ref: "#/components/schemas/Option/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + required: + - order_id + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /update: + post: + tags: + - Beckn Provider Platform (BPP) + description: Remove object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - update + required: + - action + message: + type: object + properties: + update_target: + description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' + type: string + order: + $ref: "#/components/schemas/Order" + required: + - update_target + - order + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /rating: + post: + tags: + - Beckn Provider Platform (BPP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - rating + required: + - action + message: + type: object + properties: + ratings: + type: array + items: + $ref: "#/components/schemas/Rating" + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /support: + post: + tags: + - Beckn Provider Platform (BPP) + description: Contact support + requestBody: + description: Contact support + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + required: + - context + - message + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /on_search: + post: + tags: + - Beckn App Platform (BAP) + - Beckn Gateway (BG) + description: Send catalog + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: "#/components/schemas/Catalog" + required: + - catalog + error: + $ref: "#/components/schemas/Error" + required: + - context + examples: + Publish a catalog of software jobs by a software agency: + value: + context: + domain: jobs:nic2008:62XXX + location: + city: + code: "*" + country: + code: IND + action: on_search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + bpp_id: https://naukri.com/ + bpp_uri: https://api.naukri.com/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + catalog: + descriptor: + name: Naukri Recruitment Platform + providers: + - descriptor: + name: Infosys + categories: + - id: "1" + name: Frontend Jobs + - id: "2" + name: Backend Jobs + items: + - descriptor: + name: Senior Software Developer + code: SSFD + fulfillment_ids: + - "1" + category_ids: + - "1" + matched: true + - descriptor: + name: Software Consultant - On site + code: SWCO + fulfillment_ids: + - "1" + category_ids: + - "1" + matched: "false" + - descriptor: + name: Software Consultant - Remote + code: SWCR + fulfillment_ids: + - "2" + category_ids: + - "2" + matched: "false" + fulfillments: + - id: "1" + descriptor: + name: Full-time + stops: + - location: + city: + code: BLR + - id: "2" + descriptor: + name: On-site + stops: + - location: + city: + code: BLR + type: start + time: + timestamp: "2022-08-10" + - location: + city: BLR + type: end + time: + timestamp: "2022-08-10" + - id: "3" + descriptor: + name: Remote + stops: + - time: + timestamp: "2022-08-10" + type: start + - time: + timestamp: "2022-08-10" + type: end + Publish a catalog of online courses: + value: + context: + domain: trainings-and-courses + location: + city: + code: std:011 + country: + code: IND + action: on_search + version: 1.1.0 + bap_id: https://exampleapp.io/ + bap_uri: https://api.exampleapp.io/uhi/v0/ + message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc + timestamp: "2021-03-23T10:00:40.065Z" + message: + catalog: + descriptor: + name: XAcademy + providers: + - descriptor: + name: XAcademy + categories: + - id: "1" + name: Software + - id: "2" + name: Management + items: + - id: "1" + descriptor: + name: Basics of AI + price: + value: "6000" + fulfillment_ids: + - "1" + category_ids: + - "1" + - id: "2" + descriptor: + name: AI for Data Analysis + price: + value: "7000" + fulfillment_ids: + - "1" + category_ids: + - "1" + fulfillments: + - id: "1" + type: ONLINE + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - context + /on_select: + post: + tags: + - Beckn App Platform (BAP) + description: Send draft order object with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_init: + post: + tags: + - Beckn App Platform (BAP) + description: Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_confirm: + post: + tags: + - Beckn App Platform (BAP) + description: Send active order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_track: + post: + tags: + - Beckn App Platform (BAP) + description: Send tracking details of an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_track + required: + - action + message: + type: object + properties: + tracking: + $ref: "#/components/schemas/Tracking" + required: + - tracking + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_cancel: + post: + tags: + - Beckn App Platform (BAP) + description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_cancel + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_update: + post: + tags: + - Beckn App Platform (BAP) + description: Returns updated service with updated runtime object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_update + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_status: + post: + tags: + - Beckn App Platform (BAP) + description: Fetch the status of a Service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_status + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_rating: + post: + tags: + - Beckn App Platform (BAP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_rating + required: + - action + message: + type: object + properties: + feedback_form: + description: A feedback form to allow the user to provide additional information on the rating provided + allOf: + - $ref: "#/components/schemas/XInput" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /on_support: + post: + tags: + - Beckn App Platform (BAP) + description: Contact Support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_cancellation_reasons: + post: + tags: + - BPP Meta APIs + description: Get cancellation reasons from the BPP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /cancellation_reasons: + post: + tags: + - BAP Meta APIs + description: Get cancellation reasons from the BPP + requestBody: + description: List of cancellation reasons + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + message: + type: object + properties: + cancellation_reasons: + type: array + items: + $ref: "#/components/schemas/Option" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_return_reasons: + post: + tags: + - BPP Meta APIs + description: Get return reasons from the BPP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /return_reasons: + post: + tags: + - BAP Meta APIs + description: Get return reasons from the BPP + requestBody: + description: List of return reasons + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + return_reasons: + type: array + items: + $ref: "#/components/schemas/Option" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /get_rating_categories: + post: + tags: + - BPP Meta APIs + description: Get a list of categories that can be rated by the BAP + requestBody: + description: Context header is sent as the request + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + + /rating_categories: + post: + tags: + - BAP Meta APIs + description: Get a list of categories that can be rated by the BAP + requestBody: + description: Array of categories which can be rated + content: + application/json: + schema: + type: object + properties: + context: + $ref: "#/components/schemas/Context" + rating_categories: + type: array + items: + $ref: "#/components/schemas/Rating/properties/rating_category" + responses: + "200": + description: Acknowledgement of message received + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + $ref: "#/components/schemas/Ack" + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message +components: + securitySchemes: + SubscriberAuth: + type: apiKey + in: header + name: Authorization + description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + GatewaySubscriberAuth: + type: apiKey + in: header + name: Proxy-Authorization + description: 'Signature of message body + BAP/BPP''s Authorization header using BG''s signing public key. Format:

Proxy-Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"

Note:This header will be deprecated soon and will no longer be supported in future releases. New implementors are requested to use the X-Gateway-Authorization header. Existing implementations are requested to migrate their header to the new header. The deprecation date will be set after discussion as per the standard specification governance process.

' + GatewaySubscriberAuthNew: + type: apiKey + in: header + name: X-Gateway-Authorization + description: 'Signature of message body + BAP/BPP''s Authorization header using BG''s signing public key. Format:

X-Gateway-Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + schemas: + Ack: + description: This describes an acknowledgement of receipt of a message. Upon receiving a message, the receiver must first authenticate the sender by verifying its digital signature. Upon successful verification of the signature, the receiver must validate the schema of the message. After performing both the operations, the receiver should send an Ack object in response. + type: object + properties: + status: + type: string + description: "Describe the status of the ACK response. If the message passes the acknowledgement criteria, then the receiver shouls set this value equal to ACK else it should be set to NACK" + enum: + - ACK + - NACK + tags: + description: A list of tags containing any additional information sent along with the Acknowledgement. + type: array + items: + $ref: "#/components/schemas/TagGroup" + AddOn: + description: This is typically an optional product or service that can be offered in addition to a product or a service of type Item. Objects of type AddOn should not exist without an associated Item. If a BAP receives an Item with an add-on, it must show it to the user as a selectable object. If any AddOn object is found without an associated Item object, then the validator must throw an error 'NO-PARENT=ITEM' with message 'No parent found' + type: object + properties: + id: + type: string + description: ID of the add-on as present in the source catalog + optional: + type: boolean + default: false + description: This value indicates if the add-on is optional or required to be selected by the user along with an Item. If this value is set to true, then the BAP must ensure that the add-on is mandatorily selected by the user while creating the Order object with the Item. + descriptor: + $ref: "#/components/schemas/Descriptor" + price: + $ref: "#/components/schemas/Price" + Address: + description: Describes a postal address. + type: string + Agent: + description: "Describes a person who fulfills this order." + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + organization: + $ref: "#/components/schemas/Organization" + rating: + $ref: "#/components/schemas/Rating/properties/value" + Authorization: + description: "Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation." + type: object + properties: + type: + description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. + type: string + token: + description: "Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering." + type: string + valid_from: + description: Timestamp in RFC3339 format from which token is valid + type: string + format: date-time + valid_to: + description: Timestamp in RFC3339 format until which token is valid + type: string + format: date-time + status: + description: Status of the token + type: string + Billing: + description: Describes the billing details of an order. This must be provided by BAP user before confirmation of the order. + type: object + properties: + name: + description: Name of the person under who's name the bill will be generated. + type: string + organization: + description: Name of the organization under who's name the bill will be generated. + allOf: + - $ref: "#/components/schemas/Organization" + address: + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the billable entity resides. This is important for state-level tax calculation + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the billable entity resides. + allOf: + - $ref: "#/components/schemas/City" + email: + description: Email address of the person / organization being billed. The BPP must send the bill to this email address. The format of the bill may be defined in the network policy. + type: string + format: email + phone: + description: Phone number of the person / organization being billed. The BPP must send the bill to this phone number as per the format specified in the network policy. In case the bill is a downloadable file, it is recommended the bill should be sent to the phone number as a downloadable link. + type: string + time: + $ref: "#/components/schemas/Time" + tax_id: + description: This is the identity of a Tax-paying person or an organization. This number can be provided to the BPP to avail tax benefits, if applicable. The format of this string should be specified in the network policy + type: string + created_at: + description: Date and time at which this bill was generated by the BPP. + type: string + format: date-time + + Cancellation: + description: Describes a cancellation event + type: object + properties: + time: + description: Date-time when the order was cancelled by the seeker + type: string + format: date-time + cancelled_by: + type: string + enum: + - SEEKER + - PROVIDER + reason: + description: The reason for cancellation + allOf: + - $ref: "#/components/schemas/Option" + additional_description: + description: Any additional information regarding the nature of cancellation + allOf: + - $ref: "#/components/schemas/Descriptor" + + CancellationTerm: + description: Describes the cancellation terms of an order, i.e, scholarship application, course etc. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean + cancel_by: + description: Information related to the time of cancellation. + allOf: + - $ref: "#/components/schemas/Time" + cancellation_fee: + $ref: "#/components/schemas/Fee" + xinput: + $ref: "#/components/schemas/XInput" + external_ref: + $ref: "#/components/schemas/MediaFile" + Catalog: + description: "Describes a skilling and education catalog" + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + type: array + items: + $ref: "#/components/schemas/Payment" + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + type: array + items: + $ref: "#/components/schemas/Offer" + providers: + type: array + items: + $ref: "#/components/schemas/Provider" + exp: + description: Timestamp after which catalog will expire + type: string + format: date-time + ttl: + description: Duration in seconds after which this catalog will expire + type: string + Category: + description: Describes a category + type: object + properties: + id: + type: string + description: Unique id of the category + parent_category_id: + $ref: "#/components/schemas/Category/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + time: + $ref: "#/components/schemas/Time" + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Circle: + description: Describes a circular area on the map + type: object + properties: + gps: + $ref: "#/components/schemas/Gps" + radius: + $ref: "#/components/schemas/Scalar" + City: + description: Describes a city + type: object + properties: + name: + type: string + description: Name of the city + code: + type: string + description: City code + Contact: + description: Describes the contact information of an entity + type: object + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + Context: + description: Describes a beckn message context + type: object + properties: + domain: + allOf: + - $ref: "#/components/schemas/Domain/properties/code" + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - $ref: "#/components/schemas/Location" + action: + type: string + description: Defines the Beckn API call type. + version: + type: string + description: Version of Beckn core API specification being used + bap_id: + type: string + description: Unique id of the BAP. By default it is the fully qualified domain name of the BAP + bap_uri: + type: string + format: uri + description: URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id + bpp_id: + type: string + description: Unique id of the BPP. By default it is the fully qualified domain name of the BPP + bpp_uri: + type: string + format: uri + description: URI of the BPP. Must have the same domain name as the bap_id + transaction_id: + type: string + format: uuid + description: This is a unique value which persists across all API calls from search through confirm + message_id: + type: string + format: uuid + description: This is a unique value which persists during a request / callback cycle + timestamp: + type: string + format: date-time + description: Time of request generation in RFC3339 format + key: + type: string + description: The encryption public key of the sender + ttl: + type: string + description: The duration in ISO8601 format after timestamp for which this message holds valid + Country: + description: Describes a country. + type: object + properties: + name: + type: string + description: Name of the country + code: + type: string + description: Country code as per ISO 3166-1 and ISO 3166-2 format + Credential: + description: Describes a credential of an entity - Person or Organization + type: object + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + Customer: + description: Describes a customer buying/availing a product or a service + type: object + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + Domain: + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + type: object + properties: + name: + description: Name of the domain + type: string + code: + description: "Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network." + additional_info: + description: A url that contains addtional information about that domain. + allOf: + - $ref: "#/components/schemas/MediaFile" + DecimalValue: + description: Describes a decimal value + type: string + pattern: "[+-]?([0-9]*[.])?[0-9]+" + Descriptor: + description: Physical description of something. + type: object + properties: + name: + type: string + code: + type: string + short_desc: + type: string + long_desc: + type: string + additional_desc: + type: object + properties: + url: + type: string + content_type: + type: string + enum: + - text/plain + - text/html + - application/json + media: + type: array + items: + $ref: "#/components/schemas/MediaFile" + images: + type: array + items: + $ref: "#/components/schemas/Image" + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + description: Describes an error object + type: object + properties: + type: + type: string + enum: + - CONTEXT-ERROR + - CORE-ERROR + - DOMAIN-ERROR + - POLICY-ERROR + - JSON-SCHEMA-ERROR + code: + type: string + description: "Beckn specific error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-RFC-005-ERROR-CODES-DRAFT-01.md of this repo" + path: + type: string + description: Path to json schema generating the error. Used only during json schema validation errors + message: + type: string + description: Human readable message describing the error + required: + - type + - code + Fee: + description: A fee applied on a particular entity + type: object + properties: + percentage: + description: Percentage of a value + allOf: + - $ref: "#/components/schemas/DecimalValue" + amount: + description: A fixed value + allOf: + - $ref: "#/components/schemas/Price" + Form: + description: Describes a form + type: object + properties: + url: + description: "The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form." + type: string + format: uri + data: + description: The form submission data + type: object + additionalProperties: + type: string + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + type: string + enum: + - text/html + - application/xml + submission_id: + type: string + format: uuid + Fulfillment: + description: Describes how a an order will be rendered/fulfilled to the end-customer + type: object + properties: + id: + description: Unique reference ID to the fulfillment of an order + type: string + type: + description: "A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment." + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + description: The rating value of the fulfullment service. + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + state: + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - $ref: "#/components/schemas/Customer" + agent: + description: The agent that is currently handling the fulfillment of the order + allOf: + - $ref: "#/components/schemas/Agent" + contact: + $ref: "#/components/schemas/Contact" + vehicle: + $ref: "#/components/schemas/Vehicle" + stops: + description: The list of logical stops encountered during the fulfillment of an order. + type: array + items: + $ref: "#/components/schemas/Stop" + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + FulfillmentState: + description: Describes the state of fulfillment + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + Gps: + description: Describes a GPS coordinate + type: string + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + Image: + description: Describes an image + type: object + properties: + url: + description: URL to the image. This can be a data url or an remote url + type: string + format: uri + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + type: string + enum: + - xs + - sm + - md + - lg + - xl + - custom + width: + description: Width of the image in pixels + type: string + height: + description: Height of the image in pixels + type: string + Intent: + description: "The intent to get a Learning and Career Development Resources. The BAP can declare the intent of the consumer containing
  • What they want (scholarship, job, course etc)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + type: object + properties: + descriptor: + description: "A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object." + allOf: + - $ref: "#/components/schemas/Descriptor" + provider: + description: The provider from which the customer wants to place to the order from + allOf: + - $ref: "#/components/schemas/Provider" + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - $ref: "#/components/schemas/Fulfillment" + payment: + description: Details on how the customer wants to pay for the order + allOf: + - $ref: "#/components/schemas/Payment" + category: + description: Details on the item category + allOf: + - $ref: "#/components/schemas/Category" + offer: + description: details on the offer the customer wants to avail + allOf: + - $ref: "#/components/schemas/Offer" + item: + description: Details of the item that the consumer wants to order + allOf: + - $ref: "#/components/schemas/Item" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + ItemQuantity: + description: Describes the count or amount of an item + type: object + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + maximum: + description: This represents the maximum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: + $ref: "#/components/schemas/Scalar" + minimum: + description: This represents the minimum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + selected: + description: This represents the quantity selected for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: "#/components/schemas/Scalar" + Item: + description: "Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item." + type: object + properties: + id: + description: ID of the item. + type: string + parent_item_id: + description: "ID of the item, this item is a variant of" + allOf: + - $ref: "#/components/schemas/Item/properties/id" + parent_item_quantity: + description: The number of units of the parent item this item is a multiple of + allOf: + - $ref: "#/components/schemas/ItemQuantity" + descriptor: + description: Physical description of the item + allOf: + - $ref: "#/components/schemas/Descriptor" + creator: + description: The creator of this item + allOf: + - $ref: "#/components/schemas/Organization" + price: + description: "The price of this item, if it has intrinsic value" + allOf: + - $ref: "#/components/schemas/Price" + quantity: + description: The selling quantity of the item + allOf: + - $ref: "#/components/schemas/ItemQuantity" + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - $ref: "#/components/schemas/Category/properties/id" + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - $ref: "#/components/schemas/Fulfillment/properties/id" + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - $ref: "#/components/schemas/Location/properties/id" + payment_ids: + description: Payment modalities through which this item can be ordered + type: array + items: + allOf: + - $ref: "#/components/schemas/Payment/properties/id" + add_ons: + type: array + items: + $ref: "#/components/schemas/AddOn" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + description: Time within which refund will be processed after successful cancellation. + allOf: + - $ref: "#/components/schemas/Time" + refund_amount: + $ref: "#/components/schemas/Price" + replacement_terms: + description: Terms that are applicable be met when this item is replaced + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + xinput: + description: Additional input required from the customer to purchase / avail this item + allOf: + - $ref: "#/components/schemas/XInput" + time: + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + allOf: + - $ref: "#/components/schemas/Time" + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + matched: + description: Whether this item is an exact match of the request + type: boolean + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + recommended: + description: Whether this item is a recommended item to a response + type: boolean + ttl: + description: Time to live in seconds for an instance of this schema + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Location: + description: The physical location of something + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + type: string + format: uri + gps: + description: The GPS co-ordinates of this location. + allOf: + - $ref: "#/components/schemas/Gps" + address: + description: The address of this location. + allOf: + - $ref: "#/components/schemas/Address" + city: + description: "The city this location is, or is located within" + allOf: + - $ref: "#/components/schemas/City" + district: + description: "The state this location is, or is located within" + type: string + state: + description: "The state this location is, or is located within" + allOf: + - $ref: "#/components/schemas/State" + country: + description: "The country this location is, or is located within" + allOf: + - $ref: "#/components/schemas/Country" + area_code: + type: string + circle: + $ref: "#/components/schemas/Circle" + polygon: + description: The boundary polygon of this location + type: string + 3dspace: + description: The three dimensional region describing this location + type: string + rating: + description: The rating of this location + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + MediaFile: + description: This object contains a url to a media file. + type: object + properties: + mimetype: + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + type: string + url: + description: The URL of the file + type: string + format: uri + signature: + description: The digital signature of the file signed by the sender + type: string + dsa: + description: The signing algorithm used by the sender + type: string + Offer: + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + location_ids: + type: array + items: + $ref: "#/components/schemas/Location/properties/id" + category_ids: + type: array + items: + $ref: "#/components/schemas/Category/properties/id" + item_ids: + type: array + items: + $ref: "#/components/schemas/Item/properties/id" + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Option: + description: Describes a selectable option + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + Order: + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + type: object + properties: + id: + type: string + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + type: array + items: + type: string + description: ID of a previous order + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: + description: "This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level." + type: string + default: DEFAULT + enum: + - DRAFT + - DEFAULT + provider: + description: Details of the provider whose catalog items have been selected. + allOf: + - $ref: "#/components/schemas/Provider" + items: + description: The items purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/Item" + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/AddOn" + offers: + description: The offers applied in this order + type: array + items: + $ref: "#/components/schemas/Offer" + billing: + description: The billing details of this order + allOf: + - $ref: "#/components/schemas/Billing" + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: + $ref: "#/components/schemas/Fulfillment" + cancellation: + description: The cancellation details of this order + allOf: + - $ref: "#/components/schemas/Cancellation" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + $ref: "#/components/schemas/Item/properties/refund_terms/items" + replacement_terms: + description: Replacement terms of this item + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Return terms of this item + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - $ref: "#/components/schemas/Quotation" + payments: + description: The terms of settlement for this order + type: array + items: + $ref: "#/components/schemas/Payment" + created_at: + description: The date-time of creation of this order + type: string + format: date-time + updated_at: + description: The date-time of updated of this order + type: string + format: date-time + xinput: + description: Additional input required from the customer to confirm this order + allOf: + - $ref: "#/components/schemas/XInput" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Organization: + description: An organization. Usually a recognized business entity. + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + address: + description: The postal address of the organization + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the organization's address is registered + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the the organization's address is registered + allOf: + - $ref: "#/components/schemas/City" + contact: + $ref: "#/components/schemas/Contact" + Payment: + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + type: object + properties: + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + collected_by: + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + url: + type: string + description: "A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory." + format: uri + params: + type: object + properties: + transaction_id: + type: string + description: The reference transaction ID associated with a payment activity + amount: + type: string + currency: + type: string + bank_code: + type: string + bank_account_number: + type: string + virtual_payment_address: + type: string + source_bank_code: + type: string + source_bank_account_number: + type: string + source_virtual_payment_address: + type: string + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Person: + description: Describes a person as any individual + type: object + properties: + id: + type: string + description: Describes the identity of the person + url: + description: Profile url of the person + type: string + format: uri + name: + description: the name of the person + type: string + image: + $ref: "#/components/schemas/Image" + age: + description: Age of the person + allOf: + - $ref: "#/components/schemas/Duration" + dob: + description: Date of birth of the person + type: string + format: date + gender: + type: string + description: "Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy" + creds: + type: array + items: + $ref: "#/components/schemas/Credential" + languages: + type: array + items: + description: Describes a language known to the person. + type: object + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + properties: + code: + type: string + name: + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Price: + description: Describes the price of a product or service + type: object + properties: + currency: + type: string + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + listed_value: + $ref: "#/components/schemas/DecimalValue" + offered_value: + $ref: "#/components/schemas/DecimalValue" + minimum_value: + $ref: "#/components/schemas/DecimalValue" + maximum_value: + $ref: "#/components/schemas/DecimalValue" + Provider: + description: Describes the catalog of an entity, entitiy can be a scholarship facilitator, course provider etc + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: + $ref: "#/components/schemas/Descriptor" + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: + $ref: "#/components/schemas/Rating/properties/value" + time: + $ref: "#/components/schemas/Time" + categories: + type: array + items: + $ref: "#/components/schemas/Category" + fulfillments: + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + type: array + items: + $ref: "#/components/schemas/Payment" + locations: + type: array + items: + $ref: "#/components/schemas/Location" + offers: + type: array + items: + $ref: "#/components/schemas/Offer" + items: + type: array + items: + $ref: "#/components/schemas/Item" + exp: + type: string + description: Time after which catalog has to be refreshed + format: date-time + rateable: + description: Whether this provider can be rated or not + type: boolean + ttl: + description: "The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable." + type: integer + minimum: -1 + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Quotation: + description: "Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl" + type: object + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - $ref: "#/components/schemas/Price" + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: + $ref: "#/components/schemas/Item" + title: + type: string + price: + $ref: "#/components/schemas/Price" + ttl: + $ref: "#/components/schemas/Duration" + Rating: + description: Describes the rating of an entity + type: object + properties: + rating_category: + description: Category of the entity being rated + type: string + enum: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + id: + description: Id of the object being rated + type: string + value: + description: "Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||." + + ReplacementTerm: + description: The replacement policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + replace_within: + description: "Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement" + allOf: + - $ref: "#/components/schemas/Time" + external_ref: + $ref: "#/components/schemas/MediaFile" + + ReturnTerm: + description: Describes the return policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term IETF''s applicable. + allOf: + - $ref: "#/components/schemas/State" + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_time: + description: "Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund." + allOf: + - $ref: "#/components/schemas/Time" + return_location: + description: The location where the item or order must / will be returned to + allOf: + - $ref: "#/components/schemas/Location" + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + Scalar: + description: Describes a scalar + type: object + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + range: + type: object + properties: + min: + $ref: "#/components/schemas/DecimalValue" + max: + $ref: "#/components/schemas/DecimalValue" + unit: + type: string + Schedule: + description: "Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times" + type: object + properties: + frequency: + $ref: "#/components/schemas/Duration" + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + State: + description: A bounded geopolitical region of governance inside a country. + type: object + properties: + name: + type: string + description: Name of the state + code: + type: string + description: State code as per country or international standards + Stop: + description: A logical point in space and time during the fulfillment of an order. + type: object + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - $ref: "#/components/schemas/Location" + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + type: string + time: + description: Timings applicable at the stop. + allOf: + - $ref: "#/components/schemas/Time" + instructions: + description: Instructions that need to be followed at the stop + allOf: + - $ref: "#/components/schemas/Descriptor" + contact: + description: Contact details of the stop + allOf: + - $ref: "#/components/schemas/Contact" + person: + description: The details of the person present at the stop + allOf: + - $ref: "#/components/schemas/Person" + authorization: + $ref: "#/components/schemas/Authorization" + Support: + description: Details of customer support + type: object + properties: + ref_id: + type: string + callback_phone: + type: string + format: phone + phone: + type: string + format: phone + email: + type: string + format: email + url: + type: string + format: uri + Tag: + description: "Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service." + type: object + properties: + descriptor: + description: "Description of the Tag, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + display: + description: "This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value." + type: boolean + TagGroup: + description: "A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316" + type: object + properties: + display: + description: "Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search." + type: boolean + default: true + descriptor: + description: "Description of the TagGroup, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + list: + description: "An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema." + type: array + items: + $ref: "#/components/schemas/Tag" + Time: + description: Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations + type: object + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: + $ref: "#/components/schemas/Duration" + range: + type: object + properties: + start: + type: string + format: date-time + end: + type: string + format: date-time + days: + type: string + description: comma separated values representing days of the week + schedule: + $ref: "#/components/schemas/Schedule" + Tracking: + description: Describes a tracking object. it can be used to track the status of a service, i.e, a scholarship application, a course etc. + type: object + properties: + id: + description: A unique tracking reference number + type: string + url: + description: "A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data." + type: string + format: uri + location: + description: "In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API." + allOf: + - $ref: "#/components/schemas/Location" + status: + description: "This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order." + type: string + enum: + - active + - inactive + Vehicle: + description: "Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration" + type: object + properties: + category: + type: string + capacity: + type: integer + make: + type: string + model: + type: string + size: + type: string + variant: + type: string + color: + type: string + energy_type: + type: string + registration: + type: string + wheels_count: + type: string + cargo_volumne: + type: string + wheelchair_access: + type: string + code: + type: string + emission_standard: + type: string + XInput: + description: "Contains any additional or extended inputs required for the order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, A scholarship application may require additional details on the applicant as a proof of eligibility. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation." + type: object + properties: + form: + $ref: "#/components/schemas/Form" + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean diff --git a/layer2/samples/mobility_1.1.0.yaml b/layer2/samples/mobility_1.1.0.yaml new file mode 100644 index 0000000..b3ae63c --- /dev/null +++ b/layer2/samples/mobility_1.1.0.yaml @@ -0,0 +1,2164 @@ +openapi: 3.0.0 +info: + title: Beckn Protocol Core + description: retail layer 2 config from core yaml + version: 1.1.0 +security: + - SubscriberAuth: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: BAP declares the customer's intent to buy/avail products or services + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + $ref: "#/components/schemas/Intent" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: BAP declares the customer's cart (or equivalent) created by selecting objects from the catalog + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: "#/components/schemas/Ack" + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: Fetch the latest order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /track: + post: + tags: + - Beckn Provider Platform (BPP) + description: Track an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - track + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + callback_url: + type: string + format: uri + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: Cancel an order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - cancel + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + cancellation_reason_id: + $ref: "#/components/schemas/Option/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /update: + post: + tags: + - Beckn Provider Platform (BPP) + description: Remove object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - update + required: + - action + message: + type: object + properties: + update_target: + description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' + type: string + order: + description: Updated order object + allOf: + - $ref: "#/components/schemas/Order" + required: + - update_target + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /rating: + post: + tags: + - Beckn Provider Platform (BPP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - rating + required: + - action + message: + type: object + properties: + ratings: + type: array + items: + $ref: "#/components/schemas/Rating" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /support: + post: + tags: + - Beckn Provider Platform (BPP) + description: Contact support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_search: + post: + tags: + - Beckn Application Platform (BAP) + - Beckn Gateway (BG) + description: BPP sends its catalog in response to a search request. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: "#/components/schemas/Catalog" + required: + - catalog + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_select: + post: + tags: + - Beckn Application Platform (BAP) + description: Send draft order object with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_init: + post: + tags: + - Beckn Application Platform (BAP) + description: Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_confirm: + post: + tags: + - Beckn Application Platform (BAP) + description: Send active order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_track: + post: + tags: + - Beckn Application Platform (BAP) + description: Send tracking details of an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_track + required: + - action + message: + type: object + properties: + tracking: + $ref: "#/components/schemas/Tracking" + required: + - tracking + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_cancel: + post: + tags: + - Beckn Application Platform (BAP) + description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_cancel + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_update: + post: + tags: + - Beckn Application Platform (BAP) + description: Returns updated service with updated runtime object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_update + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_status: + post: + tags: + - Beckn Application Platform (BAP) + description: Fetch the status of a Service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_status + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_rating: + post: + tags: + - Beckn Application Platform (BAP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_rating + required: + - action + message: + type: object + properties: + feedback_form: + description: A feedback form to allow the user to provide additional information on the rating provided + allOf: + - $ref: "#/components/schemas/XInput" + error: + $ref: "#/components/schemas/Error" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_support: + post: + tags: + - Beckn Application Platform (BAP) + description: Contact Support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" +components: + securitySchemes: + SubscriberAuth: + type: apiKey + in: header + name: Authorization + description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + schemas: + Ack: + description: "Describes the acknowledgement sent in response to an API call. If the implementation uses HTTP/S, then Ack must be returned in the same session. Every API call to a BPP must be responded to with an Ack whether the BPP intends to respond with a callback or not. This has one property called `status` that indicates the status of the Acknowledgement." + type: object + properties: + status: + type: string + description: "The status of the acknowledgement. If the request passes the validation criteria of the BPP, then this is set to ACK. If a BPP responds with status = `ACK` to a request, it is required to respond with a callback. If the request fails the validation criteria, then this is set to NACK. Additionally, if a BPP does not intend to respond with a callback even after the request meets the validation criteria, it should set this value to `NACK`." + enum: + - ACK + - NACK + tags: + description: A list of tags containing any additional information sent along with the Acknowledgement. + type: array + items: + $ref: "#/components/schemas/TagGroup" + AddOn: + description: Describes an additional item offered as a value-addition to a product or service. This does not exist independently in a catalog and is always associated with an item. + type: object + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + price: + $ref: "#/components/schemas/Price" + Address: + description: Describes a postal address. + type: string + Agent: + description: "Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor's name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride." + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + organization: + $ref: "#/components/schemas/Organization" + rating: + $ref: "#/components/schemas/Rating/properties/value" + Authorization: + description: "Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation." + type: object + properties: + type: + description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. + type: string + token: + description: "Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering." + type: string + valid_from: + description: Timestamp in RFC3339 format from which token is valid + type: string + format: date-time + valid_to: + description: Timestamp in RFC3339 format until which token is valid + type: string + format: date-time + status: + description: Status of the token + type: string + Billing: + description: "Describes the billing details of an entity.
This has properties like name,organization,address,email,phone,time,tax_number, created_at,updated_at" + type: object + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - $ref: "#/components/schemas/Organization" + address: + description: The address of the billable entity + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the billable entity resides. This is important for state-level tax calculation + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the billable entity resides. + allOf: + - $ref: "#/components/schemas/City" + email: + description: Email address where the bill is sent to + type: string + format: email + phone: + description: Phone number of the billable entity + type: string + time: + description: Details regarding the billing period + allOf: + - $ref: "#/components/schemas/Time" + tax_id: + description: ID of the billable entity as recognized by the taxation authority + type: string + Cancellation: + description: Describes a cancellation event + type: object + properties: + time: + description: Date-time when the order was cancelled by the buyer + type: string + format: date-time + cancelled_by: + type: string + enum: + - CONSUMER + - PROVIDER + reason: + description: The reason for cancellation + allOf: + - $ref: "#/components/schemas/Option" + additional_description: + description: Any additional information regarding the nature of cancellation + allOf: + - $ref: "#/components/schemas/Descriptor" + CancellationTerm: + description: Describes the cancellation terms of an item or an order. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean + cancel_by: + description: Information related to the time of cancellation. + allOf: + - $ref: "#/components/schemas/Time" + cancellation_fee: + $ref: "#/components/schemas/Fee" + xinput: + $ref: "#/components/schemas/XInput" + external_ref: + $ref: "#/components/schemas/MediaFile" + Catalog: + description: "Describes the products or services offered by a BPP. This is typically sent as the response to a search intent from a BAP. The payment terms, offers and terms of fulfillment supported by the BPP can also be included here. The BPP can show hierarchical nature of products/services in its catalog using the parent_category_id in categories. The BPP can also send a ttl (time to live) in the context which is the duration for which a BAP can cache the catalog and use the cached catalog.
This has properties like bbp/descriptor,bbp/categories,bbp/fulfillments,bbp/payments,bbp/offers,bbp/providers and exp
This is used in the following situations.
  • This is typically used in the discovery stage when the BPP sends the details of the products and services it offers as response to a search intent from the BAP.
" + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + type: array + items: + $ref: "#/components/schemas/Payment" + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + type: array + items: + $ref: "#/components/schemas/Offer" + providers: + type: array + items: + $ref: "#/components/schemas/Provider" + exp: + description: Timestamp after which catalog will expire + type: string + format: date-time + ttl: + description: Duration in seconds after which this catalog will expire + type: string + Category: + description: A label under which a collection of items can be grouped. + type: object + properties: + id: + description: ID of the category + type: string + parent_category_id: + $ref: "#/components/schemas/Category/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + time: + $ref: "#/components/schemas/Time" + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Circle: + description: Describes a circular region of a specified radius centered at a specified GPS coordinate. + type: object + properties: + gps: + $ref: "#/components/schemas/Gps" + radius: + $ref: "#/components/schemas/Scalar" + City: + description: Describes a city + type: object + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + Contact: + description: Describes the contact information of an entity + type: object + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + Context: + description: "Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer's location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform's ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver's endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions," + type: object + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - $ref: "#/components/schemas/Domain/properties/code" + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - $ref: "#/components/schemas/Location" + action: + description: The Beckn protocol method being called by the sender and executed at the receiver. + type: string + version: + type: string + description: Version of transaction protocol being used by the sender. + bap_id: + description: Subscriber ID of the BAP + allOf: + - description: "A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform." + type: string + bap_uri: + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + allOf: + - description: The callback URL of the Subscriber. This should necessarily contain the same domain name as set in `subscriber_id``. + type: string + format: uri + bpp_id: + description: Subscriber ID of the BPP + allOf: + - $ref: "#/components/schemas/Context/properties/bap_id/allOf/0" + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - $ref: "#/components/schemas/Context/properties/bap_uri/allOf/0" + transaction_id: + description: "This is a unique value which persists across all API calls from `search` through `confirm`. This is done to indicate an active user session across multiple requests. The BPPs can use this value to push personalized recommendations, and dynamic offerings related to an ongoing transaction despite being unaware of the user active on the BAP." + type: string + format: uuid + message_id: + description: "This is a unique value which persists during a request / callback cycle. Since beckn protocol APIs are asynchronous, BAPs need a common value to match an incoming callback from a BPP to an earlier call. This value can also be used to ignore duplicate messages coming from the BPP. It is recommended to generate a fresh message_id for every new interaction. When sending unsolicited callbacks, BPPs must generate a new message_id." + type: string + format: uuid + timestamp: + description: Time of request generation in RFC3339 format + type: string + format: date-time + key: + description: The encryption public key of the sender + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this message holds valid + type: string + Country: + description: Describes a country + type: object + properties: + name: + type: string + description: Name of the country + code: + type: string + description: Country code as per ISO 3166-1 and ISO 3166-2 format + Credential: + description: Describes a credential of an entity - Person or Organization + type: object + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + Customer: + description: Describes a customer buying/availing a product or a service + type: object + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + DecimalValue: + description: Describes a numerical value in decimal form + type: string + pattern: "[+-]?([0-9]*[.])?[0-9]+" + Descriptor: + description: Physical description of something. + type: object + properties: + name: + type: string + code: + type: string + short_desc: + type: string + long_desc: + type: string + additional_desc: + type: object + properties: + url: + type: string + content_type: + type: string + enum: + - text/plain + - text/html + - application/json + media: + type: array + items: + $ref: "#/components/schemas/MediaFile" + images: + type: array + items: + $ref: "#/components/schemas/Image" + Domain: + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + type: object + properties: + name: + description: Name of the domain + type: string + code: + description: "Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network." + additional_info: + description: A url that contains addtional information about that domain. + allOf: + - $ref: "#/components/schemas/MediaFile" + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + description: "Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback." + type: object + properties: + code: + type: string + description: 'Standard error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo"' + paths: + type: string + description: Path to json schema generating the error. Used only during json schema validation errors + message: + type: string + description: Human readable message describing the error. Used mainly for logging. Not recommended to be shown to the user. + Fee: + description: A fee applied on a particular entity + type: object + properties: + percentage: + description: Percentage of a value + allOf: + - $ref: "#/components/schemas/DecimalValue" + amount: + description: A fixed value + allOf: + - $ref: "#/components/schemas/Price" + Form: + description: Describes a form + type: object + properties: + url: + description: "The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form." + type: string + format: uri + data: + description: The form submission data + type: object + additionalProperties: + type: string + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + type: string + enum: + - text/html + - application/xml + submission_id: + type: string + format: uuid + Fulfillment: + description: Describes how a an order will be rendered/fulfilled to the end-customer + type: object + properties: + id: + description: Unique reference ID to the fulfillment of an order + type: string + type: + description: "A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment." + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + description: The rating value of the fulfullment service. + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + state: + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - $ref: "#/components/schemas/Customer" + agent: + description: The agent that is currently handling the fulfillment of the order + allOf: + - $ref: "#/components/schemas/Agent" + contact: + $ref: "#/components/schemas/Contact" + vehicle: + $ref: "#/components/schemas/Vehicle" + stops: + description: The list of logical stops encountered during the fulfillment of an order. + type: array + items: + $ref: "#/components/schemas/Stop" + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + FulfillmentState: + description: Describes the state of fulfillment + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + Gps: + description: Describes a GPS coordinate + type: string + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + Image: + description: Describes an image + type: object + properties: + url: + description: URL to the image. This can be a data url or an remote url + type: string + format: uri + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + type: string + enum: + - xs + - sm + - md + - lg + - xl + - custom + width: + description: Width of the image in pixels + type: string + height: + description: Height of the image in pixels + type: string + Intent: + description: "The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + type: object + properties: + descriptor: + description: "A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object." + allOf: + - $ref: "#/components/schemas/Descriptor" + provider: + description: The provider from which the customer wants to place to the order from + allOf: + - $ref: "#/components/schemas/Provider" + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - $ref: "#/components/schemas/Fulfillment" + payment: + description: Details on how the customer wants to pay for the order + allOf: + - $ref: "#/components/schemas/Payment" + category: + description: Details on the item category + allOf: + - $ref: "#/components/schemas/Category" + offer: + description: details on the offer the customer wants to avail + allOf: + - $ref: "#/components/schemas/Offer" + item: + description: Details of the item that the consumer wants to order + allOf: + - $ref: "#/components/schemas/Item" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + ItemQuantity: + description: Describes the count or amount of an item + type: object + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + maximum: + description: This represents the maximum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: + $ref: "#/components/schemas/Scalar" + minimum: + description: This represents the minimum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + selected: + description: This represents the quantity selected for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: "#/components/schemas/Scalar" + Item: + description: "Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item." + type: object + properties: + id: + description: ID of the item. + type: string + parent_item_id: + description: "ID of the item, this item is a variant of" + allOf: + - $ref: "#/components/schemas/Item/properties/id" + parent_item_quantity: + description: The number of units of the parent item this item is a multiple of + allOf: + - $ref: "#/components/schemas/ItemQuantity" + descriptor: + description: Physical description of the item + allOf: + - $ref: "#/components/schemas/Descriptor" + creator: + description: The creator of this item + allOf: + - $ref: "#/components/schemas/Organization" + price: + description: "The price of this item, if it has intrinsic value" + allOf: + - $ref: "#/components/schemas/Price" + quantity: + description: The selling quantity of the item + allOf: + - $ref: "#/components/schemas/ItemQuantity" + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - $ref: "#/components/schemas/Category/properties/id" + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - $ref: "#/components/schemas/Fulfillment/properties/id" + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - $ref: "#/components/schemas/Location/properties/id" + payment_ids: + description: Payment modalities through which this item can be ordered + type: array + items: + allOf: + - $ref: "#/components/schemas/Payment/properties/id" + add_ons: + type: array + items: + $ref: "#/components/schemas/AddOn" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + description: Time within which refund will be processed after successful cancellation. + allOf: + - $ref: "#/components/schemas/Time" + refund_amount: + $ref: "#/components/schemas/Price" + replacement_terms: + description: Terms that are applicable be met when this item is replaced + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + xinput: + description: Additional input required from the customer to purchase / avail this item + allOf: + - $ref: "#/components/schemas/XInput" + time: + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + allOf: + - $ref: "#/components/schemas/Time" + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + matched: + description: Whether this item is an exact match of the request + type: boolean + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + recommended: + description: Whether this item is a recommended item to a response + type: boolean + ttl: + description: Time to live in seconds for an instance of this schema + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Location: + description: The physical location of something + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + type: string + format: uri + gps: + description: The GPS co-ordinates of this location. + allOf: + - $ref: "#/components/schemas/Gps" + address: + description: The address of this location. + allOf: + - $ref: "#/components/schemas/Address" + city: + description: "The city this location is, or is located within" + allOf: + - $ref: "#/components/schemas/City" + district: + description: "The state this location is, or is located within" + type: string + state: + description: "The state this location is, or is located within" + allOf: + - $ref: "#/components/schemas/State" + country: + description: "The country this location is, or is located within" + allOf: + - $ref: "#/components/schemas/Country" + area_code: + type: string + circle: + $ref: "#/components/schemas/Circle" + polygon: + description: The boundary polygon of this location + type: string + 3dspace: + description: The three dimensional region describing this location + type: string + rating: + description: The rating of this location + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + MediaFile: + description: This object contains a url to a media file. + type: object + properties: + mimetype: + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + type: string + url: + description: The URL of the file + type: string + format: uri + signature: + description: The digital signature of the file signed by the sender + type: string + dsa: + description: The signing algorithm used by the sender + type: string + Offer: + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + location_ids: + type: array + items: + $ref: "#/components/schemas/Location/properties/id" + category_ids: + type: array + items: + $ref: "#/components/schemas/Category/properties/id" + item_ids: + type: array + items: + $ref: "#/components/schemas/Item/properties/id" + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Option: + description: Describes a selectable option + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + Order: + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + type: object + properties: + id: + type: string + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + type: array + items: + type: string + description: ID of a previous order + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: + description: "This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level." + type: string + default: DEFAULT + enum: + - DRAFT + - DEFAULT + provider: + description: Details of the provider whose catalog items have been selected. + allOf: + - $ref: "#/components/schemas/Provider" + items: + description: The items purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/Item" + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/AddOn" + offers: + description: The offers applied in this order + type: array + items: + $ref: "#/components/schemas/Offer" + billing: + description: The billing details of this order + allOf: + - $ref: "#/components/schemas/Billing" + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: + $ref: "#/components/schemas/Fulfillment" + cancellation: + description: The cancellation details of this order + allOf: + - $ref: "#/components/schemas/Cancellation" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + $ref: "#/components/schemas/Item/properties/refund_terms/items" + replacement_terms: + description: Replacement terms of this item + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Return terms of this item + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - $ref: "#/components/schemas/Quotation" + payments: + description: The terms of settlement for this order + type: array + items: + $ref: "#/components/schemas/Payment" + created_at: + description: The date-time of creation of this order + type: string + format: date-time + updated_at: + description: The date-time of updated of this order + type: string + format: date-time + xinput: + description: Additional input required from the customer to confirm this order + allOf: + - $ref: "#/components/schemas/XInput" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Organization: + description: An organization. Usually a recognized business entity. + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + address: + description: The postal address of the organization + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the organization's address is registered + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the the organization's address is registered + allOf: + - $ref: "#/components/schemas/City" + contact: + $ref: "#/components/schemas/Contact" + Payment: + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + type: object + properties: + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + collected_by: + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + url: + type: string + description: "A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory." + format: uri + params: + type: object + properties: + transaction_id: + type: string + description: The reference transaction ID associated with a payment activity + amount: + type: string + currency: + type: string + bank_code: + type: string + bank_account_number: + type: string + virtual_payment_address: + type: string + source_bank_code: + type: string + source_bank_account_number: + type: string + source_virtual_payment_address: + type: string + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Person: + description: Describes a person as any individual + type: object + properties: + id: + type: string + description: Describes the identity of the person + url: + description: Profile url of the person + type: string + format: uri + name: + description: the name of the person + type: string + image: + $ref: "#/components/schemas/Image" + age: + description: Age of the person + allOf: + - $ref: "#/components/schemas/Duration" + dob: + description: Date of birth of the person + type: string + format: date + gender: + type: string + description: "Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy" + creds: + type: array + items: + $ref: "#/components/schemas/Credential" + languages: + type: array + items: + description: Describes a language known to the person. + type: object + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + properties: + code: + type: string + name: + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Price: + description: Describes the price of a product or service + type: object + properties: + currency: + type: string + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + listed_value: + $ref: "#/components/schemas/DecimalValue" + offered_value: + $ref: "#/components/schemas/DecimalValue" + minimum_value: + $ref: "#/components/schemas/DecimalValue" + maximum_value: + $ref: "#/components/schemas/DecimalValue" + Provider: + description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: + $ref: "#/components/schemas/Descriptor" + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: + $ref: "#/components/schemas/Rating/properties/value" + time: + $ref: "#/components/schemas/Time" + categories: + type: array + items: + $ref: "#/components/schemas/Category" + fulfillments: + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + type: array + items: + $ref: "#/components/schemas/Payment" + locations: + type: array + items: + $ref: "#/components/schemas/Location" + offers: + type: array + items: + $ref: "#/components/schemas/Offer" + items: + type: array + items: + $ref: "#/components/schemas/Item" + exp: + type: string + description: Time after which catalog has to be refreshed + format: date-time + rateable: + description: Whether this provider can be rated or not + type: boolean + ttl: + description: "The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable." + type: integer + minimum: -1 + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Quotation: + description: "Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl" + type: object + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - $ref: "#/components/schemas/Price" + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: + $ref: "#/components/schemas/Item" + title: + type: string + price: + $ref: "#/components/schemas/Price" + ttl: + $ref: "#/components/schemas/Duration" + Rating: + description: Describes the rating of an entity + type: object + properties: + rating_category: + description: Category of the entity being rated + type: string + enum: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + id: + description: Id of the object being rated + type: string + value: + description: "Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||." + type: string + Region: + description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. + type: object + properties: + dimensions: + description: "The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services." + type: string + enum: + - "1" + - "2" + - "3" + type: + description: "The type of region. This is used to specify the granularity of the region represented by this object. Various examples of two-dimensional region types are city, country, state, district, and so on. The network policy should contain a list of all possible region types supported by the network." + type: string + name: + type: string + description: Name of the region as specified on the map where that region exists. + code: + type: string + description: A standard code representing the region. This should be interpreted in the same way by all network participants. + boundary: + type: string + description: "A string representing the boundary of the region. One-dimensional regions are represented by polylines. Two-dimensional regions are represented by polygons, and three-dimensional regions can represented by polyhedra." + map_url: + type: string + description: The url to the map of the region. This can be a globally recognized map or the one specified by the network policy. + ReplacementTerm: + description: The replacement policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + replace_within: + description: "Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement" + allOf: + - $ref: "#/components/schemas/Time" + external_ref: + $ref: "#/components/schemas/MediaFile" + ReturnTerm: + description: Describes the return policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term IETF''s applicable. + allOf: + - $ref: "#/components/schemas/State" + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_time: + description: "Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund." + allOf: + - $ref: "#/components/schemas/Time" + return_location: + description: The location where the item or order must / will be returned to + allOf: + - $ref: "#/components/schemas/Location" + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + Scalar: + description: Describes a scalar + type: object + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + range: + type: object + properties: + min: + $ref: "#/components/schemas/DecimalValue" + max: + $ref: "#/components/schemas/DecimalValue" + unit: + type: string + Schedule: + description: "Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times" + type: object + properties: + frequency: + $ref: "#/components/schemas/Duration" + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + State: + description: A bounded geopolitical region of governance inside a country. + type: object + properties: + name: + type: string + description: Name of the state + code: + type: string + description: State code as per country or international standards + Stop: + description: A logical point in space and time during the fulfillment of an order. + type: object + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - $ref: "#/components/schemas/Location" + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + type: string + time: + description: Timings applicable at the stop. + allOf: + - $ref: "#/components/schemas/Time" + instructions: + description: Instructions that need to be followed at the stop + allOf: + - $ref: "#/components/schemas/Descriptor" + contact: + description: Contact details of the stop + allOf: + - $ref: "#/components/schemas/Contact" + person: + description: The details of the person present at the stop + allOf: + - $ref: "#/components/schemas/Person" + authorization: + $ref: "#/components/schemas/Authorization" + Support: + description: Details of customer support + type: object + properties: + ref_id: + type: string + callback_phone: + type: string + format: phone + phone: + type: string + format: phone + email: + type: string + format: email + url: + type: string + format: uri + Tag: + description: "Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service." + type: object + properties: + descriptor: + description: "Description of the Tag, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + display: + description: "This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value." + type: boolean + TagGroup: + description: "A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316" + type: object + properties: + display: + description: "Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search." + type: boolean + default: true + descriptor: + description: "Description of the TagGroup, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + list: + description: "An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema." + type: array + items: + $ref: "#/components/schemas/Tag" + Time: + description: "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations
This has properties like label, time stamp,duration,range, days, schedule" + type: object + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: + $ref: "#/components/schemas/Duration" + range: + type: object + properties: + start: + type: string + format: date-time + end: + type: string + format: date-time + days: + type: string + description: comma separated values representing days of the week + schedule: + $ref: "#/components/schemas/Schedule" + Tracking: + description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. + type: object + properties: + id: + description: A unique tracking reference number + type: string + url: + description: "A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data." + type: string + format: uri + location: + description: "In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API." + allOf: + - $ref: "#/components/schemas/Location" + status: + description: "This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order." + type: string + enum: + - active + - inactive + Vehicle: + description: "Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration" + type: object + properties: + category: + type: string + capacity: + type: integer + make: + type: string + model: + type: string + size: + type: string + variant: + type: string + color: + type: string + energy_type: + type: string + registration: + type: string + wheels_count: + type: string + cargo_volumne: + type: string + wheelchair_access: + type: string + code: + type: string + emission_standard: + type: string + XInput: + description: "Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation." + type: object + properties: + form: + $ref: "#/components/schemas/Form" + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean diff --git a/layer2/samples/retail_1.1.0.yaml b/layer2/samples/retail_1.1.0.yaml new file mode 100644 index 0000000..e57689e --- /dev/null +++ b/layer2/samples/retail_1.1.0.yaml @@ -0,0 +1,2164 @@ +openapi: 3.0.0 +info: + title: Beckn for Local Retail + description: Adaptation of beckn protocol for the local retail domain + version: 1.1.0 +security: + - SubscriberAuth: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: BAP declares the customer's intent to buy products from retail providers + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + $ref: "#/components/schemas/Intent" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: BAP declares the customer's cart (or equivalent) created by selecting objects from the catalog + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: "#/components/schemas/Ack" + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: Fetch the latest order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /track: + post: + tags: + - Beckn Provider Platform (BPP) + description: Track an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - track + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + callback_url: + type: string + format: uri + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: Cancel an order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - cancel + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + cancellation_reason_id: + $ref: "#/components/schemas/Option/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /update: + post: + tags: + - Beckn Provider Platform (BPP) + description: Remove object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - update + required: + - action + message: + type: object + properties: + update_target: + description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' + type: string + order: + description: Updated order object + allOf: + - $ref: "#/components/schemas/Order" + required: + - update_target + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /rating: + post: + tags: + - Beckn Provider Platform (BPP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - rating + required: + - action + message: + type: object + properties: + ratings: + type: array + items: + $ref: "#/components/schemas/Rating" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /support: + post: + tags: + - Beckn Provider Platform (BPP) + description: Contact support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_search: + post: + tags: + - Beckn Application Platform (BAP) + - Beckn Gateway (BG) + description: BPP sends its catalog in response to a search request. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: "#/components/schemas/Catalog" + required: + - catalog + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_select: + post: + tags: + - Beckn Application Platform (BAP) + description: Send draft order object with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_init: + post: + tags: + - Beckn Application Platform (BAP) + description: Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_confirm: + post: + tags: + - Beckn Application Platform (BAP) + description: Send active order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_track: + post: + tags: + - Beckn Application Platform (BAP) + description: Send tracking details of an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_track + required: + - action + message: + type: object + properties: + tracking: + $ref: "#/components/schemas/Tracking" + required: + - tracking + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_cancel: + post: + tags: + - Beckn Application Platform (BAP) + description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_cancel + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_update: + post: + tags: + - Beckn Application Platform (BAP) + description: Returns updated service with updated runtime object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_update + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_status: + post: + tags: + - Beckn Application Platform (BAP) + description: Fetch the status of a Service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_status + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_rating: + post: + tags: + - Beckn Application Platform (BAP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_rating + required: + - action + message: + type: object + properties: + feedback_form: + description: A feedback form to allow the user to provide additional information on the rating provided + allOf: + - $ref: "#/components/schemas/XInput" + error: + $ref: "#/components/schemas/Error" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_support: + post: + tags: + - Beckn Application Platform (BAP) + description: Contact Support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" +components: + securitySchemes: + SubscriberAuth: + type: apiKey + in: header + name: Authorization + description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + schemas: + Ack: + description: "Describes the acknowledgement sent in response to an API call. If the implementation uses HTTP/S, then Ack must be returned in the same session. Every API call to a BPP must be responded to with an Ack whether the BPP intends to respond with a callback or not. This has one property called `status` that indicates the status of the Acknowledgement." + type: object + properties: + status: + type: string + description: "The status of the acknowledgement. If the request passes the validation criteria of the BPP, then this is set to ACK. If a BPP responds with status = `ACK` to a request, it is required to respond with a callback. If the request fails the validation criteria, then this is set to NACK. Additionally, if a BPP does not intend to respond with a callback even after the request meets the validation criteria, it should set this value to `NACK`." + enum: + - ACK + - NACK + tags: + description: A list of tags containing any additional information sent along with the Acknowledgement. + type: array + items: + $ref: "#/components/schemas/TagGroup" + AddOn: + description: Describes an additional item offered as a value-addition to a product or service. This does not exist independently in a catalog and is always associated with an item. + type: object + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + price: + $ref: "#/components/schemas/Price" + Address: + description: Describes a postal address. + type: string + Agent: + description: "Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor's name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride." + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + organization: + $ref: "#/components/schemas/Organization" + rating: + $ref: "#/components/schemas/Rating/properties/value" + Authorization: + description: "Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation." + type: object + properties: + type: + description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. + type: string + token: + description: "Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering." + type: string + valid_from: + description: Timestamp in RFC3339 format from which token is valid + type: string + format: date-time + valid_to: + description: Timestamp in RFC3339 format until which token is valid + type: string + format: date-time + status: + description: Status of the token + type: string + Billing: + description: "Describes the billing details of an entity.
This has properties like name,organization,address,email,phone,time,tax_number, created_at,updated_at" + type: object + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - $ref: "#/components/schemas/Organization" + address: + description: The address of the billable entity + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the billable entity resides. This is important for state-level tax calculation + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the billable entity resides. + allOf: + - $ref: "#/components/schemas/City" + email: + description: Email address where the bill is sent to + type: string + format: email + phone: + description: Phone number of the billable entity + type: string + time: + description: Details regarding the billing period + allOf: + - $ref: "#/components/schemas/Time" + tax_id: + description: ID of the billable entity as recognized by the taxation authority + type: string + Cancellation: + description: Describes a cancellation event + type: object + properties: + time: + description: Date-time when the order was cancelled by the buyer + type: string + format: date-time + cancelled_by: + type: string + enum: + - CONSUMER + - PROVIDER + reason: + description: The reason for cancellation + allOf: + - $ref: "#/components/schemas/Option" + additional_description: + description: Any additional information regarding the nature of cancellation + allOf: + - $ref: "#/components/schemas/Descriptor" + CancellationTerm: + description: Describes the cancellation terms of an item or an order. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean + cancel_by: + description: Information related to the time of cancellation. + allOf: + - $ref: "#/components/schemas/Time" + cancellation_fee: + $ref: "#/components/schemas/Fee" + xinput: + $ref: "#/components/schemas/XInput" + external_ref: + $ref: "#/components/schemas/MediaFile" + Catalog: + description: "Describes the products or services offered by a BPP. This is typically sent as the response to a search intent from a BAP. The payment terms, offers and terms of fulfillment supported by the BPP can also be included here. The BPP can show hierarchical nature of products/services in its catalog using the parent_category_id in categories. The BPP can also send a ttl (time to live) in the context which is the duration for which a BAP can cache the catalog and use the cached catalog.
This has properties like bbp/descriptor,bbp/categories,bbp/fulfillments,bbp/payments,bbp/offers,bbp/providers and exp
This is used in the following situations.
  • This is typically used in the discovery stage when the BPP sends the details of the products and services it offers as response to a search intent from the BAP.
" + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + type: array + items: + $ref: "#/components/schemas/Payment" + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + type: array + items: + $ref: "#/components/schemas/Offer" + providers: + type: array + items: + $ref: "#/components/schemas/Provider" + exp: + description: Timestamp after which catalog will expire + type: string + format: date-time + ttl: + description: Duration in seconds after which this catalog will expire + type: string + Category: + description: A label under which a collection of items can be grouped. + type: object + properties: + id: + description: ID of the category + type: string + parent_category_id: + $ref: "#/components/schemas/Category/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + time: + $ref: "#/components/schemas/Time" + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Circle: + description: Describes a circular region of a specified radius centered at a specified GPS coordinate. + type: object + properties: + gps: + $ref: "#/components/schemas/Gps" + radius: + $ref: "#/components/schemas/Scalar" + City: + description: Describes a city + type: object + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + Contact: + description: Describes the contact information of an entity + type: object + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + Context: + description: "Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer's location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform's ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver's endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions," + type: object + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - $ref: "#/components/schemas/Domain/properties/code" + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - $ref: "#/components/schemas/Location" + action: + description: The Beckn protocol method being called by the sender and executed at the receiver. + type: string + version: + type: string + description: Version of transaction protocol being used by the sender. + bap_id: + description: Subscriber ID of the BAP + allOf: + - description: "A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform." + type: string + bap_uri: + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + allOf: + - description: The callback URL of the Subscriber. This should necessarily contain the same domain name as set in `subscriber_id``. + type: string + format: uri + bpp_id: + description: Subscriber ID of the BPP + allOf: + - $ref: "#/components/schemas/Context/properties/bap_id/allOf/0" + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - $ref: "#/components/schemas/Context/properties/bap_uri/allOf/0" + transaction_id: + description: "This is a unique value which persists across all API calls from `search` through `confirm`. This is done to indicate an active user session across multiple requests. The BPPs can use this value to push personalized recommendations, and dynamic offerings related to an ongoing transaction despite being unaware of the user active on the BAP." + type: string + format: uuid + message_id: + description: "This is a unique value which persists during a request / callback cycle. Since beckn protocol APIs are asynchronous, BAPs need a common value to match an incoming callback from a BPP to an earlier call. This value can also be used to ignore duplicate messages coming from the BPP. It is recommended to generate a fresh message_id for every new interaction. When sending unsolicited callbacks, BPPs must generate a new message_id." + type: string + format: uuid + timestamp: + description: Time of request generation in RFC3339 format + type: string + format: date-time + key: + description: The encryption public key of the sender + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this message holds valid + type: string + Country: + description: Describes a country + type: object + properties: + name: + type: string + description: Name of the country + code: + type: string + description: Country code as per ISO 3166-1 and ISO 3166-2 format + Credential: + description: Describes a credential of an entity - Person or Organization + type: object + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + Customer: + description: Describes a customer buying/availing a product or a service + type: object + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + DecimalValue: + description: Describes a numerical value in decimal form + type: string + pattern: "[+-]?([0-9]*[.])?[0-9]+" + Descriptor: + description: Physical description of something. + type: object + properties: + name: + type: string + code: + type: string + short_desc: + type: string + long_desc: + type: string + additional_desc: + type: object + properties: + url: + type: string + content_type: + type: string + enum: + - text/plain + - text/html + - application/json + media: + type: array + items: + $ref: "#/components/schemas/MediaFile" + images: + type: array + items: + $ref: "#/components/schemas/Image" + Domain: + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + type: object + properties: + name: + description: Name of the domain + type: string + code: + description: "Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network." + additional_info: + description: A url that contains addtional information about that domain. + allOf: + - $ref: "#/components/schemas/MediaFile" + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + description: "Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback." + type: object + properties: + code: + type: string + description: 'Standard error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo"' + paths: + type: string + description: Path to json schema generating the error. Used only during json schema validation errors + message: + type: string + description: Human readable message describing the error. Used mainly for logging. Not recommended to be shown to the user. + Fee: + description: A fee applied on a particular entity + type: object + properties: + percentage: + description: Percentage of a value + allOf: + - $ref: "#/components/schemas/DecimalValue" + amount: + description: A fixed value + allOf: + - $ref: "#/components/schemas/Price" + Form: + description: Describes a form + type: object + properties: + url: + description: "The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form." + type: string + format: uri + data: + description: The form submission data + type: object + additionalProperties: + type: string + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + type: string + enum: + - text/html + - application/xml + submission_id: + type: string + format: uuid + Fulfillment: + description: Describes how a an order will be rendered/fulfilled to the end-customer + type: object + properties: + id: + description: Unique reference ID to the fulfillment of an order + type: string + type: + description: "A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment." + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + description: The rating value of the fulfullment service. + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + state: + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - $ref: "#/components/schemas/Customer" + agent: + description: The agent that is currently handling the fulfillment of the order + allOf: + - $ref: "#/components/schemas/Agent" + contact: + $ref: "#/components/schemas/Contact" + vehicle: + $ref: "#/components/schemas/Vehicle" + stops: + description: The list of logical stops encountered during the fulfillment of an order. + type: array + items: + $ref: "#/components/schemas/Stop" + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + FulfillmentState: + description: Describes the state of fulfillment + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + Gps: + description: Describes a GPS coordinate + type: string + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + Image: + description: Describes an image + type: object + properties: + url: + description: URL to the image. This can be a data url or an remote url + type: string + format: uri + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + type: string + enum: + - xs + - sm + - md + - lg + - xl + - custom + width: + description: Width of the image in pixels + type: string + height: + description: Height of the image in pixels + type: string + Intent: + description: "The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + type: object + properties: + descriptor: + description: "A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object." + allOf: + - $ref: "#/components/schemas/Descriptor" + provider: + description: The provider from which the customer wants to place to the order from + allOf: + - $ref: "#/components/schemas/Provider" + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - $ref: "#/components/schemas/Fulfillment" + payment: + description: Details on how the customer wants to pay for the order + allOf: + - $ref: "#/components/schemas/Payment" + category: + description: Details on the item category + allOf: + - $ref: "#/components/schemas/Category" + offer: + description: details on the offer the customer wants to avail + allOf: + - $ref: "#/components/schemas/Offer" + item: + description: Details of the item that the consumer wants to order + allOf: + - $ref: "#/components/schemas/Item" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + ItemQuantity: + description: Describes the count or amount of an item + type: object + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + maximum: + description: This represents the maximum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: + $ref: "#/components/schemas/Scalar" + minimum: + description: This represents the minimum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + selected: + description: This represents the quantity selected for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: "#/components/schemas/Scalar" + Item: + description: "Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item." + type: object + properties: + id: + description: ID of the item. + type: string + parent_item_id: + description: "ID of the item, this item is a variant of" + allOf: + - $ref: "#/components/schemas/Item/properties/id" + parent_item_quantity: + description: The number of units of the parent item this item is a multiple of + allOf: + - $ref: "#/components/schemas/ItemQuantity" + descriptor: + description: Physical description of the item + allOf: + - $ref: "#/components/schemas/Descriptor" + creator: + description: The creator of this item + allOf: + - $ref: "#/components/schemas/Organization" + price: + description: "The price of this item, if it has intrinsic value" + allOf: + - $ref: "#/components/schemas/Price" + quantity: + description: The selling quantity of the item + allOf: + - $ref: "#/components/schemas/ItemQuantity" + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - $ref: "#/components/schemas/Category/properties/id" + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - $ref: "#/components/schemas/Fulfillment/properties/id" + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - $ref: "#/components/schemas/Location/properties/id" + payment_ids: + description: Payment modalities through which this item can be ordered + type: array + items: + allOf: + - $ref: "#/components/schemas/Payment/properties/id" + add_ons: + type: array + items: + $ref: "#/components/schemas/AddOn" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + description: Time within which refund will be processed after successful cancellation. + allOf: + - $ref: "#/components/schemas/Time" + refund_amount: + $ref: "#/components/schemas/Price" + replacement_terms: + description: Terms that are applicable be met when this item is replaced + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + xinput: + description: Additional input required from the customer to purchase / avail this item + allOf: + - $ref: "#/components/schemas/XInput" + time: + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + allOf: + - $ref: "#/components/schemas/Time" + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + matched: + description: Whether this item is an exact match of the request + type: boolean + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + recommended: + description: Whether this item is a recommended item to a response + type: boolean + ttl: + description: Time to live in seconds for an instance of this schema + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Location: + description: The physical location of something + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + type: string + format: uri + gps: + description: The GPS co-ordinates of this location. + allOf: + - $ref: "#/components/schemas/Gps" + address: + description: The address of this location. + allOf: + - $ref: "#/components/schemas/Address" + city: + description: "The city this location is, or is located within" + allOf: + - $ref: "#/components/schemas/City" + district: + description: "The state this location is, or is located within" + type: string + state: + description: "The state this location is, or is located within" + allOf: + - $ref: "#/components/schemas/State" + country: + description: "The country this location is, or is located within" + allOf: + - $ref: "#/components/schemas/Country" + area_code: + type: string + circle: + $ref: "#/components/schemas/Circle" + polygon: + description: The boundary polygon of this location + type: string + 3dspace: + description: The three dimensional region describing this location + type: string + rating: + description: The rating of this location + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + MediaFile: + description: This object contains a url to a media file. + type: object + properties: + mimetype: + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + type: string + url: + description: The URL of the file + type: string + format: uri + signature: + description: The digital signature of the file signed by the sender + type: string + dsa: + description: The signing algorithm used by the sender + type: string + Offer: + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + location_ids: + type: array + items: + $ref: "#/components/schemas/Location/properties/id" + category_ids: + type: array + items: + $ref: "#/components/schemas/Category/properties/id" + item_ids: + type: array + items: + $ref: "#/components/schemas/Item/properties/id" + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Option: + description: Describes a selectable option + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + Order: + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + type: object + properties: + id: + type: string + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + type: array + items: + type: string + description: ID of a previous order + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: + description: "This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level." + type: string + default: DEFAULT + enum: + - DRAFT + - DEFAULT + provider: + description: Details of the provider whose catalog items have been selected. + allOf: + - $ref: "#/components/schemas/Provider" + items: + description: The items purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/Item" + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/AddOn" + offers: + description: The offers applied in this order + type: array + items: + $ref: "#/components/schemas/Offer" + billing: + description: The billing details of this order + allOf: + - $ref: "#/components/schemas/Billing" + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: + $ref: "#/components/schemas/Fulfillment" + cancellation: + description: The cancellation details of this order + allOf: + - $ref: "#/components/schemas/Cancellation" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + $ref: "#/components/schemas/Item/properties/refund_terms/items" + replacement_terms: + description: Replacement terms of this item + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Return terms of this item + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - $ref: "#/components/schemas/Quotation" + payments: + description: The terms of settlement for this order + type: array + items: + $ref: "#/components/schemas/Payment" + created_at: + description: The date-time of creation of this order + type: string + format: date-time + updated_at: + description: The date-time of updated of this order + type: string + format: date-time + xinput: + description: Additional input required from the customer to confirm this order + allOf: + - $ref: "#/components/schemas/XInput" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Organization: + description: An organization. Usually a recognized business entity. + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + address: + description: The postal address of the organization + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the organization's address is registered + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the the organization's address is registered + allOf: + - $ref: "#/components/schemas/City" + contact: + $ref: "#/components/schemas/Contact" + Payment: + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + type: object + properties: + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + collected_by: + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + url: + type: string + description: "A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory." + format: uri + params: + type: object + properties: + transaction_id: + type: string + description: The reference transaction ID associated with a payment activity + amount: + type: string + currency: + type: string + bank_code: + type: string + bank_account_number: + type: string + virtual_payment_address: + type: string + source_bank_code: + type: string + source_bank_account_number: + type: string + source_virtual_payment_address: + type: string + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Person: + description: Describes a person as any individual + type: object + properties: + id: + type: string + description: Describes the identity of the person + url: + description: Profile url of the person + type: string + format: uri + name: + description: the name of the person + type: string + image: + $ref: "#/components/schemas/Image" + age: + description: Age of the person + allOf: + - $ref: "#/components/schemas/Duration" + dob: + description: Date of birth of the person + type: string + format: date + gender: + type: string + description: "Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy" + creds: + type: array + items: + $ref: "#/components/schemas/Credential" + languages: + type: array + items: + description: Describes a language known to the person. + type: object + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + properties: + code: + type: string + name: + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Price: + description: Describes the price of a product or service + type: object + properties: + currency: + type: string + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + listed_value: + $ref: "#/components/schemas/DecimalValue" + offered_value: + $ref: "#/components/schemas/DecimalValue" + minimum_value: + $ref: "#/components/schemas/DecimalValue" + maximum_value: + $ref: "#/components/schemas/DecimalValue" + Provider: + description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: + $ref: "#/components/schemas/Descriptor" + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: + $ref: "#/components/schemas/Rating/properties/value" + time: + $ref: "#/components/schemas/Time" + categories: + type: array + items: + $ref: "#/components/schemas/Category" + fulfillments: + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + type: array + items: + $ref: "#/components/schemas/Payment" + locations: + type: array + items: + $ref: "#/components/schemas/Location" + offers: + type: array + items: + $ref: "#/components/schemas/Offer" + items: + type: array + items: + $ref: "#/components/schemas/Item" + exp: + type: string + description: Time after which catalog has to be refreshed + format: date-time + rateable: + description: Whether this provider can be rated or not + type: boolean + ttl: + description: "The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable." + type: integer + minimum: -1 + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Quotation: + description: "Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl" + type: object + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - $ref: "#/components/schemas/Price" + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: + $ref: "#/components/schemas/Item" + title: + type: string + price: + $ref: "#/components/schemas/Price" + ttl: + $ref: "#/components/schemas/Duration" + Rating: + description: Describes the rating of an entity + type: object + properties: + rating_category: + description: Category of the entity being rated + type: string + enum: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + id: + description: Id of the object being rated + type: string + value: + description: "Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||." + type: string + Region: + description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. + type: object + properties: + dimensions: + description: "The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services." + type: string + enum: + - "1" + - "2" + - "3" + type: + description: "The type of region. This is used to specify the granularity of the region represented by this object. Various examples of two-dimensional region types are city, country, state, district, and so on. The network policy should contain a list of all possible region types supported by the network." + type: string + name: + type: string + description: Name of the region as specified on the map where that region exists. + code: + type: string + description: A standard code representing the region. This should be interpreted in the same way by all network participants. + boundary: + type: string + description: "A string representing the boundary of the region. One-dimensional regions are represented by polylines. Two-dimensional regions are represented by polygons, and three-dimensional regions can represented by polyhedra." + map_url: + type: string + description: The url to the map of the region. This can be a globally recognized map or the one specified by the network policy. + ReplacementTerm: + description: The replacement policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + replace_within: + description: "Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement" + allOf: + - $ref: "#/components/schemas/Time" + external_ref: + $ref: "#/components/schemas/MediaFile" + ReturnTerm: + description: Describes the return policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term IETF''s applicable. + allOf: + - $ref: "#/components/schemas/State" + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_time: + description: "Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund." + allOf: + - $ref: "#/components/schemas/Time" + return_location: + description: The location where the item or order must / will be returned to + allOf: + - $ref: "#/components/schemas/Location" + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + Scalar: + description: Describes a scalar + type: object + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + range: + type: object + properties: + min: + $ref: "#/components/schemas/DecimalValue" + max: + $ref: "#/components/schemas/DecimalValue" + unit: + type: string + Schedule: + description: "Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times" + type: object + properties: + frequency: + $ref: "#/components/schemas/Duration" + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + State: + description: A bounded geopolitical region of governance inside a country. + type: object + properties: + name: + type: string + description: Name of the state + code: + type: string + description: State code as per country or international standards + Stop: + description: A logical point in space and time during the fulfillment of an order. + type: object + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - $ref: "#/components/schemas/Location" + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + type: string + time: + description: Timings applicable at the stop. + allOf: + - $ref: "#/components/schemas/Time" + instructions: + description: Instructions that need to be followed at the stop + allOf: + - $ref: "#/components/schemas/Descriptor" + contact: + description: Contact details of the stop + allOf: + - $ref: "#/components/schemas/Contact" + person: + description: The details of the person present at the stop + allOf: + - $ref: "#/components/schemas/Person" + authorization: + $ref: "#/components/schemas/Authorization" + Support: + description: Details of customer support + type: object + properties: + ref_id: + type: string + callback_phone: + type: string + format: phone + phone: + type: string + format: phone + email: + type: string + format: email + url: + type: string + format: uri + Tag: + description: "Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service." + type: object + properties: + descriptor: + description: "Description of the Tag, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + display: + description: "This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value." + type: boolean + TagGroup: + description: "A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316" + type: object + properties: + display: + description: "Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search." + type: boolean + default: true + descriptor: + description: "Description of the TagGroup, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + list: + description: "An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema." + type: array + items: + $ref: "#/components/schemas/Tag" + Time: + description: "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations
This has properties like label, time stamp,duration,range, days, schedule" + type: object + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: + $ref: "#/components/schemas/Duration" + range: + type: object + properties: + start: + type: string + format: date-time + end: + type: string + format: date-time + days: + type: string + description: comma separated values representing days of the week + schedule: + $ref: "#/components/schemas/Schedule" + Tracking: + description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. + type: object + properties: + id: + description: A unique tracking reference number + type: string + url: + description: "A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data." + type: string + format: uri + location: + description: "In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API." + allOf: + - $ref: "#/components/schemas/Location" + status: + description: "This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order." + type: string + enum: + - active + - inactive + Vehicle: + description: "Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration" + type: object + properties: + category: + type: string + capacity: + type: integer + make: + type: string + model: + type: string + size: + type: string + variant: + type: string + color: + type: string + energy_type: + type: string + registration: + type: string + wheels_count: + type: string + cargo_volumne: + type: string + wheelchair_access: + type: string + code: + type: string + emission_standard: + type: string + XInput: + description: "Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation." + type: object + properties: + form: + $ref: "#/components/schemas/Form" + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean diff --git a/layer2/samples/retail_1.1.0_1.1.0.yaml b/layer2/samples/retail_1.1.0_1.1.0.yaml new file mode 100644 index 0000000..e57689e --- /dev/null +++ b/layer2/samples/retail_1.1.0_1.1.0.yaml @@ -0,0 +1,2164 @@ +openapi: 3.0.0 +info: + title: Beckn for Local Retail + description: Adaptation of beckn protocol for the local retail domain + version: 1.1.0 +security: + - SubscriberAuth: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: BAP declares the customer's intent to buy products from retail providers + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + $ref: "#/components/schemas/Intent" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: BAP declares the customer's cart (or equivalent) created by selecting objects from the catalog + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: "#/components/schemas/Ack" + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: Fetch the latest order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /track: + post: + tags: + - Beckn Provider Platform (BPP) + description: Track an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - track + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + callback_url: + type: string + format: uri + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: Cancel an order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - cancel + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + cancellation_reason_id: + $ref: "#/components/schemas/Option/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /update: + post: + tags: + - Beckn Provider Platform (BPP) + description: Remove object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - update + required: + - action + message: + type: object + properties: + update_target: + description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' + type: string + order: + description: Updated order object + allOf: + - $ref: "#/components/schemas/Order" + required: + - update_target + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /rating: + post: + tags: + - Beckn Provider Platform (BPP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - rating + required: + - action + message: + type: object + properties: + ratings: + type: array + items: + $ref: "#/components/schemas/Rating" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /support: + post: + tags: + - Beckn Provider Platform (BPP) + description: Contact support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_search: + post: + tags: + - Beckn Application Platform (BAP) + - Beckn Gateway (BG) + description: BPP sends its catalog in response to a search request. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: "#/components/schemas/Catalog" + required: + - catalog + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_select: + post: + tags: + - Beckn Application Platform (BAP) + description: Send draft order object with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_init: + post: + tags: + - Beckn Application Platform (BAP) + description: Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_confirm: + post: + tags: + - Beckn Application Platform (BAP) + description: Send active order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_track: + post: + tags: + - Beckn Application Platform (BAP) + description: Send tracking details of an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_track + required: + - action + message: + type: object + properties: + tracking: + $ref: "#/components/schemas/Tracking" + required: + - tracking + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_cancel: + post: + tags: + - Beckn Application Platform (BAP) + description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_cancel + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_update: + post: + tags: + - Beckn Application Platform (BAP) + description: Returns updated service with updated runtime object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_update + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_status: + post: + tags: + - Beckn Application Platform (BAP) + description: Fetch the status of a Service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_status + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_rating: + post: + tags: + - Beckn Application Platform (BAP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_rating + required: + - action + message: + type: object + properties: + feedback_form: + description: A feedback form to allow the user to provide additional information on the rating provided + allOf: + - $ref: "#/components/schemas/XInput" + error: + $ref: "#/components/schemas/Error" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_support: + post: + tags: + - Beckn Application Platform (BAP) + description: Contact Support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" +components: + securitySchemes: + SubscriberAuth: + type: apiKey + in: header + name: Authorization + description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + schemas: + Ack: + description: "Describes the acknowledgement sent in response to an API call. If the implementation uses HTTP/S, then Ack must be returned in the same session. Every API call to a BPP must be responded to with an Ack whether the BPP intends to respond with a callback or not. This has one property called `status` that indicates the status of the Acknowledgement." + type: object + properties: + status: + type: string + description: "The status of the acknowledgement. If the request passes the validation criteria of the BPP, then this is set to ACK. If a BPP responds with status = `ACK` to a request, it is required to respond with a callback. If the request fails the validation criteria, then this is set to NACK. Additionally, if a BPP does not intend to respond with a callback even after the request meets the validation criteria, it should set this value to `NACK`." + enum: + - ACK + - NACK + tags: + description: A list of tags containing any additional information sent along with the Acknowledgement. + type: array + items: + $ref: "#/components/schemas/TagGroup" + AddOn: + description: Describes an additional item offered as a value-addition to a product or service. This does not exist independently in a catalog and is always associated with an item. + type: object + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + price: + $ref: "#/components/schemas/Price" + Address: + description: Describes a postal address. + type: string + Agent: + description: "Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor's name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride." + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + organization: + $ref: "#/components/schemas/Organization" + rating: + $ref: "#/components/schemas/Rating/properties/value" + Authorization: + description: "Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation." + type: object + properties: + type: + description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. + type: string + token: + description: "Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering." + type: string + valid_from: + description: Timestamp in RFC3339 format from which token is valid + type: string + format: date-time + valid_to: + description: Timestamp in RFC3339 format until which token is valid + type: string + format: date-time + status: + description: Status of the token + type: string + Billing: + description: "Describes the billing details of an entity.
This has properties like name,organization,address,email,phone,time,tax_number, created_at,updated_at" + type: object + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - $ref: "#/components/schemas/Organization" + address: + description: The address of the billable entity + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the billable entity resides. This is important for state-level tax calculation + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the billable entity resides. + allOf: + - $ref: "#/components/schemas/City" + email: + description: Email address where the bill is sent to + type: string + format: email + phone: + description: Phone number of the billable entity + type: string + time: + description: Details regarding the billing period + allOf: + - $ref: "#/components/schemas/Time" + tax_id: + description: ID of the billable entity as recognized by the taxation authority + type: string + Cancellation: + description: Describes a cancellation event + type: object + properties: + time: + description: Date-time when the order was cancelled by the buyer + type: string + format: date-time + cancelled_by: + type: string + enum: + - CONSUMER + - PROVIDER + reason: + description: The reason for cancellation + allOf: + - $ref: "#/components/schemas/Option" + additional_description: + description: Any additional information regarding the nature of cancellation + allOf: + - $ref: "#/components/schemas/Descriptor" + CancellationTerm: + description: Describes the cancellation terms of an item or an order. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean + cancel_by: + description: Information related to the time of cancellation. + allOf: + - $ref: "#/components/schemas/Time" + cancellation_fee: + $ref: "#/components/schemas/Fee" + xinput: + $ref: "#/components/schemas/XInput" + external_ref: + $ref: "#/components/schemas/MediaFile" + Catalog: + description: "Describes the products or services offered by a BPP. This is typically sent as the response to a search intent from a BAP. The payment terms, offers and terms of fulfillment supported by the BPP can also be included here. The BPP can show hierarchical nature of products/services in its catalog using the parent_category_id in categories. The BPP can also send a ttl (time to live) in the context which is the duration for which a BAP can cache the catalog and use the cached catalog.
This has properties like bbp/descriptor,bbp/categories,bbp/fulfillments,bbp/payments,bbp/offers,bbp/providers and exp
This is used in the following situations.
  • This is typically used in the discovery stage when the BPP sends the details of the products and services it offers as response to a search intent from the BAP.
" + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + type: array + items: + $ref: "#/components/schemas/Payment" + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + type: array + items: + $ref: "#/components/schemas/Offer" + providers: + type: array + items: + $ref: "#/components/schemas/Provider" + exp: + description: Timestamp after which catalog will expire + type: string + format: date-time + ttl: + description: Duration in seconds after which this catalog will expire + type: string + Category: + description: A label under which a collection of items can be grouped. + type: object + properties: + id: + description: ID of the category + type: string + parent_category_id: + $ref: "#/components/schemas/Category/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + time: + $ref: "#/components/schemas/Time" + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Circle: + description: Describes a circular region of a specified radius centered at a specified GPS coordinate. + type: object + properties: + gps: + $ref: "#/components/schemas/Gps" + radius: + $ref: "#/components/schemas/Scalar" + City: + description: Describes a city + type: object + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + Contact: + description: Describes the contact information of an entity + type: object + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + Context: + description: "Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer's location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform's ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver's endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions," + type: object + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - $ref: "#/components/schemas/Domain/properties/code" + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - $ref: "#/components/schemas/Location" + action: + description: The Beckn protocol method being called by the sender and executed at the receiver. + type: string + version: + type: string + description: Version of transaction protocol being used by the sender. + bap_id: + description: Subscriber ID of the BAP + allOf: + - description: "A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform." + type: string + bap_uri: + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + allOf: + - description: The callback URL of the Subscriber. This should necessarily contain the same domain name as set in `subscriber_id``. + type: string + format: uri + bpp_id: + description: Subscriber ID of the BPP + allOf: + - $ref: "#/components/schemas/Context/properties/bap_id/allOf/0" + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - $ref: "#/components/schemas/Context/properties/bap_uri/allOf/0" + transaction_id: + description: "This is a unique value which persists across all API calls from `search` through `confirm`. This is done to indicate an active user session across multiple requests. The BPPs can use this value to push personalized recommendations, and dynamic offerings related to an ongoing transaction despite being unaware of the user active on the BAP." + type: string + format: uuid + message_id: + description: "This is a unique value which persists during a request / callback cycle. Since beckn protocol APIs are asynchronous, BAPs need a common value to match an incoming callback from a BPP to an earlier call. This value can also be used to ignore duplicate messages coming from the BPP. It is recommended to generate a fresh message_id for every new interaction. When sending unsolicited callbacks, BPPs must generate a new message_id." + type: string + format: uuid + timestamp: + description: Time of request generation in RFC3339 format + type: string + format: date-time + key: + description: The encryption public key of the sender + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this message holds valid + type: string + Country: + description: Describes a country + type: object + properties: + name: + type: string + description: Name of the country + code: + type: string + description: Country code as per ISO 3166-1 and ISO 3166-2 format + Credential: + description: Describes a credential of an entity - Person or Organization + type: object + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + Customer: + description: Describes a customer buying/availing a product or a service + type: object + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + DecimalValue: + description: Describes a numerical value in decimal form + type: string + pattern: "[+-]?([0-9]*[.])?[0-9]+" + Descriptor: + description: Physical description of something. + type: object + properties: + name: + type: string + code: + type: string + short_desc: + type: string + long_desc: + type: string + additional_desc: + type: object + properties: + url: + type: string + content_type: + type: string + enum: + - text/plain + - text/html + - application/json + media: + type: array + items: + $ref: "#/components/schemas/MediaFile" + images: + type: array + items: + $ref: "#/components/schemas/Image" + Domain: + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + type: object + properties: + name: + description: Name of the domain + type: string + code: + description: "Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network." + additional_info: + description: A url that contains addtional information about that domain. + allOf: + - $ref: "#/components/schemas/MediaFile" + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + description: "Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback." + type: object + properties: + code: + type: string + description: 'Standard error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo"' + paths: + type: string + description: Path to json schema generating the error. Used only during json schema validation errors + message: + type: string + description: Human readable message describing the error. Used mainly for logging. Not recommended to be shown to the user. + Fee: + description: A fee applied on a particular entity + type: object + properties: + percentage: + description: Percentage of a value + allOf: + - $ref: "#/components/schemas/DecimalValue" + amount: + description: A fixed value + allOf: + - $ref: "#/components/schemas/Price" + Form: + description: Describes a form + type: object + properties: + url: + description: "The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form." + type: string + format: uri + data: + description: The form submission data + type: object + additionalProperties: + type: string + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + type: string + enum: + - text/html + - application/xml + submission_id: + type: string + format: uuid + Fulfillment: + description: Describes how a an order will be rendered/fulfilled to the end-customer + type: object + properties: + id: + description: Unique reference ID to the fulfillment of an order + type: string + type: + description: "A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment." + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + description: The rating value of the fulfullment service. + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + state: + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - $ref: "#/components/schemas/Customer" + agent: + description: The agent that is currently handling the fulfillment of the order + allOf: + - $ref: "#/components/schemas/Agent" + contact: + $ref: "#/components/schemas/Contact" + vehicle: + $ref: "#/components/schemas/Vehicle" + stops: + description: The list of logical stops encountered during the fulfillment of an order. + type: array + items: + $ref: "#/components/schemas/Stop" + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + FulfillmentState: + description: Describes the state of fulfillment + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + Gps: + description: Describes a GPS coordinate + type: string + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + Image: + description: Describes an image + type: object + properties: + url: + description: URL to the image. This can be a data url or an remote url + type: string + format: uri + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + type: string + enum: + - xs + - sm + - md + - lg + - xl + - custom + width: + description: Width of the image in pixels + type: string + height: + description: Height of the image in pixels + type: string + Intent: + description: "The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + type: object + properties: + descriptor: + description: "A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object." + allOf: + - $ref: "#/components/schemas/Descriptor" + provider: + description: The provider from which the customer wants to place to the order from + allOf: + - $ref: "#/components/schemas/Provider" + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - $ref: "#/components/schemas/Fulfillment" + payment: + description: Details on how the customer wants to pay for the order + allOf: + - $ref: "#/components/schemas/Payment" + category: + description: Details on the item category + allOf: + - $ref: "#/components/schemas/Category" + offer: + description: details on the offer the customer wants to avail + allOf: + - $ref: "#/components/schemas/Offer" + item: + description: Details of the item that the consumer wants to order + allOf: + - $ref: "#/components/schemas/Item" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + ItemQuantity: + description: Describes the count or amount of an item + type: object + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + maximum: + description: This represents the maximum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: + $ref: "#/components/schemas/Scalar" + minimum: + description: This represents the minimum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + selected: + description: This represents the quantity selected for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: "#/components/schemas/Scalar" + Item: + description: "Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item." + type: object + properties: + id: + description: ID of the item. + type: string + parent_item_id: + description: "ID of the item, this item is a variant of" + allOf: + - $ref: "#/components/schemas/Item/properties/id" + parent_item_quantity: + description: The number of units of the parent item this item is a multiple of + allOf: + - $ref: "#/components/schemas/ItemQuantity" + descriptor: + description: Physical description of the item + allOf: + - $ref: "#/components/schemas/Descriptor" + creator: + description: The creator of this item + allOf: + - $ref: "#/components/schemas/Organization" + price: + description: "The price of this item, if it has intrinsic value" + allOf: + - $ref: "#/components/schemas/Price" + quantity: + description: The selling quantity of the item + allOf: + - $ref: "#/components/schemas/ItemQuantity" + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - $ref: "#/components/schemas/Category/properties/id" + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - $ref: "#/components/schemas/Fulfillment/properties/id" + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - $ref: "#/components/schemas/Location/properties/id" + payment_ids: + description: Payment modalities through which this item can be ordered + type: array + items: + allOf: + - $ref: "#/components/schemas/Payment/properties/id" + add_ons: + type: array + items: + $ref: "#/components/schemas/AddOn" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + description: Time within which refund will be processed after successful cancellation. + allOf: + - $ref: "#/components/schemas/Time" + refund_amount: + $ref: "#/components/schemas/Price" + replacement_terms: + description: Terms that are applicable be met when this item is replaced + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + xinput: + description: Additional input required from the customer to purchase / avail this item + allOf: + - $ref: "#/components/schemas/XInput" + time: + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + allOf: + - $ref: "#/components/schemas/Time" + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + matched: + description: Whether this item is an exact match of the request + type: boolean + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + recommended: + description: Whether this item is a recommended item to a response + type: boolean + ttl: + description: Time to live in seconds for an instance of this schema + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Location: + description: The physical location of something + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + type: string + format: uri + gps: + description: The GPS co-ordinates of this location. + allOf: + - $ref: "#/components/schemas/Gps" + address: + description: The address of this location. + allOf: + - $ref: "#/components/schemas/Address" + city: + description: "The city this location is, or is located within" + allOf: + - $ref: "#/components/schemas/City" + district: + description: "The state this location is, or is located within" + type: string + state: + description: "The state this location is, or is located within" + allOf: + - $ref: "#/components/schemas/State" + country: + description: "The country this location is, or is located within" + allOf: + - $ref: "#/components/schemas/Country" + area_code: + type: string + circle: + $ref: "#/components/schemas/Circle" + polygon: + description: The boundary polygon of this location + type: string + 3dspace: + description: The three dimensional region describing this location + type: string + rating: + description: The rating of this location + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + MediaFile: + description: This object contains a url to a media file. + type: object + properties: + mimetype: + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + type: string + url: + description: The URL of the file + type: string + format: uri + signature: + description: The digital signature of the file signed by the sender + type: string + dsa: + description: The signing algorithm used by the sender + type: string + Offer: + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + location_ids: + type: array + items: + $ref: "#/components/schemas/Location/properties/id" + category_ids: + type: array + items: + $ref: "#/components/schemas/Category/properties/id" + item_ids: + type: array + items: + $ref: "#/components/schemas/Item/properties/id" + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Option: + description: Describes a selectable option + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + Order: + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + type: object + properties: + id: + type: string + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + type: array + items: + type: string + description: ID of a previous order + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: + description: "This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level." + type: string + default: DEFAULT + enum: + - DRAFT + - DEFAULT + provider: + description: Details of the provider whose catalog items have been selected. + allOf: + - $ref: "#/components/schemas/Provider" + items: + description: The items purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/Item" + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/AddOn" + offers: + description: The offers applied in this order + type: array + items: + $ref: "#/components/schemas/Offer" + billing: + description: The billing details of this order + allOf: + - $ref: "#/components/schemas/Billing" + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: + $ref: "#/components/schemas/Fulfillment" + cancellation: + description: The cancellation details of this order + allOf: + - $ref: "#/components/schemas/Cancellation" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + $ref: "#/components/schemas/Item/properties/refund_terms/items" + replacement_terms: + description: Replacement terms of this item + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Return terms of this item + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - $ref: "#/components/schemas/Quotation" + payments: + description: The terms of settlement for this order + type: array + items: + $ref: "#/components/schemas/Payment" + created_at: + description: The date-time of creation of this order + type: string + format: date-time + updated_at: + description: The date-time of updated of this order + type: string + format: date-time + xinput: + description: Additional input required from the customer to confirm this order + allOf: + - $ref: "#/components/schemas/XInput" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Organization: + description: An organization. Usually a recognized business entity. + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + address: + description: The postal address of the organization + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the organization's address is registered + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the the organization's address is registered + allOf: + - $ref: "#/components/schemas/City" + contact: + $ref: "#/components/schemas/Contact" + Payment: + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + type: object + properties: + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + collected_by: + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + url: + type: string + description: "A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory." + format: uri + params: + type: object + properties: + transaction_id: + type: string + description: The reference transaction ID associated with a payment activity + amount: + type: string + currency: + type: string + bank_code: + type: string + bank_account_number: + type: string + virtual_payment_address: + type: string + source_bank_code: + type: string + source_bank_account_number: + type: string + source_virtual_payment_address: + type: string + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Person: + description: Describes a person as any individual + type: object + properties: + id: + type: string + description: Describes the identity of the person + url: + description: Profile url of the person + type: string + format: uri + name: + description: the name of the person + type: string + image: + $ref: "#/components/schemas/Image" + age: + description: Age of the person + allOf: + - $ref: "#/components/schemas/Duration" + dob: + description: Date of birth of the person + type: string + format: date + gender: + type: string + description: "Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy" + creds: + type: array + items: + $ref: "#/components/schemas/Credential" + languages: + type: array + items: + description: Describes a language known to the person. + type: object + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + properties: + code: + type: string + name: + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Price: + description: Describes the price of a product or service + type: object + properties: + currency: + type: string + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + listed_value: + $ref: "#/components/schemas/DecimalValue" + offered_value: + $ref: "#/components/schemas/DecimalValue" + minimum_value: + $ref: "#/components/schemas/DecimalValue" + maximum_value: + $ref: "#/components/schemas/DecimalValue" + Provider: + description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: + $ref: "#/components/schemas/Descriptor" + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: + $ref: "#/components/schemas/Rating/properties/value" + time: + $ref: "#/components/schemas/Time" + categories: + type: array + items: + $ref: "#/components/schemas/Category" + fulfillments: + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + type: array + items: + $ref: "#/components/schemas/Payment" + locations: + type: array + items: + $ref: "#/components/schemas/Location" + offers: + type: array + items: + $ref: "#/components/schemas/Offer" + items: + type: array + items: + $ref: "#/components/schemas/Item" + exp: + type: string + description: Time after which catalog has to be refreshed + format: date-time + rateable: + description: Whether this provider can be rated or not + type: boolean + ttl: + description: "The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable." + type: integer + minimum: -1 + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Quotation: + description: "Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl" + type: object + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - $ref: "#/components/schemas/Price" + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: + $ref: "#/components/schemas/Item" + title: + type: string + price: + $ref: "#/components/schemas/Price" + ttl: + $ref: "#/components/schemas/Duration" + Rating: + description: Describes the rating of an entity + type: object + properties: + rating_category: + description: Category of the entity being rated + type: string + enum: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + id: + description: Id of the object being rated + type: string + value: + description: "Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||." + type: string + Region: + description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. + type: object + properties: + dimensions: + description: "The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services." + type: string + enum: + - "1" + - "2" + - "3" + type: + description: "The type of region. This is used to specify the granularity of the region represented by this object. Various examples of two-dimensional region types are city, country, state, district, and so on. The network policy should contain a list of all possible region types supported by the network." + type: string + name: + type: string + description: Name of the region as specified on the map where that region exists. + code: + type: string + description: A standard code representing the region. This should be interpreted in the same way by all network participants. + boundary: + type: string + description: "A string representing the boundary of the region. One-dimensional regions are represented by polylines. Two-dimensional regions are represented by polygons, and three-dimensional regions can represented by polyhedra." + map_url: + type: string + description: The url to the map of the region. This can be a globally recognized map or the one specified by the network policy. + ReplacementTerm: + description: The replacement policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + replace_within: + description: "Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement" + allOf: + - $ref: "#/components/schemas/Time" + external_ref: + $ref: "#/components/schemas/MediaFile" + ReturnTerm: + description: Describes the return policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term IETF''s applicable. + allOf: + - $ref: "#/components/schemas/State" + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_time: + description: "Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund." + allOf: + - $ref: "#/components/schemas/Time" + return_location: + description: The location where the item or order must / will be returned to + allOf: + - $ref: "#/components/schemas/Location" + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + Scalar: + description: Describes a scalar + type: object + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + range: + type: object + properties: + min: + $ref: "#/components/schemas/DecimalValue" + max: + $ref: "#/components/schemas/DecimalValue" + unit: + type: string + Schedule: + description: "Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times" + type: object + properties: + frequency: + $ref: "#/components/schemas/Duration" + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + State: + description: A bounded geopolitical region of governance inside a country. + type: object + properties: + name: + type: string + description: Name of the state + code: + type: string + description: State code as per country or international standards + Stop: + description: A logical point in space and time during the fulfillment of an order. + type: object + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - $ref: "#/components/schemas/Location" + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + type: string + time: + description: Timings applicable at the stop. + allOf: + - $ref: "#/components/schemas/Time" + instructions: + description: Instructions that need to be followed at the stop + allOf: + - $ref: "#/components/schemas/Descriptor" + contact: + description: Contact details of the stop + allOf: + - $ref: "#/components/schemas/Contact" + person: + description: The details of the person present at the stop + allOf: + - $ref: "#/components/schemas/Person" + authorization: + $ref: "#/components/schemas/Authorization" + Support: + description: Details of customer support + type: object + properties: + ref_id: + type: string + callback_phone: + type: string + format: phone + phone: + type: string + format: phone + email: + type: string + format: email + url: + type: string + format: uri + Tag: + description: "Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service." + type: object + properties: + descriptor: + description: "Description of the Tag, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + display: + description: "This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value." + type: boolean + TagGroup: + description: "A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316" + type: object + properties: + display: + description: "Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search." + type: boolean + default: true + descriptor: + description: "Description of the TagGroup, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + list: + description: "An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema." + type: array + items: + $ref: "#/components/schemas/Tag" + Time: + description: "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations
This has properties like label, time stamp,duration,range, days, schedule" + type: object + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: + $ref: "#/components/schemas/Duration" + range: + type: object + properties: + start: + type: string + format: date-time + end: + type: string + format: date-time + days: + type: string + description: comma separated values representing days of the week + schedule: + $ref: "#/components/schemas/Schedule" + Tracking: + description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. + type: object + properties: + id: + description: A unique tracking reference number + type: string + url: + description: "A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data." + type: string + format: uri + location: + description: "In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API." + allOf: + - $ref: "#/components/schemas/Location" + status: + description: "This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order." + type: string + enum: + - active + - inactive + Vehicle: + description: "Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration" + type: object + properties: + category: + type: string + capacity: + type: integer + make: + type: string + model: + type: string + size: + type: string + variant: + type: string + color: + type: string + energy_type: + type: string + registration: + type: string + wheels_count: + type: string + cargo_volumne: + type: string + wheelchair_access: + type: string + code: + type: string + emission_standard: + type: string + XInput: + description: "Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation." + type: object + properties: + form: + $ref: "#/components/schemas/Form" + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean diff --git a/layer2/samples/uei_charging_1.1.0.yaml b/layer2/samples/uei_charging_1.1.0.yaml new file mode 100644 index 0000000..b92a4a7 --- /dev/null +++ b/layer2/samples/uei_charging_1.1.0.yaml @@ -0,0 +1,2164 @@ +openapi: 3.0.0 +info: + title: Beckn Protocol Core + description: uei:charging layer 2 config from core yaml + version: 1.1.0 +security: + - SubscriberAuth: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: BAP declares the customer's intent to buy/avail products or services + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + $ref: "#/components/schemas/Intent" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: BAP declares the customer's cart (or equivalent) created by selecting objects from the catalog + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: "#/components/schemas/Ack" + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: "#/components/schemas/Error" + required: + - message + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: Fetch the latest order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /track: + post: + tags: + - Beckn Provider Platform (BPP) + description: Track an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - track + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + callback_url: + type: string + format: uri + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: Cancel an order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - cancel + required: + - action + message: + type: object + properties: + order_id: + $ref: "#/components/schemas/Order/properties/id" + cancellation_reason_id: + $ref: "#/components/schemas/Option/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + required: + - order_id + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /update: + post: + tags: + - Beckn Provider Platform (BPP) + description: Remove object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - update + required: + - action + message: + type: object + properties: + update_target: + description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' + type: string + order: + description: Updated order object + allOf: + - $ref: "#/components/schemas/Order" + required: + - update_target + - order + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /rating: + post: + tags: + - Beckn Provider Platform (BPP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - rating + required: + - action + message: + type: object + properties: + ratings: + type: array + items: + $ref: "#/components/schemas/Rating" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /support: + post: + tags: + - Beckn Provider Platform (BPP) + description: Contact support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_search: + post: + tags: + - Beckn Application Platform (BAP) + - Beckn Gateway (BG) + description: BPP sends its catalog in response to a search request. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: "#/components/schemas/Catalog" + required: + - catalog + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_select: + post: + tags: + - Beckn Application Platform (BAP) + description: Send draft order object with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_select + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_init: + post: + tags: + - Beckn Application Platform (BAP) + description: Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_confirm: + post: + tags: + - Beckn Application Platform (BAP) + description: Send active order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_track: + post: + tags: + - Beckn Application Platform (BAP) + description: Send tracking details of an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_track + required: + - action + message: + type: object + properties: + tracking: + $ref: "#/components/schemas/Tracking" + required: + - tracking + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_cancel: + post: + tags: + - Beckn Application Platform (BAP) + description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_cancel + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_update: + post: + tags: + - Beckn Application Platform (BAP) + description: Returns updated service with updated runtime object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_update + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_status: + post: + tags: + - Beckn Application Platform (BAP) + description: Fetch the status of a Service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_status + required: + - action + message: + type: object + properties: + order: + $ref: "#/components/schemas/Order" + required: + - order + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_rating: + post: + tags: + - Beckn Application Platform (BAP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_rating + required: + - action + message: + type: object + properties: + feedback_form: + description: A feedback form to allow the user to provide additional information on the rating provided + allOf: + - $ref: "#/components/schemas/XInput" + error: + $ref: "#/components/schemas/Error" + required: + - context + - message + responses: + default: + $ref: "#/paths/~1init/post/responses/default" + /on_support: + post: + tags: + - Beckn Application Platform (BAP) + description: Contact Support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: "#/components/schemas/Context" + - properties: + action: + enum: + - on_support + required: + - action + message: + type: object + properties: + support: + $ref: "#/components/schemas/Support" + error: + $ref: "#/components/schemas/Error" + required: + - context + responses: + default: + $ref: "#/paths/~1init/post/responses/default" +components: + securitySchemes: + SubscriberAuth: + type: apiKey + in: header + name: Authorization + description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + schemas: + Ack: + description: "Describes the acknowledgement sent in response to an API call. If the implementation uses HTTP/S, then Ack must be returned in the same session. Every API call to a BPP must be responded to with an Ack whether the BPP intends to respond with a callback or not. This has one property called `status` that indicates the status of the Acknowledgement." + type: object + properties: + status: + type: string + description: "The status of the acknowledgement. If the request passes the validation criteria of the BPP, then this is set to ACK. If a BPP responds with status = `ACK` to a request, it is required to respond with a callback. If the request fails the validation criteria, then this is set to NACK. Additionally, if a BPP does not intend to respond with a callback even after the request meets the validation criteria, it should set this value to `NACK`." + enum: + - ACK + - NACK + tags: + description: A list of tags containing any additional information sent along with the Acknowledgement. + type: array + items: + $ref: "#/components/schemas/TagGroup" + AddOn: + description: Describes an additional item offered as a value-addition to a product or service. This does not exist independently in a catalog and is always associated with an item. + type: object + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + price: + $ref: "#/components/schemas/Price" + Address: + description: Describes a postal address. + type: string + Agent: + description: "Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor's name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride." + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + organization: + $ref: "#/components/schemas/Organization" + rating: + $ref: "#/components/schemas/Rating/properties/value" + Authorization: + description: "Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation." + type: object + properties: + type: + description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. + type: string + token: + description: "Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering." + type: string + valid_from: + description: Timestamp in RFC3339 format from which token is valid + type: string + format: date-time + valid_to: + description: Timestamp in RFC3339 format until which token is valid + type: string + format: date-time + status: + description: Status of the token + type: string + Billing: + description: "Describes the billing details of an entity.
This has properties like name,organization,address,email,phone,time,tax_number, created_at,updated_at" + type: object + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - $ref: "#/components/schemas/Organization" + address: + description: The address of the billable entity + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the billable entity resides. This is important for state-level tax calculation + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the billable entity resides. + allOf: + - $ref: "#/components/schemas/City" + email: + description: Email address where the bill is sent to + type: string + format: email + phone: + description: Phone number of the billable entity + type: string + time: + description: Details regarding the billing period + allOf: + - $ref: "#/components/schemas/Time" + tax_id: + description: ID of the billable entity as recognized by the taxation authority + type: string + Cancellation: + description: Describes a cancellation event + type: object + properties: + time: + description: Date-time when the order was cancelled by the buyer + type: string + format: date-time + cancelled_by: + type: string + enum: + - CONSUMER + - PROVIDER + reason: + description: The reason for cancellation + allOf: + - $ref: "#/components/schemas/Option" + additional_description: + description: Any additional information regarding the nature of cancellation + allOf: + - $ref: "#/components/schemas/Descriptor" + CancellationTerm: + description: Describes the cancellation terms of an item or an order. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean + cancel_by: + description: Information related to the time of cancellation. + allOf: + - $ref: "#/components/schemas/Time" + cancellation_fee: + $ref: "#/components/schemas/Fee" + xinput: + $ref: "#/components/schemas/XInput" + external_ref: + $ref: "#/components/schemas/MediaFile" + Catalog: + description: "Describes the products or services offered by a BPP. This is typically sent as the response to a search intent from a BAP. The payment terms, offers and terms of fulfillment supported by the BPP can also be included here. The BPP can show hierarchical nature of products/services in its catalog using the parent_category_id in categories. The BPP can also send a ttl (time to live) in the context which is the duration for which a BAP can cache the catalog and use the cached catalog.
This has properties like bbp/descriptor,bbp/categories,bbp/fulfillments,bbp/payments,bbp/offers,bbp/providers and exp
This is used in the following situations.
  • This is typically used in the discovery stage when the BPP sends the details of the products and services it offers as response to a search intent from the BAP.
" + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + type: array + items: + $ref: "#/components/schemas/Payment" + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + type: array + items: + $ref: "#/components/schemas/Offer" + providers: + type: array + items: + $ref: "#/components/schemas/Provider" + exp: + description: Timestamp after which catalog will expire + type: string + format: date-time + ttl: + description: Duration in seconds after which this catalog will expire + type: string + Category: + description: A label under which a collection of items can be grouped. + type: object + properties: + id: + description: ID of the category + type: string + parent_category_id: + $ref: "#/components/schemas/Category/properties/id" + descriptor: + $ref: "#/components/schemas/Descriptor" + time: + $ref: "#/components/schemas/Time" + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Circle: + description: Describes a circular region of a specified radius centered at a specified GPS coordinate. + type: object + properties: + gps: + $ref: "#/components/schemas/Gps" + radius: + $ref: "#/components/schemas/Scalar" + City: + description: Describes a city + type: object + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + Contact: + description: Describes the contact information of an entity + type: object + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + Context: + description: "Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer's location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform's ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver's endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions," + type: object + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - $ref: "#/components/schemas/Domain/properties/code" + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - $ref: "#/components/schemas/Location" + action: + description: The Beckn protocol method being called by the sender and executed at the receiver. + type: string + version: + type: string + description: Version of transaction protocol being used by the sender. + bap_id: + description: Subscriber ID of the BAP + allOf: + - description: "A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform." + type: string + bap_uri: + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + allOf: + - description: The callback URL of the Subscriber. This should necessarily contain the same domain name as set in `subscriber_id``. + type: string + format: uri + bpp_id: + description: Subscriber ID of the BPP + allOf: + - $ref: "#/components/schemas/Context/properties/bap_id/allOf/0" + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - $ref: "#/components/schemas/Context/properties/bap_uri/allOf/0" + transaction_id: + description: "This is a unique value which persists across all API calls from `search` through `confirm`. This is done to indicate an active user session across multiple requests. The BPPs can use this value to push personalized recommendations, and dynamic offerings related to an ongoing transaction despite being unaware of the user active on the BAP." + type: string + format: uuid + message_id: + description: "This is a unique value which persists during a request / callback cycle. Since beckn protocol APIs are asynchronous, BAPs need a common value to match an incoming callback from a BPP to an earlier call. This value can also be used to ignore duplicate messages coming from the BPP. It is recommended to generate a fresh message_id for every new interaction. When sending unsolicited callbacks, BPPs must generate a new message_id." + type: string + format: uuid + timestamp: + description: Time of request generation in RFC3339 format + type: string + format: date-time + key: + description: The encryption public key of the sender + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this message holds valid + type: string + Country: + description: Describes a country + type: object + properties: + name: + type: string + description: Name of the country + code: + type: string + description: Country code as per ISO 3166-1 and ISO 3166-2 format + Credential: + description: Describes a credential of an entity - Person or Organization + type: object + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + Customer: + description: Describes a customer buying/availing a product or a service + type: object + properties: + person: + $ref: "#/components/schemas/Person" + contact: + $ref: "#/components/schemas/Contact" + DecimalValue: + description: Describes a numerical value in decimal form + type: string + pattern: "[+-]?([0-9]*[.])?[0-9]+" + Descriptor: + description: Physical description of something. + type: object + properties: + name: + type: string + code: + type: string + short_desc: + type: string + long_desc: + type: string + additional_desc: + type: object + properties: + url: + type: string + content_type: + type: string + enum: + - text/plain + - text/html + - application/json + media: + type: array + items: + $ref: "#/components/schemas/MediaFile" + images: + type: array + items: + $ref: "#/components/schemas/Image" + Domain: + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + type: object + properties: + name: + description: Name of the domain + type: string + code: + description: "Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network." + additional_info: + description: A url that contains addtional information about that domain. + allOf: + - $ref: "#/components/schemas/MediaFile" + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + description: "Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback." + type: object + properties: + code: + type: string + description: 'Standard error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo"' + paths: + type: string + description: Path to json schema generating the error. Used only during json schema validation errors + message: + type: string + description: Human readable message describing the error. Used mainly for logging. Not recommended to be shown to the user. + Fee: + description: A fee applied on a particular entity + type: object + properties: + percentage: + description: Percentage of a value + allOf: + - $ref: "#/components/schemas/DecimalValue" + amount: + description: A fixed value + allOf: + - $ref: "#/components/schemas/Price" + Form: + description: Describes a form + type: object + properties: + url: + description: "The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form." + type: string + format: uri + data: + description: The form submission data + type: object + additionalProperties: + type: string + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + type: string + enum: + - text/html + - application/xml + submission_id: + type: string + format: uuid + Fulfillment: + description: Describes how a an order will be rendered/fulfilled to the end-customer + type: object + properties: + id: + description: Unique reference ID to the fulfillment of an order + type: string + type: + description: "A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment." + type: string + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + description: The rating value of the fulfullment service. + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + state: + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + allOf: + - $ref: "#/components/schemas/FulfillmentState" + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - $ref: "#/components/schemas/Customer" + agent: + description: The agent that is currently handling the fulfillment of the order + allOf: + - $ref: "#/components/schemas/Agent" + contact: + $ref: "#/components/schemas/Contact" + vehicle: + $ref: "#/components/schemas/Vehicle" + stops: + description: The list of logical stops encountered during the fulfillment of an order. + type: array + items: + $ref: "#/components/schemas/Stop" + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + FulfillmentState: + description: Describes the state of fulfillment + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + Gps: + description: Describes a GPS coordinate + type: string + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + Image: + description: Describes an image + type: object + properties: + url: + description: URL to the image. This can be a data url or an remote url + type: string + format: uri + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + type: string + enum: + - xs + - sm + - md + - lg + - xl + - custom + width: + description: Width of the image in pixels + type: string + height: + description: Height of the image in pixels + type: string + Intent: + description: "The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + type: object + properties: + descriptor: + description: "A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object." + allOf: + - $ref: "#/components/schemas/Descriptor" + provider: + description: The provider from which the customer wants to place to the order from + allOf: + - $ref: "#/components/schemas/Provider" + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - $ref: "#/components/schemas/Fulfillment" + payment: + description: Details on how the customer wants to pay for the order + allOf: + - $ref: "#/components/schemas/Payment" + category: + description: Details on the item category + allOf: + - $ref: "#/components/schemas/Category" + offer: + description: details on the offer the customer wants to avail + allOf: + - $ref: "#/components/schemas/Offer" + item: + description: Details of the item that the consumer wants to order + allOf: + - $ref: "#/components/schemas/Item" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + ItemQuantity: + description: Describes the count or amount of an item + type: object + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + maximum: + description: This represents the maximum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: + $ref: "#/components/schemas/Scalar" + minimum: + description: This represents the minimum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + selected: + description: This represents the quantity selected for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: "#/components/schemas/Scalar" + unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: "#/components/schemas/Scalar" + Item: + description: "Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item." + type: object + properties: + id: + description: ID of the item. + type: string + parent_item_id: + description: "ID of the item, this item is a variant of" + allOf: + - $ref: "#/components/schemas/Item/properties/id" + parent_item_quantity: + description: The number of units of the parent item this item is a multiple of + allOf: + - $ref: "#/components/schemas/ItemQuantity" + descriptor: + description: Physical description of the item + allOf: + - $ref: "#/components/schemas/Descriptor" + creator: + description: The creator of this item + allOf: + - $ref: "#/components/schemas/Organization" + price: + description: "The price of this item, if it has intrinsic value" + allOf: + - $ref: "#/components/schemas/Price" + quantity: + description: The selling quantity of the item + allOf: + - $ref: "#/components/schemas/ItemQuantity" + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - $ref: "#/components/schemas/Category/properties/id" + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - $ref: "#/components/schemas/Fulfillment/properties/id" + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - $ref: "#/components/schemas/Location/properties/id" + payment_ids: + description: Payment modalities through which this item can be ordered + type: array + items: + allOf: + - $ref: "#/components/schemas/Payment/properties/id" + add_ons: + type: array + items: + $ref: "#/components/schemas/AddOn" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + description: Time within which refund will be processed after successful cancellation. + allOf: + - $ref: "#/components/schemas/Time" + refund_amount: + $ref: "#/components/schemas/Price" + replacement_terms: + description: Terms that are applicable be met when this item is replaced + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + xinput: + description: Additional input required from the customer to purchase / avail this item + allOf: + - $ref: "#/components/schemas/XInput" + time: + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + allOf: + - $ref: "#/components/schemas/Time" + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + matched: + description: Whether this item is an exact match of the request + type: boolean + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + recommended: + description: Whether this item is a recommended item to a response + type: boolean + ttl: + description: Time to live in seconds for an instance of this schema + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Location: + description: The physical location of something + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + type: string + format: uri + gps: + description: The GPS co-ordinates of this location. + allOf: + - $ref: "#/components/schemas/Gps" + address: + description: The address of this location. + allOf: + - $ref: "#/components/schemas/Address" + city: + description: "The city this location is, or is located within" + allOf: + - $ref: "#/components/schemas/City" + district: + description: "The state this location is, or is located within" + type: string + state: + description: "The state this location is, or is located within" + allOf: + - $ref: "#/components/schemas/State" + country: + description: "The country this location is, or is located within" + allOf: + - $ref: "#/components/schemas/Country" + area_code: + type: string + circle: + $ref: "#/components/schemas/Circle" + polygon: + description: The boundary polygon of this location + type: string + 3dspace: + description: The three dimensional region describing this location + type: string + rating: + description: The rating of this location + allOf: + - $ref: "#/components/schemas/Rating/properties/value" + MediaFile: + description: This object contains a url to a media file. + type: object + properties: + mimetype: + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + type: string + url: + description: The URL of the file + type: string + format: uri + signature: + description: The digital signature of the file signed by the sender + type: string + dsa: + description: The signing algorithm used by the sender + type: string + Offer: + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + location_ids: + type: array + items: + $ref: "#/components/schemas/Location/properties/id" + category_ids: + type: array + items: + $ref: "#/components/schemas/Category/properties/id" + item_ids: + type: array + items: + $ref: "#/components/schemas/Item/properties/id" + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Option: + description: Describes a selectable option + type: object + properties: + id: + type: string + descriptor: + $ref: "#/components/schemas/Descriptor" + Order: + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + type: object + properties: + id: + type: string + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + type: array + items: + type: string + description: ID of a previous order + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: + description: "This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level." + type: string + default: DEFAULT + enum: + - DRAFT + - DEFAULT + provider: + description: Details of the provider whose catalog items have been selected. + allOf: + - $ref: "#/components/schemas/Provider" + items: + description: The items purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/Item" + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: + $ref: "#/components/schemas/AddOn" + offers: + description: The offers applied in this order + type: array + items: + $ref: "#/components/schemas/Offer" + billing: + description: The billing details of this order + allOf: + - $ref: "#/components/schemas/Billing" + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: + $ref: "#/components/schemas/Fulfillment" + cancellation: + description: The cancellation details of this order + allOf: + - $ref: "#/components/schemas/Cancellation" + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: "#/components/schemas/CancellationTerm" + refund_terms: + description: Refund terms of this item + type: array + items: + $ref: "#/components/schemas/Item/properties/refund_terms/items" + replacement_terms: + description: Replacement terms of this item + type: array + items: + $ref: "#/components/schemas/ReplacementTerm" + return_terms: + description: Return terms of this item + type: array + items: + $ref: "#/components/schemas/ReturnTerm" + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - $ref: "#/components/schemas/Quotation" + payments: + description: The terms of settlement for this order + type: array + items: + $ref: "#/components/schemas/Payment" + created_at: + description: The date-time of creation of this order + type: string + format: date-time + updated_at: + description: The date-time of updated of this order + type: string + format: date-time + xinput: + description: Additional input required from the customer to confirm this order + allOf: + - $ref: "#/components/schemas/XInput" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Organization: + description: An organization. Usually a recognized business entity. + type: object + properties: + descriptor: + $ref: "#/components/schemas/Descriptor" + address: + description: The postal address of the organization + allOf: + - $ref: "#/components/schemas/Address" + state: + description: The state where the organization's address is registered + allOf: + - $ref: "#/components/schemas/State" + city: + description: The city where the the organization's address is registered + allOf: + - $ref: "#/components/schemas/City" + contact: + $ref: "#/components/schemas/Contact" + Payment: + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + type: object + properties: + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + collected_by: + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + url: + type: string + description: "A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory." + format: uri + params: + type: object + properties: + transaction_id: + type: string + description: The reference transaction ID associated with a payment activity + amount: + type: string + currency: + type: string + bank_code: + type: string + bank_account_number: + type: string + virtual_payment_address: + type: string + source_bank_code: + type: string + source_bank_account_number: + type: string + source_virtual_payment_address: + type: string + type: + type: string + enum: + - PRE-ORDER + - PRE-FULFILLMENT + - ON-FULFILLMENT + - POST-FULFILLMENT + status: + type: string + enum: + - PAID + - NOT-PAID + time: + $ref: "#/components/schemas/Time" + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Person: + description: Describes a person as any individual + type: object + properties: + id: + type: string + description: Describes the identity of the person + url: + description: Profile url of the person + type: string + format: uri + name: + description: the name of the person + type: string + image: + $ref: "#/components/schemas/Image" + age: + description: Age of the person + allOf: + - $ref: "#/components/schemas/Duration" + dob: + description: Date of birth of the person + type: string + format: date + gender: + type: string + description: "Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy" + creds: + type: array + items: + $ref: "#/components/schemas/Credential" + languages: + type: array + items: + description: Describes a language known to the person. + type: object + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + properties: + code: + type: string + name: + type: string + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Price: + description: Describes the price of a product or service + type: object + properties: + currency: + type: string + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + listed_value: + $ref: "#/components/schemas/DecimalValue" + offered_value: + $ref: "#/components/schemas/DecimalValue" + minimum_value: + $ref: "#/components/schemas/DecimalValue" + maximum_value: + $ref: "#/components/schemas/DecimalValue" + Provider: + description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: + $ref: "#/components/schemas/Descriptor" + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: + $ref: "#/components/schemas/Rating/properties/value" + time: + $ref: "#/components/schemas/Time" + categories: + type: array + items: + $ref: "#/components/schemas/Category" + fulfillments: + type: array + items: + $ref: "#/components/schemas/Fulfillment" + payments: + type: array + items: + $ref: "#/components/schemas/Payment" + locations: + type: array + items: + $ref: "#/components/schemas/Location" + offers: + type: array + items: + $ref: "#/components/schemas/Offer" + items: + type: array + items: + $ref: "#/components/schemas/Item" + exp: + type: string + description: Time after which catalog has to be refreshed + format: date-time + rateable: + description: Whether this provider can be rated or not + type: boolean + ttl: + description: "The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable." + type: integer + minimum: -1 + tags: + type: array + items: + $ref: "#/components/schemas/TagGroup" + Quotation: + description: "Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl" + type: object + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - $ref: "#/components/schemas/Price" + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: + $ref: "#/components/schemas/Item" + title: + type: string + price: + $ref: "#/components/schemas/Price" + ttl: + $ref: "#/components/schemas/Duration" + Rating: + description: Describes the rating of an entity + type: object + properties: + rating_category: + description: Category of the entity being rated + type: string + enum: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + id: + description: Id of the object being rated + type: string + value: + description: "Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||." + type: string + Region: + description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. + type: object + properties: + dimensions: + description: "The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services." + type: string + enum: + - "1" + - "2" + - "3" + type: + description: "The type of region. This is used to specify the granularity of the region represented by this object. Various examples of two-dimensional region types are city, country, state, district, and so on. The network policy should contain a list of all possible region types supported by the network." + type: string + name: + type: string + description: Name of the region as specified on the map where that region exists. + code: + type: string + description: A standard code representing the region. This should be interpreted in the same way by all network participants. + boundary: + type: string + description: "A string representing the boundary of the region. One-dimensional regions are represented by polylines. Two-dimensional regions are represented by polygons, and three-dimensional regions can represented by polyhedra." + map_url: + type: string + description: The url to the map of the region. This can be a globally recognized map or the one specified by the network policy. + ReplacementTerm: + description: The replacement policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: "#/components/schemas/State" + replace_within: + description: "Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement" + allOf: + - $ref: "#/components/schemas/Time" + external_ref: + $ref: "#/components/schemas/MediaFile" + ReturnTerm: + description: Describes the return policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term IETF''s applicable. + allOf: + - $ref: "#/components/schemas/State" + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_time: + description: "Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund." + allOf: + - $ref: "#/components/schemas/Time" + return_location: + description: The location where the item or order must / will be returned to + allOf: + - $ref: "#/components/schemas/Location" + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + Scalar: + description: Describes a scalar + type: object + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: + $ref: "#/components/schemas/DecimalValue" + estimated_value: + $ref: "#/components/schemas/DecimalValue" + computed_value: + $ref: "#/components/schemas/DecimalValue" + range: + type: object + properties: + min: + $ref: "#/components/schemas/DecimalValue" + max: + $ref: "#/components/schemas/DecimalValue" + unit: + type: string + Schedule: + description: "Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times" + type: object + properties: + frequency: + $ref: "#/components/schemas/Duration" + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + State: + description: A bounded geopolitical region of governance inside a country. + type: object + properties: + name: + type: string + description: Name of the state + code: + type: string + description: State code as per country or international standards + Stop: + description: A logical point in space and time during the fulfillment of an order. + type: object + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - $ref: "#/components/schemas/Location" + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + type: string + time: + description: Timings applicable at the stop. + allOf: + - $ref: "#/components/schemas/Time" + instructions: + description: Instructions that need to be followed at the stop + allOf: + - $ref: "#/components/schemas/Descriptor" + contact: + description: Contact details of the stop + allOf: + - $ref: "#/components/schemas/Contact" + person: + description: The details of the person present at the stop + allOf: + - $ref: "#/components/schemas/Person" + authorization: + $ref: "#/components/schemas/Authorization" + Support: + description: Details of customer support + type: object + properties: + ref_id: + type: string + callback_phone: + type: string + format: phone + phone: + type: string + format: phone + email: + type: string + format: email + url: + type: string + format: uri + Tag: + description: "Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service." + type: object + properties: + descriptor: + description: "Description of the Tag, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + display: + description: "This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value." + type: boolean + TagGroup: + description: "A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316" + type: object + properties: + display: + description: "Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search." + type: boolean + default: true + descriptor: + description: "Description of the TagGroup, can be used to store detailed information." + allOf: + - $ref: "#/components/schemas/Descriptor" + list: + description: "An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema." + type: array + items: + $ref: "#/components/schemas/Tag" + Time: + description: "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations
This has properties like label, time stamp,duration,range, days, schedule" + type: object + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: + $ref: "#/components/schemas/Duration" + range: + type: object + properties: + start: + type: string + format: date-time + end: + type: string + format: date-time + days: + type: string + description: comma separated values representing days of the week + schedule: + $ref: "#/components/schemas/Schedule" + Tracking: + description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. + type: object + properties: + id: + description: A unique tracking reference number + type: string + url: + description: "A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data." + type: string + format: uri + location: + description: "In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API." + allOf: + - $ref: "#/components/schemas/Location" + status: + description: "This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order." + type: string + enum: + - active + - inactive + Vehicle: + description: "Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration" + type: object + properties: + category: + type: string + capacity: + type: integer + make: + type: string + model: + type: string + size: + type: string + variant: + type: string + color: + type: string + energy_type: + type: string + registration: + type: string + wheels_count: + type: string + cargo_volumne: + type: string + wheelchair_access: + type: string + code: + type: string + emission_standard: + type: string + XInput: + description: "Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation." + type: object + properties: + form: + $ref: "#/components/schemas/Form" + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean diff --git a/onix-gui/GUI/README.md b/onix-gui/GUI/README.md new file mode 100644 index 0000000..14ab8e1 --- /dev/null +++ b/onix-gui/GUI/README.md @@ -0,0 +1,56 @@ +# beckn-onix-gui + +The GUI for the beckn-onix cli tool. + +## Pre-requisites + +1. 4 server/instances +2. 4 sub-domains mapped to each instance +3. Local Tunnel + `npm i -g localtunnel` + +## User Guide + +### Step 1: Run the `start.sh` script + +``` +cd .. && ./start.sh +``` + +### Step 2: Accessing the GUI. + +You will be getting a URL and password as on output of the script. Open the url in the browser and then +paste the password. + +### Step 3: Install and setup your network + +Note: Port 3000 is being used by onix, so we're using port 3005 instead. + +### Step 4: Configure a reverse proxy using NGINX + +Map port 3005 to a domain or use your machine IP:3005 to access the GUI from your browser. + +### Step 5: Secure with certbot + +Use certbot to obtain an SSL certificate and secure your GUI. + +## Contributing + +Contributions are welcome! If you'd like to contribute to the beckn-onix-gui project, please fork the repo and submit a pull request. + +## License + +The beckn-onix-gui project is licensed under the MIT License. See the LICENSE file for more information. + +## Contact + +If you have any questions or issues with the beckn-onix-gui project, please don't hesitate to reach out. + +### Made with ❤️ + +built by the [Mulearn Team](https://mulearn.org/) + +1. [Mishal Abdullah](https://github.com/Mishalabdullah/) +2. [Aswin Asok](https://github.com/AswinAsok) +3. [Viraj Prabhu ](https://github.com/viraka) +4. [Adarsh Mohan](https://www.linkedin.com/in/adarshmohanks/) diff --git a/onix-gui/GUI/app/api/check-layer2/route.js b/onix-gui/GUI/app/api/check-layer2/route.js new file mode 100644 index 0000000..1fb27cf --- /dev/null +++ b/onix-gui/GUI/app/api/check-layer2/route.js @@ -0,0 +1,66 @@ +import { exec } from "child_process"; +import { NextResponse } from "next/server"; + +export async function POST(req) { + const request = await req.json(); + const containerName = request.checked ? "bpp-network" : "bap-network"; + const fileToCheck = request.fileName; + + const executeShellCommand = (command) => { + return new Promise((resolve, reject) => { + exec(command, (error, stdout, stderr) => { + if (error) { + console.error("Error:", error); + reject(error); + return; + } + if (stderr) { + console.error("Error:", stderr); + reject(new Error(stderr)); + return; + } + const output = stdout; + console.log("Output:", output); + resolve(output); + }); + }); + }; + + try { + const containerExists = await executeShellCommand( + `docker ps -a --filter "name=${containerName}" --format "{{.Names}}"` + ); + if (!containerExists.trim()) { + return new NextResponse(`Error: ${containerName} server not present`, { + status: 500, + }); + } + + const result = await executeShellCommand( + `docker exec ${containerName} /bin/sh -c "[ -f '/usr/src/app/schemas/${fileToCheck}' ] && echo 'File found' || echo 'File not found'"` + ); + if (result.trim() === "File found") { + return NextResponse.json( + { message: true }, + { + status: 200, + } + ); + } else { + return NextResponse.json( + { message: false }, + { + status: 200, + } + ); + } + } catch (error) { + console.error(`exec error: ${error}`); + return NextResponse.json( + { message: `Error executing shell command: ${error}` }, + { + status: 500, + } + ); + } +} diff --git a/onix-gui/GUI/app/api/clonning-repo/route.js b/onix-gui/GUI/app/api/clonning-repo/route.js new file mode 100644 index 0000000..e8c0225 --- /dev/null +++ b/onix-gui/GUI/app/api/clonning-repo/route.js @@ -0,0 +1,36 @@ +import { spawn } from "child_process"; +import { NextResponse } from "next/server"; +import os from "os"; +import path from "path"; +// This function is used to clone the github repository of beckn-onix +export async function GET(req) { + console.log("Cloning GitHub repository..."); + const repoUrl = "https://github.com/beckn/beckn-onix"; + const destination = path.join(os.homedir(), "beckn-onix"); + const gitProcess = spawn("git", ["clone", repoUrl, destination]); + + gitProcess.stdout.on("data", (data) => { + console.log(`stdout: ${data}`); + }); + + gitProcess.stderr.on("data", (data) => { + console.error(`stderr: ${data}`); + }); + + return new Promise((resolve, reject) => { + gitProcess.on("close", (code) => {const destination = "~/beckn-onix"; + if (code === 0) { + console.log("Repository cloned successfully"); + resolve( + NextResponse.json( + { success: true, data: "Repo Cloned Successfully" }, + { status: 200 } + ) + ); + } else { + console.error(`git process exited with code ${code}`); + resolve(NextResponse.json({ success: false }, { status: 500 })); + } + }); + }); +} diff --git a/onix-gui/GUI/app/api/install-bap/route.js b/onix-gui/GUI/app/api/install-bap/route.js new file mode 100644 index 0000000..3bad4fb --- /dev/null +++ b/onix-gui/GUI/app/api/install-bap/route.js @@ -0,0 +1,118 @@ +import { exec } from "child_process"; +import { NextResponse } from "next/server"; +import { promises as fs } from "fs"; +import { join } from "path"; +import os from "os"; + +const pathDir = join(os.homedir(), "beckn-onix"); + +const executeCommand = (command) => { + return new Promise((resolve, reject) => { + exec(command, (error, stdout, stderr) => { + if (error) { + console.error("Error:", error); + reject(error); + return; + } + const output = stdout + stderr; + console.log("Output:", output); + resolve(output); + }); + }); +}; + +async function directoryExists(path) { + try { + await fs.access(path); + return true; + } catch (error) { + return false; + } +} +export async function startSupportServices() { + try { + process.env.COMPOSE_IGNORE_ORPHANS = "1"; + + const result1 = await executeCommand( + `docker-compose -f ${pathDir}/install/docker-compose-app.yml up -d mongo_db` + ); + console.log("Result 1:", result1); + + const result2 = await executeCommand( + `docker-compose -f ${pathDir}/install/docker-compose-app.yml up -d queue_service` + ); + console.log("Result 2:", result2); + + const result3 = await executeCommand( + `docker-compose -f ${pathDir}/install/docker-compose-app.yml up -d redis_db` + ); + console.log("Result 3:", result3); + await executeCommand("docker volume create registry_data_volume"); + await executeCommand("docker volume create registry_database_volume"); + await executeCommand("docker volume create gateway_data_volume"); + await executeCommand("docker volume create gateway_database_volume"); + return NextResponse.json({ result1, result2, result3 }); + } catch (error) { + console.error("An error occurred:", error); + return NextResponse.json({ error: "An error occurred" }, { status: 500 }); + } +} + +export async function POST(req) { + const becknOnixDirExists = await directoryExists(pathDir); + + if (!becknOnixDirExists) { + console.log(`Directory "${pathDir}" does not exist. Cloning repository...`); + try { + const response = await fetch(`${req.nextUrl.origin}/api/clonning-repo`); + if (!response.ok) { + console.error( + `Failed to clone repository: ${response.status} ${response.statusText}` + ); + return NextResponse.json( + { + error: `Failed to clone repository: ${response.status} ${response.statusText}`, + }, + { status: 500 } + ); + } + console.log("Repository cloned successfully."); + } catch (error) { + console.error("An error occurred while cloning the repository:", error); + return NextResponse.json( + { error: "An error occurred while cloning the repository" }, + { status: 500 } + ); + } + } + + try { + await startSupportServices(); + const data = await req.json(); + + const registryUrl = data.registryUrl; + const bapSubscriberId = data.subscriberId; + const bapSubscriberUrl = data.subscriberUrl; + const networkconfigurl = data.networkconfigurl; + // generating unqiuekey for bap subscriberId + const uniqueKeyId = bapSubscriberId + "-key"; + + let updateBapConfigCommand = `bash ${pathDir}/install/scripts/update_bap_config.sh ${registryUrl} ${bapSubscriberId} ${uniqueKeyId} ${bapSubscriberUrl} ${networkconfigurl}`; + const result1 = await executeCommand(updateBapConfigCommand); + console.log("Result 1:", result1); + const result3 = await executeCommand( + `docker-compose -f ${pathDir}/install/docker-compose-v2.yml up -d "bap-client"` + ); + console.log("Result 3:", result3); + + const result4 = await executeCommand( + `docker-compose -f ${pathDir}/install/docker-compose-v2.yml up -d "bap-network"` + ); + console.log("Result 4:", result4); + + return NextResponse.json({ result1, result3, result4 }); + } catch (error) { + console.error("An error occurred:", error); + return NextResponse.json({ error: "An error occurred" }, { status: 500 }); + } +} diff --git a/onix-gui/GUI/app/api/install-bpp/route.js b/onix-gui/GUI/app/api/install-bpp/route.js new file mode 100644 index 0000000..533aa62 --- /dev/null +++ b/onix-gui/GUI/app/api/install-bpp/route.js @@ -0,0 +1,124 @@ +import { exec } from "child_process"; +import { NextResponse } from "next/server"; +import { promises as fs } from "fs"; +import { join } from "path"; +import os from "os"; + +const pathDir = join(os.homedir(), "beckn-onix"); +async function directoryExists(path) { + try { + await fs.access(path); + return true; + } catch (error) { + return false; + } +} + +const executeCommand = (command) => { + return new Promise((resolve, reject) => { + exec(command, (error, stdout, stderr) => { + if (error) { + console.error("Error:", error); + reject(error); + return; + } + const output = stdout + stderr; + console.log("Output:", output); + resolve(output); + }); + }); +}; + +export async function startSupportServices() { + try { + process.env.COMPOSE_IGNORE_ORPHANS = "1"; + + const result1 = await executeCommand( + `docker-compose -f ${pathDir}/install/docker-compose-app.yml up -d mongo_db` + ); + console.log("Result 1:", result1); + + const result2 = await executeCommand( + `docker-compose -f ${pathDir}/install/docker-compose-app.yml up -d queue_service` + ); + console.log("Result 2:", result2); + + const result3 = await executeCommand( + `docker-compose -f ${pathDir}/install/docker-compose-app.yml up -d redis_db` + ); + console.log("Result 3:", result3); + await executeCommand("docker volume create registry_data_volume"); + await executeCommand("docker volume create registry_database_volume"); + await executeCommand("docker volume create gateway_data_volume"); + await executeCommand("docker volume create gateway_database_volume"); + return NextResponse.json({ result1, result2, result3 }); + } catch (error) { + console.error("An error occurred:", error); + return NextResponse.json({ error: "An error occurred" }, { status: 500 }); + } +} + +export async function POST(req, res) { + const becknOnixDirExists = await directoryExists(pathDir); + console.log("Installing Beckn Onix...", becknOnixDirExists); + + if (!becknOnixDirExists) { + console.log(`Directory beckn-onix does not exist. Cloning repository...`); + try { + const response = await fetch(`${req.nextUrl.origin}/api/clonning-repo`); + if (!response.ok) { + console.error( + `Failed to clone repository: ${response.status} ${response.statusText}` + ); + return NextResponse.json( + { + error: `Failed to clone repository: ${response.status} ${response.statusText}`, + }, + { status: 500 } + ); + } + console.log("Repository cloned successfully."); + } catch (error) { + console.error("An error occurred while cloning the repository:", error); + return NextResponse.json( + { error: "An error occurred while cloning the repository" }, + { status: 500 } + ); + } + } + + try { + await startSupportServices(); + const data = await req.json(); + const registryUrl = data.registryUrl; + const bppSubscriberId = data.subscriberId; + const bppSubscriberUrl = data.subscriberUrl; + const webhookUrl = data.webhookUrl; + // generating unqiuekey for bpp subscriberId + const uniqueKeyId = bppSubscriberId + "-key"; + let updateBppConfigCommand = `bash ${pathDir}/install/scripts/update_bpp_config.sh ${registryUrl} ${bppSubscriberId} ${uniqueKeyId} ${bppSubscriberUrl} ${webhookUrl}`; + const result1 = await executeCommand(updateBppConfigCommand); + console.log("Result 1:", result1); + + const result2 = await executeCommand("sleep 10"); + console.log("Result 2:", result2); + + const result3 = await executeCommand( + `docker-compose -f ${pathDir}/install/docker-compose-v2.yml up -d bpp-client` + ); + console.log("Result 3:", result3); + + const result4 = await executeCommand( + `docker-compose -f ${pathDir}/install/docker-compose-v2.yml up -d bpp-network` + ); + console.log("Result 4:", result4); + + const result5 = await executeCommand("sleep 10"); + console.log("Result 5:", result5); + + return NextResponse.json({ result1, result2, result3, result4, result5 }); + } catch (error) { + console.error("An error occurred:", error); + return NextResponse.json({ error: "An error occurred" }, { status: 500 }); + } +} diff --git a/onix-gui/GUI/app/api/install-gateway/route.js b/onix-gui/GUI/app/api/install-gateway/route.js new file mode 100644 index 0000000..3545f6e --- /dev/null +++ b/onix-gui/GUI/app/api/install-gateway/route.js @@ -0,0 +1,92 @@ +import { exec } from "child_process"; +import { NextResponse } from "next/server"; +import { promises as fs } from "fs"; +import { join } from "path"; +import os from "os"; + +async function directoryExists(path) { + try { + await fs.access(path); + return true; + } catch (error) { + return false; + } +} + +export async function POST(req, res) { + const pathDir = join(os.homedir(), "beckn-onix"); + const becknOnixDirExists = await directoryExists(pathDir); + console.log("Installing Beckn Onix...", becknOnixDirExists); + + if (!becknOnixDirExists) { + console.log(`Directory beckn-onix does not exist. Cloning repository...`); + try { + const response = await fetch(`${req.nextUrl.origin}/api/clonning-repo`); + if (!response.ok) { + console.error( + `Failed to clone repository: ${response.status} ${response.statusText}` + ); + return NextResponse.json( + { + error: `Failed to clone repository: ${response.status} ${response.statusText}`, + }, + { status: 500 } + ); + } + console.log("Repository cloned successfully."); + } catch (error) { + console.error("An error occurred while cloning the repository:", error); + return NextResponse.json( + { error: "An error occurred while cloning the repository" }, + { status: 500 } + ); + } + } + + const data = await req.json(); + const executeCommand = (command) => { + return new Promise((resolve, reject) => { + exec(command, (error, stdout, stderr) => { + if (error) { + console.error("Error:", error); + reject(error); + return; + } + const output = stdout + stderr; + console.log("Output:", output); + resolve(output); + }); + }); + }; + + try { + const result1 = await executeCommand( + `bash ${pathDir}/install/scripts/package_manager.sh` + ); + console.log("Result 1:", result1); + await executeCommand("docker volume create registry_data_volume"); + await executeCommand("docker volume create registry_database_volume"); + const result2 = await executeCommand( + ` bash ${pathDir}/install/scripts/update_gateway_details.sh ${data.registryUrl} ${data.gatewayUrl}` + ); + console.log("Result 2:", result2); + + const result3 = await executeCommand( + `docker-compose -f ${pathDir}/install/docker-compose-v2.yml up -d gateway` + ); + console.log("Result 3:", result3); + + const result4 = await executeCommand(`sleep 2`); + console.log("Result 4:", result4); + + const result5 = await executeCommand( + `bash ${pathDir}/install/scripts/register_gateway.sh ${data.gatewayUrl}` + ); + console.log("Result 5:", result5); + + return NextResponse.json({ result1, result2, result3, result4, result5 }); + } catch (error) { + console.error("An error occurred:", error); + return NextResponse.json({ error: "An error occurred" }, { status: 500 }); + } +} diff --git a/onix-gui/GUI/app/api/install-layer2/route.js b/onix-gui/GUI/app/api/install-layer2/route.js new file mode 100644 index 0000000..bf7d47a --- /dev/null +++ b/onix-gui/GUI/app/api/install-layer2/route.js @@ -0,0 +1,50 @@ +import { exec } from "child_process"; +import { NextResponse } from "next/server"; + +export async function POST(req) { + const request = await req.json(); + const fileURL = request.yamlUrl; + const containerName = request.container; + + const executeShellCommand = (command) => { + return new Promise((resolve, reject) => { + exec(command, (error, stdout, stderr) => { + if (error) { + console.error("Error:", error); + reject(error); + return; + } + if (stderr) { + console.error("Error:", stderr); + reject(new Error(stderr)); + return; + } + const output = stdout; + console.log("Output:", output); + resolve(output); + }); + }); + }; + + try { + await executeShellCommand( + `docker exec ${ + containerName + "-client" + } wget -P /usr/src/app/schemas/ ${fileURL}` + ); + } catch (error) { + console.error(`exec error: ${error}`); + } + + try { + await executeShellCommand( + `docker exec ${ + containerName + "-network" + } wget -P /usr/src/app/schemas/ ${fileURL}` + ); + return NextResponse.json({ status: 200 }); + } catch (error) { + console.error(`exec error: ${error}`); + return NextResponse.json({ status: 500 }); + } +} \ No newline at end of file diff --git a/onix-gui/GUI/app/api/install-registry/route.js b/onix-gui/GUI/app/api/install-registry/route.js new file mode 100644 index 0000000..70c4102 --- /dev/null +++ b/onix-gui/GUI/app/api/install-registry/route.js @@ -0,0 +1,156 @@ +import { exec } from "child_process"; +import { NextResponse } from "next/server"; +import { promises as fs } from "fs"; +import { tmpdir } from "os"; +import { join } from "path"; +import os from "os"; + +async function directoryExists(path) { + try { + await fs.access(path); + return true; + } catch (error) { + return false; + } +} + +export async function POST(req, res) { + const pathDir = join(os.homedir(), "beckn-onix"); + const becknOnixDirExists = await directoryExists(pathDir); + console.log("Installing Beckn Onix...", becknOnixDirExists); + + if (!becknOnixDirExists) { + console.log(`Directory beckn-onix does not exist. Cloning repository...`); + try { + const response = await fetch(`${req.nextUrl.origin}/api/clonning-repo`); + if (!response.ok) { + console.error( + `Failed to clone repository: ${response.status} ${response.statusText}` + ); + return NextResponse.json( + { + error: `Failed to clone repository: ${response.status} ${response.statusText}`, + }, + { status: 500 } + ); + } + console.log("Repository cloned successfully."); + } catch (error) { + console.error("An error occurred while cloning the repository:", error); + return NextResponse.json( + { error: "An error occurred while cloning the repository" }, + { status: 500 } + ); + } + } + + const data = await req.json(); + const executeCommand = (command) => { + return new Promise((resolve, reject) => { + exec(command, (error, stdout, stderr) => { + if (error) { + console.error("Error:", error); + reject(error); + return; + } + const output = stdout + stderr; + console.log("Output:", output); + resolve(output); + }); + }); + }; + const updateRegistryDetails = async (url) => { + let registryUrl = ""; + let registryPort = ""; + let protocol = ""; + + if (url) { + if (url.startsWith("https://")) { + registryUrl = url.replace("https://", ""); + registryPort = "443"; + protocol = "https"; + } else if (url.startsWith("http://")) { + registryUrl = url.replace("http://", ""); + registryPort = "80"; + protocol = "http"; + } + } else { + registryUrl = "registry"; + registryPort = "3030"; + protocol = "http"; + } + + console.log("Registry URL:", registryUrl); + + const configFile = join( + pathDir, + "install", + "registry_data", + "config", + "swf.properties" + ); + const sampleFile = join( + pathDir, + "install", + "registry_data", + "config", + "swf.properties-sample" + ); + + try { + await fs.copyFile(sampleFile, configFile); + const tempDir = join(os.homedir(), "beckn-onix", "tmp"); + await fs.mkdir(tempDir, { recursive: true }); // Create the temporary directory if it doesn't exist + + const tempFile = join(tempDir, "tempfile.XXXXXXXXXX"); + const configData = await fs.readFile(configFile, "utf8"); + const updatedConfigData = configData + .replace(/REGISTRY_URL/g, registryUrl) + .replace(/REGISTRY_PORT/g, registryPort) + .replace(/PROTOCOL/g, protocol); + + await fs.writeFile(tempFile, updatedConfigData); + await fs.rename(tempFile, configFile); + await executeCommand("docker volume create registry_data_volume"); + await executeCommand("docker volume create registry_database_volume"); + await executeCommand("docker volume create gateway_data_volume"); + await executeCommand("docker volume create gateway_database_volume"); + await executeCommand( + `docker run --rm -v ${join( + pathDir, + "install", + "registry_data", + "config" + )}:/source -v registry_data_volume:/target busybox sh -c "cp /source/envvars /target/ && cp /source/logger.properties /target/ && cp /source/swf.properties /target/"` + ); + + // Start the registry container + await executeCommand( + `docker-compose -f ${join( + pathDir, + "install", + "docker-compose-v2.yml" + )} up -d registry` + ); + + // Wait for 10 seconds + await new Promise((resolve) => setTimeout(resolve, 10000)); + + console.log("Registry installation successful"); + } catch (error) { + console.error("Error updating registry details:", error); + throw error; + } + }; + + try { + const url = data.registryUrl; + await updateRegistryDetails(url); + return NextResponse.json({ + message: "Registry details updated successfully", + }); + } catch (error) { + console.error("An error occurred:", error); + return NextResponse.json({ error: "An error occurred" }, { status: 500 }); + } +} diff --git a/onix-gui/GUI/app/favicon.ico b/onix-gui/GUI/app/favicon.ico new file mode 100644 index 0000000..718d6fe Binary files /dev/null and b/onix-gui/GUI/app/favicon.ico differ diff --git a/onix-gui/GUI/app/globals.css b/onix-gui/GUI/app/globals.css new file mode 100644 index 0000000..d0e8c4c --- /dev/null +++ b/onix-gui/GUI/app/globals.css @@ -0,0 +1,19 @@ +* { + padding: 0; + margin: 0; +} + +body{ + min-width: 100vw; + min-height: 100vh; + background-color: #000000; + color: white; + font-family: "Ubuntu Mono", monospace; + + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + +} diff --git a/onix-gui/GUI/app/install/configure/page.js b/onix-gui/GUI/app/install/configure/page.js new file mode 100644 index 0000000..4da2300 --- /dev/null +++ b/onix-gui/GUI/app/install/configure/page.js @@ -0,0 +1,58 @@ +"use client"; + +import Link from "next/link"; +import styles from "../../page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import Image from "next/image"; +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function Home() { + return ( + <> +
+
+ +

Configure Existing Network

+
+ +
+ arrow +

Gateway

+
+ + +
+ arrow +

BAP Adapter

+
+ + +
+ arrow +

BPP Adapter

+
+ +
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/install/create/page.js b/onix-gui/GUI/app/install/create/page.js new file mode 100644 index 0000000..0cf9db7 --- /dev/null +++ b/onix-gui/GUI/app/install/create/page.js @@ -0,0 +1,67 @@ +"use client"; + +import Link from "next/link"; +import styles from "../../page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import Image from "next/image"; +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function Home() { + return ( + <> +
+
+ +

Create a Production Network

+
+ +
+ arrow +

Gateway

+
+ + +
+ arrow +

BAP Adapter

+
+ + +
+ arrow +

BPP Adapter

+
+ + +
+ arrow +

Registry

+
+ +
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/install/join/page.js b/onix-gui/GUI/app/install/join/page.js new file mode 100644 index 0000000..619e14b --- /dev/null +++ b/onix-gui/GUI/app/install/join/page.js @@ -0,0 +1,68 @@ +"use client"; + +import Link from "next/link"; +import styles from "../../page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import Image from "next/image"; +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function Home() { + return ( + <> +
+
+ +

Join an existing network

+ +
+ +
+ arrow +

Gateway

+
+ + +
+ arrow +

BAP Adapter

+
+ + +
+ arrow +

BPP Adapter

+
+ +
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/install/local/page.js b/onix-gui/GUI/app/install/local/page.js new file mode 100644 index 0000000..7dbd607 --- /dev/null +++ b/onix-gui/GUI/app/install/local/page.js @@ -0,0 +1,60 @@ +"use client"; + +import Link from "next/link"; +import styles from "../../page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import Image from "next/image"; +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function Home() { + return ( + <> +
+
+ +

+ Set up a network on your local machine +

+
+ +
+ arrow +

Gateway

+
+ + +
+ arrow +

BAP Adapter

+
+ + +
+ arrow +

BPP Adapter

+
+ +
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/install/merge/page.js b/onix-gui/GUI/app/install/merge/page.js new file mode 100644 index 0000000..7391660 --- /dev/null +++ b/onix-gui/GUI/app/install/merge/page.js @@ -0,0 +1,58 @@ +"use client"; + +import Link from "next/link"; +import styles from "../../page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import Image from "next/image"; +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function Home() { + return ( + <> +
+
+ +

Merge multiple networks

+
+ +
+ arrow +

Gateway

+
+ + +
+ arrow +

BAP

+
+ + +
+ arrow +

BPP

+
+ +
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/install/page.js b/onix-gui/GUI/app/install/page.js new file mode 100644 index 0000000..a196231 --- /dev/null +++ b/onix-gui/GUI/app/install/page.js @@ -0,0 +1,54 @@ +"use client"; + +import Link from "next/link"; +import styles from "../page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import Image from "next/image"; +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function Home() { + return ( + <> +
+
+ +

ONIX

+

+ Open Network In A Box, is a project designed to effortlessly set up + and maintain Beckn network that is scalable, secure and easy to + maintain. +

+
+ +
+ arrow +

Join an existing network

+
+ + +
+ arrow +

Create new production network

+
+ +
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/layout.js b/onix-gui/GUI/app/layout.js new file mode 100644 index 0000000..e461a93 --- /dev/null +++ b/onix-gui/GUI/app/layout.js @@ -0,0 +1,22 @@ +import { Inter } from "next/font/google"; +import "./globals.css"; +import { ToastContainer, toast } from "react-toastify"; +import "react-toastify/dist/ReactToastify.css"; +import { Bounce } from "react-toastify"; +const inter = Inter({ subsets: ["latin"] }); + +export const metadata = { + title: "ONIX GUI", + description: "Generated by create next app", +}; + +export default function RootLayout({ children }) { + return ( + + + {children} + + + + ); +} diff --git a/onix-gui/GUI/app/page.js b/onix-gui/GUI/app/page.js new file mode 100644 index 0000000..600fc62 --- /dev/null +++ b/onix-gui/GUI/app/page.js @@ -0,0 +1,55 @@ +import Link from "next/link"; +import styles from "./page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import Image from "next/image"; +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function Home() { + return ( + <> +
+
+

ONIX

+

+ Open Network In A Box, is a project designed to effortlessly set up + and maintain Beckn network that is scalable, secure and easy to + maintain. +

+
+ +
+ arrow +

Installation Wizard

+
+ + {/* +
+ arrow +

Network Monitor

+
+ */} + +
+ arrow +

Layer 2 Tester

+
+ +
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/page.module.css b/onix-gui/GUI/app/page.module.css new file mode 100644 index 0000000..1947e56 --- /dev/null +++ b/onix-gui/GUI/app/page.module.css @@ -0,0 +1,182 @@ +.mainHeading { + font-size: 5rem; + margin-bottom: 1rem; + text-align: center; +} + +.mainText { + font-size: 1.5rem; + max-width: 55rem; + text-align: center; + margin: auto; + margin-bottom: 1rem; +} + +.boxesContainer { + margin-top: 2rem; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + + flex-wrap: wrap; +} + +.secondBoxesContainer { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + flex-wrap: wrap; +} + +.box { + position: relative; + + width: 15rem; + height: 15rem; + border: 1px solid rgb(61, 61, 61); + + display: flex; + flex-direction: column; + justify-content: flex-end; + align-self: center; + text-align: center; + + font-size: 1.25rem; + padding: 1rem; +} + +.box p { + max-width: 12rem; + margin: 0 auto; +} + +.box img { + width: 2rem; + position: absolute; + + top: 1rem; + right: 1rem; +} + +.smallbox { + position: relative; + + width: 12rem; + height: 12rem; + border: 1px solid rgb(61, 61, 61); + + display: flex; + flex-direction: column; + justify-content: flex-end; + align-self: center; + text-align: center; + + font-size: 1.25rem; + padding: 1rem; +} + +.smallbox p { + max-width: 12rem; + margin: 0 auto; +} + +.smallbox img { + width: 2rem; + position: absolute; + + top: 1rem; + right: 1rem; +} + + +.formContainer { + padding: 1rem; + border: 1px solid rgb(61, 61, 61); + border-radius: 30px; +} + +.buttonsContainer { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + column-gap: 0.5rem; + margin-top: 1rem; + margin-bottom: 1rem; +} + +.currentRoute { + margin-bottom: 6rem; + font-family: "Ubuntu Mono", monospace; + font-size: 1.25rem; + font-weight: 600; + + text-align: center; +} + +.backButton { + position: absolute; + top: 1rem; + left: 1rem; + font-size: 1.25rem; + padding: 0.5rem; + border: 1px solid rgb(61, 61, 61); + background-color: transparent; + color: white; + cursor: pointer; +} + +.dashboard { + margin-bottom: 2rem; +} + +.dashboardHeading { + font-size: 2rem; + margin-bottom: 1rem; + text-align: center; +} + +.dashboardTable { + width: 100%; + border-collapse: collapse; + font-size: 1.25rem; + font-family: "Ubuntu Mono", monospace; + border: 1px solid rgb(61, 61, 61); +} + +.dashboardTable th, +.dashboardTable td { + padding: 1rem; + text-align: left; + border-bottom: 1px solid rgb(61, 61, 61); +} + +.dashboardTable th { + font-weight: 600; +} + +@media screen and (max-width: 600px) { + .dashboardTable { + font-size: 1rem; + } + + .dashboardTable th, + .dashboardTable td { + padding: 0.5rem; + } +} + +.counts { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + margin-top: 1rem; + margin-bottom: 2rem; +} + +.count { + max-width: 10rem; +} \ No newline at end of file diff --git a/onix-gui/GUI/app/setup/bap/page.js b/onix-gui/GUI/app/setup/bap/page.js new file mode 100644 index 0000000..2613e6e --- /dev/null +++ b/onix-gui/GUI/app/setup/bap/page.js @@ -0,0 +1,132 @@ +"use client"; + +import InputField from "@/components/InputField/InputField"; +import styles from "../../page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import SecondaryButton from "@/components/Buttons/SecondaryButton"; +import PrimaryButton from "@/components/Buttons/PrimaryButton"; +import { useState, useCallback } from "react"; +import { toast } from "react-toastify"; + +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function Home() { + const [subscriberUrl, setSubscriberUrl] = useState(""); + const [subscriberId, setSubscriberId] = useState(""); + const [registryUrl, setRegistryUrl] = useState(""); + const [buttonDisable, setButtonDisable] = useState(false); + const [networkconfigurl, setNetworkconfigurl] = useState(""); + + const handleSubscriberUrlChange = (event) => { + setSubscriberUrl(event.target.value); + }; + + const handleSubscriberIdChange = (event) => { + setSubscriberId(event.target.value); + }; + + const handleRegistryUrlChange = (event) => { + setRegistryUrl(event.target.value); + }; + + const handleNetworkconfigurlChange = (event) => { + setNetworkconfigurl(event.target.value); + }; + const installBap = useCallback(async () => { + const toastId = toast.loading("Installing BAP..."); + setButtonDisable(true); + try { + const response = await fetch("/api/install-bap", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + subscriberUrl, + subscriberId, + registryUrl, + networkconfigurl, + }), + }); + + if (response.ok) { + console.log("BPP installed successfully"); + toast.update(toastId, { + render: "BPP installed successfully 👌", + type: "success", + isLoading: false, + autoClose: 5000, + }); + } else { + console.error("Failed to install BAP"); + toast.update(toastId, { + render: "Failed to install BAP 🤯", + type: "error", + isLoading: false, + autoClose: 5000, + }); + } + } catch (error) { + console.error("An error occurred:", error); + toast.update(toastId, { + render: "Bap installation done", + type: "success", + isLoading: false, + autoClose: 5000, + }); + } + setButtonDisable(false); + }, [subscriberUrl, subscriberId, registryUrl, networkconfigurl]); + + return ( + <> +
+
+ +

BAP

+
+ + + + + + +
+ {/* */} + +
+
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/setup/bpp/page.js b/onix-gui/GUI/app/setup/bpp/page.js new file mode 100644 index 0000000..3d37d00 --- /dev/null +++ b/onix-gui/GUI/app/setup/bpp/page.js @@ -0,0 +1,146 @@ +"use client"; + +import InputField from "@/components/InputField/InputField"; +import styles from "../../page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import SecondaryButton from "@/components/Buttons/SecondaryButton"; +import PrimaryButton from "@/components/Buttons/PrimaryButton"; +import { useState, useCallback } from "react"; +import { toast } from "react-toastify"; + +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function Home() { + const [subscriberUrl, setSubscriberUrl] = useState(""); + const [subscriberId, setSubscriberId] = useState(""); + const [registryUrl, setRegistryUrl] = useState(""); + const [networkconfigurl, setNetworkconfigurl] = useState(""); + const [webhookUrl, setWebhookUrl] = useState(""); + const [buttonDisable, setButtonDisable] = useState(false); + const handleSubscriberUrlChange = (event) => { + setSubscriberUrl(event.target.value); + }; + + const handleSubscriberIdChange = (event) => { + setSubscriberId(event.target.value); + }; + + const handleRegistryUrlChange = (event) => { + setRegistryUrl(event.target.value); + }; + const handleNetworkconfigurlChange = (event) => { + setNetworkconfigurl(event.target.value); + }; + const handleWebhookUrlChange = (event) => { + setWebhookUrl(event.target.value); + }; + + const installBpp = useCallback(async () => { + const toastId = toast.loading("Installing BPP..."); + setButtonDisable(true); + try { + const response = await toast.promise( + fetch("/api/install-bpp", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + subscriberUrl: subscriberUrl, + subscriberId: subscriberId, + registryUrl: registryUrl, + networkconfigurl: networkconfigurl, + webhookUrl: webhookUrl, + }), + }), + { + success: "BPP installed successfully 👌", + error: "Failed to install BPP 🤯", + } + ); + + if (response.ok) { + console.log("BPP installed successfully"); + toast.update(toastId, { + render: "BPP installed successfully 👌", + type: "success", + isLoading: false, + autoClose: 5000, + }); + } else { + console.error("Failed to install BPP"); + toast.update(toastId, { + render: "Failed to install BPP 🤯", + type: "error", + isLoading: false, + autoClose: 5000, + }); + } + } catch (error) { + console.error("An error occurred:", error); + toast.update(toastId, { + render: "An error occurred while installing BPP 😥", + type: "error", + isLoading: false, + autoClose: 5000, + }); + } + setButtonDisable(false); + }, [subscriberUrl, subscriberId, registryUrl, networkconfigurl, webhookUrl]); + return ( + <> +
+
+ +

BPP

+
+ + + + + + + +
+ {/* */} + +
+
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/setup/gateway/page.js b/onix-gui/GUI/app/setup/gateway/page.js new file mode 100644 index 0000000..41be273 --- /dev/null +++ b/onix-gui/GUI/app/setup/gateway/page.js @@ -0,0 +1,126 @@ +"use client"; + +import InputField from "@/components/InputField/InputField"; +import styles from "../../page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import { useState, useCallback } from "react"; +import SecondaryButton from "@/components/Buttons/SecondaryButton"; +import PrimaryButton from "@/components/Buttons/PrimaryButton"; +import { usePathname } from "next/navigation"; +import { toast } from "react-toastify"; + +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function Home() { + let pathname = usePathname(); + const [gatewayUrl, setGatewayUrl] = useState(""); + const [registryUrl, setRegistryUrl] = useState(""); + const [networkconfigurl, setNetworkconfigurl] = useState(""); + + const handleGatewayUrlChange = (event) => { + setGatewayUrl(event.target.value); + }; + const handleRegistryUrlChange = (event) => { + setRegistryUrl(event.target.value); + }; + const handleNetworkconfigurlChange = (event) => { + setNetworkconfigurl(event.target.value); + }; + + const installGateway = useCallback(async () => { + const toastId = toast.loading("Installing gateway..."); + + try { + const response = await toast.promise( + fetch("/api/install-gateway", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + gatewayUrl: gatewayUrl, + registryUrl: registryUrl, + networkconfigurl: networkconfigurl, + }), + }), + { + success: "gateway installed successfully 👌", + error: "Failed to install BAP 🤯", + } + ); + + if (response.ok) { + console.log("Gateway installed successfully"); + toast.update(toastId, { + render: "Gateway installed successfully 👌", + type: "success", + isLoading: false, + autoClose: 5000, + }); + } else { + console.error("Failed to install gateway"); + toast.update(toastId, { + render: "Failed to install gateway 🤯", + type: "error", + isLoading: false, + autoClose: 5000, + }); + } + } catch (error) { + console.error("An error occurred:", error); + toast.update(toastId, { + render: "An error occurred while installing the gateway 😥", + type: "error", + isLoading: false, + autoClose: 5000, + }); + } + }, [gatewayUrl, registryUrl, networkconfigurl]); + return ( + <> +
+
+ +

Gateway

+
+ {/* To do todo + 1. Create a check function so that the url formats are correct + 2. Send response when installing and also erros that happen when an envet happens to the user + 3. a gear dialog where the user's can specify to where the beckn repo to be cloned. + */} + + + + + +
+ {/* */} + +
+
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/setup/registry/page.js b/onix-gui/GUI/app/setup/registry/page.js new file mode 100644 index 0000000..6fce954 --- /dev/null +++ b/onix-gui/GUI/app/setup/registry/page.js @@ -0,0 +1,96 @@ +"use client"; +import SecondaryButton from "@/components/Buttons/SecondaryButton"; +import styles from "../../page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import PrimaryButton from "@/components/Buttons/PrimaryButton"; +import InputField from "@/components/InputField/InputField"; +import { useState, useCallback } from "react"; +import { toast } from "react-toastify"; + +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function Home() { + const [registryUrl, setRegistryUrl] = useState(""); + + const handleRegistryUrlChange = (event) => { + setRegistryUrl(event.target.value); + }; + + const installRegistry = useCallback(async () => { + const toastId = toast.loading("Installing registry..."); + + try { + const response = await toast.promise( + fetch("/api/install-registry", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ registryUrl: registryUrl }), + }), + { + success: "registry installed successfully 👌", + error: "Failed to install registry 🤯", + } + ); + console.log("console.log of response", response); + + if (response.ok) { + console.log("Repository cloned successfully"); + toast.update(toastId, { + render: "Registry installed successfully 👌", + type: "success", + isLoading: false, + autoClose: 5000, + }); + } else { + console.error("Failed to clone repository"); + toast.update(toastId, { + render: "Failed to install registry 🤯", + type: "error", + isLoading: false, + autoClose: 5000, + }); + } + } catch (error) { + console.error("An error occurred:", error); + toast.update(toastId, { + render: "An error occurred while installing the registry 😥", + type: "error", + isLoading: false, + autoClose: 5000, + }); + } + }, [registryUrl]); + + return ( + <> +
+
+ +

Registry

+
+ +
+ {/* */} + +
+
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/template.csv b/onix-gui/GUI/app/template.csv new file mode 100644 index 0000000..d9ea810 --- /dev/null +++ b/onix-gui/GUI/app/template.csv @@ -0,0 +1 @@ +name,email,phone_number,district,category,organization,customfile,checkbox_field,date_field,datetime_field,time_field,number_field,rating_field diff --git a/onix-gui/GUI/app/yaml-gen/install-yaml/page.js b/onix-gui/GUI/app/yaml-gen/install-yaml/page.js new file mode 100644 index 0000000..b6b1129 --- /dev/null +++ b/onix-gui/GUI/app/yaml-gen/install-yaml/page.js @@ -0,0 +1,105 @@ +"use client"; +import SecondaryButton from "@/components/Buttons/SecondaryButton"; +import styles from "../../page.module.css"; +import { Ubuntu_Mono } from "next/font/google"; +import Slider from "@/components/Slider/Slider"; +import PrimaryButton from "@/components/Buttons/PrimaryButton"; +import InputField from "@/components/InputField/InputField"; +import { useState, useCallback } from "react"; +import { toast } from "react-toastify"; + +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function InstallYaml() { + const [yamlUrl, setYamlUrl] = useState(""); + const [checked, setChecked] = useState(false); + + const container = checked ? "bpp" : "bap"; + + const handleRegistryUrlChange = (event) => { + setYamlUrl(event.target.value); + }; + + const installYaml = useCallback(async () => { + const toastId = toast.loading("Installing Layer 2 Config file..."); + + try { + const response = await fetch("/api/install-layer2", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ container, yamlUrl }), + }); + + if (response.ok) { + const data = await response.json(); + console.log(data); + const FileFound = data.message; + if (FileFound == false) { + setShowDownloadLayer2Button(true); + toast.update(toastId, { + render: "No Layer 2 Config Present 🤯", + type: "error", + isLoading: false, + autoClose: 5000, + }); + } else { + toast.update(toastId, { + render: "Yaml File Downloaded 👌", + type: "success", + isLoading: false, + autoClose: 5000, + }); + } + } else { + console.error("Failed to check yaml"); + toast.update(toastId, { + render: "Container Not Found 🤯", + type: "error", + isLoading: false, + autoClose: 5000, + }); + } + } catch (error) { + console.error("An error occurred:", error); + } + }); + + return ( + <> +
+
+ +

Install Yaml

+
+ + +
+ {/* */} + +
+
+
+
+ + ); +} diff --git a/onix-gui/GUI/app/yaml-gen/page.js b/onix-gui/GUI/app/yaml-gen/page.js new file mode 100644 index 0000000..6015abe --- /dev/null +++ b/onix-gui/GUI/app/yaml-gen/page.js @@ -0,0 +1,144 @@ +"use client"; +import { useState } from "react"; +import { Ubuntu_Mono } from "next/font/google"; +import PrimaryButton from "@/components/Buttons/PrimaryButton"; +import InputField from "@/components/InputField/InputField"; +import Slider from "@/components/Slider/Slider"; +import styles from "../page.module.css"; +import { toast } from "react-toastify"; + +import Link from "next/link"; + +const ubuntuMono = Ubuntu_Mono({ + weight: "400", + style: "normal", + subsets: ["latin"], +}); + +export default function CheckYaml() { + const [domainName, setDomainName] = useState(""); + const [versionNumber, setversionNumber] = useState(""); + const [checked, setChecked] = useState(false); + const [showDownloadLayer2Button, setShowDownloadLayer2Button] = + useState(false); + const [propertyLink, setPropertyLink] = useState(""); + + const handleYamlChange = (event) => { + setPropertyLink(event.target.value); + }; + const handledomainNameChange = (event) => { + setDomainName(event.target.value); + }; + const handleVersionChange = (event) => { + setversionNumber(event.target.value); + }; + const nameGenerator = async () => { + const parts = domainName.split(":"); + const domainNameWithoutVersion = parts[0]; + let filename; + if (parts[1] === undefined || parts[1] === "") { + filename = `${domainNameWithoutVersion}_${versionNumber}.yaml`; + } else { + filename = `${domainNameWithoutVersion}_${parts[1]}_${versionNumber}.yaml`; + } + console.log(filename); + return filename; + }; + + const handleOnclick = async () => { + const fileName = await nameGenerator(); + const toastId = toast.loading("Checking for layer2 yaml file"); + try { + const response = await fetch("/api/check-layer2", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ checked, fileName }), + }); + + if (response.ok) { + const data = await response.json(); + const FileFound = data.message; + if (FileFound == false) { + setShowDownloadLayer2Button(true); + toast.update(toastId, { + render: "No Layer 2 Config Present 🤯", + type: "error", + isLoading: false, + autoClose: 5000, + }); + } else { + toast.update(toastId, { + render: "Yaml File Present 👌", + type: "success", + isLoading: false, + autoClose: 5000, + }); + } + } else { + console.error("Failed to check yaml"); + toast.update(toastId, { + render: "Container Not Found 🤯", + type: "error", + isLoading: false, + autoClose: 5000, + }); + } + } catch (error) { + console.error("An error occurred:", error); + } + }; + return ( + <> +
+ + +
+

+ Yaml File Checker +

+ +
+ + + + + +
+ +
+ {showDownloadLayer2Button && ( + + )} +
+
+
+ + ); +} diff --git a/onix-gui/GUI/components/Buttons/Buttons.module.css b/onix-gui/GUI/components/Buttons/Buttons.module.css new file mode 100644 index 0000000..64f7a6a --- /dev/null +++ b/onix-gui/GUI/components/Buttons/Buttons.module.css @@ -0,0 +1,24 @@ +.primaryButton { + background-color: #abd4fa; + color: #000000; + padding: 0.5rem 1rem; + border-radius: 10px; + border: none; + font-size: 1rem; + cursor: pointer; + + padding: 0.75rem 2rem; +} + +.secondaryButton { + background-color: #000000; + color: #abd4fa; + padding: 0.5rem 1rem; + border-radius: 10px; + border: none; + font-size: 1rem; + cursor: pointer; + + border: 1px solid #abd4fa; + padding: 0.75rem 2.25rem; +} diff --git a/onix-gui/GUI/components/Buttons/PrimaryButton.js b/onix-gui/GUI/components/Buttons/PrimaryButton.js new file mode 100644 index 0000000..57a18c5 --- /dev/null +++ b/onix-gui/GUI/components/Buttons/PrimaryButton.js @@ -0,0 +1,16 @@ +import React from "react"; +import styles from "./Buttons.module.css"; + +const PrimaryButton = ({ label = "continue", onClick, disabled = false }) => { + return ( + + ); +}; + +export default PrimaryButton; diff --git a/onix-gui/GUI/components/Buttons/SecondaryButton.jsx b/onix-gui/GUI/components/Buttons/SecondaryButton.jsx new file mode 100644 index 0000000..97a3564 --- /dev/null +++ b/onix-gui/GUI/components/Buttons/SecondaryButton.jsx @@ -0,0 +1,8 @@ +import React from "react"; +import styles from "./Buttons.module.css"; + +const SecondaryButton = () => { + return ; +}; + +export default SecondaryButton; diff --git a/onix-gui/GUI/components/InputField/InputField.jsx b/onix-gui/GUI/components/InputField/InputField.jsx new file mode 100644 index 0000000..aac6551 --- /dev/null +++ b/onix-gui/GUI/components/InputField/InputField.jsx @@ -0,0 +1,19 @@ +import React from "react"; +import styles from "./InputField.module.css"; + +const InputField = ({ label, value, onChange, placeholder = "Input Text" }) => { + return ( +
+ + +
+ ); +}; + +export default InputField; diff --git a/onix-gui/GUI/components/InputField/InputField.module.css b/onix-gui/GUI/components/InputField/InputField.module.css new file mode 100644 index 0000000..e3c2efc --- /dev/null +++ b/onix-gui/GUI/components/InputField/InputField.module.css @@ -0,0 +1,23 @@ +.inputContainer { + display: flex; + flex-direction: column; + margin: 1.5rem 1rem; +} + +.inputLabel { + font-size: 1rem; + font-weight: bold; + margin-bottom: 0.5rem; +} + +.inputField { + padding: 1rem; + font-family: "Ubuntu Mono", sans-serif; + color: white; + font-size: 1rem; + border-radius: 15px; + border: 1px solid rgb(61, 61, 61); + background: #000000; + + min-width:15rem +} diff --git a/onix-gui/GUI/components/Slider/Slider.jsx b/onix-gui/GUI/components/Slider/Slider.jsx new file mode 100644 index 0000000..5c03937 --- /dev/null +++ b/onix-gui/GUI/components/Slider/Slider.jsx @@ -0,0 +1,20 @@ +import React from "react"; +import styles from "./Slider.module.css"; + +const Slider = ({ label, checked, toggleChecked }) => { + return ( +
+ + +
+ ); +}; + +export default Slider; diff --git a/onix-gui/GUI/components/Slider/Slider.module.css b/onix-gui/GUI/components/Slider/Slider.module.css new file mode 100644 index 0000000..749e1c3 --- /dev/null +++ b/onix-gui/GUI/components/Slider/Slider.module.css @@ -0,0 +1,67 @@ +.switch { + transform: scale(0.75); + position: relative; + display: inline-block; + width: 60px; + height: 34px; +} + +.inputContainer { + display: flex; + + align-items: center; + justify-content: space-around; +} + +.switch input { + opacity: 0; + width: 0; + height: 0; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: white; + -webkit-transition: .4s; + transition: .4s; +} + +.slider:before { + position: absolute; + content: ""; + height: 26px; + width: 26px; + left: 4px; + bottom: 4px; + background-color: black; + -webkit-transition: .4s; + transition: .4s; +} + +input:checked+.slider { + background-color: #9dc5e6; +} + +input:focus+.slider { + box-shadow: 0 0 1px white; +} + +input:checked+.slider:before { + -webkit-transform: translateX(26px); + -ms-transform: translateX(26px); + transform: translateX(26px); +} + +/* Rounded sliders */ +.slider.round { + border-radius: 34px; +} + +.slider.round:before { + border-radius: 50%; +} \ No newline at end of file diff --git a/onix-gui/GUI/jsconfig.json b/onix-gui/GUI/jsconfig.json new file mode 100644 index 0000000..2a2e4b3 --- /dev/null +++ b/onix-gui/GUI/jsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "paths": { + "@/*": ["./*"] + } + } +} diff --git a/onix-gui/GUI/next.config.mjs b/onix-gui/GUI/next.config.mjs new file mode 100644 index 0000000..4678774 --- /dev/null +++ b/onix-gui/GUI/next.config.mjs @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {}; + +export default nextConfig; diff --git a/onix-gui/GUI/package-lock.json b/onix-gui/GUI/package-lock.json new file mode 100644 index 0000000..6714052 --- /dev/null +++ b/onix-gui/GUI/package-lock.json @@ -0,0 +1,4247 @@ +{ + "name": "onix-gui", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "onix-gui", + "version": "0.1.0", + "dependencies": { + "child_process": "^1.0.2", + "next": "14.1.4", + "react": "^18", + "react-dom": "^18", + "react-toastify": "^10.0.5" + }, + "devDependencies": { + "eslint": "^8", + "eslint-config-next": "14.1.4" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", + "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@next/env": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.4.tgz", + "integrity": "sha512-e7X7bbn3Z6DWnDi75UWn+REgAbLEqxI8Tq2pkFOFAMpWAWApz/YCUhtWMWn410h8Q2fYiYL7Yg5OlxMOCfFjJQ==" + }, + "node_modules/@next/eslint-plugin-next": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.1.4.tgz", + "integrity": "sha512-n4zYNLSyCo0Ln5b7qxqQeQ34OZKXwgbdcx6kmkQbywr+0k6M3Vinft0T72R6CDAcDrne2IAgSud4uWCzFgc5HA==", + "dev": true, + "dependencies": { + "glob": "10.3.10" + } + }, + "node_modules/@next/swc-darwin-arm64": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.4.tgz", + "integrity": "sha512-ubmUkbmW65nIAOmoxT1IROZdmmJMmdYvXIe8211send9ZYJu+SqxSnJM4TrPj9wmL6g9Atvj0S/2cFmMSS99jg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.4.tgz", + "integrity": "sha512-b0Xo1ELj3u7IkZWAKcJPJEhBop117U78l70nfoQGo4xUSvv0PJSTaV4U9xQBLvZlnjsYkc8RwQN1HoH/oQmLlQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.4.tgz", + "integrity": "sha512-457G0hcLrdYA/u1O2XkRMsDKId5VKe3uKPvrKVOyuARa6nXrdhJOOYU9hkKKyQTMru1B8qEP78IAhf/1XnVqKA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.4.tgz", + "integrity": "sha512-l/kMG+z6MB+fKA9KdtyprkTQ1ihlJcBh66cf0HvqGP+rXBbOXX0dpJatjZbHeunvEHoBBS69GYQG5ry78JMy3g==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.4.tgz", + "integrity": "sha512-BapIFZ3ZRnvQ1uWbmqEGJuPT9cgLwvKtxhK/L2t4QYO7l+/DxXuIGjvp1x8rvfa/x1FFSsipERZK70pewbtJtw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.4.tgz", + "integrity": "sha512-mqVxTwk4XuBl49qn2A5UmzFImoL1iLm0KQQwtdRJRKl21ylQwwGCxJtIYo2rbfkZHoSKlh/YgztY0qH3wG1xIg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.4.tgz", + "integrity": "sha512-xzxF4ErcumXjO2Pvg/wVGrtr9QQJLk3IyQX1ddAC/fi6/5jZCZ9xpuL9Tzc4KPWMFq8GGWFVDMshZOdHGdkvag==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-ia32-msvc": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.4.tgz", + "integrity": "sha512-WZiz8OdbkpRw6/IU/lredZWKKZopUMhcI2F+XiMAcPja0uZYdMTZQRoQ0WZcvinn9xZAidimE7tN9W5v9Yyfyw==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.4.tgz", + "integrity": "sha512-4Rto21sPfw555sZ/XNLqfxDUNeLhNYGO2dlPqsnuCg8N8a2a9u1ltqBOPQ4vj1Gf7eJC0W2hHG2eYUHuiXgY2w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rushstack/eslint-patch": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.9.0.tgz", + "integrity": "sha512-AAWymnpvHbGty1BmgbdfbqQDboXs6xN6h2yAacO4yKVyyUUBnpYkp+P9jjPrV9zrAGw7JVVriRtGOHPInnfjZQ==", + "dev": true + }, + "node_modules/@swc/helpers": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz", + "integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.findlast": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.toreversed": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", + "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + } + }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz", + "integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.1.0", + "es-shim-unscopables": "^1.0.2" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ast-types-flow": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", + "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", + "dev": true + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axe-core": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz", + "integrity": "sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/axobject-query": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", + "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", + "dev": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001600", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz", + "integrity": "sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/child_process": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/child_process/-/child_process-1.0.2.tgz", + "integrity": "sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g==" + }, + "node_modules/client-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", + "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" + }, + "node_modules/clsx": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/damerau-levenshtein": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", + "dev": true + }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/enhanced-resolve": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", + "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/es-abstract": { + "version": "1.23.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.2.tgz", + "integrity": "sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.5", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-iterator-helpers": { + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz", + "integrity": "sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "iterator.prototype": "^1.1.2", + "safe-array-concat": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-next": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.1.4.tgz", + "integrity": "sha512-cihIahbhYAWwXJwZkAaRPpUi5t9aOi/HdfWXOjZeUOqNWXHD8X22kd1KG58Dc3MVaRx3HoR/oMGk2ltcrqDn8g==", + "dev": true, + "dependencies": { + "@next/eslint-plugin-next": "14.1.4", + "@rushstack/eslint-patch": "^1.3.3", + "@typescript-eslint/parser": "^5.4.2 || ^6.0.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-import-resolver-typescript": "^3.5.2", + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-jsx-a11y": "^6.7.1", + "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.5.0 || 5.0.0-canary-7118f5dd7-20230705" + }, + "peerDependencies": { + "eslint": "^7.23.0 || ^8.0.0", + "typescript": ">=3.3.1" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", + "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "fast-glob": "^3.3.1", + "get-tsconfig": "^4.5.0", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", + "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-jsx-a11y": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz", + "integrity": "sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.23.2", + "aria-query": "^5.3.0", + "array-includes": "^3.1.7", + "array.prototype.flatmap": "^1.3.2", + "ast-types-flow": "^0.0.8", + "axe-core": "=4.7.0", + "axobject-query": "^3.2.1", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "es-iterator-helpers": "^1.0.15", + "hasown": "^2.0.0", + "jsx-ast-utils": "^3.3.5", + "language-tags": "^1.0.9", + "minimatch": "^3.1.2", + "object.entries": "^1.1.7", + "object.fromentries": "^2.0.7" + }, + "engines": { + "node": ">=4.0" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.34.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.1.tgz", + "integrity": "sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.7", + "array.prototype.findlast": "^1.2.4", + "array.prototype.flatmap": "^1.3.2", + "array.prototype.toreversed": "^1.1.2", + "array.prototype.tosorted": "^1.1.3", + "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.17", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.7", + "object.fromentries": "^2.0.7", + "object.hasown": "^1.1.3", + "object.values": "^1.1.7", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.10" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", + "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", + "dev": true, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/eslint-plugin-react/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/eslint-plugin-react/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-tsconfig": { + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", + "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finalizationregistry": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", + "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/iterator.prototype": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", + "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.4", + "set-function-name": "^2.0.1" + } + }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsx-ast-utils": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/language-subtag-registry": { + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", + "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", + "dev": true + }, + "node_modules/language-tags": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", + "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", + "dev": true, + "dependencies": { + "language-subtag-registry": "^0.3.20" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/next": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/next/-/next-14.1.4.tgz", + "integrity": "sha512-1WTaXeSrUwlz/XcnhGTY7+8eiaFvdet5z9u3V2jb+Ek1vFo0VhHKSAIJvDWfQpttWjnyw14kBeq28TPq7bTeEQ==", + "dependencies": { + "@next/env": "14.1.4", + "@swc/helpers": "0.5.2", + "busboy": "1.6.0", + "caniuse-lite": "^1.0.30001579", + "graceful-fs": "^4.2.11", + "postcss": "8.4.31", + "styled-jsx": "5.1.1" + }, + "bin": { + "next": "dist/bin/next" + }, + "engines": { + "node": ">=18.17.0" + }, + "optionalDependencies": { + "@next/swc-darwin-arm64": "14.1.4", + "@next/swc-darwin-x64": "14.1.4", + "@next/swc-linux-arm64-gnu": "14.1.4", + "@next/swc-linux-arm64-musl": "14.1.4", + "@next/swc-linux-x64-gnu": "14.1.4", + "@next/swc-linux-x64-musl": "14.1.4", + "@next/swc-win32-arm64-msvc": "14.1.4", + "@next/swc-win32-ia32-msvc": "14.1.4", + "@next/swc-win32-x64-msvc": "14.1.4" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.1.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "sass": "^1.3.0" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + }, + "sass": { + "optional": true + } + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", + "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.hasown": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz", + "integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-scurry": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postcss": { + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "node_modules/react-toastify": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-10.0.5.tgz", + "integrity": "sha512-mNKt2jBXJg4O7pSdbNUfDdTsK9FIdikfsIE/yUCxbAEXl4HMyJaivrVFcn3Elvt5xvCQYhUZm+hqTIu1UXM3Pw==", + "dependencies": { + "clsx": "^2.1.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", + "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.1", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/string.prototype.matchall": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", + "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "regexp.prototype.flags": "^1.5.2", + "set-function-name": "^2.0.2", + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/styled-jsx": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz", + "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==", + "dependencies": { + "client-only": "0.0.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "peerDependencies": { + "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", + "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", + "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "dev": true, + "dependencies": { + "function.prototype.name": "^1.1.5", + "has-tostringtag": "^1.0.0", + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dev": true, + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/onix-gui/GUI/package.json b/onix-gui/GUI/package.json new file mode 100644 index 0000000..38899c1 --- /dev/null +++ b/onix-gui/GUI/package.json @@ -0,0 +1,22 @@ +{ + "name": "onix-gui", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "child_process": "^1.0.2", + "next": "14.1.4", + "react": "^18", + "react-dom": "^18", + "react-toastify": "^10.0.5" + }, + "devDependencies": { + "eslint": "^8", + "eslint-config-next": "14.1.4" + } +} diff --git a/onix-gui/GUI/public/arrow.png b/onix-gui/GUI/public/arrow.png new file mode 100644 index 0000000..7151c68 Binary files /dev/null and b/onix-gui/GUI/public/arrow.png differ diff --git a/onix-gui/README.md b/onix-gui/README.md new file mode 100644 index 0000000..339f6dc --- /dev/null +++ b/onix-gui/README.md @@ -0,0 +1,77 @@ +# Beckn-Onix Installation Wizard + + + +The below provides an overview of the installation wizard and layer 2 tester & downloader features of Beckn-Onix. Follow the steps outlined below to successfully utilize these features. + + + +### Home Page + +- Visit the home page of the Beckn-Onix installation wizard. + + + +![Home Page](https://github.com/beckn/beckn-onix/assets/85678545/e8674a29-b6e2-4fb2-a5ad-c76166bf1174) + + + +### Installation Wizard + +- Navigate to the installation wizard section. + +- Fill in the required details as prompted. + + + +![Installation Wizard](https://github.com/beckn/beckn-onix/assets/85678545/e9cec587-299f-4793-9045-c7c01551ad51) + + + +### Continue Installation + +- Click on the "Continue" button to proceed with the installation. + +- Repeat the same process for all components. + + + +## Layer 2 + + + +![Layer 2](https://github.com/beckn/beckn-onix/assets/85678545/32978858-5303-43b2-b0b5-517ee98ec6c3) + + + +### Setup Configuration File + +- Select whether you want to set up the layer 2 config file in BAP or BPP. + +- Fill in the Domain and version number of the layer 2 config file. + + + +### Check File Presence + +- If the file is present, a success toast will be displayed. + +- If the file is not present, a link for downloading the layer 2 file to the protocol server will be provided. + + + +![Check File Presence](https://github.com/beckn/beckn-onix/assets/85678545/31aaf210-9fef-4c33-b651-7231cd900f0a) + + + +### Download File + +- Click on the download link to be redirected to another page for downloading. + +- Paste the YAML file URL and click "Continue". + +- If successful, a success toast will be displayed. If unsuccessful, an error toast will be shown. + + + +![Download File](https://github.com/beckn/beckn-onix/assets/85678545/0dd9d456-66ca-4e2a-abc1-ba8dd98719c1) diff --git a/onix-gui/start.sh b/onix-gui/start.sh new file mode 100755 index 0000000..8ffc509 --- /dev/null +++ b/onix-gui/start.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +# Installing dependencies + +sudo apt-get update +sudo apt-get install ca-certificates curl + +sudo install -m 0755 -d /etc/apt/keyrings +sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc +sudo chmod a+r /etc/apt/keyrings/docker.asc + +# Add the repository to Apt sources: +echo \ +"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ +$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ +sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + +sudo apt-get update +sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + +sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose + +echo "installing node" +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && +source ~/.bashrc && +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion +nvm install 20 && +npm i -g localtunnel && + +# Add user to the docker group and apply permissions +sudo groupadd docker & +sudo usermod -aG docker $USER & +newgrp docker & + +# Set script variables +PROJECT_DIR="GUI" +PORT=3005 +TUNNEL_SERVICE="lt" + +# Change to the project directory +cd "$PROJECT_DIR" || exit +nvm use 20 && +npm i && + +# Build and start the Next.js app +echo "installing Dependencies" +echo "Building and starting Next.js app..." +npx next build && +echo "Builing Web App = True" +sleep 3 +npx next start -p "$PORT" & + +# Wait for the Next.js app to start + +# Install the tunnel service if not installed +sleep 3 +echo "Exposing local port $PORT using $TUNNEL_SERVICE..." +lt --port "$PORT" > /tmp/lt.log 2>&1 & + +# Wait for the tunnel service to start +echo "Waiting for tunnel service to start..." +sleep 5 + +# Get the tunnel URL from the log file +TUNNEL_URL=$(grep -o 'https://[^[:blank:]]*' /tmp/lt.log) + +#Get the tunnel password +echo "Getting Tunnel Password" +TUNNEL_PASSWORD=$(curl https://loca.lt/mytunnelpassword) && + +# Print the tunnel URL and password +echo "---------------------------------------" +echo "Next.js app is running locally on port $PORT" +echo "Tunnel Service URL: $TUNNEL_URL" +echo "Tunnel Password: $TUNNEL_PASSWORD" +echo "---------------------------------------"